proteus  1.8.1
C/C++/Fortran libraries
cfemIntegrals.c
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 CYTHON_INLINE
307  #if defined(__clang__)
308  #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
309  #elif defined(__GNUC__)
310  #define CYTHON_INLINE __inline__
311  #elif defined(_MSC_VER)
312  #define CYTHON_INLINE __inline
313  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
314  #define CYTHON_INLINE inline
315  #else
316  #define CYTHON_INLINE
317  #endif
318 #endif
319 
320 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
321  #define Py_OptimizeFlag 0
322 #endif
323 #define __PYX_BUILD_PY_SSIZE_T "n"
324 #define CYTHON_FORMAT_SSIZE_T "z"
325 #if PY_MAJOR_VERSION < 3
326  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
327  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
328  PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
329  #define __Pyx_DefaultClassType PyClass_Type
330 #else
331  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
332  #define __Pyx_DefaultClassType PyType_Type
333 #if PY_VERSION_HEX >= 0x030B00A1
334  static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int k, int l, int s, int f,
335  PyObject *code, PyObject *c, PyObject* n, PyObject *v,
336  PyObject *fv, PyObject *cell, PyObject* fn,
337  PyObject *name, int fline, PyObject *lnos) {
338  PyObject *kwds=NULL, *argcount=NULL, *posonlyargcount=NULL, *kwonlyargcount=NULL;
339  PyObject *nlocals=NULL, *stacksize=NULL, *flags=NULL, *replace=NULL, *call_result=NULL, *empty=NULL;
340  const char *fn_cstr=NULL;
341  const char *name_cstr=NULL;
342  PyCodeObject* co=NULL;
343  PyObject *type, *value, *traceback;
344  PyErr_Fetch(&type, &value, &traceback);
345  if (!(kwds=PyDict_New())) goto end;
346  if (!(argcount=PyLong_FromLong(a))) goto end;
347  if (PyDict_SetItemString(kwds, "co_argcount", argcount) != 0) goto end;
348  if (!(posonlyargcount=PyLong_FromLong(0))) goto end;
349  if (PyDict_SetItemString(kwds, "co_posonlyargcount", posonlyargcount) != 0) goto end;
350  if (!(kwonlyargcount=PyLong_FromLong(k))) goto end;
351  if (PyDict_SetItemString(kwds, "co_kwonlyargcount", kwonlyargcount) != 0) goto end;
352  if (!(nlocals=PyLong_FromLong(l))) goto end;
353  if (PyDict_SetItemString(kwds, "co_nlocals", nlocals) != 0) goto end;
354  if (!(stacksize=PyLong_FromLong(s))) goto end;
355  if (PyDict_SetItemString(kwds, "co_stacksize", stacksize) != 0) goto end;
356  if (!(flags=PyLong_FromLong(f))) goto end;
357  if (PyDict_SetItemString(kwds, "co_flags", flags) != 0) goto end;
358  if (PyDict_SetItemString(kwds, "co_code", code) != 0) goto end;
359  if (PyDict_SetItemString(kwds, "co_consts", c) != 0) goto end;
360  if (PyDict_SetItemString(kwds, "co_names", n) != 0) goto end;
361  if (PyDict_SetItemString(kwds, "co_varnames", v) != 0) goto end;
362  if (PyDict_SetItemString(kwds, "co_freevars", fv) != 0) goto end;
363  if (PyDict_SetItemString(kwds, "co_cellvars", cell) != 0) goto end;
364  if (PyDict_SetItemString(kwds, "co_linetable", lnos) != 0) goto end;
365  if (!(fn_cstr=PyUnicode_AsUTF8AndSize(fn, NULL))) goto end;
366  if (!(name_cstr=PyUnicode_AsUTF8AndSize(name, NULL))) goto end;
367  if (!(co = PyCode_NewEmpty(fn_cstr, name_cstr, fline))) goto end;
368  if (!(replace = PyObject_GetAttrString((PyObject*)co, "replace"))) goto cleanup_code_too;
369  if (!(empty = PyTuple_New(0))) goto cleanup_code_too; // unfortunately __pyx_empty_tuple isn't available here
370  if (!(call_result = PyObject_Call(replace, empty, kwds))) goto cleanup_code_too;
371  Py_XDECREF((PyObject*)co);
372  co = (PyCodeObject*)call_result;
373  call_result = NULL;
374  if (0) {
375  cleanup_code_too:
376  Py_XDECREF((PyObject*)co);
377  co = NULL;
378  }
379  end:
380  Py_XDECREF(kwds);
381  Py_XDECREF(argcount);
382  Py_XDECREF(posonlyargcount);
383  Py_XDECREF(kwonlyargcount);
384  Py_XDECREF(nlocals);
385  Py_XDECREF(stacksize);
386  Py_XDECREF(replace);
387  Py_XDECREF(call_result);
388  Py_XDECREF(empty);
389  if (type) {
390  PyErr_Restore(type, value, traceback);
391  }
392  return co;
393  }
394 #else
395  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
396  PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
397 #endif
398  #define __Pyx_DefaultClassType PyType_Type
399 #endif
400 #ifndef Py_TPFLAGS_CHECKTYPES
401  #define Py_TPFLAGS_CHECKTYPES 0
402 #endif
403 #ifndef Py_TPFLAGS_HAVE_INDEX
404  #define Py_TPFLAGS_HAVE_INDEX 0
405 #endif
406 #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
407  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
408 #endif
409 #ifndef Py_TPFLAGS_HAVE_FINALIZE
410  #define Py_TPFLAGS_HAVE_FINALIZE 0
411 #endif
412 #ifndef METH_STACKLESS
413  #define METH_STACKLESS 0
414 #endif
415 #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
416  #ifndef METH_FASTCALL
417  #define METH_FASTCALL 0x80
418  #endif
419  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
420  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
421  Py_ssize_t nargs, PyObject *kwnames);
422 #else
423  #define __Pyx_PyCFunctionFast _PyCFunctionFast
424  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
425 #endif
426 #if CYTHON_FAST_PYCCALL
427 #define __Pyx_PyFastCFunction_Check(func)\
428  ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
429 #else
430 #define __Pyx_PyFastCFunction_Check(func) 0
431 #endif
432 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
433  #define PyObject_Malloc(s) PyMem_Malloc(s)
434  #define PyObject_Free(p) PyMem_Free(p)
435  #define PyObject_Realloc(p) PyMem_Realloc(p)
436 #endif
437 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1
438  #define PyMem_RawMalloc(n) PyMem_Malloc(n)
439  #define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n)
440  #define PyMem_RawFree(p) PyMem_Free(p)
441 #endif
442 #if CYTHON_COMPILING_IN_PYSTON
443  #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co)
444  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
445 #else
446  #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
447  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
448 #endif
449 #if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
450  #define __Pyx_PyThreadState_Current PyThreadState_GET()
451 #elif PY_VERSION_HEX >= 0x03060000
452  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
453 #elif PY_VERSION_HEX >= 0x03000000
454  #define __Pyx_PyThreadState_Current PyThreadState_GET()
455 #else
456  #define __Pyx_PyThreadState_Current _PyThreadState_Current
457 #endif
458 #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
459 #include "pythread.h"
460 #define Py_tss_NEEDS_INIT 0
461 typedef int Py_tss_t;
462 static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
463  *key = PyThread_create_key();
464  return 0;
465 }
466 static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
467  Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
468  *key = Py_tss_NEEDS_INIT;
469  return key;
470 }
471 static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
472  PyObject_Free(key);
473 }
474 static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
475  return *key != Py_tss_NEEDS_INIT;
476 }
477 static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
478  PyThread_delete_key(*key);
479  *key = Py_tss_NEEDS_INIT;
480 }
481 static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
482  return PyThread_set_key_value(*key, value);
483 }
484 static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
485  return PyThread_get_key_value(*key);
486 }
487 #endif
488 #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
489 #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
490 #else
491 #define __Pyx_PyDict_NewPresized(n) PyDict_New()
492 #endif
493 #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
494  #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
495  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
496 #else
497  #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
498  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
499 #endif
500 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
501 #define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
502 #else
503 #define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name)
504 #endif
505 #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
506  #define CYTHON_PEP393_ENABLED 1
507  #if defined(PyUnicode_IS_READY)
508  #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
509  0 : _PyUnicode_Ready((PyObject *)(op)))
510  #else
511  #define __Pyx_PyUnicode_READY(op) (0)
512  #endif
513  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
514  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
515  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
516  #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
517  #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
518  #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
519  #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
520  #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE)
521  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000
522  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length))
523  #else
524  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
525  #endif
526  #else
527  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u))
528  #endif
529 #else
530  #define CYTHON_PEP393_ENABLED 0
531  #define PyUnicode_1BYTE_KIND 1
532  #define PyUnicode_2BYTE_KIND 2
533  #define PyUnicode_4BYTE_KIND 4
534  #define __Pyx_PyUnicode_READY(op) (0)
535  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
536  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
537  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
538  #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
539  #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
540  #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
541  #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
542  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
543 #endif
544 #if CYTHON_COMPILING_IN_PYPY
545  #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
546  #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
547 #else
548  #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
549  #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
550  PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
551 #endif
552 #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
553  #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
554 #endif
555 #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
556  #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
557 #endif
558 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
559  #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
560 #endif
561 #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
562 #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
563 #if PY_MAJOR_VERSION >= 3
564  #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
565 #else
566  #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
567 #endif
568 #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
569  #define PyObject_ASCII(o) PyObject_Repr(o)
570 #endif
571 #if PY_MAJOR_VERSION >= 3
572  #define PyBaseString_Type PyUnicode_Type
573  #define PyStringObject PyUnicodeObject
574  #define PyString_Type PyUnicode_Type
575  #define PyString_Check PyUnicode_Check
576  #define PyString_CheckExact PyUnicode_CheckExact
577 #ifndef PyObject_Unicode
578  #define PyObject_Unicode PyObject_Str
579 #endif
580 #endif
581 #if PY_MAJOR_VERSION >= 3
582  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
583  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
584 #else
585  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
586  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
587 #endif
588 #ifndef PySet_CheckExact
589  #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
590 #endif
591 #if PY_VERSION_HEX >= 0x030900A4
592  #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
593  #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
594 #else
595  #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
596  #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
597 #endif
598 #if CYTHON_ASSUME_SAFE_MACROS
599  #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
600 #else
601  #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
602 #endif
603 #if PY_MAJOR_VERSION >= 3
604  #define PyIntObject PyLongObject
605  #define PyInt_Type PyLong_Type
606  #define PyInt_Check(op) PyLong_Check(op)
607  #define PyInt_CheckExact(op) PyLong_CheckExact(op)
608  #define PyInt_FromString PyLong_FromString
609  #define PyInt_FromUnicode PyLong_FromUnicode
610  #define PyInt_FromLong PyLong_FromLong
611  #define PyInt_FromSize_t PyLong_FromSize_t
612  #define PyInt_FromSsize_t PyLong_FromSsize_t
613  #define PyInt_AsLong PyLong_AsLong
614  #define PyInt_AS_LONG PyLong_AS_LONG
615  #define PyInt_AsSsize_t PyLong_AsSsize_t
616  #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
617  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
618  #define PyNumber_Int PyNumber_Long
619 #endif
620 #if PY_MAJOR_VERSION >= 3
621  #define PyBoolObject PyLongObject
622 #endif
623 #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
624  #ifndef PyUnicode_InternFromString
625  #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
626  #endif
627 #endif
628 #if PY_VERSION_HEX < 0x030200A4
629  typedef long Py_hash_t;
630  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
631  #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsHash_t
632 #else
633  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
634  #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t
635 #endif
636 #if PY_MAJOR_VERSION >= 3
637  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func))
638 #else
639  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
640 #endif
641 #if CYTHON_USE_ASYNC_SLOTS
642  #if PY_VERSION_HEX >= 0x030500B1
643  #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
644  #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
645  #else
646  #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
647  #endif
648 #else
649  #define __Pyx_PyType_AsAsync(obj) NULL
650 #endif
651 #ifndef __Pyx_PyAsyncMethodsStruct
652  typedef struct {
653  unaryfunc am_await;
654  unaryfunc am_aiter;
655  unaryfunc am_anext;
656  } __Pyx_PyAsyncMethodsStruct;
657 #endif
658 
659 #if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
660  #if !defined(_USE_MATH_DEFINES)
661  #define _USE_MATH_DEFINES
662  #endif
663 #endif
664 #include <math.h>
665 #ifdef NAN
666 #define __PYX_NAN() ((float) NAN)
667 #else
668 static CYTHON_INLINE float __PYX_NAN() {
669  float value;
670  memset(&value, 0xFF, sizeof(value));
671  return value;
672 }
673 #endif
674 #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
675 #define __Pyx_truncl trunc
676 #else
677 #define __Pyx_truncl truncl
678 #endif
679 
680 #define __PYX_MARK_ERR_POS(f_index, lineno) \
681  { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; }
682 #define __PYX_ERR(f_index, lineno, Ln_error) \
683  { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }
684 
685 #ifndef __PYX_EXTERN_C
686  #ifdef __cplusplus
687  #define __PYX_EXTERN_C extern "C"
688  #else
689  #define __PYX_EXTERN_C extern
690  #endif
691 #endif
692 
693 #define __PYX_HAVE__cfemIntegrals
694 #define __PYX_HAVE_API__cfemIntegrals
695 /* Early includes */
696 #include <string.h>
697 #include <stdio.h>
698 #include "numpy/arrayobject.h"
699 #include "numpy/ndarrayobject.h"
700 #include "numpy/ndarraytypes.h"
701 #include "numpy/arrayscalars.h"
702 #include "numpy/ufuncobject.h"
703 
704  /* NumPy API declarations from "numpy/__init__.pxd" */
705 
706 #include "femIntegrals.h"
707 #ifdef _OPENMP
708 #include <omp.h>
709 #endif /* _OPENMP */
710 
711 #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
712 #define CYTHON_WITHOUT_ASSERTIONS
713 #endif
714 
715 typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
716  const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
717 
718 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
719 #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
720 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
721 #define __PYX_DEFAULT_STRING_ENCODING ""
722 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
723 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
724 #define __Pyx_uchar_cast(c) ((unsigned char)c)
725 #define __Pyx_long_cast(x) ((long)x)
726 #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
727  (sizeof(type) < sizeof(Py_ssize_t)) ||\
728  (sizeof(type) > sizeof(Py_ssize_t) &&\
729  likely(v < (type)PY_SSIZE_T_MAX ||\
730  v == (type)PY_SSIZE_T_MAX) &&\
731  (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
732  v == (type)PY_SSIZE_T_MIN))) ||\
733  (sizeof(type) == sizeof(Py_ssize_t) &&\
734  (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
735  v == (type)PY_SSIZE_T_MAX))) )
736 static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
737  return (size_t) i < (size_t) limit;
738 }
739 #if defined (__cplusplus) && __cplusplus >= 201103L
740  #include <cstdlib>
741  #define __Pyx_sst_abs(value) std::abs(value)
742 #elif SIZEOF_INT >= SIZEOF_SIZE_T
743  #define __Pyx_sst_abs(value) abs(value)
744 #elif SIZEOF_LONG >= SIZEOF_SIZE_T
745  #define __Pyx_sst_abs(value) labs(value)
746 #elif defined (_MSC_VER)
747  #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
748 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
749  #define __Pyx_sst_abs(value) llabs(value)
750 #elif defined (__GNUC__)
751  #define __Pyx_sst_abs(value) __builtin_llabs(value)
752 #else
753  #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
754 #endif
755 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
756 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
757 #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
758 #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
759 #define __Pyx_PyBytes_FromString PyBytes_FromString
760 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
761 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
762 #if PY_MAJOR_VERSION < 3
763  #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
764  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
765 #else
766  #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
767  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
768 #endif
769 #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
770 #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
771 #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
772 #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
773 #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
774 #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
775 #define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s))
776 #define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
777 #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
778 #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
779 #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
780 #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
781 #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
782 #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
783 #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
784 #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
785 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
786  const Py_UNICODE *u_end = u;
787  while (*u_end++) ;
788  return (size_t)(u_end - u - 1);
789 }
790 #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
791 #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
792 #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
793 #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
794 #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
795 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
796 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
797 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
798 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
799 #define __Pyx_PySequence_Tuple(obj)\
800  (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
801 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
802 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
803 static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
804 #if CYTHON_ASSUME_SAFE_MACROS
805 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
806 #else
807 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
808 #endif
809 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
810 #if PY_MAJOR_VERSION >= 3
811 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
812 #else
813 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
814 #endif
815 #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
816 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
817 static int __Pyx_sys_getdefaultencoding_not_ascii;
818 static int __Pyx_init_sys_getdefaultencoding_params(void) {
819  PyObject* sys;
820  PyObject* default_encoding = NULL;
821  PyObject* ascii_chars_u = NULL;
822  PyObject* ascii_chars_b = NULL;
823  const char* default_encoding_c;
824  sys = PyImport_ImportModule("sys");
825  if (!sys) goto bad;
826  default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
827  Py_DECREF(sys);
828  if (!default_encoding) goto bad;
829  default_encoding_c = PyBytes_AsString(default_encoding);
830  if (!default_encoding_c) goto bad;
831  if (strcmp(default_encoding_c, "ascii") == 0) {
832  __Pyx_sys_getdefaultencoding_not_ascii = 0;
833  } else {
834  char ascii_chars[128];
835  int c;
836  for (c = 0; c < 128; c++) {
837  ascii_chars[c] = c;
838  }
839  __Pyx_sys_getdefaultencoding_not_ascii = 1;
840  ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
841  if (!ascii_chars_u) goto bad;
842  ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
843  if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
844  PyErr_Format(
845  PyExc_ValueError,
846  "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
847  default_encoding_c);
848  goto bad;
849  }
850  Py_DECREF(ascii_chars_u);
851  Py_DECREF(ascii_chars_b);
852  }
853  Py_DECREF(default_encoding);
854  return 0;
855 bad:
856  Py_XDECREF(default_encoding);
857  Py_XDECREF(ascii_chars_u);
858  Py_XDECREF(ascii_chars_b);
859  return -1;
860 }
861 #endif
862 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
863 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
864 #else
865 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
866 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
867 static char* __PYX_DEFAULT_STRING_ENCODING;
868 static int __Pyx_init_sys_getdefaultencoding_params(void) {
869  PyObject* sys;
870  PyObject* default_encoding = NULL;
871  char* default_encoding_c;
872  sys = PyImport_ImportModule("sys");
873  if (!sys) goto bad;
874  default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
875  Py_DECREF(sys);
876  if (!default_encoding) goto bad;
877  default_encoding_c = PyBytes_AsString(default_encoding);
878  if (!default_encoding_c) goto bad;
879  __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
880  if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
881  strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
882  Py_DECREF(default_encoding);
883  return 0;
884 bad:
885  Py_XDECREF(default_encoding);
886  return -1;
887 }
888 #endif
889 #endif
890 
891 
892 /* Test for GCC > 2.95 */
893 #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
894  #define likely(x) __builtin_expect(!!(x), 1)
895  #define unlikely(x) __builtin_expect(!!(x), 0)
896 #else /* !__GNUC__ or GCC < 2.95 */
897  #define likely(x) (x)
898  #define unlikely(x) (x)
899 #endif /* __GNUC__ */
900 static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
901 
902 static PyObject *__pyx_m = NULL;
903 static PyObject *__pyx_d;
904 static PyObject *__pyx_b;
905 static PyObject *__pyx_cython_runtime = NULL;
906 static PyObject *__pyx_empty_tuple;
907 static PyObject *__pyx_empty_bytes;
908 static PyObject *__pyx_empty_unicode;
909 static int __pyx_lineno;
910 static int __pyx_clineno = 0;
911 static const char * __pyx_cfilenm= __FILE__;
912 static const char *__pyx_filename;
913 
914 /* Header.proto */
915 #if !defined(CYTHON_CCOMPLEX)
916  #if defined(__cplusplus)
917  #define CYTHON_CCOMPLEX 1
918  #elif defined(_Complex_I)
919  #define CYTHON_CCOMPLEX 1
920  #else
921  #define CYTHON_CCOMPLEX 0
922  #endif
923 #endif
924 #if CYTHON_CCOMPLEX
925  #ifdef __cplusplus
926  #include <complex>
927  #else
928  #include <complex.h>
929  #endif
930 #endif
931 #if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
932  #undef _Complex_I
933  #define _Complex_I 1.0fj
934 #endif
935 
936 
937 static const char *__pyx_f[] = {
938  "proteus/cfemIntegrals.pyx",
939  "__init__.pxd",
940  "type.pxd",
941 };
942 
943 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":690
944  * # in Cython to enable them only on the right systems.
945  *
946  * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<<
947  * ctypedef npy_int16 int16_t
948  * ctypedef npy_int32 int32_t
949  */
950 typedef npy_int8 __pyx_t_5numpy_int8_t;
951 
952 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":691
953  *
954  * ctypedef npy_int8 int8_t
955  * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<<
956  * ctypedef npy_int32 int32_t
957  * ctypedef npy_int64 int64_t
958  */
959 typedef npy_int16 __pyx_t_5numpy_int16_t;
960 
961 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":692
962  * ctypedef npy_int8 int8_t
963  * ctypedef npy_int16 int16_t
964  * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<<
965  * ctypedef npy_int64 int64_t
966  * #ctypedef npy_int96 int96_t
967  */
968 typedef npy_int32 __pyx_t_5numpy_int32_t;
969 
970 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":693
971  * ctypedef npy_int16 int16_t
972  * ctypedef npy_int32 int32_t
973  * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<<
974  * #ctypedef npy_int96 int96_t
975  * #ctypedef npy_int128 int128_t
976  */
977 typedef npy_int64 __pyx_t_5numpy_int64_t;
978 
979 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":697
980  * #ctypedef npy_int128 int128_t
981  *
982  * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<<
983  * ctypedef npy_uint16 uint16_t
984  * ctypedef npy_uint32 uint32_t
985  */
986 typedef npy_uint8 __pyx_t_5numpy_uint8_t;
987 
988 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":698
989  *
990  * ctypedef npy_uint8 uint8_t
991  * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<<
992  * ctypedef npy_uint32 uint32_t
993  * ctypedef npy_uint64 uint64_t
994  */
995 typedef npy_uint16 __pyx_t_5numpy_uint16_t;
996 
997 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":699
998  * ctypedef npy_uint8 uint8_t
999  * ctypedef npy_uint16 uint16_t
1000  * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<<
1001  * ctypedef npy_uint64 uint64_t
1002  * #ctypedef npy_uint96 uint96_t
1003  */
1004 typedef npy_uint32 __pyx_t_5numpy_uint32_t;
1005 
1006 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":700
1007  * ctypedef npy_uint16 uint16_t
1008  * ctypedef npy_uint32 uint32_t
1009  * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<<
1010  * #ctypedef npy_uint96 uint96_t
1011  * #ctypedef npy_uint128 uint128_t
1012  */
1013 typedef npy_uint64 __pyx_t_5numpy_uint64_t;
1014 
1015 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":704
1016  * #ctypedef npy_uint128 uint128_t
1017  *
1018  * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<<
1019  * ctypedef npy_float64 float64_t
1020  * #ctypedef npy_float80 float80_t
1021  */
1022 typedef npy_float32 __pyx_t_5numpy_float32_t;
1023 
1024 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":705
1025  *
1026  * ctypedef npy_float32 float32_t
1027  * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<<
1028  * #ctypedef npy_float80 float80_t
1029  * #ctypedef npy_float128 float128_t
1030  */
1031 typedef npy_float64 __pyx_t_5numpy_float64_t;
1032 
1033 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":714
1034  * # The int types are mapped a bit surprising --
1035  * # numpy.int corresponds to 'l' and numpy.long to 'q'
1036  * ctypedef npy_long int_t # <<<<<<<<<<<<<<
1037  * ctypedef npy_longlong long_t
1038  * ctypedef npy_longlong longlong_t
1039  */
1040 typedef npy_long __pyx_t_5numpy_int_t;
1041 
1042 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":715
1043  * # numpy.int corresponds to 'l' and numpy.long to 'q'
1044  * ctypedef npy_long int_t
1045  * ctypedef npy_longlong long_t # <<<<<<<<<<<<<<
1046  * ctypedef npy_longlong longlong_t
1047  *
1048  */
1049 typedef npy_longlong __pyx_t_5numpy_long_t;
1050 
1051 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":716
1052  * ctypedef npy_long int_t
1053  * ctypedef npy_longlong long_t
1054  * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<<
1055  *
1056  * ctypedef npy_ulong uint_t
1057  */
1058 typedef npy_longlong __pyx_t_5numpy_longlong_t;
1059 
1060 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":718
1061  * ctypedef npy_longlong longlong_t
1062  *
1063  * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<<
1064  * ctypedef npy_ulonglong ulong_t
1065  * ctypedef npy_ulonglong ulonglong_t
1066  */
1067 typedef npy_ulong __pyx_t_5numpy_uint_t;
1068 
1069 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":719
1070  *
1071  * ctypedef npy_ulong uint_t
1072  * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<<
1073  * ctypedef npy_ulonglong ulonglong_t
1074  *
1075  */
1076 typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
1077 
1078 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":720
1079  * ctypedef npy_ulong uint_t
1080  * ctypedef npy_ulonglong ulong_t
1081  * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<<
1082  *
1083  * ctypedef npy_intp intp_t
1084  */
1085 typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
1086 
1087 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":722
1088  * ctypedef npy_ulonglong ulonglong_t
1089  *
1090  * ctypedef npy_intp intp_t # <<<<<<<<<<<<<<
1091  * ctypedef npy_uintp uintp_t
1092  *
1093  */
1094 typedef npy_intp __pyx_t_5numpy_intp_t;
1095 
1096 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":723
1097  *
1098  * ctypedef npy_intp intp_t
1099  * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<<
1100  *
1101  * ctypedef npy_double float_t
1102  */
1103 typedef npy_uintp __pyx_t_5numpy_uintp_t;
1104 
1105 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":725
1106  * ctypedef npy_uintp uintp_t
1107  *
1108  * ctypedef npy_double float_t # <<<<<<<<<<<<<<
1109  * ctypedef npy_double double_t
1110  * ctypedef npy_longdouble longdouble_t
1111  */
1112 typedef npy_double __pyx_t_5numpy_float_t;
1113 
1114 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":726
1115  *
1116  * ctypedef npy_double float_t
1117  * ctypedef npy_double double_t # <<<<<<<<<<<<<<
1118  * ctypedef npy_longdouble longdouble_t
1119  *
1120  */
1121 typedef npy_double __pyx_t_5numpy_double_t;
1122 
1123 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":727
1124  * ctypedef npy_double float_t
1125  * ctypedef npy_double double_t
1126  * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<<
1127  *
1128  * ctypedef npy_cfloat cfloat_t
1129  */
1130 typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
1131 /* Declarations.proto */
1132 #if CYTHON_CCOMPLEX
1133  #ifdef __cplusplus
1134  typedef ::std::complex< float > __pyx_t_float_complex;
1135  #else
1136  typedef float _Complex __pyx_t_float_complex;
1137  #endif
1138 #else
1139  typedef struct { float real, imag; } __pyx_t_float_complex;
1140 #endif
1141 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);
1142 
1143 /* Declarations.proto */
1144 #if CYTHON_CCOMPLEX
1145  #ifdef __cplusplus
1146  typedef ::std::complex< double > __pyx_t_double_complex;
1147  #else
1148  typedef double _Complex __pyx_t_double_complex;
1149  #endif
1150 #else
1151  typedef struct { double real, imag; } __pyx_t_double_complex;
1152 #endif
1153 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);
1154 
1155 
1156 /*--- Type declarations ---*/
1157 
1158 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":729
1159  * ctypedef npy_longdouble longdouble_t
1160  *
1161  * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<<
1162  * ctypedef npy_cdouble cdouble_t
1163  * ctypedef npy_clongdouble clongdouble_t
1164  */
1165 typedef npy_cfloat __pyx_t_5numpy_cfloat_t;
1166 
1167 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":730
1168  *
1169  * ctypedef npy_cfloat cfloat_t
1170  * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<<
1171  * ctypedef npy_clongdouble clongdouble_t
1172  *
1173  */
1174 typedef npy_cdouble __pyx_t_5numpy_cdouble_t;
1175 
1176 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":731
1177  * ctypedef npy_cfloat cfloat_t
1178  * ctypedef npy_cdouble cdouble_t
1179  * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<<
1180  *
1181  * ctypedef npy_cdouble complex_t
1182  */
1183 typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;
1184 
1185 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":733
1186  * ctypedef npy_clongdouble clongdouble_t
1187  *
1188  * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<<
1189  *
1190  * cdef inline object PyArray_MultiIterNew1(a):
1191  */
1192 typedef npy_cdouble __pyx_t_5numpy_complex_t;
1193 
1194 /* --- Runtime support code (head) --- */
1195 /* Refnanny.proto */
1196 #ifndef CYTHON_REFNANNY
1197  #define CYTHON_REFNANNY 0
1198 #endif
1199 #if CYTHON_REFNANNY
1200  typedef struct {
1201  void (*INCREF)(void*, PyObject*, int);
1202  void (*DECREF)(void*, PyObject*, int);
1203  void (*GOTREF)(void*, PyObject*, int);
1204  void (*GIVEREF)(void*, PyObject*, int);
1205  void* (*SetupContext)(const char*, int, const char*);
1206  void (*FinishContext)(void**);
1207  } __Pyx_RefNannyAPIStruct;
1208  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
1209  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
1210  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
1211 #ifdef WITH_THREAD
1212  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1213  if (acquire_gil) {\
1214  PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
1215  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1216  PyGILState_Release(__pyx_gilstate_save);\
1217  } else {\
1218  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1219  }
1220 #else
1221  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1222  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
1223 #endif
1224  #define __Pyx_RefNannyFinishContext()\
1225  __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
1226  #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1227  #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1228  #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1229  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1230  #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
1231  #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
1232  #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
1233  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
1234 #else
1235  #define __Pyx_RefNannyDeclarations
1236  #define __Pyx_RefNannySetupContext(name, acquire_gil)
1237  #define __Pyx_RefNannyFinishContext()
1238  #define __Pyx_INCREF(r) Py_INCREF(r)
1239  #define __Pyx_DECREF(r) Py_DECREF(r)
1240  #define __Pyx_GOTREF(r)
1241  #define __Pyx_GIVEREF(r)
1242  #define __Pyx_XINCREF(r) Py_XINCREF(r)
1243  #define __Pyx_XDECREF(r) Py_XDECREF(r)
1244  #define __Pyx_XGOTREF(r)
1245  #define __Pyx_XGIVEREF(r)
1246 #endif
1247 #define __Pyx_XDECREF_SET(r, v) do {\
1248  PyObject *tmp = (PyObject *) r;\
1249  r = v; __Pyx_XDECREF(tmp);\
1250  } while (0)
1251 #define __Pyx_DECREF_SET(r, v) do {\
1252  PyObject *tmp = (PyObject *) r;\
1253  r = v; __Pyx_DECREF(tmp);\
1254  } while (0)
1255 #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
1256 #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
1257 
1258 /* PyObjectGetAttrStr.proto */
1259 #if CYTHON_USE_TYPE_SLOTS
1260 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
1261 #else
1262 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
1263 #endif
1264 
1265 /* GetBuiltinName.proto */
1266 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
1267 
1268 /* RaiseArgTupleInvalid.proto */
1269 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
1270  Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
1271 
1272 /* RaiseDoubleKeywords.proto */
1273 static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
1274 
1275 /* ParseKeywords.proto */
1276 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
1277  PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
1278  const char* function_name);
1279 
1280 /* ArgTypeTest.proto */
1281 #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
1282  ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
1283  __Pyx__ArgTypeTest(obj, type, name, exact))
1284 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);
1285 
1286 /* PyFunctionFastCall.proto */
1287 #if CYTHON_FAST_PYCALL
1288 #define __Pyx_PyFunction_FastCall(func, args, nargs)\
1289  __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
1290 #if 1 || PY_VERSION_HEX < 0x030600B1
1291 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
1292 #else
1293 #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
1294 #endif
1295 #define __Pyx_BUILD_ASSERT_EXPR(cond)\
1296  (sizeof(char [1 - 2*!(cond)]) - 1)
1297 #ifndef Py_MEMBER_SIZE
1298 #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
1299 #endif
1300 #if CYTHON_FAST_PYCALL
1301  static size_t __pyx_pyframe_localsplus_offset = 0;
1302  #include "frameobject.h"
1303 #if PY_VERSION_HEX >= 0x030b00a6
1304  #ifndef Py_BUILD_CORE
1305  #define Py_BUILD_CORE 1
1306  #endif
1307  #include "internal/pycore_frame.h"
1308 #endif
1309  #define __Pxy_PyFrame_Initialize_Offsets()\
1310  ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
1311  (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
1312  #define __Pyx_PyFrame_GetLocalsplus(frame)\
1313  (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
1314 #endif // CYTHON_FAST_PYCALL
1315 #endif
1316 
1317 /* PyObjectCall.proto */
1318 #if CYTHON_COMPILING_IN_CPYTHON
1319 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
1320 #else
1321 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
1322 #endif
1323 
1324 /* PyObjectCallMethO.proto */
1325 #if CYTHON_COMPILING_IN_CPYTHON
1326 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
1327 #endif
1328 
1329 /* PyObjectCallNoArg.proto */
1330 #if CYTHON_COMPILING_IN_CPYTHON
1331 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
1332 #else
1333 #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
1334 #endif
1335 
1336 /* PyCFunctionFastCall.proto */
1337 #if CYTHON_FAST_PYCCALL
1338 static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
1339 #else
1340 #define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)
1341 #endif
1342 
1343 /* PyObjectCallOneArg.proto */
1344 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
1345 
1346 /* RaiseTooManyValuesToUnpack.proto */
1347 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
1348 
1349 /* RaiseNeedMoreValuesToUnpack.proto */
1350 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
1351 
1352 /* IterFinish.proto */
1353 static CYTHON_INLINE int __Pyx_IterFinish(void);
1354 
1355 /* UnpackItemEndCheck.proto */
1356 static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);
1357 
1358 /* ExtTypeTest.proto */
1359 static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
1360 
1361 /* GetTopmostException.proto */
1362 #if CYTHON_USE_EXC_INFO_STACK
1363 static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
1364 #endif
1365 
1366 /* PyThreadStateGet.proto */
1367 #if CYTHON_FAST_THREAD_STATE
1368 #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
1369 #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
1370 #define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type
1371 #else
1372 #define __Pyx_PyThreadState_declare
1373 #define __Pyx_PyThreadState_assign
1374 #define __Pyx_PyErr_Occurred() PyErr_Occurred()
1375 #endif
1376 
1377 /* SaveResetException.proto */
1378 #if CYTHON_FAST_THREAD_STATE
1379 #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
1380 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1381 #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
1382 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1383 #else
1384 #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
1385 #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
1386 #endif
1387 
1388 /* PyErrExceptionMatches.proto */
1389 #if CYTHON_FAST_THREAD_STATE
1390 #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
1391 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
1392 #else
1393 #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
1394 #endif
1395 
1396 /* GetException.proto */
1397 #if CYTHON_FAST_THREAD_STATE
1398 #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
1399 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1400 #else
1401 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
1402 #endif
1403 
1404 /* PyErrFetchRestore.proto */
1405 #if CYTHON_FAST_THREAD_STATE
1406 #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
1407 #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
1408 #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
1409 #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
1410 #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
1411 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1412 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1413 #if CYTHON_COMPILING_IN_CPYTHON
1414 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
1415 #else
1416 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1417 #endif
1418 #else
1419 #define __Pyx_PyErr_Clear() PyErr_Clear()
1420 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1421 #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
1422 #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
1423 #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
1424 #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
1425 #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
1426 #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
1427 #endif
1428 
1429 /* RaiseException.proto */
1430 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
1431 
1432 /* TypeImport.proto */
1433 #ifndef __PYX_HAVE_RT_ImportType_proto
1434 #define __PYX_HAVE_RT_ImportType_proto
1435 enum __Pyx_ImportType_CheckSize {
1436  __Pyx_ImportType_CheckSize_Error = 0,
1437  __Pyx_ImportType_CheckSize_Warn = 1,
1438  __Pyx_ImportType_CheckSize_Ignore = 2
1439 };
1440 static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size);
1441 #endif
1442 
1443 /* Import.proto */
1444 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
1445 
1446 /* PyDictVersioning.proto */
1447 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
1448 #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1)
1449 #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)
1450 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
1451  (version_var) = __PYX_GET_DICT_VERSION(dict);\
1452  (cache_var) = (value);
1453 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
1454  static PY_UINT64_T __pyx_dict_version = 0;\
1455  static PyObject *__pyx_dict_cached_value = NULL;\
1456  if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
1457  (VAR) = __pyx_dict_cached_value;\
1458  } else {\
1459  (VAR) = __pyx_dict_cached_value = (LOOKUP);\
1460  __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
1461  }\
1462 }
1463 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
1464 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
1465 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
1466 #else
1467 #define __PYX_GET_DICT_VERSION(dict) (0)
1468 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
1469 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);
1470 #endif
1471 
1472 /* CLineInTraceback.proto */
1473 #ifdef CYTHON_CLINE_IN_TRACEBACK
1474 #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
1475 #else
1476 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
1477 #endif
1478 
1479 /* CodeObjectCache.proto */
1480 typedef struct {
1481  PyCodeObject* code_object;
1482  int code_line;
1483 } __Pyx_CodeObjectCacheEntry;
1484 struct __Pyx_CodeObjectCache {
1485  int count;
1486  int max_count;
1487  __Pyx_CodeObjectCacheEntry* entries;
1488 };
1489 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
1490 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
1491 static PyCodeObject *__pyx_find_code_object(int code_line);
1492 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
1493 
1494 /* AddTraceback.proto */
1495 static void __Pyx_AddTraceback(const char *funcname, int c_line,
1496  int py_line, const char *filename);
1497 
1498 /* GCCDiagnostics.proto */
1499 #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
1500 #define __Pyx_HAS_GCC_DIAGNOSTIC
1501 #endif
1502 
1503 /* Print.proto */
1504 static int __Pyx_Print(PyObject*, PyObject *, int);
1505 #if CYTHON_COMPILING_IN_PYPY || PY_MAJOR_VERSION >= 3
1506 static PyObject* __pyx_print = 0;
1507 static PyObject* __pyx_print_kwargs = 0;
1508 #endif
1509 
1510 /* RealImag.proto */
1511 #if CYTHON_CCOMPLEX
1512  #ifdef __cplusplus
1513  #define __Pyx_CREAL(z) ((z).real())
1514  #define __Pyx_CIMAG(z) ((z).imag())
1515  #else
1516  #define __Pyx_CREAL(z) (__real__(z))
1517  #define __Pyx_CIMAG(z) (__imag__(z))
1518  #endif
1519 #else
1520  #define __Pyx_CREAL(z) ((z).real)
1521  #define __Pyx_CIMAG(z) ((z).imag)
1522 #endif
1523 #if defined(__cplusplus) && CYTHON_CCOMPLEX\
1524  && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103)
1525  #define __Pyx_SET_CREAL(z,x) ((z).real(x))
1526  #define __Pyx_SET_CIMAG(z,y) ((z).imag(y))
1527 #else
1528  #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
1529  #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
1530 #endif
1531 
1532 /* Arithmetic.proto */
1533 #if CYTHON_CCOMPLEX
1534  #define __Pyx_c_eq_float(a, b) ((a)==(b))
1535  #define __Pyx_c_sum_float(a, b) ((a)+(b))
1536  #define __Pyx_c_diff_float(a, b) ((a)-(b))
1537  #define __Pyx_c_prod_float(a, b) ((a)*(b))
1538  #define __Pyx_c_quot_float(a, b) ((a)/(b))
1539  #define __Pyx_c_neg_float(a) (-(a))
1540  #ifdef __cplusplus
1541  #define __Pyx_c_is_zero_float(z) ((z)==(float)0)
1542  #define __Pyx_c_conj_float(z) (::std::conj(z))
1543  #if 1
1544  #define __Pyx_c_abs_float(z) (::std::abs(z))
1545  #define __Pyx_c_pow_float(a, b) (::std::pow(a, b))
1546  #endif
1547  #else
1548  #define __Pyx_c_is_zero_float(z) ((z)==0)
1549  #define __Pyx_c_conj_float(z) (conjf(z))
1550  #if 1
1551  #define __Pyx_c_abs_float(z) (cabsf(z))
1552  #define __Pyx_c_pow_float(a, b) (cpowf(a, b))
1553  #endif
1554  #endif
1555 #else
1556  static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex);
1557  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex);
1558  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex);
1559  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex);
1560  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex);
1561  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex);
1562  static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex);
1563  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex);
1564  #if 1
1565  static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex);
1566  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex);
1567  #endif
1568 #endif
1569 
1570 /* Arithmetic.proto */
1571 #if CYTHON_CCOMPLEX
1572  #define __Pyx_c_eq_double(a, b) ((a)==(b))
1573  #define __Pyx_c_sum_double(a, b) ((a)+(b))
1574  #define __Pyx_c_diff_double(a, b) ((a)-(b))
1575  #define __Pyx_c_prod_double(a, b) ((a)*(b))
1576  #define __Pyx_c_quot_double(a, b) ((a)/(b))
1577  #define __Pyx_c_neg_double(a) (-(a))
1578  #ifdef __cplusplus
1579  #define __Pyx_c_is_zero_double(z) ((z)==(double)0)
1580  #define __Pyx_c_conj_double(z) (::std::conj(z))
1581  #if 1
1582  #define __Pyx_c_abs_double(z) (::std::abs(z))
1583  #define __Pyx_c_pow_double(a, b) (::std::pow(a, b))
1584  #endif
1585  #else
1586  #define __Pyx_c_is_zero_double(z) ((z)==0)
1587  #define __Pyx_c_conj_double(z) (conj(z))
1588  #if 1
1589  #define __Pyx_c_abs_double(z) (cabs(z))
1590  #define __Pyx_c_pow_double(a, b) (cpow(a, b))
1591  #endif
1592  #endif
1593 #else
1594  static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex);
1595  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex);
1596  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex);
1597  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex);
1598  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex);
1599  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex);
1600  static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex);
1601  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex);
1602  #if 1
1603  static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex);
1604  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex);
1605  #endif
1606 #endif
1607 
1608 /* CIntFromPy.proto */
1609 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
1610 
1611 /* CIntToPy.proto */
1612 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
1613 
1614 /* CIntFromPy.proto */
1615 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
1616 
1617 /* PrintOne.proto */
1618 static int __Pyx_PrintOne(PyObject* stream, PyObject *o);
1619 
1620 /* CIntToPy.proto */
1621 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
1622 
1623 /* FastTypeChecks.proto */
1624 #if CYTHON_COMPILING_IN_CPYTHON
1625 #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
1626 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
1627 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
1628 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
1629 #else
1630 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
1631 #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
1632 #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
1633 #endif
1634 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
1635 
1636 /* CheckBinaryVersion.proto */
1637 static int __Pyx_check_binary_version(void);
1638 
1639 /* InitStrings.proto */
1640 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
1641 
1642 
1643 /* Module declarations from 'cpython.buffer' */
1644 
1645 /* Module declarations from 'libc.string' */
1646 
1647 /* Module declarations from 'libc.stdio' */
1648 
1649 /* Module declarations from '__builtin__' */
1650 
1651 /* Module declarations from 'cpython.type' */
1652 static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;
1653 
1654 /* Module declarations from 'cpython' */
1655 
1656 /* Module declarations from 'cpython.object' */
1657 
1658 /* Module declarations from 'cpython.ref' */
1659 
1660 /* Module declarations from 'cpython.mem' */
1661 
1662 /* Module declarations from 'numpy' */
1663 
1664 /* Module declarations from 'numpy' */
1665 static PyTypeObject *__pyx_ptype_5numpy_dtype = 0;
1666 static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0;
1667 static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0;
1668 static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0;
1669 static PyTypeObject *__pyx_ptype_5numpy_generic = 0;
1670 static PyTypeObject *__pyx_ptype_5numpy_number = 0;
1671 static PyTypeObject *__pyx_ptype_5numpy_integer = 0;
1672 static PyTypeObject *__pyx_ptype_5numpy_signedinteger = 0;
1673 static PyTypeObject *__pyx_ptype_5numpy_unsignedinteger = 0;
1674 static PyTypeObject *__pyx_ptype_5numpy_inexact = 0;
1675 static PyTypeObject *__pyx_ptype_5numpy_floating = 0;
1676 static PyTypeObject *__pyx_ptype_5numpy_complexfloating = 0;
1677 static PyTypeObject *__pyx_ptype_5numpy_flexible = 0;
1678 static PyTypeObject *__pyx_ptype_5numpy_character = 0;
1679 static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0;
1680 
1681 /* Module declarations from 'cfemIntegrals' */
1682 #define __Pyx_MODULE_NAME "cfemIntegrals"
1683 extern int __pyx_module_is_main_cfemIntegrals;
1684 int __pyx_module_is_main_cfemIntegrals = 0;
1685 
1686 /* Implementation of 'cfemIntegrals' */
1687 static PyObject *__pyx_builtin_range;
1688 static PyObject *__pyx_builtin_ImportError;
1689 static const char __pyx_k_F[] = "F";
1690 static const char __pyx_k_H[] = "H";
1691 static const char __pyx_k_V[] = "V";
1692 static const char __pyx_k_a[] = "a";
1693 static const char __pyx_k_b[] = "b";
1694 static const char __pyx_k_f[] = "f";
1695 static const char __pyx_k_i[] = "i";
1696 static const char __pyx_k_m[] = "m";
1697 static const char __pyx_k_n[] = "n";
1698 static const char __pyx_k_p[] = "p";
1699 static const char __pyx_k_r[] = "r";
1700 static const char __pyx_k_s[] = "s";
1701 static const char __pyx_k_t[] = "t";
1702 static const char __pyx_k_u[] = "u";
1703 static const char __pyx_k_v[] = "v";
1704 static const char __pyx_k_w[] = "w";
1705 static const char __pyx_k_x[] = "x";
1706 static const char __pyx_k_DV[] = "DV";
1707 static const char __pyx_k_dH[] = "dH";
1708 static const char __pyx_k_dS[] = "dS";
1709 static const char __pyx_k_dV[] = "dV";
1710 static const char __pyx_k_dX[] = "dX";
1711 static const char __pyx_k_da[] = "da";
1712 static const char __pyx_k_db[] = "db";
1713 static const char __pyx_k_df[] = "df";
1714 static const char __pyx_k_dm[] = "dm";
1715 static const char __pyx_k_dr[] = "dr";
1716 static const char __pyx_k_mt[] = "mt";
1717 static const char __pyx_k_nd[] = "nd";
1718 static const char __pyx_k_ng[] = "ng";
1719 static const char __pyx_k_np[] = "np";
1720 static const char __pyx_k_pe[] = "pe";
1721 static const char __pyx_k_qV[] = "qV";
1722 static const char __pyx_k_qa[] = "qa";
1723 static const char __pyx_k_qv[] = "qv";
1724 static const char __pyx_k_s1[] = "s1";
1725 static const char __pyx_k_s2[] = "s2";
1726 static const char __pyx_k_ub[] = "ub";
1727 static const char __pyx_k_xg[] = "xg";
1728 static const char __pyx_k_xt[] = "xt";
1729 static const char __pyx_k_cfl[] = "cfl";
1730 static const char __pyx_k_dSR[] = "dSR";
1731 static const char __pyx_k_dVR[] = "dVR";
1732 static const char __pyx_k_df1[] = "df1";
1733 static const char __pyx_k_df2[] = "df2";
1734 static const char __pyx_k_dmt[] = "dmt";
1735 static const char __pyx_k_dof[] = "dof";
1736 static const char __pyx_k_end[] = "end";
1737 static const char __pyx_k_jac[] = "jac";
1738 static const char __pyx_k_l2g[] = "l2g";
1739 static const char __pyx_k_phi[] = "phi";
1740 static const char __pyx_k_psi[] = "psi";
1741 static const char __pyx_k_qDV[] = "qDV";
1742 static const char __pyx_k_val[] = "val";
1743 static const char __pyx_k_dS_u[] = "dS_u";
1744 static const char __pyx_k_dofs[] = "dofs";
1745 static const char __pyx_k_dphi[] = "dphi";
1746 static const char __pyx_k_file[] = "file";
1747 static const char __pyx_k_flag[] = "flag";
1748 static const char __pyx_k_flux[] = "flux";
1749 static const char __pyx_k_main[] = "__main__";
1750 static const char __pyx_k_name[] = "__name__";
1751 static const char __pyx_k_test[] = "__test__";
1752 static const char __pyx_k_w_dS[] = "w_dS";
1753 static const char __pyx_k_w_dV[] = "w_dV";
1754 static const char __pyx_k_A_inv[] = "A_inv";
1755 static const char __pyx_k_DV_eb[] = "DV_eb";
1756 static const char __pyx_k_db_eb[] = "db_eb";
1757 static const char __pyx_k_error[] = "error";
1758 static const char __pyx_k_mJump[] = "mJump";
1759 static const char __pyx_k_numpy[] = "numpy";
1760 static const char __pyx_k_print[] = "print";
1761 static const char __pyx_k_qw_dV[] = "qw_dV";
1762 static const char __pyx_k_range[] = "range";
1763 static const char __pyx_k_sigma[] = "sigma";
1764 static const char __pyx_k_starJ[] = "starJ";
1765 static const char __pyx_k_starR[] = "starR";
1766 static const char __pyx_k_starU[] = "starU";
1767 static const char __pyx_k_vJump[] = "vJump";
1768 static const char __pyx_k_v_out[] = "v_out";
1769 static const char __pyx_k_vn_in[] = "vn_in";
1770 static const char __pyx_k_Hess_v[] = "Hess_v";
1771 static const char __pyx_k_Hess_w[] = "Hess_w";
1772 static const char __pyx_k_colind[] = "colind";
1773 static const char __pyx_k_derror[] = "derror";
1774 static const char __pyx_k_free_u[] = "free_u";
1775 static const char __pyx_k_grad_u[] = "grad_u";
1776 static const char __pyx_k_grad_v[] = "grad_v";
1777 static const char __pyx_k_grad_w[] = "grad_w";
1778 static const char __pyx_k_import[] = "__import__";
1779 static const char __pyx_k_nSpace[] = "nSpace";
1780 static const char __pyx_k_normal[] = "normal";
1781 static const char __pyx_k_offset[] = "offset";
1782 static const char __pyx_k_output[] = "output";
1783 static const char __pyx_k_phi_bc[] = "phi_bc";
1784 static const char __pyx_k_qDV_eb[] = "qDV_eb";
1785 static const char __pyx_k_rowptr[] = "rowptr";
1786 static const char __pyx_k_stride[] = "stride";
1787 static const char __pyx_k_vArray[] = "vArray";
1788 static const char __pyx_k_vXw_dV[] = "vXw_dV";
1789 static const char __pyx_k_xArray[] = "xArray";
1790 static const char __pyx_k_dim_dof[] = "dim_dof";
1791 static const char __pyx_k_ebq_val[] = "ebq_val";
1792 static const char __pyx_k_epsFact[] = "epsFact";
1793 static const char __pyx_k_numDiff[] = "numDiff";
1794 static const char __pyx_k_sResult[] = "sResult";
1795 static const char __pyx_k_tResult[] = "tResult";
1796 static const char __pyx_k_vResult[] = "vResult";
1797 static const char __pyx_k_weights[] = "weights";
1798 static const char __pyx_k_xiArray[] = "xiArray";
1799 static const char __pyx_k_xtArray[] = "xtArray";
1800 static const char __pyx_k_Hess_phi[] = "Hess_phi";
1801 static const char __pyx_k_ebqe_val[] = "ebqe_val";
1802 static const char __pyx_k_grad_phi[] = "grad_phi";
1803 static const char __pyx_k_grad_psi[] = "grad_psi";
1804 static const char __pyx_k_jacIndex[] = "jacIndex";
1805 static const char __pyx_k_jacobian[] = "jacobian";
1806 static const char __pyx_k_mAverage[] = "mAverage";
1807 static const char __pyx_k_nDOF2set[] = "nDOF2set";
1808 static const char __pyx_k_offset_r[] = "offset_r";
1809 static const char __pyx_k_offset_u[] = "offset_u";
1810 static const char __pyx_k_residual[] = "residual";
1811 static const char __pyx_k_stride_r[] = "stride_r";
1812 static const char __pyx_k_stride_u[] = "stride_u";
1813 static const char __pyx_k_vAverage[] = "vAverage";
1814 static const char __pyx_k_v_X_w_dS[] = "v_X_w_dS";
1815 static const char __pyx_k_v_X_w_dV[] = "v_X_w_dV";
1816 static const char __pyx_k_velocity[] = "velocity";
1817 static const char __pyx_k_Hess_w_dV[] = "Hess_w_dV";
1818 static const char __pyx_k_Hessian_u[] = "Hessian_u";
1819 static const char __pyx_k_Hessian_v[] = "Hessian_v";
1820 static const char __pyx_k_abs_det_J[] = "abs_det_J";
1821 static const char __pyx_k_dsigma_xx[] = "dsigma_xx";
1822 static const char __pyx_k_dsigma_xy[] = "dsigma_xy";
1823 static const char __pyx_k_dsigma_xz[] = "dsigma_xz";
1824 static const char __pyx_k_dsigma_yx[] = "dsigma_yx";
1825 static const char __pyx_k_dsigma_yy[] = "dsigma_yy";
1826 static const char __pyx_k_dsigma_yz[] = "dsigma_yz";
1827 static const char __pyx_k_dsigma_zx[] = "dsigma_zx";
1828 static const char __pyx_k_dsigma_zy[] = "dsigma_zy";
1829 static const char __pyx_k_dsigma_zz[] = "dsigma_zz";
1830 static const char __pyx_k_grad_w_dV[] = "grad_w_dV";
1831 static const char __pyx_k_jac_array[] = "jac_array";
1832 static const char __pyx_k_nNonzeros[] = "nNonzeros";
1833 static const char __pyx_k_nodeArray[] = "nodeArray";
1834 static const char __pyx_k_phi_trace[] = "phi_trace";
1835 static const char __pyx_k_rho_split[] = "rho_split";
1836 static const char __pyx_k_tolerance[] = "tolerance";
1837 static const char __pyx_k_xArrayNew[] = "xArrayNew";
1838 static const char __pyx_k_Lstar_w_dV[] = "Lstar_w_dV";
1839 static const char __pyx_k_freeDOFids[] = "freeDOFids";
1840 static const char __pyx_k_sqrt_det_g[] = "sqrt_det_g";
1841 static const char __pyx_k_updateCoef[] = "updateCoef";
1842 static const char __pyx_k_Hessian_psi[] = "Hessian_psi";
1843 static const char __pyx_k_ImportError[] = "ImportError";
1844 static const char __pyx_k_abs_det_jac[] = "abs_det_jac";
1845 static const char __pyx_k_estimate_mt[] = "estimate_mt";
1846 static const char __pyx_k_freeLocal_r[] = "freeLocal_r";
1847 static const char __pyx_k_freeLocal_u[] = "freeLocal_u";
1848 static const char __pyx_k_grad_vArray[] = "grad_vArray";
1849 static const char __pyx_k_jacobian_eb[] = "jacobian_eb";
1850 static const char __pyx_k_nComponents[] = "nComponents";
1851 static const char __pyx_k_nValueArray[] = "nValueArray";
1852 static const char __pyx_k_colind_dummy[] = "colind_dummy";
1853 static const char __pyx_k_elementNodes[] = "elementNodes";
1854 static const char __pyx_k_freeGlobal_r[] = "freeGlobal_r";
1855 static const char __pyx_k_freeGlobal_u[] = "freeGlobal_u";
1856 static const char __pyx_k_globalDOFids[] = "globalDOFids";
1857 static const char __pyx_k_nDOF_element[] = "nDOF_element";
1858 static const char __pyx_k_nodalAverage[] = "nodalAverage";
1859 static const char __pyx_k_permutations[] = "permutations";
1860 static const char __pyx_k_rowptr_dummy[] = "rowptr_dummy";
1861 static const char __pyx_k_starJacobian[] = "starJacobian";
1862 static const char __pyx_k_cfemIntegrals[] = "cfemIntegrals";
1863 static const char __pyx_k_firstBadIndex[] = "firstBadIndex";
1864 static const char __pyx_k_grad_v_X_w_dS[] = "grad_v_X_w_dS";
1865 static const char __pyx_k_grad_v_X_w_dV[] = "grad_v_X_w_dV";
1866 static const char __pyx_k_internalNodes[] = "internalNodes";
1867 static const char __pyx_k_isDOFBoundary[] = "isDOFBoundary";
1868 static const char __pyx_k_jacobianArray[] = "jacobianArray";
1869 static const char __pyx_k_nNodes_global[] = "nNodes_global";
1870 static const char __pyx_k_nSpace_global[] = "nSpace_global";
1871 static const char __pyx_k_vConservative[] = "vConservative";
1872 static const char __pyx_k_v_X_grad_w_dV[] = "v_X_grad_w_dV";
1873 static const char __pyx_k_weak_residual[] = "weak_residual";
1874 static const char __pyx_k_Hessian_vArray[] = "Hessian_vArray";
1875 static const char __pyx_k_ebq_global_val[] = "ebq_global_val";
1876 static const char __pyx_k_globalJacobian[] = "globalJacobian";
1877 static const char __pyx_k_globalResidual[] = "globalResidual";
1878 static const char __pyx_k_mom_flux_vec_u[] = "mom_flux_vec_u";
1879 static const char __pyx_k_mom_flux_vec_v[] = "mom_flux_vec_v";
1880 static const char __pyx_k_mom_flux_vec_w[] = "mom_flux_vec_w";
1881 static const char __pyx_k_nElements_node[] = "nElements_node";
1882 static const char __pyx_k_nNodes_element[] = "nNodes_element";
1883 static const char __pyx_k_boundaryNormals[] = "boundaryNormals";
1884 static const char __pyx_k_calculateCFLADR[] = "calculateCFLADR";
1885 static const char __pyx_k_dphi_trace_left[] = "dphi_trace_left";
1886 static const char __pyx_k_elementDiameter[] = "elementDiameter";
1887 static const char __pyx_k_elementJacobian[] = "elementJacobian";
1888 static const char __pyx_k_elementResidual[] = "elementResidual";
1889 static const char __pyx_k_inverseJacobian[] = "inverseJacobian";
1890 static const char __pyx_k_nNodes_internal[] = "nNodes_internal";
1891 static const char __pyx_k_nodeStarOffsets[] = "nodeStarOffsets";
1892 static const char __pyx_k_strong_residual[] = "strong_residual";
1893 static const char __pyx_k_unitNormalArray[] = "unitNormalArray";
1894 static const char __pyx_k_updateMass_weak[] = "updateMass_weak";
1895 static const char __pyx_k_weak_residual_x[] = "weak_residual_x";
1896 static const char __pyx_k_weak_residual_y[] = "weak_residual_y";
1897 static const char __pyx_k_weak_residual_z[] = "weak_residual_z";
1898 static const char __pyx_k_csrRowIndeces_ru[] = "csrRowIndeces_ru";
1899 static const char __pyx_k_dphi_trace_right[] = "dphi_trace_right";
1900 static const char __pyx_k_dstrong_residual[] = "dstrong_residual";
1901 static const char __pyx_k_elementNeighbors[] = "elementNeighbors";
1902 static const char __pyx_k_nElements_global[] = "nElements_global";
1903 static const char __pyx_k_nFreeVDOF_global[] = "nFreeVDOF_global";
1904 static const char __pyx_k_nodeStarElements[] = "nodeStarElements";
1905 static const char __pyx_k_referenceWeights[] = "referenceWeights";
1906 static const char __pyx_k_updateFluxValues[] = "updateFluxValues";
1907 static const char __pyx_k_zeroJacobian_CSR[] = "zeroJacobian_CSR";
1908 static const char __pyx_k_boundaryJacobians[] = "boundaryJacobians";
1909 static const char __pyx_k_elementNodesArray[] = "elementNodesArray";
1910 static const char __pyx_k_metricTensorArray[] = "metricTensorArray";
1911 static const char __pyx_k_nDOF_test_element[] = "nDOF_test_element";
1912 static const char __pyx_k_nodeElementsArray[] = "nodeElementsArray";
1913 static const char __pyx_k_updateMass_strong[] = "updateMass_strong";
1914 static const char __pyx_k_updateStress_weak[] = "updateStress_weak";
1915 static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
1916 static const char __pyx_k_elementJacobian_eb[] = "elementJacobian_eb";
1917 static const char __pyx_k_estimate_mt_lowmem[] = "estimate_mt_lowmem";
1918 static const char __pyx_k_grad_u_X_grad_w_dV[] = "grad_u_X_grad_w_dV";
1919 static const char __pyx_k_grad_v_X_grad_w_dV[] = "grad_v_X_grad_w_dV";
1920 static const char __pyx_k_nDOF_trial_element[] = "nDOF_trial_element";
1921 static const char __pyx_k_nFreeDOF_element_r[] = "nFreeDOF_element_r";
1922 static const char __pyx_k_nFreeDOF_element_u[] = "nFreeDOF_element_u";
1923 static const char __pyx_k_nodeElementOffsets[] = "nodeElementOffsets";
1924 static const char __pyx_k_updateMass_adjoint[] = "updateMass_adjoint";
1925 static const char __pyx_k_updateSubgridError[] = "updateSubgridError";
1926 static const char __pyx_k_csrColumnOffsets_ru[] = "csrColumnOffsets_ru";
1927 static const char __pyx_k_interpolationValues[] = "interpolationValues";
1928 static const char __pyx_k_updateReaction_weak[] = "updateReaction_weak";
1929 static const char __pyx_k_conservationResidual[] = "conservationResidual";
1930 static const char __pyx_k_getCSRrepresentation[] = "getCSRrepresentation";
1931 static const char __pyx_k_globalJacobian_array[] = "globalJacobian_array";
1932 static const char __pyx_k_grad_phi_X_grad_w_dV[] = "grad_phi_X_grad_w_dV";
1933 static const char __pyx_k_inverseJacobianArray[] = "inverseJacobianArray";
1934 static const char __pyx_k_jacobianInverseArray[] = "jacobianInverseArray";
1935 static const char __pyx_k_scalarDomainIntegral[] = "scalarDomainIntegral";
1936 static const char __pyx_k_updateAdvection_weak[] = "updateAdvection_weak";
1937 static const char __pyx_k_updateDiffusion_weak[] = "updateDiffusion_weak";
1938 static const char __pyx_k_calculateFlowVelocity[] = "calculateFlowVelocity";
1939 static const char __pyx_k_fluxElementBoundaries[] = "fluxElementBoundaries";
1940 static const char __pyx_k_getPermutationsGlobal[] = "getPermutationsGlobal";
1941 static const char __pyx_k_updateAddJacobian_CSR[] = "updateAddJacobian_CSR";
1942 static const char __pyx_k_updateReaction_strong[] = "updateReaction_strong";
1943 static const char __pyx_k_update_f_movingDomain[] = "update_f_movingDomain";
1944 static const char __pyx_k_vConservative_element[] = "vConservative_element";
1945 static const char __pyx_k_calculateCFLADR2speeds[] = "calculateCFLADR2speeds";
1946 static const char __pyx_k_calculateWeightedShape[] = "calculateWeightedShape";
1947 static const char __pyx_k_csrColumnOffsets_eb_ru[] = "csrColumnOffsets_eb_ru";
1948 static const char __pyx_k_elementSpatialResidual[] = "elementSpatialResidual";
1949 static const char __pyx_k_functional_map_element[] = "functional_map_element";
1950 static const char __pyx_k_jacobian_weak_residual[] = "jacobian_weak_residual";
1951 static const char __pyx_k_updateAdvection_strong[] = "updateAdvection_strong";
1952 static const char __pyx_k_updateDiffusion_strong[] = "updateDiffusion_strong";
1953 static const char __pyx_k_updateHamiltonian_weak[] = "updateHamiltonian_weak";
1954 static const char __pyx_k_updateReaction_adjoint[] = "updateReaction_adjoint";
1955 static const char __pyx_k_elementBoundaryElements[] = "elementBoundaryElements";
1956 static const char __pyx_k_nodeStarJacobianOffsets[] = "nodeStarJacobianOffsets";
1957 static const char __pyx_k_not_recognized_quitting[] = " not recognized quitting\n";
1958 static const char __pyx_k_updateAdvection_adjoint[] = "updateAdvection_adjoint";
1959 static const char __pyx_k_updateDiffusion2_strong[] = "updateDiffusion2_strong";
1960 static const char __pyx_k_updateDiffusion_adjoint[] = "updateDiffusion_adjoint";
1961 static const char __pyx_k_updateDiffusion_weak_sd[] = "updateDiffusion_weak_sd";
1962 static const char __pyx_k_updateMassJacobian_weak[] = "updateMassJacobian_weak";
1963 static const char __pyx_k_velocityBoundary_global[] = "velocityBoundary_global";
1964 static const char __pyx_k_jacobianDeterminantArray[] = "jacobianDeterminantArray";
1965 static const char __pyx_k_nElementBoundaries_owned[] = "nElementBoundaries_owned";
1966 static const char __pyx_k_nodeStarElementNeighbors[] = "nodeStarElementNeighbors";
1967 static const char __pyx_k_parametricMaps_getValues[] = "parametricMaps_getValues";
1968 static const char __pyx_k_updateDiffusion2_adjoint[] = "updateDiffusion2_adjoint";
1969 static const char __pyx_k_updateHamiltonian_strong[] = "updateHamiltonian_strong";
1970 static const char __pyx_k_updateNumericalDiffusion[] = "updateNumericalDiffusion";
1971 static const char __pyx_k_velocityBoundary_element[] = "velocityBoundary_element";
1972 static const char __pyx_k_exteriorElementBoundaries[] = "exteriorElementBoundaries";
1973 static const char __pyx_k_interiorElementBoundaries[] = "interiorElementBoundaries";
1974 static const char __pyx_k_jacobian_weak_residual_eb[] = "jacobian_weak_residual_eb";
1975 static const char __pyx_k_jacobian_weak_residual_xx[] = "jacobian_weak_residual_xx";
1976 static const char __pyx_k_jacobian_weak_residual_xy[] = "jacobian_weak_residual_xy";
1977 static const char __pyx_k_jacobian_weak_residual_xz[] = "jacobian_weak_residual_xz";
1978 static const char __pyx_k_jacobian_weak_residual_yx[] = "jacobian_weak_residual_yx";
1979 static const char __pyx_k_jacobian_weak_residual_yy[] = "jacobian_weak_residual_yy";
1980 static const char __pyx_k_jacobian_weak_residual_yz[] = "jacobian_weak_residual_yz";
1981 static const char __pyx_k_jacobian_weak_residual_zx[] = "jacobian_weak_residual_zx";
1982 static const char __pyx_k_jacobian_weak_residual_zy[] = "jacobian_weak_residual_zy";
1983 static const char __pyx_k_jacobian_weak_residual_zz[] = "jacobian_weak_residual_zz";
1984 static const char __pyx_k_nElementBoundaries_global[] = "nElementBoundaries_global";
1985 static const char __pyx_k_nQuadraturePoints_element[] = "nQuadraturePoints_element";
1986 static const char __pyx_k_nValuesPerQuadraturePoint[] = "nValuesPerQuadraturePoint";
1987 static const char __pyx_k_proteus_cfemIntegrals_pyx[] = "proteus/cfemIntegrals.pyx";
1988 static const char __pyx_k_updateDiffusion_strong_sd[] = "updateDiffusion_strong_sd";
1989 static const char __pyx_k_updateHamiltonian_adjoint[] = "updateHamiltonian_adjoint";
1990 static const char __pyx_k_updateMassJacobian_strong[] = "updateMassJacobian_strong";
1991 static const char __pyx_k_updateStressJacobian_weak[] = "updateStressJacobian_weak";
1992 static const char __pyx_k_computeC0P1InterpolantDGP0[] = "computeC0P1InterpolantDGP0";
1993 static const char __pyx_k_computeC0P1InterpolantNCP1[] = "computeC0P1InterpolantNCP1";
1994 static const char __pyx_k_error_copyFromFreeToGlobal[] = "error copyFromFreeToGlobal = ";
1995 static const char __pyx_k_fluxDomainBoundaryIntegral[] = "fluxDomainBoundaryIntegral";
1996 static const char __pyx_k_nElementBoundaries_element[] = "nElementBoundaries_element";
1997 static const char __pyx_k_nExteriorElementBoundaries[] = "nExteriorElementBoundaries";
1998 static const char __pyx_k_updateDiffusion2_strong_sd[] = "updateDiffusion2_strong_sd";
1999 static const char __pyx_k_updateDiffusion_adjoint_sd[] = "updateDiffusion_adjoint_sd";
2000 static const char __pyx_k_updateSubgridErrorJacobian[] = "updateSubgridErrorJacobian";
2001 static const char __pyx_k_calculateIntegrationWeights[] = "calculateIntegrationWeights";
2002 static const char __pyx_k_calculateWeightedShapeTrace[] = "calculateWeightedShapeTrace";
2003 static const char __pyx_k_computeC0P1InterpolantDGP12[] = "computeC0P1InterpolantDGP12";
2004 static const char __pyx_k_copyLeftElementBoundaryInfo[] = "copyLeftElementBoundaryInfo";
2005 static const char __pyx_k_elementBoundaryFluxJacobian[] = "elementBoundaryFluxJacobian";
2006 static const char __pyx_k_updateDiffusion2_adjoint_sd[] = "updateDiffusion2_adjoint_sd";
2007 static const char __pyx_k_updateDiffusion_weak_lowmem[] = "updateDiffusion_weak_lowmem";
2008 static const char __pyx_k_updateReactionJacobian_weak[] = "updateReactionJacobian_weak";
2009 static const char __pyx_k_calculateConservationFluxPWL[] = "calculateConservationFluxPWL";
2010 static const char __pyx_k_calculateScalarScalarProduct[] = "calculateScalarScalarProduct";
2011 static const char __pyx_k_calculateTensorScalarProduct[] = "calculateTensorScalarProduct";
2012 static const char __pyx_k_calculateVectorScalarProduct[] = "calculateVectorScalarProduct";
2013 static const char __pyx_k_csrColumnOffsets_eb_eNebN_ru[] = "csrColumnOffsets_eb_eNebN_ru";
2014 static const char __pyx_k_elementBoundaryElementsArray[] = "elementBoundaryElementsArray";
2015 static const char __pyx_k_elementBoundaryMaterialTypes[] = "elementBoundaryMaterialTypes";
2016 static const char __pyx_k_updateAdvectionJacobian_weak[] = "updateAdvectionJacobian_weak";
2017 static const char __pyx_k_updateDiffusionJacobian_weak[] = "updateDiffusionJacobian_weak";
2018 static const char __pyx_k_calculateConservationResidual[] = "calculateConservationResidual";
2019 static const char __pyx_k_computeDiffusiveTimeStepLimit[] = "computeDiffusiveTimeStepLimit";
2020 static const char __pyx_k_parametricMaps_getValuesTrace[] = "parametricMaps_getValuesTrace";
2021 static const char __pyx_k_scalarHeavisideDomainIntegral[] = "scalarHeavisideDomainIntegral";
2022 static const char __pyx_k_updateReactionJacobian_strong[] = "updateReactionJacobian_strong";
2023 static const char __pyx_k_calculateShape_X_weightedShape[] = "calculateShape_X_weightedShape";
2024 static const char __pyx_k_calculateWeightedShapeHessians[] = "calculateWeightedShapeHessians";
2025 static const char __pyx_k_elementBoundaryFluxJacobian_eb[] = "elementBoundaryFluxJacobian_eb";
2026 static const char __pyx_k_exteriorElementBoundariesArray[] = "exteriorElementBoundariesArray";
2027 static const char __pyx_k_interiorElementBoundariesArray[] = "interiorElementBoundariesArray";
2028 static const char __pyx_k_parametricMaps_getPermutations[] = "parametricMaps_getPermutations";
2029 static const char __pyx_k_updateAdvectionJacobian_strong[] = "updateAdvectionJacobian_strong";
2030 static const char __pyx_k_updateDiffusionJacobian_strong[] = "updateDiffusionJacobian_strong";
2031 static const char __pyx_k_updateDiffusion_MixedForm_weak[] = "updateDiffusion_MixedForm_weak";
2032 static const char __pyx_k_updateHamiltonianJacobian_weak[] = "updateHamiltonianJacobian_weak";
2033 static const char __pyx_k_updateMassJacobian_weak_lowmem[] = "updateMassJacobian_weak_lowmem";
2034 static const char __pyx_k_updatePotential_MixedForm_weak[] = "updatePotential_MixedForm_weak";
2035 static const char __pyx_k_calculateConservationResidualDG[] = "calculateConservationResidualDG";
2036 static const char __pyx_k_calculateExteriorNumericalTrace[] = "calculateExteriorNumericalTrace_Potential";
2037 static const char __pyx_k_calculateInteriorNumericalTrace[] = "calculateInteriorNumericalTrace_Potential";
2038 static const char __pyx_k_calculateWeightedShapeGradients[] = "calculateWeightedShapeGradients";
2039 static const char __pyx_k_error_in_getJacobianValuesTrace[] = "error in getJacobianValuesTrace...jacobianInverse not sized properly";
2040 static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import";
2041 static const char __pyx_k_parametricMaps_getInverseValues[] = "parametricMaps_getInverseValues";
2042 static const char __pyx_k_updateDiffusionJacobian2_strong[] = "updateDiffusionJacobian2_strong";
2043 static const char __pyx_k_updateDiffusionJacobian_weak_sd[] = "updateDiffusionJacobian_weak_sd";
2044 static const char __pyx_k_updateNumericalDiffusion_lowmem[] = "updateNumericalDiffusion_lowmem";
2045 static const char __pyx_k_calculateConservationJacobianPWL[] = "calculateConservationJacobianPWL";
2046 static const char __pyx_k_calculateConservationResidualGlo[] = "calculateConservationResidualGlobalBoundaries";
2047 static const char __pyx_k_calculateConservationResidualPWL[] = "calculateConservationResidualPWL";
2048 static const char __pyx_k_calculateDimensionlessNumbersADR[] = "calculateDimensionlessNumbersADR";
2049 static const char __pyx_k_calculateElementBoundaryIntegrat[] = "calculateElementBoundaryIntegrationWeights";
2050 static const char __pyx_k_calculateExteriorElementBoundary[] = "calculateExteriorElementBoundaryStress3D";
2051 static const char __pyx_k_calculateFiniteElementFunctionGr[] = "calculateFiniteElementFunctionGradientValues";
2052 static const char __pyx_k_calculateFiniteElementFunctionHe[] = "calculateFiniteElementFunctionHessianValues";
2053 static const char __pyx_k_calculateFiniteElementFunctionVa[] = "calculateFiniteElementFunctionValues";
2054 static const char __pyx_k_calculateGlobalExteriorElementBo[] = "calculateGlobalExteriorElementBoundaryIntegrationWeights";
2055 static const char __pyx_k_calculateGradShape_X_weightedGra[] = "calculateGradShape_X_weightedGradShape";
2056 static const char __pyx_k_calculateGradShape_X_weightedSha[] = "calculateGradShape_X_weightedShape";
2057 static const char __pyx_k_calculateInteriorElementBoundary[] = "calculateInteriorElementBoundaryVelocities";
2058 static const char __pyx_k_calculateShape_X_weightedGradSha[] = "calculateShape_X_weightedGradShape";
2059 static const char __pyx_k_calculateShape_X_weightedShapeGl[] = "calculateShape_X_weightedShapeGlobalExteriorTrace";
2060 static const char __pyx_k_calculateShape_X_weightedShapeTr[] = "calculateShape_X_weightedShapeTrace";
2061 static const char __pyx_k_calculateVelocityProjectionMatri[] = "calculateVelocityProjectionMatrixLDG";
2062 static const char __pyx_k_calculateVelocityQuadrature_Mixe[] = "calculateVelocityQuadrature_MixedForm";
2063 static const char __pyx_k_calculateWeightedShapeGlobalExte[] = "calculateWeightedShapeGlobalExteriorTrace";
2064 static const char __pyx_k_checkElementBoundaryAndExteriorE[] = "checkElementBoundaryAndExteriorElementBoundaryArraysSame";
2065 static const char __pyx_k_checkGlobalElementBoundaryAndExt[] = "checkGlobalElementBoundaryAndExteriorElementBoundaryArraysSame";
2066 static const char __pyx_k_copyBetweenFreeUnknownsAndGlobal[] = "copyBetweenFreeUnknownsAndGlobalUnknowns";
2067 static const char __pyx_k_copyExteriorElementBoundaryValue[] = "copyExteriorElementBoundaryValuesFromElementBoundaryValues";
2068 static const char __pyx_k_copyGlobalElementBoundaryVelocit[] = "copyGlobalElementBoundaryVelocityToElementBoundary";
2069 static const char __pyx_k_elementBoundaryFluxJacobian_2sid[] = "elementBoundaryFluxJacobian_2sided";
2070 static const char __pyx_k_elementBoundaryLocalElementBound[] = "elementBoundaryLocalElementBoundaries";
2071 static const char __pyx_k_error_in_getJacobianValues_jacob[] = "error in getJacobianValues...jacobian not sized properly";
2072 static const char __pyx_k_fluxDomainBoundaryIntegralFromVe[] = "fluxDomainBoundaryIntegralFromVector";
2073 static const char __pyx_k_loadBoundaryFluxIntoGlobalElemen[] = "loadBoundaryFluxIntoGlobalElementBoundaryVelocity";
2074 static const char __pyx_k_metricTensorDeterminantSqrtArray[] = "metricTensorDeterminantSqrtArray";
2075 static const char __pyx_k_nElementBoundaryQuadraturePoints[] = "nElementBoundaryQuadraturePoints_elementBoundary";
2076 static const char __pyx_k_nExteriorElementBoundaries_globa[] = "nExteriorElementBoundaries_global";
2077 static const char __pyx_k_nInteriorElementBoundaries_globa[] = "nInteriorElementBoundaries_global";
2078 static const char __pyx_k_nQuadraturePoints_elementBoundar[] = "nQuadraturePoints_elementBoundary";
2079 static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import";
2080 static const char __pyx_k_parametricFiniteElementSpace_get[] = "parametricFiniteElementSpace_getHessianValues";
2081 static const char __pyx_k_parametricMaps_getInverseValuesG[] = "parametricMaps_getInverseValuesGlobalExteriorTrace";
2082 static const char __pyx_k_parametricMaps_getInverseValuesT[] = "parametricMaps_getInverseValuesTrace";
2083 static const char __pyx_k_parametricMaps_getJacobianValues[] = "parametricMaps_getJacobianValues";
2084 static const char __pyx_k_parametricMaps_getPermutationsGl[] = "parametricMaps_getPermutationsGlobalExterior";
2085 static const char __pyx_k_parametricMaps_getValuesGlobalEx[] = "parametricMaps_getValuesGlobalExteriorTrace";
2086 static const char __pyx_k_projectFromNodalInterpolationCon[] = "projectFromNodalInterpolationConditions";
2087 static const char __pyx_k_scalarSmoothedHeavisideDomainInt[] = "scalarSmoothedHeavisideDomainIntegral";
2088 static const char __pyx_k_setExteriorGlobalElementBoundary[] = "setExteriorGlobalElementBoundaryVelocityValues";
2089 static const char __pyx_k_updateAdvectionJacobian_weak_low[] = "updateAdvectionJacobian_weak_lowmem";
2090 static const char __pyx_k_updateDiffusionJacobian_MixedFor[] = "updateDiffusionJacobian_MixedForm_weak";
2091 static const char __pyx_k_updateDiffusionJacobian_strong_s[] = "updateDiffusionJacobian_strong_sd";
2092 static const char __pyx_k_updateDiffusionJacobian_weak_low[] = "updateDiffusionJacobian_weak_lowmem";
2093 static const char __pyx_k_updateDiffusion_MixedForm_weak_s[] = "updateDiffusion_MixedForm_weak_sd";
2094 static const char __pyx_k_updateExteriorElementBoundaryAdv[] = "updateExteriorElementBoundaryAdvectiveVelocity";
2095 static const char __pyx_k_updateExteriorElementBoundaryDif[] = "updateExteriorElementBoundaryDiffusiveVelocity";
2096 static const char __pyx_k_updateExteriorElementBoundaryFlu[] = "updateExteriorElementBoundaryFlux";
2097 static const char __pyx_k_updateExteriorElementBoundarySho[] = "updateExteriorElementBoundaryShockCapturingVelocity";
2098 static const char __pyx_k_updateExteriorElementBoundary_Mi[] = "updateExteriorElementBoundary_MixedForm_weak";
2099 static const char __pyx_k_updateGlobalJacobianFromElementJ[] = "updateGlobalJacobianFromElementJacobian_dense";
2100 static const char __pyx_k_updateGlobalJacobianFromExterior[] = "updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_dense";
2101 static const char __pyx_k_updateGlobalJacobianFromInterior[] = "updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_CSR";
2102 static const char __pyx_k_updateGlobalResidualFromElementR[] = "updateGlobalResidualFromElementResidual";
2103 static const char __pyx_k_updateHamiltonianJacobian_strong[] = "updateHamiltonianJacobian_strong";
2104 static const char __pyx_k_updateHamiltonianJacobian_weak_l[] = "updateHamiltonianJacobian_weak_lowmem";
2105 static const char __pyx_k_updateInteriorElementBoundaryAdv[] = "updateInteriorElementBoundaryAdvectiveVelocity";
2106 static const char __pyx_k_updateInteriorElementBoundaryDif[] = "updateInteriorElementBoundaryDiffusiveVelocity";
2107 static const char __pyx_k_updateInteriorElementBoundaryFlu[] = "updateInteriorElementBoundaryFlux";
2108 static const char __pyx_k_updateInteriorElementBoundarySho[] = "updateInteriorElementBoundaryShockCapturingVelocity";
2109 static const char __pyx_k_updateInteriorElementBoundary_Mi[] = "updateInteriorElementBoundary_MixedForm_weak";
2110 static const char __pyx_k_updateInteriorTwoSidedElementBou[] = "updateInteriorTwoSidedElementBoundaryFlux";
2111 static const char __pyx_k_updateNumericalDiffusionJacobian[] = "updateNumericalDiffusionJacobian";
2112 static const char __pyx_k_updatePotential_MixedForm_weakJa[] = "updatePotential_MixedForm_weakJacobian";
2113 static const char __pyx_k_updateReactionJacobian_weak_lowm[] = "updateReactionJacobian_weak_lowmem";
2114 static const char __pyx_k_update_f_movingDomain_constantMa[] = "update_f_movingDomain_constantMass";
2115 static const char __pyx_k_updateDiffusionJacobian2_strong_2[] = "updateDiffusionJacobian2_strong_sd";
2116 static const char __pyx_k_calculateDimensionlessNumbersADR_2[] = "calculateDimensionlessNumbersADR_sd";
2117 static const char __pyx_k_calculateExteriorElementBoundary_2[] = "calculateExteriorElementBoundaryStress2D";
2118 static const char __pyx_k_calculateExteriorElementBoundary_3[] = "calculateExteriorElementBoundaryVelocities";
2119 static const char __pyx_k_calculateExteriorElementBoundary_4[] = "calculateExteriorElementBoundaryAverageVelocity";
2120 static const char __pyx_k_calculateFiniteElementFunctionGr_2[] = "calculateFiniteElementFunctionGradientTensorValues";
2121 static const char __pyx_k_calculateFiniteElementFunctionGr_3[] = "calculateFiniteElementFunctionGradientValuesTrace";
2122 static const char __pyx_k_calculateFiniteElementFunctionGr_4[] = "calculateFiniteElementFunctionGradientValuesGlobalExteriorTrace";
2123 static const char __pyx_k_calculateFiniteElementFunctionVa_2[] = "calculateFiniteElementFunctionValuesTrace";
2124 static const char __pyx_k_calculateFiniteElementFunctionVa_3[] = "calculateFiniteElementFunctionValuesGlobalExteriorTrace";
2125 static const char __pyx_k_calculateGradShape_X_weightedSha_2[] = "calculateGradShape_X_weightedShapeTrace";
2126 static const char __pyx_k_calculateGradShape_X_weightedSha_3[] = "calculateGradShape_X_weightedShapeGlobalExteriorTrace";
2127 static const char __pyx_k_calculateInteriorElementBoundary_2[] = "calculateInteriorElementBoundaryAverageVelocity";
2128 static const char __pyx_k_calculateVelocityQuadrature_Mixe_2[] = "calculateVelocityQuadrature_MixedForm_Jacobian";
2129 static const char __pyx_k_calculateVelocityQuadrature_Mixe_3[] = "calculateVelocityQuadrature_MixedForm2_sd";
2130 static const char __pyx_k_calculateVelocityQuadrature_Mixe_4[] = "calculateVelocityQuadrature_MixedForm2_Jacobian_sd";
2131 static const char __pyx_k_copyExteriorElementBoundaryValue_2[] = "copyExteriorElementBoundaryValuesToElementBoundaryValues";
2132 static const char __pyx_k_copyExteriorElementBoundaryValue_3[] = "copyExteriorElementBoundaryValuesToGlobalElementBoundaryValues";
2133 static const char __pyx_k_copyExteriorElementBoundaryValue_4[] = "copyExteriorElementBoundaryValuesFromGlobalElementBoundaryValues";
2134 static const char __pyx_k_elementBoundaryLocalElementBound_2[] = "elementBoundaryLocalElementBoundariesArray";
2135 static const char __pyx_k_parametricFiniteElementSpace_get_2[] = "parametricFiniteElementSpace_getValues";
2136 static const char __pyx_k_parametricFiniteElementSpace_get_3[] = "parametricFiniteElementSpace_getValuesTrace";
2137 static const char __pyx_k_parametricFiniteElementSpace_get_4[] = "parametricFiniteElementSpace_getGradientValues";
2138 static const char __pyx_k_parametricFiniteElementSpace_get_5[] = "parametricFiniteElementSpace_getGradientValuesTrace";
2139 static const char __pyx_k_parametricFiniteElementSpace_get_6[] = "parametricFiniteElementSpace_getValuesGlobalExteriorTrace";
2140 static const char __pyx_k_parametricFiniteElementSpace_get_7[] = "parametricFiniteElementSpace_getGradientValuesGlobalExteriorTrace";
2141 static const char __pyx_k_parametricMaps_getJacobianValues_2[] = "parametricMaps_getJacobianValuesTrace";
2142 static const char __pyx_k_parametricMaps_getJacobianValues_3[] = "parametricMaps_getJacobianValuesGlobalExteriorTrace";
2143 static const char __pyx_k_parametricMaps_getJacobianValues_4[] = "parametricMaps_getJacobianValuesGlobalExteriorTrace_movingDomain";
2144 static const char __pyx_k_updateDiffusionJacobian_MixedFor_2[] = "updateDiffusionJacobian_MixedForm_weak_sd";
2145 static const char __pyx_k_updateExteriorElementBoundaryDif_2[] = "updateExteriorElementBoundaryDiffusiveVelocity_sd";
2146 static const char __pyx_k_updateExteriorElementBoundaryDif_3[] = "updateExteriorElementBoundaryDiffusionAdjoint";
2147 static const char __pyx_k_updateExteriorElementBoundaryDif_4[] = "updateExteriorElementBoundaryDiffusionAdjoint_sd";
2148 static const char __pyx_k_updateExteriorElementBoundary_Mi_2[] = "updateExteriorElementBoundary_MixedForm_weakJacobian";
2149 static const char __pyx_k_updateGlobalJacobianFromElementJ_2[] = "updateGlobalJacobianFromElementJacobian_eb_dense";
2150 static const char __pyx_k_updateGlobalJacobianFromElementJ_3[] = "updateGlobalJacobianFromElementJacobian_CSR";
2151 static const char __pyx_k_updateGlobalJacobianFromElementJ_4[] = "updateGlobalJacobianFromElementJacobian_eb_CSR";
2152 static const char __pyx_k_updateGlobalJacobianFromExterior_2[] = "updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_dense";
2153 static const char __pyx_k_updateGlobalJacobianFromExterior_3[] = "updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_CSR";
2154 static const char __pyx_k_updateGlobalJacobianFromExterior_4[] = "updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_CSR";
2155 static const char __pyx_k_updateGlobalJacobianFromExterior_5[] = "updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense";
2156 static const char __pyx_k_updateGlobalJacobianFromExterior_6[] = "updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense_sd";
2157 static const char __pyx_k_updateGlobalJacobianFromExterior_7[] = "updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_CSR_sd";
2158 static const char __pyx_k_updateGlobalJacobianFromInterior_2[] = "updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_dense";
2159 static const char __pyx_k_updateGlobalJacobianFromInterior_3[] = "updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_dense";
2160 static const char __pyx_k_updateGlobalJacobianFromInterior_4[] = "updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_dense";
2161 static const char __pyx_k_updateGlobalJacobianFromInterior_5[] = "updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_CSR";
2162 static const char __pyx_k_updateGlobalJacobianFromInterior_6[] = "updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_CSR";
2163 static const char __pyx_k_updateGlobalJacobianFromInterior_7[] = "updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense";
2164 static const char __pyx_k_updateGlobalJacobianFromInterior_8[] = "updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense_sd";
2165 static const char __pyx_k_updateGlobalJacobianFromInterior_9[] = "updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_CSR_sd";
2166 static const char __pyx_k_updateInteriorElementBoundaryDif_2[] = "updateInteriorElementBoundaryDiffusiveVelocity_sd";
2167 static const char __pyx_k_updateInteriorElementBoundaryDif_3[] = "updateInteriorElementBoundaryDiffusionAdjoint";
2168 static const char __pyx_k_updateInteriorElementBoundaryDif_4[] = "updateInteriorElementBoundaryDiffusionAdjoint_sd";
2169 static const char __pyx_k_updateInteriorElementBoundary_Mi_2[] = "updateInteriorElementBoundary_MixedForm_weakJacobian";
2170 static const char __pyx_k_updateNumericalDiffusionJacobian_2[] = "updateNumericalDiffusionJacobian_lowmem";
2171 static PyObject *__pyx_n_s_A_inv;
2172 static PyObject *__pyx_n_s_DV;
2173 static PyObject *__pyx_n_s_DV_eb;
2174 static PyObject *__pyx_n_s_F;
2175 static PyObject *__pyx_n_s_H;
2176 static PyObject *__pyx_n_s_Hess_phi;
2177 static PyObject *__pyx_n_s_Hess_v;
2178 static PyObject *__pyx_n_s_Hess_w;
2179 static PyObject *__pyx_n_s_Hess_w_dV;
2180 static PyObject *__pyx_n_s_Hessian_psi;
2181 static PyObject *__pyx_n_s_Hessian_u;
2182 static PyObject *__pyx_n_s_Hessian_v;
2183 static PyObject *__pyx_n_s_Hessian_vArray;
2184 static PyObject *__pyx_n_s_ImportError;
2185 static PyObject *__pyx_n_s_Lstar_w_dV;
2186 static PyObject *__pyx_n_s_V;
2187 static PyObject *__pyx_n_s_a;
2188 static PyObject *__pyx_n_s_abs_det_J;
2189 static PyObject *__pyx_n_s_abs_det_jac;
2190 static PyObject *__pyx_n_s_b;
2191 static PyObject *__pyx_n_s_boundaryJacobians;
2192 static PyObject *__pyx_n_s_boundaryNormals;
2193 static PyObject *__pyx_n_s_calculateCFLADR;
2194 static PyObject *__pyx_n_s_calculateCFLADR2speeds;
2195 static PyObject *__pyx_n_s_calculateConservationFluxPWL;
2196 static PyObject *__pyx_n_s_calculateConservationJacobianPWL;
2197 static PyObject *__pyx_n_s_calculateConservationResidual;
2198 static PyObject *__pyx_n_s_calculateConservationResidualDG;
2199 static PyObject *__pyx_n_s_calculateConservationResidualGlo;
2200 static PyObject *__pyx_n_s_calculateConservationResidualPWL;
2201 static PyObject *__pyx_n_s_calculateDimensionlessNumbersADR;
2202 static PyObject *__pyx_n_s_calculateDimensionlessNumbersADR_2;
2203 static PyObject *__pyx_n_s_calculateElementBoundaryIntegrat;
2204 static PyObject *__pyx_n_s_calculateExteriorElementBoundary;
2205 static PyObject *__pyx_n_s_calculateExteriorElementBoundary_2;
2206 static PyObject *__pyx_n_s_calculateExteriorElementBoundary_3;
2207 static PyObject *__pyx_n_s_calculateExteriorElementBoundary_4;
2208 static PyObject *__pyx_n_s_calculateExteriorNumericalTrace;
2209 static PyObject *__pyx_n_s_calculateFiniteElementFunctionGr;
2210 static PyObject *__pyx_n_s_calculateFiniteElementFunctionGr_2;
2211 static PyObject *__pyx_n_s_calculateFiniteElementFunctionGr_3;
2212 static PyObject *__pyx_n_s_calculateFiniteElementFunctionGr_4;
2213 static PyObject *__pyx_n_s_calculateFiniteElementFunctionHe;
2214 static PyObject *__pyx_n_s_calculateFiniteElementFunctionVa;
2215 static PyObject *__pyx_n_s_calculateFiniteElementFunctionVa_2;
2216 static PyObject *__pyx_n_s_calculateFiniteElementFunctionVa_3;
2217 static PyObject *__pyx_n_s_calculateFlowVelocity;
2218 static PyObject *__pyx_n_s_calculateGlobalExteriorElementBo;
2219 static PyObject *__pyx_n_s_calculateGradShape_X_weightedGra;
2220 static PyObject *__pyx_n_s_calculateGradShape_X_weightedSha;
2221 static PyObject *__pyx_n_s_calculateGradShape_X_weightedSha_2;
2222 static PyObject *__pyx_n_s_calculateGradShape_X_weightedSha_3;
2223 static PyObject *__pyx_n_s_calculateIntegrationWeights;
2224 static PyObject *__pyx_n_s_calculateInteriorElementBoundary;
2225 static PyObject *__pyx_n_s_calculateInteriorElementBoundary_2;
2226 static PyObject *__pyx_n_s_calculateInteriorNumericalTrace;
2227 static PyObject *__pyx_n_s_calculateScalarScalarProduct;
2228 static PyObject *__pyx_n_s_calculateShape_X_weightedGradSha;
2229 static PyObject *__pyx_n_s_calculateShape_X_weightedShape;
2230 static PyObject *__pyx_n_s_calculateShape_X_weightedShapeGl;
2231 static PyObject *__pyx_n_s_calculateShape_X_weightedShapeTr;
2232 static PyObject *__pyx_n_s_calculateTensorScalarProduct;
2233 static PyObject *__pyx_n_s_calculateVectorScalarProduct;
2234 static PyObject *__pyx_n_s_calculateVelocityProjectionMatri;
2235 static PyObject *__pyx_n_s_calculateVelocityQuadrature_Mixe;
2236 static PyObject *__pyx_n_s_calculateVelocityQuadrature_Mixe_2;
2237 static PyObject *__pyx_n_s_calculateVelocityQuadrature_Mixe_3;
2238 static PyObject *__pyx_n_s_calculateVelocityQuadrature_Mixe_4;
2239 static PyObject *__pyx_n_s_calculateWeightedShape;
2240 static PyObject *__pyx_n_s_calculateWeightedShapeGlobalExte;
2241 static PyObject *__pyx_n_s_calculateWeightedShapeGradients;
2242 static PyObject *__pyx_n_s_calculateWeightedShapeHessians;
2243 static PyObject *__pyx_n_s_calculateWeightedShapeTrace;
2244 static PyObject *__pyx_n_s_cfemIntegrals;
2245 static PyObject *__pyx_n_s_cfl;
2246 static PyObject *__pyx_n_s_checkElementBoundaryAndExteriorE;
2247 static PyObject *__pyx_n_s_checkGlobalElementBoundaryAndExt;
2248 static PyObject *__pyx_n_s_cline_in_traceback;
2249 static PyObject *__pyx_n_s_colind;
2250 static PyObject *__pyx_n_s_colind_dummy;
2251 static PyObject *__pyx_n_s_computeC0P1InterpolantDGP0;
2252 static PyObject *__pyx_n_s_computeC0P1InterpolantDGP12;
2253 static PyObject *__pyx_n_s_computeC0P1InterpolantNCP1;
2254 static PyObject *__pyx_n_s_computeDiffusiveTimeStepLimit;
2255 static PyObject *__pyx_n_s_conservationResidual;
2256 static PyObject *__pyx_n_s_copyBetweenFreeUnknownsAndGlobal;
2257 static PyObject *__pyx_n_s_copyExteriorElementBoundaryValue;
2258 static PyObject *__pyx_n_s_copyExteriorElementBoundaryValue_2;
2259 static PyObject *__pyx_n_s_copyExteriorElementBoundaryValue_3;
2260 static PyObject *__pyx_n_s_copyExteriorElementBoundaryValue_4;
2261 static PyObject *__pyx_n_s_copyGlobalElementBoundaryVelocit;
2262 static PyObject *__pyx_n_s_copyLeftElementBoundaryInfo;
2263 static PyObject *__pyx_n_s_csrColumnOffsets_eb_eNebN_ru;
2264 static PyObject *__pyx_n_s_csrColumnOffsets_eb_ru;
2265 static PyObject *__pyx_n_s_csrColumnOffsets_ru;
2266 static PyObject *__pyx_n_s_csrRowIndeces_ru;
2267 static PyObject *__pyx_n_s_dH;
2268 static PyObject *__pyx_n_s_dS;
2269 static PyObject *__pyx_n_s_dSR;
2270 static PyObject *__pyx_n_s_dS_u;
2271 static PyObject *__pyx_n_s_dV;
2272 static PyObject *__pyx_n_s_dVR;
2273 static PyObject *__pyx_n_s_dX;
2274 static PyObject *__pyx_n_s_da;
2275 static PyObject *__pyx_n_s_db;
2276 static PyObject *__pyx_n_s_db_eb;
2277 static PyObject *__pyx_n_s_derror;
2278 static PyObject *__pyx_n_s_df;
2279 static PyObject *__pyx_n_s_df1;
2280 static PyObject *__pyx_n_s_df2;
2281 static PyObject *__pyx_n_s_dim_dof;
2282 static PyObject *__pyx_n_s_dm;
2283 static PyObject *__pyx_n_s_dmt;
2284 static PyObject *__pyx_n_s_dof;
2285 static PyObject *__pyx_n_s_dofs;
2286 static PyObject *__pyx_n_s_dphi;
2287 static PyObject *__pyx_n_s_dphi_trace_left;
2288 static PyObject *__pyx_n_s_dphi_trace_right;
2289 static PyObject *__pyx_n_s_dr;
2290 static PyObject *__pyx_n_s_dsigma_xx;
2291 static PyObject *__pyx_n_s_dsigma_xy;
2292 static PyObject *__pyx_n_s_dsigma_xz;
2293 static PyObject *__pyx_n_s_dsigma_yx;
2294 static PyObject *__pyx_n_s_dsigma_yy;
2295 static PyObject *__pyx_n_s_dsigma_yz;
2296 static PyObject *__pyx_n_s_dsigma_zx;
2297 static PyObject *__pyx_n_s_dsigma_zy;
2298 static PyObject *__pyx_n_s_dsigma_zz;
2299 static PyObject *__pyx_n_s_dstrong_residual;
2300 static PyObject *__pyx_n_s_ebq_global_val;
2301 static PyObject *__pyx_n_s_ebq_val;
2302 static PyObject *__pyx_n_s_ebqe_val;
2303 static PyObject *__pyx_n_s_elementBoundaryElements;
2304 static PyObject *__pyx_n_s_elementBoundaryElementsArray;
2305 static PyObject *__pyx_n_s_elementBoundaryFluxJacobian;
2306 static PyObject *__pyx_n_s_elementBoundaryFluxJacobian_2sid;
2307 static PyObject *__pyx_n_s_elementBoundaryFluxJacobian_eb;
2308 static PyObject *__pyx_n_s_elementBoundaryLocalElementBound;
2309 static PyObject *__pyx_n_s_elementBoundaryLocalElementBound_2;
2310 static PyObject *__pyx_n_s_elementBoundaryMaterialTypes;
2311 static PyObject *__pyx_n_s_elementDiameter;
2312 static PyObject *__pyx_n_s_elementJacobian;
2313 static PyObject *__pyx_n_s_elementJacobian_eb;
2314 static PyObject *__pyx_n_s_elementNeighbors;
2315 static PyObject *__pyx_n_s_elementNodes;
2316 static PyObject *__pyx_n_s_elementNodesArray;
2317 static PyObject *__pyx_n_s_elementResidual;
2318 static PyObject *__pyx_n_s_elementSpatialResidual;
2319 static PyObject *__pyx_n_s_end;
2320 static PyObject *__pyx_n_s_epsFact;
2321 static PyObject *__pyx_n_s_error;
2322 static PyObject *__pyx_kp_s_error_copyFromFreeToGlobal;
2323 static PyObject *__pyx_kp_s_error_in_getJacobianValuesTrace;
2324 static PyObject *__pyx_kp_s_error_in_getJacobianValues_jacob;
2325 static PyObject *__pyx_n_s_estimate_mt;
2326 static PyObject *__pyx_n_s_estimate_mt_lowmem;
2327 static PyObject *__pyx_n_s_exteriorElementBoundaries;
2328 static PyObject *__pyx_n_s_exteriorElementBoundariesArray;
2329 static PyObject *__pyx_n_s_f;
2330 static PyObject *__pyx_n_s_file;
2331 static PyObject *__pyx_n_s_firstBadIndex;
2332 static PyObject *__pyx_n_s_flag;
2333 static PyObject *__pyx_n_s_flux;
2334 static PyObject *__pyx_n_s_fluxDomainBoundaryIntegral;
2335 static PyObject *__pyx_n_s_fluxDomainBoundaryIntegralFromVe;
2336 static PyObject *__pyx_n_s_fluxElementBoundaries;
2337 static PyObject *__pyx_n_s_freeDOFids;
2338 static PyObject *__pyx_n_s_freeGlobal_r;
2339 static PyObject *__pyx_n_s_freeGlobal_u;
2340 static PyObject *__pyx_n_s_freeLocal_r;
2341 static PyObject *__pyx_n_s_freeLocal_u;
2342 static PyObject *__pyx_n_s_free_u;
2343 static PyObject *__pyx_n_s_functional_map_element;
2344 static PyObject *__pyx_n_s_getCSRrepresentation;
2345 static PyObject *__pyx_n_s_getPermutationsGlobal;
2346 static PyObject *__pyx_n_s_globalDOFids;
2347 static PyObject *__pyx_n_s_globalJacobian;
2348 static PyObject *__pyx_n_s_globalJacobian_array;
2349 static PyObject *__pyx_n_s_globalResidual;
2350 static PyObject *__pyx_n_s_grad_phi;
2351 static PyObject *__pyx_n_s_grad_phi_X_grad_w_dV;
2352 static PyObject *__pyx_n_s_grad_psi;
2353 static PyObject *__pyx_n_s_grad_u;
2354 static PyObject *__pyx_n_s_grad_u_X_grad_w_dV;
2355 static PyObject *__pyx_n_s_grad_v;
2356 static PyObject *__pyx_n_s_grad_vArray;
2357 static PyObject *__pyx_n_s_grad_v_X_grad_w_dV;
2358 static PyObject *__pyx_n_s_grad_v_X_w_dS;
2359 static PyObject *__pyx_n_s_grad_v_X_w_dV;
2360 static PyObject *__pyx_n_s_grad_w;
2361 static PyObject *__pyx_n_s_grad_w_dV;
2362 static PyObject *__pyx_n_s_i;
2363 static PyObject *__pyx_n_s_import;
2364 static PyObject *__pyx_n_s_interiorElementBoundaries;
2365 static PyObject *__pyx_n_s_interiorElementBoundariesArray;
2366 static PyObject *__pyx_n_s_internalNodes;
2367 static PyObject *__pyx_n_s_interpolationValues;
2368 static PyObject *__pyx_n_s_inverseJacobian;
2369 static PyObject *__pyx_n_s_inverseJacobianArray;
2370 static PyObject *__pyx_n_s_isDOFBoundary;
2371 static PyObject *__pyx_n_s_jac;
2372 static PyObject *__pyx_n_s_jacIndex;
2373 static PyObject *__pyx_n_s_jac_array;
2374 static PyObject *__pyx_n_s_jacobian;
2375 static PyObject *__pyx_n_s_jacobianArray;
2376 static PyObject *__pyx_n_s_jacobianDeterminantArray;
2377 static PyObject *__pyx_n_s_jacobianInverseArray;
2378 static PyObject *__pyx_n_s_jacobian_eb;
2379 static PyObject *__pyx_n_s_jacobian_weak_residual;
2380 static PyObject *__pyx_n_s_jacobian_weak_residual_eb;
2381 static PyObject *__pyx_n_s_jacobian_weak_residual_xx;
2382 static PyObject *__pyx_n_s_jacobian_weak_residual_xy;
2383 static PyObject *__pyx_n_s_jacobian_weak_residual_xz;
2384 static PyObject *__pyx_n_s_jacobian_weak_residual_yx;
2385 static PyObject *__pyx_n_s_jacobian_weak_residual_yy;
2386 static PyObject *__pyx_n_s_jacobian_weak_residual_yz;
2387 static PyObject *__pyx_n_s_jacobian_weak_residual_zx;
2388 static PyObject *__pyx_n_s_jacobian_weak_residual_zy;
2389 static PyObject *__pyx_n_s_jacobian_weak_residual_zz;
2390 static PyObject *__pyx_n_s_l2g;
2391 static PyObject *__pyx_n_s_loadBoundaryFluxIntoGlobalElemen;
2392 static PyObject *__pyx_n_s_m;
2393 static PyObject *__pyx_n_s_mAverage;
2394 static PyObject *__pyx_n_s_mJump;
2395 static PyObject *__pyx_n_s_main;
2396 static PyObject *__pyx_n_s_metricTensorArray;
2397 static PyObject *__pyx_n_s_metricTensorDeterminantSqrtArray;
2398 static PyObject *__pyx_n_s_mom_flux_vec_u;
2399 static PyObject *__pyx_n_s_mom_flux_vec_v;
2400 static PyObject *__pyx_n_s_mom_flux_vec_w;
2401 static PyObject *__pyx_n_s_mt;
2402 static PyObject *__pyx_n_s_n;
2403 static PyObject *__pyx_n_s_nComponents;
2404 static PyObject *__pyx_n_s_nDOF2set;
2405 static PyObject *__pyx_n_s_nDOF_element;
2406 static PyObject *__pyx_n_s_nDOF_test_element;
2407 static PyObject *__pyx_n_s_nDOF_trial_element;
2408 static PyObject *__pyx_n_s_nElementBoundaries_element;
2409 static PyObject *__pyx_n_s_nElementBoundaries_global;
2410 static PyObject *__pyx_n_s_nElementBoundaries_owned;
2411 static PyObject *__pyx_n_s_nElementBoundaryQuadraturePoints;
2412 static PyObject *__pyx_n_s_nElements_global;
2413 static PyObject *__pyx_n_s_nElements_node;
2414 static PyObject *__pyx_n_s_nExteriorElementBoundaries;
2415 static PyObject *__pyx_n_s_nExteriorElementBoundaries_globa;
2416 static PyObject *__pyx_n_s_nFreeDOF_element_r;
2417 static PyObject *__pyx_n_s_nFreeDOF_element_u;
2418 static PyObject *__pyx_n_s_nFreeVDOF_global;
2419 static PyObject *__pyx_n_s_nInteriorElementBoundaries_globa;
2420 static PyObject *__pyx_n_s_nNodes_element;
2421 static PyObject *__pyx_n_s_nNodes_global;
2422 static PyObject *__pyx_n_s_nNodes_internal;
2423 static PyObject *__pyx_n_s_nNonzeros;
2424 static PyObject *__pyx_n_s_nQuadraturePoints_element;
2425 static PyObject *__pyx_n_s_nQuadraturePoints_elementBoundar;
2426 static PyObject *__pyx_n_s_nSpace;
2427 static PyObject *__pyx_n_s_nSpace_global;
2428 static PyObject *__pyx_n_s_nValueArray;
2429 static PyObject *__pyx_n_s_nValuesPerQuadraturePoint;
2430 static PyObject *__pyx_n_s_name;
2431 static PyObject *__pyx_n_s_nd;
2432 static PyObject *__pyx_n_s_ng;
2433 static PyObject *__pyx_n_s_nodalAverage;
2434 static PyObject *__pyx_n_s_nodeArray;
2435 static PyObject *__pyx_n_s_nodeElementOffsets;
2436 static PyObject *__pyx_n_s_nodeElementsArray;
2437 static PyObject *__pyx_n_s_nodeStarElementNeighbors;
2438 static PyObject *__pyx_n_s_nodeStarElements;
2439 static PyObject *__pyx_n_s_nodeStarJacobianOffsets;
2440 static PyObject *__pyx_n_s_nodeStarOffsets;
2441 static PyObject *__pyx_n_s_normal;
2442 static PyObject *__pyx_kp_s_not_recognized_quitting;
2443 static PyObject *__pyx_n_s_np;
2444 static PyObject *__pyx_n_s_numDiff;
2445 static PyObject *__pyx_n_s_numpy;
2446 static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to;
2447 static PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor;
2448 static PyObject *__pyx_n_s_offset;
2449 static PyObject *__pyx_n_s_offset_r;
2450 static PyObject *__pyx_n_s_offset_u;
2451 static PyObject *__pyx_n_s_output;
2452 static PyObject *__pyx_n_s_p;
2453 static PyObject *__pyx_n_s_parametricFiniteElementSpace_get;
2454 static PyObject *__pyx_n_s_parametricFiniteElementSpace_get_2;
2455 static PyObject *__pyx_n_s_parametricFiniteElementSpace_get_3;
2456 static PyObject *__pyx_n_s_parametricFiniteElementSpace_get_4;
2457 static PyObject *__pyx_n_s_parametricFiniteElementSpace_get_5;
2458 static PyObject *__pyx_n_s_parametricFiniteElementSpace_get_6;
2459 static PyObject *__pyx_n_s_parametricFiniteElementSpace_get_7;
2460 static PyObject *__pyx_n_s_parametricMaps_getInverseValues;
2461 static PyObject *__pyx_n_s_parametricMaps_getInverseValuesG;
2462 static PyObject *__pyx_n_s_parametricMaps_getInverseValuesT;
2463 static PyObject *__pyx_n_s_parametricMaps_getJacobianValues;
2464 static PyObject *__pyx_n_s_parametricMaps_getJacobianValues_2;
2465 static PyObject *__pyx_n_s_parametricMaps_getJacobianValues_3;
2466 static PyObject *__pyx_n_s_parametricMaps_getJacobianValues_4;
2467 static PyObject *__pyx_n_s_parametricMaps_getPermutations;
2468 static PyObject *__pyx_n_s_parametricMaps_getPermutationsGl;
2469 static PyObject *__pyx_n_s_parametricMaps_getValues;
2470 static PyObject *__pyx_n_s_parametricMaps_getValuesGlobalEx;
2471 static PyObject *__pyx_n_s_parametricMaps_getValuesTrace;
2472 static PyObject *__pyx_n_s_pe;
2473 static PyObject *__pyx_n_s_permutations;
2474 static PyObject *__pyx_n_s_phi;
2475 static PyObject *__pyx_n_s_phi_bc;
2476 static PyObject *__pyx_n_s_phi_trace;
2477 static PyObject *__pyx_n_s_print;
2478 static PyObject *__pyx_n_s_projectFromNodalInterpolationCon;
2479 static PyObject *__pyx_kp_s_proteus_cfemIntegrals_pyx;
2480 static PyObject *__pyx_n_s_psi;
2481 static PyObject *__pyx_n_s_qDV;
2482 static PyObject *__pyx_n_s_qDV_eb;
2483 static PyObject *__pyx_n_s_qV;
2484 static PyObject *__pyx_n_s_qa;
2485 static PyObject *__pyx_n_s_qv;
2486 static PyObject *__pyx_n_s_qw_dV;
2487 static PyObject *__pyx_n_s_r;
2488 static PyObject *__pyx_n_s_range;
2489 static PyObject *__pyx_n_s_referenceWeights;
2490 static PyObject *__pyx_n_s_residual;
2491 static PyObject *__pyx_n_s_rho_split;
2492 static PyObject *__pyx_n_s_rowptr;
2493 static PyObject *__pyx_n_s_rowptr_dummy;
2494 static PyObject *__pyx_n_s_s;
2495 static PyObject *__pyx_n_s_s1;
2496 static PyObject *__pyx_n_s_s2;
2497 static PyObject *__pyx_n_s_sResult;
2498 static PyObject *__pyx_n_s_scalarDomainIntegral;
2499 static PyObject *__pyx_n_s_scalarHeavisideDomainIntegral;
2500 static PyObject *__pyx_n_s_scalarSmoothedHeavisideDomainInt;
2501 static PyObject *__pyx_n_s_setExteriorGlobalElementBoundary;
2502 static PyObject *__pyx_n_s_sigma;
2503 static PyObject *__pyx_n_s_sqrt_det_g;
2504 static PyObject *__pyx_n_s_starJ;
2505 static PyObject *__pyx_n_s_starJacobian;
2506 static PyObject *__pyx_n_s_starR;
2507 static PyObject *__pyx_n_s_starU;
2508 static PyObject *__pyx_n_s_stride;
2509 static PyObject *__pyx_n_s_stride_r;
2510 static PyObject *__pyx_n_s_stride_u;
2511 static PyObject *__pyx_n_s_strong_residual;
2512 static PyObject *__pyx_n_s_t;
2513 static PyObject *__pyx_n_s_tResult;
2514 static PyObject *__pyx_n_s_test;
2515 static PyObject *__pyx_n_s_tolerance;
2516 static PyObject *__pyx_n_s_u;
2517 static PyObject *__pyx_n_s_ub;
2518 static PyObject *__pyx_n_s_unitNormalArray;
2519 static PyObject *__pyx_n_s_updateAddJacobian_CSR;
2520 static PyObject *__pyx_n_s_updateAdvectionJacobian_strong;
2521 static PyObject *__pyx_n_s_updateAdvectionJacobian_weak;
2522 static PyObject *__pyx_n_s_updateAdvectionJacobian_weak_low;
2523 static PyObject *__pyx_n_s_updateAdvection_adjoint;
2524 static PyObject *__pyx_n_s_updateAdvection_strong;
2525 static PyObject *__pyx_n_s_updateAdvection_weak;
2526 static PyObject *__pyx_n_s_updateCoef;
2527 static PyObject *__pyx_n_s_updateDiffusion2_adjoint;
2528 static PyObject *__pyx_n_s_updateDiffusion2_adjoint_sd;
2529 static PyObject *__pyx_n_s_updateDiffusion2_strong;
2530 static PyObject *__pyx_n_s_updateDiffusion2_strong_sd;
2531 static PyObject *__pyx_n_s_updateDiffusionJacobian2_strong;
2532 static PyObject *__pyx_n_s_updateDiffusionJacobian2_strong_2;
2533 static PyObject *__pyx_n_s_updateDiffusionJacobian_MixedFor;
2534 static PyObject *__pyx_n_s_updateDiffusionJacobian_MixedFor_2;
2535 static PyObject *__pyx_n_s_updateDiffusionJacobian_strong;
2536 static PyObject *__pyx_n_s_updateDiffusionJacobian_strong_s;
2537 static PyObject *__pyx_n_s_updateDiffusionJacobian_weak;
2538 static PyObject *__pyx_n_s_updateDiffusionJacobian_weak_low;
2539 static PyObject *__pyx_n_s_updateDiffusionJacobian_weak_sd;
2540 static PyObject *__pyx_n_s_updateDiffusion_MixedForm_weak;
2541 static PyObject *__pyx_n_s_updateDiffusion_MixedForm_weak_s;
2542 static PyObject *__pyx_n_s_updateDiffusion_adjoint;
2543 static PyObject *__pyx_n_s_updateDiffusion_adjoint_sd;
2544 static PyObject *__pyx_n_s_updateDiffusion_strong;
2545 static PyObject *__pyx_n_s_updateDiffusion_strong_sd;
2546 static PyObject *__pyx_n_s_updateDiffusion_weak;
2547 static PyObject *__pyx_n_s_updateDiffusion_weak_lowmem;
2548 static PyObject *__pyx_n_s_updateDiffusion_weak_sd;
2549 static PyObject *__pyx_n_s_updateExteriorElementBoundaryAdv;
2550 static PyObject *__pyx_n_s_updateExteriorElementBoundaryDif;
2551 static PyObject *__pyx_n_s_updateExteriorElementBoundaryDif_2;
2552 static PyObject *__pyx_n_s_updateExteriorElementBoundaryDif_3;
2553 static PyObject *__pyx_n_s_updateExteriorElementBoundaryDif_4;
2554 static PyObject *__pyx_n_s_updateExteriorElementBoundaryFlu;
2555 static PyObject *__pyx_n_s_updateExteriorElementBoundarySho;
2556 static PyObject *__pyx_n_s_updateExteriorElementBoundary_Mi;
2557 static PyObject *__pyx_n_s_updateExteriorElementBoundary_Mi_2;
2558 static PyObject *__pyx_n_s_updateFluxValues;
2559 static PyObject *__pyx_n_s_updateGlobalJacobianFromElementJ;
2560 static PyObject *__pyx_n_s_updateGlobalJacobianFromElementJ_2;
2561 static PyObject *__pyx_n_s_updateGlobalJacobianFromElementJ_3;
2562 static PyObject *__pyx_n_s_updateGlobalJacobianFromElementJ_4;
2563 static PyObject *__pyx_n_s_updateGlobalJacobianFromExterior;
2564 static PyObject *__pyx_n_s_updateGlobalJacobianFromExterior_2;
2565 static PyObject *__pyx_n_s_updateGlobalJacobianFromExterior_3;
2566 static PyObject *__pyx_n_s_updateGlobalJacobianFromExterior_4;
2567 static PyObject *__pyx_n_s_updateGlobalJacobianFromExterior_5;
2568 static PyObject *__pyx_n_s_updateGlobalJacobianFromExterior_6;
2569 static PyObject *__pyx_n_s_updateGlobalJacobianFromExterior_7;
2570 static PyObject *__pyx_n_s_updateGlobalJacobianFromInterior;
2571 static PyObject *__pyx_n_s_updateGlobalJacobianFromInterior_2;
2572 static PyObject *__pyx_n_s_updateGlobalJacobianFromInterior_3;
2573 static PyObject *__pyx_n_s_updateGlobalJacobianFromInterior_4;
2574 static PyObject *__pyx_n_s_updateGlobalJacobianFromInterior_5;
2575 static PyObject *__pyx_n_s_updateGlobalJacobianFromInterior_6;
2576 static PyObject *__pyx_n_s_updateGlobalJacobianFromInterior_7;
2577 static PyObject *__pyx_n_s_updateGlobalJacobianFromInterior_8;
2578 static PyObject *__pyx_n_s_updateGlobalJacobianFromInterior_9;
2579 static PyObject *__pyx_n_s_updateGlobalResidualFromElementR;
2580 static PyObject *__pyx_n_s_updateHamiltonianJacobian_strong;
2581 static PyObject *__pyx_n_s_updateHamiltonianJacobian_weak;
2582 static PyObject *__pyx_n_s_updateHamiltonianJacobian_weak_l;
2583 static PyObject *__pyx_n_s_updateHamiltonian_adjoint;
2584 static PyObject *__pyx_n_s_updateHamiltonian_strong;
2585 static PyObject *__pyx_n_s_updateHamiltonian_weak;
2586 static PyObject *__pyx_n_s_updateInteriorElementBoundaryAdv;
2587 static PyObject *__pyx_n_s_updateInteriorElementBoundaryDif;
2588 static PyObject *__pyx_n_s_updateInteriorElementBoundaryDif_2;
2589 static PyObject *__pyx_n_s_updateInteriorElementBoundaryDif_3;
2590 static PyObject *__pyx_n_s_updateInteriorElementBoundaryDif_4;
2591 static PyObject *__pyx_n_s_updateInteriorElementBoundaryFlu;
2592 static PyObject *__pyx_n_s_updateInteriorElementBoundarySho;
2593 static PyObject *__pyx_n_s_updateInteriorElementBoundary_Mi;
2594 static PyObject *__pyx_n_s_updateInteriorElementBoundary_Mi_2;
2595 static PyObject *__pyx_n_s_updateInteriorTwoSidedElementBou;
2596 static PyObject *__pyx_n_s_updateMassJacobian_strong;
2597 static PyObject *__pyx_n_s_updateMassJacobian_weak;
2598 static PyObject *__pyx_n_s_updateMassJacobian_weak_lowmem;
2599 static PyObject *__pyx_n_s_updateMass_adjoint;
2600 static PyObject *__pyx_n_s_updateMass_strong;
2601 static PyObject *__pyx_n_s_updateMass_weak;
2602 static PyObject *__pyx_n_s_updateNumericalDiffusion;
2603 static PyObject *__pyx_n_s_updateNumericalDiffusionJacobian;
2604 static PyObject *__pyx_n_s_updateNumericalDiffusionJacobian_2;
2605 static PyObject *__pyx_n_s_updateNumericalDiffusion_lowmem;
2606 static PyObject *__pyx_n_s_updatePotential_MixedForm_weak;
2607 static PyObject *__pyx_n_s_updatePotential_MixedForm_weakJa;
2608 static PyObject *__pyx_n_s_updateReactionJacobian_strong;
2609 static PyObject *__pyx_n_s_updateReactionJacobian_weak;
2610 static PyObject *__pyx_n_s_updateReactionJacobian_weak_lowm;
2611 static PyObject *__pyx_n_s_updateReaction_adjoint;
2612 static PyObject *__pyx_n_s_updateReaction_strong;
2613 static PyObject *__pyx_n_s_updateReaction_weak;
2614 static PyObject *__pyx_n_s_updateStressJacobian_weak;
2615 static PyObject *__pyx_n_s_updateStress_weak;
2616 static PyObject *__pyx_n_s_updateSubgridError;
2617 static PyObject *__pyx_n_s_updateSubgridErrorJacobian;
2618 static PyObject *__pyx_n_s_update_f_movingDomain;
2619 static PyObject *__pyx_n_s_update_f_movingDomain_constantMa;
2620 static PyObject *__pyx_n_s_v;
2621 static PyObject *__pyx_n_s_vArray;
2622 static PyObject *__pyx_n_s_vAverage;
2623 static PyObject *__pyx_n_s_vConservative;
2624 static PyObject *__pyx_n_s_vConservative_element;
2625 static PyObject *__pyx_n_s_vJump;
2626 static PyObject *__pyx_n_s_vResult;
2627 static PyObject *__pyx_n_s_vXw_dV;
2628 static PyObject *__pyx_n_s_v_X_grad_w_dV;
2629 static PyObject *__pyx_n_s_v_X_w_dS;
2630 static PyObject *__pyx_n_s_v_X_w_dV;
2631 static PyObject *__pyx_n_s_v_out;
2632 static PyObject *__pyx_n_s_val;
2633 static PyObject *__pyx_n_s_velocity;
2634 static PyObject *__pyx_n_s_velocityBoundary_element;
2635 static PyObject *__pyx_n_s_velocityBoundary_global;
2636 static PyObject *__pyx_n_s_vn_in;
2637 static PyObject *__pyx_n_s_w;
2638 static PyObject *__pyx_n_s_w_dS;
2639 static PyObject *__pyx_n_s_w_dV;
2640 static PyObject *__pyx_n_s_weak_residual;
2641 static PyObject *__pyx_n_s_weak_residual_x;
2642 static PyObject *__pyx_n_s_weak_residual_y;
2643 static PyObject *__pyx_n_s_weak_residual_z;
2644 static PyObject *__pyx_n_s_weights;
2645 static PyObject *__pyx_n_s_x;
2646 static PyObject *__pyx_n_s_xArray;
2647 static PyObject *__pyx_n_s_xArrayNew;
2648 static PyObject *__pyx_n_s_xg;
2649 static PyObject *__pyx_n_s_xiArray;
2650 static PyObject *__pyx_n_s_xt;
2651 static PyObject *__pyx_n_s_xtArray;
2652 static PyObject *__pyx_n_s_zeroJacobian_CSR;
2653 static PyObject *__pyx_pf_13cfemIntegrals_parametricFiniteElementSpace_getHessianValues(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_Hessian_psi, PyArrayObject *__pyx_v_inverseJacobianArray, PyArrayObject *__pyx_v_Hessian_vArray); /* proto */
2654 static PyObject *__pyx_pf_13cfemIntegrals_2updateDiffusion2_strong(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_Hess_phi, PyArrayObject *__pyx_v_strong_residual); /* proto */
2655 static PyObject *__pyx_pf_13cfemIntegrals_4updateDiffusion2_strong_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_Hess_phi, PyArrayObject *__pyx_v_strong_residual); /* proto */
2656 static PyObject *__pyx_pf_13cfemIntegrals_6updateDiffusionJacobian2_strong(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_da, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_Hess_phi, PyArrayObject *__pyx_v_dphi, PyArrayObject *__pyx_v_Hess_v, PyArrayObject *__pyx_v_dstrong_residual); /* proto */
2657 static PyObject *__pyx_pf_13cfemIntegrals_8updateDiffusionJacobian2_strong_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_da, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_Hess_phi, PyArrayObject *__pyx_v_dphi, PyArrayObject *__pyx_v_Hess_v, PyArrayObject *__pyx_v_dstrong_residual); /* proto */
2658 static PyObject *__pyx_pf_13cfemIntegrals_10updateDiffusion2_adjoint(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_Hess_w_dV, PyArrayObject *__pyx_v_Lstar_w_dV); /* proto */
2659 static PyObject *__pyx_pf_13cfemIntegrals_12updateDiffusion2_adjoint_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_Hess_w_dV, PyArrayObject *__pyx_v_Lstar_w_dV); /* proto */
2660 static PyObject *__pyx_pf_13cfemIntegrals_14calculateWeightedShapeHessians(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dVR, PyArrayObject *__pyx_v_abs_det_jac, PyArrayObject *__pyx_v_Hess_w, PyArrayObject *__pyx_v_Hess_w_dV); /* proto */
2661 static PyObject *__pyx_pf_13cfemIntegrals_16calculateFiniteElementFunctionHessianValues(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_dof, PyArrayObject *__pyx_v_Hessian_v, PyArrayObject *__pyx_v_Hessian_u); /* proto */
2662 static PyObject *__pyx_pf_13cfemIntegrals_18updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_CSR(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_interiorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_nFreeDOF_element_r, PyArrayObject *__pyx_v_freeLocal_r, PyArrayObject *__pyx_v_nFreeDOF_element_u, PyArrayObject *__pyx_v_freeLocal_u, PyArrayObject *__pyx_v_csrRowIndeces_ru, PyArrayObject *__pyx_v_csrColumnOffsets_eb_ru, PyArrayObject *__pyx_v_elementBoundaryFluxJacobian_2sided, PyArrayObject *__pyx_v_w_dS, PyObject *__pyx_v_jac); /* proto */
2663 static PyObject *__pyx_pf_13cfemIntegrals_20updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_dense(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_offset_r, int __pyx_v_stride_r, int __pyx_v_offset_u, int __pyx_v_stride_u, int __pyx_v_nFreeVDOF_global, PyArrayObject *__pyx_v_interiorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_nFreeDOF_element_r, PyArrayObject *__pyx_v_freeLocal_r, PyArrayObject *__pyx_v_freeGlobal_r, PyArrayObject *__pyx_v_nFreeDOF_element_u, PyArrayObject *__pyx_v_freeLocal_u, PyArrayObject *__pyx_v_freeGlobal_u, PyArrayObject *__pyx_v_elementBoundaryFluxJacobian_2sided, PyArrayObject *__pyx_v_w_dS, PyArrayObject *__pyx_v_jac); /* proto */
2664 static PyObject *__pyx_pf_13cfemIntegrals_22updateInteriorTwoSidedElementBoundaryFlux(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_interiorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_flux, PyArrayObject *__pyx_v_w_dS, PyArrayObject *__pyx_v_residual); /* proto */
2665 static PyObject *__pyx_pf_13cfemIntegrals_24calculateCFLADR2speeds(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_dm, PyArrayObject *__pyx_v_df1, PyArrayObject *__pyx_v_df2, PyArrayObject *__pyx_v_cfl); /* proto */
2666 static PyObject *__pyx_pf_13cfemIntegrals_26checkElementBoundaryAndExteriorElementBoundaryArraysSame(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_tolerance, PyArrayObject *__pyx_v_exteriorElementBoundariesArray, PyArrayObject *__pyx_v_elementBoundaryElementsArray, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray, PyArrayObject *__pyx_v_ebq_val, PyArrayObject *__pyx_v_ebqe_val, PyArrayObject *__pyx_v_firstBadIndex); /* proto */
2667 static PyObject *__pyx_pf_13cfemIntegrals_28checkGlobalElementBoundaryAndExteriorElementBoundaryArraysSame(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_tolerance, PyArrayObject *__pyx_v_exteriorElementBoundariesArray, PyArrayObject *__pyx_v_elementBoundaryElementsArray, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray, PyArrayObject *__pyx_v_ebq_global_val, PyArrayObject *__pyx_v_ebqe_val, PyArrayObject *__pyx_v_firstBadIndex); /* proto */
2668 static PyObject *__pyx_pf_13cfemIntegrals_30calculateExteriorElementBoundaryStress3D(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementBoundaryMaterialTypes, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_p, PyArrayObject *__pyx_v_mom_flux_vec_u, PyArrayObject *__pyx_v_mom_flux_vec_v, PyArrayObject *__pyx_v_mom_flux_vec_w, PyArrayObject *__pyx_v_dS, PyArrayObject *__pyx_v_n, PyArrayObject *__pyx_v_F); /* proto */
2669 static PyObject *__pyx_pf_13cfemIntegrals_32calculateExteriorElementBoundaryStress2D(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementBoundaryMaterialTypes, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_p, PyArrayObject *__pyx_v_mom_flux_vec_u, PyArrayObject *__pyx_v_mom_flux_vec_v, PyArrayObject *__pyx_v_dS, PyArrayObject *__pyx_v_n, PyArrayObject *__pyx_v_F); /* proto */
2670 static PyObject *__pyx_pf_13cfemIntegrals_34copyLeftElementBoundaryInfo(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementBoundaryElementsArray, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray, PyArrayObject *__pyx_v_exteriorElementBoundariesArray, PyArrayObject *__pyx_v_interiorElementBoundariesArray, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_n, PyArrayObject *__pyx_v_xg, PyArrayObject *__pyx_v_ng); /* proto */
2671 static PyObject *__pyx_pf_13cfemIntegrals_36parametricFiniteElementSpace_getValues(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_psi, PyArrayObject *__pyx_v_vArray); /* proto */
2672 static PyObject *__pyx_pf_13cfemIntegrals_38parametricFiniteElementSpace_getValuesTrace(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_psi, PyArrayObject *__pyx_v_permutations, PyArrayObject *__pyx_v_vArray); /* proto */
2673 static PyObject *__pyx_pf_13cfemIntegrals_40parametricFiniteElementSpace_getGradientValues(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_grad_psi, PyArrayObject *__pyx_v_inverseJacobianArray, PyArrayObject *__pyx_v_grad_vArray); /* proto */
2674 static PyObject *__pyx_pf_13cfemIntegrals_42parametricFiniteElementSpace_getGradientValuesTrace(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_grad_psi, PyArrayObject *__pyx_v_permutations, PyArrayObject *__pyx_v_inverseJacobianArray, PyArrayObject *__pyx_v_grad_vArray); /* proto */
2675 static PyObject *__pyx_pf_13cfemIntegrals_44parametricMaps_getPermutations(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_xiArray, PyArrayObject *__pyx_v_permutations); /* proto */
2676 static PyObject *__pyx_pf_13cfemIntegrals_46parametricMaps_getPermutationsGlobalExterior(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_exteriorElementBoundariesArray, PyArrayObject *__pyx_v_elementBoundaryElementsArray, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray, PyArrayObject *__pyx_v_xiArray, PyArrayObject *__pyx_v_permutations); /* proto */
2677 static PyObject *__pyx_pf_13cfemIntegrals_48getPermutationsGlobal(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_xArray, PyArrayObject *__pyx_v_xArrayNew, PyArrayObject *__pyx_v_permutations); /* proto */
2678 static PyObject *__pyx_pf_13cfemIntegrals_50parametricMaps_getValues(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_psi, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_nodeArray, PyArrayObject *__pyx_v_xArray); /* proto */
2679 static PyObject *__pyx_pf_13cfemIntegrals_52parametricMaps_getValuesTrace(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_psi, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_nodeArray, PyArrayObject *__pyx_v_xArray); /* proto */
2680 static PyObject *__pyx_pf_13cfemIntegrals_54parametricMaps_getInverseValues(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_inverseJacobian, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_nodeArray, PyArrayObject *__pyx_v_xArray, PyArrayObject *__pyx_v_xiArray); /* proto */
2681 static PyObject *__pyx_pf_13cfemIntegrals_56parametricMaps_getInverseValuesTrace(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_inverseJacobian, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_nodeArray, PyArrayObject *__pyx_v_xArray, PyArrayObject *__pyx_v_xiArray); /* proto */
2682 static PyObject *__pyx_pf_13cfemIntegrals_58parametricMaps_getJacobianValues(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_grad_psi, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_nodeArray, PyArrayObject *__pyx_v_jacobianArray, PyArrayObject *__pyx_v_jacobianDeterminantArray, PyArrayObject *__pyx_v_jacobianInverseArray); /* proto */
2683 static PyObject *__pyx_pf_13cfemIntegrals_60parametricMaps_getJacobianValuesTrace(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_grad_psi, PyArrayObject *__pyx_v_boundaryNormals, PyArrayObject *__pyx_v_boundaryJacobians, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_nodeArray, PyArrayObject *__pyx_v_jacobianInverseArray, PyArrayObject *__pyx_v_metricTensorArray, PyArrayObject *__pyx_v_metricTensorDeterminantSqrtArray, PyArrayObject *__pyx_v_unitNormalArray); /* proto */
2684 static PyObject *__pyx_pf_13cfemIntegrals_62updateMass_weak(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_mt, PyArrayObject *__pyx_v_w_dV, PyArrayObject *__pyx_v_weak_residual); /* proto */
2685 static PyObject *__pyx_pf_13cfemIntegrals_64updateMassJacobian_weak(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dmt, PyArrayObject *__pyx_v_v_X_w_dV, PyArrayObject *__pyx_v_jacobian_weak_residual); /* proto */
2686 static PyObject *__pyx_pf_13cfemIntegrals_66updateMassJacobian_weak_lowmem(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dmt, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_w_dV, PyArrayObject *__pyx_v_jacobian_weak_residual); /* proto */
2687 static PyObject *__pyx_pf_13cfemIntegrals_68updateMass_strong(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_mt, PyArrayObject *__pyx_v_strong_residual); /* proto */
2688 static PyObject *__pyx_pf_13cfemIntegrals_70updateMassJacobian_strong(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dmt, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_dstrong_residual); /* proto */
2689 static PyObject *__pyx_pf_13cfemIntegrals_72updateMass_adjoint(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dmt, PyArrayObject *__pyx_v_w_dV, PyArrayObject *__pyx_v_Lstar_w_dV); /* proto */
2690 static PyObject *__pyx_pf_13cfemIntegrals_74updateAdvection_weak(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_f, PyArrayObject *__pyx_v_grad_w_dV, PyArrayObject *__pyx_v_weak_residual); /* proto */
2691 static PyObject *__pyx_pf_13cfemIntegrals_76updateAdvectionJacobian_weak(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_df, PyArrayObject *__pyx_v_v_X_grad_w_dV, PyArrayObject *__pyx_v_jacobian_weak_residual); /* proto */
2692 static PyObject *__pyx_pf_13cfemIntegrals_78updateAdvectionJacobian_weak_lowmem(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_df, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_grad_w_dV, PyArrayObject *__pyx_v_jacobian_weak_residual); /* proto */
2693 static PyObject *__pyx_pf_13cfemIntegrals_80updateAdvection_strong(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_df, PyArrayObject *__pyx_v_grad_u, PyArrayObject *__pyx_v_strong_residual); /* proto */
2694 static PyObject *__pyx_pf_13cfemIntegrals_82updateAdvectionJacobian_strong(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_df, PyArrayObject *__pyx_v_grad_v, PyArrayObject *__pyx_v_dstrong_residual); /* proto */
2695 static PyObject *__pyx_pf_13cfemIntegrals_84updateAdvection_adjoint(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_df, PyArrayObject *__pyx_v_grad_w_dV, PyArrayObject *__pyx_v_Lstar_w_dV); /* proto */
2696 static PyObject *__pyx_pf_13cfemIntegrals_86updateHamiltonian_weak(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_H, PyArrayObject *__pyx_v_w_dV, PyArrayObject *__pyx_v_weak_residual); /* proto */
2697 static PyObject *__pyx_pf_13cfemIntegrals_88updateHamiltonianJacobian_weak(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dH, PyArrayObject *__pyx_v_grad_v_X_w_dV, PyArrayObject *__pyx_v_jacobian_weak_residual); /* proto */
2698 static PyObject *__pyx_pf_13cfemIntegrals_90updateHamiltonianJacobian_weak_lowmem(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dH, PyArrayObject *__pyx_v_grad_v, PyArrayObject *__pyx_v_w_dV, PyArrayObject *__pyx_v_jacobian_weak_residual); /* proto */
2699 static PyObject *__pyx_pf_13cfemIntegrals_92updateHamiltonian_strong(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dH, PyArrayObject *__pyx_v_grad_u, PyArrayObject *__pyx_v_strong_residual); /* proto */
2700 static PyObject *__pyx_pf_13cfemIntegrals_94updateHamiltonianJacobian_strong(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dH, PyArrayObject *__pyx_v_grad_v, PyArrayObject *__pyx_v_dstrong_residual); /* proto */
2701 static PyObject *__pyx_pf_13cfemIntegrals_96updateHamiltonian_adjoint(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dH, PyArrayObject *__pyx_v_grad_w_dV, PyArrayObject *__pyx_v_Lstar_w_dV); /* proto */
2702 static PyObject *__pyx_pf_13cfemIntegrals_98updateDiffusion_weak(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_grad_phi_X_grad_w_dV, PyArrayObject *__pyx_v_weak_residual); /* proto */
2703 static PyObject *__pyx_pf_13cfemIntegrals_100updateDiffusion_weak_lowmem(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_grad_phi, PyArrayObject *__pyx_v_grad_w_dV, PyArrayObject *__pyx_v_weak_residual); /* proto */
2704 static PyObject *__pyx_pf_13cfemIntegrals_102updateDiffusion_weak_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_grad_phi, PyArrayObject *__pyx_v_grad_w_dV, PyArrayObject *__pyx_v_weak_residual); /* proto */
2705 static PyObject *__pyx_pf_13cfemIntegrals_104updateDiffusionJacobian_weak(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_da, PyArrayObject *__pyx_v_grad_phi_X_grad_w_dV, PyArrayObject *__pyx_v_dphi, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_grad_v_X_grad_w_dV, PyArrayObject *__pyx_v_jacobian_weak_residual); /* proto */
2706 static PyObject *__pyx_pf_13cfemIntegrals_106updateDiffusionJacobian_weak_lowmem(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_da, PyArrayObject *__pyx_v_grad_phi, PyArrayObject *__pyx_v_grad_w_dV, PyArrayObject *__pyx_v_dphi, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_grad_v, PyArrayObject *__pyx_v_jacobian_weak_residual); /* proto */
2707 static PyObject *__pyx_pf_13cfemIntegrals_108updateDiffusionJacobian_weak_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_da, PyArrayObject *__pyx_v_grad_phi, PyArrayObject *__pyx_v_grad_w_dV, PyArrayObject *__pyx_v_dphi, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_grad_v, PyArrayObject *__pyx_v_jacobian_weak_residual); /* proto */
2708 static PyObject *__pyx_pf_13cfemIntegrals_110updateDiffusion_strong(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_da, PyArrayObject *__pyx_v_grad_phi, PyArrayObject *__pyx_v_grad_u, PyArrayObject *__pyx_v_strong_residual); /* proto */
2709 static PyObject *__pyx_pf_13cfemIntegrals_112updateDiffusion_strong_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_da, PyArrayObject *__pyx_v_grad_phi, PyArrayObject *__pyx_v_grad_u, PyArrayObject *__pyx_v_strong_residual); /* proto */
2710 static PyObject *__pyx_pf_13cfemIntegrals_114updateDiffusionJacobian_strong(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_da, PyArrayObject *__pyx_v_dphi, PyArrayObject *__pyx_v_grad_phi, PyArrayObject *__pyx_v_grad_u, PyArrayObject *__pyx_v_grad_v, PyArrayObject *__pyx_v_dstrong_residual); /* proto */
2711 static PyObject *__pyx_pf_13cfemIntegrals_116updateDiffusionJacobian_strong_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_da, PyArrayObject *__pyx_v_dphi, PyArrayObject *__pyx_v_grad_phi, PyArrayObject *__pyx_v_grad_u, PyArrayObject *__pyx_v_grad_v, PyArrayObject *__pyx_v_dstrong_residual); /* proto */
2712 static PyObject *__pyx_pf_13cfemIntegrals_118updateDiffusion_adjoint(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_da, PyArrayObject *__pyx_v_grad_phi, PyArrayObject *__pyx_v_grad_w_dV, PyArrayObject *__pyx_v_Lstar_w_dV); /* proto */
2713 static PyObject *__pyx_pf_13cfemIntegrals_120updateDiffusion_adjoint_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_da, PyArrayObject *__pyx_v_grad_phi, PyArrayObject *__pyx_v_grad_w_dV, PyArrayObject *__pyx_v_Lstar_w_dV); /* proto */
2714 static PyObject *__pyx_pf_13cfemIntegrals_122updateReaction_weak(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_r, PyArrayObject *__pyx_v_w_dV, PyArrayObject *__pyx_v_weak_residual); /* proto */
2715 static PyObject *__pyx_pf_13cfemIntegrals_124updateReactionJacobian_weak(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dr, PyArrayObject *__pyx_v_v_X_w_dV, PyArrayObject *__pyx_v_jacobian_weak_residual); /* proto */
2716 static PyObject *__pyx_pf_13cfemIntegrals_126updateReactionJacobian_weak_lowmem(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dr, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_w_dV, PyArrayObject *__pyx_v_jacobian_weak_residual); /* proto */
2717 static PyObject *__pyx_pf_13cfemIntegrals_128updateReaction_strong(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_r, PyArrayObject *__pyx_v_strong_residual); /* proto */
2718 static PyObject *__pyx_pf_13cfemIntegrals_130updateReactionJacobian_strong(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dr, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_dstrong_residual); /* proto */
2719 static PyObject *__pyx_pf_13cfemIntegrals_132updateReaction_adjoint(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dr, PyArrayObject *__pyx_v_w_dV, PyArrayObject *__pyx_v_Lstar_w_dV); /* proto */
2720 static PyObject *__pyx_pf_13cfemIntegrals_134updateSubgridError(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_error, PyArrayObject *__pyx_v_Lstar_w_dV, PyArrayObject *__pyx_v_weak_residual); /* proto */
2721 static PyObject *__pyx_pf_13cfemIntegrals_136updateSubgridErrorJacobian(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_derror, PyArrayObject *__pyx_v_Lstar_w_dV, PyArrayObject *__pyx_v_jacobian_weak_residual); /* proto */
2722 static PyObject *__pyx_pf_13cfemIntegrals_138updateNumericalDiffusion(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_numDiff, PyArrayObject *__pyx_v_grad_u_X_grad_w_dV, PyArrayObject *__pyx_v_weak_residual); /* proto */
2723 static PyObject *__pyx_pf_13cfemIntegrals_140updateNumericalDiffusion_lowmem(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_numDiff, PyArrayObject *__pyx_v_grad_u, PyArrayObject *__pyx_v_grad_w_dV, PyArrayObject *__pyx_v_weak_residual); /* proto */
2724 static PyObject *__pyx_pf_13cfemIntegrals_142updateNumericalDiffusionJacobian(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_numDiff, PyArrayObject *__pyx_v_grad_v_X_grad_w_dV, PyArrayObject *__pyx_v_jacobian_weak_residual); /* proto */
2725 static PyObject *__pyx_pf_13cfemIntegrals_144updateNumericalDiffusionJacobian_lowmem(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_numDiff, PyArrayObject *__pyx_v_grad_v, PyArrayObject *__pyx_v_grad_w_dV, PyArrayObject *__pyx_v_jacobian_weak_residual); /* proto */
2726 static PyObject *__pyx_pf_13cfemIntegrals_146calculateScalarScalarProduct(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_s1, PyArrayObject *__pyx_v_s2, PyArrayObject *__pyx_v_sResult); /* proto */
2727 static PyObject *__pyx_pf_13cfemIntegrals_148calculateVectorScalarProduct(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_s, PyArrayObject *__pyx_v_vResult); /* proto */
2728 static PyObject *__pyx_pf_13cfemIntegrals_150calculateTensorScalarProduct(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_t, PyArrayObject *__pyx_v_s, PyArrayObject *__pyx_v_tResult); /* proto */
2729 static PyObject *__pyx_pf_13cfemIntegrals_152updateInteriorElementBoundaryFlux(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_interiorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_flux, PyArrayObject *__pyx_v_w_dS, PyArrayObject *__pyx_v_residual); /* proto */
2730 static PyObject *__pyx_pf_13cfemIntegrals_154updateExteriorElementBoundaryFlux(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_flux, PyArrayObject *__pyx_v_w_dS, PyArrayObject *__pyx_v_residual); /* proto */
2731 static PyObject *__pyx_pf_13cfemIntegrals_156updateGlobalResidualFromElementResidual(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_offset_r, int __pyx_v_stride_r, PyArrayObject *__pyx_v_nFreeDOF_element_r, PyArrayObject *__pyx_v_freeLocal_r, PyArrayObject *__pyx_v_freeGlobal_r, PyArrayObject *__pyx_v_elementResidual, PyArrayObject *__pyx_v_globalResidual); /* proto */
2732 static PyObject *__pyx_pf_13cfemIntegrals_158updateGlobalJacobianFromElementJacobian_dense(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_offset_r, int __pyx_v_stride_r, int __pyx_v_offset_u, int __pyx_v_stride_u, int __pyx_v_nFreeVDOF_global, PyArrayObject *__pyx_v_nFreeDOF_element_r, PyArrayObject *__pyx_v_freeLocal_r, PyArrayObject *__pyx_v_freeGlobal_r, PyArrayObject *__pyx_v_nFreeDOF_element_u, PyArrayObject *__pyx_v_freeLocal_u, PyArrayObject *__pyx_v_freeGlobal_u, PyArrayObject *__pyx_v_elementJacobian, PyArrayObject *__pyx_v_globalJacobian); /* proto */
2733 static PyObject *__pyx_pf_13cfemIntegrals_160updateGlobalJacobianFromElementJacobian_eb_dense(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementNeighbors, int __pyx_v_offset_r, int __pyx_v_stride_r, int __pyx_v_offset_u, int __pyx_v_stride_u, int __pyx_v_nFreeVDOF_global, PyArrayObject *__pyx_v_nFreeDOF_element_r, PyArrayObject *__pyx_v_freeLocal_r, PyArrayObject *__pyx_v_freeGlobal_r, PyArrayObject *__pyx_v_nFreeDOF_element_u, PyArrayObject *__pyx_v_freeLocal_u, PyArrayObject *__pyx_v_freeGlobal_u, PyArrayObject *__pyx_v_elementJacobian_eb, PyArrayObject *__pyx_v_globalJacobian); /* proto */
2734 static PyObject *__pyx_pf_13cfemIntegrals_162updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_dense(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_offset_r, int __pyx_v_stride_r, int __pyx_v_offset_u, int __pyx_v_stride_u, int __pyx_v_nFreeVDOF_global, PyArrayObject *__pyx_v_interiorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_nFreeDOF_element_r, PyArrayObject *__pyx_v_freeLocal_r, PyArrayObject *__pyx_v_freeGlobal_r, PyArrayObject *__pyx_v_nFreeDOF_element_u, PyArrayObject *__pyx_v_freeLocal_u, PyArrayObject *__pyx_v_freeGlobal_u, PyArrayObject *__pyx_v_elementBoundaryFluxJacobian, PyArrayObject *__pyx_v_w_dS, PyArrayObject *__pyx_v_jac); /* proto */
2735 static PyObject *__pyx_pf_13cfemIntegrals_164updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_dense(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementNeighbors, int __pyx_v_nElements_global, int __pyx_v_offset_r, int __pyx_v_stride_r, int __pyx_v_offset_u, int __pyx_v_stride_u, int __pyx_v_nFreeVDOF_global, PyArrayObject *__pyx_v_interiorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_nFreeDOF_element_r, PyArrayObject *__pyx_v_freeLocal_r, PyArrayObject *__pyx_v_freeGlobal_r, PyArrayObject *__pyx_v_nFreeDOF_element_u, PyArrayObject *__pyx_v_freeLocal_u, PyArrayObject *__pyx_v_freeGlobal_u, PyArrayObject *__pyx_v_elementBoundaryFluxJacobian_eb, PyArrayObject *__pyx_v_w_dS, PyArrayObject *__pyx_v_jac); /* proto */
2736 static PyObject *__pyx_pf_13cfemIntegrals_166updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_dense(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_offset_r, int __pyx_v_stride_r, int __pyx_v_offset_u, int __pyx_v_stride_u, int __pyx_v_nFreeVDOF_global, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_nFreeDOF_element_r, PyArrayObject *__pyx_v_freeLocal_r, PyArrayObject *__pyx_v_freeGlobal_r, PyArrayObject *__pyx_v_nFreeDOF_element_u, PyArrayObject *__pyx_v_freeLocal_u, PyArrayObject *__pyx_v_freeGlobal_u, PyArrayObject *__pyx_v_elementBoundaryFluxJacobian, PyArrayObject *__pyx_v_w_dS, PyArrayObject *__pyx_v_jac); /* proto */
2737 static PyObject *__pyx_pf_13cfemIntegrals_168updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_dense(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementNeighbors, int __pyx_v_nElements_global, CYTHON_UNUSED int __pyx_v_nExteriorElementBoundaries_global, CYTHON_UNUSED int __pyx_v_nElementBoundaries_element, CYTHON_UNUSED int __pyx_v_nQuadraturePoints_elementBoundary, CYTHON_UNUSED int __pyx_v_nDOF_test_element, CYTHON_UNUSED int __pyx_v_nDOF_trial_element, int __pyx_v_offset_r, int __pyx_v_stride_r, int __pyx_v_offset_u, int __pyx_v_stride_u, int __pyx_v_nFreeVDOF_global, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_nFreeDOF_element_r, PyArrayObject *__pyx_v_freeLocal_r, PyArrayObject *__pyx_v_freeGlobal_r, PyArrayObject *__pyx_v_nFreeDOF_element_u, PyArrayObject *__pyx_v_freeLocal_u, PyArrayObject *__pyx_v_freeGlobal_u, PyArrayObject *__pyx_v_elementBoundaryFluxJacobian_eb, PyArrayObject *__pyx_v_w_dS, PyArrayObject *__pyx_v_jac); /* proto */
2738 static PyObject *__pyx_pf_13cfemIntegrals_170updateGlobalJacobianFromElementJacobian_CSR(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_nFreeDOF_element_r, PyArrayObject *__pyx_v_freeLocal_r, PyArrayObject *__pyx_v_nFreeDOF_element_u, PyArrayObject *__pyx_v_freeLocal_u, PyArrayObject *__pyx_v_csrRowIndeces_ru, PyArrayObject *__pyx_v_csrColumnOffsets_ru, PyArrayObject *__pyx_v_elementJacobian, PyObject *__pyx_v_globalJacobian); /* proto */
2739 static PyObject *__pyx_pf_13cfemIntegrals_172updateGlobalJacobianFromElementJacobian_eb_CSR(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementNeighbors, PyArrayObject *__pyx_v_nFreeDOF_element_r, PyArrayObject *__pyx_v_freeLocal_r, PyArrayObject *__pyx_v_nFreeDOF_element_u, PyArrayObject *__pyx_v_freeLocal_u, PyArrayObject *__pyx_v_csrRowIndeces_ru, PyArrayObject *__pyx_v_csrColumnOffsets_eb_ru, PyArrayObject *__pyx_v_elementJacobian_eb, PyObject *__pyx_v_globalJacobian); /* proto */
2740 static PyObject *__pyx_pf_13cfemIntegrals_174updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_CSR(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_interiorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_nFreeDOF_element_r, PyArrayObject *__pyx_v_freeLocal_r, PyArrayObject *__pyx_v_nFreeDOF_element_u, PyArrayObject *__pyx_v_freeLocal_u, PyArrayObject *__pyx_v_csrRowIndeces_ru, PyArrayObject *__pyx_v_csrColumnOffsets_eb_ru, PyArrayObject *__pyx_v_elementBoundaryFluxJacobian, PyArrayObject *__pyx_v_w_dS, PyObject *__pyx_v_jac); /* proto */
2741 static PyObject *__pyx_pf_13cfemIntegrals_176updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_CSR(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_nFreeDOF_element_r, PyArrayObject *__pyx_v_freeLocal_r, PyArrayObject *__pyx_v_nFreeDOF_element_u, PyArrayObject *__pyx_v_freeLocal_u, PyArrayObject *__pyx_v_csrRowIndeces_ru, PyArrayObject *__pyx_v_csrColumnOffsets_eb_ru, PyArrayObject *__pyx_v_elementBoundaryFluxJacobian, PyArrayObject *__pyx_v_w_dS, PyObject *__pyx_v_jac); /* proto */
2742 static PyObject *__pyx_pf_13cfemIntegrals_178updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_CSR(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementNeighbors, PyArrayObject *__pyx_v_interiorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_nFreeDOF_element_r, PyArrayObject *__pyx_v_freeLocal_r, PyArrayObject *__pyx_v_nFreeDOF_element_u, PyArrayObject *__pyx_v_freeLocal_u, PyArrayObject *__pyx_v_csrRowIndeces_ru, PyArrayObject *__pyx_v_csrColumnOffsets_eb_eNebN_ru, PyArrayObject *__pyx_v_elementBoundaryFluxJacobian_eb, PyArrayObject *__pyx_v_w_dS, PyObject *__pyx_v_jac); /* proto */
2743 static PyObject *__pyx_pf_13cfemIntegrals_180updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_CSR(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementNeighbors, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_nFreeDOF_element_r, PyArrayObject *__pyx_v_freeLocal_r, PyArrayObject *__pyx_v_nFreeDOF_element_u, PyArrayObject *__pyx_v_freeLocal_u, PyArrayObject *__pyx_v_csrRowIndeces_ru, PyArrayObject *__pyx_v_csrColumnOffsets_eb_eNebN_ru, PyArrayObject *__pyx_v_elementBoundaryFluxJacobian_eb, PyArrayObject *__pyx_v_w_dS, PyObject *__pyx_v_jac); /* proto */
2744 static PyObject *__pyx_pf_13cfemIntegrals_182calculateWeightedShape(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dVR, PyArrayObject *__pyx_v_abs_det_jac, PyArrayObject *__pyx_v_w, PyArrayObject *__pyx_v_w_dV); /* proto */
2745 static PyObject *__pyx_pf_13cfemIntegrals_184calculateWeightedShapeGradients(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dVR, PyArrayObject *__pyx_v_abs_det_jac, PyArrayObject *__pyx_v_grad_w, PyArrayObject *__pyx_v_grad_w_dV); /* proto */
2746 static PyObject *__pyx_pf_13cfemIntegrals_186calculateShape_X_weightedShape(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_w_dV, PyArrayObject *__pyx_v_v_X_w_dV); /* proto */
2747 static PyObject *__pyx_pf_13cfemIntegrals_188calculateShape_X_weightedGradShape(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_grad_w_dV, PyArrayObject *__pyx_v_v_X_grad_w_dV); /* proto */
2748 static PyObject *__pyx_pf_13cfemIntegrals_190calculateGradShape_X_weightedShape(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_grad_v, PyArrayObject *__pyx_v_w_dV, PyArrayObject *__pyx_v_grad_v_X_w_dV); /* proto */
2749 static PyObject *__pyx_pf_13cfemIntegrals_192calculateGradShape_X_weightedGradShape(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_grad_v, PyArrayObject *__pyx_v_grad_w_dV, PyArrayObject *__pyx_v_grad_v_X_grad_w_dV); /* proto */
2750 static PyObject *__pyx_pf_13cfemIntegrals_194calculateWeightedShapeTrace(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dSR, PyArrayObject *__pyx_v_sqrt_det_g, PyArrayObject *__pyx_v_w, PyArrayObject *__pyx_v_w_dS); /* proto */
2751 static PyObject *__pyx_pf_13cfemIntegrals_196calculateShape_X_weightedShapeTrace(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_w_dS, PyArrayObject *__pyx_v_v_X_w_dS); /* proto */
2752 static PyObject *__pyx_pf_13cfemIntegrals_198calculateGradShape_X_weightedShapeTrace(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_grad_v, PyArrayObject *__pyx_v_w_dS, PyArrayObject *__pyx_v_grad_v_X_w_dS); /* proto */
2753 static PyObject *__pyx_pf_13cfemIntegrals_200calculateIntegrationWeights(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_abs_det_J, PyArrayObject *__pyx_v_referenceWeights, PyArrayObject *__pyx_v_weights); /* proto */
2754 static PyObject *__pyx_pf_13cfemIntegrals_202calculateElementBoundaryIntegrationWeights(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_sqrt_det_g, PyArrayObject *__pyx_v_referenceWeights, PyArrayObject *__pyx_v_weights); /* proto */
2755 static PyObject *__pyx_pf_13cfemIntegrals_204calculateFiniteElementFunctionValues(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_dof, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_u); /* proto */
2756 static PyObject *__pyx_pf_13cfemIntegrals_206calculateFiniteElementFunctionGradientValues(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_dof, PyArrayObject *__pyx_v_grad_v, PyArrayObject *__pyx_v_grad_u); /* proto */
2757 static PyObject *__pyx_pf_13cfemIntegrals_208calculateFiniteElementFunctionGradientTensorValues(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_dof, PyArrayObject *__pyx_v_grad_v_X_grad_w_dV, PyArrayObject *__pyx_v_grad_u_X_grad_w_dV); /* proto */
2758 static PyObject *__pyx_pf_13cfemIntegrals_210calculateFiniteElementFunctionValuesTrace(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_dof, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_u); /* proto */
2759 static PyObject *__pyx_pf_13cfemIntegrals_212calculateFiniteElementFunctionGradientValuesTrace(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_dof, PyArrayObject *__pyx_v_grad_v, PyArrayObject *__pyx_v_grad_u); /* proto */
2760 static PyObject *__pyx_pf_13cfemIntegrals_214calculateFlowVelocity(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_f, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_grad_phi, PyArrayObject *__pyx_v_v); /* proto */
2761 static PyObject *__pyx_pf_13cfemIntegrals_216updateAddJacobian_CSR(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_jacIndex, double __pyx_v_val, PyObject *__pyx_v_jac); /* proto */
2762 static PyObject *__pyx_pf_13cfemIntegrals_218zeroJacobian_CSR(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nNonzeros, PyObject *__pyx_v_jac); /* proto */
2763 static PyObject *__pyx_pf_13cfemIntegrals_220calculateInteriorElementBoundaryVelocities(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nInteriorElementBoundaries_global, int __pyx_v_nElementBoundaries_element, int __pyx_v_nQuadraturePoints_elementBoundary, int __pyx_v_nSpace, PyArrayObject *__pyx_v_interiorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_m, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_grad_phi, PyArrayObject *__pyx_v_f, PyArrayObject *__pyx_v_vAverage, PyArrayObject *__pyx_v_vJump, PyArrayObject *__pyx_v_mAverage, PyArrayObject *__pyx_v_mJump); /* proto */
2764 static PyObject *__pyx_pf_13cfemIntegrals_222calculateExteriorElementBoundaryVelocities(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nExteriorElementBoundaries_global, int __pyx_v_nElementBoundaries_element, int __pyx_v_nQuadraturePoints_elementBoundary, int __pyx_v_nSpace, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_m, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_grad_phi, PyArrayObject *__pyx_v_f, PyArrayObject *__pyx_v_vAverage, PyArrayObject *__pyx_v_vJump, PyArrayObject *__pyx_v_mAverage, PyArrayObject *__pyx_v_mJump); /* proto */
2765 static PyObject *__pyx_pf_13cfemIntegrals_224calculateConservationResidualPWL(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nElements_global, int __pyx_v_nInteriorElementBoundaries_global, int __pyx_v_nExteriorElementBoundaries_global, int __pyx_v_nElementBoundaries_element, int __pyx_v_nQuadraturePoints_elementBoundary, int __pyx_v_nNodes_element, int __pyx_v_nSpace, PyArrayObject *__pyx_v_interiorElementBoundaries, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_elementNodes, PyArrayObject *__pyx_v_nodeStarElements, PyArrayObject *__pyx_v_nodeStarElementNeighbors, PyArrayObject *__pyx_v_nodeStarOffsets, PyArrayObject *__pyx_v_nElements_node, PyArrayObject *__pyx_v_elementResidual, PyArrayObject *__pyx_v_vAverage, PyArrayObject *__pyx_v_starU, PyArrayObject *__pyx_v_dX, PyArrayObject *__pyx_v_w, PyArrayObject *__pyx_v_normal, PyArrayObject *__pyx_v_conservationResidual, PyArrayObject *__pyx_v_starR, PyArrayObject *__pyx_v_vConservative, PyArrayObject *__pyx_v_vConservative_element); /* proto */
2766 static PyObject *__pyx_pf_13cfemIntegrals_226calculateConservationJacobianPWL(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nNodes_global, int __pyx_v_nNodes_internal, int __pyx_v_nElements_global, int __pyx_v_nInteriorElementBoundaries_global, int __pyx_v_nExteriorElementBoundaries_global, int __pyx_v_nElementBoundaries_element, int __pyx_v_nQuadraturePoints_elementBoundary, int __pyx_v_nNodes_element, int __pyx_v_nSpace, PyArrayObject *__pyx_v_interiorElementBoundaries, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_elementNodes, PyArrayObject *__pyx_v_nodeStarElements, PyArrayObject *__pyx_v_nodeStarElementNeighbors, PyArrayObject *__pyx_v_nodeStarOffsets, PyArrayObject *__pyx_v_nodeStarJacobianOffsets, PyArrayObject *__pyx_v_nElements_node, PyArrayObject *__pyx_v_internalNodes, PyArrayObject *__pyx_v_w, PyArrayObject *__pyx_v_normal, PyArrayObject *__pyx_v_starJacobian); /* proto */
2767 static PyObject *__pyx_pf_13cfemIntegrals_228calculateConservationFluxPWL(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nNodes_global, int __pyx_v_nNodes_internal, PyArrayObject *__pyx_v_nElements_node, PyArrayObject *__pyx_v_nodeStarOffsets, PyArrayObject *__pyx_v_nodeStarJacobianOffsets, PyArrayObject *__pyx_v_internalNodes, PyArrayObject *__pyx_v_starR, PyArrayObject *__pyx_v_starJ, PyArrayObject *__pyx_v_starU); /* proto */
2768 static PyObject *__pyx_pf_13cfemIntegrals_230setExteriorGlobalElementBoundaryVelocityValues(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_updateFluxValues, int __pyx_v_nExteriorElementBoundaries_global, int __pyx_v_nQuadraturePoints_elementBoundary, int __pyx_v_nSpace, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_n, PyArrayObject *__pyx_v_vn_in, PyArrayObject *__pyx_v_v_out); /* proto */
2769 static PyObject *__pyx_pf_13cfemIntegrals_232calculateDimensionlessNumbersADR(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nElements_global, int __pyx_v_nQuadraturePoints_element, int __pyx_v_nSpace, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_df, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_dphi, PyArrayObject *__pyx_v_dr, PyArrayObject *__pyx_v_dmt, PyArrayObject *__pyx_v_pe, PyArrayObject *__pyx_v_cfl); /* proto */
2770 static PyObject *__pyx_pf_13cfemIntegrals_234calculateDimensionlessNumbersADR_sd(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nElements_global, int __pyx_v_nQuadraturePoints_element, int __pyx_v_nSpace, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_df, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_dphi, PyArrayObject *__pyx_v_dr, PyArrayObject *__pyx_v_dmt, PyArrayObject *__pyx_v_pe, PyArrayObject *__pyx_v_cfl); /* proto */
2771 static PyObject *__pyx_pf_13cfemIntegrals_236calculateCFLADR(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_dm, PyArrayObject *__pyx_v_df, PyArrayObject *__pyx_v_cfl); /* proto */
2772 static PyObject *__pyx_pf_13cfemIntegrals_238updateInteriorElementBoundaryDiffusiveVelocity(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_interiorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_grad_phi, PyArrayObject *__pyx_v_velocity); /* proto */
2773 static PyObject *__pyx_pf_13cfemIntegrals_240updateInteriorElementBoundaryDiffusiveVelocity_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_interiorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_grad_phi, PyArrayObject *__pyx_v_velocity); /* proto */
2774 static PyObject *__pyx_pf_13cfemIntegrals_242updateExteriorElementBoundaryDiffusiveVelocity(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_grad_phi, PyArrayObject *__pyx_v_velocity); /* proto */
2775 static PyObject *__pyx_pf_13cfemIntegrals_244updateExteriorElementBoundaryDiffusiveVelocity_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_grad_phi, PyArrayObject *__pyx_v_velocity); /* proto */
2776 static PyObject *__pyx_pf_13cfemIntegrals_246updateInteriorElementBoundaryAdvectiveVelocity(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_interiorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_f, PyArrayObject *__pyx_v_velocity); /* proto */
2777 static PyObject *__pyx_pf_13cfemIntegrals_248updateExteriorElementBoundaryAdvectiveVelocity(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_f, PyArrayObject *__pyx_v_velocity); /* proto */
2778 static PyObject *__pyx_pf_13cfemIntegrals_250updateInteriorElementBoundaryShockCapturingVelocity(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_interiorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_numDiff, PyArrayObject *__pyx_v_grad_u, PyArrayObject *__pyx_v_velocity); /* proto */
2779 static PyObject *__pyx_pf_13cfemIntegrals_252updateExteriorElementBoundaryShockCapturingVelocity(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_numDiff, PyArrayObject *__pyx_v_grad_u, PyArrayObject *__pyx_v_velocity); /* proto */
2780 static PyObject *__pyx_pf_13cfemIntegrals_254calculateInteriorElementBoundaryAverageVelocity(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_interiorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_vAverage); /* proto */
2781 static PyObject *__pyx_pf_13cfemIntegrals_256calculateExteriorElementBoundaryAverageVelocity(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_vAverage); /* proto */
2782 static PyObject *__pyx_pf_13cfemIntegrals_258calculateConservationResidualDG(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementResidual, PyArrayObject *__pyx_v_conservationResidual); /* proto */
2783 static PyObject *__pyx_pf_13cfemIntegrals_260calculateConservationResidual(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_n, PyArrayObject *__pyx_v_dS_u, PyArrayObject *__pyx_v_elementResidual, PyArrayObject *__pyx_v_velocity, PyArrayObject *__pyx_v_conservationResidual); /* proto */
2784 static PyObject *__pyx_pf_13cfemIntegrals_262calculateConservationResidualGlobalBoundaries(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nElements_global, int __pyx_v_nInteriorElementBoundaries_global, int __pyx_v_nExteriorElementBoundaries_global, int __pyx_v_nElementBoundaries_element, int __pyx_v_nQuadraturePoints_elementBoundary, int __pyx_v_nNodes_element, int __pyx_v_nSpace, PyArrayObject *__pyx_v_interiorElementBoundaries, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_dS, PyArrayObject *__pyx_v_normal, PyArrayObject *__pyx_v_elementResidual, PyArrayObject *__pyx_v_velocity, PyArrayObject *__pyx_v_conservationResidual); /* proto */
2785 static PyObject *__pyx_pf_13cfemIntegrals_264copyGlobalElementBoundaryVelocityToElementBoundary(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_interiorElementBoundaries, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElementsArray, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray, PyArrayObject *__pyx_v_velocityBoundary_global, PyArrayObject *__pyx_v_velocityBoundary_element); /* proto */
2786 static PyObject *__pyx_pf_13cfemIntegrals_266loadBoundaryFluxIntoGlobalElementBoundaryVelocity(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_fluxElementBoundaries, PyArrayObject *__pyx_v_normal, PyArrayObject *__pyx_v_flux, double __pyx_v_updateCoef, PyArrayObject *__pyx_v_velocity); /* proto */
2787 static PyObject *__pyx_pf_13cfemIntegrals_268calculateInteriorNumericalTrace_Potential(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_interiorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_phi, PyArrayObject *__pyx_v_dphi, PyArrayObject *__pyx_v_phi_trace, PyArrayObject *__pyx_v_dphi_trace_left, PyArrayObject *__pyx_v_dphi_trace_right); /* proto */
2788 static PyObject *__pyx_pf_13cfemIntegrals_270calculateExteriorNumericalTrace_Potential(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_isDOFBoundary, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_phi_bc, PyArrayObject *__pyx_v_phi, PyArrayObject *__pyx_v_dphi, PyArrayObject *__pyx_v_phi_trace, PyArrayObject *__pyx_v_dphi_trace_left); /* proto */
2789 static PyObject *__pyx_pf_13cfemIntegrals_272updateInteriorElementBoundary_MixedForm_weak(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_interiorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_n, PyArrayObject *__pyx_v_phi_trace, PyArrayObject *__pyx_v_w_dS, PyArrayObject *__pyx_v_b); /* proto */
2790 static PyObject *__pyx_pf_13cfemIntegrals_274updateInteriorElementBoundary_MixedForm_weakJacobian(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_interiorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_n, PyArrayObject *__pyx_v_dphi_trace_left, PyArrayObject *__pyx_v_dphi_trace_right, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_w_dS, PyArrayObject *__pyx_v_db, PyArrayObject *__pyx_v_db_eb); /* proto */
2791 static PyObject *__pyx_pf_13cfemIntegrals_276updateExteriorElementBoundary_MixedForm_weak(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_n, PyArrayObject *__pyx_v_phi_trace, PyArrayObject *__pyx_v_w_dS, PyArrayObject *__pyx_v_b); /* proto */
2792 static PyObject *__pyx_pf_13cfemIntegrals_278updateExteriorElementBoundary_MixedForm_weakJacobian(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_n, PyArrayObject *__pyx_v_dphi_trace_left, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_w_dS, PyArrayObject *__pyx_v_db, PyArrayObject *__pyx_v_db_eb); /* proto */
2793 static PyObject *__pyx_pf_13cfemIntegrals_280updatePotential_MixedForm_weak(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_phi, PyArrayObject *__pyx_v_grad_w_dV, PyArrayObject *__pyx_v_b); /* proto */
2794 static PyObject *__pyx_pf_13cfemIntegrals_282updatePotential_MixedForm_weakJacobian(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dphi, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_grad_w_dV, PyArrayObject *__pyx_v_db); /* proto */
2795 static PyObject *__pyx_pf_13cfemIntegrals_284calculateVelocityQuadrature_MixedForm(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_A_inv, PyArrayObject *__pyx_v_b, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_V, PyArrayObject *__pyx_v_qv, PyArrayObject *__pyx_v_qV); /* proto */
2796 static PyObject *__pyx_pf_13cfemIntegrals_286calculateVelocityQuadrature_MixedForm_Jacobian(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_A_inv, PyArrayObject *__pyx_v_db, PyArrayObject *__pyx_v_db_eb, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_DV, PyArrayObject *__pyx_v_DV_eb, PyArrayObject *__pyx_v_qv, PyArrayObject *__pyx_v_qDV, PyArrayObject *__pyx_v_qDV_eb); /* proto */
2797 static PyObject *__pyx_pf_13cfemIntegrals_288calculateVelocityProjectionMatrixLDG(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_vXw_dV, PyArrayObject *__pyx_v_A_inv); /* proto */
2798 static PyObject *__pyx_pf_13cfemIntegrals_290updateDiffusion_MixedForm_weak(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_qV, PyArrayObject *__pyx_v_grad_w_dV, PyArrayObject *__pyx_v_weak_residual); /* proto */
2799 static PyObject *__pyx_pf_13cfemIntegrals_292updateDiffusionJacobian_MixedForm_weak(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_da, PyArrayObject *__pyx_v_qV, PyArrayObject *__pyx_v_qDV, PyArrayObject *__pyx_v_qDV_eb, PyArrayObject *__pyx_v_grad_w_dV, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_jacobian_weak_residual, PyArrayObject *__pyx_v_jacobian_weak_residual_eb); /* proto */
2800 static PyObject *__pyx_pf_13cfemIntegrals_294estimate_mt(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_vXw_dV, PyArrayObject *__pyx_v_elementSpatialResidual, PyArrayObject *__pyx_v_mt); /* proto */
2801 static PyObject *__pyx_pf_13cfemIntegrals_296estimate_mt_lowmem(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_w_dV, PyArrayObject *__pyx_v_elementSpatialResidual, PyArrayObject *__pyx_v_mt); /* proto */
2802 static PyObject *__pyx_pf_13cfemIntegrals_298scalarDomainIntegral(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dV, PyArrayObject *__pyx_v_nValueArray, int __pyx_v_nElements_global); /* proto */
2803 static PyObject *__pyx_pf_13cfemIntegrals_300scalarHeavisideDomainIntegral(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nElements_global, int __pyx_v_nQuadraturePoints_element, PyArrayObject *__pyx_v_dV, PyArrayObject *__pyx_v_nValueArray); /* proto */
2804 static PyObject *__pyx_pf_13cfemIntegrals_302scalarSmoothedHeavisideDomainIntegral(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_epsFact, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_dV, PyArrayObject *__pyx_v_nValueArray, int __pyx_v_nElements_global); /* proto */
2805 static PyObject *__pyx_pf_13cfemIntegrals_304fluxDomainBoundaryIntegral(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nElementBoundaries_owned, PyArrayObject *__pyx_v_flag, PyArrayObject *__pyx_v_exteriorElementBoundariesArray, PyArrayObject *__pyx_v_dS, PyArrayObject *__pyx_v_nValueArray); /* proto */
2806 static PyObject *__pyx_pf_13cfemIntegrals_306fluxDomainBoundaryIntegralFromVector(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nElementBoundaries_owned, PyArrayObject *__pyx_v_flag, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_dS, PyArrayObject *__pyx_v_nValueArray, PyArrayObject *__pyx_v_normal); /* proto */
2807 static PyObject *__pyx_pf_13cfemIntegrals_308copyExteriorElementBoundaryValuesFromElementBoundaryValues(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_ebq_val, PyArrayObject *__pyx_v_ebqe_val); /* proto */
2808 static PyObject *__pyx_pf_13cfemIntegrals_310copyExteriorElementBoundaryValuesToElementBoundaryValues(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_ebqe_val, PyArrayObject *__pyx_v_ebq_val); /* proto */
2809 static PyObject *__pyx_pf_13cfemIntegrals_312copyExteriorElementBoundaryValuesToGlobalElementBoundaryValues(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_ebqe_val, PyArrayObject *__pyx_v_ebq_global_val); /* proto */
2810 static PyObject *__pyx_pf_13cfemIntegrals_314copyExteriorElementBoundaryValuesFromGlobalElementBoundaryValues(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_ebq_global_val, PyArrayObject *__pyx_v_ebqe_val); /* proto */
2811 static PyObject *__pyx_pf_13cfemIntegrals_316computeC0P1InterpolantDGP0(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementNodesArray, PyArrayObject *__pyx_v_nodeElementOffsets, PyArrayObject *__pyx_v_nodeElementsArray, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_dof, PyArrayObject *__pyx_v_nodalAverage, PyObject *__pyx_v_dim_dof); /* proto */
2812 static PyObject *__pyx_pf_13cfemIntegrals_318computeC0P1InterpolantNCP1(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_dim_dof, PyArrayObject *__pyx_v_elementNodesArray, PyArrayObject *__pyx_v_nodeElementOffsets, PyArrayObject *__pyx_v_nodeElementsArray, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_dof, PyArrayObject *__pyx_v_nodalAverage); /* proto */
2813 static PyObject *__pyx_pf_13cfemIntegrals_320computeC0P1InterpolantDGP12(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_dim_dof, PyArrayObject *__pyx_v_elementNodesArray, PyArrayObject *__pyx_v_nodeElementOffsets, PyArrayObject *__pyx_v_nodeElementsArray, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_dof, PyArrayObject *__pyx_v_nodalAverage); /* proto */
2814 static PyObject *__pyx_pf_13cfemIntegrals_322parametricFiniteElementSpace_getValuesGlobalExteriorTrace(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_exteriorElementBoundariesArray, PyArrayObject *__pyx_v_elementBoundaryElementsArray, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray, PyArrayObject *__pyx_v_psi, PyArrayObject *__pyx_v_vArray); /* proto */
2815 static PyObject *__pyx_pf_13cfemIntegrals_324parametricFiniteElementSpace_getGradientValuesGlobalExteriorTrace(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_exteriorElementBoundariesArray, PyArrayObject *__pyx_v_elementBoundaryElementsArray, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray, PyArrayObject *__pyx_v_grad_psi, PyArrayObject *__pyx_v_inverseJacobianArray, PyArrayObject *__pyx_v_grad_vArray); /* proto */
2816 static PyObject *__pyx_pf_13cfemIntegrals_326parametricMaps_getValuesGlobalExteriorTrace(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_exteriorElementBoundariesArray, PyArrayObject *__pyx_v_elementBoundaryElementsArray, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray, PyArrayObject *__pyx_v_psi, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_nodeArray, PyArrayObject *__pyx_v_xArray); /* proto */
2817 static PyObject *__pyx_pf_13cfemIntegrals_328parametricMaps_getInverseValuesGlobalExteriorTrace(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_exteriorElementBoundariesArray, PyArrayObject *__pyx_v_elementBoundaryElementsArray, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray, PyArrayObject *__pyx_v_inverseJacobian, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_nodeArray, PyArrayObject *__pyx_v_xArray, PyArrayObject *__pyx_v_xiArray); /* proto */
2818 static PyObject *__pyx_pf_13cfemIntegrals_330parametricMaps_getJacobianValuesGlobalExteriorTrace(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_exteriorElementBoundariesArray, PyArrayObject *__pyx_v_elementBoundaryElementsArray, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray, PyArrayObject *__pyx_v_grad_psi, PyArrayObject *__pyx_v_boundaryNormals, PyArrayObject *__pyx_v_boundaryJacobians, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_nodeArray, PyArrayObject *__pyx_v_jacobianInverseArray, PyArrayObject *__pyx_v_metricTensorArray, PyArrayObject *__pyx_v_metricTensorDeterminantSqrtArray, PyArrayObject *__pyx_v_unitNormalArray); /* proto */
2819 static PyObject *__pyx_pf_13cfemIntegrals_332parametricMaps_getJacobianValuesGlobalExteriorTrace_movingDomain(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_exteriorElementBoundariesArray, PyArrayObject *__pyx_v_elementBoundaryElementsArray, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray, PyArrayObject *__pyx_v_xtArray, PyArrayObject *__pyx_v_grad_psi, PyArrayObject *__pyx_v_boundaryNormals, PyArrayObject *__pyx_v_boundaryJacobians, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_nodeArray, PyArrayObject *__pyx_v_jacobianInverseArray, PyArrayObject *__pyx_v_metricTensorArray, PyArrayObject *__pyx_v_metricTensorDeterminantSqrtArray, PyArrayObject *__pyx_v_unitNormalArray); /* proto */
2820 static PyObject *__pyx_pf_13cfemIntegrals_334calculateWeightedShapeGlobalExteriorTrace(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_exteriorElementBoundariesArray, PyArrayObject *__pyx_v_elementBoundaryElementsArray, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray, PyArrayObject *__pyx_v_dSR, PyArrayObject *__pyx_v_sqrt_det_g, PyArrayObject *__pyx_v_w, PyArrayObject *__pyx_v_w_dS); /* proto */
2821 static PyObject *__pyx_pf_13cfemIntegrals_336calculateShape_X_weightedShapeGlobalExteriorTrace(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_exteriorElementBoundariesArray, PyArrayObject *__pyx_v_elementBoundaryElementsArray, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_w_dS, PyArrayObject *__pyx_v_v_X_w_dS); /* proto */
2822 static PyObject *__pyx_pf_13cfemIntegrals_338calculateGradShape_X_weightedShapeGlobalExteriorTrace(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_exteriorElementBoundariesArray, PyArrayObject *__pyx_v_elementBoundaryElementsArray, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray, PyArrayObject *__pyx_v_grad_v, PyArrayObject *__pyx_v_w_dS, PyArrayObject *__pyx_v_grad_v_X_w_dS); /* proto */
2823 static PyObject *__pyx_pf_13cfemIntegrals_340calculateGlobalExteriorElementBoundaryIntegrationWeights(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nQuadraturePoints_elementBoundary, int __pyx_v_nExteriorElementBoundaries_global, PyArrayObject *__pyx_v_sqrt_det_g, PyArrayObject *__pyx_v_referenceWeights, PyArrayObject *__pyx_v_weights); /* proto */
2824 static PyObject *__pyx_pf_13cfemIntegrals_342calculateFiniteElementFunctionValuesGlobalExteriorTrace(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_exteriorElementBoundariesArray, PyArrayObject *__pyx_v_elementBoundaryElementsArray, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_dof, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_u); /* proto */
2825 static PyObject *__pyx_pf_13cfemIntegrals_344calculateFiniteElementFunctionGradientValuesGlobalExteriorTrace(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_exteriorElementBoundariesArray, PyArrayObject *__pyx_v_elementBoundaryElementsArray, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_dof, PyArrayObject *__pyx_v_grad_v, PyArrayObject *__pyx_v_grad_u); /* proto */
2826 static PyObject *__pyx_pf_13cfemIntegrals_346copyBetweenFreeUnknownsAndGlobalUnknowns(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nDOF2set, int __pyx_v_offset, int __pyx_v_stride, PyArrayObject *__pyx_v_globalDOFids, PyArrayObject *__pyx_v_freeDOFids, PyArrayObject *__pyx_v_free_u, PyArrayObject *__pyx_v_u); /* proto */
2827 static PyObject *__pyx_pf_13cfemIntegrals_348updateInteriorElementBoundaryDiffusionAdjoint(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_interiorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, double __pyx_v_sigma, PyArrayObject *__pyx_v_u, PyArrayObject *__pyx_v_n, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_grad_w, PyArrayObject *__pyx_v_dS, PyArrayObject *__pyx_v_residual); /* proto */
2828 static PyObject *__pyx_pf_13cfemIntegrals_350updateExteriorElementBoundaryDiffusionAdjoint(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_isDOFBoundary, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, double __pyx_v_sigma, PyArrayObject *__pyx_v_u, PyArrayObject *__pyx_v_ub, PyArrayObject *__pyx_v_n, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_grad_w, PyArrayObject *__pyx_v_dS, PyArrayObject *__pyx_v_residual); /* proto */
2829 static PyObject *__pyx_pf_13cfemIntegrals_352updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_offset_r, int __pyx_v_stride_r, int __pyx_v_offset_u, int __pyx_v_stride_u, int __pyx_v_nFreeVDOF_global, PyArrayObject *__pyx_v_interiorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_nFreeDOF_element_r, PyArrayObject *__pyx_v_freeLocal_r, PyArrayObject *__pyx_v_freeGlobal_r, PyArrayObject *__pyx_v_nFreeDOF_element_u, PyArrayObject *__pyx_v_freeLocal_u, PyArrayObject *__pyx_v_freeGlobal_u, double __pyx_v_sigma, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_n, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_grad_w, PyArrayObject *__pyx_v_dS, PyArrayObject *__pyx_v_jac); /* proto */
2830 static PyObject *__pyx_pf_13cfemIntegrals_354updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_offset_r, int __pyx_v_stride_r, int __pyx_v_offset_u, int __pyx_v_stride_u, int __pyx_v_nFreeVDOF_global, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_nFreeDOF_element_r, PyArrayObject *__pyx_v_freeLocal_r, PyArrayObject *__pyx_v_freeGlobal_r, PyArrayObject *__pyx_v_nFreeDOF_element_u, PyArrayObject *__pyx_v_freeLocal_u, PyArrayObject *__pyx_v_freeGlobal_u, PyArrayObject *__pyx_v_isDOFBoundary, double __pyx_v_sigma, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_n, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_grad_w, PyArrayObject *__pyx_v_dS, PyArrayObject *__pyx_v_jac); /* proto */
2831 static PyObject *__pyx_pf_13cfemIntegrals_356updateInteriorElementBoundaryDiffusionAdjoint_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_interiorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, double __pyx_v_sigma, PyArrayObject *__pyx_v_u, PyArrayObject *__pyx_v_n, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_grad_w, PyArrayObject *__pyx_v_dS, PyArrayObject *__pyx_v_residual); /* proto */
2832 static PyObject *__pyx_pf_13cfemIntegrals_358updateExteriorElementBoundaryDiffusionAdjoint_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_isDOFBoundary, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, double __pyx_v_sigma, PyArrayObject *__pyx_v_u, PyArrayObject *__pyx_v_ub, PyArrayObject *__pyx_v_n, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_grad_w, PyArrayObject *__pyx_v_dS, PyArrayObject *__pyx_v_residual); /* proto */
2833 static PyObject *__pyx_pf_13cfemIntegrals_360updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, int __pyx_v_offset_r, int __pyx_v_stride_r, int __pyx_v_offset_u, int __pyx_v_stride_u, int __pyx_v_nFreeVDOF_global, PyArrayObject *__pyx_v_interiorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_nFreeDOF_element_r, PyArrayObject *__pyx_v_freeLocal_r, PyArrayObject *__pyx_v_freeGlobal_r, PyArrayObject *__pyx_v_nFreeDOF_element_u, PyArrayObject *__pyx_v_freeLocal_u, PyArrayObject *__pyx_v_freeGlobal_u, double __pyx_v_sigma, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_n, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_grad_w, PyArrayObject *__pyx_v_dS, PyArrayObject *__pyx_v_jac); /* proto */
2834 static PyObject *__pyx_pf_13cfemIntegrals_362updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, int __pyx_v_offset_r, int __pyx_v_stride_r, int __pyx_v_offset_u, int __pyx_v_stride_u, int __pyx_v_nFreeVDOF_global, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_nFreeDOF_element_r, PyArrayObject *__pyx_v_freeLocal_r, PyArrayObject *__pyx_v_freeGlobal_r, PyArrayObject *__pyx_v_nFreeDOF_element_u, PyArrayObject *__pyx_v_freeLocal_u, PyArrayObject *__pyx_v_freeGlobal_u, PyArrayObject *__pyx_v_isDOFBoundary, double __pyx_v_sigma, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_n, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_grad_w, PyArrayObject *__pyx_v_dS, PyArrayObject *__pyx_v_jac); /* proto */
2835 static PyObject *__pyx_pf_13cfemIntegrals_364updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_CSR_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, int __pyx_v_offset_r, int __pyx_v_stride_r, int __pyx_v_offset_u, int __pyx_v_stride_u, int __pyx_v_nFreeVDOF_global, PyArrayObject *__pyx_v_interiorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_nFreeDOF_element_r, PyArrayObject *__pyx_v_freeLocal_r, PyArrayObject *__pyx_v_freeGlobal_r, PyArrayObject *__pyx_v_nFreeDOF_element_u, PyArrayObject *__pyx_v_freeLocal_u, PyArrayObject *__pyx_v_freeGlobal_u, PyArrayObject *__pyx_v_csrRowIndeces_ru, PyArrayObject *__pyx_v_csrColumnOffsets_eb_ru, double __pyx_v_sigma, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_n, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_grad_w, PyArrayObject *__pyx_v_dS, PyObject *__pyx_v_jac); /* proto */
2836 static PyObject *__pyx_pf_13cfemIntegrals_366updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_CSR_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, int __pyx_v_offset_r, int __pyx_v_stride_r, int __pyx_v_offset_u, int __pyx_v_stride_u, int __pyx_v_nFreeVDOF_global, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_nFreeDOF_element_r, PyArrayObject *__pyx_v_freeLocal_r, PyArrayObject *__pyx_v_freeGlobal_r, PyArrayObject *__pyx_v_nFreeDOF_element_u, PyArrayObject *__pyx_v_freeLocal_u, PyArrayObject *__pyx_v_freeGlobal_u, PyArrayObject *__pyx_v_csrRowIndeces_ru, PyArrayObject *__pyx_v_csrColumnOffsets_eb_ru, PyArrayObject *__pyx_v_isDOFBoundary, double __pyx_v_sigma, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_n, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_grad_w, PyArrayObject *__pyx_v_dS, PyObject *__pyx_v_jac); /* proto */
2837 static PyObject *__pyx_pf_13cfemIntegrals_368update_f_movingDomain(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_xt, PyArrayObject *__pyx_v_m, PyArrayObject *__pyx_v_f); /* proto */
2838 static PyObject *__pyx_pf_13cfemIntegrals_370update_f_movingDomain_constantMass(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_xt, PyArrayObject *__pyx_v_f); /* proto */
2839 static PyObject *__pyx_pf_13cfemIntegrals_372updateStress_weak(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_sigma, PyArrayObject *__pyx_v_grad_w_dV, PyArrayObject *__pyx_v_weak_residual_x, PyArrayObject *__pyx_v_weak_residual_y, PyArrayObject *__pyx_v_weak_residual_z); /* proto */
2840 static PyObject *__pyx_pf_13cfemIntegrals_374updateStressJacobian_weak(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dsigma_xx, PyArrayObject *__pyx_v_dsigma_xy, PyArrayObject *__pyx_v_dsigma_xz, PyArrayObject *__pyx_v_dsigma_yx, PyArrayObject *__pyx_v_dsigma_yy, PyArrayObject *__pyx_v_dsigma_yz, PyArrayObject *__pyx_v_dsigma_zx, PyArrayObject *__pyx_v_dsigma_zy, PyArrayObject *__pyx_v_dsigma_zz, PyArrayObject *__pyx_v_grad_v, PyArrayObject *__pyx_v_grad_w_dV, PyArrayObject *__pyx_v_jacobian_weak_residual_xx, PyArrayObject *__pyx_v_jacobian_weak_residual_xy, PyArrayObject *__pyx_v_jacobian_weak_residual_xz, PyArrayObject *__pyx_v_jacobian_weak_residual_yx, PyArrayObject *__pyx_v_jacobian_weak_residual_yy, PyArrayObject *__pyx_v_jacobian_weak_residual_yz, PyArrayObject *__pyx_v_jacobian_weak_residual_zx, PyArrayObject *__pyx_v_jacobian_weak_residual_zy, PyArrayObject *__pyx_v_jacobian_weak_residual_zz); /* proto */
2841 static PyObject *__pyx_pf_13cfemIntegrals_376projectFromNodalInterpolationConditions(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_dim_dof, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_functional_map_element, PyArrayObject *__pyx_v_interpolationValues, PyArrayObject *__pyx_v_dofs); /* proto */
2842 static PyObject *__pyx_pf_13cfemIntegrals_378calculateVelocityQuadrature_MixedForm2_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_qa, PyArrayObject *__pyx_v_qw_dV, PyArrayObject *__pyx_v_b, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_V, PyArrayObject *__pyx_v_qv, PyArrayObject *__pyx_v_qV); /* proto */
2843 static PyObject *__pyx_pf_13cfemIntegrals_380updateDiffusion_MixedForm_weak_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_qV, PyArrayObject *__pyx_v_grad_w_dV, PyArrayObject *__pyx_v_velocity, PyArrayObject *__pyx_v_residual, int __pyx_v_rho_split); /* proto */
2844 static PyObject *__pyx_pf_13cfemIntegrals_382calculateVelocityQuadrature_MixedForm2_Jacobian_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_qa, PyArrayObject *__pyx_v_qw_dV, PyArrayObject *__pyx_v_db, PyArrayObject *__pyx_v_db_eb, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_DV, PyArrayObject *__pyx_v_DV_eb, PyArrayObject *__pyx_v_qv, PyArrayObject *__pyx_v_qDV, PyArrayObject *__pyx_v_qDV_eb); /* proto */
2845 static PyObject *__pyx_pf_13cfemIntegrals_384updateDiffusionJacobian_MixedForm_weak_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_da, PyArrayObject *__pyx_v_qV, PyArrayObject *__pyx_v_qDV, PyArrayObject *__pyx_v_qDV_eb, PyArrayObject *__pyx_v_grad_w_dV, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_jacobian, PyArrayObject *__pyx_v_jacobian_eb); /* proto */
2846 static PyObject *__pyx_tuple_;
2847 static PyObject *__pyx_tuple__2;
2848 static PyObject *__pyx_tuple__3;
2849 static PyObject *__pyx_tuple__5;
2850 static PyObject *__pyx_tuple__7;
2851 static PyObject *__pyx_tuple__9;
2852 static PyObject *__pyx_tuple__11;
2853 static PyObject *__pyx_tuple__13;
2854 static PyObject *__pyx_tuple__15;
2855 static PyObject *__pyx_tuple__17;
2856 static PyObject *__pyx_tuple__19;
2857 static PyObject *__pyx_tuple__21;
2858 static PyObject *__pyx_tuple__23;
2859 static PyObject *__pyx_tuple__25;
2860 static PyObject *__pyx_tuple__27;
2861 static PyObject *__pyx_tuple__29;
2862 static PyObject *__pyx_tuple__31;
2863 static PyObject *__pyx_tuple__33;
2864 static PyObject *__pyx_tuple__35;
2865 static PyObject *__pyx_tuple__37;
2866 static PyObject *__pyx_tuple__39;
2867 static PyObject *__pyx_tuple__41;
2868 static PyObject *__pyx_tuple__43;
2869 static PyObject *__pyx_tuple__45;
2870 static PyObject *__pyx_tuple__47;
2871 static PyObject *__pyx_tuple__49;
2872 static PyObject *__pyx_tuple__51;
2873 static PyObject *__pyx_tuple__53;
2874 static PyObject *__pyx_tuple__55;
2875 static PyObject *__pyx_tuple__57;
2876 static PyObject *__pyx_tuple__59;
2877 static PyObject *__pyx_tuple__61;
2878 static PyObject *__pyx_tuple__63;
2879 static PyObject *__pyx_tuple__65;
2880 static PyObject *__pyx_tuple__67;
2881 static PyObject *__pyx_tuple__69;
2882 static PyObject *__pyx_tuple__71;
2883 static PyObject *__pyx_tuple__73;
2884 static PyObject *__pyx_tuple__75;
2885 static PyObject *__pyx_tuple__77;
2886 static PyObject *__pyx_tuple__79;
2887 static PyObject *__pyx_tuple__81;
2888 static PyObject *__pyx_tuple__83;
2889 static PyObject *__pyx_tuple__85;
2890 static PyObject *__pyx_tuple__87;
2891 static PyObject *__pyx_tuple__89;
2892 static PyObject *__pyx_tuple__91;
2893 static PyObject *__pyx_tuple__93;
2894 static PyObject *__pyx_tuple__95;
2895 static PyObject *__pyx_tuple__97;
2896 static PyObject *__pyx_tuple__99;
2897 static PyObject *__pyx_codeobj__4;
2898 static PyObject *__pyx_codeobj__6;
2899 static PyObject *__pyx_codeobj__8;
2900 static PyObject *__pyx_tuple__101;
2901 static PyObject *__pyx_tuple__103;
2902 static PyObject *__pyx_tuple__105;
2903 static PyObject *__pyx_tuple__107;
2904 static PyObject *__pyx_tuple__109;
2905 static PyObject *__pyx_tuple__111;
2906 static PyObject *__pyx_tuple__113;
2907 static PyObject *__pyx_tuple__115;
2908 static PyObject *__pyx_tuple__117;
2909 static PyObject *__pyx_tuple__119;
2910 static PyObject *__pyx_tuple__121;
2911 static PyObject *__pyx_tuple__123;
2912 static PyObject *__pyx_tuple__125;
2913 static PyObject *__pyx_tuple__127;
2914 static PyObject *__pyx_tuple__129;
2915 static PyObject *__pyx_tuple__131;
2916 static PyObject *__pyx_tuple__133;
2917 static PyObject *__pyx_tuple__135;
2918 static PyObject *__pyx_tuple__137;
2919 static PyObject *__pyx_tuple__139;
2920 static PyObject *__pyx_tuple__141;
2921 static PyObject *__pyx_tuple__143;
2922 static PyObject *__pyx_tuple__145;
2923 static PyObject *__pyx_tuple__147;
2924 static PyObject *__pyx_tuple__149;
2925 static PyObject *__pyx_tuple__151;
2926 static PyObject *__pyx_tuple__153;
2927 static PyObject *__pyx_tuple__155;
2928 static PyObject *__pyx_tuple__157;
2929 static PyObject *__pyx_tuple__159;
2930 static PyObject *__pyx_tuple__161;
2931 static PyObject *__pyx_tuple__163;
2932 static PyObject *__pyx_tuple__165;
2933 static PyObject *__pyx_tuple__167;
2934 static PyObject *__pyx_tuple__169;
2935 static PyObject *__pyx_tuple__171;
2936 static PyObject *__pyx_tuple__173;
2937 static PyObject *__pyx_tuple__175;
2938 static PyObject *__pyx_tuple__177;
2939 static PyObject *__pyx_tuple__179;
2940 static PyObject *__pyx_tuple__181;
2941 static PyObject *__pyx_tuple__183;
2942 static PyObject *__pyx_tuple__185;
2943 static PyObject *__pyx_tuple__187;
2944 static PyObject *__pyx_tuple__189;
2945 static PyObject *__pyx_tuple__191;
2946 static PyObject *__pyx_tuple__193;
2947 static PyObject *__pyx_tuple__195;
2948 static PyObject *__pyx_tuple__197;
2949 static PyObject *__pyx_tuple__199;
2950 static PyObject *__pyx_tuple__201;
2951 static PyObject *__pyx_tuple__203;
2952 static PyObject *__pyx_tuple__205;
2953 static PyObject *__pyx_tuple__207;
2954 static PyObject *__pyx_tuple__209;
2955 static PyObject *__pyx_tuple__211;
2956 static PyObject *__pyx_tuple__213;
2957 static PyObject *__pyx_tuple__215;
2958 static PyObject *__pyx_tuple__217;
2959 static PyObject *__pyx_tuple__219;
2960 static PyObject *__pyx_tuple__221;
2961 static PyObject *__pyx_tuple__223;
2962 static PyObject *__pyx_tuple__225;
2963 static PyObject *__pyx_tuple__227;
2964 static PyObject *__pyx_tuple__229;
2965 static PyObject *__pyx_tuple__231;
2966 static PyObject *__pyx_tuple__233;
2967 static PyObject *__pyx_tuple__235;
2968 static PyObject *__pyx_tuple__237;
2969 static PyObject *__pyx_tuple__239;
2970 static PyObject *__pyx_tuple__241;
2971 static PyObject *__pyx_tuple__243;
2972 static PyObject *__pyx_tuple__245;
2973 static PyObject *__pyx_tuple__247;
2974 static PyObject *__pyx_tuple__249;
2975 static PyObject *__pyx_tuple__251;
2976 static PyObject *__pyx_tuple__253;
2977 static PyObject *__pyx_tuple__255;
2978 static PyObject *__pyx_tuple__257;
2979 static PyObject *__pyx_tuple__259;
2980 static PyObject *__pyx_tuple__261;
2981 static PyObject *__pyx_tuple__263;
2982 static PyObject *__pyx_tuple__265;
2983 static PyObject *__pyx_tuple__267;
2984 static PyObject *__pyx_tuple__269;
2985 static PyObject *__pyx_tuple__271;
2986 static PyObject *__pyx_tuple__273;
2987 static PyObject *__pyx_tuple__275;
2988 static PyObject *__pyx_tuple__277;
2989 static PyObject *__pyx_tuple__279;
2990 static PyObject *__pyx_tuple__281;
2991 static PyObject *__pyx_tuple__283;
2992 static PyObject *__pyx_tuple__285;
2993 static PyObject *__pyx_tuple__287;
2994 static PyObject *__pyx_tuple__289;
2995 static PyObject *__pyx_tuple__291;
2996 static PyObject *__pyx_tuple__293;
2997 static PyObject *__pyx_tuple__295;
2998 static PyObject *__pyx_tuple__297;
2999 static PyObject *__pyx_tuple__299;
3000 static PyObject *__pyx_tuple__301;
3001 static PyObject *__pyx_tuple__303;
3002 static PyObject *__pyx_tuple__305;
3003 static PyObject *__pyx_tuple__307;
3004 static PyObject *__pyx_tuple__309;
3005 static PyObject *__pyx_tuple__311;
3006 static PyObject *__pyx_tuple__313;
3007 static PyObject *__pyx_tuple__315;
3008 static PyObject *__pyx_tuple__317;
3009 static PyObject *__pyx_tuple__319;
3010 static PyObject *__pyx_tuple__321;
3011 static PyObject *__pyx_tuple__323;
3012 static PyObject *__pyx_tuple__325;
3013 static PyObject *__pyx_tuple__327;
3014 static PyObject *__pyx_tuple__329;
3015 static PyObject *__pyx_tuple__331;
3016 static PyObject *__pyx_tuple__333;
3017 static PyObject *__pyx_tuple__335;
3018 static PyObject *__pyx_tuple__337;
3019 static PyObject *__pyx_tuple__339;
3020 static PyObject *__pyx_tuple__341;
3021 static PyObject *__pyx_tuple__343;
3022 static PyObject *__pyx_tuple__345;
3023 static PyObject *__pyx_tuple__347;
3024 static PyObject *__pyx_tuple__349;
3025 static PyObject *__pyx_tuple__351;
3026 static PyObject *__pyx_tuple__353;
3027 static PyObject *__pyx_tuple__355;
3028 static PyObject *__pyx_tuple__357;
3029 static PyObject *__pyx_tuple__359;
3030 static PyObject *__pyx_tuple__361;
3031 static PyObject *__pyx_tuple__363;
3032 static PyObject *__pyx_tuple__365;
3033 static PyObject *__pyx_tuple__367;
3034 static PyObject *__pyx_tuple__369;
3035 static PyObject *__pyx_tuple__371;
3036 static PyObject *__pyx_tuple__373;
3037 static PyObject *__pyx_tuple__375;
3038 static PyObject *__pyx_tuple__377;
3039 static PyObject *__pyx_tuple__379;
3040 static PyObject *__pyx_tuple__381;
3041 static PyObject *__pyx_tuple__383;
3042 static PyObject *__pyx_tuple__385;
3043 static PyObject *__pyx_tuple__387;
3044 static PyObject *__pyx_codeobj__10;
3045 static PyObject *__pyx_codeobj__12;
3046 static PyObject *__pyx_codeobj__14;
3047 static PyObject *__pyx_codeobj__16;
3048 static PyObject *__pyx_codeobj__18;
3049 static PyObject *__pyx_codeobj__20;
3050 static PyObject *__pyx_codeobj__22;
3051 static PyObject *__pyx_codeobj__24;
3052 static PyObject *__pyx_codeobj__26;
3053 static PyObject *__pyx_codeobj__28;
3054 static PyObject *__pyx_codeobj__30;
3055 static PyObject *__pyx_codeobj__32;
3056 static PyObject *__pyx_codeobj__34;
3057 static PyObject *__pyx_codeobj__36;
3058 static PyObject *__pyx_codeobj__38;
3059 static PyObject *__pyx_codeobj__40;
3060 static PyObject *__pyx_codeobj__42;
3061 static PyObject *__pyx_codeobj__44;
3062 static PyObject *__pyx_codeobj__46;
3063 static PyObject *__pyx_codeobj__48;
3064 static PyObject *__pyx_codeobj__50;
3065 static PyObject *__pyx_codeobj__52;
3066 static PyObject *__pyx_codeobj__54;
3067 static PyObject *__pyx_codeobj__56;
3068 static PyObject *__pyx_codeobj__58;
3069 static PyObject *__pyx_codeobj__60;
3070 static PyObject *__pyx_codeobj__62;
3071 static PyObject *__pyx_codeobj__64;
3072 static PyObject *__pyx_codeobj__66;
3073 static PyObject *__pyx_codeobj__68;
3074 static PyObject *__pyx_codeobj__70;
3075 static PyObject *__pyx_codeobj__72;
3076 static PyObject *__pyx_codeobj__74;
3077 static PyObject *__pyx_codeobj__76;
3078 static PyObject *__pyx_codeobj__78;
3079 static PyObject *__pyx_codeobj__80;
3080 static PyObject *__pyx_codeobj__82;
3081 static PyObject *__pyx_codeobj__84;
3082 static PyObject *__pyx_codeobj__86;
3083 static PyObject *__pyx_codeobj__88;
3084 static PyObject *__pyx_codeobj__90;
3085 static PyObject *__pyx_codeobj__92;
3086 static PyObject *__pyx_codeobj__94;
3087 static PyObject *__pyx_codeobj__96;
3088 static PyObject *__pyx_codeobj__98;
3089 static PyObject *__pyx_codeobj__100;
3090 static PyObject *__pyx_codeobj__102;
3091 static PyObject *__pyx_codeobj__104;
3092 static PyObject *__pyx_codeobj__106;
3093 static PyObject *__pyx_codeobj__108;
3094 static PyObject *__pyx_codeobj__110;
3095 static PyObject *__pyx_codeobj__112;
3096 static PyObject *__pyx_codeobj__114;
3097 static PyObject *__pyx_codeobj__116;
3098 static PyObject *__pyx_codeobj__118;
3099 static PyObject *__pyx_codeobj__120;
3100 static PyObject *__pyx_codeobj__122;
3101 static PyObject *__pyx_codeobj__124;
3102 static PyObject *__pyx_codeobj__126;
3103 static PyObject *__pyx_codeobj__128;
3104 static PyObject *__pyx_codeobj__130;
3105 static PyObject *__pyx_codeobj__132;
3106 static PyObject *__pyx_codeobj__134;
3107 static PyObject *__pyx_codeobj__136;
3108 static PyObject *__pyx_codeobj__138;
3109 static PyObject *__pyx_codeobj__140;
3110 static PyObject *__pyx_codeobj__142;
3111 static PyObject *__pyx_codeobj__144;
3112 static PyObject *__pyx_codeobj__146;
3113 static PyObject *__pyx_codeobj__148;
3114 static PyObject *__pyx_codeobj__150;
3115 static PyObject *__pyx_codeobj__152;
3116 static PyObject *__pyx_codeobj__154;
3117 static PyObject *__pyx_codeobj__156;
3118 static PyObject *__pyx_codeobj__158;
3119 static PyObject *__pyx_codeobj__160;
3120 static PyObject *__pyx_codeobj__162;
3121 static PyObject *__pyx_codeobj__164;
3122 static PyObject *__pyx_codeobj__166;
3123 static PyObject *__pyx_codeobj__168;
3124 static PyObject *__pyx_codeobj__170;
3125 static PyObject *__pyx_codeobj__172;
3126 static PyObject *__pyx_codeobj__174;
3127 static PyObject *__pyx_codeobj__176;
3128 static PyObject *__pyx_codeobj__178;
3129 static PyObject *__pyx_codeobj__180;
3130 static PyObject *__pyx_codeobj__182;
3131 static PyObject *__pyx_codeobj__184;
3132 static PyObject *__pyx_codeobj__186;
3133 static PyObject *__pyx_codeobj__188;
3134 static PyObject *__pyx_codeobj__190;
3135 static PyObject *__pyx_codeobj__192;
3136 static PyObject *__pyx_codeobj__194;
3137 static PyObject *__pyx_codeobj__196;
3138 static PyObject *__pyx_codeobj__198;
3139 static PyObject *__pyx_codeobj__200;
3140 static PyObject *__pyx_codeobj__202;
3141 static PyObject *__pyx_codeobj__204;
3142 static PyObject *__pyx_codeobj__206;
3143 static PyObject *__pyx_codeobj__208;
3144 static PyObject *__pyx_codeobj__210;
3145 static PyObject *__pyx_codeobj__212;
3146 static PyObject *__pyx_codeobj__214;
3147 static PyObject *__pyx_codeobj__216;
3148 static PyObject *__pyx_codeobj__218;
3149 static PyObject *__pyx_codeobj__220;
3150 static PyObject *__pyx_codeobj__222;
3151 static PyObject *__pyx_codeobj__224;
3152 static PyObject *__pyx_codeobj__226;
3153 static PyObject *__pyx_codeobj__228;
3154 static PyObject *__pyx_codeobj__230;
3155 static PyObject *__pyx_codeobj__232;
3156 static PyObject *__pyx_codeobj__234;
3157 static PyObject *__pyx_codeobj__236;
3158 static PyObject *__pyx_codeobj__238;
3159 static PyObject *__pyx_codeobj__240;
3160 static PyObject *__pyx_codeobj__242;
3161 static PyObject *__pyx_codeobj__244;
3162 static PyObject *__pyx_codeobj__246;
3163 static PyObject *__pyx_codeobj__248;
3164 static PyObject *__pyx_codeobj__250;
3165 static PyObject *__pyx_codeobj__252;
3166 static PyObject *__pyx_codeobj__254;
3167 static PyObject *__pyx_codeobj__256;
3168 static PyObject *__pyx_codeobj__258;
3169 static PyObject *__pyx_codeobj__260;
3170 static PyObject *__pyx_codeobj__262;
3171 static PyObject *__pyx_codeobj__264;
3172 static PyObject *__pyx_codeobj__266;
3173 static PyObject *__pyx_codeobj__268;
3174 static PyObject *__pyx_codeobj__270;
3175 static PyObject *__pyx_codeobj__272;
3176 static PyObject *__pyx_codeobj__274;
3177 static PyObject *__pyx_codeobj__276;
3178 static PyObject *__pyx_codeobj__278;
3179 static PyObject *__pyx_codeobj__280;
3180 static PyObject *__pyx_codeobj__282;
3181 static PyObject *__pyx_codeobj__284;
3182 static PyObject *__pyx_codeobj__286;
3183 static PyObject *__pyx_codeobj__288;
3184 static PyObject *__pyx_codeobj__290;
3185 static PyObject *__pyx_codeobj__292;
3186 static PyObject *__pyx_codeobj__294;
3187 static PyObject *__pyx_codeobj__296;
3188 static PyObject *__pyx_codeobj__298;
3189 static PyObject *__pyx_codeobj__300;
3190 static PyObject *__pyx_codeobj__302;
3191 static PyObject *__pyx_codeobj__304;
3192 static PyObject *__pyx_codeobj__306;
3193 static PyObject *__pyx_codeobj__308;
3194 static PyObject *__pyx_codeobj__310;
3195 static PyObject *__pyx_codeobj__312;
3196 static PyObject *__pyx_codeobj__314;
3197 static PyObject *__pyx_codeobj__316;
3198 static PyObject *__pyx_codeobj__318;
3199 static PyObject *__pyx_codeobj__320;
3200 static PyObject *__pyx_codeobj__322;
3201 static PyObject *__pyx_codeobj__324;
3202 static PyObject *__pyx_codeobj__326;
3203 static PyObject *__pyx_codeobj__328;
3204 static PyObject *__pyx_codeobj__330;
3205 static PyObject *__pyx_codeobj__332;
3206 static PyObject *__pyx_codeobj__334;
3207 static PyObject *__pyx_codeobj__336;
3208 static PyObject *__pyx_codeobj__338;
3209 static PyObject *__pyx_codeobj__340;
3210 static PyObject *__pyx_codeobj__342;
3211 static PyObject *__pyx_codeobj__344;
3212 static PyObject *__pyx_codeobj__346;
3213 static PyObject *__pyx_codeobj__348;
3214 static PyObject *__pyx_codeobj__350;
3215 static PyObject *__pyx_codeobj__352;
3216 static PyObject *__pyx_codeobj__354;
3217 static PyObject *__pyx_codeobj__356;
3218 static PyObject *__pyx_codeobj__358;
3219 static PyObject *__pyx_codeobj__360;
3220 static PyObject *__pyx_codeobj__362;
3221 static PyObject *__pyx_codeobj__364;
3222 static PyObject *__pyx_codeobj__366;
3223 static PyObject *__pyx_codeobj__368;
3224 static PyObject *__pyx_codeobj__370;
3225 static PyObject *__pyx_codeobj__372;
3226 static PyObject *__pyx_codeobj__374;
3227 static PyObject *__pyx_codeobj__376;
3228 static PyObject *__pyx_codeobj__378;
3229 static PyObject *__pyx_codeobj__380;
3230 static PyObject *__pyx_codeobj__382;
3231 static PyObject *__pyx_codeobj__384;
3232 static PyObject *__pyx_codeobj__386;
3233 static PyObject *__pyx_codeobj__388;
3234 /* Late includes */
3235 
3236 /* "cfemIntegrals.pyx":2296
3237  * double* jacobian_weak_residual,
3238  * double* jacobian_weak_residual_eb)
3239  * def parametricFiniteElementSpace_getHessianValues(np.ndarray Hessian_psi, # <<<<<<<<<<<<<<
3240  * np.ndarray inverseJacobianArray,
3241  * np.ndarray Hessian_vArray):
3242  */
3243 
3244 /* Python wrapper */
3245 static PyObject *__pyx_pw_13cfemIntegrals_1parametricFiniteElementSpace_getHessianValues(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
3246 static PyMethodDef __pyx_mdef_13cfemIntegrals_1parametricFiniteElementSpace_getHessianValues = {"parametricFiniteElementSpace_getHessianValues", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_1parametricFiniteElementSpace_getHessianValues, METH_VARARGS|METH_KEYWORDS, 0};
3247 static PyObject *__pyx_pw_13cfemIntegrals_1parametricFiniteElementSpace_getHessianValues(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3248  PyArrayObject *__pyx_v_Hessian_psi = 0;
3249  PyArrayObject *__pyx_v_inverseJacobianArray = 0;
3250  PyArrayObject *__pyx_v_Hessian_vArray = 0;
3251  int __pyx_lineno = 0;
3252  const char *__pyx_filename = NULL;
3253  int __pyx_clineno = 0;
3254  PyObject *__pyx_r = 0;
3255  __Pyx_RefNannyDeclarations
3256  __Pyx_RefNannySetupContext("parametricFiniteElementSpace_getHessianValues (wrapper)", 0);
3257  {
3258  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_Hessian_psi,&__pyx_n_s_inverseJacobianArray,&__pyx_n_s_Hessian_vArray,0};
3259  PyObject* values[3] = {0,0,0};
3260  if (unlikely(__pyx_kwds)) {
3261  Py_ssize_t kw_args;
3262  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
3263  switch (pos_args) {
3264  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3265  CYTHON_FALLTHROUGH;
3266  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3267  CYTHON_FALLTHROUGH;
3268  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3269  CYTHON_FALLTHROUGH;
3270  case 0: break;
3271  default: goto __pyx_L5_argtuple_error;
3272  }
3273  kw_args = PyDict_Size(__pyx_kwds);
3274  switch (pos_args) {
3275  case 0:
3276  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Hessian_psi)) != 0)) kw_args--;
3277  else goto __pyx_L5_argtuple_error;
3278  CYTHON_FALLTHROUGH;
3279  case 1:
3280  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inverseJacobianArray)) != 0)) kw_args--;
3281  else {
3282  __Pyx_RaiseArgtupleInvalid("parametricFiniteElementSpace_getHessianValues", 1, 3, 3, 1); __PYX_ERR(0, 2296, __pyx_L3_error)
3283  }
3284  CYTHON_FALLTHROUGH;
3285  case 2:
3286  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Hessian_vArray)) != 0)) kw_args--;
3287  else {
3288  __Pyx_RaiseArgtupleInvalid("parametricFiniteElementSpace_getHessianValues", 1, 3, 3, 2); __PYX_ERR(0, 2296, __pyx_L3_error)
3289  }
3290  }
3291  if (unlikely(kw_args > 0)) {
3292  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parametricFiniteElementSpace_getHessianValues") < 0)) __PYX_ERR(0, 2296, __pyx_L3_error)
3293  }
3294  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
3295  goto __pyx_L5_argtuple_error;
3296  } else {
3297  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3298  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3299  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3300  }
3301  __pyx_v_Hessian_psi = ((PyArrayObject *)values[0]);
3302  __pyx_v_inverseJacobianArray = ((PyArrayObject *)values[1]);
3303  __pyx_v_Hessian_vArray = ((PyArrayObject *)values[2]);
3304  }
3305  goto __pyx_L4_argument_unpacking_done;
3306  __pyx_L5_argtuple_error:;
3307  __Pyx_RaiseArgtupleInvalid("parametricFiniteElementSpace_getHessianValues", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2296, __pyx_L3_error)
3308  __pyx_L3_error:;
3309  __Pyx_AddTraceback("cfemIntegrals.parametricFiniteElementSpace_getHessianValues", __pyx_clineno, __pyx_lineno, __pyx_filename);
3310  __Pyx_RefNannyFinishContext();
3311  return NULL;
3312  __pyx_L4_argument_unpacking_done:;
3313  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Hessian_psi), __pyx_ptype_5numpy_ndarray, 1, "Hessian_psi", 0))) __PYX_ERR(0, 2296, __pyx_L1_error)
3314  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_inverseJacobianArray), __pyx_ptype_5numpy_ndarray, 1, "inverseJacobianArray", 0))) __PYX_ERR(0, 2297, __pyx_L1_error)
3315  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Hessian_vArray), __pyx_ptype_5numpy_ndarray, 1, "Hessian_vArray", 0))) __PYX_ERR(0, 2298, __pyx_L1_error)
3316  __pyx_r = __pyx_pf_13cfemIntegrals_parametricFiniteElementSpace_getHessianValues(__pyx_self, __pyx_v_Hessian_psi, __pyx_v_inverseJacobianArray, __pyx_v_Hessian_vArray);
3317 
3318  /* function exit code */
3319  goto __pyx_L0;
3320  __pyx_L1_error:;
3321  __pyx_r = NULL;
3322  __pyx_L0:;
3323  __Pyx_RefNannyFinishContext();
3324  return __pyx_r;
3325 }
3326 
3327 static PyObject *__pyx_pf_13cfemIntegrals_parametricFiniteElementSpace_getHessianValues(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_Hessian_psi, PyArrayObject *__pyx_v_inverseJacobianArray, PyArrayObject *__pyx_v_Hessian_vArray) {
3328  int __pyx_v_nElements_global;
3329  int __pyx_v_nQuadraturePoints_element;
3330  int __pyx_v_nDOF_element;
3331  int __pyx_v_nSpace_global;
3332  PyObject *__pyx_r = NULL;
3333  __Pyx_RefNannyDeclarations
3334  __Pyx_RefNannySetupContext("parametricFiniteElementSpace_getHessianValues", 0);
3335 
3336  /* "cfemIntegrals.pyx":2299
3337  * np.ndarray inverseJacobianArray,
3338  * np.ndarray Hessian_vArray):
3339  * cdef int nElements_global = Hessian_vArray.shape[0] # <<<<<<<<<<<<<<
3340  * cdef int nQuadraturePoints_element = Hessian_vArray.shape[1]
3341  * cdef int nDOF_element = Hessian_vArray.shape[2]
3342  */
3343  __pyx_v_nElements_global = (__pyx_v_Hessian_vArray->dimensions[0]);
3344 
3345  /* "cfemIntegrals.pyx":2300
3346  * np.ndarray Hessian_vArray):
3347  * cdef int nElements_global = Hessian_vArray.shape[0]
3348  * cdef int nQuadraturePoints_element = Hessian_vArray.shape[1] # <<<<<<<<<<<<<<
3349  * cdef int nDOF_element = Hessian_vArray.shape[2]
3350  * cdef int nSpace_global = Hessian_vArray.shape[3]
3351  */
3352  __pyx_v_nQuadraturePoints_element = (__pyx_v_Hessian_vArray->dimensions[1]);
3353 
3354  /* "cfemIntegrals.pyx":2301
3355  * cdef int nElements_global = Hessian_vArray.shape[0]
3356  * cdef int nQuadraturePoints_element = Hessian_vArray.shape[1]
3357  * cdef int nDOF_element = Hessian_vArray.shape[2] # <<<<<<<<<<<<<<
3358  * cdef int nSpace_global = Hessian_vArray.shape[3]
3359  * cparametricFiniteElementSpace_getHessianValues(nElements_global,
3360  */
3361  __pyx_v_nDOF_element = (__pyx_v_Hessian_vArray->dimensions[2]);
3362 
3363  /* "cfemIntegrals.pyx":2302
3364  * cdef int nQuadraturePoints_element = Hessian_vArray.shape[1]
3365  * cdef int nDOF_element = Hessian_vArray.shape[2]
3366  * cdef int nSpace_global = Hessian_vArray.shape[3] # <<<<<<<<<<<<<<
3367  * cparametricFiniteElementSpace_getHessianValues(nElements_global,
3368  * nQuadraturePoints_element,
3369  */
3370  __pyx_v_nSpace_global = (__pyx_v_Hessian_vArray->dimensions[3]);
3371 
3372  /* "cfemIntegrals.pyx":2303
3373  * cdef int nDOF_element = Hessian_vArray.shape[2]
3374  * cdef int nSpace_global = Hessian_vArray.shape[3]
3375  * cparametricFiniteElementSpace_getHessianValues(nElements_global, # <<<<<<<<<<<<<<
3376  * nQuadraturePoints_element,
3377  * nDOF_element,
3378  */
3379  parametricFiniteElementSpace_getHessianValues(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_element, __pyx_v_nSpace_global, ((double *)__pyx_v_Hessian_psi->data), ((double *)__pyx_v_inverseJacobianArray->data), ((double *)__pyx_v_Hessian_vArray->data));
3380 
3381  /* "cfemIntegrals.pyx":2296
3382  * double* jacobian_weak_residual,
3383  * double* jacobian_weak_residual_eb)
3384  * def parametricFiniteElementSpace_getHessianValues(np.ndarray Hessian_psi, # <<<<<<<<<<<<<<
3385  * np.ndarray inverseJacobianArray,
3386  * np.ndarray Hessian_vArray):
3387  */
3388 
3389  /* function exit code */
3390  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3391  __Pyx_XGIVEREF(__pyx_r);
3392  __Pyx_RefNannyFinishContext();
3393  return __pyx_r;
3394 }
3395 
3396 /* "cfemIntegrals.pyx":2310
3397  * <double*> inverseJacobianArray.data,
3398  * <double*> Hessian_vArray.data)
3399  * def updateDiffusion2_strong(np.ndarray a, # <<<<<<<<<<<<<<
3400  * np.ndarray Hess_phi,
3401  * np.ndarray strong_residual):
3402  */
3403 
3404 /* Python wrapper */
3405 static PyObject *__pyx_pw_13cfemIntegrals_3updateDiffusion2_strong(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
3406 static PyMethodDef __pyx_mdef_13cfemIntegrals_3updateDiffusion2_strong = {"updateDiffusion2_strong", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_3updateDiffusion2_strong, METH_VARARGS|METH_KEYWORDS, 0};
3407 static PyObject *__pyx_pw_13cfemIntegrals_3updateDiffusion2_strong(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3408  PyArrayObject *__pyx_v_a = 0;
3409  PyArrayObject *__pyx_v_Hess_phi = 0;
3410  PyArrayObject *__pyx_v_strong_residual = 0;
3411  int __pyx_lineno = 0;
3412  const char *__pyx_filename = NULL;
3413  int __pyx_clineno = 0;
3414  PyObject *__pyx_r = 0;
3415  __Pyx_RefNannyDeclarations
3416  __Pyx_RefNannySetupContext("updateDiffusion2_strong (wrapper)", 0);
3417  {
3418  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_a,&__pyx_n_s_Hess_phi,&__pyx_n_s_strong_residual,0};
3419  PyObject* values[3] = {0,0,0};
3420  if (unlikely(__pyx_kwds)) {
3421  Py_ssize_t kw_args;
3422  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
3423  switch (pos_args) {
3424  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3425  CYTHON_FALLTHROUGH;
3426  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3427  CYTHON_FALLTHROUGH;
3428  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3429  CYTHON_FALLTHROUGH;
3430  case 0: break;
3431  default: goto __pyx_L5_argtuple_error;
3432  }
3433  kw_args = PyDict_Size(__pyx_kwds);
3434  switch (pos_args) {
3435  case 0:
3436  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
3437  else goto __pyx_L5_argtuple_error;
3438  CYTHON_FALLTHROUGH;
3439  case 1:
3440  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Hess_phi)) != 0)) kw_args--;
3441  else {
3442  __Pyx_RaiseArgtupleInvalid("updateDiffusion2_strong", 1, 3, 3, 1); __PYX_ERR(0, 2310, __pyx_L3_error)
3443  }
3444  CYTHON_FALLTHROUGH;
3445  case 2:
3446  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_strong_residual)) != 0)) kw_args--;
3447  else {
3448  __Pyx_RaiseArgtupleInvalid("updateDiffusion2_strong", 1, 3, 3, 2); __PYX_ERR(0, 2310, __pyx_L3_error)
3449  }
3450  }
3451  if (unlikely(kw_args > 0)) {
3452  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateDiffusion2_strong") < 0)) __PYX_ERR(0, 2310, __pyx_L3_error)
3453  }
3454  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
3455  goto __pyx_L5_argtuple_error;
3456  } else {
3457  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3458  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3459  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3460  }
3461  __pyx_v_a = ((PyArrayObject *)values[0]);
3462  __pyx_v_Hess_phi = ((PyArrayObject *)values[1]);
3463  __pyx_v_strong_residual = ((PyArrayObject *)values[2]);
3464  }
3465  goto __pyx_L4_argument_unpacking_done;
3466  __pyx_L5_argtuple_error:;
3467  __Pyx_RaiseArgtupleInvalid("updateDiffusion2_strong", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2310, __pyx_L3_error)
3468  __pyx_L3_error:;
3469  __Pyx_AddTraceback("cfemIntegrals.updateDiffusion2_strong", __pyx_clineno, __pyx_lineno, __pyx_filename);
3470  __Pyx_RefNannyFinishContext();
3471  return NULL;
3472  __pyx_L4_argument_unpacking_done:;
3473  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1, "a", 0))) __PYX_ERR(0, 2310, __pyx_L1_error)
3474  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Hess_phi), __pyx_ptype_5numpy_ndarray, 1, "Hess_phi", 0))) __PYX_ERR(0, 2311, __pyx_L1_error)
3475  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_strong_residual), __pyx_ptype_5numpy_ndarray, 1, "strong_residual", 0))) __PYX_ERR(0, 2312, __pyx_L1_error)
3476  __pyx_r = __pyx_pf_13cfemIntegrals_2updateDiffusion2_strong(__pyx_self, __pyx_v_a, __pyx_v_Hess_phi, __pyx_v_strong_residual);
3477 
3478  /* function exit code */
3479  goto __pyx_L0;
3480  __pyx_L1_error:;
3481  __pyx_r = NULL;
3482  __pyx_L0:;
3483  __Pyx_RefNannyFinishContext();
3484  return __pyx_r;
3485 }
3486 
3487 static PyObject *__pyx_pf_13cfemIntegrals_2updateDiffusion2_strong(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_Hess_phi, PyArrayObject *__pyx_v_strong_residual) {
3488  int __pyx_v_nElements_global;
3489  int __pyx_v_nQuadraturePoints_element;
3490  int __pyx_v_nSpace;
3491  PyObject *__pyx_r = NULL;
3492  __Pyx_RefNannyDeclarations
3493  __Pyx_RefNannySetupContext("updateDiffusion2_strong", 0);
3494 
3495  /* "cfemIntegrals.pyx":2313
3496  * np.ndarray Hess_phi,
3497  * np.ndarray strong_residual):
3498  * cdef int nElements_global = Hess_phi.shape[0] # <<<<<<<<<<<<<<
3499  * cdef int nQuadraturePoints_element = Hess_phi.shape[1]
3500  * cdef int nSpace = Hess_phi.shape[2]
3501  */
3502  __pyx_v_nElements_global = (__pyx_v_Hess_phi->dimensions[0]);
3503 
3504  /* "cfemIntegrals.pyx":2314
3505  * np.ndarray strong_residual):
3506  * cdef int nElements_global = Hess_phi.shape[0]
3507  * cdef int nQuadraturePoints_element = Hess_phi.shape[1] # <<<<<<<<<<<<<<
3508  * cdef int nSpace = Hess_phi.shape[2]
3509  * cupdateDiffusion2_strong(nElements_global,
3510  */
3511  __pyx_v_nQuadraturePoints_element = (__pyx_v_Hess_phi->dimensions[1]);
3512 
3513  /* "cfemIntegrals.pyx":2315
3514  * cdef int nElements_global = Hess_phi.shape[0]
3515  * cdef int nQuadraturePoints_element = Hess_phi.shape[1]
3516  * cdef int nSpace = Hess_phi.shape[2] # <<<<<<<<<<<<<<
3517  * cupdateDiffusion2_strong(nElements_global,
3518  * nQuadraturePoints_element,
3519  */
3520  __pyx_v_nSpace = (__pyx_v_Hess_phi->dimensions[2]);
3521 
3522  /* "cfemIntegrals.pyx":2316
3523  * cdef int nQuadraturePoints_element = Hess_phi.shape[1]
3524  * cdef int nSpace = Hess_phi.shape[2]
3525  * cupdateDiffusion2_strong(nElements_global, # <<<<<<<<<<<<<<
3526  * nQuadraturePoints_element,
3527  * nSpace,
3528  */
3529  updateDiffusion2_strong(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nSpace, ((double *)__pyx_v_a->data), ((double *)__pyx_v_Hess_phi->data), ((double *)__pyx_v_strong_residual->data));
3530 
3531  /* "cfemIntegrals.pyx":2310
3532  * <double*> inverseJacobianArray.data,
3533  * <double*> Hessian_vArray.data)
3534  * def updateDiffusion2_strong(np.ndarray a, # <<<<<<<<<<<<<<
3535  * np.ndarray Hess_phi,
3536  * np.ndarray strong_residual):
3537  */
3538 
3539  /* function exit code */
3540  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3541  __Pyx_XGIVEREF(__pyx_r);
3542  __Pyx_RefNannyFinishContext();
3543  return __pyx_r;
3544 }
3545 
3546 /* "cfemIntegrals.pyx":2322
3547  * <double*> Hess_phi.data,
3548  * <double*> strong_residual.data)
3549  * def updateDiffusion2_strong_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
3550  * np.ndarray colind,
3551  * np.ndarray a,
3552  */
3553 
3554 /* Python wrapper */
3555 static PyObject *__pyx_pw_13cfemIntegrals_5updateDiffusion2_strong_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
3556 static PyMethodDef __pyx_mdef_13cfemIntegrals_5updateDiffusion2_strong_sd = {"updateDiffusion2_strong_sd", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_5updateDiffusion2_strong_sd, METH_VARARGS|METH_KEYWORDS, 0};
3557 static PyObject *__pyx_pw_13cfemIntegrals_5updateDiffusion2_strong_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3558  PyArrayObject *__pyx_v_rowptr = 0;
3559  PyArrayObject *__pyx_v_colind = 0;
3560  PyArrayObject *__pyx_v_a = 0;
3561  PyArrayObject *__pyx_v_Hess_phi = 0;
3562  PyArrayObject *__pyx_v_strong_residual = 0;
3563  int __pyx_lineno = 0;
3564  const char *__pyx_filename = NULL;
3565  int __pyx_clineno = 0;
3566  PyObject *__pyx_r = 0;
3567  __Pyx_RefNannyDeclarations
3568  __Pyx_RefNannySetupContext("updateDiffusion2_strong_sd (wrapper)", 0);
3569  {
3570  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rowptr,&__pyx_n_s_colind,&__pyx_n_s_a,&__pyx_n_s_Hess_phi,&__pyx_n_s_strong_residual,0};
3571  PyObject* values[5] = {0,0,0,0,0};
3572  if (unlikely(__pyx_kwds)) {
3573  Py_ssize_t kw_args;
3574  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
3575  switch (pos_args) {
3576  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
3577  CYTHON_FALLTHROUGH;
3578  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3579  CYTHON_FALLTHROUGH;
3580  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3581  CYTHON_FALLTHROUGH;
3582  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3583  CYTHON_FALLTHROUGH;
3584  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3585  CYTHON_FALLTHROUGH;
3586  case 0: break;
3587  default: goto __pyx_L5_argtuple_error;
3588  }
3589  kw_args = PyDict_Size(__pyx_kwds);
3590  switch (pos_args) {
3591  case 0:
3592  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rowptr)) != 0)) kw_args--;
3593  else goto __pyx_L5_argtuple_error;
3594  CYTHON_FALLTHROUGH;
3595  case 1:
3596  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_colind)) != 0)) kw_args--;
3597  else {
3598  __Pyx_RaiseArgtupleInvalid("updateDiffusion2_strong_sd", 1, 5, 5, 1); __PYX_ERR(0, 2322, __pyx_L3_error)
3599  }
3600  CYTHON_FALLTHROUGH;
3601  case 2:
3602  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
3603  else {
3604  __Pyx_RaiseArgtupleInvalid("updateDiffusion2_strong_sd", 1, 5, 5, 2); __PYX_ERR(0, 2322, __pyx_L3_error)
3605  }
3606  CYTHON_FALLTHROUGH;
3607  case 3:
3608  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Hess_phi)) != 0)) kw_args--;
3609  else {
3610  __Pyx_RaiseArgtupleInvalid("updateDiffusion2_strong_sd", 1, 5, 5, 3); __PYX_ERR(0, 2322, __pyx_L3_error)
3611  }
3612  CYTHON_FALLTHROUGH;
3613  case 4:
3614  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_strong_residual)) != 0)) kw_args--;
3615  else {
3616  __Pyx_RaiseArgtupleInvalid("updateDiffusion2_strong_sd", 1, 5, 5, 4); __PYX_ERR(0, 2322, __pyx_L3_error)
3617  }
3618  }
3619  if (unlikely(kw_args > 0)) {
3620  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateDiffusion2_strong_sd") < 0)) __PYX_ERR(0, 2322, __pyx_L3_error)
3621  }
3622  } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
3623  goto __pyx_L5_argtuple_error;
3624  } else {
3625  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3626  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3627  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3628  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3629  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
3630  }
3631  __pyx_v_rowptr = ((PyArrayObject *)values[0]);
3632  __pyx_v_colind = ((PyArrayObject *)values[1]);
3633  __pyx_v_a = ((PyArrayObject *)values[2]);
3634  __pyx_v_Hess_phi = ((PyArrayObject *)values[3]);
3635  __pyx_v_strong_residual = ((PyArrayObject *)values[4]);
3636  }
3637  goto __pyx_L4_argument_unpacking_done;
3638  __pyx_L5_argtuple_error:;
3639  __Pyx_RaiseArgtupleInvalid("updateDiffusion2_strong_sd", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2322, __pyx_L3_error)
3640  __pyx_L3_error:;
3641  __Pyx_AddTraceback("cfemIntegrals.updateDiffusion2_strong_sd", __pyx_clineno, __pyx_lineno, __pyx_filename);
3642  __Pyx_RefNannyFinishContext();
3643  return NULL;
3644  __pyx_L4_argument_unpacking_done:;
3645  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rowptr), __pyx_ptype_5numpy_ndarray, 1, "rowptr", 0))) __PYX_ERR(0, 2322, __pyx_L1_error)
3646  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_colind), __pyx_ptype_5numpy_ndarray, 1, "colind", 0))) __PYX_ERR(0, 2323, __pyx_L1_error)
3647  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1, "a", 0))) __PYX_ERR(0, 2324, __pyx_L1_error)
3648  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Hess_phi), __pyx_ptype_5numpy_ndarray, 1, "Hess_phi", 0))) __PYX_ERR(0, 2325, __pyx_L1_error)
3649  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_strong_residual), __pyx_ptype_5numpy_ndarray, 1, "strong_residual", 0))) __PYX_ERR(0, 2326, __pyx_L1_error)
3650  __pyx_r = __pyx_pf_13cfemIntegrals_4updateDiffusion2_strong_sd(__pyx_self, __pyx_v_rowptr, __pyx_v_colind, __pyx_v_a, __pyx_v_Hess_phi, __pyx_v_strong_residual);
3651 
3652  /* function exit code */
3653  goto __pyx_L0;
3654  __pyx_L1_error:;
3655  __pyx_r = NULL;
3656  __pyx_L0:;
3657  __Pyx_RefNannyFinishContext();
3658  return __pyx_r;
3659 }
3660 
3661 static PyObject *__pyx_pf_13cfemIntegrals_4updateDiffusion2_strong_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_Hess_phi, PyArrayObject *__pyx_v_strong_residual) {
3662  int __pyx_v_nElements_global;
3663  int __pyx_v_nQuadraturePoints_element;
3664  int __pyx_v_nSpace;
3665  PyObject *__pyx_r = NULL;
3666  __Pyx_RefNannyDeclarations
3667  __Pyx_RefNannySetupContext("updateDiffusion2_strong_sd", 0);
3668 
3669  /* "cfemIntegrals.pyx":2327
3670  * np.ndarray Hess_phi,
3671  * np.ndarray strong_residual):
3672  * cdef int nElements_global = Hess_phi.shape[0] # <<<<<<<<<<<<<<
3673  * cdef int nQuadraturePoints_element = Hess_phi.shape[1]
3674  * cdef int nSpace = Hess_phi.shape[2]
3675  */
3676  __pyx_v_nElements_global = (__pyx_v_Hess_phi->dimensions[0]);
3677 
3678  /* "cfemIntegrals.pyx":2328
3679  * np.ndarray strong_residual):
3680  * cdef int nElements_global = Hess_phi.shape[0]
3681  * cdef int nQuadraturePoints_element = Hess_phi.shape[1] # <<<<<<<<<<<<<<
3682  * cdef int nSpace = Hess_phi.shape[2]
3683  * cupdateDiffusion2_strong_sd(nElements_global,
3684  */
3685  __pyx_v_nQuadraturePoints_element = (__pyx_v_Hess_phi->dimensions[1]);
3686 
3687  /* "cfemIntegrals.pyx":2329
3688  * cdef int nElements_global = Hess_phi.shape[0]
3689  * cdef int nQuadraturePoints_element = Hess_phi.shape[1]
3690  * cdef int nSpace = Hess_phi.shape[2] # <<<<<<<<<<<<<<
3691  * cupdateDiffusion2_strong_sd(nElements_global,
3692  * nQuadraturePoints_element,
3693  */
3694  __pyx_v_nSpace = (__pyx_v_Hess_phi->dimensions[2]);
3695 
3696  /* "cfemIntegrals.pyx":2330
3697  * cdef int nQuadraturePoints_element = Hess_phi.shape[1]
3698  * cdef int nSpace = Hess_phi.shape[2]
3699  * cupdateDiffusion2_strong_sd(nElements_global, # <<<<<<<<<<<<<<
3700  * nQuadraturePoints_element,
3701  * nSpace,
3702  */
3703  updateDiffusion2_strong_sd(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nSpace, ((int *)__pyx_v_rowptr->data), ((int *)__pyx_v_colind->data), ((double *)__pyx_v_a->data), ((double *)__pyx_v_Hess_phi->data), ((double *)__pyx_v_strong_residual->data));
3704 
3705  /* "cfemIntegrals.pyx":2322
3706  * <double*> Hess_phi.data,
3707  * <double*> strong_residual.data)
3708  * def updateDiffusion2_strong_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
3709  * np.ndarray colind,
3710  * np.ndarray a,
3711  */
3712 
3713  /* function exit code */
3714  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3715  __Pyx_XGIVEREF(__pyx_r);
3716  __Pyx_RefNannyFinishContext();
3717  return __pyx_r;
3718 }
3719 
3720 /* "cfemIntegrals.pyx":2338
3721  * <double*> Hess_phi.data,
3722  * <double*> strong_residual.data)
3723  * def updateDiffusionJacobian2_strong(np.ndarray l2g, # <<<<<<<<<<<<<<
3724  * np.ndarray a,
3725  * np.ndarray da,
3726  */
3727 
3728 /* Python wrapper */
3729 static PyObject *__pyx_pw_13cfemIntegrals_7updateDiffusionJacobian2_strong(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
3730 static PyMethodDef __pyx_mdef_13cfemIntegrals_7updateDiffusionJacobian2_strong = {"updateDiffusionJacobian2_strong", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_7updateDiffusionJacobian2_strong, METH_VARARGS|METH_KEYWORDS, 0};
3731 static PyObject *__pyx_pw_13cfemIntegrals_7updateDiffusionJacobian2_strong(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3732  PyArrayObject *__pyx_v_l2g = 0;
3733  PyArrayObject *__pyx_v_a = 0;
3734  PyArrayObject *__pyx_v_da = 0;
3735  PyArrayObject *__pyx_v_v = 0;
3736  PyArrayObject *__pyx_v_Hess_phi = 0;
3737  PyArrayObject *__pyx_v_dphi = 0;
3738  PyArrayObject *__pyx_v_Hess_v = 0;
3739  PyArrayObject *__pyx_v_dstrong_residual = 0;
3740  int __pyx_lineno = 0;
3741  const char *__pyx_filename = NULL;
3742  int __pyx_clineno = 0;
3743  PyObject *__pyx_r = 0;
3744  __Pyx_RefNannyDeclarations
3745  __Pyx_RefNannySetupContext("updateDiffusionJacobian2_strong (wrapper)", 0);
3746  {
3747  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_l2g,&__pyx_n_s_a,&__pyx_n_s_da,&__pyx_n_s_v,&__pyx_n_s_Hess_phi,&__pyx_n_s_dphi,&__pyx_n_s_Hess_v,&__pyx_n_s_dstrong_residual,0};
3748  PyObject* values[8] = {0,0,0,0,0,0,0,0};
3749  if (unlikely(__pyx_kwds)) {
3750  Py_ssize_t kw_args;
3751  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
3752  switch (pos_args) {
3753  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
3754  CYTHON_FALLTHROUGH;
3755  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
3756  CYTHON_FALLTHROUGH;
3757  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
3758  CYTHON_FALLTHROUGH;
3759  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
3760  CYTHON_FALLTHROUGH;
3761  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3762  CYTHON_FALLTHROUGH;
3763  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3764  CYTHON_FALLTHROUGH;
3765  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3766  CYTHON_FALLTHROUGH;
3767  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3768  CYTHON_FALLTHROUGH;
3769  case 0: break;
3770  default: goto __pyx_L5_argtuple_error;
3771  }
3772  kw_args = PyDict_Size(__pyx_kwds);
3773  switch (pos_args) {
3774  case 0:
3775  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_l2g)) != 0)) kw_args--;
3776  else goto __pyx_L5_argtuple_error;
3777  CYTHON_FALLTHROUGH;
3778  case 1:
3779  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
3780  else {
3781  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian2_strong", 1, 8, 8, 1); __PYX_ERR(0, 2338, __pyx_L3_error)
3782  }
3783  CYTHON_FALLTHROUGH;
3784  case 2:
3785  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_da)) != 0)) kw_args--;
3786  else {
3787  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian2_strong", 1, 8, 8, 2); __PYX_ERR(0, 2338, __pyx_L3_error)
3788  }
3789  CYTHON_FALLTHROUGH;
3790  case 3:
3791  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
3792  else {
3793  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian2_strong", 1, 8, 8, 3); __PYX_ERR(0, 2338, __pyx_L3_error)
3794  }
3795  CYTHON_FALLTHROUGH;
3796  case 4:
3797  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Hess_phi)) != 0)) kw_args--;
3798  else {
3799  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian2_strong", 1, 8, 8, 4); __PYX_ERR(0, 2338, __pyx_L3_error)
3800  }
3801  CYTHON_FALLTHROUGH;
3802  case 5:
3803  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dphi)) != 0)) kw_args--;
3804  else {
3805  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian2_strong", 1, 8, 8, 5); __PYX_ERR(0, 2338, __pyx_L3_error)
3806  }
3807  CYTHON_FALLTHROUGH;
3808  case 6:
3809  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Hess_v)) != 0)) kw_args--;
3810  else {
3811  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian2_strong", 1, 8, 8, 6); __PYX_ERR(0, 2338, __pyx_L3_error)
3812  }
3813  CYTHON_FALLTHROUGH;
3814  case 7:
3815  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dstrong_residual)) != 0)) kw_args--;
3816  else {
3817  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian2_strong", 1, 8, 8, 7); __PYX_ERR(0, 2338, __pyx_L3_error)
3818  }
3819  }
3820  if (unlikely(kw_args > 0)) {
3821  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateDiffusionJacobian2_strong") < 0)) __PYX_ERR(0, 2338, __pyx_L3_error)
3822  }
3823  } else if (PyTuple_GET_SIZE(__pyx_args) != 8) {
3824  goto __pyx_L5_argtuple_error;
3825  } else {
3826  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3827  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3828  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3829  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3830  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
3831  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
3832  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
3833  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
3834  }
3835  __pyx_v_l2g = ((PyArrayObject *)values[0]);
3836  __pyx_v_a = ((PyArrayObject *)values[1]);
3837  __pyx_v_da = ((PyArrayObject *)values[2]);
3838  __pyx_v_v = ((PyArrayObject *)values[3]);
3839  __pyx_v_Hess_phi = ((PyArrayObject *)values[4]);
3840  __pyx_v_dphi = ((PyArrayObject *)values[5]);
3841  __pyx_v_Hess_v = ((PyArrayObject *)values[6]);
3842  __pyx_v_dstrong_residual = ((PyArrayObject *)values[7]);
3843  }
3844  goto __pyx_L4_argument_unpacking_done;
3845  __pyx_L5_argtuple_error:;
3846  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian2_strong", 1, 8, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2338, __pyx_L3_error)
3847  __pyx_L3_error:;
3848  __Pyx_AddTraceback("cfemIntegrals.updateDiffusionJacobian2_strong", __pyx_clineno, __pyx_lineno, __pyx_filename);
3849  __Pyx_RefNannyFinishContext();
3850  return NULL;
3851  __pyx_L4_argument_unpacking_done:;
3852  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_l2g), __pyx_ptype_5numpy_ndarray, 1, "l2g", 0))) __PYX_ERR(0, 2338, __pyx_L1_error)
3853  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1, "a", 0))) __PYX_ERR(0, 2339, __pyx_L1_error)
3854  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_da), __pyx_ptype_5numpy_ndarray, 1, "da", 0))) __PYX_ERR(0, 2340, __pyx_L1_error)
3855  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), __pyx_ptype_5numpy_ndarray, 1, "v", 0))) __PYX_ERR(0, 2341, __pyx_L1_error)
3856  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Hess_phi), __pyx_ptype_5numpy_ndarray, 1, "Hess_phi", 0))) __PYX_ERR(0, 2342, __pyx_L1_error)
3857  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dphi), __pyx_ptype_5numpy_ndarray, 1, "dphi", 0))) __PYX_ERR(0, 2343, __pyx_L1_error)
3858  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Hess_v), __pyx_ptype_5numpy_ndarray, 1, "Hess_v", 0))) __PYX_ERR(0, 2344, __pyx_L1_error)
3859  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dstrong_residual), __pyx_ptype_5numpy_ndarray, 1, "dstrong_residual", 0))) __PYX_ERR(0, 2345, __pyx_L1_error)
3860  __pyx_r = __pyx_pf_13cfemIntegrals_6updateDiffusionJacobian2_strong(__pyx_self, __pyx_v_l2g, __pyx_v_a, __pyx_v_da, __pyx_v_v, __pyx_v_Hess_phi, __pyx_v_dphi, __pyx_v_Hess_v, __pyx_v_dstrong_residual);
3861 
3862  /* function exit code */
3863  goto __pyx_L0;
3864  __pyx_L1_error:;
3865  __pyx_r = NULL;
3866  __pyx_L0:;
3867  __Pyx_RefNannyFinishContext();
3868  return __pyx_r;
3869 }
3870 
3871 static PyObject *__pyx_pf_13cfemIntegrals_6updateDiffusionJacobian2_strong(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_da, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_Hess_phi, PyArrayObject *__pyx_v_dphi, PyArrayObject *__pyx_v_Hess_v, PyArrayObject *__pyx_v_dstrong_residual) {
3872  int __pyx_v_nElements_global;
3873  int __pyx_v_nQuadraturePoints_element;
3874  int __pyx_v_nDOF_trial_element;
3875  int __pyx_v_nSpace;
3876  PyObject *__pyx_r = NULL;
3877  __Pyx_RefNannyDeclarations
3878  __Pyx_RefNannySetupContext("updateDiffusionJacobian2_strong", 0);
3879 
3880  /* "cfemIntegrals.pyx":2346
3881  * np.ndarray Hess_v,
3882  * np.ndarray dstrong_residual):
3883  * cdef int nElements_global = Hess_v.shape[0] # <<<<<<<<<<<<<<
3884  * cdef int nQuadraturePoints_element = Hess_v.shape[1]
3885  * cdef int nDOF_trial_element = Hess_v.shape[2]
3886  */
3887  __pyx_v_nElements_global = (__pyx_v_Hess_v->dimensions[0]);
3888 
3889  /* "cfemIntegrals.pyx":2347
3890  * np.ndarray dstrong_residual):
3891  * cdef int nElements_global = Hess_v.shape[0]
3892  * cdef int nQuadraturePoints_element = Hess_v.shape[1] # <<<<<<<<<<<<<<
3893  * cdef int nDOF_trial_element = Hess_v.shape[2]
3894  * cdef int nSpace = Hess_v.shape[3]
3895  */
3896  __pyx_v_nQuadraturePoints_element = (__pyx_v_Hess_v->dimensions[1]);
3897 
3898  /* "cfemIntegrals.pyx":2348
3899  * cdef int nElements_global = Hess_v.shape[0]
3900  * cdef int nQuadraturePoints_element = Hess_v.shape[1]
3901  * cdef int nDOF_trial_element = Hess_v.shape[2] # <<<<<<<<<<<<<<
3902  * cdef int nSpace = Hess_v.shape[3]
3903  * cupdateDiffusionJacobian2_strong(nElements_global,
3904  */
3905  __pyx_v_nDOF_trial_element = (__pyx_v_Hess_v->dimensions[2]);
3906 
3907  /* "cfemIntegrals.pyx":2349
3908  * cdef int nQuadraturePoints_element = Hess_v.shape[1]
3909  * cdef int nDOF_trial_element = Hess_v.shape[2]
3910  * cdef int nSpace = Hess_v.shape[3] # <<<<<<<<<<<<<<
3911  * cupdateDiffusionJacobian2_strong(nElements_global,
3912  * nQuadraturePoints_element,
3913  */
3914  __pyx_v_nSpace = (__pyx_v_Hess_v->dimensions[3]);
3915 
3916  /* "cfemIntegrals.pyx":2350
3917  * cdef int nDOF_trial_element = Hess_v.shape[2]
3918  * cdef int nSpace = Hess_v.shape[3]
3919  * cupdateDiffusionJacobian2_strong(nElements_global, # <<<<<<<<<<<<<<
3920  * nQuadraturePoints_element,
3921  * nDOF_trial_element,
3922  */
3923  updateDiffusionJacobian2_strong(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_trial_element, __pyx_v_nSpace, ((int *)__pyx_v_l2g->data), ((double *)__pyx_v_a->data), ((double *)__pyx_v_da->data), ((double *)__pyx_v_v->data), ((double *)__pyx_v_Hess_phi->data), ((double *)__pyx_v_dphi->data), ((double *)__pyx_v_Hess_v->data), ((double *)__pyx_v_dstrong_residual->data));
3924 
3925  /* "cfemIntegrals.pyx":2338
3926  * <double*> Hess_phi.data,
3927  * <double*> strong_residual.data)
3928  * def updateDiffusionJacobian2_strong(np.ndarray l2g, # <<<<<<<<<<<<<<
3929  * np.ndarray a,
3930  * np.ndarray da,
3931  */
3932 
3933  /* function exit code */
3934  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3935  __Pyx_XGIVEREF(__pyx_r);
3936  __Pyx_RefNannyFinishContext();
3937  return __pyx_r;
3938 }
3939 
3940 /* "cfemIntegrals.pyx":2362
3941  * <double*> Hess_v.data,
3942  * <double*> dstrong_residual.data)
3943  * def updateDiffusionJacobian2_strong_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
3944  * np.ndarray colind,
3945  * np.ndarray l2g,
3946  */
3947 
3948 /* Python wrapper */
3949 static PyObject *__pyx_pw_13cfemIntegrals_9updateDiffusionJacobian2_strong_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
3950 static PyMethodDef __pyx_mdef_13cfemIntegrals_9updateDiffusionJacobian2_strong_sd = {"updateDiffusionJacobian2_strong_sd", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_9updateDiffusionJacobian2_strong_sd, METH_VARARGS|METH_KEYWORDS, 0};
3951 static PyObject *__pyx_pw_13cfemIntegrals_9updateDiffusionJacobian2_strong_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3952  PyArrayObject *__pyx_v_rowptr = 0;
3953  PyArrayObject *__pyx_v_colind = 0;
3954  PyArrayObject *__pyx_v_l2g = 0;
3955  PyArrayObject *__pyx_v_a = 0;
3956  PyArrayObject *__pyx_v_da = 0;
3957  PyArrayObject *__pyx_v_v = 0;
3958  PyArrayObject *__pyx_v_Hess_phi = 0;
3959  PyArrayObject *__pyx_v_dphi = 0;
3960  PyArrayObject *__pyx_v_Hess_v = 0;
3961  PyArrayObject *__pyx_v_dstrong_residual = 0;
3962  int __pyx_lineno = 0;
3963  const char *__pyx_filename = NULL;
3964  int __pyx_clineno = 0;
3965  PyObject *__pyx_r = 0;
3966  __Pyx_RefNannyDeclarations
3967  __Pyx_RefNannySetupContext("updateDiffusionJacobian2_strong_sd (wrapper)", 0);
3968  {
3969  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rowptr,&__pyx_n_s_colind,&__pyx_n_s_l2g,&__pyx_n_s_a,&__pyx_n_s_da,&__pyx_n_s_v,&__pyx_n_s_Hess_phi,&__pyx_n_s_dphi,&__pyx_n_s_Hess_v,&__pyx_n_s_dstrong_residual,0};
3970  PyObject* values[10] = {0,0,0,0,0,0,0,0,0,0};
3971  if (unlikely(__pyx_kwds)) {
3972  Py_ssize_t kw_args;
3973  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
3974  switch (pos_args) {
3975  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
3976  CYTHON_FALLTHROUGH;
3977  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
3978  CYTHON_FALLTHROUGH;
3979  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
3980  CYTHON_FALLTHROUGH;
3981  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
3982  CYTHON_FALLTHROUGH;
3983  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
3984  CYTHON_FALLTHROUGH;
3985  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
3986  CYTHON_FALLTHROUGH;
3987  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3988  CYTHON_FALLTHROUGH;
3989  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3990  CYTHON_FALLTHROUGH;
3991  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3992  CYTHON_FALLTHROUGH;
3993  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3994  CYTHON_FALLTHROUGH;
3995  case 0: break;
3996  default: goto __pyx_L5_argtuple_error;
3997  }
3998  kw_args = PyDict_Size(__pyx_kwds);
3999  switch (pos_args) {
4000  case 0:
4001  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rowptr)) != 0)) kw_args--;
4002  else goto __pyx_L5_argtuple_error;
4003  CYTHON_FALLTHROUGH;
4004  case 1:
4005  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_colind)) != 0)) kw_args--;
4006  else {
4007  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian2_strong_sd", 1, 10, 10, 1); __PYX_ERR(0, 2362, __pyx_L3_error)
4008  }
4009  CYTHON_FALLTHROUGH;
4010  case 2:
4011  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_l2g)) != 0)) kw_args--;
4012  else {
4013  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian2_strong_sd", 1, 10, 10, 2); __PYX_ERR(0, 2362, __pyx_L3_error)
4014  }
4015  CYTHON_FALLTHROUGH;
4016  case 3:
4017  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
4018  else {
4019  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian2_strong_sd", 1, 10, 10, 3); __PYX_ERR(0, 2362, __pyx_L3_error)
4020  }
4021  CYTHON_FALLTHROUGH;
4022  case 4:
4023  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_da)) != 0)) kw_args--;
4024  else {
4025  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian2_strong_sd", 1, 10, 10, 4); __PYX_ERR(0, 2362, __pyx_L3_error)
4026  }
4027  CYTHON_FALLTHROUGH;
4028  case 5:
4029  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
4030  else {
4031  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian2_strong_sd", 1, 10, 10, 5); __PYX_ERR(0, 2362, __pyx_L3_error)
4032  }
4033  CYTHON_FALLTHROUGH;
4034  case 6:
4035  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Hess_phi)) != 0)) kw_args--;
4036  else {
4037  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian2_strong_sd", 1, 10, 10, 6); __PYX_ERR(0, 2362, __pyx_L3_error)
4038  }
4039  CYTHON_FALLTHROUGH;
4040  case 7:
4041  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dphi)) != 0)) kw_args--;
4042  else {
4043  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian2_strong_sd", 1, 10, 10, 7); __PYX_ERR(0, 2362, __pyx_L3_error)
4044  }
4045  CYTHON_FALLTHROUGH;
4046  case 8:
4047  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Hess_v)) != 0)) kw_args--;
4048  else {
4049  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian2_strong_sd", 1, 10, 10, 8); __PYX_ERR(0, 2362, __pyx_L3_error)
4050  }
4051  CYTHON_FALLTHROUGH;
4052  case 9:
4053  if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dstrong_residual)) != 0)) kw_args--;
4054  else {
4055  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian2_strong_sd", 1, 10, 10, 9); __PYX_ERR(0, 2362, __pyx_L3_error)
4056  }
4057  }
4058  if (unlikely(kw_args > 0)) {
4059  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateDiffusionJacobian2_strong_sd") < 0)) __PYX_ERR(0, 2362, __pyx_L3_error)
4060  }
4061  } else if (PyTuple_GET_SIZE(__pyx_args) != 10) {
4062  goto __pyx_L5_argtuple_error;
4063  } else {
4064  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4065  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4066  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4067  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
4068  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
4069  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
4070  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
4071  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
4072  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
4073  values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
4074  }
4075  __pyx_v_rowptr = ((PyArrayObject *)values[0]);
4076  __pyx_v_colind = ((PyArrayObject *)values[1]);
4077  __pyx_v_l2g = ((PyArrayObject *)values[2]);
4078  __pyx_v_a = ((PyArrayObject *)values[3]);
4079  __pyx_v_da = ((PyArrayObject *)values[4]);
4080  __pyx_v_v = ((PyArrayObject *)values[5]);
4081  __pyx_v_Hess_phi = ((PyArrayObject *)values[6]);
4082  __pyx_v_dphi = ((PyArrayObject *)values[7]);
4083  __pyx_v_Hess_v = ((PyArrayObject *)values[8]);
4084  __pyx_v_dstrong_residual = ((PyArrayObject *)values[9]);
4085  }
4086  goto __pyx_L4_argument_unpacking_done;
4087  __pyx_L5_argtuple_error:;
4088  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian2_strong_sd", 1, 10, 10, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2362, __pyx_L3_error)
4089  __pyx_L3_error:;
4090  __Pyx_AddTraceback("cfemIntegrals.updateDiffusionJacobian2_strong_sd", __pyx_clineno, __pyx_lineno, __pyx_filename);
4091  __Pyx_RefNannyFinishContext();
4092  return NULL;
4093  __pyx_L4_argument_unpacking_done:;
4094  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rowptr), __pyx_ptype_5numpy_ndarray, 1, "rowptr", 0))) __PYX_ERR(0, 2362, __pyx_L1_error)
4095  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_colind), __pyx_ptype_5numpy_ndarray, 1, "colind", 0))) __PYX_ERR(0, 2363, __pyx_L1_error)
4096  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_l2g), __pyx_ptype_5numpy_ndarray, 1, "l2g", 0))) __PYX_ERR(0, 2364, __pyx_L1_error)
4097  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1, "a", 0))) __PYX_ERR(0, 2365, __pyx_L1_error)
4098  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_da), __pyx_ptype_5numpy_ndarray, 1, "da", 0))) __PYX_ERR(0, 2366, __pyx_L1_error)
4099  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), __pyx_ptype_5numpy_ndarray, 1, "v", 0))) __PYX_ERR(0, 2367, __pyx_L1_error)
4100  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Hess_phi), __pyx_ptype_5numpy_ndarray, 1, "Hess_phi", 0))) __PYX_ERR(0, 2368, __pyx_L1_error)
4101  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dphi), __pyx_ptype_5numpy_ndarray, 1, "dphi", 0))) __PYX_ERR(0, 2369, __pyx_L1_error)
4102  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Hess_v), __pyx_ptype_5numpy_ndarray, 1, "Hess_v", 0))) __PYX_ERR(0, 2370, __pyx_L1_error)
4103  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dstrong_residual), __pyx_ptype_5numpy_ndarray, 1, "dstrong_residual", 0))) __PYX_ERR(0, 2371, __pyx_L1_error)
4104  __pyx_r = __pyx_pf_13cfemIntegrals_8updateDiffusionJacobian2_strong_sd(__pyx_self, __pyx_v_rowptr, __pyx_v_colind, __pyx_v_l2g, __pyx_v_a, __pyx_v_da, __pyx_v_v, __pyx_v_Hess_phi, __pyx_v_dphi, __pyx_v_Hess_v, __pyx_v_dstrong_residual);
4105 
4106  /* function exit code */
4107  goto __pyx_L0;
4108  __pyx_L1_error:;
4109  __pyx_r = NULL;
4110  __pyx_L0:;
4111  __Pyx_RefNannyFinishContext();
4112  return __pyx_r;
4113 }
4114 
4115 static PyObject *__pyx_pf_13cfemIntegrals_8updateDiffusionJacobian2_strong_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_da, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_Hess_phi, PyArrayObject *__pyx_v_dphi, PyArrayObject *__pyx_v_Hess_v, PyArrayObject *__pyx_v_dstrong_residual) {
4116  int __pyx_v_nElements_global;
4117  int __pyx_v_nQuadraturePoints_element;
4118  int __pyx_v_nDOF_trial_element;
4119  int __pyx_v_nSpace;
4120  PyObject *__pyx_r = NULL;
4121  __Pyx_RefNannyDeclarations
4122  __Pyx_RefNannySetupContext("updateDiffusionJacobian2_strong_sd", 0);
4123 
4124  /* "cfemIntegrals.pyx":2372
4125  * np.ndarray Hess_v,
4126  * np.ndarray dstrong_residual):
4127  * cdef int nElements_global = Hess_v.shape[0] # <<<<<<<<<<<<<<
4128  * cdef int nQuadraturePoints_element = Hess_v.shape[1]
4129  * cdef int nDOF_trial_element = Hess_v.shape[2]
4130  */
4131  __pyx_v_nElements_global = (__pyx_v_Hess_v->dimensions[0]);
4132 
4133  /* "cfemIntegrals.pyx":2373
4134  * np.ndarray dstrong_residual):
4135  * cdef int nElements_global = Hess_v.shape[0]
4136  * cdef int nQuadraturePoints_element = Hess_v.shape[1] # <<<<<<<<<<<<<<
4137  * cdef int nDOF_trial_element = Hess_v.shape[2]
4138  * cdef int nSpace = Hess_v.shape[3]
4139  */
4140  __pyx_v_nQuadraturePoints_element = (__pyx_v_Hess_v->dimensions[1]);
4141 
4142  /* "cfemIntegrals.pyx":2374
4143  * cdef int nElements_global = Hess_v.shape[0]
4144  * cdef int nQuadraturePoints_element = Hess_v.shape[1]
4145  * cdef int nDOF_trial_element = Hess_v.shape[2] # <<<<<<<<<<<<<<
4146  * cdef int nSpace = Hess_v.shape[3]
4147  * cupdateDiffusionJacobian2_strong_sd(nElements_global,
4148  */
4149  __pyx_v_nDOF_trial_element = (__pyx_v_Hess_v->dimensions[2]);
4150 
4151  /* "cfemIntegrals.pyx":2375
4152  * cdef int nQuadraturePoints_element = Hess_v.shape[1]
4153  * cdef int nDOF_trial_element = Hess_v.shape[2]
4154  * cdef int nSpace = Hess_v.shape[3] # <<<<<<<<<<<<<<
4155  * cupdateDiffusionJacobian2_strong_sd(nElements_global,
4156  * nQuadraturePoints_element,
4157  */
4158  __pyx_v_nSpace = (__pyx_v_Hess_v->dimensions[3]);
4159 
4160  /* "cfemIntegrals.pyx":2376
4161  * cdef int nDOF_trial_element = Hess_v.shape[2]
4162  * cdef int nSpace = Hess_v.shape[3]
4163  * cupdateDiffusionJacobian2_strong_sd(nElements_global, # <<<<<<<<<<<<<<
4164  * nQuadraturePoints_element,
4165  * nDOF_trial_element,
4166  */
4167  updateDiffusionJacobian2_strong_sd(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_trial_element, __pyx_v_nSpace, ((int *)__pyx_v_rowptr->data), ((int *)__pyx_v_colind->data), ((int *)__pyx_v_l2g->data), ((double *)__pyx_v_a->data), ((double *)__pyx_v_da->data), ((double *)__pyx_v_v->data), ((double *)__pyx_v_Hess_phi->data), ((double *)__pyx_v_dphi->data), ((double *)__pyx_v_Hess_v->data), ((double *)__pyx_v_dstrong_residual->data));
4168 
4169  /* "cfemIntegrals.pyx":2362
4170  * <double*> Hess_v.data,
4171  * <double*> dstrong_residual.data)
4172  * def updateDiffusionJacobian2_strong_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
4173  * np.ndarray colind,
4174  * np.ndarray l2g,
4175  */
4176 
4177  /* function exit code */
4178  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4179  __Pyx_XGIVEREF(__pyx_r);
4180  __Pyx_RefNannyFinishContext();
4181  return __pyx_r;
4182 }
4183 
4184 /* "cfemIntegrals.pyx":2390
4185  * <double*> Hess_v.data,
4186  * <double*> dstrong_residual.data)
4187  * def updateDiffusion2_adjoint(np.ndarray a, # <<<<<<<<<<<<<<
4188  * np.ndarray Hess_w_dV,
4189  * np.ndarray Lstar_w_dV):
4190  */
4191 
4192 /* Python wrapper */
4193 static PyObject *__pyx_pw_13cfemIntegrals_11updateDiffusion2_adjoint(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
4194 static PyMethodDef __pyx_mdef_13cfemIntegrals_11updateDiffusion2_adjoint = {"updateDiffusion2_adjoint", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_11updateDiffusion2_adjoint, METH_VARARGS|METH_KEYWORDS, 0};
4195 static PyObject *__pyx_pw_13cfemIntegrals_11updateDiffusion2_adjoint(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4196  PyArrayObject *__pyx_v_a = 0;
4197  PyArrayObject *__pyx_v_Hess_w_dV = 0;
4198  PyArrayObject *__pyx_v_Lstar_w_dV = 0;
4199  int __pyx_lineno = 0;
4200  const char *__pyx_filename = NULL;
4201  int __pyx_clineno = 0;
4202  PyObject *__pyx_r = 0;
4203  __Pyx_RefNannyDeclarations
4204  __Pyx_RefNannySetupContext("updateDiffusion2_adjoint (wrapper)", 0);
4205  {
4206  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_a,&__pyx_n_s_Hess_w_dV,&__pyx_n_s_Lstar_w_dV,0};
4207  PyObject* values[3] = {0,0,0};
4208  if (unlikely(__pyx_kwds)) {
4209  Py_ssize_t kw_args;
4210  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
4211  switch (pos_args) {
4212  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4213  CYTHON_FALLTHROUGH;
4214  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4215  CYTHON_FALLTHROUGH;
4216  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4217  CYTHON_FALLTHROUGH;
4218  case 0: break;
4219  default: goto __pyx_L5_argtuple_error;
4220  }
4221  kw_args = PyDict_Size(__pyx_kwds);
4222  switch (pos_args) {
4223  case 0:
4224  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
4225  else goto __pyx_L5_argtuple_error;
4226  CYTHON_FALLTHROUGH;
4227  case 1:
4228  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Hess_w_dV)) != 0)) kw_args--;
4229  else {
4230  __Pyx_RaiseArgtupleInvalid("updateDiffusion2_adjoint", 1, 3, 3, 1); __PYX_ERR(0, 2390, __pyx_L3_error)
4231  }
4232  CYTHON_FALLTHROUGH;
4233  case 2:
4234  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Lstar_w_dV)) != 0)) kw_args--;
4235  else {
4236  __Pyx_RaiseArgtupleInvalid("updateDiffusion2_adjoint", 1, 3, 3, 2); __PYX_ERR(0, 2390, __pyx_L3_error)
4237  }
4238  }
4239  if (unlikely(kw_args > 0)) {
4240  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateDiffusion2_adjoint") < 0)) __PYX_ERR(0, 2390, __pyx_L3_error)
4241  }
4242  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
4243  goto __pyx_L5_argtuple_error;
4244  } else {
4245  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4246  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4247  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4248  }
4249  __pyx_v_a = ((PyArrayObject *)values[0]);
4250  __pyx_v_Hess_w_dV = ((PyArrayObject *)values[1]);
4251  __pyx_v_Lstar_w_dV = ((PyArrayObject *)values[2]);
4252  }
4253  goto __pyx_L4_argument_unpacking_done;
4254  __pyx_L5_argtuple_error:;
4255  __Pyx_RaiseArgtupleInvalid("updateDiffusion2_adjoint", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2390, __pyx_L3_error)
4256  __pyx_L3_error:;
4257  __Pyx_AddTraceback("cfemIntegrals.updateDiffusion2_adjoint", __pyx_clineno, __pyx_lineno, __pyx_filename);
4258  __Pyx_RefNannyFinishContext();
4259  return NULL;
4260  __pyx_L4_argument_unpacking_done:;
4261  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1, "a", 0))) __PYX_ERR(0, 2390, __pyx_L1_error)
4262  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Hess_w_dV), __pyx_ptype_5numpy_ndarray, 1, "Hess_w_dV", 0))) __PYX_ERR(0, 2391, __pyx_L1_error)
4263  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Lstar_w_dV), __pyx_ptype_5numpy_ndarray, 1, "Lstar_w_dV", 0))) __PYX_ERR(0, 2392, __pyx_L1_error)
4264  __pyx_r = __pyx_pf_13cfemIntegrals_10updateDiffusion2_adjoint(__pyx_self, __pyx_v_a, __pyx_v_Hess_w_dV, __pyx_v_Lstar_w_dV);
4265 
4266  /* function exit code */
4267  goto __pyx_L0;
4268  __pyx_L1_error:;
4269  __pyx_r = NULL;
4270  __pyx_L0:;
4271  __Pyx_RefNannyFinishContext();
4272  return __pyx_r;
4273 }
4274 
4275 static PyObject *__pyx_pf_13cfemIntegrals_10updateDiffusion2_adjoint(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_Hess_w_dV, PyArrayObject *__pyx_v_Lstar_w_dV) {
4276  int __pyx_v_nElements_global;
4277  int __pyx_v_nQuadraturePoints_element;
4278  int __pyx_v_nDOF_test_element;
4279  int __pyx_v_nSpace;
4280  PyObject *__pyx_r = NULL;
4281  __Pyx_RefNannyDeclarations
4282  __Pyx_RefNannySetupContext("updateDiffusion2_adjoint", 0);
4283 
4284  /* "cfemIntegrals.pyx":2393
4285  * np.ndarray Hess_w_dV,
4286  * np.ndarray Lstar_w_dV):
4287  * cdef int nElements_global = Hess_w_dV.shape[0] # <<<<<<<<<<<<<<
4288  * cdef int nQuadraturePoints_element = Hess_w_dV.shape[1]
4289  * cdef int nDOF_test_element = Hess_w_dV.shape[2]
4290  */
4291  __pyx_v_nElements_global = (__pyx_v_Hess_w_dV->dimensions[0]);
4292 
4293  /* "cfemIntegrals.pyx":2394
4294  * np.ndarray Lstar_w_dV):
4295  * cdef int nElements_global = Hess_w_dV.shape[0]
4296  * cdef int nQuadraturePoints_element = Hess_w_dV.shape[1] # <<<<<<<<<<<<<<
4297  * cdef int nDOF_test_element = Hess_w_dV.shape[2]
4298  * cdef int nSpace = Hess_w_dV.shape[3]
4299  */
4300  __pyx_v_nQuadraturePoints_element = (__pyx_v_Hess_w_dV->dimensions[1]);
4301 
4302  /* "cfemIntegrals.pyx":2395
4303  * cdef int nElements_global = Hess_w_dV.shape[0]
4304  * cdef int nQuadraturePoints_element = Hess_w_dV.shape[1]
4305  * cdef int nDOF_test_element = Hess_w_dV.shape[2] # <<<<<<<<<<<<<<
4306  * cdef int nSpace = Hess_w_dV.shape[3]
4307  * cupdateDiffusion2_adjoint(nElements_global,
4308  */
4309  __pyx_v_nDOF_test_element = (__pyx_v_Hess_w_dV->dimensions[2]);
4310 
4311  /* "cfemIntegrals.pyx":2396
4312  * cdef int nQuadraturePoints_element = Hess_w_dV.shape[1]
4313  * cdef int nDOF_test_element = Hess_w_dV.shape[2]
4314  * cdef int nSpace = Hess_w_dV.shape[3] # <<<<<<<<<<<<<<
4315  * cupdateDiffusion2_adjoint(nElements_global,
4316  * nQuadraturePoints_element,
4317  */
4318  __pyx_v_nSpace = (__pyx_v_Hess_w_dV->dimensions[3]);
4319 
4320  /* "cfemIntegrals.pyx":2397
4321  * cdef int nDOF_test_element = Hess_w_dV.shape[2]
4322  * cdef int nSpace = Hess_w_dV.shape[3]
4323  * cupdateDiffusion2_adjoint(nElements_global, # <<<<<<<<<<<<<<
4324  * nQuadraturePoints_element,
4325  * nDOF_test_element,
4326  */
4327  updateDiffusion2_adjoint(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_test_element, __pyx_v_nSpace, ((double *)__pyx_v_a->data), ((double *)__pyx_v_Hess_w_dV->data), ((double *)__pyx_v_Lstar_w_dV->data));
4328 
4329  /* "cfemIntegrals.pyx":2390
4330  * <double*> Hess_v.data,
4331  * <double*> dstrong_residual.data)
4332  * def updateDiffusion2_adjoint(np.ndarray a, # <<<<<<<<<<<<<<
4333  * np.ndarray Hess_w_dV,
4334  * np.ndarray Lstar_w_dV):
4335  */
4336 
4337  /* function exit code */
4338  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4339  __Pyx_XGIVEREF(__pyx_r);
4340  __Pyx_RefNannyFinishContext();
4341  return __pyx_r;
4342 }
4343 
4344 /* "cfemIntegrals.pyx":2404
4345  * <double*> Hess_w_dV.data,
4346  * <double*> Lstar_w_dV.data)
4347  * def updateDiffusion2_adjoint_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
4348  * np.ndarray colind,
4349  * np.ndarray a,
4350  */
4351 
4352 /* Python wrapper */
4353 static PyObject *__pyx_pw_13cfemIntegrals_13updateDiffusion2_adjoint_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
4354 static PyMethodDef __pyx_mdef_13cfemIntegrals_13updateDiffusion2_adjoint_sd = {"updateDiffusion2_adjoint_sd", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_13updateDiffusion2_adjoint_sd, METH_VARARGS|METH_KEYWORDS, 0};
4355 static PyObject *__pyx_pw_13cfemIntegrals_13updateDiffusion2_adjoint_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4356  PyArrayObject *__pyx_v_rowptr = 0;
4357  PyArrayObject *__pyx_v_colind = 0;
4358  PyArrayObject *__pyx_v_a = 0;
4359  PyArrayObject *__pyx_v_Hess_w_dV = 0;
4360  PyArrayObject *__pyx_v_Lstar_w_dV = 0;
4361  int __pyx_lineno = 0;
4362  const char *__pyx_filename = NULL;
4363  int __pyx_clineno = 0;
4364  PyObject *__pyx_r = 0;
4365  __Pyx_RefNannyDeclarations
4366  __Pyx_RefNannySetupContext("updateDiffusion2_adjoint_sd (wrapper)", 0);
4367  {
4368  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rowptr,&__pyx_n_s_colind,&__pyx_n_s_a,&__pyx_n_s_Hess_w_dV,&__pyx_n_s_Lstar_w_dV,0};
4369  PyObject* values[5] = {0,0,0,0,0};
4370  if (unlikely(__pyx_kwds)) {
4371  Py_ssize_t kw_args;
4372  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
4373  switch (pos_args) {
4374  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
4375  CYTHON_FALLTHROUGH;
4376  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
4377  CYTHON_FALLTHROUGH;
4378  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4379  CYTHON_FALLTHROUGH;
4380  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4381  CYTHON_FALLTHROUGH;
4382  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4383  CYTHON_FALLTHROUGH;
4384  case 0: break;
4385  default: goto __pyx_L5_argtuple_error;
4386  }
4387  kw_args = PyDict_Size(__pyx_kwds);
4388  switch (pos_args) {
4389  case 0:
4390  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rowptr)) != 0)) kw_args--;
4391  else goto __pyx_L5_argtuple_error;
4392  CYTHON_FALLTHROUGH;
4393  case 1:
4394  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_colind)) != 0)) kw_args--;
4395  else {
4396  __Pyx_RaiseArgtupleInvalid("updateDiffusion2_adjoint_sd", 1, 5, 5, 1); __PYX_ERR(0, 2404, __pyx_L3_error)
4397  }
4398  CYTHON_FALLTHROUGH;
4399  case 2:
4400  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
4401  else {
4402  __Pyx_RaiseArgtupleInvalid("updateDiffusion2_adjoint_sd", 1, 5, 5, 2); __PYX_ERR(0, 2404, __pyx_L3_error)
4403  }
4404  CYTHON_FALLTHROUGH;
4405  case 3:
4406  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Hess_w_dV)) != 0)) kw_args--;
4407  else {
4408  __Pyx_RaiseArgtupleInvalid("updateDiffusion2_adjoint_sd", 1, 5, 5, 3); __PYX_ERR(0, 2404, __pyx_L3_error)
4409  }
4410  CYTHON_FALLTHROUGH;
4411  case 4:
4412  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Lstar_w_dV)) != 0)) kw_args--;
4413  else {
4414  __Pyx_RaiseArgtupleInvalid("updateDiffusion2_adjoint_sd", 1, 5, 5, 4); __PYX_ERR(0, 2404, __pyx_L3_error)
4415  }
4416  }
4417  if (unlikely(kw_args > 0)) {
4418  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateDiffusion2_adjoint_sd") < 0)) __PYX_ERR(0, 2404, __pyx_L3_error)
4419  }
4420  } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
4421  goto __pyx_L5_argtuple_error;
4422  } else {
4423  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4424  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4425  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4426  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
4427  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
4428  }
4429  __pyx_v_rowptr = ((PyArrayObject *)values[0]);
4430  __pyx_v_colind = ((PyArrayObject *)values[1]);
4431  __pyx_v_a = ((PyArrayObject *)values[2]);
4432  __pyx_v_Hess_w_dV = ((PyArrayObject *)values[3]);
4433  __pyx_v_Lstar_w_dV = ((PyArrayObject *)values[4]);
4434  }
4435  goto __pyx_L4_argument_unpacking_done;
4436  __pyx_L5_argtuple_error:;
4437  __Pyx_RaiseArgtupleInvalid("updateDiffusion2_adjoint_sd", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2404, __pyx_L3_error)
4438  __pyx_L3_error:;
4439  __Pyx_AddTraceback("cfemIntegrals.updateDiffusion2_adjoint_sd", __pyx_clineno, __pyx_lineno, __pyx_filename);
4440  __Pyx_RefNannyFinishContext();
4441  return NULL;
4442  __pyx_L4_argument_unpacking_done:;
4443  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rowptr), __pyx_ptype_5numpy_ndarray, 1, "rowptr", 0))) __PYX_ERR(0, 2404, __pyx_L1_error)
4444  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_colind), __pyx_ptype_5numpy_ndarray, 1, "colind", 0))) __PYX_ERR(0, 2405, __pyx_L1_error)
4445  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1, "a", 0))) __PYX_ERR(0, 2406, __pyx_L1_error)
4446  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Hess_w_dV), __pyx_ptype_5numpy_ndarray, 1, "Hess_w_dV", 0))) __PYX_ERR(0, 2407, __pyx_L1_error)
4447  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Lstar_w_dV), __pyx_ptype_5numpy_ndarray, 1, "Lstar_w_dV", 0))) __PYX_ERR(0, 2408, __pyx_L1_error)
4448  __pyx_r = __pyx_pf_13cfemIntegrals_12updateDiffusion2_adjoint_sd(__pyx_self, __pyx_v_rowptr, __pyx_v_colind, __pyx_v_a, __pyx_v_Hess_w_dV, __pyx_v_Lstar_w_dV);
4449 
4450  /* function exit code */
4451  goto __pyx_L0;
4452  __pyx_L1_error:;
4453  __pyx_r = NULL;
4454  __pyx_L0:;
4455  __Pyx_RefNannyFinishContext();
4456  return __pyx_r;
4457 }
4458 
4459 static PyObject *__pyx_pf_13cfemIntegrals_12updateDiffusion2_adjoint_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_Hess_w_dV, PyArrayObject *__pyx_v_Lstar_w_dV) {
4460  int __pyx_v_nElements_global;
4461  int __pyx_v_nQuadraturePoints_element;
4462  int __pyx_v_nDOF_test_element;
4463  int __pyx_v_nSpace;
4464  PyObject *__pyx_r = NULL;
4465  __Pyx_RefNannyDeclarations
4466  __Pyx_RefNannySetupContext("updateDiffusion2_adjoint_sd", 0);
4467 
4468  /* "cfemIntegrals.pyx":2409
4469  * np.ndarray Hess_w_dV,
4470  * np.ndarray Lstar_w_dV):
4471  * cdef int nElements_global = Hess_w_dV.shape[0] # <<<<<<<<<<<<<<
4472  * cdef int nQuadraturePoints_element = Hess_w_dV.shape[1]
4473  * cdef int nDOF_test_element = Hess_w_dV.shape[2]
4474  */
4475  __pyx_v_nElements_global = (__pyx_v_Hess_w_dV->dimensions[0]);
4476 
4477  /* "cfemIntegrals.pyx":2410
4478  * np.ndarray Lstar_w_dV):
4479  * cdef int nElements_global = Hess_w_dV.shape[0]
4480  * cdef int nQuadraturePoints_element = Hess_w_dV.shape[1] # <<<<<<<<<<<<<<
4481  * cdef int nDOF_test_element = Hess_w_dV.shape[2]
4482  * cdef int nSpace = Hess_w_dV.shape[3]
4483  */
4484  __pyx_v_nQuadraturePoints_element = (__pyx_v_Hess_w_dV->dimensions[1]);
4485 
4486  /* "cfemIntegrals.pyx":2411
4487  * cdef int nElements_global = Hess_w_dV.shape[0]
4488  * cdef int nQuadraturePoints_element = Hess_w_dV.shape[1]
4489  * cdef int nDOF_test_element = Hess_w_dV.shape[2] # <<<<<<<<<<<<<<
4490  * cdef int nSpace = Hess_w_dV.shape[3]
4491  * cupdateDiffusion2_adjoint_sd(nElements_global,
4492  */
4493  __pyx_v_nDOF_test_element = (__pyx_v_Hess_w_dV->dimensions[2]);
4494 
4495  /* "cfemIntegrals.pyx":2412
4496  * cdef int nQuadraturePoints_element = Hess_w_dV.shape[1]
4497  * cdef int nDOF_test_element = Hess_w_dV.shape[2]
4498  * cdef int nSpace = Hess_w_dV.shape[3] # <<<<<<<<<<<<<<
4499  * cupdateDiffusion2_adjoint_sd(nElements_global,
4500  * nQuadraturePoints_element,
4501  */
4502  __pyx_v_nSpace = (__pyx_v_Hess_w_dV->dimensions[3]);
4503 
4504  /* "cfemIntegrals.pyx":2413
4505  * cdef int nDOF_test_element = Hess_w_dV.shape[2]
4506  * cdef int nSpace = Hess_w_dV.shape[3]
4507  * cupdateDiffusion2_adjoint_sd(nElements_global, # <<<<<<<<<<<<<<
4508  * nQuadraturePoints_element,
4509  * nDOF_test_element,
4510  */
4511  updateDiffusion2_adjoint_sd(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_test_element, __pyx_v_nSpace, ((int *)__pyx_v_rowptr->data), ((int *)__pyx_v_colind->data), ((double *)__pyx_v_a->data), ((double *)__pyx_v_Hess_w_dV->data), ((double *)__pyx_v_Lstar_w_dV->data));
4512 
4513  /* "cfemIntegrals.pyx":2404
4514  * <double*> Hess_w_dV.data,
4515  * <double*> Lstar_w_dV.data)
4516  * def updateDiffusion2_adjoint_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
4517  * np.ndarray colind,
4518  * np.ndarray a,
4519  */
4520 
4521  /* function exit code */
4522  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4523  __Pyx_XGIVEREF(__pyx_r);
4524  __Pyx_RefNannyFinishContext();
4525  return __pyx_r;
4526 }
4527 
4528 /* "cfemIntegrals.pyx":2422
4529  * <double*> Hess_w_dV.data,
4530  * <double*> Lstar_w_dV.data)
4531  * def calculateWeightedShapeHessians(np.ndarray dVR, # <<<<<<<<<<<<<<
4532  * np.ndarray abs_det_jac,
4533  * np.ndarray Hess_w,
4534  */
4535 
4536 /* Python wrapper */
4537 static PyObject *__pyx_pw_13cfemIntegrals_15calculateWeightedShapeHessians(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
4538 static PyMethodDef __pyx_mdef_13cfemIntegrals_15calculateWeightedShapeHessians = {"calculateWeightedShapeHessians", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_15calculateWeightedShapeHessians, METH_VARARGS|METH_KEYWORDS, 0};
4539 static PyObject *__pyx_pw_13cfemIntegrals_15calculateWeightedShapeHessians(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4540  PyArrayObject *__pyx_v_dVR = 0;
4541  PyArrayObject *__pyx_v_abs_det_jac = 0;
4542  PyArrayObject *__pyx_v_Hess_w = 0;
4543  PyArrayObject *__pyx_v_Hess_w_dV = 0;
4544  int __pyx_lineno = 0;
4545  const char *__pyx_filename = NULL;
4546  int __pyx_clineno = 0;
4547  PyObject *__pyx_r = 0;
4548  __Pyx_RefNannyDeclarations
4549  __Pyx_RefNannySetupContext("calculateWeightedShapeHessians (wrapper)", 0);
4550  {
4551  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dVR,&__pyx_n_s_abs_det_jac,&__pyx_n_s_Hess_w,&__pyx_n_s_Hess_w_dV,0};
4552  PyObject* values[4] = {0,0,0,0};
4553  if (unlikely(__pyx_kwds)) {
4554  Py_ssize_t kw_args;
4555  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
4556  switch (pos_args) {
4557  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
4558  CYTHON_FALLTHROUGH;
4559  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4560  CYTHON_FALLTHROUGH;
4561  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4562  CYTHON_FALLTHROUGH;
4563  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4564  CYTHON_FALLTHROUGH;
4565  case 0: break;
4566  default: goto __pyx_L5_argtuple_error;
4567  }
4568  kw_args = PyDict_Size(__pyx_kwds);
4569  switch (pos_args) {
4570  case 0:
4571  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dVR)) != 0)) kw_args--;
4572  else goto __pyx_L5_argtuple_error;
4573  CYTHON_FALLTHROUGH;
4574  case 1:
4575  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_abs_det_jac)) != 0)) kw_args--;
4576  else {
4577  __Pyx_RaiseArgtupleInvalid("calculateWeightedShapeHessians", 1, 4, 4, 1); __PYX_ERR(0, 2422, __pyx_L3_error)
4578  }
4579  CYTHON_FALLTHROUGH;
4580  case 2:
4581  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Hess_w)) != 0)) kw_args--;
4582  else {
4583  __Pyx_RaiseArgtupleInvalid("calculateWeightedShapeHessians", 1, 4, 4, 2); __PYX_ERR(0, 2422, __pyx_L3_error)
4584  }
4585  CYTHON_FALLTHROUGH;
4586  case 3:
4587  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Hess_w_dV)) != 0)) kw_args--;
4588  else {
4589  __Pyx_RaiseArgtupleInvalid("calculateWeightedShapeHessians", 1, 4, 4, 3); __PYX_ERR(0, 2422, __pyx_L3_error)
4590  }
4591  }
4592  if (unlikely(kw_args > 0)) {
4593  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateWeightedShapeHessians") < 0)) __PYX_ERR(0, 2422, __pyx_L3_error)
4594  }
4595  } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
4596  goto __pyx_L5_argtuple_error;
4597  } else {
4598  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4599  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4600  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4601  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
4602  }
4603  __pyx_v_dVR = ((PyArrayObject *)values[0]);
4604  __pyx_v_abs_det_jac = ((PyArrayObject *)values[1]);
4605  __pyx_v_Hess_w = ((PyArrayObject *)values[2]);
4606  __pyx_v_Hess_w_dV = ((PyArrayObject *)values[3]);
4607  }
4608  goto __pyx_L4_argument_unpacking_done;
4609  __pyx_L5_argtuple_error:;
4610  __Pyx_RaiseArgtupleInvalid("calculateWeightedShapeHessians", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2422, __pyx_L3_error)
4611  __pyx_L3_error:;
4612  __Pyx_AddTraceback("cfemIntegrals.calculateWeightedShapeHessians", __pyx_clineno, __pyx_lineno, __pyx_filename);
4613  __Pyx_RefNannyFinishContext();
4614  return NULL;
4615  __pyx_L4_argument_unpacking_done:;
4616  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dVR), __pyx_ptype_5numpy_ndarray, 1, "dVR", 0))) __PYX_ERR(0, 2422, __pyx_L1_error)
4617  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_abs_det_jac), __pyx_ptype_5numpy_ndarray, 1, "abs_det_jac", 0))) __PYX_ERR(0, 2423, __pyx_L1_error)
4618  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Hess_w), __pyx_ptype_5numpy_ndarray, 1, "Hess_w", 0))) __PYX_ERR(0, 2424, __pyx_L1_error)
4619  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Hess_w_dV), __pyx_ptype_5numpy_ndarray, 1, "Hess_w_dV", 0))) __PYX_ERR(0, 2425, __pyx_L1_error)
4620  __pyx_r = __pyx_pf_13cfemIntegrals_14calculateWeightedShapeHessians(__pyx_self, __pyx_v_dVR, __pyx_v_abs_det_jac, __pyx_v_Hess_w, __pyx_v_Hess_w_dV);
4621 
4622  /* function exit code */
4623  goto __pyx_L0;
4624  __pyx_L1_error:;
4625  __pyx_r = NULL;
4626  __pyx_L0:;
4627  __Pyx_RefNannyFinishContext();
4628  return __pyx_r;
4629 }
4630 
4631 static PyObject *__pyx_pf_13cfemIntegrals_14calculateWeightedShapeHessians(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dVR, PyArrayObject *__pyx_v_abs_det_jac, PyArrayObject *__pyx_v_Hess_w, PyArrayObject *__pyx_v_Hess_w_dV) {
4632  int __pyx_v_nElements_global;
4633  int __pyx_v_nQuadraturePoints_element;
4634  int __pyx_v_nDOF_test_element;
4635  int __pyx_v_nSpace;
4636  PyObject *__pyx_r = NULL;
4637  __Pyx_RefNannyDeclarations
4638  __Pyx_RefNannySetupContext("calculateWeightedShapeHessians", 0);
4639 
4640  /* "cfemIntegrals.pyx":2426
4641  * np.ndarray Hess_w,
4642  * np.ndarray Hess_w_dV):
4643  * cdef int nElements_global = Hess_w_dV.shape[0] # <<<<<<<<<<<<<<
4644  * cdef int nQuadraturePoints_element = Hess_w_dV.shape[1]
4645  * cdef int nDOF_test_element = Hess_w_dV.shape[2]
4646  */
4647  __pyx_v_nElements_global = (__pyx_v_Hess_w_dV->dimensions[0]);
4648 
4649  /* "cfemIntegrals.pyx":2427
4650  * np.ndarray Hess_w_dV):
4651  * cdef int nElements_global = Hess_w_dV.shape[0]
4652  * cdef int nQuadraturePoints_element = Hess_w_dV.shape[1] # <<<<<<<<<<<<<<
4653  * cdef int nDOF_test_element = Hess_w_dV.shape[2]
4654  * cdef int nSpace = Hess_w_dV.shape[3]
4655  */
4656  __pyx_v_nQuadraturePoints_element = (__pyx_v_Hess_w_dV->dimensions[1]);
4657 
4658  /* "cfemIntegrals.pyx":2428
4659  * cdef int nElements_global = Hess_w_dV.shape[0]
4660  * cdef int nQuadraturePoints_element = Hess_w_dV.shape[1]
4661  * cdef int nDOF_test_element = Hess_w_dV.shape[2] # <<<<<<<<<<<<<<
4662  * cdef int nSpace = Hess_w_dV.shape[3]
4663  * ccalculateWeightedShapeHessians(nElements_global,
4664  */
4665  __pyx_v_nDOF_test_element = (__pyx_v_Hess_w_dV->dimensions[2]);
4666 
4667  /* "cfemIntegrals.pyx":2429
4668  * cdef int nQuadraturePoints_element = Hess_w_dV.shape[1]
4669  * cdef int nDOF_test_element = Hess_w_dV.shape[2]
4670  * cdef int nSpace = Hess_w_dV.shape[3] # <<<<<<<<<<<<<<
4671  * ccalculateWeightedShapeHessians(nElements_global,
4672  * nQuadraturePoints_element,
4673  */
4674  __pyx_v_nSpace = (__pyx_v_Hess_w_dV->dimensions[3]);
4675 
4676  /* "cfemIntegrals.pyx":2430
4677  * cdef int nDOF_test_element = Hess_w_dV.shape[2]
4678  * cdef int nSpace = Hess_w_dV.shape[3]
4679  * ccalculateWeightedShapeHessians(nElements_global, # <<<<<<<<<<<<<<
4680  * nQuadraturePoints_element,
4681  * nDOF_test_element,
4682  */
4683  calculateWeightedShapeHessians(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_test_element, __pyx_v_nSpace, ((double *)__pyx_v_dVR->data), ((double *)__pyx_v_abs_det_jac->data), ((double *)__pyx_v_Hess_w->data), ((double *)__pyx_v_Hess_w_dV->data));
4684 
4685  /* "cfemIntegrals.pyx":2422
4686  * <double*> Hess_w_dV.data,
4687  * <double*> Lstar_w_dV.data)
4688  * def calculateWeightedShapeHessians(np.ndarray dVR, # <<<<<<<<<<<<<<
4689  * np.ndarray abs_det_jac,
4690  * np.ndarray Hess_w,
4691  */
4692 
4693  /* function exit code */
4694  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4695  __Pyx_XGIVEREF(__pyx_r);
4696  __Pyx_RefNannyFinishContext();
4697  return __pyx_r;
4698 }
4699 
4700 /* "cfemIntegrals.pyx":2438
4701  * <double*> Hess_w.data,
4702  * <double*> Hess_w_dV.data)
4703  * def calculateFiniteElementFunctionHessianValues(np.ndarray l2g, # <<<<<<<<<<<<<<
4704  * np.ndarray dof,
4705  * np.ndarray Hessian_v,
4706  */
4707 
4708 /* Python wrapper */
4709 static PyObject *__pyx_pw_13cfemIntegrals_17calculateFiniteElementFunctionHessianValues(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
4710 static PyMethodDef __pyx_mdef_13cfemIntegrals_17calculateFiniteElementFunctionHessianValues = {"calculateFiniteElementFunctionHessianValues", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_17calculateFiniteElementFunctionHessianValues, METH_VARARGS|METH_KEYWORDS, 0};
4711 static PyObject *__pyx_pw_13cfemIntegrals_17calculateFiniteElementFunctionHessianValues(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4712  PyArrayObject *__pyx_v_l2g = 0;
4713  PyArrayObject *__pyx_v_dof = 0;
4714  PyArrayObject *__pyx_v_Hessian_v = 0;
4715  PyArrayObject *__pyx_v_Hessian_u = 0;
4716  int __pyx_lineno = 0;
4717  const char *__pyx_filename = NULL;
4718  int __pyx_clineno = 0;
4719  PyObject *__pyx_r = 0;
4720  __Pyx_RefNannyDeclarations
4721  __Pyx_RefNannySetupContext("calculateFiniteElementFunctionHessianValues (wrapper)", 0);
4722  {
4723  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_l2g,&__pyx_n_s_dof,&__pyx_n_s_Hessian_v,&__pyx_n_s_Hessian_u,0};
4724  PyObject* values[4] = {0,0,0,0};
4725  if (unlikely(__pyx_kwds)) {
4726  Py_ssize_t kw_args;
4727  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
4728  switch (pos_args) {
4729  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
4730  CYTHON_FALLTHROUGH;
4731  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4732  CYTHON_FALLTHROUGH;
4733  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4734  CYTHON_FALLTHROUGH;
4735  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4736  CYTHON_FALLTHROUGH;
4737  case 0: break;
4738  default: goto __pyx_L5_argtuple_error;
4739  }
4740  kw_args = PyDict_Size(__pyx_kwds);
4741  switch (pos_args) {
4742  case 0:
4743  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_l2g)) != 0)) kw_args--;
4744  else goto __pyx_L5_argtuple_error;
4745  CYTHON_FALLTHROUGH;
4746  case 1:
4747  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dof)) != 0)) kw_args--;
4748  else {
4749  __Pyx_RaiseArgtupleInvalid("calculateFiniteElementFunctionHessianValues", 1, 4, 4, 1); __PYX_ERR(0, 2438, __pyx_L3_error)
4750  }
4751  CYTHON_FALLTHROUGH;
4752  case 2:
4753  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Hessian_v)) != 0)) kw_args--;
4754  else {
4755  __Pyx_RaiseArgtupleInvalid("calculateFiniteElementFunctionHessianValues", 1, 4, 4, 2); __PYX_ERR(0, 2438, __pyx_L3_error)
4756  }
4757  CYTHON_FALLTHROUGH;
4758  case 3:
4759  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Hessian_u)) != 0)) kw_args--;
4760  else {
4761  __Pyx_RaiseArgtupleInvalid("calculateFiniteElementFunctionHessianValues", 1, 4, 4, 3); __PYX_ERR(0, 2438, __pyx_L3_error)
4762  }
4763  }
4764  if (unlikely(kw_args > 0)) {
4765  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateFiniteElementFunctionHessianValues") < 0)) __PYX_ERR(0, 2438, __pyx_L3_error)
4766  }
4767  } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
4768  goto __pyx_L5_argtuple_error;
4769  } else {
4770  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4771  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4772  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4773  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
4774  }
4775  __pyx_v_l2g = ((PyArrayObject *)values[0]);
4776  __pyx_v_dof = ((PyArrayObject *)values[1]);
4777  __pyx_v_Hessian_v = ((PyArrayObject *)values[2]);
4778  __pyx_v_Hessian_u = ((PyArrayObject *)values[3]);
4779  }
4780  goto __pyx_L4_argument_unpacking_done;
4781  __pyx_L5_argtuple_error:;
4782  __Pyx_RaiseArgtupleInvalid("calculateFiniteElementFunctionHessianValues", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2438, __pyx_L3_error)
4783  __pyx_L3_error:;
4784  __Pyx_AddTraceback("cfemIntegrals.calculateFiniteElementFunctionHessianValues", __pyx_clineno, __pyx_lineno, __pyx_filename);
4785  __Pyx_RefNannyFinishContext();
4786  return NULL;
4787  __pyx_L4_argument_unpacking_done:;
4788  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_l2g), __pyx_ptype_5numpy_ndarray, 1, "l2g", 0))) __PYX_ERR(0, 2438, __pyx_L1_error)
4789  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dof), __pyx_ptype_5numpy_ndarray, 1, "dof", 0))) __PYX_ERR(0, 2439, __pyx_L1_error)
4790  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Hessian_v), __pyx_ptype_5numpy_ndarray, 1, "Hessian_v", 0))) __PYX_ERR(0, 2440, __pyx_L1_error)
4791  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Hessian_u), __pyx_ptype_5numpy_ndarray, 1, "Hessian_u", 0))) __PYX_ERR(0, 2441, __pyx_L1_error)
4792  __pyx_r = __pyx_pf_13cfemIntegrals_16calculateFiniteElementFunctionHessianValues(__pyx_self, __pyx_v_l2g, __pyx_v_dof, __pyx_v_Hessian_v, __pyx_v_Hessian_u);
4793 
4794  /* function exit code */
4795  goto __pyx_L0;
4796  __pyx_L1_error:;
4797  __pyx_r = NULL;
4798  __pyx_L0:;
4799  __Pyx_RefNannyFinishContext();
4800  return __pyx_r;
4801 }
4802 
4803 static PyObject *__pyx_pf_13cfemIntegrals_16calculateFiniteElementFunctionHessianValues(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_dof, PyArrayObject *__pyx_v_Hessian_v, PyArrayObject *__pyx_v_Hessian_u) {
4804  int __pyx_v_nElements_global;
4805  int __pyx_v_nQuadraturePoints_element;
4806  int __pyx_v_nDOF_trial_element;
4807  int __pyx_v_nComponents;
4808  int __pyx_v_nSpace;
4809  int __pyx_v_nd;
4810  PyObject *__pyx_r = NULL;
4811  __Pyx_RefNannyDeclarations
4812  int __pyx_t_1;
4813  int __pyx_t_2;
4814  __Pyx_RefNannySetupContext("calculateFiniteElementFunctionHessianValues", 0);
4815 
4816  /* "cfemIntegrals.pyx":2442
4817  * np.ndarray Hessian_v,
4818  * np.ndarray Hessian_u):
4819  * cdef int nElements_global = Hessian_v.shape[0] # <<<<<<<<<<<<<<
4820  * cdef int nQuadraturePoints_element = Hessian_v.shape[1]
4821  * cdef int nDOF_trial_element = Hessian_v.shape[2]
4822  */
4823  __pyx_v_nElements_global = (__pyx_v_Hessian_v->dimensions[0]);
4824 
4825  /* "cfemIntegrals.pyx":2443
4826  * np.ndarray Hessian_u):
4827  * cdef int nElements_global = Hessian_v.shape[0]
4828  * cdef int nQuadraturePoints_element = Hessian_v.shape[1] # <<<<<<<<<<<<<<
4829  * cdef int nDOF_trial_element = Hessian_v.shape[2]
4830  * cdef int nComponents = 1
4831  */
4832  __pyx_v_nQuadraturePoints_element = (__pyx_v_Hessian_v->dimensions[1]);
4833 
4834  /* "cfemIntegrals.pyx":2444
4835  * cdef int nElements_global = Hessian_v.shape[0]
4836  * cdef int nQuadraturePoints_element = Hessian_v.shape[1]
4837  * cdef int nDOF_trial_element = Hessian_v.shape[2] # <<<<<<<<<<<<<<
4838  * cdef int nComponents = 1
4839  * cdef int nSpace = 1
4840  */
4841  __pyx_v_nDOF_trial_element = (__pyx_v_Hessian_v->dimensions[2]);
4842 
4843  /* "cfemIntegrals.pyx":2445
4844  * cdef int nQuadraturePoints_element = Hessian_v.shape[1]
4845  * cdef int nDOF_trial_element = Hessian_v.shape[2]
4846  * cdef int nComponents = 1 # <<<<<<<<<<<<<<
4847  * cdef int nSpace = 1
4848  * cdef int nd = Hessian_u.ndim
4849  */
4850  __pyx_v_nComponents = 1;
4851 
4852  /* "cfemIntegrals.pyx":2446
4853  * cdef int nDOF_trial_element = Hessian_v.shape[2]
4854  * cdef int nComponents = 1
4855  * cdef int nSpace = 1 # <<<<<<<<<<<<<<
4856  * cdef int nd = Hessian_u.ndim
4857  * if nd == 5:
4858  */
4859  __pyx_v_nSpace = 1;
4860 
4861  /* "cfemIntegrals.pyx":2447
4862  * cdef int nComponents = 1
4863  * cdef int nSpace = 1
4864  * cdef int nd = Hessian_u.ndim # <<<<<<<<<<<<<<
4865  * if nd == 5:
4866  * nComponents = Hessian_u.shape[2]
4867  */
4868  __pyx_t_1 = __pyx_v_Hessian_u->nd;
4869  __pyx_v_nd = __pyx_t_1;
4870 
4871  /* "cfemIntegrals.pyx":2448
4872  * cdef int nSpace = 1
4873  * cdef int nd = Hessian_u.ndim
4874  * if nd == 5: # <<<<<<<<<<<<<<
4875  * nComponents = Hessian_u.shape[2]
4876  * nSpace = Hessian_u.shape[3]
4877  */
4878  __pyx_t_2 = ((__pyx_v_nd == 5) != 0);
4879  if (__pyx_t_2) {
4880 
4881  /* "cfemIntegrals.pyx":2449
4882  * cdef int nd = Hessian_u.ndim
4883  * if nd == 5:
4884  * nComponents = Hessian_u.shape[2] # <<<<<<<<<<<<<<
4885  * nSpace = Hessian_u.shape[3]
4886  * else:
4887  */
4888  __pyx_v_nComponents = (__pyx_v_Hessian_u->dimensions[2]);
4889 
4890  /* "cfemIntegrals.pyx":2450
4891  * if nd == 5:
4892  * nComponents = Hessian_u.shape[2]
4893  * nSpace = Hessian_u.shape[3] # <<<<<<<<<<<<<<
4894  * else:
4895  * nComponents = 1
4896  */
4897  __pyx_v_nSpace = (__pyx_v_Hessian_u->dimensions[3]);
4898 
4899  /* "cfemIntegrals.pyx":2448
4900  * cdef int nSpace = 1
4901  * cdef int nd = Hessian_u.ndim
4902  * if nd == 5: # <<<<<<<<<<<<<<
4903  * nComponents = Hessian_u.shape[2]
4904  * nSpace = Hessian_u.shape[3]
4905  */
4906  goto __pyx_L3;
4907  }
4908 
4909  /* "cfemIntegrals.pyx":2452
4910  * nSpace = Hessian_u.shape[3]
4911  * else:
4912  * nComponents = 1 # <<<<<<<<<<<<<<
4913  * nSpace = Hessian_u.shape[2]
4914  * ccalculateFiniteElementFunctionHessianValues(nElements_global,
4915  */
4916  /*else*/ {
4917  __pyx_v_nComponents = 1;
4918 
4919  /* "cfemIntegrals.pyx":2453
4920  * else:
4921  * nComponents = 1
4922  * nSpace = Hessian_u.shape[2] # <<<<<<<<<<<<<<
4923  * ccalculateFiniteElementFunctionHessianValues(nElements_global,
4924  * nQuadraturePoints_element,
4925  */
4926  __pyx_v_nSpace = (__pyx_v_Hessian_u->dimensions[2]);
4927  }
4928  __pyx_L3:;
4929 
4930  /* "cfemIntegrals.pyx":2454
4931  * nComponents = 1
4932  * nSpace = Hessian_u.shape[2]
4933  * ccalculateFiniteElementFunctionHessianValues(nElements_global, # <<<<<<<<<<<<<<
4934  * nQuadraturePoints_element,
4935  * nDOF_trial_element,
4936  */
4937  calculateFiniteElementFunctionHessianValues(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_trial_element, __pyx_v_nComponents, __pyx_v_nSpace, ((int *)__pyx_v_l2g->data), ((double *)__pyx_v_dof->data), ((double *)__pyx_v_Hessian_v->data), ((double *)__pyx_v_Hessian_u->data));
4938 
4939  /* "cfemIntegrals.pyx":2438
4940  * <double*> Hess_w.data,
4941  * <double*> Hess_w_dV.data)
4942  * def calculateFiniteElementFunctionHessianValues(np.ndarray l2g, # <<<<<<<<<<<<<<
4943  * np.ndarray dof,
4944  * np.ndarray Hessian_v,
4945  */
4946 
4947  /* function exit code */
4948  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4949  __Pyx_XGIVEREF(__pyx_r);
4950  __Pyx_RefNannyFinishContext();
4951  return __pyx_r;
4952 }
4953 
4954 /* "cfemIntegrals.pyx":2463
4955  * <double*> Hessian_v.data,
4956  * <double*> Hessian_u.data)
4957  * def updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_CSR(np.ndarray interiorElementBoundaries, # <<<<<<<<<<<<<<
4958  * np.ndarray elementBoundaryElements,
4959  * np.ndarray elementBoundaryLocalElementBoundaries,
4960  */
4961 
4962 /* Python wrapper */
4963 static PyObject *__pyx_pw_13cfemIntegrals_19updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_CSR(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
4964 static PyMethodDef __pyx_mdef_13cfemIntegrals_19updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_CSR = {"updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_CSR", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_19updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_CSR, METH_VARARGS|METH_KEYWORDS, 0};
4965 static PyObject *__pyx_pw_13cfemIntegrals_19updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_CSR(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4966  PyArrayObject *__pyx_v_interiorElementBoundaries = 0;
4967  PyArrayObject *__pyx_v_elementBoundaryElements = 0;
4968  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries = 0;
4969  PyArrayObject *__pyx_v_nFreeDOF_element_r = 0;
4970  PyArrayObject *__pyx_v_freeLocal_r = 0;
4971  PyArrayObject *__pyx_v_nFreeDOF_element_u = 0;
4972  PyArrayObject *__pyx_v_freeLocal_u = 0;
4973  PyArrayObject *__pyx_v_csrRowIndeces_ru = 0;
4974  PyArrayObject *__pyx_v_csrColumnOffsets_eb_ru = 0;
4975  PyArrayObject *__pyx_v_elementBoundaryFluxJacobian_2sided = 0;
4976  PyArrayObject *__pyx_v_w_dS = 0;
4977  PyObject *__pyx_v_jac = 0;
4978  int __pyx_lineno = 0;
4979  const char *__pyx_filename = NULL;
4980  int __pyx_clineno = 0;
4981  PyObject *__pyx_r = 0;
4982  __Pyx_RefNannyDeclarations
4983  __Pyx_RefNannySetupContext("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_CSR (wrapper)", 0);
4984  {
4985  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_interiorElementBoundaries,&__pyx_n_s_elementBoundaryElements,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_nFreeDOF_element_r,&__pyx_n_s_freeLocal_r,&__pyx_n_s_nFreeDOF_element_u,&__pyx_n_s_freeLocal_u,&__pyx_n_s_csrRowIndeces_ru,&__pyx_n_s_csrColumnOffsets_eb_ru,&__pyx_n_s_elementBoundaryFluxJacobian_2sid,&__pyx_n_s_w_dS,&__pyx_n_s_jac,0};
4986  PyObject* values[12] = {0,0,0,0,0,0,0,0,0,0,0,0};
4987  if (unlikely(__pyx_kwds)) {
4988  Py_ssize_t kw_args;
4989  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
4990  switch (pos_args) {
4991  case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
4992  CYTHON_FALLTHROUGH;
4993  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
4994  CYTHON_FALLTHROUGH;
4995  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
4996  CYTHON_FALLTHROUGH;
4997  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
4998  CYTHON_FALLTHROUGH;
4999  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
5000  CYTHON_FALLTHROUGH;
5001  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
5002  CYTHON_FALLTHROUGH;
5003  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
5004  CYTHON_FALLTHROUGH;
5005  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
5006  CYTHON_FALLTHROUGH;
5007  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
5008  CYTHON_FALLTHROUGH;
5009  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5010  CYTHON_FALLTHROUGH;
5011  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5012  CYTHON_FALLTHROUGH;
5013  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5014  CYTHON_FALLTHROUGH;
5015  case 0: break;
5016  default: goto __pyx_L5_argtuple_error;
5017  }
5018  kw_args = PyDict_Size(__pyx_kwds);
5019  switch (pos_args) {
5020  case 0:
5021  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_interiorElementBoundaries)) != 0)) kw_args--;
5022  else goto __pyx_L5_argtuple_error;
5023  CYTHON_FALLTHROUGH;
5024  case 1:
5025  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElements)) != 0)) kw_args--;
5026  else {
5027  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_CSR", 1, 12, 12, 1); __PYX_ERR(0, 2463, __pyx_L3_error)
5028  }
5029  CYTHON_FALLTHROUGH;
5030  case 2:
5031  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
5032  else {
5033  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_CSR", 1, 12, 12, 2); __PYX_ERR(0, 2463, __pyx_L3_error)
5034  }
5035  CYTHON_FALLTHROUGH;
5036  case 3:
5037  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeDOF_element_r)) != 0)) kw_args--;
5038  else {
5039  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_CSR", 1, 12, 12, 3); __PYX_ERR(0, 2463, __pyx_L3_error)
5040  }
5041  CYTHON_FALLTHROUGH;
5042  case 4:
5043  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeLocal_r)) != 0)) kw_args--;
5044  else {
5045  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_CSR", 1, 12, 12, 4); __PYX_ERR(0, 2463, __pyx_L3_error)
5046  }
5047  CYTHON_FALLTHROUGH;
5048  case 5:
5049  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeDOF_element_u)) != 0)) kw_args--;
5050  else {
5051  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_CSR", 1, 12, 12, 5); __PYX_ERR(0, 2463, __pyx_L3_error)
5052  }
5053  CYTHON_FALLTHROUGH;
5054  case 6:
5055  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeLocal_u)) != 0)) kw_args--;
5056  else {
5057  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_CSR", 1, 12, 12, 6); __PYX_ERR(0, 2463, __pyx_L3_error)
5058  }
5059  CYTHON_FALLTHROUGH;
5060  case 7:
5061  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_csrRowIndeces_ru)) != 0)) kw_args--;
5062  else {
5063  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_CSR", 1, 12, 12, 7); __PYX_ERR(0, 2463, __pyx_L3_error)
5064  }
5065  CYTHON_FALLTHROUGH;
5066  case 8:
5067  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_csrColumnOffsets_eb_ru)) != 0)) kw_args--;
5068  else {
5069  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_CSR", 1, 12, 12, 8); __PYX_ERR(0, 2463, __pyx_L3_error)
5070  }
5071  CYTHON_FALLTHROUGH;
5072  case 9:
5073  if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryFluxJacobian_2sid)) != 0)) kw_args--;
5074  else {
5075  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_CSR", 1, 12, 12, 9); __PYX_ERR(0, 2463, __pyx_L3_error)
5076  }
5077  CYTHON_FALLTHROUGH;
5078  case 10:
5079  if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_w_dS)) != 0)) kw_args--;
5080  else {
5081  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_CSR", 1, 12, 12, 10); __PYX_ERR(0, 2463, __pyx_L3_error)
5082  }
5083  CYTHON_FALLTHROUGH;
5084  case 11:
5085  if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jac)) != 0)) kw_args--;
5086  else {
5087  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_CSR", 1, 12, 12, 11); __PYX_ERR(0, 2463, __pyx_L3_error)
5088  }
5089  }
5090  if (unlikely(kw_args > 0)) {
5091  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_CSR") < 0)) __PYX_ERR(0, 2463, __pyx_L3_error)
5092  }
5093  } else if (PyTuple_GET_SIZE(__pyx_args) != 12) {
5094  goto __pyx_L5_argtuple_error;
5095  } else {
5096  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5097  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5098  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5099  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
5100  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
5101  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
5102  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
5103  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
5104  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
5105  values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
5106  values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
5107  values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
5108  }
5109  __pyx_v_interiorElementBoundaries = ((PyArrayObject *)values[0]);
5110  __pyx_v_elementBoundaryElements = ((PyArrayObject *)values[1]);
5111  __pyx_v_elementBoundaryLocalElementBoundaries = ((PyArrayObject *)values[2]);
5112  __pyx_v_nFreeDOF_element_r = ((PyArrayObject *)values[3]);
5113  __pyx_v_freeLocal_r = ((PyArrayObject *)values[4]);
5114  __pyx_v_nFreeDOF_element_u = ((PyArrayObject *)values[5]);
5115  __pyx_v_freeLocal_u = ((PyArrayObject *)values[6]);
5116  __pyx_v_csrRowIndeces_ru = ((PyArrayObject *)values[7]);
5117  __pyx_v_csrColumnOffsets_eb_ru = ((PyArrayObject *)values[8]);
5118  __pyx_v_elementBoundaryFluxJacobian_2sided = ((PyArrayObject *)values[9]);
5119  __pyx_v_w_dS = ((PyArrayObject *)values[10]);
5120  __pyx_v_jac = values[11];
5121  }
5122  goto __pyx_L4_argument_unpacking_done;
5123  __pyx_L5_argtuple_error:;
5124  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_CSR", 1, 12, 12, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2463, __pyx_L3_error)
5125  __pyx_L3_error:;
5126  __Pyx_AddTraceback("cfemIntegrals.updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_CSR", __pyx_clineno, __pyx_lineno, __pyx_filename);
5127  __Pyx_RefNannyFinishContext();
5128  return NULL;
5129  __pyx_L4_argument_unpacking_done:;
5130  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_interiorElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "interiorElementBoundaries", 0))) __PYX_ERR(0, 2463, __pyx_L1_error)
5131  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElements), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElements", 0))) __PYX_ERR(0, 2464, __pyx_L1_error)
5132  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundaries", 0))) __PYX_ERR(0, 2465, __pyx_L1_error)
5133  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nFreeDOF_element_r), __pyx_ptype_5numpy_ndarray, 1, "nFreeDOF_element_r", 0))) __PYX_ERR(0, 2466, __pyx_L1_error)
5134  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeLocal_r), __pyx_ptype_5numpy_ndarray, 1, "freeLocal_r", 0))) __PYX_ERR(0, 2467, __pyx_L1_error)
5135  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nFreeDOF_element_u), __pyx_ptype_5numpy_ndarray, 1, "nFreeDOF_element_u", 0))) __PYX_ERR(0, 2468, __pyx_L1_error)
5136  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeLocal_u), __pyx_ptype_5numpy_ndarray, 1, "freeLocal_u", 0))) __PYX_ERR(0, 2469, __pyx_L1_error)
5137  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_csrRowIndeces_ru), __pyx_ptype_5numpy_ndarray, 1, "csrRowIndeces_ru", 0))) __PYX_ERR(0, 2470, __pyx_L1_error)
5138  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_csrColumnOffsets_eb_ru), __pyx_ptype_5numpy_ndarray, 1, "csrColumnOffsets_eb_ru", 0))) __PYX_ERR(0, 2471, __pyx_L1_error)
5139  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryFluxJacobian_2sided), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryFluxJacobian_2sided", 0))) __PYX_ERR(0, 2472, __pyx_L1_error)
5140  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w_dS), __pyx_ptype_5numpy_ndarray, 1, "w_dS", 0))) __PYX_ERR(0, 2473, __pyx_L1_error)
5141  __pyx_r = __pyx_pf_13cfemIntegrals_18updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_CSR(__pyx_self, __pyx_v_interiorElementBoundaries, __pyx_v_elementBoundaryElements, __pyx_v_elementBoundaryLocalElementBoundaries, __pyx_v_nFreeDOF_element_r, __pyx_v_freeLocal_r, __pyx_v_nFreeDOF_element_u, __pyx_v_freeLocal_u, __pyx_v_csrRowIndeces_ru, __pyx_v_csrColumnOffsets_eb_ru, __pyx_v_elementBoundaryFluxJacobian_2sided, __pyx_v_w_dS, __pyx_v_jac);
5142 
5143  /* function exit code */
5144  goto __pyx_L0;
5145  __pyx_L1_error:;
5146  __pyx_r = NULL;
5147  __pyx_L0:;
5148  __Pyx_RefNannyFinishContext();
5149  return __pyx_r;
5150 }
5151 
5152 static PyObject *__pyx_pf_13cfemIntegrals_18updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_CSR(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_interiorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_nFreeDOF_element_r, PyArrayObject *__pyx_v_freeLocal_r, PyArrayObject *__pyx_v_nFreeDOF_element_u, PyArrayObject *__pyx_v_freeLocal_u, PyArrayObject *__pyx_v_csrRowIndeces_ru, PyArrayObject *__pyx_v_csrColumnOffsets_eb_ru, PyArrayObject *__pyx_v_elementBoundaryFluxJacobian_2sided, PyArrayObject *__pyx_v_w_dS, PyObject *__pyx_v_jac) {
5153  CYTHON_UNUSED PyArrayObject *__pyx_v_rowptr = 0;
5154  CYTHON_UNUSED PyArrayObject *__pyx_v_colind = 0;
5155  PyArrayObject *__pyx_v_jac_array = 0;
5156  int __pyx_v_nInteriorElementBoundaries_global;
5157  int __pyx_v_nElementBoundaries_element;
5158  int __pyx_v_nQuadraturePoints_elementBoundary;
5159  int __pyx_v_nDOF_test_element;
5160  int __pyx_v_nDOF_trial_element;
5161  PyObject *__pyx_r = NULL;
5162  __Pyx_RefNannyDeclarations
5163  PyObject *__pyx_t_1 = NULL;
5164  PyObject *__pyx_t_2 = NULL;
5165  PyObject *__pyx_t_3 = NULL;
5166  PyObject *__pyx_t_4 = NULL;
5167  PyObject *__pyx_t_5 = NULL;
5168  PyObject *(*__pyx_t_6)(PyObject *);
5169  int __pyx_lineno = 0;
5170  const char *__pyx_filename = NULL;
5171  int __pyx_clineno = 0;
5172  __Pyx_RefNannySetupContext("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_CSR", 0);
5173 
5174  /* "cfemIntegrals.pyx":2476
5175  * jac):
5176  * cdef np.ndarray rowptr, colind, jac_array
5177  * (rowptr,colind,jac_array) = jac.getCSRrepresentation() # <<<<<<<<<<<<<<
5178  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0]
5179  * cdef int nElementBoundaries_element = w_dS.shape[1]
5180  */
5181  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_jac, __pyx_n_s_getCSRrepresentation); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2476, __pyx_L1_error)
5182  __Pyx_GOTREF(__pyx_t_2);
5183  __pyx_t_3 = NULL;
5184  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
5185  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
5186  if (likely(__pyx_t_3)) {
5187  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
5188  __Pyx_INCREF(__pyx_t_3);
5189  __Pyx_INCREF(function);
5190  __Pyx_DECREF_SET(__pyx_t_2, function);
5191  }
5192  }
5193  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
5194  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
5195  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2476, __pyx_L1_error)
5196  __Pyx_GOTREF(__pyx_t_1);
5197  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5198  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
5199  PyObject* sequence = __pyx_t_1;
5200  Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
5201  if (unlikely(size != 3)) {
5202  if (size > 3) __Pyx_RaiseTooManyValuesError(3);
5203  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
5204  __PYX_ERR(0, 2476, __pyx_L1_error)
5205  }
5206  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5207  if (likely(PyTuple_CheckExact(sequence))) {
5208  __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
5209  __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1);
5210  __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2);
5211  } else {
5212  __pyx_t_2 = PyList_GET_ITEM(sequence, 0);
5213  __pyx_t_3 = PyList_GET_ITEM(sequence, 1);
5214  __pyx_t_4 = PyList_GET_ITEM(sequence, 2);
5215  }
5216  __Pyx_INCREF(__pyx_t_2);
5217  __Pyx_INCREF(__pyx_t_3);
5218  __Pyx_INCREF(__pyx_t_4);
5219  #else
5220  __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2476, __pyx_L1_error)
5221  __Pyx_GOTREF(__pyx_t_2);
5222  __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2476, __pyx_L1_error)
5223  __Pyx_GOTREF(__pyx_t_3);
5224  __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2476, __pyx_L1_error)
5225  __Pyx_GOTREF(__pyx_t_4);
5226  #endif
5227  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5228  } else {
5229  Py_ssize_t index = -1;
5230  __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2476, __pyx_L1_error)
5231  __Pyx_GOTREF(__pyx_t_5);
5232  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5233  __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext;
5234  index = 0; __pyx_t_2 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
5235  __Pyx_GOTREF(__pyx_t_2);
5236  index = 1; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
5237  __Pyx_GOTREF(__pyx_t_3);
5238  index = 2; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed;
5239  __Pyx_GOTREF(__pyx_t_4);
5240  if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 3) < 0) __PYX_ERR(0, 2476, __pyx_L1_error)
5241  __pyx_t_6 = NULL;
5242  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5243  goto __pyx_L4_unpacking_done;
5244  __pyx_L3_unpacking_failed:;
5245  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5246  __pyx_t_6 = NULL;
5247  if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
5248  __PYX_ERR(0, 2476, __pyx_L1_error)
5249  __pyx_L4_unpacking_done:;
5250  }
5251  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2476, __pyx_L1_error)
5252  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2476, __pyx_L1_error)
5253  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2476, __pyx_L1_error)
5254  __pyx_v_rowptr = ((PyArrayObject *)__pyx_t_2);
5255  __pyx_t_2 = 0;
5256  __pyx_v_colind = ((PyArrayObject *)__pyx_t_3);
5257  __pyx_t_3 = 0;
5258  __pyx_v_jac_array = ((PyArrayObject *)__pyx_t_4);
5259  __pyx_t_4 = 0;
5260 
5261  /* "cfemIntegrals.pyx":2477
5262  * cdef np.ndarray rowptr, colind, jac_array
5263  * (rowptr,colind,jac_array) = jac.getCSRrepresentation()
5264  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0] # <<<<<<<<<<<<<<
5265  * cdef int nElementBoundaries_element = w_dS.shape[1]
5266  * cdef int nQuadraturePoints_elementBoundary = w_dS.shape[2]
5267  */
5268  __pyx_v_nInteriorElementBoundaries_global = (__pyx_v_interiorElementBoundaries->dimensions[0]);
5269 
5270  /* "cfemIntegrals.pyx":2478
5271  * (rowptr,colind,jac_array) = jac.getCSRrepresentation()
5272  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0]
5273  * cdef int nElementBoundaries_element = w_dS.shape[1] # <<<<<<<<<<<<<<
5274  * cdef int nQuadraturePoints_elementBoundary = w_dS.shape[2]
5275  * cdef int nDOF_test_element = w_dS.shape[3]
5276  */
5277  __pyx_v_nElementBoundaries_element = (__pyx_v_w_dS->dimensions[1]);
5278 
5279  /* "cfemIntegrals.pyx":2479
5280  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0]
5281  * cdef int nElementBoundaries_element = w_dS.shape[1]
5282  * cdef int nQuadraturePoints_elementBoundary = w_dS.shape[2] # <<<<<<<<<<<<<<
5283  * cdef int nDOF_test_element = w_dS.shape[3]
5284  * cdef int nDOF_trial_element = elementBoundaryFluxJacobian_2sided.shape[4]
5285  */
5286  __pyx_v_nQuadraturePoints_elementBoundary = (__pyx_v_w_dS->dimensions[2]);
5287 
5288  /* "cfemIntegrals.pyx":2480
5289  * cdef int nElementBoundaries_element = w_dS.shape[1]
5290  * cdef int nQuadraturePoints_elementBoundary = w_dS.shape[2]
5291  * cdef int nDOF_test_element = w_dS.shape[3] # <<<<<<<<<<<<<<
5292  * cdef int nDOF_trial_element = elementBoundaryFluxJacobian_2sided.shape[4]
5293  * cupdateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_CSR(nInteriorElementBoundaries_global,
5294  */
5295  __pyx_v_nDOF_test_element = (__pyx_v_w_dS->dimensions[3]);
5296 
5297  /* "cfemIntegrals.pyx":2481
5298  * cdef int nQuadraturePoints_elementBoundary = w_dS.shape[2]
5299  * cdef int nDOF_test_element = w_dS.shape[3]
5300  * cdef int nDOF_trial_element = elementBoundaryFluxJacobian_2sided.shape[4] # <<<<<<<<<<<<<<
5301  * cupdateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_CSR(nInteriorElementBoundaries_global,
5302  * nElementBoundaries_element,
5303  */
5304  __pyx_v_nDOF_trial_element = (__pyx_v_elementBoundaryFluxJacobian_2sided->dimensions[4]);
5305 
5306  /* "cfemIntegrals.pyx":2482
5307  * cdef int nDOF_test_element = w_dS.shape[3]
5308  * cdef int nDOF_trial_element = elementBoundaryFluxJacobian_2sided.shape[4]
5309  * cupdateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_CSR(nInteriorElementBoundaries_global, # <<<<<<<<<<<<<<
5310  * nElementBoundaries_element,
5311  * nQuadraturePoints_elementBoundary,
5312  */
5313  updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_CSR(__pyx_v_nInteriorElementBoundaries_global, __pyx_v_nElementBoundaries_element, __pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nDOF_test_element, __pyx_v_nDOF_trial_element, ((int *)__pyx_v_interiorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), ((int *)__pyx_v_nFreeDOF_element_r->data), ((int *)__pyx_v_freeLocal_r->data), ((int *)__pyx_v_nFreeDOF_element_u->data), ((int *)__pyx_v_freeLocal_u->data), ((int *)__pyx_v_csrRowIndeces_ru->data), ((int *)__pyx_v_csrColumnOffsets_eb_ru->data), ((double *)__pyx_v_elementBoundaryFluxJacobian_2sided->data), ((double *)__pyx_v_w_dS->data), ((double *)__pyx_v_jac_array->data));
5314 
5315  /* "cfemIntegrals.pyx":2463
5316  * <double*> Hessian_v.data,
5317  * <double*> Hessian_u.data)
5318  * def updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_CSR(np.ndarray interiorElementBoundaries, # <<<<<<<<<<<<<<
5319  * np.ndarray elementBoundaryElements,
5320  * np.ndarray elementBoundaryLocalElementBoundaries,
5321  */
5322 
5323  /* function exit code */
5324  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5325  goto __pyx_L0;
5326  __pyx_L1_error:;
5327  __Pyx_XDECREF(__pyx_t_1);
5328  __Pyx_XDECREF(__pyx_t_2);
5329  __Pyx_XDECREF(__pyx_t_3);
5330  __Pyx_XDECREF(__pyx_t_4);
5331  __Pyx_XDECREF(__pyx_t_5);
5332  __Pyx_AddTraceback("cfemIntegrals.updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_CSR", __pyx_clineno, __pyx_lineno, __pyx_filename);
5333  __pyx_r = NULL;
5334  __pyx_L0:;
5335  __Pyx_XDECREF((PyObject *)__pyx_v_rowptr);
5336  __Pyx_XDECREF((PyObject *)__pyx_v_colind);
5337  __Pyx_XDECREF((PyObject *)__pyx_v_jac_array);
5338  __Pyx_XGIVEREF(__pyx_r);
5339  __Pyx_RefNannyFinishContext();
5340  return __pyx_r;
5341 }
5342 
5343 /* "cfemIntegrals.pyx":2499
5344  * <double*> w_dS.data,
5345  * <double*> jac_array.data)
5346  * def updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_dense(int offset_r, # <<<<<<<<<<<<<<
5347  * int stride_r,
5348  * int offset_u,
5349  */
5350 
5351 /* Python wrapper */
5352 static PyObject *__pyx_pw_13cfemIntegrals_21updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_dense(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5353 static PyMethodDef __pyx_mdef_13cfemIntegrals_21updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_dense = {"updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_dense", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_21updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_dense, METH_VARARGS|METH_KEYWORDS, 0};
5354 static PyObject *__pyx_pw_13cfemIntegrals_21updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_dense(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5355  int __pyx_v_offset_r;
5356  int __pyx_v_stride_r;
5357  int __pyx_v_offset_u;
5358  int __pyx_v_stride_u;
5359  int __pyx_v_nFreeVDOF_global;
5360  PyArrayObject *__pyx_v_interiorElementBoundaries = 0;
5361  PyArrayObject *__pyx_v_elementBoundaryElements = 0;
5362  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries = 0;
5363  PyArrayObject *__pyx_v_nFreeDOF_element_r = 0;
5364  PyArrayObject *__pyx_v_freeLocal_r = 0;
5365  PyArrayObject *__pyx_v_freeGlobal_r = 0;
5366  PyArrayObject *__pyx_v_nFreeDOF_element_u = 0;
5367  PyArrayObject *__pyx_v_freeLocal_u = 0;
5368  PyArrayObject *__pyx_v_freeGlobal_u = 0;
5369  PyArrayObject *__pyx_v_elementBoundaryFluxJacobian_2sided = 0;
5370  PyArrayObject *__pyx_v_w_dS = 0;
5371  PyArrayObject *__pyx_v_jac = 0;
5372  int __pyx_lineno = 0;
5373  const char *__pyx_filename = NULL;
5374  int __pyx_clineno = 0;
5375  PyObject *__pyx_r = 0;
5376  __Pyx_RefNannyDeclarations
5377  __Pyx_RefNannySetupContext("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_dense (wrapper)", 0);
5378  {
5379  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_offset_r,&__pyx_n_s_stride_r,&__pyx_n_s_offset_u,&__pyx_n_s_stride_u,&__pyx_n_s_nFreeVDOF_global,&__pyx_n_s_interiorElementBoundaries,&__pyx_n_s_elementBoundaryElements,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_nFreeDOF_element_r,&__pyx_n_s_freeLocal_r,&__pyx_n_s_freeGlobal_r,&__pyx_n_s_nFreeDOF_element_u,&__pyx_n_s_freeLocal_u,&__pyx_n_s_freeGlobal_u,&__pyx_n_s_elementBoundaryFluxJacobian_2sid,&__pyx_n_s_w_dS,&__pyx_n_s_jac,0};
5380  PyObject* values[17] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
5381  if (unlikely(__pyx_kwds)) {
5382  Py_ssize_t kw_args;
5383  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5384  switch (pos_args) {
5385  case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
5386  CYTHON_FALLTHROUGH;
5387  case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
5388  CYTHON_FALLTHROUGH;
5389  case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
5390  CYTHON_FALLTHROUGH;
5391  case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
5392  CYTHON_FALLTHROUGH;
5393  case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
5394  CYTHON_FALLTHROUGH;
5395  case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
5396  CYTHON_FALLTHROUGH;
5397  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
5398  CYTHON_FALLTHROUGH;
5399  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
5400  CYTHON_FALLTHROUGH;
5401  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
5402  CYTHON_FALLTHROUGH;
5403  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
5404  CYTHON_FALLTHROUGH;
5405  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
5406  CYTHON_FALLTHROUGH;
5407  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
5408  CYTHON_FALLTHROUGH;
5409  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
5410  CYTHON_FALLTHROUGH;
5411  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
5412  CYTHON_FALLTHROUGH;
5413  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5414  CYTHON_FALLTHROUGH;
5415  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5416  CYTHON_FALLTHROUGH;
5417  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5418  CYTHON_FALLTHROUGH;
5419  case 0: break;
5420  default: goto __pyx_L5_argtuple_error;
5421  }
5422  kw_args = PyDict_Size(__pyx_kwds);
5423  switch (pos_args) {
5424  case 0:
5425  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset_r)) != 0)) kw_args--;
5426  else goto __pyx_L5_argtuple_error;
5427  CYTHON_FALLTHROUGH;
5428  case 1:
5429  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stride_r)) != 0)) kw_args--;
5430  else {
5431  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_dense", 1, 17, 17, 1); __PYX_ERR(0, 2499, __pyx_L3_error)
5432  }
5433  CYTHON_FALLTHROUGH;
5434  case 2:
5435  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset_u)) != 0)) kw_args--;
5436  else {
5437  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_dense", 1, 17, 17, 2); __PYX_ERR(0, 2499, __pyx_L3_error)
5438  }
5439  CYTHON_FALLTHROUGH;
5440  case 3:
5441  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stride_u)) != 0)) kw_args--;
5442  else {
5443  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_dense", 1, 17, 17, 3); __PYX_ERR(0, 2499, __pyx_L3_error)
5444  }
5445  CYTHON_FALLTHROUGH;
5446  case 4:
5447  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeVDOF_global)) != 0)) kw_args--;
5448  else {
5449  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_dense", 1, 17, 17, 4); __PYX_ERR(0, 2499, __pyx_L3_error)
5450  }
5451  CYTHON_FALLTHROUGH;
5452  case 5:
5453  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_interiorElementBoundaries)) != 0)) kw_args--;
5454  else {
5455  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_dense", 1, 17, 17, 5); __PYX_ERR(0, 2499, __pyx_L3_error)
5456  }
5457  CYTHON_FALLTHROUGH;
5458  case 6:
5459  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElements)) != 0)) kw_args--;
5460  else {
5461  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_dense", 1, 17, 17, 6); __PYX_ERR(0, 2499, __pyx_L3_error)
5462  }
5463  CYTHON_FALLTHROUGH;
5464  case 7:
5465  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
5466  else {
5467  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_dense", 1, 17, 17, 7); __PYX_ERR(0, 2499, __pyx_L3_error)
5468  }
5469  CYTHON_FALLTHROUGH;
5470  case 8:
5471  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeDOF_element_r)) != 0)) kw_args--;
5472  else {
5473  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_dense", 1, 17, 17, 8); __PYX_ERR(0, 2499, __pyx_L3_error)
5474  }
5475  CYTHON_FALLTHROUGH;
5476  case 9:
5477  if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeLocal_r)) != 0)) kw_args--;
5478  else {
5479  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_dense", 1, 17, 17, 9); __PYX_ERR(0, 2499, __pyx_L3_error)
5480  }
5481  CYTHON_FALLTHROUGH;
5482  case 10:
5483  if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeGlobal_r)) != 0)) kw_args--;
5484  else {
5485  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_dense", 1, 17, 17, 10); __PYX_ERR(0, 2499, __pyx_L3_error)
5486  }
5487  CYTHON_FALLTHROUGH;
5488  case 11:
5489  if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeDOF_element_u)) != 0)) kw_args--;
5490  else {
5491  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_dense", 1, 17, 17, 11); __PYX_ERR(0, 2499, __pyx_L3_error)
5492  }
5493  CYTHON_FALLTHROUGH;
5494  case 12:
5495  if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeLocal_u)) != 0)) kw_args--;
5496  else {
5497  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_dense", 1, 17, 17, 12); __PYX_ERR(0, 2499, __pyx_L3_error)
5498  }
5499  CYTHON_FALLTHROUGH;
5500  case 13:
5501  if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeGlobal_u)) != 0)) kw_args--;
5502  else {
5503  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_dense", 1, 17, 17, 13); __PYX_ERR(0, 2499, __pyx_L3_error)
5504  }
5505  CYTHON_FALLTHROUGH;
5506  case 14:
5507  if (likely((values[14] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryFluxJacobian_2sid)) != 0)) kw_args--;
5508  else {
5509  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_dense", 1, 17, 17, 14); __PYX_ERR(0, 2499, __pyx_L3_error)
5510  }
5511  CYTHON_FALLTHROUGH;
5512  case 15:
5513  if (likely((values[15] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_w_dS)) != 0)) kw_args--;
5514  else {
5515  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_dense", 1, 17, 17, 15); __PYX_ERR(0, 2499, __pyx_L3_error)
5516  }
5517  CYTHON_FALLTHROUGH;
5518  case 16:
5519  if (likely((values[16] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jac)) != 0)) kw_args--;
5520  else {
5521  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_dense", 1, 17, 17, 16); __PYX_ERR(0, 2499, __pyx_L3_error)
5522  }
5523  }
5524  if (unlikely(kw_args > 0)) {
5525  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_dense") < 0)) __PYX_ERR(0, 2499, __pyx_L3_error)
5526  }
5527  } else if (PyTuple_GET_SIZE(__pyx_args) != 17) {
5528  goto __pyx_L5_argtuple_error;
5529  } else {
5530  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5531  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5532  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5533  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
5534  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
5535  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
5536  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
5537  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
5538  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
5539  values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
5540  values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
5541  values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
5542  values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
5543  values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
5544  values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
5545  values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
5546  values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
5547  }
5548  __pyx_v_offset_r = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_offset_r == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2499, __pyx_L3_error)
5549  __pyx_v_stride_r = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_stride_r == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2500, __pyx_L3_error)
5550  __pyx_v_offset_u = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_offset_u == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2501, __pyx_L3_error)
5551  __pyx_v_stride_u = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_stride_u == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2502, __pyx_L3_error)
5552  __pyx_v_nFreeVDOF_global = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_nFreeVDOF_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2503, __pyx_L3_error)
5553  __pyx_v_interiorElementBoundaries = ((PyArrayObject *)values[5]);
5554  __pyx_v_elementBoundaryElements = ((PyArrayObject *)values[6]);
5555  __pyx_v_elementBoundaryLocalElementBoundaries = ((PyArrayObject *)values[7]);
5556  __pyx_v_nFreeDOF_element_r = ((PyArrayObject *)values[8]);
5557  __pyx_v_freeLocal_r = ((PyArrayObject *)values[9]);
5558  __pyx_v_freeGlobal_r = ((PyArrayObject *)values[10]);
5559  __pyx_v_nFreeDOF_element_u = ((PyArrayObject *)values[11]);
5560  __pyx_v_freeLocal_u = ((PyArrayObject *)values[12]);
5561  __pyx_v_freeGlobal_u = ((PyArrayObject *)values[13]);
5562  __pyx_v_elementBoundaryFluxJacobian_2sided = ((PyArrayObject *)values[14]);
5563  __pyx_v_w_dS = ((PyArrayObject *)values[15]);
5564  __pyx_v_jac = ((PyArrayObject *)values[16]);
5565  }
5566  goto __pyx_L4_argument_unpacking_done;
5567  __pyx_L5_argtuple_error:;
5568  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_dense", 1, 17, 17, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2499, __pyx_L3_error)
5569  __pyx_L3_error:;
5570  __Pyx_AddTraceback("cfemIntegrals.updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_dense", __pyx_clineno, __pyx_lineno, __pyx_filename);
5571  __Pyx_RefNannyFinishContext();
5572  return NULL;
5573  __pyx_L4_argument_unpacking_done:;
5574  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_interiorElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "interiorElementBoundaries", 0))) __PYX_ERR(0, 2504, __pyx_L1_error)
5575  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElements), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElements", 0))) __PYX_ERR(0, 2505, __pyx_L1_error)
5576  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundaries", 0))) __PYX_ERR(0, 2506, __pyx_L1_error)
5577  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nFreeDOF_element_r), __pyx_ptype_5numpy_ndarray, 1, "nFreeDOF_element_r", 0))) __PYX_ERR(0, 2507, __pyx_L1_error)
5578  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeLocal_r), __pyx_ptype_5numpy_ndarray, 1, "freeLocal_r", 0))) __PYX_ERR(0, 2508, __pyx_L1_error)
5579  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeGlobal_r), __pyx_ptype_5numpy_ndarray, 1, "freeGlobal_r", 0))) __PYX_ERR(0, 2509, __pyx_L1_error)
5580  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nFreeDOF_element_u), __pyx_ptype_5numpy_ndarray, 1, "nFreeDOF_element_u", 0))) __PYX_ERR(0, 2510, __pyx_L1_error)
5581  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeLocal_u), __pyx_ptype_5numpy_ndarray, 1, "freeLocal_u", 0))) __PYX_ERR(0, 2511, __pyx_L1_error)
5582  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeGlobal_u), __pyx_ptype_5numpy_ndarray, 1, "freeGlobal_u", 0))) __PYX_ERR(0, 2512, __pyx_L1_error)
5583  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryFluxJacobian_2sided), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryFluxJacobian_2sided", 0))) __PYX_ERR(0, 2513, __pyx_L1_error)
5584  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w_dS), __pyx_ptype_5numpy_ndarray, 1, "w_dS", 0))) __PYX_ERR(0, 2514, __pyx_L1_error)
5585  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_jac), __pyx_ptype_5numpy_ndarray, 1, "jac", 0))) __PYX_ERR(0, 2515, __pyx_L1_error)
5586  __pyx_r = __pyx_pf_13cfemIntegrals_20updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_dense(__pyx_self, __pyx_v_offset_r, __pyx_v_stride_r, __pyx_v_offset_u, __pyx_v_stride_u, __pyx_v_nFreeVDOF_global, __pyx_v_interiorElementBoundaries, __pyx_v_elementBoundaryElements, __pyx_v_elementBoundaryLocalElementBoundaries, __pyx_v_nFreeDOF_element_r, __pyx_v_freeLocal_r, __pyx_v_freeGlobal_r, __pyx_v_nFreeDOF_element_u, __pyx_v_freeLocal_u, __pyx_v_freeGlobal_u, __pyx_v_elementBoundaryFluxJacobian_2sided, __pyx_v_w_dS, __pyx_v_jac);
5587 
5588  /* function exit code */
5589  goto __pyx_L0;
5590  __pyx_L1_error:;
5591  __pyx_r = NULL;
5592  __pyx_L0:;
5593  __Pyx_RefNannyFinishContext();
5594  return __pyx_r;
5595 }
5596 
5597 static PyObject *__pyx_pf_13cfemIntegrals_20updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_dense(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_offset_r, int __pyx_v_stride_r, int __pyx_v_offset_u, int __pyx_v_stride_u, int __pyx_v_nFreeVDOF_global, PyArrayObject *__pyx_v_interiorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_nFreeDOF_element_r, PyArrayObject *__pyx_v_freeLocal_r, PyArrayObject *__pyx_v_freeGlobal_r, PyArrayObject *__pyx_v_nFreeDOF_element_u, PyArrayObject *__pyx_v_freeLocal_u, PyArrayObject *__pyx_v_freeGlobal_u, PyArrayObject *__pyx_v_elementBoundaryFluxJacobian_2sided, PyArrayObject *__pyx_v_w_dS, PyArrayObject *__pyx_v_jac) {
5598  int __pyx_v_nInteriorElementBoundaries_global;
5599  int __pyx_v_nElementBoundaries_element;
5600  int __pyx_v_nQuadraturePoints_elementBoundary;
5601  int __pyx_v_nDOF_test_element;
5602  int __pyx_v_nDOF_trial_element;
5603  PyObject *__pyx_r = NULL;
5604  __Pyx_RefNannyDeclarations
5605  __Pyx_RefNannySetupContext("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_dense", 0);
5606 
5607  /* "cfemIntegrals.pyx":2516
5608  * np.ndarray w_dS,
5609  * np.ndarray jac):
5610  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0] # <<<<<<<<<<<<<<
5611  * cdef int nElementBoundaries_element = w_dS.shape[1]
5612  * cdef int nQuadraturePoints_elementBoundary = w_dS.shape[2]
5613  */
5614  __pyx_v_nInteriorElementBoundaries_global = (__pyx_v_interiorElementBoundaries->dimensions[0]);
5615 
5616  /* "cfemIntegrals.pyx":2517
5617  * np.ndarray jac):
5618  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0]
5619  * cdef int nElementBoundaries_element = w_dS.shape[1] # <<<<<<<<<<<<<<
5620  * cdef int nQuadraturePoints_elementBoundary = w_dS.shape[2]
5621  * cdef int nDOF_test_element = w_dS.shape[3]
5622  */
5623  __pyx_v_nElementBoundaries_element = (__pyx_v_w_dS->dimensions[1]);
5624 
5625  /* "cfemIntegrals.pyx":2518
5626  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0]
5627  * cdef int nElementBoundaries_element = w_dS.shape[1]
5628  * cdef int nQuadraturePoints_elementBoundary = w_dS.shape[2] # <<<<<<<<<<<<<<
5629  * cdef int nDOF_test_element = w_dS.shape[3]
5630  * cdef int nDOF_trial_element = elementBoundaryFluxJacobian_2sided.shape[4]
5631  */
5632  __pyx_v_nQuadraturePoints_elementBoundary = (__pyx_v_w_dS->dimensions[2]);
5633 
5634  /* "cfemIntegrals.pyx":2519
5635  * cdef int nElementBoundaries_element = w_dS.shape[1]
5636  * cdef int nQuadraturePoints_elementBoundary = w_dS.shape[2]
5637  * cdef int nDOF_test_element = w_dS.shape[3] # <<<<<<<<<<<<<<
5638  * cdef int nDOF_trial_element = elementBoundaryFluxJacobian_2sided.shape[4]
5639  * cupdateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_dense(nInteriorElementBoundaries_global,
5640  */
5641  __pyx_v_nDOF_test_element = (__pyx_v_w_dS->dimensions[3]);
5642 
5643  /* "cfemIntegrals.pyx":2520
5644  * cdef int nQuadraturePoints_elementBoundary = w_dS.shape[2]
5645  * cdef int nDOF_test_element = w_dS.shape[3]
5646  * cdef int nDOF_trial_element = elementBoundaryFluxJacobian_2sided.shape[4] # <<<<<<<<<<<<<<
5647  * cupdateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_dense(nInteriorElementBoundaries_global,
5648  * nElementBoundaries_element,
5649  */
5650  __pyx_v_nDOF_trial_element = (__pyx_v_elementBoundaryFluxJacobian_2sided->dimensions[4]);
5651 
5652  /* "cfemIntegrals.pyx":2521
5653  * cdef int nDOF_test_element = w_dS.shape[3]
5654  * cdef int nDOF_trial_element = elementBoundaryFluxJacobian_2sided.shape[4]
5655  * cupdateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_dense(nInteriorElementBoundaries_global, # <<<<<<<<<<<<<<
5656  * nElementBoundaries_element,
5657  * nQuadraturePoints_elementBoundary,
5658  */
5659  updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_dense(__pyx_v_nInteriorElementBoundaries_global, __pyx_v_nElementBoundaries_element, __pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nDOF_test_element, __pyx_v_nDOF_trial_element, __pyx_v_offset_r, __pyx_v_stride_r, __pyx_v_offset_u, __pyx_v_stride_u, __pyx_v_nFreeVDOF_global, ((int *)__pyx_v_interiorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), ((int *)__pyx_v_nFreeDOF_element_r->data), ((int *)__pyx_v_freeLocal_r->data), ((int *)__pyx_v_freeGlobal_r->data), ((int *)__pyx_v_nFreeDOF_element_u->data), ((int *)__pyx_v_freeLocal_u->data), ((int *)__pyx_v_freeGlobal_u->data), ((double *)__pyx_v_elementBoundaryFluxJacobian_2sided->data), ((double *)__pyx_v_w_dS->data), ((double *)__pyx_v_jac->data));
5660 
5661  /* "cfemIntegrals.pyx":2499
5662  * <double*> w_dS.data,
5663  * <double*> jac_array.data)
5664  * def updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_dense(int offset_r, # <<<<<<<<<<<<<<
5665  * int stride_r,
5666  * int offset_u,
5667  */
5668 
5669  /* function exit code */
5670  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5671  __Pyx_XGIVEREF(__pyx_r);
5672  __Pyx_RefNannyFinishContext();
5673  return __pyx_r;
5674 }
5675 
5676 /* "cfemIntegrals.pyx":2543
5677  * <double*> w_dS.data,
5678  * <double*> jac.data)
5679  * def updateInteriorTwoSidedElementBoundaryFlux(np.ndarray interiorElementBoundaries, # <<<<<<<<<<<<<<
5680  * np.ndarray elementBoundaryElements,
5681  * np.ndarray elementBoundaryLocalElementBoundaries,
5682  */
5683 
5684 /* Python wrapper */
5685 static PyObject *__pyx_pw_13cfemIntegrals_23updateInteriorTwoSidedElementBoundaryFlux(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5686 static PyMethodDef __pyx_mdef_13cfemIntegrals_23updateInteriorTwoSidedElementBoundaryFlux = {"updateInteriorTwoSidedElementBoundaryFlux", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_23updateInteriorTwoSidedElementBoundaryFlux, METH_VARARGS|METH_KEYWORDS, 0};
5687 static PyObject *__pyx_pw_13cfemIntegrals_23updateInteriorTwoSidedElementBoundaryFlux(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5688  PyArrayObject *__pyx_v_interiorElementBoundaries = 0;
5689  PyArrayObject *__pyx_v_elementBoundaryElements = 0;
5690  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries = 0;
5691  PyArrayObject *__pyx_v_flux = 0;
5692  PyArrayObject *__pyx_v_w_dS = 0;
5693  PyArrayObject *__pyx_v_residual = 0;
5694  int __pyx_lineno = 0;
5695  const char *__pyx_filename = NULL;
5696  int __pyx_clineno = 0;
5697  PyObject *__pyx_r = 0;
5698  __Pyx_RefNannyDeclarations
5699  __Pyx_RefNannySetupContext("updateInteriorTwoSidedElementBoundaryFlux (wrapper)", 0);
5700  {
5701  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_interiorElementBoundaries,&__pyx_n_s_elementBoundaryElements,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_flux,&__pyx_n_s_w_dS,&__pyx_n_s_residual,0};
5702  PyObject* values[6] = {0,0,0,0,0,0};
5703  if (unlikely(__pyx_kwds)) {
5704  Py_ssize_t kw_args;
5705  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5706  switch (pos_args) {
5707  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
5708  CYTHON_FALLTHROUGH;
5709  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
5710  CYTHON_FALLTHROUGH;
5711  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
5712  CYTHON_FALLTHROUGH;
5713  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5714  CYTHON_FALLTHROUGH;
5715  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5716  CYTHON_FALLTHROUGH;
5717  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5718  CYTHON_FALLTHROUGH;
5719  case 0: break;
5720  default: goto __pyx_L5_argtuple_error;
5721  }
5722  kw_args = PyDict_Size(__pyx_kwds);
5723  switch (pos_args) {
5724  case 0:
5725  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_interiorElementBoundaries)) != 0)) kw_args--;
5726  else goto __pyx_L5_argtuple_error;
5727  CYTHON_FALLTHROUGH;
5728  case 1:
5729  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElements)) != 0)) kw_args--;
5730  else {
5731  __Pyx_RaiseArgtupleInvalid("updateInteriorTwoSidedElementBoundaryFlux", 1, 6, 6, 1); __PYX_ERR(0, 2543, __pyx_L3_error)
5732  }
5733  CYTHON_FALLTHROUGH;
5734  case 2:
5735  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
5736  else {
5737  __Pyx_RaiseArgtupleInvalid("updateInteriorTwoSidedElementBoundaryFlux", 1, 6, 6, 2); __PYX_ERR(0, 2543, __pyx_L3_error)
5738  }
5739  CYTHON_FALLTHROUGH;
5740  case 3:
5741  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flux)) != 0)) kw_args--;
5742  else {
5743  __Pyx_RaiseArgtupleInvalid("updateInteriorTwoSidedElementBoundaryFlux", 1, 6, 6, 3); __PYX_ERR(0, 2543, __pyx_L3_error)
5744  }
5745  CYTHON_FALLTHROUGH;
5746  case 4:
5747  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_w_dS)) != 0)) kw_args--;
5748  else {
5749  __Pyx_RaiseArgtupleInvalid("updateInteriorTwoSidedElementBoundaryFlux", 1, 6, 6, 4); __PYX_ERR(0, 2543, __pyx_L3_error)
5750  }
5751  CYTHON_FALLTHROUGH;
5752  case 5:
5753  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_residual)) != 0)) kw_args--;
5754  else {
5755  __Pyx_RaiseArgtupleInvalid("updateInteriorTwoSidedElementBoundaryFlux", 1, 6, 6, 5); __PYX_ERR(0, 2543, __pyx_L3_error)
5756  }
5757  }
5758  if (unlikely(kw_args > 0)) {
5759  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateInteriorTwoSidedElementBoundaryFlux") < 0)) __PYX_ERR(0, 2543, __pyx_L3_error)
5760  }
5761  } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
5762  goto __pyx_L5_argtuple_error;
5763  } else {
5764  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5765  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5766  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5767  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
5768  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
5769  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
5770  }
5771  __pyx_v_interiorElementBoundaries = ((PyArrayObject *)values[0]);
5772  __pyx_v_elementBoundaryElements = ((PyArrayObject *)values[1]);
5773  __pyx_v_elementBoundaryLocalElementBoundaries = ((PyArrayObject *)values[2]);
5774  __pyx_v_flux = ((PyArrayObject *)values[3]);
5775  __pyx_v_w_dS = ((PyArrayObject *)values[4]);
5776  __pyx_v_residual = ((PyArrayObject *)values[5]);
5777  }
5778  goto __pyx_L4_argument_unpacking_done;
5779  __pyx_L5_argtuple_error:;
5780  __Pyx_RaiseArgtupleInvalid("updateInteriorTwoSidedElementBoundaryFlux", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2543, __pyx_L3_error)
5781  __pyx_L3_error:;
5782  __Pyx_AddTraceback("cfemIntegrals.updateInteriorTwoSidedElementBoundaryFlux", __pyx_clineno, __pyx_lineno, __pyx_filename);
5783  __Pyx_RefNannyFinishContext();
5784  return NULL;
5785  __pyx_L4_argument_unpacking_done:;
5786  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_interiorElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "interiorElementBoundaries", 0))) __PYX_ERR(0, 2543, __pyx_L1_error)
5787  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElements), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElements", 0))) __PYX_ERR(0, 2544, __pyx_L1_error)
5788  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundaries", 0))) __PYX_ERR(0, 2545, __pyx_L1_error)
5789  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_flux), __pyx_ptype_5numpy_ndarray, 1, "flux", 0))) __PYX_ERR(0, 2546, __pyx_L1_error)
5790  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w_dS), __pyx_ptype_5numpy_ndarray, 1, "w_dS", 0))) __PYX_ERR(0, 2547, __pyx_L1_error)
5791  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_residual), __pyx_ptype_5numpy_ndarray, 1, "residual", 0))) __PYX_ERR(0, 2548, __pyx_L1_error)
5792  __pyx_r = __pyx_pf_13cfemIntegrals_22updateInteriorTwoSidedElementBoundaryFlux(__pyx_self, __pyx_v_interiorElementBoundaries, __pyx_v_elementBoundaryElements, __pyx_v_elementBoundaryLocalElementBoundaries, __pyx_v_flux, __pyx_v_w_dS, __pyx_v_residual);
5793 
5794  /* function exit code */
5795  goto __pyx_L0;
5796  __pyx_L1_error:;
5797  __pyx_r = NULL;
5798  __pyx_L0:;
5799  __Pyx_RefNannyFinishContext();
5800  return __pyx_r;
5801 }
5802 
5803 static PyObject *__pyx_pf_13cfemIntegrals_22updateInteriorTwoSidedElementBoundaryFlux(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_interiorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_flux, PyArrayObject *__pyx_v_w_dS, PyArrayObject *__pyx_v_residual) {
5804  int __pyx_v_nInteriorElementBoundaries_global;
5805  int __pyx_v_nElementBoundaries_element;
5806  int __pyx_v_nQuadraturePoints_elementBoundary;
5807  int __pyx_v_nDOF_test_element;
5808  PyObject *__pyx_r = NULL;
5809  __Pyx_RefNannyDeclarations
5810  __Pyx_RefNannySetupContext("updateInteriorTwoSidedElementBoundaryFlux", 0);
5811 
5812  /* "cfemIntegrals.pyx":2549
5813  * np.ndarray w_dS,
5814  * np.ndarray residual):
5815  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0] # <<<<<<<<<<<<<<
5816  * cdef int nElementBoundaries_element = w_dS.shape[1]
5817  * cdef int nQuadraturePoints_elementBoundary = w_dS.shape[2]
5818  */
5819  __pyx_v_nInteriorElementBoundaries_global = (__pyx_v_interiorElementBoundaries->dimensions[0]);
5820 
5821  /* "cfemIntegrals.pyx":2550
5822  * np.ndarray residual):
5823  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0]
5824  * cdef int nElementBoundaries_element = w_dS.shape[1] # <<<<<<<<<<<<<<
5825  * cdef int nQuadraturePoints_elementBoundary = w_dS.shape[2]
5826  * cdef int nDOF_test_element = w_dS.shape[3]
5827  */
5828  __pyx_v_nElementBoundaries_element = (__pyx_v_w_dS->dimensions[1]);
5829 
5830  /* "cfemIntegrals.pyx":2551
5831  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0]
5832  * cdef int nElementBoundaries_element = w_dS.shape[1]
5833  * cdef int nQuadraturePoints_elementBoundary = w_dS.shape[2] # <<<<<<<<<<<<<<
5834  * cdef int nDOF_test_element = w_dS.shape[3]
5835  * cupdateInteriorTwoSidedElementBoundaryFlux(nInteriorElementBoundaries_global,
5836  */
5837  __pyx_v_nQuadraturePoints_elementBoundary = (__pyx_v_w_dS->dimensions[2]);
5838 
5839  /* "cfemIntegrals.pyx":2552
5840  * cdef int nElementBoundaries_element = w_dS.shape[1]
5841  * cdef int nQuadraturePoints_elementBoundary = w_dS.shape[2]
5842  * cdef int nDOF_test_element = w_dS.shape[3] # <<<<<<<<<<<<<<
5843  * cupdateInteriorTwoSidedElementBoundaryFlux(nInteriorElementBoundaries_global,
5844  * nElementBoundaries_element,
5845  */
5846  __pyx_v_nDOF_test_element = (__pyx_v_w_dS->dimensions[3]);
5847 
5848  /* "cfemIntegrals.pyx":2553
5849  * cdef int nQuadraturePoints_elementBoundary = w_dS.shape[2]
5850  * cdef int nDOF_test_element = w_dS.shape[3]
5851  * cupdateInteriorTwoSidedElementBoundaryFlux(nInteriorElementBoundaries_global, # <<<<<<<<<<<<<<
5852  * nElementBoundaries_element,
5853  * nQuadraturePoints_elementBoundary,
5854  */
5855  updateInteriorTwoSidedElementBoundaryFlux(__pyx_v_nInteriorElementBoundaries_global, __pyx_v_nElementBoundaries_element, __pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nDOF_test_element, ((int *)__pyx_v_interiorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), ((double *)__pyx_v_flux->data), ((double *)__pyx_v_w_dS->data), ((double *)__pyx_v_residual->data));
5856 
5857  /* "cfemIntegrals.pyx":2543
5858  * <double*> w_dS.data,
5859  * <double*> jac.data)
5860  * def updateInteriorTwoSidedElementBoundaryFlux(np.ndarray interiorElementBoundaries, # <<<<<<<<<<<<<<
5861  * np.ndarray elementBoundaryElements,
5862  * np.ndarray elementBoundaryLocalElementBoundaries,
5863  */
5864 
5865  /* function exit code */
5866  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5867  __Pyx_XGIVEREF(__pyx_r);
5868  __Pyx_RefNannyFinishContext();
5869  return __pyx_r;
5870 }
5871 
5872 /* "cfemIntegrals.pyx":2563
5873  * <double*> w_dS.data,
5874  * <double*> residual.data)
5875  * def calculateCFLADR2speeds(np.ndarray elementDiameter, # <<<<<<<<<<<<<<
5876  * np.ndarray dm,
5877  * np.ndarray df1,
5878  */
5879 
5880 /* Python wrapper */
5881 static PyObject *__pyx_pw_13cfemIntegrals_25calculateCFLADR2speeds(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5882 static PyMethodDef __pyx_mdef_13cfemIntegrals_25calculateCFLADR2speeds = {"calculateCFLADR2speeds", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_25calculateCFLADR2speeds, METH_VARARGS|METH_KEYWORDS, 0};
5883 static PyObject *__pyx_pw_13cfemIntegrals_25calculateCFLADR2speeds(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5884  PyArrayObject *__pyx_v_elementDiameter = 0;
5885  PyArrayObject *__pyx_v_dm = 0;
5886  PyArrayObject *__pyx_v_df1 = 0;
5887  PyArrayObject *__pyx_v_df2 = 0;
5888  PyArrayObject *__pyx_v_cfl = 0;
5889  int __pyx_lineno = 0;
5890  const char *__pyx_filename = NULL;
5891  int __pyx_clineno = 0;
5892  PyObject *__pyx_r = 0;
5893  __Pyx_RefNannyDeclarations
5894  __Pyx_RefNannySetupContext("calculateCFLADR2speeds (wrapper)", 0);
5895  {
5896  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_elementDiameter,&__pyx_n_s_dm,&__pyx_n_s_df1,&__pyx_n_s_df2,&__pyx_n_s_cfl,0};
5897  PyObject* values[5] = {0,0,0,0,0};
5898  if (unlikely(__pyx_kwds)) {
5899  Py_ssize_t kw_args;
5900  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5901  switch (pos_args) {
5902  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
5903  CYTHON_FALLTHROUGH;
5904  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
5905  CYTHON_FALLTHROUGH;
5906  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5907  CYTHON_FALLTHROUGH;
5908  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5909  CYTHON_FALLTHROUGH;
5910  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5911  CYTHON_FALLTHROUGH;
5912  case 0: break;
5913  default: goto __pyx_L5_argtuple_error;
5914  }
5915  kw_args = PyDict_Size(__pyx_kwds);
5916  switch (pos_args) {
5917  case 0:
5918  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementDiameter)) != 0)) kw_args--;
5919  else goto __pyx_L5_argtuple_error;
5920  CYTHON_FALLTHROUGH;
5921  case 1:
5922  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dm)) != 0)) kw_args--;
5923  else {
5924  __Pyx_RaiseArgtupleInvalid("calculateCFLADR2speeds", 1, 5, 5, 1); __PYX_ERR(0, 2563, __pyx_L3_error)
5925  }
5926  CYTHON_FALLTHROUGH;
5927  case 2:
5928  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_df1)) != 0)) kw_args--;
5929  else {
5930  __Pyx_RaiseArgtupleInvalid("calculateCFLADR2speeds", 1, 5, 5, 2); __PYX_ERR(0, 2563, __pyx_L3_error)
5931  }
5932  CYTHON_FALLTHROUGH;
5933  case 3:
5934  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_df2)) != 0)) kw_args--;
5935  else {
5936  __Pyx_RaiseArgtupleInvalid("calculateCFLADR2speeds", 1, 5, 5, 3); __PYX_ERR(0, 2563, __pyx_L3_error)
5937  }
5938  CYTHON_FALLTHROUGH;
5939  case 4:
5940  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cfl)) != 0)) kw_args--;
5941  else {
5942  __Pyx_RaiseArgtupleInvalid("calculateCFLADR2speeds", 1, 5, 5, 4); __PYX_ERR(0, 2563, __pyx_L3_error)
5943  }
5944  }
5945  if (unlikely(kw_args > 0)) {
5946  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateCFLADR2speeds") < 0)) __PYX_ERR(0, 2563, __pyx_L3_error)
5947  }
5948  } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
5949  goto __pyx_L5_argtuple_error;
5950  } else {
5951  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5952  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5953  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5954  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
5955  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
5956  }
5957  __pyx_v_elementDiameter = ((PyArrayObject *)values[0]);
5958  __pyx_v_dm = ((PyArrayObject *)values[1]);
5959  __pyx_v_df1 = ((PyArrayObject *)values[2]);
5960  __pyx_v_df2 = ((PyArrayObject *)values[3]);
5961  __pyx_v_cfl = ((PyArrayObject *)values[4]);
5962  }
5963  goto __pyx_L4_argument_unpacking_done;
5964  __pyx_L5_argtuple_error:;
5965  __Pyx_RaiseArgtupleInvalid("calculateCFLADR2speeds", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2563, __pyx_L3_error)
5966  __pyx_L3_error:;
5967  __Pyx_AddTraceback("cfemIntegrals.calculateCFLADR2speeds", __pyx_clineno, __pyx_lineno, __pyx_filename);
5968  __Pyx_RefNannyFinishContext();
5969  return NULL;
5970  __pyx_L4_argument_unpacking_done:;
5971  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementDiameter), __pyx_ptype_5numpy_ndarray, 1, "elementDiameter", 0))) __PYX_ERR(0, 2563, __pyx_L1_error)
5972  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dm), __pyx_ptype_5numpy_ndarray, 1, "dm", 0))) __PYX_ERR(0, 2564, __pyx_L1_error)
5973  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_df1), __pyx_ptype_5numpy_ndarray, 1, "df1", 0))) __PYX_ERR(0, 2565, __pyx_L1_error)
5974  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_df2), __pyx_ptype_5numpy_ndarray, 1, "df2", 0))) __PYX_ERR(0, 2566, __pyx_L1_error)
5975  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cfl), __pyx_ptype_5numpy_ndarray, 1, "cfl", 0))) __PYX_ERR(0, 2567, __pyx_L1_error)
5976  __pyx_r = __pyx_pf_13cfemIntegrals_24calculateCFLADR2speeds(__pyx_self, __pyx_v_elementDiameter, __pyx_v_dm, __pyx_v_df1, __pyx_v_df2, __pyx_v_cfl);
5977 
5978  /* function exit code */
5979  goto __pyx_L0;
5980  __pyx_L1_error:;
5981  __pyx_r = NULL;
5982  __pyx_L0:;
5983  __Pyx_RefNannyFinishContext();
5984  return __pyx_r;
5985 }
5986 
5987 static PyObject *__pyx_pf_13cfemIntegrals_24calculateCFLADR2speeds(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_dm, PyArrayObject *__pyx_v_df1, PyArrayObject *__pyx_v_df2, PyArrayObject *__pyx_v_cfl) {
5988  int __pyx_v_nElements_global;
5989  int __pyx_v_nQuadraturePoints_element;
5990  int __pyx_v_nSpace;
5991  PyObject *__pyx_r = NULL;
5992  __Pyx_RefNannyDeclarations
5993  __Pyx_RefNannySetupContext("calculateCFLADR2speeds", 0);
5994 
5995  /* "cfemIntegrals.pyx":2568
5996  * np.ndarray df2,
5997  * np.ndarray cfl):
5998  * cdef int nElements_global = df1.shape[0] # <<<<<<<<<<<<<<
5999  * cdef int nQuadraturePoints_element = df1.shape[1]
6000  * cdef int nSpace = df1.shape[2]
6001  */
6002  __pyx_v_nElements_global = (__pyx_v_df1->dimensions[0]);
6003 
6004  /* "cfemIntegrals.pyx":2569
6005  * np.ndarray cfl):
6006  * cdef int nElements_global = df1.shape[0]
6007  * cdef int nQuadraturePoints_element = df1.shape[1] # <<<<<<<<<<<<<<
6008  * cdef int nSpace = df1.shape[2]
6009  * ccalculateCFLADR2speeds(nElements_global,
6010  */
6011  __pyx_v_nQuadraturePoints_element = (__pyx_v_df1->dimensions[1]);
6012 
6013  /* "cfemIntegrals.pyx":2570
6014  * cdef int nElements_global = df1.shape[0]
6015  * cdef int nQuadraturePoints_element = df1.shape[1]
6016  * cdef int nSpace = df1.shape[2] # <<<<<<<<<<<<<<
6017  * ccalculateCFLADR2speeds(nElements_global,
6018  * nQuadraturePoints_element,
6019  */
6020  __pyx_v_nSpace = (__pyx_v_df1->dimensions[2]);
6021 
6022  /* "cfemIntegrals.pyx":2571
6023  * cdef int nQuadraturePoints_element = df1.shape[1]
6024  * cdef int nSpace = df1.shape[2]
6025  * ccalculateCFLADR2speeds(nElements_global, # <<<<<<<<<<<<<<
6026  * nQuadraturePoints_element,
6027  * nSpace,
6028  */
6029  calculateCFLADR2speeds(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nSpace, ((double *)__pyx_v_elementDiameter->data), ((double *)__pyx_v_dm->data), ((double *)__pyx_v_df1->data), ((double *)__pyx_v_df2->data), ((double *)__pyx_v_cfl->data));
6030 
6031  /* "cfemIntegrals.pyx":2563
6032  * <double*> w_dS.data,
6033  * <double*> residual.data)
6034  * def calculateCFLADR2speeds(np.ndarray elementDiameter, # <<<<<<<<<<<<<<
6035  * np.ndarray dm,
6036  * np.ndarray df1,
6037  */
6038 
6039  /* function exit code */
6040  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6041  __Pyx_XGIVEREF(__pyx_r);
6042  __Pyx_RefNannyFinishContext();
6043  return __pyx_r;
6044 }
6045 
6046 /* "cfemIntegrals.pyx":2579
6047  * <double*> df2.data,
6048  * <double*> cfl.data)
6049  * def checkElementBoundaryAndExteriorElementBoundaryArraysSame(double tolerance, # <<<<<<<<<<<<<<
6050  * np.ndarray exteriorElementBoundariesArray,
6051  * np.ndarray elementBoundaryElementsArray,
6052  */
6053 
6054 /* Python wrapper */
6055 static PyObject *__pyx_pw_13cfemIntegrals_27checkElementBoundaryAndExteriorElementBoundaryArraysSame(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
6056 static PyMethodDef __pyx_mdef_13cfemIntegrals_27checkElementBoundaryAndExteriorElementBoundaryArraysSame = {"checkElementBoundaryAndExteriorElementBoundaryArraysSame", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_27checkElementBoundaryAndExteriorElementBoundaryArraysSame, METH_VARARGS|METH_KEYWORDS, 0};
6057 static PyObject *__pyx_pw_13cfemIntegrals_27checkElementBoundaryAndExteriorElementBoundaryArraysSame(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6058  double __pyx_v_tolerance;
6059  PyArrayObject *__pyx_v_exteriorElementBoundariesArray = 0;
6060  PyArrayObject *__pyx_v_elementBoundaryElementsArray = 0;
6061  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray = 0;
6062  PyArrayObject *__pyx_v_ebq_val = 0;
6063  PyArrayObject *__pyx_v_ebqe_val = 0;
6064  PyArrayObject *__pyx_v_firstBadIndex = 0;
6065  int __pyx_lineno = 0;
6066  const char *__pyx_filename = NULL;
6067  int __pyx_clineno = 0;
6068  PyObject *__pyx_r = 0;
6069  __Pyx_RefNannyDeclarations
6070  __Pyx_RefNannySetupContext("checkElementBoundaryAndExteriorElementBoundaryArraysSame (wrapper)", 0);
6071  {
6072  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tolerance,&__pyx_n_s_exteriorElementBoundariesArray,&__pyx_n_s_elementBoundaryElementsArray,&__pyx_n_s_elementBoundaryLocalElementBound_2,&__pyx_n_s_ebq_val,&__pyx_n_s_ebqe_val,&__pyx_n_s_firstBadIndex,0};
6073  PyObject* values[7] = {0,0,0,0,0,0,0};
6074  if (unlikely(__pyx_kwds)) {
6075  Py_ssize_t kw_args;
6076  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
6077  switch (pos_args) {
6078  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
6079  CYTHON_FALLTHROUGH;
6080  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
6081  CYTHON_FALLTHROUGH;
6082  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6083  CYTHON_FALLTHROUGH;
6084  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6085  CYTHON_FALLTHROUGH;
6086  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6087  CYTHON_FALLTHROUGH;
6088  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6089  CYTHON_FALLTHROUGH;
6090  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6091  CYTHON_FALLTHROUGH;
6092  case 0: break;
6093  default: goto __pyx_L5_argtuple_error;
6094  }
6095  kw_args = PyDict_Size(__pyx_kwds);
6096  switch (pos_args) {
6097  case 0:
6098  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tolerance)) != 0)) kw_args--;
6099  else goto __pyx_L5_argtuple_error;
6100  CYTHON_FALLTHROUGH;
6101  case 1:
6102  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exteriorElementBoundariesArray)) != 0)) kw_args--;
6103  else {
6104  __Pyx_RaiseArgtupleInvalid("checkElementBoundaryAndExteriorElementBoundaryArraysSame", 1, 7, 7, 1); __PYX_ERR(0, 2579, __pyx_L3_error)
6105  }
6106  CYTHON_FALLTHROUGH;
6107  case 2:
6108  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElementsArray)) != 0)) kw_args--;
6109  else {
6110  __Pyx_RaiseArgtupleInvalid("checkElementBoundaryAndExteriorElementBoundaryArraysSame", 1, 7, 7, 2); __PYX_ERR(0, 2579, __pyx_L3_error)
6111  }
6112  CYTHON_FALLTHROUGH;
6113  case 3:
6114  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound_2)) != 0)) kw_args--;
6115  else {
6116  __Pyx_RaiseArgtupleInvalid("checkElementBoundaryAndExteriorElementBoundaryArraysSame", 1, 7, 7, 3); __PYX_ERR(0, 2579, __pyx_L3_error)
6117  }
6118  CYTHON_FALLTHROUGH;
6119  case 4:
6120  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ebq_val)) != 0)) kw_args--;
6121  else {
6122  __Pyx_RaiseArgtupleInvalid("checkElementBoundaryAndExteriorElementBoundaryArraysSame", 1, 7, 7, 4); __PYX_ERR(0, 2579, __pyx_L3_error)
6123  }
6124  CYTHON_FALLTHROUGH;
6125  case 5:
6126  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ebqe_val)) != 0)) kw_args--;
6127  else {
6128  __Pyx_RaiseArgtupleInvalid("checkElementBoundaryAndExteriorElementBoundaryArraysSame", 1, 7, 7, 5); __PYX_ERR(0, 2579, __pyx_L3_error)
6129  }
6130  CYTHON_FALLTHROUGH;
6131  case 6:
6132  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_firstBadIndex)) != 0)) kw_args--;
6133  else {
6134  __Pyx_RaiseArgtupleInvalid("checkElementBoundaryAndExteriorElementBoundaryArraysSame", 1, 7, 7, 6); __PYX_ERR(0, 2579, __pyx_L3_error)
6135  }
6136  }
6137  if (unlikely(kw_args > 0)) {
6138  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "checkElementBoundaryAndExteriorElementBoundaryArraysSame") < 0)) __PYX_ERR(0, 2579, __pyx_L3_error)
6139  }
6140  } else if (PyTuple_GET_SIZE(__pyx_args) != 7) {
6141  goto __pyx_L5_argtuple_error;
6142  } else {
6143  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6144  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6145  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6146  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6147  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6148  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
6149  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
6150  }
6151  __pyx_v_tolerance = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_tolerance == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2579, __pyx_L3_error)
6152  __pyx_v_exteriorElementBoundariesArray = ((PyArrayObject *)values[1]);
6153  __pyx_v_elementBoundaryElementsArray = ((PyArrayObject *)values[2]);
6154  __pyx_v_elementBoundaryLocalElementBoundariesArray = ((PyArrayObject *)values[3]);
6155  __pyx_v_ebq_val = ((PyArrayObject *)values[4]);
6156  __pyx_v_ebqe_val = ((PyArrayObject *)values[5]);
6157  __pyx_v_firstBadIndex = ((PyArrayObject *)values[6]);
6158  }
6159  goto __pyx_L4_argument_unpacking_done;
6160  __pyx_L5_argtuple_error:;
6161  __Pyx_RaiseArgtupleInvalid("checkElementBoundaryAndExteriorElementBoundaryArraysSame", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2579, __pyx_L3_error)
6162  __pyx_L3_error:;
6163  __Pyx_AddTraceback("cfemIntegrals.checkElementBoundaryAndExteriorElementBoundaryArraysSame", __pyx_clineno, __pyx_lineno, __pyx_filename);
6164  __Pyx_RefNannyFinishContext();
6165  return NULL;
6166  __pyx_L4_argument_unpacking_done:;
6167  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exteriorElementBoundariesArray), __pyx_ptype_5numpy_ndarray, 1, "exteriorElementBoundariesArray", 0))) __PYX_ERR(0, 2580, __pyx_L1_error)
6168  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElementsArray), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElementsArray", 0))) __PYX_ERR(0, 2581, __pyx_L1_error)
6169  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundariesArray), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundariesArray", 0))) __PYX_ERR(0, 2582, __pyx_L1_error)
6170  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ebq_val), __pyx_ptype_5numpy_ndarray, 1, "ebq_val", 0))) __PYX_ERR(0, 2583, __pyx_L1_error)
6171  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ebqe_val), __pyx_ptype_5numpy_ndarray, 1, "ebqe_val", 0))) __PYX_ERR(0, 2584, __pyx_L1_error)
6172  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_firstBadIndex), __pyx_ptype_5numpy_ndarray, 1, "firstBadIndex", 0))) __PYX_ERR(0, 2585, __pyx_L1_error)
6173  __pyx_r = __pyx_pf_13cfemIntegrals_26checkElementBoundaryAndExteriorElementBoundaryArraysSame(__pyx_self, __pyx_v_tolerance, __pyx_v_exteriorElementBoundariesArray, __pyx_v_elementBoundaryElementsArray, __pyx_v_elementBoundaryLocalElementBoundariesArray, __pyx_v_ebq_val, __pyx_v_ebqe_val, __pyx_v_firstBadIndex);
6174 
6175  /* function exit code */
6176  goto __pyx_L0;
6177  __pyx_L1_error:;
6178  __pyx_r = NULL;
6179  __pyx_L0:;
6180  __Pyx_RefNannyFinishContext();
6181  return __pyx_r;
6182 }
6183 
6184 static PyObject *__pyx_pf_13cfemIntegrals_26checkElementBoundaryAndExteriorElementBoundaryArraysSame(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_tolerance, PyArrayObject *__pyx_v_exteriorElementBoundariesArray, PyArrayObject *__pyx_v_elementBoundaryElementsArray, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray, PyArrayObject *__pyx_v_ebq_val, PyArrayObject *__pyx_v_ebqe_val, PyArrayObject *__pyx_v_firstBadIndex) {
6185  int __pyx_v_output;
6186  int __pyx_v_nElementBoundaries_element;
6187  int __pyx_v_nExteriorElementBoundaries_global;
6188  int __pyx_v_nQuadraturePoints_elementBoundary;
6189  int __pyx_v_nValuesPerQuadraturePoint;
6190  int __pyx_v_nd;
6191  long __pyx_v_i;
6192  PyObject *__pyx_r = NULL;
6193  __Pyx_RefNannyDeclarations
6194  int __pyx_t_1;
6195  int __pyx_t_2;
6196  int __pyx_t_3;
6197  long __pyx_t_4;
6198  PyObject *__pyx_t_5 = NULL;
6199  int __pyx_lineno = 0;
6200  const char *__pyx_filename = NULL;
6201  int __pyx_clineno = 0;
6202  __Pyx_RefNannySetupContext("checkElementBoundaryAndExteriorElementBoundaryArraysSame", 0);
6203 
6204  /* "cfemIntegrals.pyx":2587
6205  * np.ndarray firstBadIndex):
6206  * cdef int output
6207  * cdef int nElementBoundaries_element = ebq_val.shape[1] # <<<<<<<<<<<<<<
6208  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundariesArray.shape[0]
6209  * cdef int nQuadraturePoints_elementBoundary = ebqe_val.shape[1]
6210  */
6211  __pyx_v_nElementBoundaries_element = (__pyx_v_ebq_val->dimensions[1]);
6212 
6213  /* "cfemIntegrals.pyx":2588
6214  * cdef int output
6215  * cdef int nElementBoundaries_element = ebq_val.shape[1]
6216  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundariesArray.shape[0] # <<<<<<<<<<<<<<
6217  * cdef int nQuadraturePoints_elementBoundary = ebqe_val.shape[1]
6218  * cdef int nValuesPerQuadraturePoint = 1
6219  */
6220  __pyx_v_nExteriorElementBoundaries_global = (__pyx_v_exteriorElementBoundariesArray->dimensions[0]);
6221 
6222  /* "cfemIntegrals.pyx":2589
6223  * cdef int nElementBoundaries_element = ebq_val.shape[1]
6224  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundariesArray.shape[0]
6225  * cdef int nQuadraturePoints_elementBoundary = ebqe_val.shape[1] # <<<<<<<<<<<<<<
6226  * cdef int nValuesPerQuadraturePoint = 1
6227  * cdef int nd = ebqe_val.ndim
6228  */
6229  __pyx_v_nQuadraturePoints_elementBoundary = (__pyx_v_ebqe_val->dimensions[1]);
6230 
6231  /* "cfemIntegrals.pyx":2590
6232  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundariesArray.shape[0]
6233  * cdef int nQuadraturePoints_elementBoundary = ebqe_val.shape[1]
6234  * cdef int nValuesPerQuadraturePoint = 1 # <<<<<<<<<<<<<<
6235  * cdef int nd = ebqe_val.ndim
6236  * if nd > 2:
6237  */
6238  __pyx_v_nValuesPerQuadraturePoint = 1;
6239 
6240  /* "cfemIntegrals.pyx":2591
6241  * cdef int nQuadraturePoints_elementBoundary = ebqe_val.shape[1]
6242  * cdef int nValuesPerQuadraturePoint = 1
6243  * cdef int nd = ebqe_val.ndim # <<<<<<<<<<<<<<
6244  * if nd > 2:
6245  * for i in range(2,nd):
6246  */
6247  __pyx_t_1 = __pyx_v_ebqe_val->nd;
6248  __pyx_v_nd = __pyx_t_1;
6249 
6250  /* "cfemIntegrals.pyx":2592
6251  * cdef int nValuesPerQuadraturePoint = 1
6252  * cdef int nd = ebqe_val.ndim
6253  * if nd > 2: # <<<<<<<<<<<<<<
6254  * for i in range(2,nd):
6255  * nValuesPerQuadraturePoint *= ebqe_val.shape[i]
6256  */
6257  __pyx_t_2 = ((__pyx_v_nd > 2) != 0);
6258  if (__pyx_t_2) {
6259 
6260  /* "cfemIntegrals.pyx":2593
6261  * cdef int nd = ebqe_val.ndim
6262  * if nd > 2:
6263  * for i in range(2,nd): # <<<<<<<<<<<<<<
6264  * nValuesPerQuadraturePoint *= ebqe_val.shape[i]
6265  * output = ccheckElementBoundaryAndExteriorElementBoundaryArraysSame(nElementBoundaries_element,
6266  */
6267  __pyx_t_1 = __pyx_v_nd;
6268  __pyx_t_3 = __pyx_t_1;
6269  for (__pyx_t_4 = 2; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
6270  __pyx_v_i = __pyx_t_4;
6271 
6272  /* "cfemIntegrals.pyx":2594
6273  * if nd > 2:
6274  * for i in range(2,nd):
6275  * nValuesPerQuadraturePoint *= ebqe_val.shape[i] # <<<<<<<<<<<<<<
6276  * output = ccheckElementBoundaryAndExteriorElementBoundaryArraysSame(nElementBoundaries_element,
6277  * nExteriorElementBoundaries_global,
6278  */
6279  __pyx_v_nValuesPerQuadraturePoint = (__pyx_v_nValuesPerQuadraturePoint * (__pyx_v_ebqe_val->dimensions[__pyx_v_i]));
6280  }
6281 
6282  /* "cfemIntegrals.pyx":2592
6283  * cdef int nValuesPerQuadraturePoint = 1
6284  * cdef int nd = ebqe_val.ndim
6285  * if nd > 2: # <<<<<<<<<<<<<<
6286  * for i in range(2,nd):
6287  * nValuesPerQuadraturePoint *= ebqe_val.shape[i]
6288  */
6289  }
6290 
6291  /* "cfemIntegrals.pyx":2595
6292  * for i in range(2,nd):
6293  * nValuesPerQuadraturePoint *= ebqe_val.shape[i]
6294  * output = ccheckElementBoundaryAndExteriorElementBoundaryArraysSame(nElementBoundaries_element, # <<<<<<<<<<<<<<
6295  * nExteriorElementBoundaries_global,
6296  * nQuadraturePoints_elementBoundary,
6297  */
6298  __pyx_v_output = checkElementBoundaryAndExteriorElementBoundaryArraysSame(__pyx_v_nElementBoundaries_element, __pyx_v_nExteriorElementBoundaries_global, __pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nValuesPerQuadraturePoint, __pyx_v_tolerance, ((int *)__pyx_v_exteriorElementBoundariesArray->data), ((int *)__pyx_v_elementBoundaryElementsArray->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundariesArray->data), ((double *)__pyx_v_ebq_val->data), ((double *)__pyx_v_ebqe_val->data), ((int *)__pyx_v_firstBadIndex->data));
6299 
6300  /* "cfemIntegrals.pyx":2606
6301  * <double*> ebqe_val.data,
6302  * <int*> firstBadIndex.data)
6303  * return output # <<<<<<<<<<<<<<
6304  * def checkGlobalElementBoundaryAndExteriorElementBoundaryArraysSame(double tolerance,
6305  * np.ndarray exteriorElementBoundariesArray,
6306  */
6307  __Pyx_XDECREF(__pyx_r);
6308  __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_output); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2606, __pyx_L1_error)
6309  __Pyx_GOTREF(__pyx_t_5);
6310  __pyx_r = __pyx_t_5;
6311  __pyx_t_5 = 0;
6312  goto __pyx_L0;
6313 
6314  /* "cfemIntegrals.pyx":2579
6315  * <double*> df2.data,
6316  * <double*> cfl.data)
6317  * def checkElementBoundaryAndExteriorElementBoundaryArraysSame(double tolerance, # <<<<<<<<<<<<<<
6318  * np.ndarray exteriorElementBoundariesArray,
6319  * np.ndarray elementBoundaryElementsArray,
6320  */
6321 
6322  /* function exit code */
6323  __pyx_L1_error:;
6324  __Pyx_XDECREF(__pyx_t_5);
6325  __Pyx_AddTraceback("cfemIntegrals.checkElementBoundaryAndExteriorElementBoundaryArraysSame", __pyx_clineno, __pyx_lineno, __pyx_filename);
6326  __pyx_r = NULL;
6327  __pyx_L0:;
6328  __Pyx_XGIVEREF(__pyx_r);
6329  __Pyx_RefNannyFinishContext();
6330  return __pyx_r;
6331 }
6332 
6333 /* "cfemIntegrals.pyx":2607
6334  * <int*> firstBadIndex.data)
6335  * return output
6336  * def checkGlobalElementBoundaryAndExteriorElementBoundaryArraysSame(double tolerance, # <<<<<<<<<<<<<<
6337  * np.ndarray exteriorElementBoundariesArray,
6338  * np.ndarray elementBoundaryElementsArray,
6339  */
6340 
6341 /* Python wrapper */
6342 static PyObject *__pyx_pw_13cfemIntegrals_29checkGlobalElementBoundaryAndExteriorElementBoundaryArraysSame(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
6343 static PyMethodDef __pyx_mdef_13cfemIntegrals_29checkGlobalElementBoundaryAndExteriorElementBoundaryArraysSame = {"checkGlobalElementBoundaryAndExteriorElementBoundaryArraysSame", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_29checkGlobalElementBoundaryAndExteriorElementBoundaryArraysSame, METH_VARARGS|METH_KEYWORDS, 0};
6344 static PyObject *__pyx_pw_13cfemIntegrals_29checkGlobalElementBoundaryAndExteriorElementBoundaryArraysSame(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6345  double __pyx_v_tolerance;
6346  PyArrayObject *__pyx_v_exteriorElementBoundariesArray = 0;
6347  PyArrayObject *__pyx_v_elementBoundaryElementsArray = 0;
6348  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray = 0;
6349  PyArrayObject *__pyx_v_ebq_global_val = 0;
6350  PyArrayObject *__pyx_v_ebqe_val = 0;
6351  PyArrayObject *__pyx_v_firstBadIndex = 0;
6352  int __pyx_lineno = 0;
6353  const char *__pyx_filename = NULL;
6354  int __pyx_clineno = 0;
6355  PyObject *__pyx_r = 0;
6356  __Pyx_RefNannyDeclarations
6357  __Pyx_RefNannySetupContext("checkGlobalElementBoundaryAndExteriorElementBoundaryArraysSame (wrapper)", 0);
6358  {
6359  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tolerance,&__pyx_n_s_exteriorElementBoundariesArray,&__pyx_n_s_elementBoundaryElementsArray,&__pyx_n_s_elementBoundaryLocalElementBound_2,&__pyx_n_s_ebq_global_val,&__pyx_n_s_ebqe_val,&__pyx_n_s_firstBadIndex,0};
6360  PyObject* values[7] = {0,0,0,0,0,0,0};
6361  if (unlikely(__pyx_kwds)) {
6362  Py_ssize_t kw_args;
6363  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
6364  switch (pos_args) {
6365  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
6366  CYTHON_FALLTHROUGH;
6367  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
6368  CYTHON_FALLTHROUGH;
6369  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6370  CYTHON_FALLTHROUGH;
6371  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6372  CYTHON_FALLTHROUGH;
6373  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6374  CYTHON_FALLTHROUGH;
6375  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6376  CYTHON_FALLTHROUGH;
6377  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6378  CYTHON_FALLTHROUGH;
6379  case 0: break;
6380  default: goto __pyx_L5_argtuple_error;
6381  }
6382  kw_args = PyDict_Size(__pyx_kwds);
6383  switch (pos_args) {
6384  case 0:
6385  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tolerance)) != 0)) kw_args--;
6386  else goto __pyx_L5_argtuple_error;
6387  CYTHON_FALLTHROUGH;
6388  case 1:
6389  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exteriorElementBoundariesArray)) != 0)) kw_args--;
6390  else {
6391  __Pyx_RaiseArgtupleInvalid("checkGlobalElementBoundaryAndExteriorElementBoundaryArraysSame", 1, 7, 7, 1); __PYX_ERR(0, 2607, __pyx_L3_error)
6392  }
6393  CYTHON_FALLTHROUGH;
6394  case 2:
6395  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElementsArray)) != 0)) kw_args--;
6396  else {
6397  __Pyx_RaiseArgtupleInvalid("checkGlobalElementBoundaryAndExteriorElementBoundaryArraysSame", 1, 7, 7, 2); __PYX_ERR(0, 2607, __pyx_L3_error)
6398  }
6399  CYTHON_FALLTHROUGH;
6400  case 3:
6401  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound_2)) != 0)) kw_args--;
6402  else {
6403  __Pyx_RaiseArgtupleInvalid("checkGlobalElementBoundaryAndExteriorElementBoundaryArraysSame", 1, 7, 7, 3); __PYX_ERR(0, 2607, __pyx_L3_error)
6404  }
6405  CYTHON_FALLTHROUGH;
6406  case 4:
6407  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ebq_global_val)) != 0)) kw_args--;
6408  else {
6409  __Pyx_RaiseArgtupleInvalid("checkGlobalElementBoundaryAndExteriorElementBoundaryArraysSame", 1, 7, 7, 4); __PYX_ERR(0, 2607, __pyx_L3_error)
6410  }
6411  CYTHON_FALLTHROUGH;
6412  case 5:
6413  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ebqe_val)) != 0)) kw_args--;
6414  else {
6415  __Pyx_RaiseArgtupleInvalid("checkGlobalElementBoundaryAndExteriorElementBoundaryArraysSame", 1, 7, 7, 5); __PYX_ERR(0, 2607, __pyx_L3_error)
6416  }
6417  CYTHON_FALLTHROUGH;
6418  case 6:
6419  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_firstBadIndex)) != 0)) kw_args--;
6420  else {
6421  __Pyx_RaiseArgtupleInvalid("checkGlobalElementBoundaryAndExteriorElementBoundaryArraysSame", 1, 7, 7, 6); __PYX_ERR(0, 2607, __pyx_L3_error)
6422  }
6423  }
6424  if (unlikely(kw_args > 0)) {
6425  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "checkGlobalElementBoundaryAndExteriorElementBoundaryArraysSame") < 0)) __PYX_ERR(0, 2607, __pyx_L3_error)
6426  }
6427  } else if (PyTuple_GET_SIZE(__pyx_args) != 7) {
6428  goto __pyx_L5_argtuple_error;
6429  } else {
6430  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6431  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6432  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6433  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6434  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6435  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
6436  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
6437  }
6438  __pyx_v_tolerance = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_tolerance == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2607, __pyx_L3_error)
6439  __pyx_v_exteriorElementBoundariesArray = ((PyArrayObject *)values[1]);
6440  __pyx_v_elementBoundaryElementsArray = ((PyArrayObject *)values[2]);
6441  __pyx_v_elementBoundaryLocalElementBoundariesArray = ((PyArrayObject *)values[3]);
6442  __pyx_v_ebq_global_val = ((PyArrayObject *)values[4]);
6443  __pyx_v_ebqe_val = ((PyArrayObject *)values[5]);
6444  __pyx_v_firstBadIndex = ((PyArrayObject *)values[6]);
6445  }
6446  goto __pyx_L4_argument_unpacking_done;
6447  __pyx_L5_argtuple_error:;
6448  __Pyx_RaiseArgtupleInvalid("checkGlobalElementBoundaryAndExteriorElementBoundaryArraysSame", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2607, __pyx_L3_error)
6449  __pyx_L3_error:;
6450  __Pyx_AddTraceback("cfemIntegrals.checkGlobalElementBoundaryAndExteriorElementBoundaryArraysSame", __pyx_clineno, __pyx_lineno, __pyx_filename);
6451  __Pyx_RefNannyFinishContext();
6452  return NULL;
6453  __pyx_L4_argument_unpacking_done:;
6454  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exteriorElementBoundariesArray), __pyx_ptype_5numpy_ndarray, 1, "exteriorElementBoundariesArray", 0))) __PYX_ERR(0, 2608, __pyx_L1_error)
6455  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElementsArray), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElementsArray", 0))) __PYX_ERR(0, 2609, __pyx_L1_error)
6456  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundariesArray), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundariesArray", 0))) __PYX_ERR(0, 2610, __pyx_L1_error)
6457  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ebq_global_val), __pyx_ptype_5numpy_ndarray, 1, "ebq_global_val", 0))) __PYX_ERR(0, 2611, __pyx_L1_error)
6458  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ebqe_val), __pyx_ptype_5numpy_ndarray, 1, "ebqe_val", 0))) __PYX_ERR(0, 2612, __pyx_L1_error)
6459  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_firstBadIndex), __pyx_ptype_5numpy_ndarray, 1, "firstBadIndex", 0))) __PYX_ERR(0, 2613, __pyx_L1_error)
6460  __pyx_r = __pyx_pf_13cfemIntegrals_28checkGlobalElementBoundaryAndExteriorElementBoundaryArraysSame(__pyx_self, __pyx_v_tolerance, __pyx_v_exteriorElementBoundariesArray, __pyx_v_elementBoundaryElementsArray, __pyx_v_elementBoundaryLocalElementBoundariesArray, __pyx_v_ebq_global_val, __pyx_v_ebqe_val, __pyx_v_firstBadIndex);
6461 
6462  /* function exit code */
6463  goto __pyx_L0;
6464  __pyx_L1_error:;
6465  __pyx_r = NULL;
6466  __pyx_L0:;
6467  __Pyx_RefNannyFinishContext();
6468  return __pyx_r;
6469 }
6470 
6471 static PyObject *__pyx_pf_13cfemIntegrals_28checkGlobalElementBoundaryAndExteriorElementBoundaryArraysSame(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_tolerance, PyArrayObject *__pyx_v_exteriorElementBoundariesArray, PyArrayObject *__pyx_v_elementBoundaryElementsArray, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray, PyArrayObject *__pyx_v_ebq_global_val, PyArrayObject *__pyx_v_ebqe_val, PyArrayObject *__pyx_v_firstBadIndex) {
6472  CYTHON_UNUSED int __pyx_v_output;
6473  int __pyx_v_nExteriorElementBoundaries_global;
6474  int __pyx_v_nQuadraturePoints_elementBoundary;
6475  int __pyx_v_nValuesPerQuadraturePoint;
6476  int __pyx_v_nd;
6477  long __pyx_v_i;
6478  PyObject *__pyx_r = NULL;
6479  __Pyx_RefNannyDeclarations
6480  int __pyx_t_1;
6481  int __pyx_t_2;
6482  int __pyx_t_3;
6483  long __pyx_t_4;
6484  int __pyx_lineno = 0;
6485  const char *__pyx_filename = NULL;
6486  int __pyx_clineno = 0;
6487  __Pyx_RefNannySetupContext("checkGlobalElementBoundaryAndExteriorElementBoundaryArraysSame", 0);
6488 
6489  /* "cfemIntegrals.pyx":2615
6490  * np.ndarray firstBadIndex):
6491  * cdef int output
6492  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundariesArray.shape[0] # <<<<<<<<<<<<<<
6493  * cdef int nQuadraturePoints_elementBoundary = ebqe_val.shape[1]
6494  * cdef int nValuesPerQuadraturePoint = 1
6495  */
6496  __pyx_v_nExteriorElementBoundaries_global = (__pyx_v_exteriorElementBoundariesArray->dimensions[0]);
6497 
6498  /* "cfemIntegrals.pyx":2616
6499  * cdef int output
6500  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundariesArray.shape[0]
6501  * cdef int nQuadraturePoints_elementBoundary = ebqe_val.shape[1] # <<<<<<<<<<<<<<
6502  * cdef int nValuesPerQuadraturePoint = 1
6503  * cdef int nd = ebqe_val
6504  */
6505  __pyx_v_nQuadraturePoints_elementBoundary = (__pyx_v_ebqe_val->dimensions[1]);
6506 
6507  /* "cfemIntegrals.pyx":2617
6508  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundariesArray.shape[0]
6509  * cdef int nQuadraturePoints_elementBoundary = ebqe_val.shape[1]
6510  * cdef int nValuesPerQuadraturePoint = 1 # <<<<<<<<<<<<<<
6511  * cdef int nd = ebqe_val
6512  * if nd > 2:
6513  */
6514  __pyx_v_nValuesPerQuadraturePoint = 1;
6515 
6516  /* "cfemIntegrals.pyx":2618
6517  * cdef int nQuadraturePoints_elementBoundary = ebqe_val.shape[1]
6518  * cdef int nValuesPerQuadraturePoint = 1
6519  * cdef int nd = ebqe_val # <<<<<<<<<<<<<<
6520  * if nd > 2:
6521  * for i in range(2,nd):
6522  */
6523  __pyx_t_1 = __Pyx_PyInt_As_int(((PyObject *)__pyx_v_ebqe_val)); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2618, __pyx_L1_error)
6524  __pyx_v_nd = __pyx_t_1;
6525 
6526  /* "cfemIntegrals.pyx":2619
6527  * cdef int nValuesPerQuadraturePoint = 1
6528  * cdef int nd = ebqe_val
6529  * if nd > 2: # <<<<<<<<<<<<<<
6530  * for i in range(2,nd):
6531  * nValuesPerQuadraturePoint *= ebqe_val.shape[i]
6532  */
6533  __pyx_t_2 = ((__pyx_v_nd > 2) != 0);
6534  if (__pyx_t_2) {
6535 
6536  /* "cfemIntegrals.pyx":2620
6537  * cdef int nd = ebqe_val
6538  * if nd > 2:
6539  * for i in range(2,nd): # <<<<<<<<<<<<<<
6540  * nValuesPerQuadraturePoint *= ebqe_val.shape[i]
6541  * output = ccheckGlobalElementBoundaryAndExteriorElementBoundaryArraysSame(nExteriorElementBoundaries_global,
6542  */
6543  __pyx_t_1 = __pyx_v_nd;
6544  __pyx_t_3 = __pyx_t_1;
6545  for (__pyx_t_4 = 2; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
6546  __pyx_v_i = __pyx_t_4;
6547 
6548  /* "cfemIntegrals.pyx":2621
6549  * if nd > 2:
6550  * for i in range(2,nd):
6551  * nValuesPerQuadraturePoint *= ebqe_val.shape[i] # <<<<<<<<<<<<<<
6552  * output = ccheckGlobalElementBoundaryAndExteriorElementBoundaryArraysSame(nExteriorElementBoundaries_global,
6553  * nQuadraturePoints_elementBoundary,
6554  */
6555  __pyx_v_nValuesPerQuadraturePoint = (__pyx_v_nValuesPerQuadraturePoint * (__pyx_v_ebqe_val->dimensions[__pyx_v_i]));
6556  }
6557 
6558  /* "cfemIntegrals.pyx":2619
6559  * cdef int nValuesPerQuadraturePoint = 1
6560  * cdef int nd = ebqe_val
6561  * if nd > 2: # <<<<<<<<<<<<<<
6562  * for i in range(2,nd):
6563  * nValuesPerQuadraturePoint *= ebqe_val.shape[i]
6564  */
6565  }
6566 
6567  /* "cfemIntegrals.pyx":2622
6568  * for i in range(2,nd):
6569  * nValuesPerQuadraturePoint *= ebqe_val.shape[i]
6570  * output = ccheckGlobalElementBoundaryAndExteriorElementBoundaryArraysSame(nExteriorElementBoundaries_global, # <<<<<<<<<<<<<<
6571  * nQuadraturePoints_elementBoundary,
6572  * nValuesPerQuadraturePoint,
6573  */
6574  __pyx_v_output = checkGlobalElementBoundaryAndExteriorElementBoundaryArraysSame(__pyx_v_nExteriorElementBoundaries_global, __pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nValuesPerQuadraturePoint, __pyx_v_tolerance, ((int *)__pyx_v_exteriorElementBoundariesArray->data), ((int *)__pyx_v_elementBoundaryElementsArray->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundariesArray->data), ((double *)__pyx_v_ebq_global_val->data), ((double *)__pyx_v_ebqe_val->data), ((int *)__pyx_v_firstBadIndex->data));
6575 
6576  /* "cfemIntegrals.pyx":2607
6577  * <int*> firstBadIndex.data)
6578  * return output
6579  * def checkGlobalElementBoundaryAndExteriorElementBoundaryArraysSame(double tolerance, # <<<<<<<<<<<<<<
6580  * np.ndarray exteriorElementBoundariesArray,
6581  * np.ndarray elementBoundaryElementsArray,
6582  */
6583 
6584  /* function exit code */
6585  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6586  goto __pyx_L0;
6587  __pyx_L1_error:;
6588  __Pyx_AddTraceback("cfemIntegrals.checkGlobalElementBoundaryAndExteriorElementBoundaryArraysSame", __pyx_clineno, __pyx_lineno, __pyx_filename);
6589  __pyx_r = NULL;
6590  __pyx_L0:;
6591  __Pyx_XGIVEREF(__pyx_r);
6592  __Pyx_RefNannyFinishContext();
6593  return __pyx_r;
6594 }
6595 
6596 /* "cfemIntegrals.pyx":2632
6597  * <double*> ebqe_val.data,
6598  * <int*> firstBadIndex.data)
6599  * def calculateExteriorElementBoundaryStress3D(np.ndarray elementBoundaryMaterialTypes, # <<<<<<<<<<<<<<
6600  * np.ndarray exteriorElementBoundaries,
6601  * np.ndarray elementBoundaryElements,
6602  */
6603 
6604 /* Python wrapper */
6605 static PyObject *__pyx_pw_13cfemIntegrals_31calculateExteriorElementBoundaryStress3D(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
6606 static PyMethodDef __pyx_mdef_13cfemIntegrals_31calculateExteriorElementBoundaryStress3D = {"calculateExteriorElementBoundaryStress3D", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_31calculateExteriorElementBoundaryStress3D, METH_VARARGS|METH_KEYWORDS, 0};
6607 static PyObject *__pyx_pw_13cfemIntegrals_31calculateExteriorElementBoundaryStress3D(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6608  PyArrayObject *__pyx_v_elementBoundaryMaterialTypes = 0;
6609  PyArrayObject *__pyx_v_exteriorElementBoundaries = 0;
6610  PyArrayObject *__pyx_v_elementBoundaryElements = 0;
6611  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries = 0;
6612  PyArrayObject *__pyx_v_p = 0;
6613  PyArrayObject *__pyx_v_mom_flux_vec_u = 0;
6614  PyArrayObject *__pyx_v_mom_flux_vec_v = 0;
6615  PyArrayObject *__pyx_v_mom_flux_vec_w = 0;
6616  PyArrayObject *__pyx_v_dS = 0;
6617  PyArrayObject *__pyx_v_n = 0;
6618  PyArrayObject *__pyx_v_F = 0;
6619  int __pyx_lineno = 0;
6620  const char *__pyx_filename = NULL;
6621  int __pyx_clineno = 0;
6622  PyObject *__pyx_r = 0;
6623  __Pyx_RefNannyDeclarations
6624  __Pyx_RefNannySetupContext("calculateExteriorElementBoundaryStress3D (wrapper)", 0);
6625  {
6626  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_elementBoundaryMaterialTypes,&__pyx_n_s_exteriorElementBoundaries,&__pyx_n_s_elementBoundaryElements,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_p,&__pyx_n_s_mom_flux_vec_u,&__pyx_n_s_mom_flux_vec_v,&__pyx_n_s_mom_flux_vec_w,&__pyx_n_s_dS,&__pyx_n_s_n,&__pyx_n_s_F,0};
6627  PyObject* values[11] = {0,0,0,0,0,0,0,0,0,0,0};
6628  if (unlikely(__pyx_kwds)) {
6629  Py_ssize_t kw_args;
6630  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
6631  switch (pos_args) {
6632  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
6633  CYTHON_FALLTHROUGH;
6634  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
6635  CYTHON_FALLTHROUGH;
6636  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
6637  CYTHON_FALLTHROUGH;
6638  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
6639  CYTHON_FALLTHROUGH;
6640  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
6641  CYTHON_FALLTHROUGH;
6642  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
6643  CYTHON_FALLTHROUGH;
6644  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6645  CYTHON_FALLTHROUGH;
6646  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6647  CYTHON_FALLTHROUGH;
6648  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6649  CYTHON_FALLTHROUGH;
6650  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6651  CYTHON_FALLTHROUGH;
6652  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6653  CYTHON_FALLTHROUGH;
6654  case 0: break;
6655  default: goto __pyx_L5_argtuple_error;
6656  }
6657  kw_args = PyDict_Size(__pyx_kwds);
6658  switch (pos_args) {
6659  case 0:
6660  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryMaterialTypes)) != 0)) kw_args--;
6661  else goto __pyx_L5_argtuple_error;
6662  CYTHON_FALLTHROUGH;
6663  case 1:
6664  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exteriorElementBoundaries)) != 0)) kw_args--;
6665  else {
6666  __Pyx_RaiseArgtupleInvalid("calculateExteriorElementBoundaryStress3D", 1, 11, 11, 1); __PYX_ERR(0, 2632, __pyx_L3_error)
6667  }
6668  CYTHON_FALLTHROUGH;
6669  case 2:
6670  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElements)) != 0)) kw_args--;
6671  else {
6672  __Pyx_RaiseArgtupleInvalid("calculateExteriorElementBoundaryStress3D", 1, 11, 11, 2); __PYX_ERR(0, 2632, __pyx_L3_error)
6673  }
6674  CYTHON_FALLTHROUGH;
6675  case 3:
6676  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
6677  else {
6678  __Pyx_RaiseArgtupleInvalid("calculateExteriorElementBoundaryStress3D", 1, 11, 11, 3); __PYX_ERR(0, 2632, __pyx_L3_error)
6679  }
6680  CYTHON_FALLTHROUGH;
6681  case 4:
6682  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_p)) != 0)) kw_args--;
6683  else {
6684  __Pyx_RaiseArgtupleInvalid("calculateExteriorElementBoundaryStress3D", 1, 11, 11, 4); __PYX_ERR(0, 2632, __pyx_L3_error)
6685  }
6686  CYTHON_FALLTHROUGH;
6687  case 5:
6688  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mom_flux_vec_u)) != 0)) kw_args--;
6689  else {
6690  __Pyx_RaiseArgtupleInvalid("calculateExteriorElementBoundaryStress3D", 1, 11, 11, 5); __PYX_ERR(0, 2632, __pyx_L3_error)
6691  }
6692  CYTHON_FALLTHROUGH;
6693  case 6:
6694  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mom_flux_vec_v)) != 0)) kw_args--;
6695  else {
6696  __Pyx_RaiseArgtupleInvalid("calculateExteriorElementBoundaryStress3D", 1, 11, 11, 6); __PYX_ERR(0, 2632, __pyx_L3_error)
6697  }
6698  CYTHON_FALLTHROUGH;
6699  case 7:
6700  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mom_flux_vec_w)) != 0)) kw_args--;
6701  else {
6702  __Pyx_RaiseArgtupleInvalid("calculateExteriorElementBoundaryStress3D", 1, 11, 11, 7); __PYX_ERR(0, 2632, __pyx_L3_error)
6703  }
6704  CYTHON_FALLTHROUGH;
6705  case 8:
6706  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dS)) != 0)) kw_args--;
6707  else {
6708  __Pyx_RaiseArgtupleInvalid("calculateExteriorElementBoundaryStress3D", 1, 11, 11, 8); __PYX_ERR(0, 2632, __pyx_L3_error)
6709  }
6710  CYTHON_FALLTHROUGH;
6711  case 9:
6712  if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n)) != 0)) kw_args--;
6713  else {
6714  __Pyx_RaiseArgtupleInvalid("calculateExteriorElementBoundaryStress3D", 1, 11, 11, 9); __PYX_ERR(0, 2632, __pyx_L3_error)
6715  }
6716  CYTHON_FALLTHROUGH;
6717  case 10:
6718  if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_F)) != 0)) kw_args--;
6719  else {
6720  __Pyx_RaiseArgtupleInvalid("calculateExteriorElementBoundaryStress3D", 1, 11, 11, 10); __PYX_ERR(0, 2632, __pyx_L3_error)
6721  }
6722  }
6723  if (unlikely(kw_args > 0)) {
6724  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateExteriorElementBoundaryStress3D") < 0)) __PYX_ERR(0, 2632, __pyx_L3_error)
6725  }
6726  } else if (PyTuple_GET_SIZE(__pyx_args) != 11) {
6727  goto __pyx_L5_argtuple_error;
6728  } else {
6729  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6730  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6731  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6732  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6733  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6734  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
6735  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
6736  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
6737  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
6738  values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
6739  values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
6740  }
6741  __pyx_v_elementBoundaryMaterialTypes = ((PyArrayObject *)values[0]);
6742  __pyx_v_exteriorElementBoundaries = ((PyArrayObject *)values[1]);
6743  __pyx_v_elementBoundaryElements = ((PyArrayObject *)values[2]);
6744  __pyx_v_elementBoundaryLocalElementBoundaries = ((PyArrayObject *)values[3]);
6745  __pyx_v_p = ((PyArrayObject *)values[4]);
6746  __pyx_v_mom_flux_vec_u = ((PyArrayObject *)values[5]);
6747  __pyx_v_mom_flux_vec_v = ((PyArrayObject *)values[6]);
6748  __pyx_v_mom_flux_vec_w = ((PyArrayObject *)values[7]);
6749  __pyx_v_dS = ((PyArrayObject *)values[8]);
6750  __pyx_v_n = ((PyArrayObject *)values[9]);
6751  __pyx_v_F = ((PyArrayObject *)values[10]);
6752  }
6753  goto __pyx_L4_argument_unpacking_done;
6754  __pyx_L5_argtuple_error:;
6755  __Pyx_RaiseArgtupleInvalid("calculateExteriorElementBoundaryStress3D", 1, 11, 11, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2632, __pyx_L3_error)
6756  __pyx_L3_error:;
6757  __Pyx_AddTraceback("cfemIntegrals.calculateExteriorElementBoundaryStress3D", __pyx_clineno, __pyx_lineno, __pyx_filename);
6758  __Pyx_RefNannyFinishContext();
6759  return NULL;
6760  __pyx_L4_argument_unpacking_done:;
6761  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryMaterialTypes), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryMaterialTypes", 0))) __PYX_ERR(0, 2632, __pyx_L1_error)
6762  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exteriorElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "exteriorElementBoundaries", 0))) __PYX_ERR(0, 2633, __pyx_L1_error)
6763  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElements), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElements", 0))) __PYX_ERR(0, 2634, __pyx_L1_error)
6764  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundaries", 0))) __PYX_ERR(0, 2635, __pyx_L1_error)
6765  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_p), __pyx_ptype_5numpy_ndarray, 1, "p", 0))) __PYX_ERR(0, 2636, __pyx_L1_error)
6766  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mom_flux_vec_u), __pyx_ptype_5numpy_ndarray, 1, "mom_flux_vec_u", 0))) __PYX_ERR(0, 2637, __pyx_L1_error)
6767  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mom_flux_vec_v), __pyx_ptype_5numpy_ndarray, 1, "mom_flux_vec_v", 0))) __PYX_ERR(0, 2638, __pyx_L1_error)
6768  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mom_flux_vec_w), __pyx_ptype_5numpy_ndarray, 1, "mom_flux_vec_w", 0))) __PYX_ERR(0, 2639, __pyx_L1_error)
6769  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dS), __pyx_ptype_5numpy_ndarray, 1, "dS", 0))) __PYX_ERR(0, 2640, __pyx_L1_error)
6770  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_n), __pyx_ptype_5numpy_ndarray, 1, "n", 0))) __PYX_ERR(0, 2641, __pyx_L1_error)
6771  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_F), __pyx_ptype_5numpy_ndarray, 1, "F", 0))) __PYX_ERR(0, 2642, __pyx_L1_error)
6772  __pyx_r = __pyx_pf_13cfemIntegrals_30calculateExteriorElementBoundaryStress3D(__pyx_self, __pyx_v_elementBoundaryMaterialTypes, __pyx_v_exteriorElementBoundaries, __pyx_v_elementBoundaryElements, __pyx_v_elementBoundaryLocalElementBoundaries, __pyx_v_p, __pyx_v_mom_flux_vec_u, __pyx_v_mom_flux_vec_v, __pyx_v_mom_flux_vec_w, __pyx_v_dS, __pyx_v_n, __pyx_v_F);
6773 
6774  /* function exit code */
6775  goto __pyx_L0;
6776  __pyx_L1_error:;
6777  __pyx_r = NULL;
6778  __pyx_L0:;
6779  __Pyx_RefNannyFinishContext();
6780  return __pyx_r;
6781 }
6782 
6783 static PyObject *__pyx_pf_13cfemIntegrals_30calculateExteriorElementBoundaryStress3D(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementBoundaryMaterialTypes, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_p, PyArrayObject *__pyx_v_mom_flux_vec_u, PyArrayObject *__pyx_v_mom_flux_vec_v, PyArrayObject *__pyx_v_mom_flux_vec_w, PyArrayObject *__pyx_v_dS, PyArrayObject *__pyx_v_n, PyArrayObject *__pyx_v_F) {
6784  int __pyx_v_nExteriorElementBoundaries_global;
6785  int __pyx_v_nQuadraturePoints_elementBoundary;
6786  PyObject *__pyx_r = NULL;
6787  __Pyx_RefNannyDeclarations
6788  __Pyx_RefNannySetupContext("calculateExteriorElementBoundaryStress3D", 0);
6789 
6790  /* "cfemIntegrals.pyx":2643
6791  * np.ndarray n,
6792  * np.ndarray F):
6793  * cdef int nExteriorElementBoundaries_global = p.shape[0] # <<<<<<<<<<<<<<
6794  * cdef int nQuadraturePoints_elementBoundary = p.shape[1]
6795  * ccalculateExteriorElementBoundaryStress3D(nExteriorElementBoundaries_global,
6796  */
6797  __pyx_v_nExteriorElementBoundaries_global = (__pyx_v_p->dimensions[0]);
6798 
6799  /* "cfemIntegrals.pyx":2644
6800  * np.ndarray F):
6801  * cdef int nExteriorElementBoundaries_global = p.shape[0]
6802  * cdef int nQuadraturePoints_elementBoundary = p.shape[1] # <<<<<<<<<<<<<<
6803  * ccalculateExteriorElementBoundaryStress3D(nExteriorElementBoundaries_global,
6804  * nQuadraturePoints_elementBoundary,
6805  */
6806  __pyx_v_nQuadraturePoints_elementBoundary = (__pyx_v_p->dimensions[1]);
6807 
6808  /* "cfemIntegrals.pyx":2645
6809  * cdef int nExteriorElementBoundaries_global = p.shape[0]
6810  * cdef int nQuadraturePoints_elementBoundary = p.shape[1]
6811  * ccalculateExteriorElementBoundaryStress3D(nExteriorElementBoundaries_global, # <<<<<<<<<<<<<<
6812  * nQuadraturePoints_elementBoundary,
6813  * <int*> elementBoundaryMaterialTypes.data,
6814  */
6815  calculateExteriorElementBoundaryStress3D(__pyx_v_nExteriorElementBoundaries_global, __pyx_v_nQuadraturePoints_elementBoundary, ((int *)__pyx_v_elementBoundaryMaterialTypes->data), ((int *)__pyx_v_exteriorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), ((double *)__pyx_v_p->data), ((double *)__pyx_v_mom_flux_vec_u->data), ((double *)__pyx_v_mom_flux_vec_v->data), ((double *)__pyx_v_mom_flux_vec_w->data), ((double *)__pyx_v_dS->data), ((double *)__pyx_v_n->data), ((double *)__pyx_v_F->data));
6816 
6817  /* "cfemIntegrals.pyx":2632
6818  * <double*> ebqe_val.data,
6819  * <int*> firstBadIndex.data)
6820  * def calculateExteriorElementBoundaryStress3D(np.ndarray elementBoundaryMaterialTypes, # <<<<<<<<<<<<<<
6821  * np.ndarray exteriorElementBoundaries,
6822  * np.ndarray elementBoundaryElements,
6823  */
6824 
6825  /* function exit code */
6826  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6827  __Pyx_XGIVEREF(__pyx_r);
6828  __Pyx_RefNannyFinishContext();
6829  return __pyx_r;
6830 }
6831 
6832 /* "cfemIntegrals.pyx":2658
6833  * <double*> n.data,
6834  * <double*> F.data)
6835  * def calculateExteriorElementBoundaryStress2D(np.ndarray elementBoundaryMaterialTypes, # <<<<<<<<<<<<<<
6836  * np.ndarray exteriorElementBoundaries,
6837  * np.ndarray elementBoundaryElements,
6838  */
6839 
6840 /* Python wrapper */
6841 static PyObject *__pyx_pw_13cfemIntegrals_33calculateExteriorElementBoundaryStress2D(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
6842 static PyMethodDef __pyx_mdef_13cfemIntegrals_33calculateExteriorElementBoundaryStress2D = {"calculateExteriorElementBoundaryStress2D", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_33calculateExteriorElementBoundaryStress2D, METH_VARARGS|METH_KEYWORDS, 0};
6843 static PyObject *__pyx_pw_13cfemIntegrals_33calculateExteriorElementBoundaryStress2D(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6844  PyArrayObject *__pyx_v_elementBoundaryMaterialTypes = 0;
6845  PyArrayObject *__pyx_v_exteriorElementBoundaries = 0;
6846  PyArrayObject *__pyx_v_elementBoundaryElements = 0;
6847  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries = 0;
6848  PyArrayObject *__pyx_v_p = 0;
6849  PyArrayObject *__pyx_v_mom_flux_vec_u = 0;
6850  PyArrayObject *__pyx_v_mom_flux_vec_v = 0;
6851  PyArrayObject *__pyx_v_dS = 0;
6852  PyArrayObject *__pyx_v_n = 0;
6853  PyArrayObject *__pyx_v_F = 0;
6854  int __pyx_lineno = 0;
6855  const char *__pyx_filename = NULL;
6856  int __pyx_clineno = 0;
6857  PyObject *__pyx_r = 0;
6858  __Pyx_RefNannyDeclarations
6859  __Pyx_RefNannySetupContext("calculateExteriorElementBoundaryStress2D (wrapper)", 0);
6860  {
6861  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_elementBoundaryMaterialTypes,&__pyx_n_s_exteriorElementBoundaries,&__pyx_n_s_elementBoundaryElements,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_p,&__pyx_n_s_mom_flux_vec_u,&__pyx_n_s_mom_flux_vec_v,&__pyx_n_s_dS,&__pyx_n_s_n,&__pyx_n_s_F,0};
6862  PyObject* values[10] = {0,0,0,0,0,0,0,0,0,0};
6863  if (unlikely(__pyx_kwds)) {
6864  Py_ssize_t kw_args;
6865  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
6866  switch (pos_args) {
6867  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
6868  CYTHON_FALLTHROUGH;
6869  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
6870  CYTHON_FALLTHROUGH;
6871  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
6872  CYTHON_FALLTHROUGH;
6873  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
6874  CYTHON_FALLTHROUGH;
6875  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
6876  CYTHON_FALLTHROUGH;
6877  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6878  CYTHON_FALLTHROUGH;
6879  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6880  CYTHON_FALLTHROUGH;
6881  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6882  CYTHON_FALLTHROUGH;
6883  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6884  CYTHON_FALLTHROUGH;
6885  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6886  CYTHON_FALLTHROUGH;
6887  case 0: break;
6888  default: goto __pyx_L5_argtuple_error;
6889  }
6890  kw_args = PyDict_Size(__pyx_kwds);
6891  switch (pos_args) {
6892  case 0:
6893  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryMaterialTypes)) != 0)) kw_args--;
6894  else goto __pyx_L5_argtuple_error;
6895  CYTHON_FALLTHROUGH;
6896  case 1:
6897  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exteriorElementBoundaries)) != 0)) kw_args--;
6898  else {
6899  __Pyx_RaiseArgtupleInvalid("calculateExteriorElementBoundaryStress2D", 1, 10, 10, 1); __PYX_ERR(0, 2658, __pyx_L3_error)
6900  }
6901  CYTHON_FALLTHROUGH;
6902  case 2:
6903  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElements)) != 0)) kw_args--;
6904  else {
6905  __Pyx_RaiseArgtupleInvalid("calculateExteriorElementBoundaryStress2D", 1, 10, 10, 2); __PYX_ERR(0, 2658, __pyx_L3_error)
6906  }
6907  CYTHON_FALLTHROUGH;
6908  case 3:
6909  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
6910  else {
6911  __Pyx_RaiseArgtupleInvalid("calculateExteriorElementBoundaryStress2D", 1, 10, 10, 3); __PYX_ERR(0, 2658, __pyx_L3_error)
6912  }
6913  CYTHON_FALLTHROUGH;
6914  case 4:
6915  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_p)) != 0)) kw_args--;
6916  else {
6917  __Pyx_RaiseArgtupleInvalid("calculateExteriorElementBoundaryStress2D", 1, 10, 10, 4); __PYX_ERR(0, 2658, __pyx_L3_error)
6918  }
6919  CYTHON_FALLTHROUGH;
6920  case 5:
6921  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mom_flux_vec_u)) != 0)) kw_args--;
6922  else {
6923  __Pyx_RaiseArgtupleInvalid("calculateExteriorElementBoundaryStress2D", 1, 10, 10, 5); __PYX_ERR(0, 2658, __pyx_L3_error)
6924  }
6925  CYTHON_FALLTHROUGH;
6926  case 6:
6927  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mom_flux_vec_v)) != 0)) kw_args--;
6928  else {
6929  __Pyx_RaiseArgtupleInvalid("calculateExteriorElementBoundaryStress2D", 1, 10, 10, 6); __PYX_ERR(0, 2658, __pyx_L3_error)
6930  }
6931  CYTHON_FALLTHROUGH;
6932  case 7:
6933  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dS)) != 0)) kw_args--;
6934  else {
6935  __Pyx_RaiseArgtupleInvalid("calculateExteriorElementBoundaryStress2D", 1, 10, 10, 7); __PYX_ERR(0, 2658, __pyx_L3_error)
6936  }
6937  CYTHON_FALLTHROUGH;
6938  case 8:
6939  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n)) != 0)) kw_args--;
6940  else {
6941  __Pyx_RaiseArgtupleInvalid("calculateExteriorElementBoundaryStress2D", 1, 10, 10, 8); __PYX_ERR(0, 2658, __pyx_L3_error)
6942  }
6943  CYTHON_FALLTHROUGH;
6944  case 9:
6945  if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_F)) != 0)) kw_args--;
6946  else {
6947  __Pyx_RaiseArgtupleInvalid("calculateExteriorElementBoundaryStress2D", 1, 10, 10, 9); __PYX_ERR(0, 2658, __pyx_L3_error)
6948  }
6949  }
6950  if (unlikely(kw_args > 0)) {
6951  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateExteriorElementBoundaryStress2D") < 0)) __PYX_ERR(0, 2658, __pyx_L3_error)
6952  }
6953  } else if (PyTuple_GET_SIZE(__pyx_args) != 10) {
6954  goto __pyx_L5_argtuple_error;
6955  } else {
6956  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6957  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6958  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6959  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6960  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6961  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
6962  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
6963  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
6964  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
6965  values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
6966  }
6967  __pyx_v_elementBoundaryMaterialTypes = ((PyArrayObject *)values[0]);
6968  __pyx_v_exteriorElementBoundaries = ((PyArrayObject *)values[1]);
6969  __pyx_v_elementBoundaryElements = ((PyArrayObject *)values[2]);
6970  __pyx_v_elementBoundaryLocalElementBoundaries = ((PyArrayObject *)values[3]);
6971  __pyx_v_p = ((PyArrayObject *)values[4]);
6972  __pyx_v_mom_flux_vec_u = ((PyArrayObject *)values[5]);
6973  __pyx_v_mom_flux_vec_v = ((PyArrayObject *)values[6]);
6974  __pyx_v_dS = ((PyArrayObject *)values[7]);
6975  __pyx_v_n = ((PyArrayObject *)values[8]);
6976  __pyx_v_F = ((PyArrayObject *)values[9]);
6977  }
6978  goto __pyx_L4_argument_unpacking_done;
6979  __pyx_L5_argtuple_error:;
6980  __Pyx_RaiseArgtupleInvalid("calculateExteriorElementBoundaryStress2D", 1, 10, 10, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2658, __pyx_L3_error)
6981  __pyx_L3_error:;
6982  __Pyx_AddTraceback("cfemIntegrals.calculateExteriorElementBoundaryStress2D", __pyx_clineno, __pyx_lineno, __pyx_filename);
6983  __Pyx_RefNannyFinishContext();
6984  return NULL;
6985  __pyx_L4_argument_unpacking_done:;
6986  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryMaterialTypes), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryMaterialTypes", 0))) __PYX_ERR(0, 2658, __pyx_L1_error)
6987  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exteriorElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "exteriorElementBoundaries", 0))) __PYX_ERR(0, 2659, __pyx_L1_error)
6988  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElements), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElements", 0))) __PYX_ERR(0, 2660, __pyx_L1_error)
6989  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundaries", 0))) __PYX_ERR(0, 2661, __pyx_L1_error)
6990  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_p), __pyx_ptype_5numpy_ndarray, 1, "p", 0))) __PYX_ERR(0, 2662, __pyx_L1_error)
6991  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mom_flux_vec_u), __pyx_ptype_5numpy_ndarray, 1, "mom_flux_vec_u", 0))) __PYX_ERR(0, 2663, __pyx_L1_error)
6992  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mom_flux_vec_v), __pyx_ptype_5numpy_ndarray, 1, "mom_flux_vec_v", 0))) __PYX_ERR(0, 2664, __pyx_L1_error)
6993  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dS), __pyx_ptype_5numpy_ndarray, 1, "dS", 0))) __PYX_ERR(0, 2665, __pyx_L1_error)
6994  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_n), __pyx_ptype_5numpy_ndarray, 1, "n", 0))) __PYX_ERR(0, 2666, __pyx_L1_error)
6995  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_F), __pyx_ptype_5numpy_ndarray, 1, "F", 0))) __PYX_ERR(0, 2667, __pyx_L1_error)
6996  __pyx_r = __pyx_pf_13cfemIntegrals_32calculateExteriorElementBoundaryStress2D(__pyx_self, __pyx_v_elementBoundaryMaterialTypes, __pyx_v_exteriorElementBoundaries, __pyx_v_elementBoundaryElements, __pyx_v_elementBoundaryLocalElementBoundaries, __pyx_v_p, __pyx_v_mom_flux_vec_u, __pyx_v_mom_flux_vec_v, __pyx_v_dS, __pyx_v_n, __pyx_v_F);
6997 
6998  /* function exit code */
6999  goto __pyx_L0;
7000  __pyx_L1_error:;
7001  __pyx_r = NULL;
7002  __pyx_L0:;
7003  __Pyx_RefNannyFinishContext();
7004  return __pyx_r;
7005 }
7006 
7007 static PyObject *__pyx_pf_13cfemIntegrals_32calculateExteriorElementBoundaryStress2D(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementBoundaryMaterialTypes, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_p, PyArrayObject *__pyx_v_mom_flux_vec_u, PyArrayObject *__pyx_v_mom_flux_vec_v, PyArrayObject *__pyx_v_dS, PyArrayObject *__pyx_v_n, PyArrayObject *__pyx_v_F) {
7008  int __pyx_v_nExteriorElementBoundaries_global;
7009  int __pyx_v_nQuadraturePoints_elementBoundary;
7010  PyObject *__pyx_r = NULL;
7011  __Pyx_RefNannyDeclarations
7012  __Pyx_RefNannySetupContext("calculateExteriorElementBoundaryStress2D", 0);
7013 
7014  /* "cfemIntegrals.pyx":2668
7015  * np.ndarray n,
7016  * np.ndarray F):
7017  * cdef int nExteriorElementBoundaries_global = p.shape[0] # <<<<<<<<<<<<<<
7018  * cdef int nQuadraturePoints_elementBoundary = p.shape[1]
7019  * ccalculateExteriorElementBoundaryStress2D(nExteriorElementBoundaries_global,
7020  */
7021  __pyx_v_nExteriorElementBoundaries_global = (__pyx_v_p->dimensions[0]);
7022 
7023  /* "cfemIntegrals.pyx":2669
7024  * np.ndarray F):
7025  * cdef int nExteriorElementBoundaries_global = p.shape[0]
7026  * cdef int nQuadraturePoints_elementBoundary = p.shape[1] # <<<<<<<<<<<<<<
7027  * ccalculateExteriorElementBoundaryStress2D(nExteriorElementBoundaries_global,
7028  * nQuadraturePoints_elementBoundary,
7029  */
7030  __pyx_v_nQuadraturePoints_elementBoundary = (__pyx_v_p->dimensions[1]);
7031 
7032  /* "cfemIntegrals.pyx":2670
7033  * cdef int nExteriorElementBoundaries_global = p.shape[0]
7034  * cdef int nQuadraturePoints_elementBoundary = p.shape[1]
7035  * ccalculateExteriorElementBoundaryStress2D(nExteriorElementBoundaries_global, # <<<<<<<<<<<<<<
7036  * nQuadraturePoints_elementBoundary,
7037  * <int*> elementBoundaryMaterialTypes.data,
7038  */
7039  calculateExteriorElementBoundaryStress2D(__pyx_v_nExteriorElementBoundaries_global, __pyx_v_nQuadraturePoints_elementBoundary, ((int *)__pyx_v_elementBoundaryMaterialTypes->data), ((int *)__pyx_v_exteriorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), ((double *)__pyx_v_p->data), ((double *)__pyx_v_mom_flux_vec_u->data), ((double *)__pyx_v_mom_flux_vec_v->data), ((double *)__pyx_v_dS->data), ((double *)__pyx_v_n->data), ((double *)__pyx_v_F->data));
7040 
7041  /* "cfemIntegrals.pyx":2658
7042  * <double*> n.data,
7043  * <double*> F.data)
7044  * def calculateExteriorElementBoundaryStress2D(np.ndarray elementBoundaryMaterialTypes, # <<<<<<<<<<<<<<
7045  * np.ndarray exteriorElementBoundaries,
7046  * np.ndarray elementBoundaryElements,
7047  */
7048 
7049  /* function exit code */
7050  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7051  __Pyx_XGIVEREF(__pyx_r);
7052  __Pyx_RefNannyFinishContext();
7053  return __pyx_r;
7054 }
7055 
7056 /* "cfemIntegrals.pyx":2682
7057  * <double*> n.data,
7058  * <double*> F.data)
7059  * def copyLeftElementBoundaryInfo(np.ndarray elementBoundaryElementsArray, # <<<<<<<<<<<<<<
7060  * np.ndarray elementBoundaryLocalElementBoundariesArray,
7061  * np.ndarray exteriorElementBoundariesArray,
7062  */
7063 
7064 /* Python wrapper */
7065 static PyObject *__pyx_pw_13cfemIntegrals_35copyLeftElementBoundaryInfo(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
7066 static PyMethodDef __pyx_mdef_13cfemIntegrals_35copyLeftElementBoundaryInfo = {"copyLeftElementBoundaryInfo", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_35copyLeftElementBoundaryInfo, METH_VARARGS|METH_KEYWORDS, 0};
7067 static PyObject *__pyx_pw_13cfemIntegrals_35copyLeftElementBoundaryInfo(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
7068  PyArrayObject *__pyx_v_elementBoundaryElementsArray = 0;
7069  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray = 0;
7070  PyArrayObject *__pyx_v_exteriorElementBoundariesArray = 0;
7071  PyArrayObject *__pyx_v_interiorElementBoundariesArray = 0;
7072  PyArrayObject *__pyx_v_x = 0;
7073  PyArrayObject *__pyx_v_n = 0;
7074  PyArrayObject *__pyx_v_xg = 0;
7075  PyArrayObject *__pyx_v_ng = 0;
7076  int __pyx_lineno = 0;
7077  const char *__pyx_filename = NULL;
7078  int __pyx_clineno = 0;
7079  PyObject *__pyx_r = 0;
7080  __Pyx_RefNannyDeclarations
7081  __Pyx_RefNannySetupContext("copyLeftElementBoundaryInfo (wrapper)", 0);
7082  {
7083  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_elementBoundaryElementsArray,&__pyx_n_s_elementBoundaryLocalElementBound_2,&__pyx_n_s_exteriorElementBoundariesArray,&__pyx_n_s_interiorElementBoundariesArray,&__pyx_n_s_x,&__pyx_n_s_n,&__pyx_n_s_xg,&__pyx_n_s_ng,0};
7084  PyObject* values[8] = {0,0,0,0,0,0,0,0};
7085  if (unlikely(__pyx_kwds)) {
7086  Py_ssize_t kw_args;
7087  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
7088  switch (pos_args) {
7089  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
7090  CYTHON_FALLTHROUGH;
7091  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
7092  CYTHON_FALLTHROUGH;
7093  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
7094  CYTHON_FALLTHROUGH;
7095  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
7096  CYTHON_FALLTHROUGH;
7097  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
7098  CYTHON_FALLTHROUGH;
7099  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
7100  CYTHON_FALLTHROUGH;
7101  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7102  CYTHON_FALLTHROUGH;
7103  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7104  CYTHON_FALLTHROUGH;
7105  case 0: break;
7106  default: goto __pyx_L5_argtuple_error;
7107  }
7108  kw_args = PyDict_Size(__pyx_kwds);
7109  switch (pos_args) {
7110  case 0:
7111  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElementsArray)) != 0)) kw_args--;
7112  else goto __pyx_L5_argtuple_error;
7113  CYTHON_FALLTHROUGH;
7114  case 1:
7115  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound_2)) != 0)) kw_args--;
7116  else {
7117  __Pyx_RaiseArgtupleInvalid("copyLeftElementBoundaryInfo", 1, 8, 8, 1); __PYX_ERR(0, 2682, __pyx_L3_error)
7118  }
7119  CYTHON_FALLTHROUGH;
7120  case 2:
7121  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exteriorElementBoundariesArray)) != 0)) kw_args--;
7122  else {
7123  __Pyx_RaiseArgtupleInvalid("copyLeftElementBoundaryInfo", 1, 8, 8, 2); __PYX_ERR(0, 2682, __pyx_L3_error)
7124  }
7125  CYTHON_FALLTHROUGH;
7126  case 3:
7127  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_interiorElementBoundariesArray)) != 0)) kw_args--;
7128  else {
7129  __Pyx_RaiseArgtupleInvalid("copyLeftElementBoundaryInfo", 1, 8, 8, 3); __PYX_ERR(0, 2682, __pyx_L3_error)
7130  }
7131  CYTHON_FALLTHROUGH;
7132  case 4:
7133  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
7134  else {
7135  __Pyx_RaiseArgtupleInvalid("copyLeftElementBoundaryInfo", 1, 8, 8, 4); __PYX_ERR(0, 2682, __pyx_L3_error)
7136  }
7137  CYTHON_FALLTHROUGH;
7138  case 5:
7139  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n)) != 0)) kw_args--;
7140  else {
7141  __Pyx_RaiseArgtupleInvalid("copyLeftElementBoundaryInfo", 1, 8, 8, 5); __PYX_ERR(0, 2682, __pyx_L3_error)
7142  }
7143  CYTHON_FALLTHROUGH;
7144  case 6:
7145  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xg)) != 0)) kw_args--;
7146  else {
7147  __Pyx_RaiseArgtupleInvalid("copyLeftElementBoundaryInfo", 1, 8, 8, 6); __PYX_ERR(0, 2682, __pyx_L3_error)
7148  }
7149  CYTHON_FALLTHROUGH;
7150  case 7:
7151  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ng)) != 0)) kw_args--;
7152  else {
7153  __Pyx_RaiseArgtupleInvalid("copyLeftElementBoundaryInfo", 1, 8, 8, 7); __PYX_ERR(0, 2682, __pyx_L3_error)
7154  }
7155  }
7156  if (unlikely(kw_args > 0)) {
7157  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "copyLeftElementBoundaryInfo") < 0)) __PYX_ERR(0, 2682, __pyx_L3_error)
7158  }
7159  } else if (PyTuple_GET_SIZE(__pyx_args) != 8) {
7160  goto __pyx_L5_argtuple_error;
7161  } else {
7162  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7163  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7164  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
7165  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
7166  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
7167  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
7168  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
7169  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
7170  }
7171  __pyx_v_elementBoundaryElementsArray = ((PyArrayObject *)values[0]);
7172  __pyx_v_elementBoundaryLocalElementBoundariesArray = ((PyArrayObject *)values[1]);
7173  __pyx_v_exteriorElementBoundariesArray = ((PyArrayObject *)values[2]);
7174  __pyx_v_interiorElementBoundariesArray = ((PyArrayObject *)values[3]);
7175  __pyx_v_x = ((PyArrayObject *)values[4]);
7176  __pyx_v_n = ((PyArrayObject *)values[5]);
7177  __pyx_v_xg = ((PyArrayObject *)values[6]);
7178  __pyx_v_ng = ((PyArrayObject *)values[7]);
7179  }
7180  goto __pyx_L4_argument_unpacking_done;
7181  __pyx_L5_argtuple_error:;
7182  __Pyx_RaiseArgtupleInvalid("copyLeftElementBoundaryInfo", 1, 8, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2682, __pyx_L3_error)
7183  __pyx_L3_error:;
7184  __Pyx_AddTraceback("cfemIntegrals.copyLeftElementBoundaryInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
7185  __Pyx_RefNannyFinishContext();
7186  return NULL;
7187  __pyx_L4_argument_unpacking_done:;
7188  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElementsArray), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElementsArray", 0))) __PYX_ERR(0, 2682, __pyx_L1_error)
7189  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundariesArray), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundariesArray", 0))) __PYX_ERR(0, 2683, __pyx_L1_error)
7190  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exteriorElementBoundariesArray), __pyx_ptype_5numpy_ndarray, 1, "exteriorElementBoundariesArray", 0))) __PYX_ERR(0, 2684, __pyx_L1_error)
7191  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_interiorElementBoundariesArray), __pyx_ptype_5numpy_ndarray, 1, "interiorElementBoundariesArray", 0))) __PYX_ERR(0, 2685, __pyx_L1_error)
7192  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1, "x", 0))) __PYX_ERR(0, 2686, __pyx_L1_error)
7193  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_n), __pyx_ptype_5numpy_ndarray, 1, "n", 0))) __PYX_ERR(0, 2687, __pyx_L1_error)
7194  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xg), __pyx_ptype_5numpy_ndarray, 1, "xg", 0))) __PYX_ERR(0, 2688, __pyx_L1_error)
7195  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ng), __pyx_ptype_5numpy_ndarray, 1, "ng", 0))) __PYX_ERR(0, 2689, __pyx_L1_error)
7196  __pyx_r = __pyx_pf_13cfemIntegrals_34copyLeftElementBoundaryInfo(__pyx_self, __pyx_v_elementBoundaryElementsArray, __pyx_v_elementBoundaryLocalElementBoundariesArray, __pyx_v_exteriorElementBoundariesArray, __pyx_v_interiorElementBoundariesArray, __pyx_v_x, __pyx_v_n, __pyx_v_xg, __pyx_v_ng);
7197 
7198  /* function exit code */
7199  goto __pyx_L0;
7200  __pyx_L1_error:;
7201  __pyx_r = NULL;
7202  __pyx_L0:;
7203  __Pyx_RefNannyFinishContext();
7204  return __pyx_r;
7205 }
7206 
7207 static PyObject *__pyx_pf_13cfemIntegrals_34copyLeftElementBoundaryInfo(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementBoundaryElementsArray, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray, PyArrayObject *__pyx_v_exteriorElementBoundariesArray, PyArrayObject *__pyx_v_interiorElementBoundariesArray, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_n, PyArrayObject *__pyx_v_xg, PyArrayObject *__pyx_v_ng) {
7208  int __pyx_v_nElementBoundaries_element;
7209  int __pyx_v_nElementBoundaryQuadraturePoints_elementBoundary;
7210  int __pyx_v_nSpace_global;
7211  int __pyx_v_nExteriorElementBoundaries_global;
7212  int __pyx_v_nInteriorElementBoundaries_global;
7213  PyObject *__pyx_r = NULL;
7214  __Pyx_RefNannyDeclarations
7215  __Pyx_RefNannySetupContext("copyLeftElementBoundaryInfo", 0);
7216 
7217  /* "cfemIntegrals.pyx":2690
7218  * np.ndarray xg,
7219  * np.ndarray ng):
7220  * cdef int nElementBoundaries_element = n.shape[1] # <<<<<<<<<<<<<<
7221  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = n.shape[2]
7222  * cdef int nSpace_global = n.shape[3]
7223  */
7224  __pyx_v_nElementBoundaries_element = (__pyx_v_n->dimensions[1]);
7225 
7226  /* "cfemIntegrals.pyx":2691
7227  * np.ndarray ng):
7228  * cdef int nElementBoundaries_element = n.shape[1]
7229  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = n.shape[2] # <<<<<<<<<<<<<<
7230  * cdef int nSpace_global = n.shape[3]
7231  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundariesArray.shape[0]
7232  */
7233  __pyx_v_nElementBoundaryQuadraturePoints_elementBoundary = (__pyx_v_n->dimensions[2]);
7234 
7235  /* "cfemIntegrals.pyx":2692
7236  * cdef int nElementBoundaries_element = n.shape[1]
7237  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = n.shape[2]
7238  * cdef int nSpace_global = n.shape[3] # <<<<<<<<<<<<<<
7239  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundariesArray.shape[0]
7240  * cdef int nInteriorElementBoundaries_global = interiorElementBoundariesArray.shape[0]
7241  */
7242  __pyx_v_nSpace_global = (__pyx_v_n->dimensions[3]);
7243 
7244  /* "cfemIntegrals.pyx":2693
7245  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = n.shape[2]
7246  * cdef int nSpace_global = n.shape[3]
7247  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundariesArray.shape[0] # <<<<<<<<<<<<<<
7248  * cdef int nInteriorElementBoundaries_global = interiorElementBoundariesArray.shape[0]
7249  * ccopyLeftElementBoundaryInfo(nElementBoundaries_element,
7250  */
7251  __pyx_v_nExteriorElementBoundaries_global = (__pyx_v_exteriorElementBoundariesArray->dimensions[0]);
7252 
7253  /* "cfemIntegrals.pyx":2694
7254  * cdef int nSpace_global = n.shape[3]
7255  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundariesArray.shape[0]
7256  * cdef int nInteriorElementBoundaries_global = interiorElementBoundariesArray.shape[0] # <<<<<<<<<<<<<<
7257  * ccopyLeftElementBoundaryInfo(nElementBoundaries_element,
7258  * nElementBoundaryQuadraturePoints_elementBoundary,
7259  */
7260  __pyx_v_nInteriorElementBoundaries_global = (__pyx_v_interiorElementBoundariesArray->dimensions[0]);
7261 
7262  /* "cfemIntegrals.pyx":2695
7263  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundariesArray.shape[0]
7264  * cdef int nInteriorElementBoundaries_global = interiorElementBoundariesArray.shape[0]
7265  * ccopyLeftElementBoundaryInfo(nElementBoundaries_element, # <<<<<<<<<<<<<<
7266  * nElementBoundaryQuadraturePoints_elementBoundary,
7267  * nSpace_global,
7268  */
7269  copyLeftElementBoundaryInfo(__pyx_v_nElementBoundaries_element, __pyx_v_nElementBoundaryQuadraturePoints_elementBoundary, __pyx_v_nSpace_global, __pyx_v_nExteriorElementBoundaries_global, __pyx_v_nInteriorElementBoundaries_global, ((int *)__pyx_v_elementBoundaryElementsArray->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundariesArray->data), ((int *)__pyx_v_exteriorElementBoundariesArray->data), ((int *)__pyx_v_interiorElementBoundariesArray->data), ((double *)__pyx_v_x->data), ((double *)__pyx_v_n->data), ((double *)__pyx_v_xg->data), ((double *)__pyx_v_ng->data));
7270 
7271  /* "cfemIntegrals.pyx":2682
7272  * <double*> n.data,
7273  * <double*> F.data)
7274  * def copyLeftElementBoundaryInfo(np.ndarray elementBoundaryElementsArray, # <<<<<<<<<<<<<<
7275  * np.ndarray elementBoundaryLocalElementBoundariesArray,
7276  * np.ndarray exteriorElementBoundariesArray,
7277  */
7278 
7279  /* function exit code */
7280  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7281  __Pyx_XGIVEREF(__pyx_r);
7282  __Pyx_RefNannyFinishContext();
7283  return __pyx_r;
7284 }
7285 
7286 /* "cfemIntegrals.pyx":2708
7287  * <double*>xg.data,
7288  * <double*>ng.data)
7289  * def parametricFiniteElementSpace_getValues(np.ndarray psi, # <<<<<<<<<<<<<<
7290  * np.ndarray vArray):
7291  * cdef int nElements_global = vArray.shape[0]
7292  */
7293 
7294 /* Python wrapper */
7295 static PyObject *__pyx_pw_13cfemIntegrals_37parametricFiniteElementSpace_getValues(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
7296 static PyMethodDef __pyx_mdef_13cfemIntegrals_37parametricFiniteElementSpace_getValues = {"parametricFiniteElementSpace_getValues", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_37parametricFiniteElementSpace_getValues, METH_VARARGS|METH_KEYWORDS, 0};
7297 static PyObject *__pyx_pw_13cfemIntegrals_37parametricFiniteElementSpace_getValues(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
7298  PyArrayObject *__pyx_v_psi = 0;
7299  PyArrayObject *__pyx_v_vArray = 0;
7300  int __pyx_lineno = 0;
7301  const char *__pyx_filename = NULL;
7302  int __pyx_clineno = 0;
7303  PyObject *__pyx_r = 0;
7304  __Pyx_RefNannyDeclarations
7305  __Pyx_RefNannySetupContext("parametricFiniteElementSpace_getValues (wrapper)", 0);
7306  {
7307  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_psi,&__pyx_n_s_vArray,0};
7308  PyObject* values[2] = {0,0};
7309  if (unlikely(__pyx_kwds)) {
7310  Py_ssize_t kw_args;
7311  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
7312  switch (pos_args) {
7313  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7314  CYTHON_FALLTHROUGH;
7315  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7316  CYTHON_FALLTHROUGH;
7317  case 0: break;
7318  default: goto __pyx_L5_argtuple_error;
7319  }
7320  kw_args = PyDict_Size(__pyx_kwds);
7321  switch (pos_args) {
7322  case 0:
7323  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_psi)) != 0)) kw_args--;
7324  else goto __pyx_L5_argtuple_error;
7325  CYTHON_FALLTHROUGH;
7326  case 1:
7327  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vArray)) != 0)) kw_args--;
7328  else {
7329  __Pyx_RaiseArgtupleInvalid("parametricFiniteElementSpace_getValues", 1, 2, 2, 1); __PYX_ERR(0, 2708, __pyx_L3_error)
7330  }
7331  }
7332  if (unlikely(kw_args > 0)) {
7333  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parametricFiniteElementSpace_getValues") < 0)) __PYX_ERR(0, 2708, __pyx_L3_error)
7334  }
7335  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
7336  goto __pyx_L5_argtuple_error;
7337  } else {
7338  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7339  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7340  }
7341  __pyx_v_psi = ((PyArrayObject *)values[0]);
7342  __pyx_v_vArray = ((PyArrayObject *)values[1]);
7343  }
7344  goto __pyx_L4_argument_unpacking_done;
7345  __pyx_L5_argtuple_error:;
7346  __Pyx_RaiseArgtupleInvalid("parametricFiniteElementSpace_getValues", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2708, __pyx_L3_error)
7347  __pyx_L3_error:;
7348  __Pyx_AddTraceback("cfemIntegrals.parametricFiniteElementSpace_getValues", __pyx_clineno, __pyx_lineno, __pyx_filename);
7349  __Pyx_RefNannyFinishContext();
7350  return NULL;
7351  __pyx_L4_argument_unpacking_done:;
7352  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_psi), __pyx_ptype_5numpy_ndarray, 1, "psi", 0))) __PYX_ERR(0, 2708, __pyx_L1_error)
7353  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vArray), __pyx_ptype_5numpy_ndarray, 1, "vArray", 0))) __PYX_ERR(0, 2709, __pyx_L1_error)
7354  __pyx_r = __pyx_pf_13cfemIntegrals_36parametricFiniteElementSpace_getValues(__pyx_self, __pyx_v_psi, __pyx_v_vArray);
7355 
7356  /* function exit code */
7357  goto __pyx_L0;
7358  __pyx_L1_error:;
7359  __pyx_r = NULL;
7360  __pyx_L0:;
7361  __Pyx_RefNannyFinishContext();
7362  return __pyx_r;
7363 }
7364 
7365 static PyObject *__pyx_pf_13cfemIntegrals_36parametricFiniteElementSpace_getValues(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_psi, PyArrayObject *__pyx_v_vArray) {
7366  int __pyx_v_nElements_global;
7367  int __pyx_v_nQuadraturePoints_element;
7368  int __pyx_v_nDOF_element;
7369  PyObject *__pyx_r = NULL;
7370  __Pyx_RefNannyDeclarations
7371  __Pyx_RefNannySetupContext("parametricFiniteElementSpace_getValues", 0);
7372 
7373  /* "cfemIntegrals.pyx":2710
7374  * def parametricFiniteElementSpace_getValues(np.ndarray psi,
7375  * np.ndarray vArray):
7376  * cdef int nElements_global = vArray.shape[0] # <<<<<<<<<<<<<<
7377  * cdef int nQuadraturePoints_element = vArray.shape[1]
7378  * cdef int nDOF_element = vArray.shape[2]
7379  */
7380  __pyx_v_nElements_global = (__pyx_v_vArray->dimensions[0]);
7381 
7382  /* "cfemIntegrals.pyx":2711
7383  * np.ndarray vArray):
7384  * cdef int nElements_global = vArray.shape[0]
7385  * cdef int nQuadraturePoints_element = vArray.shape[1] # <<<<<<<<<<<<<<
7386  * cdef int nDOF_element = vArray.shape[2]
7387  * cparametricFiniteElementSpace_getValues(nElements_global,
7388  */
7389  __pyx_v_nQuadraturePoints_element = (__pyx_v_vArray->dimensions[1]);
7390 
7391  /* "cfemIntegrals.pyx":2712
7392  * cdef int nElements_global = vArray.shape[0]
7393  * cdef int nQuadraturePoints_element = vArray.shape[1]
7394  * cdef int nDOF_element = vArray.shape[2] # <<<<<<<<<<<<<<
7395  * cparametricFiniteElementSpace_getValues(nElements_global,
7396  * nQuadraturePoints_element,
7397  */
7398  __pyx_v_nDOF_element = (__pyx_v_vArray->dimensions[2]);
7399 
7400  /* "cfemIntegrals.pyx":2713
7401  * cdef int nQuadraturePoints_element = vArray.shape[1]
7402  * cdef int nDOF_element = vArray.shape[2]
7403  * cparametricFiniteElementSpace_getValues(nElements_global, # <<<<<<<<<<<<<<
7404  * nQuadraturePoints_element,
7405  * nDOF_element,
7406  */
7407  parametricFiniteElementSpace_getValues(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_element, ((double *)__pyx_v_psi->data), ((double *)__pyx_v_vArray->data));
7408 
7409  /* "cfemIntegrals.pyx":2708
7410  * <double*>xg.data,
7411  * <double*>ng.data)
7412  * def parametricFiniteElementSpace_getValues(np.ndarray psi, # <<<<<<<<<<<<<<
7413  * np.ndarray vArray):
7414  * cdef int nElements_global = vArray.shape[0]
7415  */
7416 
7417  /* function exit code */
7418  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7419  __Pyx_XGIVEREF(__pyx_r);
7420  __Pyx_RefNannyFinishContext();
7421  return __pyx_r;
7422 }
7423 
7424 /* "cfemIntegrals.pyx":2718
7425  * <double*>psi.data,
7426  * <double*>vArray.data)
7427  * def parametricFiniteElementSpace_getValuesTrace(np.ndarray psi, # <<<<<<<<<<<<<<
7428  * np.ndarray permutations,
7429  * np.ndarray vArray):
7430  */
7431 
7432 /* Python wrapper */
7433 static PyObject *__pyx_pw_13cfemIntegrals_39parametricFiniteElementSpace_getValuesTrace(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
7434 static PyMethodDef __pyx_mdef_13cfemIntegrals_39parametricFiniteElementSpace_getValuesTrace = {"parametricFiniteElementSpace_getValuesTrace", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_39parametricFiniteElementSpace_getValuesTrace, METH_VARARGS|METH_KEYWORDS, 0};
7435 static PyObject *__pyx_pw_13cfemIntegrals_39parametricFiniteElementSpace_getValuesTrace(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
7436  PyArrayObject *__pyx_v_psi = 0;
7437  PyArrayObject *__pyx_v_permutations = 0;
7438  PyArrayObject *__pyx_v_vArray = 0;
7439  int __pyx_lineno = 0;
7440  const char *__pyx_filename = NULL;
7441  int __pyx_clineno = 0;
7442  PyObject *__pyx_r = 0;
7443  __Pyx_RefNannyDeclarations
7444  __Pyx_RefNannySetupContext("parametricFiniteElementSpace_getValuesTrace (wrapper)", 0);
7445  {
7446  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_psi,&__pyx_n_s_permutations,&__pyx_n_s_vArray,0};
7447  PyObject* values[3] = {0,0,0};
7448  if (unlikely(__pyx_kwds)) {
7449  Py_ssize_t kw_args;
7450  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
7451  switch (pos_args) {
7452  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
7453  CYTHON_FALLTHROUGH;
7454  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7455  CYTHON_FALLTHROUGH;
7456  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7457  CYTHON_FALLTHROUGH;
7458  case 0: break;
7459  default: goto __pyx_L5_argtuple_error;
7460  }
7461  kw_args = PyDict_Size(__pyx_kwds);
7462  switch (pos_args) {
7463  case 0:
7464  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_psi)) != 0)) kw_args--;
7465  else goto __pyx_L5_argtuple_error;
7466  CYTHON_FALLTHROUGH;
7467  case 1:
7468  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_permutations)) != 0)) kw_args--;
7469  else {
7470  __Pyx_RaiseArgtupleInvalid("parametricFiniteElementSpace_getValuesTrace", 1, 3, 3, 1); __PYX_ERR(0, 2718, __pyx_L3_error)
7471  }
7472  CYTHON_FALLTHROUGH;
7473  case 2:
7474  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vArray)) != 0)) kw_args--;
7475  else {
7476  __Pyx_RaiseArgtupleInvalid("parametricFiniteElementSpace_getValuesTrace", 1, 3, 3, 2); __PYX_ERR(0, 2718, __pyx_L3_error)
7477  }
7478  }
7479  if (unlikely(kw_args > 0)) {
7480  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parametricFiniteElementSpace_getValuesTrace") < 0)) __PYX_ERR(0, 2718, __pyx_L3_error)
7481  }
7482  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
7483  goto __pyx_L5_argtuple_error;
7484  } else {
7485  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7486  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7487  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
7488  }
7489  __pyx_v_psi = ((PyArrayObject *)values[0]);
7490  __pyx_v_permutations = ((PyArrayObject *)values[1]);
7491  __pyx_v_vArray = ((PyArrayObject *)values[2]);
7492  }
7493  goto __pyx_L4_argument_unpacking_done;
7494  __pyx_L5_argtuple_error:;
7495  __Pyx_RaiseArgtupleInvalid("parametricFiniteElementSpace_getValuesTrace", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2718, __pyx_L3_error)
7496  __pyx_L3_error:;
7497  __Pyx_AddTraceback("cfemIntegrals.parametricFiniteElementSpace_getValuesTrace", __pyx_clineno, __pyx_lineno, __pyx_filename);
7498  __Pyx_RefNannyFinishContext();
7499  return NULL;
7500  __pyx_L4_argument_unpacking_done:;
7501  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_psi), __pyx_ptype_5numpy_ndarray, 1, "psi", 0))) __PYX_ERR(0, 2718, __pyx_L1_error)
7502  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_permutations), __pyx_ptype_5numpy_ndarray, 1, "permutations", 0))) __PYX_ERR(0, 2719, __pyx_L1_error)
7503  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vArray), __pyx_ptype_5numpy_ndarray, 1, "vArray", 0))) __PYX_ERR(0, 2720, __pyx_L1_error)
7504  __pyx_r = __pyx_pf_13cfemIntegrals_38parametricFiniteElementSpace_getValuesTrace(__pyx_self, __pyx_v_psi, __pyx_v_permutations, __pyx_v_vArray);
7505 
7506  /* function exit code */
7507  goto __pyx_L0;
7508  __pyx_L1_error:;
7509  __pyx_r = NULL;
7510  __pyx_L0:;
7511  __Pyx_RefNannyFinishContext();
7512  return __pyx_r;
7513 }
7514 
7515 static PyObject *__pyx_pf_13cfemIntegrals_38parametricFiniteElementSpace_getValuesTrace(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_psi, PyArrayObject *__pyx_v_permutations, PyArrayObject *__pyx_v_vArray) {
7516  int __pyx_v_nElements_global;
7517  int __pyx_v_nElementBoundaries_element;
7518  int __pyx_v_nElementBoundaryQuadraturePoints_elementBoundary;
7519  int __pyx_v_nDOF_element;
7520  PyObject *__pyx_r = NULL;
7521  __Pyx_RefNannyDeclarations
7522  __Pyx_RefNannySetupContext("parametricFiniteElementSpace_getValuesTrace", 0);
7523 
7524  /* "cfemIntegrals.pyx":2721
7525  * np.ndarray permutations,
7526  * np.ndarray vArray):
7527  * cdef int nElements_global = vArray.shape[0] # <<<<<<<<<<<<<<
7528  * cdef int nElementBoundaries_element = vArray.shape[1]
7529  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = vArray.shape[2]
7530  */
7531  __pyx_v_nElements_global = (__pyx_v_vArray->dimensions[0]);
7532 
7533  /* "cfemIntegrals.pyx":2722
7534  * np.ndarray vArray):
7535  * cdef int nElements_global = vArray.shape[0]
7536  * cdef int nElementBoundaries_element = vArray.shape[1] # <<<<<<<<<<<<<<
7537  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = vArray.shape[2]
7538  * cdef int nDOF_element = vArray.shape[3]
7539  */
7540  __pyx_v_nElementBoundaries_element = (__pyx_v_vArray->dimensions[1]);
7541 
7542  /* "cfemIntegrals.pyx":2723
7543  * cdef int nElements_global = vArray.shape[0]
7544  * cdef int nElementBoundaries_element = vArray.shape[1]
7545  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = vArray.shape[2] # <<<<<<<<<<<<<<
7546  * cdef int nDOF_element = vArray.shape[3]
7547  * cparametricFiniteElementSpace_getValuesTrace(nElements_global,
7548  */
7549  __pyx_v_nElementBoundaryQuadraturePoints_elementBoundary = (__pyx_v_vArray->dimensions[2]);
7550 
7551  /* "cfemIntegrals.pyx":2724
7552  * cdef int nElementBoundaries_element = vArray.shape[1]
7553  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = vArray.shape[2]
7554  * cdef int nDOF_element = vArray.shape[3] # <<<<<<<<<<<<<<
7555  * cparametricFiniteElementSpace_getValuesTrace(nElements_global,
7556  * nElementBoundaries_element,
7557  */
7558  __pyx_v_nDOF_element = (__pyx_v_vArray->dimensions[3]);
7559 
7560  /* "cfemIntegrals.pyx":2725
7561  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = vArray.shape[2]
7562  * cdef int nDOF_element = vArray.shape[3]
7563  * cparametricFiniteElementSpace_getValuesTrace(nElements_global, # <<<<<<<<<<<<<<
7564  * nElementBoundaries_element,
7565  * nElementBoundaryQuadraturePoints_elementBoundary,
7566  */
7567  parametricFiniteElementSpace_getValuesTrace(__pyx_v_nElements_global, __pyx_v_nElementBoundaries_element, __pyx_v_nElementBoundaryQuadraturePoints_elementBoundary, __pyx_v_nDOF_element, ((double *)__pyx_v_psi->data), ((int *)__pyx_v_permutations->data), ((double *)__pyx_v_vArray->data));
7568 
7569  /* "cfemIntegrals.pyx":2718
7570  * <double*>psi.data,
7571  * <double*>vArray.data)
7572  * def parametricFiniteElementSpace_getValuesTrace(np.ndarray psi, # <<<<<<<<<<<<<<
7573  * np.ndarray permutations,
7574  * np.ndarray vArray):
7575  */
7576 
7577  /* function exit code */
7578  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7579  __Pyx_XGIVEREF(__pyx_r);
7580  __Pyx_RefNannyFinishContext();
7581  return __pyx_r;
7582 }
7583 
7584 /* "cfemIntegrals.pyx":2732
7585  * <int *>permutations.data,
7586  * <double*>vArray.data)
7587  * def parametricFiniteElementSpace_getGradientValues(np.ndarray grad_psi, # <<<<<<<<<<<<<<
7588  * np.ndarray inverseJacobianArray,
7589  * np.ndarray grad_vArray):
7590  */
7591 
7592 /* Python wrapper */
7593 static PyObject *__pyx_pw_13cfemIntegrals_41parametricFiniteElementSpace_getGradientValues(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
7594 static PyMethodDef __pyx_mdef_13cfemIntegrals_41parametricFiniteElementSpace_getGradientValues = {"parametricFiniteElementSpace_getGradientValues", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_41parametricFiniteElementSpace_getGradientValues, METH_VARARGS|METH_KEYWORDS, 0};
7595 static PyObject *__pyx_pw_13cfemIntegrals_41parametricFiniteElementSpace_getGradientValues(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
7596  PyArrayObject *__pyx_v_grad_psi = 0;
7597  PyArrayObject *__pyx_v_inverseJacobianArray = 0;
7598  PyArrayObject *__pyx_v_grad_vArray = 0;
7599  int __pyx_lineno = 0;
7600  const char *__pyx_filename = NULL;
7601  int __pyx_clineno = 0;
7602  PyObject *__pyx_r = 0;
7603  __Pyx_RefNannyDeclarations
7604  __Pyx_RefNannySetupContext("parametricFiniteElementSpace_getGradientValues (wrapper)", 0);
7605  {
7606  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_grad_psi,&__pyx_n_s_inverseJacobianArray,&__pyx_n_s_grad_vArray,0};
7607  PyObject* values[3] = {0,0,0};
7608  if (unlikely(__pyx_kwds)) {
7609  Py_ssize_t kw_args;
7610  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
7611  switch (pos_args) {
7612  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
7613  CYTHON_FALLTHROUGH;
7614  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7615  CYTHON_FALLTHROUGH;
7616  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7617  CYTHON_FALLTHROUGH;
7618  case 0: break;
7619  default: goto __pyx_L5_argtuple_error;
7620  }
7621  kw_args = PyDict_Size(__pyx_kwds);
7622  switch (pos_args) {
7623  case 0:
7624  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_psi)) != 0)) kw_args--;
7625  else goto __pyx_L5_argtuple_error;
7626  CYTHON_FALLTHROUGH;
7627  case 1:
7628  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inverseJacobianArray)) != 0)) kw_args--;
7629  else {
7630  __Pyx_RaiseArgtupleInvalid("parametricFiniteElementSpace_getGradientValues", 1, 3, 3, 1); __PYX_ERR(0, 2732, __pyx_L3_error)
7631  }
7632  CYTHON_FALLTHROUGH;
7633  case 2:
7634  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_vArray)) != 0)) kw_args--;
7635  else {
7636  __Pyx_RaiseArgtupleInvalid("parametricFiniteElementSpace_getGradientValues", 1, 3, 3, 2); __PYX_ERR(0, 2732, __pyx_L3_error)
7637  }
7638  }
7639  if (unlikely(kw_args > 0)) {
7640  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parametricFiniteElementSpace_getGradientValues") < 0)) __PYX_ERR(0, 2732, __pyx_L3_error)
7641  }
7642  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
7643  goto __pyx_L5_argtuple_error;
7644  } else {
7645  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7646  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7647  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
7648  }
7649  __pyx_v_grad_psi = ((PyArrayObject *)values[0]);
7650  __pyx_v_inverseJacobianArray = ((PyArrayObject *)values[1]);
7651  __pyx_v_grad_vArray = ((PyArrayObject *)values[2]);
7652  }
7653  goto __pyx_L4_argument_unpacking_done;
7654  __pyx_L5_argtuple_error:;
7655  __Pyx_RaiseArgtupleInvalid("parametricFiniteElementSpace_getGradientValues", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2732, __pyx_L3_error)
7656  __pyx_L3_error:;
7657  __Pyx_AddTraceback("cfemIntegrals.parametricFiniteElementSpace_getGradientValues", __pyx_clineno, __pyx_lineno, __pyx_filename);
7658  __Pyx_RefNannyFinishContext();
7659  return NULL;
7660  __pyx_L4_argument_unpacking_done:;
7661  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_psi), __pyx_ptype_5numpy_ndarray, 1, "grad_psi", 0))) __PYX_ERR(0, 2732, __pyx_L1_error)
7662  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_inverseJacobianArray), __pyx_ptype_5numpy_ndarray, 1, "inverseJacobianArray", 0))) __PYX_ERR(0, 2733, __pyx_L1_error)
7663  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_vArray), __pyx_ptype_5numpy_ndarray, 1, "grad_vArray", 0))) __PYX_ERR(0, 2734, __pyx_L1_error)
7664  __pyx_r = __pyx_pf_13cfemIntegrals_40parametricFiniteElementSpace_getGradientValues(__pyx_self, __pyx_v_grad_psi, __pyx_v_inverseJacobianArray, __pyx_v_grad_vArray);
7665 
7666  /* function exit code */
7667  goto __pyx_L0;
7668  __pyx_L1_error:;
7669  __pyx_r = NULL;
7670  __pyx_L0:;
7671  __Pyx_RefNannyFinishContext();
7672  return __pyx_r;
7673 }
7674 
7675 static PyObject *__pyx_pf_13cfemIntegrals_40parametricFiniteElementSpace_getGradientValues(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_grad_psi, PyArrayObject *__pyx_v_inverseJacobianArray, PyArrayObject *__pyx_v_grad_vArray) {
7676  int __pyx_v_nElements_global;
7677  int __pyx_v_nQuadraturePoints_element;
7678  int __pyx_v_nDOF_element;
7679  int __pyx_v_nSpace_global;
7680  PyObject *__pyx_r = NULL;
7681  __Pyx_RefNannyDeclarations
7682  __Pyx_RefNannySetupContext("parametricFiniteElementSpace_getGradientValues", 0);
7683 
7684  /* "cfemIntegrals.pyx":2735
7685  * np.ndarray inverseJacobianArray,
7686  * np.ndarray grad_vArray):
7687  * cdef int nElements_global = grad_vArray.shape[0] # <<<<<<<<<<<<<<
7688  * cdef int nQuadraturePoints_element = grad_vArray.shape[1]
7689  * cdef int nDOF_element = grad_vArray.shape[2]
7690  */
7691  __pyx_v_nElements_global = (__pyx_v_grad_vArray->dimensions[0]);
7692 
7693  /* "cfemIntegrals.pyx":2736
7694  * np.ndarray grad_vArray):
7695  * cdef int nElements_global = grad_vArray.shape[0]
7696  * cdef int nQuadraturePoints_element = grad_vArray.shape[1] # <<<<<<<<<<<<<<
7697  * cdef int nDOF_element = grad_vArray.shape[2]
7698  * cdef int nSpace_global = grad_vArray.shape[3]
7699  */
7700  __pyx_v_nQuadraturePoints_element = (__pyx_v_grad_vArray->dimensions[1]);
7701 
7702  /* "cfemIntegrals.pyx":2737
7703  * cdef int nElements_global = grad_vArray.shape[0]
7704  * cdef int nQuadraturePoints_element = grad_vArray.shape[1]
7705  * cdef int nDOF_element = grad_vArray.shape[2] # <<<<<<<<<<<<<<
7706  * cdef int nSpace_global = grad_vArray.shape[3]
7707  * cparametricFiniteElementSpace_getGradientValues(nElements_global,
7708  */
7709  __pyx_v_nDOF_element = (__pyx_v_grad_vArray->dimensions[2]);
7710 
7711  /* "cfemIntegrals.pyx":2738
7712  * cdef int nQuadraturePoints_element = grad_vArray.shape[1]
7713  * cdef int nDOF_element = grad_vArray.shape[2]
7714  * cdef int nSpace_global = grad_vArray.shape[3] # <<<<<<<<<<<<<<
7715  * cparametricFiniteElementSpace_getGradientValues(nElements_global,
7716  * nQuadraturePoints_element,
7717  */
7718  __pyx_v_nSpace_global = (__pyx_v_grad_vArray->dimensions[3]);
7719 
7720  /* "cfemIntegrals.pyx":2739
7721  * cdef int nDOF_element = grad_vArray.shape[2]
7722  * cdef int nSpace_global = grad_vArray.shape[3]
7723  * cparametricFiniteElementSpace_getGradientValues(nElements_global, # <<<<<<<<<<<<<<
7724  * nQuadraturePoints_element,
7725  * nDOF_element,
7726  */
7727  parametricFiniteElementSpace_getGradientValues(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_element, __pyx_v_nSpace_global, ((double *)__pyx_v_grad_psi->data), ((double *)__pyx_v_inverseJacobianArray->data), ((double *)__pyx_v_grad_vArray->data));
7728 
7729  /* "cfemIntegrals.pyx":2732
7730  * <int *>permutations.data,
7731  * <double*>vArray.data)
7732  * def parametricFiniteElementSpace_getGradientValues(np.ndarray grad_psi, # <<<<<<<<<<<<<<
7733  * np.ndarray inverseJacobianArray,
7734  * np.ndarray grad_vArray):
7735  */
7736 
7737  /* function exit code */
7738  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7739  __Pyx_XGIVEREF(__pyx_r);
7740  __Pyx_RefNannyFinishContext();
7741  return __pyx_r;
7742 }
7743 
7744 /* "cfemIntegrals.pyx":2746
7745  * <double*>inverseJacobianArray.data,
7746  * <double*>grad_vArray.data)
7747  * def parametricFiniteElementSpace_getGradientValuesTrace(np.ndarray grad_psi, # <<<<<<<<<<<<<<
7748  * np.ndarray permutations,
7749  * np.ndarray inverseJacobianArray,
7750  */
7751 
7752 /* Python wrapper */
7753 static PyObject *__pyx_pw_13cfemIntegrals_43parametricFiniteElementSpace_getGradientValuesTrace(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
7754 static PyMethodDef __pyx_mdef_13cfemIntegrals_43parametricFiniteElementSpace_getGradientValuesTrace = {"parametricFiniteElementSpace_getGradientValuesTrace", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_43parametricFiniteElementSpace_getGradientValuesTrace, METH_VARARGS|METH_KEYWORDS, 0};
7755 static PyObject *__pyx_pw_13cfemIntegrals_43parametricFiniteElementSpace_getGradientValuesTrace(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
7756  PyArrayObject *__pyx_v_grad_psi = 0;
7757  PyArrayObject *__pyx_v_permutations = 0;
7758  PyArrayObject *__pyx_v_inverseJacobianArray = 0;
7759  PyArrayObject *__pyx_v_grad_vArray = 0;
7760  int __pyx_lineno = 0;
7761  const char *__pyx_filename = NULL;
7762  int __pyx_clineno = 0;
7763  PyObject *__pyx_r = 0;
7764  __Pyx_RefNannyDeclarations
7765  __Pyx_RefNannySetupContext("parametricFiniteElementSpace_getGradientValuesTrace (wrapper)", 0);
7766  {
7767  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_grad_psi,&__pyx_n_s_permutations,&__pyx_n_s_inverseJacobianArray,&__pyx_n_s_grad_vArray,0};
7768  PyObject* values[4] = {0,0,0,0};
7769  if (unlikely(__pyx_kwds)) {
7770  Py_ssize_t kw_args;
7771  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
7772  switch (pos_args) {
7773  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
7774  CYTHON_FALLTHROUGH;
7775  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
7776  CYTHON_FALLTHROUGH;
7777  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7778  CYTHON_FALLTHROUGH;
7779  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7780  CYTHON_FALLTHROUGH;
7781  case 0: break;
7782  default: goto __pyx_L5_argtuple_error;
7783  }
7784  kw_args = PyDict_Size(__pyx_kwds);
7785  switch (pos_args) {
7786  case 0:
7787  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_psi)) != 0)) kw_args--;
7788  else goto __pyx_L5_argtuple_error;
7789  CYTHON_FALLTHROUGH;
7790  case 1:
7791  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_permutations)) != 0)) kw_args--;
7792  else {
7793  __Pyx_RaiseArgtupleInvalid("parametricFiniteElementSpace_getGradientValuesTrace", 1, 4, 4, 1); __PYX_ERR(0, 2746, __pyx_L3_error)
7794  }
7795  CYTHON_FALLTHROUGH;
7796  case 2:
7797  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inverseJacobianArray)) != 0)) kw_args--;
7798  else {
7799  __Pyx_RaiseArgtupleInvalid("parametricFiniteElementSpace_getGradientValuesTrace", 1, 4, 4, 2); __PYX_ERR(0, 2746, __pyx_L3_error)
7800  }
7801  CYTHON_FALLTHROUGH;
7802  case 3:
7803  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_vArray)) != 0)) kw_args--;
7804  else {
7805  __Pyx_RaiseArgtupleInvalid("parametricFiniteElementSpace_getGradientValuesTrace", 1, 4, 4, 3); __PYX_ERR(0, 2746, __pyx_L3_error)
7806  }
7807  }
7808  if (unlikely(kw_args > 0)) {
7809  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parametricFiniteElementSpace_getGradientValuesTrace") < 0)) __PYX_ERR(0, 2746, __pyx_L3_error)
7810  }
7811  } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
7812  goto __pyx_L5_argtuple_error;
7813  } else {
7814  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7815  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7816  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
7817  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
7818  }
7819  __pyx_v_grad_psi = ((PyArrayObject *)values[0]);
7820  __pyx_v_permutations = ((PyArrayObject *)values[1]);
7821  __pyx_v_inverseJacobianArray = ((PyArrayObject *)values[2]);
7822  __pyx_v_grad_vArray = ((PyArrayObject *)values[3]);
7823  }
7824  goto __pyx_L4_argument_unpacking_done;
7825  __pyx_L5_argtuple_error:;
7826  __Pyx_RaiseArgtupleInvalid("parametricFiniteElementSpace_getGradientValuesTrace", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2746, __pyx_L3_error)
7827  __pyx_L3_error:;
7828  __Pyx_AddTraceback("cfemIntegrals.parametricFiniteElementSpace_getGradientValuesTrace", __pyx_clineno, __pyx_lineno, __pyx_filename);
7829  __Pyx_RefNannyFinishContext();
7830  return NULL;
7831  __pyx_L4_argument_unpacking_done:;
7832  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_psi), __pyx_ptype_5numpy_ndarray, 1, "grad_psi", 0))) __PYX_ERR(0, 2746, __pyx_L1_error)
7833  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_permutations), __pyx_ptype_5numpy_ndarray, 1, "permutations", 0))) __PYX_ERR(0, 2747, __pyx_L1_error)
7834  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_inverseJacobianArray), __pyx_ptype_5numpy_ndarray, 1, "inverseJacobianArray", 0))) __PYX_ERR(0, 2748, __pyx_L1_error)
7835  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_vArray), __pyx_ptype_5numpy_ndarray, 1, "grad_vArray", 0))) __PYX_ERR(0, 2749, __pyx_L1_error)
7836  __pyx_r = __pyx_pf_13cfemIntegrals_42parametricFiniteElementSpace_getGradientValuesTrace(__pyx_self, __pyx_v_grad_psi, __pyx_v_permutations, __pyx_v_inverseJacobianArray, __pyx_v_grad_vArray);
7837 
7838  /* function exit code */
7839  goto __pyx_L0;
7840  __pyx_L1_error:;
7841  __pyx_r = NULL;
7842  __pyx_L0:;
7843  __Pyx_RefNannyFinishContext();
7844  return __pyx_r;
7845 }
7846 
7847 static PyObject *__pyx_pf_13cfemIntegrals_42parametricFiniteElementSpace_getGradientValuesTrace(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_grad_psi, PyArrayObject *__pyx_v_permutations, PyArrayObject *__pyx_v_inverseJacobianArray, PyArrayObject *__pyx_v_grad_vArray) {
7848  int __pyx_v_nElements_global;
7849  int __pyx_v_nElementBoundaries_element;
7850  int __pyx_v_nElementBoundaryQuadraturePoints_elementBoundary;
7851  int __pyx_v_nDOF_element;
7852  int __pyx_v_nSpace_global;
7853  PyObject *__pyx_r = NULL;
7854  __Pyx_RefNannyDeclarations
7855  __Pyx_RefNannySetupContext("parametricFiniteElementSpace_getGradientValuesTrace", 0);
7856 
7857  /* "cfemIntegrals.pyx":2750
7858  * np.ndarray inverseJacobianArray,
7859  * np.ndarray grad_vArray):
7860  * cdef int nElements_global = grad_vArray.shape[0] # <<<<<<<<<<<<<<
7861  * cdef int nElementBoundaries_element = grad_vArray.shape[1]
7862  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = grad_vArray.shape[2]
7863  */
7864  __pyx_v_nElements_global = (__pyx_v_grad_vArray->dimensions[0]);
7865 
7866  /* "cfemIntegrals.pyx":2751
7867  * np.ndarray grad_vArray):
7868  * cdef int nElements_global = grad_vArray.shape[0]
7869  * cdef int nElementBoundaries_element = grad_vArray.shape[1] # <<<<<<<<<<<<<<
7870  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = grad_vArray.shape[2]
7871  * cdef int nDOF_element = grad_vArray.shape[3]
7872  */
7873  __pyx_v_nElementBoundaries_element = (__pyx_v_grad_vArray->dimensions[1]);
7874 
7875  /* "cfemIntegrals.pyx":2752
7876  * cdef int nElements_global = grad_vArray.shape[0]
7877  * cdef int nElementBoundaries_element = grad_vArray.shape[1]
7878  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = grad_vArray.shape[2] # <<<<<<<<<<<<<<
7879  * cdef int nDOF_element = grad_vArray.shape[3]
7880  * cdef int nSpace_global = grad_vArray.shape[4]
7881  */
7882  __pyx_v_nElementBoundaryQuadraturePoints_elementBoundary = (__pyx_v_grad_vArray->dimensions[2]);
7883 
7884  /* "cfemIntegrals.pyx":2753
7885  * cdef int nElementBoundaries_element = grad_vArray.shape[1]
7886  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = grad_vArray.shape[2]
7887  * cdef int nDOF_element = grad_vArray.shape[3] # <<<<<<<<<<<<<<
7888  * cdef int nSpace_global = grad_vArray.shape[4]
7889  * cparametricFiniteElementSpace_getGradientValuesTrace(nElements_global,
7890  */
7891  __pyx_v_nDOF_element = (__pyx_v_grad_vArray->dimensions[3]);
7892 
7893  /* "cfemIntegrals.pyx":2754
7894  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = grad_vArray.shape[2]
7895  * cdef int nDOF_element = grad_vArray.shape[3]
7896  * cdef int nSpace_global = grad_vArray.shape[4] # <<<<<<<<<<<<<<
7897  * cparametricFiniteElementSpace_getGradientValuesTrace(nElements_global,
7898  * nElementBoundaries_element,
7899  */
7900  __pyx_v_nSpace_global = (__pyx_v_grad_vArray->dimensions[4]);
7901 
7902  /* "cfemIntegrals.pyx":2755
7903  * cdef int nDOF_element = grad_vArray.shape[3]
7904  * cdef int nSpace_global = grad_vArray.shape[4]
7905  * cparametricFiniteElementSpace_getGradientValuesTrace(nElements_global, # <<<<<<<<<<<<<<
7906  * nElementBoundaries_element,
7907  * nElementBoundaryQuadraturePoints_elementBoundary,
7908  */
7909  parametricFiniteElementSpace_getGradientValuesTrace(__pyx_v_nElements_global, __pyx_v_nElementBoundaries_element, __pyx_v_nElementBoundaryQuadraturePoints_elementBoundary, __pyx_v_nDOF_element, __pyx_v_nSpace_global, ((double *)__pyx_v_grad_psi->data), ((int *)__pyx_v_permutations->data), ((double *)__pyx_v_inverseJacobianArray->data), ((double *)__pyx_v_grad_vArray->data));
7910 
7911  /* "cfemIntegrals.pyx":2746
7912  * <double*>inverseJacobianArray.data,
7913  * <double*>grad_vArray.data)
7914  * def parametricFiniteElementSpace_getGradientValuesTrace(np.ndarray grad_psi, # <<<<<<<<<<<<<<
7915  * np.ndarray permutations,
7916  * np.ndarray inverseJacobianArray,
7917  */
7918 
7919  /* function exit code */
7920  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7921  __Pyx_XGIVEREF(__pyx_r);
7922  __Pyx_RefNannyFinishContext();
7923  return __pyx_r;
7924 }
7925 
7926 /* "cfemIntegrals.pyx":2764
7927  * <double*>inverseJacobianArray.data,
7928  * <double*>grad_vArray.data)
7929  * def parametricMaps_getPermutations(np.ndarray xiArray, # <<<<<<<<<<<<<<
7930  * np.ndarray permutations):
7931  * cdef int nElements_global = xiArray.shape[0]
7932  */
7933 
7934 /* Python wrapper */
7935 static PyObject *__pyx_pw_13cfemIntegrals_45parametricMaps_getPermutations(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
7936 static PyMethodDef __pyx_mdef_13cfemIntegrals_45parametricMaps_getPermutations = {"parametricMaps_getPermutations", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_45parametricMaps_getPermutations, METH_VARARGS|METH_KEYWORDS, 0};
7937 static PyObject *__pyx_pw_13cfemIntegrals_45parametricMaps_getPermutations(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
7938  PyArrayObject *__pyx_v_xiArray = 0;
7939  PyArrayObject *__pyx_v_permutations = 0;
7940  int __pyx_lineno = 0;
7941  const char *__pyx_filename = NULL;
7942  int __pyx_clineno = 0;
7943  PyObject *__pyx_r = 0;
7944  __Pyx_RefNannyDeclarations
7945  __Pyx_RefNannySetupContext("parametricMaps_getPermutations (wrapper)", 0);
7946  {
7947  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_xiArray,&__pyx_n_s_permutations,0};
7948  PyObject* values[2] = {0,0};
7949  if (unlikely(__pyx_kwds)) {
7950  Py_ssize_t kw_args;
7951  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
7952  switch (pos_args) {
7953  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7954  CYTHON_FALLTHROUGH;
7955  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7956  CYTHON_FALLTHROUGH;
7957  case 0: break;
7958  default: goto __pyx_L5_argtuple_error;
7959  }
7960  kw_args = PyDict_Size(__pyx_kwds);
7961  switch (pos_args) {
7962  case 0:
7963  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xiArray)) != 0)) kw_args--;
7964  else goto __pyx_L5_argtuple_error;
7965  CYTHON_FALLTHROUGH;
7966  case 1:
7967  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_permutations)) != 0)) kw_args--;
7968  else {
7969  __Pyx_RaiseArgtupleInvalid("parametricMaps_getPermutations", 1, 2, 2, 1); __PYX_ERR(0, 2764, __pyx_L3_error)
7970  }
7971  }
7972  if (unlikely(kw_args > 0)) {
7973  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parametricMaps_getPermutations") < 0)) __PYX_ERR(0, 2764, __pyx_L3_error)
7974  }
7975  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
7976  goto __pyx_L5_argtuple_error;
7977  } else {
7978  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7979  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7980  }
7981  __pyx_v_xiArray = ((PyArrayObject *)values[0]);
7982  __pyx_v_permutations = ((PyArrayObject *)values[1]);
7983  }
7984  goto __pyx_L4_argument_unpacking_done;
7985  __pyx_L5_argtuple_error:;
7986  __Pyx_RaiseArgtupleInvalid("parametricMaps_getPermutations", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2764, __pyx_L3_error)
7987  __pyx_L3_error:;
7988  __Pyx_AddTraceback("cfemIntegrals.parametricMaps_getPermutations", __pyx_clineno, __pyx_lineno, __pyx_filename);
7989  __Pyx_RefNannyFinishContext();
7990  return NULL;
7991  __pyx_L4_argument_unpacking_done:;
7992  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xiArray), __pyx_ptype_5numpy_ndarray, 1, "xiArray", 0))) __PYX_ERR(0, 2764, __pyx_L1_error)
7993  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_permutations), __pyx_ptype_5numpy_ndarray, 1, "permutations", 0))) __PYX_ERR(0, 2765, __pyx_L1_error)
7994  __pyx_r = __pyx_pf_13cfemIntegrals_44parametricMaps_getPermutations(__pyx_self, __pyx_v_xiArray, __pyx_v_permutations);
7995 
7996  /* function exit code */
7997  goto __pyx_L0;
7998  __pyx_L1_error:;
7999  __pyx_r = NULL;
8000  __pyx_L0:;
8001  __Pyx_RefNannyFinishContext();
8002  return __pyx_r;
8003 }
8004 
8005 static PyObject *__pyx_pf_13cfemIntegrals_44parametricMaps_getPermutations(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_xiArray, PyArrayObject *__pyx_v_permutations) {
8006  int __pyx_v_nElements_global;
8007  int __pyx_v_nElementBoundaries_element;
8008  int __pyx_v_nElementBoundaryQuadraturePoints_elementBoundary;
8009  int __pyx_v_nSpace_global;
8010  PyObject *__pyx_r = NULL;
8011  __Pyx_RefNannyDeclarations
8012  __Pyx_RefNannySetupContext("parametricMaps_getPermutations", 0);
8013 
8014  /* "cfemIntegrals.pyx":2766
8015  * def parametricMaps_getPermutations(np.ndarray xiArray,
8016  * np.ndarray permutations):
8017  * cdef int nElements_global = xiArray.shape[0] # <<<<<<<<<<<<<<
8018  * cdef int nElementBoundaries_element = xiArray.shape[1]
8019  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = xiArray.shape[2]
8020  */
8021  __pyx_v_nElements_global = (__pyx_v_xiArray->dimensions[0]);
8022 
8023  /* "cfemIntegrals.pyx":2767
8024  * np.ndarray permutations):
8025  * cdef int nElements_global = xiArray.shape[0]
8026  * cdef int nElementBoundaries_element = xiArray.shape[1] # <<<<<<<<<<<<<<
8027  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = xiArray.shape[2]
8028  * cdef int nSpace_global = xiArray.shape[3]
8029  */
8030  __pyx_v_nElementBoundaries_element = (__pyx_v_xiArray->dimensions[1]);
8031 
8032  /* "cfemIntegrals.pyx":2768
8033  * cdef int nElements_global = xiArray.shape[0]
8034  * cdef int nElementBoundaries_element = xiArray.shape[1]
8035  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = xiArray.shape[2] # <<<<<<<<<<<<<<
8036  * cdef int nSpace_global = xiArray.shape[3]
8037  * cparametricMaps_getPermutations(nElements_global,
8038  */
8039  __pyx_v_nElementBoundaryQuadraturePoints_elementBoundary = (__pyx_v_xiArray->dimensions[2]);
8040 
8041  /* "cfemIntegrals.pyx":2769
8042  * cdef int nElementBoundaries_element = xiArray.shape[1]
8043  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = xiArray.shape[2]
8044  * cdef int nSpace_global = xiArray.shape[3] # <<<<<<<<<<<<<<
8045  * cparametricMaps_getPermutations(nElements_global,
8046  * nElementBoundaries_element,
8047  */
8048  __pyx_v_nSpace_global = (__pyx_v_xiArray->dimensions[3]);
8049 
8050  /* "cfemIntegrals.pyx":2770
8051  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = xiArray.shape[2]
8052  * cdef int nSpace_global = xiArray.shape[3]
8053  * cparametricMaps_getPermutations(nElements_global, # <<<<<<<<<<<<<<
8054  * nElementBoundaries_element,
8055  * nElementBoundaryQuadraturePoints_elementBoundary,
8056  */
8057  parametricMaps_getPermutations(__pyx_v_nElements_global, __pyx_v_nElementBoundaries_element, __pyx_v_nElementBoundaryQuadraturePoints_elementBoundary, __pyx_v_nSpace_global, ((double *)__pyx_v_xiArray->data), ((int *)__pyx_v_permutations->data));
8058 
8059  /* "cfemIntegrals.pyx":2764
8060  * <double*>inverseJacobianArray.data,
8061  * <double*>grad_vArray.data)
8062  * def parametricMaps_getPermutations(np.ndarray xiArray, # <<<<<<<<<<<<<<
8063  * np.ndarray permutations):
8064  * cdef int nElements_global = xiArray.shape[0]
8065  */
8066 
8067  /* function exit code */
8068  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8069  __Pyx_XGIVEREF(__pyx_r);
8070  __Pyx_RefNannyFinishContext();
8071  return __pyx_r;
8072 }
8073 
8074 /* "cfemIntegrals.pyx":2776
8075  * <double*>xiArray.data,
8076  * <int *>permutations.data)
8077  * def parametricMaps_getPermutationsGlobalExterior(np.ndarray exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
8078  * np.ndarray elementBoundaryElementsArray,
8079  * np.ndarray elementBoundaryLocalElementBoundariesArray,
8080  */
8081 
8082 /* Python wrapper */
8083 static PyObject *__pyx_pw_13cfemIntegrals_47parametricMaps_getPermutationsGlobalExterior(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
8084 static PyMethodDef __pyx_mdef_13cfemIntegrals_47parametricMaps_getPermutationsGlobalExterior = {"parametricMaps_getPermutationsGlobalExterior", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_47parametricMaps_getPermutationsGlobalExterior, METH_VARARGS|METH_KEYWORDS, 0};
8085 static PyObject *__pyx_pw_13cfemIntegrals_47parametricMaps_getPermutationsGlobalExterior(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
8086  PyArrayObject *__pyx_v_exteriorElementBoundariesArray = 0;
8087  PyArrayObject *__pyx_v_elementBoundaryElementsArray = 0;
8088  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray = 0;
8089  PyArrayObject *__pyx_v_xiArray = 0;
8090  PyArrayObject *__pyx_v_permutations = 0;
8091  int __pyx_lineno = 0;
8092  const char *__pyx_filename = NULL;
8093  int __pyx_clineno = 0;
8094  PyObject *__pyx_r = 0;
8095  __Pyx_RefNannyDeclarations
8096  __Pyx_RefNannySetupContext("parametricMaps_getPermutationsGlobalExterior (wrapper)", 0);
8097  {
8098  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exteriorElementBoundariesArray,&__pyx_n_s_elementBoundaryElementsArray,&__pyx_n_s_elementBoundaryLocalElementBound_2,&__pyx_n_s_xiArray,&__pyx_n_s_permutations,0};
8099  PyObject* values[5] = {0,0,0,0,0};
8100  if (unlikely(__pyx_kwds)) {
8101  Py_ssize_t kw_args;
8102  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
8103  switch (pos_args) {
8104  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
8105  CYTHON_FALLTHROUGH;
8106  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
8107  CYTHON_FALLTHROUGH;
8108  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
8109  CYTHON_FALLTHROUGH;
8110  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
8111  CYTHON_FALLTHROUGH;
8112  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8113  CYTHON_FALLTHROUGH;
8114  case 0: break;
8115  default: goto __pyx_L5_argtuple_error;
8116  }
8117  kw_args = PyDict_Size(__pyx_kwds);
8118  switch (pos_args) {
8119  case 0:
8120  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exteriorElementBoundariesArray)) != 0)) kw_args--;
8121  else goto __pyx_L5_argtuple_error;
8122  CYTHON_FALLTHROUGH;
8123  case 1:
8124  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElementsArray)) != 0)) kw_args--;
8125  else {
8126  __Pyx_RaiseArgtupleInvalid("parametricMaps_getPermutationsGlobalExterior", 1, 5, 5, 1); __PYX_ERR(0, 2776, __pyx_L3_error)
8127  }
8128  CYTHON_FALLTHROUGH;
8129  case 2:
8130  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound_2)) != 0)) kw_args--;
8131  else {
8132  __Pyx_RaiseArgtupleInvalid("parametricMaps_getPermutationsGlobalExterior", 1, 5, 5, 2); __PYX_ERR(0, 2776, __pyx_L3_error)
8133  }
8134  CYTHON_FALLTHROUGH;
8135  case 3:
8136  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xiArray)) != 0)) kw_args--;
8137  else {
8138  __Pyx_RaiseArgtupleInvalid("parametricMaps_getPermutationsGlobalExterior", 1, 5, 5, 3); __PYX_ERR(0, 2776, __pyx_L3_error)
8139  }
8140  CYTHON_FALLTHROUGH;
8141  case 4:
8142  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_permutations)) != 0)) kw_args--;
8143  else {
8144  __Pyx_RaiseArgtupleInvalid("parametricMaps_getPermutationsGlobalExterior", 1, 5, 5, 4); __PYX_ERR(0, 2776, __pyx_L3_error)
8145  }
8146  }
8147  if (unlikely(kw_args > 0)) {
8148  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parametricMaps_getPermutationsGlobalExterior") < 0)) __PYX_ERR(0, 2776, __pyx_L3_error)
8149  }
8150  } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
8151  goto __pyx_L5_argtuple_error;
8152  } else {
8153  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8154  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
8155  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
8156  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
8157  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
8158  }
8159  __pyx_v_exteriorElementBoundariesArray = ((PyArrayObject *)values[0]);
8160  __pyx_v_elementBoundaryElementsArray = ((PyArrayObject *)values[1]);
8161  __pyx_v_elementBoundaryLocalElementBoundariesArray = ((PyArrayObject *)values[2]);
8162  __pyx_v_xiArray = ((PyArrayObject *)values[3]);
8163  __pyx_v_permutations = ((PyArrayObject *)values[4]);
8164  }
8165  goto __pyx_L4_argument_unpacking_done;
8166  __pyx_L5_argtuple_error:;
8167  __Pyx_RaiseArgtupleInvalid("parametricMaps_getPermutationsGlobalExterior", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2776, __pyx_L3_error)
8168  __pyx_L3_error:;
8169  __Pyx_AddTraceback("cfemIntegrals.parametricMaps_getPermutationsGlobalExterior", __pyx_clineno, __pyx_lineno, __pyx_filename);
8170  __Pyx_RefNannyFinishContext();
8171  return NULL;
8172  __pyx_L4_argument_unpacking_done:;
8173  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exteriorElementBoundariesArray), __pyx_ptype_5numpy_ndarray, 1, "exteriorElementBoundariesArray", 0))) __PYX_ERR(0, 2776, __pyx_L1_error)
8174  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElementsArray), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElementsArray", 0))) __PYX_ERR(0, 2777, __pyx_L1_error)
8175  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundariesArray), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundariesArray", 0))) __PYX_ERR(0, 2778, __pyx_L1_error)
8176  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xiArray), __pyx_ptype_5numpy_ndarray, 1, "xiArray", 0))) __PYX_ERR(0, 2779, __pyx_L1_error)
8177  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_permutations), __pyx_ptype_5numpy_ndarray, 1, "permutations", 0))) __PYX_ERR(0, 2780, __pyx_L1_error)
8178  __pyx_r = __pyx_pf_13cfemIntegrals_46parametricMaps_getPermutationsGlobalExterior(__pyx_self, __pyx_v_exteriorElementBoundariesArray, __pyx_v_elementBoundaryElementsArray, __pyx_v_elementBoundaryLocalElementBoundariesArray, __pyx_v_xiArray, __pyx_v_permutations);
8179 
8180  /* function exit code */
8181  goto __pyx_L0;
8182  __pyx_L1_error:;
8183  __pyx_r = NULL;
8184  __pyx_L0:;
8185  __Pyx_RefNannyFinishContext();
8186  return __pyx_r;
8187 }
8188 
8189 static PyObject *__pyx_pf_13cfemIntegrals_46parametricMaps_getPermutationsGlobalExterior(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_exteriorElementBoundariesArray, PyArrayObject *__pyx_v_elementBoundaryElementsArray, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray, PyArrayObject *__pyx_v_xiArray, PyArrayObject *__pyx_v_permutations) {
8190  npy_intp __pyx_v_nElementBoundaryQuadraturePoints_elementBoundary;
8191  npy_intp __pyx_v_nSpace_global;
8192  npy_intp __pyx_v_nExteriorElementBoundaries_global;
8193  PyObject *__pyx_r = NULL;
8194  __Pyx_RefNannyDeclarations
8195  __Pyx_RefNannySetupContext("parametricMaps_getPermutationsGlobalExterior", 0);
8196 
8197  /* "cfemIntegrals.pyx":2781
8198  * np.ndarray xiArray,
8199  * np.ndarray permutations):
8200  * nElementBoundaryQuadraturePoints_elementBoundary = xiArray.shape[1] # <<<<<<<<<<<<<<
8201  * nSpace_global = xiArray.shape[2]
8202  * nExteriorElementBoundaries_global = exteriorElementBoundariesArray.shape[0]
8203  */
8204  __pyx_v_nElementBoundaryQuadraturePoints_elementBoundary = (__pyx_v_xiArray->dimensions[1]);
8205 
8206  /* "cfemIntegrals.pyx":2782
8207  * np.ndarray permutations):
8208  * nElementBoundaryQuadraturePoints_elementBoundary = xiArray.shape[1]
8209  * nSpace_global = xiArray.shape[2] # <<<<<<<<<<<<<<
8210  * nExteriorElementBoundaries_global = exteriorElementBoundariesArray.shape[0]
8211  * cparametricMaps_getPermutationsGlobalExterior(nElementBoundaryQuadraturePoints_elementBoundary,
8212  */
8213  __pyx_v_nSpace_global = (__pyx_v_xiArray->dimensions[2]);
8214 
8215  /* "cfemIntegrals.pyx":2783
8216  * nElementBoundaryQuadraturePoints_elementBoundary = xiArray.shape[1]
8217  * nSpace_global = xiArray.shape[2]
8218  * nExteriorElementBoundaries_global = exteriorElementBoundariesArray.shape[0] # <<<<<<<<<<<<<<
8219  * cparametricMaps_getPermutationsGlobalExterior(nElementBoundaryQuadraturePoints_elementBoundary,
8220  * nSpace_global,
8221  */
8222  __pyx_v_nExteriorElementBoundaries_global = (__pyx_v_exteriorElementBoundariesArray->dimensions[0]);
8223 
8224  /* "cfemIntegrals.pyx":2784
8225  * nSpace_global = xiArray.shape[2]
8226  * nExteriorElementBoundaries_global = exteriorElementBoundariesArray.shape[0]
8227  * cparametricMaps_getPermutationsGlobalExterior(nElementBoundaryQuadraturePoints_elementBoundary, # <<<<<<<<<<<<<<
8228  * nSpace_global,
8229  * nExteriorElementBoundaries_global,
8230  */
8231  parametricMaps_getPermutationsGlobalExterior(__pyx_v_nElementBoundaryQuadraturePoints_elementBoundary, __pyx_v_nSpace_global, __pyx_v_nExteriorElementBoundaries_global, ((int *)__pyx_v_exteriorElementBoundariesArray->data), ((int *)__pyx_v_elementBoundaryElementsArray->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundariesArray->data), ((double *)__pyx_v_xiArray->data), ((int *)__pyx_v_permutations->data));
8232 
8233  /* "cfemIntegrals.pyx":2776
8234  * <double*>xiArray.data,
8235  * <int *>permutations.data)
8236  * def parametricMaps_getPermutationsGlobalExterior(np.ndarray exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
8237  * np.ndarray elementBoundaryElementsArray,
8238  * np.ndarray elementBoundaryLocalElementBoundariesArray,
8239  */
8240 
8241  /* function exit code */
8242  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8243  __Pyx_XGIVEREF(__pyx_r);
8244  __Pyx_RefNannyFinishContext();
8245  return __pyx_r;
8246 }
8247 
8248 /* "cfemIntegrals.pyx":2792
8249  * <double*> xiArray.data,
8250  * <int*> permutations.data)
8251  * def getPermutationsGlobal(np.ndarray xArray, # <<<<<<<<<<<<<<
8252  * np.ndarray xArrayNew,
8253  * np.ndarray permutations):
8254  */
8255 
8256 /* Python wrapper */
8257 static PyObject *__pyx_pw_13cfemIntegrals_49getPermutationsGlobal(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
8258 static PyMethodDef __pyx_mdef_13cfemIntegrals_49getPermutationsGlobal = {"getPermutationsGlobal", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_49getPermutationsGlobal, METH_VARARGS|METH_KEYWORDS, 0};
8259 static PyObject *__pyx_pw_13cfemIntegrals_49getPermutationsGlobal(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
8260  PyArrayObject *__pyx_v_xArray = 0;
8261  PyArrayObject *__pyx_v_xArrayNew = 0;
8262  PyArrayObject *__pyx_v_permutations = 0;
8263  int __pyx_lineno = 0;
8264  const char *__pyx_filename = NULL;
8265  int __pyx_clineno = 0;
8266  PyObject *__pyx_r = 0;
8267  __Pyx_RefNannyDeclarations
8268  __Pyx_RefNannySetupContext("getPermutationsGlobal (wrapper)", 0);
8269  {
8270  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_xArray,&__pyx_n_s_xArrayNew,&__pyx_n_s_permutations,0};
8271  PyObject* values[3] = {0,0,0};
8272  if (unlikely(__pyx_kwds)) {
8273  Py_ssize_t kw_args;
8274  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
8275  switch (pos_args) {
8276  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
8277  CYTHON_FALLTHROUGH;
8278  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
8279  CYTHON_FALLTHROUGH;
8280  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8281  CYTHON_FALLTHROUGH;
8282  case 0: break;
8283  default: goto __pyx_L5_argtuple_error;
8284  }
8285  kw_args = PyDict_Size(__pyx_kwds);
8286  switch (pos_args) {
8287  case 0:
8288  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xArray)) != 0)) kw_args--;
8289  else goto __pyx_L5_argtuple_error;
8290  CYTHON_FALLTHROUGH;
8291  case 1:
8292  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xArrayNew)) != 0)) kw_args--;
8293  else {
8294  __Pyx_RaiseArgtupleInvalid("getPermutationsGlobal", 1, 3, 3, 1); __PYX_ERR(0, 2792, __pyx_L3_error)
8295  }
8296  CYTHON_FALLTHROUGH;
8297  case 2:
8298  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_permutations)) != 0)) kw_args--;
8299  else {
8300  __Pyx_RaiseArgtupleInvalid("getPermutationsGlobal", 1, 3, 3, 2); __PYX_ERR(0, 2792, __pyx_L3_error)
8301  }
8302  }
8303  if (unlikely(kw_args > 0)) {
8304  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getPermutationsGlobal") < 0)) __PYX_ERR(0, 2792, __pyx_L3_error)
8305  }
8306  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
8307  goto __pyx_L5_argtuple_error;
8308  } else {
8309  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8310  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
8311  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
8312  }
8313  __pyx_v_xArray = ((PyArrayObject *)values[0]);
8314  __pyx_v_xArrayNew = ((PyArrayObject *)values[1]);
8315  __pyx_v_permutations = ((PyArrayObject *)values[2]);
8316  }
8317  goto __pyx_L4_argument_unpacking_done;
8318  __pyx_L5_argtuple_error:;
8319  __Pyx_RaiseArgtupleInvalid("getPermutationsGlobal", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2792, __pyx_L3_error)
8320  __pyx_L3_error:;
8321  __Pyx_AddTraceback("cfemIntegrals.getPermutationsGlobal", __pyx_clineno, __pyx_lineno, __pyx_filename);
8322  __Pyx_RefNannyFinishContext();
8323  return NULL;
8324  __pyx_L4_argument_unpacking_done:;
8325  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xArray), __pyx_ptype_5numpy_ndarray, 1, "xArray", 0))) __PYX_ERR(0, 2792, __pyx_L1_error)
8326  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xArrayNew), __pyx_ptype_5numpy_ndarray, 1, "xArrayNew", 0))) __PYX_ERR(0, 2793, __pyx_L1_error)
8327  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_permutations), __pyx_ptype_5numpy_ndarray, 1, "permutations", 0))) __PYX_ERR(0, 2794, __pyx_L1_error)
8328  __pyx_r = __pyx_pf_13cfemIntegrals_48getPermutationsGlobal(__pyx_self, __pyx_v_xArray, __pyx_v_xArrayNew, __pyx_v_permutations);
8329 
8330  /* function exit code */
8331  goto __pyx_L0;
8332  __pyx_L1_error:;
8333  __pyx_r = NULL;
8334  __pyx_L0:;
8335  __Pyx_RefNannyFinishContext();
8336  return __pyx_r;
8337 }
8338 
8339 static PyObject *__pyx_pf_13cfemIntegrals_48getPermutationsGlobal(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_xArray, PyArrayObject *__pyx_v_xArrayNew, PyArrayObject *__pyx_v_permutations) {
8340  int __pyx_v_nElementBoundaries_global;
8341  int __pyx_v_nElementBoundaryQuadraturePoints_elementBoundary;
8342  PyObject *__pyx_r = NULL;
8343  __Pyx_RefNannyDeclarations
8344  __Pyx_RefNannySetupContext("getPermutationsGlobal", 0);
8345 
8346  /* "cfemIntegrals.pyx":2795
8347  * np.ndarray xArrayNew,
8348  * np.ndarray permutations):
8349  * cdef int nElementBoundaries_global = xArray.shape[0] # <<<<<<<<<<<<<<
8350  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = xArray.shape[1]
8351  * cgetPermutationsGlobal(nElementBoundaries_global,
8352  */
8353  __pyx_v_nElementBoundaries_global = (__pyx_v_xArray->dimensions[0]);
8354 
8355  /* "cfemIntegrals.pyx":2796
8356  * np.ndarray permutations):
8357  * cdef int nElementBoundaries_global = xArray.shape[0]
8358  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = xArray.shape[1] # <<<<<<<<<<<<<<
8359  * cgetPermutationsGlobal(nElementBoundaries_global,
8360  * nElementBoundaryQuadraturePoints_elementBoundary,
8361  */
8362  __pyx_v_nElementBoundaryQuadraturePoints_elementBoundary = (__pyx_v_xArray->dimensions[1]);
8363 
8364  /* "cfemIntegrals.pyx":2797
8365  * cdef int nElementBoundaries_global = xArray.shape[0]
8366  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = xArray.shape[1]
8367  * cgetPermutationsGlobal(nElementBoundaries_global, # <<<<<<<<<<<<<<
8368  * nElementBoundaryQuadraturePoints_elementBoundary,
8369  * <double*> xArray.data,
8370  */
8371  getPermutationsGlobal(__pyx_v_nElementBoundaries_global, __pyx_v_nElementBoundaryQuadraturePoints_elementBoundary, ((double *)__pyx_v_xArray->data), ((double *)__pyx_v_xArrayNew->data), ((int *)__pyx_v_permutations->data));
8372 
8373  /* "cfemIntegrals.pyx":2792
8374  * <double*> xiArray.data,
8375  * <int*> permutations.data)
8376  * def getPermutationsGlobal(np.ndarray xArray, # <<<<<<<<<<<<<<
8377  * np.ndarray xArrayNew,
8378  * np.ndarray permutations):
8379  */
8380 
8381  /* function exit code */
8382  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8383  __Pyx_XGIVEREF(__pyx_r);
8384  __Pyx_RefNannyFinishContext();
8385  return __pyx_r;
8386 }
8387 
8388 /* "cfemIntegrals.pyx":2802
8389  * <double*> xArrayNew.data,
8390  * <int*> permutations.data)
8391  * def parametricMaps_getValues(np.ndarray psi, # <<<<<<<<<<<<<<
8392  * np.ndarray l2g,
8393  * np.ndarray nodeArray,
8394  */
8395 
8396 /* Python wrapper */
8397 static PyObject *__pyx_pw_13cfemIntegrals_51parametricMaps_getValues(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
8398 static PyMethodDef __pyx_mdef_13cfemIntegrals_51parametricMaps_getValues = {"parametricMaps_getValues", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_51parametricMaps_getValues, METH_VARARGS|METH_KEYWORDS, 0};
8399 static PyObject *__pyx_pw_13cfemIntegrals_51parametricMaps_getValues(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
8400  PyArrayObject *__pyx_v_psi = 0;
8401  PyArrayObject *__pyx_v_l2g = 0;
8402  PyArrayObject *__pyx_v_nodeArray = 0;
8403  PyArrayObject *__pyx_v_xArray = 0;
8404  int __pyx_lineno = 0;
8405  const char *__pyx_filename = NULL;
8406  int __pyx_clineno = 0;
8407  PyObject *__pyx_r = 0;
8408  __Pyx_RefNannyDeclarations
8409  __Pyx_RefNannySetupContext("parametricMaps_getValues (wrapper)", 0);
8410  {
8411  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_psi,&__pyx_n_s_l2g,&__pyx_n_s_nodeArray,&__pyx_n_s_xArray,0};
8412  PyObject* values[4] = {0,0,0,0};
8413  if (unlikely(__pyx_kwds)) {
8414  Py_ssize_t kw_args;
8415  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
8416  switch (pos_args) {
8417  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
8418  CYTHON_FALLTHROUGH;
8419  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
8420  CYTHON_FALLTHROUGH;
8421  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
8422  CYTHON_FALLTHROUGH;
8423  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8424  CYTHON_FALLTHROUGH;
8425  case 0: break;
8426  default: goto __pyx_L5_argtuple_error;
8427  }
8428  kw_args = PyDict_Size(__pyx_kwds);
8429  switch (pos_args) {
8430  case 0:
8431  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_psi)) != 0)) kw_args--;
8432  else goto __pyx_L5_argtuple_error;
8433  CYTHON_FALLTHROUGH;
8434  case 1:
8435  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_l2g)) != 0)) kw_args--;
8436  else {
8437  __Pyx_RaiseArgtupleInvalid("parametricMaps_getValues", 1, 4, 4, 1); __PYX_ERR(0, 2802, __pyx_L3_error)
8438  }
8439  CYTHON_FALLTHROUGH;
8440  case 2:
8441  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodeArray)) != 0)) kw_args--;
8442  else {
8443  __Pyx_RaiseArgtupleInvalid("parametricMaps_getValues", 1, 4, 4, 2); __PYX_ERR(0, 2802, __pyx_L3_error)
8444  }
8445  CYTHON_FALLTHROUGH;
8446  case 3:
8447  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xArray)) != 0)) kw_args--;
8448  else {
8449  __Pyx_RaiseArgtupleInvalid("parametricMaps_getValues", 1, 4, 4, 3); __PYX_ERR(0, 2802, __pyx_L3_error)
8450  }
8451  }
8452  if (unlikely(kw_args > 0)) {
8453  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parametricMaps_getValues") < 0)) __PYX_ERR(0, 2802, __pyx_L3_error)
8454  }
8455  } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
8456  goto __pyx_L5_argtuple_error;
8457  } else {
8458  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8459  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
8460  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
8461  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
8462  }
8463  __pyx_v_psi = ((PyArrayObject *)values[0]);
8464  __pyx_v_l2g = ((PyArrayObject *)values[1]);
8465  __pyx_v_nodeArray = ((PyArrayObject *)values[2]);
8466  __pyx_v_xArray = ((PyArrayObject *)values[3]);
8467  }
8468  goto __pyx_L4_argument_unpacking_done;
8469  __pyx_L5_argtuple_error:;
8470  __Pyx_RaiseArgtupleInvalid("parametricMaps_getValues", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2802, __pyx_L3_error)
8471  __pyx_L3_error:;
8472  __Pyx_AddTraceback("cfemIntegrals.parametricMaps_getValues", __pyx_clineno, __pyx_lineno, __pyx_filename);
8473  __Pyx_RefNannyFinishContext();
8474  return NULL;
8475  __pyx_L4_argument_unpacking_done:;
8476  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_psi), __pyx_ptype_5numpy_ndarray, 1, "psi", 0))) __PYX_ERR(0, 2802, __pyx_L1_error)
8477  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_l2g), __pyx_ptype_5numpy_ndarray, 1, "l2g", 0))) __PYX_ERR(0, 2803, __pyx_L1_error)
8478  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodeArray), __pyx_ptype_5numpy_ndarray, 1, "nodeArray", 0))) __PYX_ERR(0, 2804, __pyx_L1_error)
8479  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xArray), __pyx_ptype_5numpy_ndarray, 1, "xArray", 0))) __PYX_ERR(0, 2805, __pyx_L1_error)
8480  __pyx_r = __pyx_pf_13cfemIntegrals_50parametricMaps_getValues(__pyx_self, __pyx_v_psi, __pyx_v_l2g, __pyx_v_nodeArray, __pyx_v_xArray);
8481 
8482  /* function exit code */
8483  goto __pyx_L0;
8484  __pyx_L1_error:;
8485  __pyx_r = NULL;
8486  __pyx_L0:;
8487  __Pyx_RefNannyFinishContext();
8488  return __pyx_r;
8489 }
8490 
8491 static PyObject *__pyx_pf_13cfemIntegrals_50parametricMaps_getValues(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_psi, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_nodeArray, PyArrayObject *__pyx_v_xArray) {
8492  int __pyx_v_nElements_global;
8493  int __pyx_v_nQuadraturePoints_element;
8494  int __pyx_v_nDOF_element;
8495  int __pyx_v_nSpace_global;
8496  PyObject *__pyx_r = NULL;
8497  __Pyx_RefNannyDeclarations
8498  __Pyx_RefNannySetupContext("parametricMaps_getValues", 0);
8499 
8500  /* "cfemIntegrals.pyx":2806
8501  * np.ndarray nodeArray,
8502  * np.ndarray xArray):
8503  * cdef int nElements_global = xArray.shape[0] # <<<<<<<<<<<<<<
8504  * cdef int nQuadraturePoints_element = xArray.shape[1]
8505  * cdef int nDOF_element = l2g.shape[1]
8506  */
8507  __pyx_v_nElements_global = (__pyx_v_xArray->dimensions[0]);
8508 
8509  /* "cfemIntegrals.pyx":2807
8510  * np.ndarray xArray):
8511  * cdef int nElements_global = xArray.shape[0]
8512  * cdef int nQuadraturePoints_element = xArray.shape[1] # <<<<<<<<<<<<<<
8513  * cdef int nDOF_element = l2g.shape[1]
8514  * cdef int nSpace_global = xArray.shape[2]
8515  */
8516  __pyx_v_nQuadraturePoints_element = (__pyx_v_xArray->dimensions[1]);
8517 
8518  /* "cfemIntegrals.pyx":2808
8519  * cdef int nElements_global = xArray.shape[0]
8520  * cdef int nQuadraturePoints_element = xArray.shape[1]
8521  * cdef int nDOF_element = l2g.shape[1] # <<<<<<<<<<<<<<
8522  * cdef int nSpace_global = xArray.shape[2]
8523  * cparametricMaps_getValues(nElements_global,
8524  */
8525  __pyx_v_nDOF_element = (__pyx_v_l2g->dimensions[1]);
8526 
8527  /* "cfemIntegrals.pyx":2809
8528  * cdef int nQuadraturePoints_element = xArray.shape[1]
8529  * cdef int nDOF_element = l2g.shape[1]
8530  * cdef int nSpace_global = xArray.shape[2] # <<<<<<<<<<<<<<
8531  * cparametricMaps_getValues(nElements_global,
8532  * nQuadraturePoints_element,
8533  */
8534  __pyx_v_nSpace_global = (__pyx_v_xArray->dimensions[2]);
8535 
8536  /* "cfemIntegrals.pyx":2810
8537  * cdef int nDOF_element = l2g.shape[1]
8538  * cdef int nSpace_global = xArray.shape[2]
8539  * cparametricMaps_getValues(nElements_global, # <<<<<<<<<<<<<<
8540  * nQuadraturePoints_element,
8541  * nDOF_element,
8542  */
8543  parametricMaps_getValues(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_element, __pyx_v_nSpace_global, ((double *)__pyx_v_psi->data), ((int *)__pyx_v_l2g->data), ((double *)__pyx_v_nodeArray->data), ((double *)__pyx_v_xArray->data));
8544 
8545  /* "cfemIntegrals.pyx":2802
8546  * <double*> xArrayNew.data,
8547  * <int*> permutations.data)
8548  * def parametricMaps_getValues(np.ndarray psi, # <<<<<<<<<<<<<<
8549  * np.ndarray l2g,
8550  * np.ndarray nodeArray,
8551  */
8552 
8553  /* function exit code */
8554  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8555  __Pyx_XGIVEREF(__pyx_r);
8556  __Pyx_RefNannyFinishContext();
8557  return __pyx_r;
8558 }
8559 
8560 /* "cfemIntegrals.pyx":2818
8561  * <double*>nodeArray.data,
8562  * <double*>xArray.data)
8563  * def parametricMaps_getValuesTrace(np.ndarray psi, # <<<<<<<<<<<<<<
8564  * np.ndarray l2g,
8565  * np.ndarray nodeArray,
8566  */
8567 
8568 /* Python wrapper */
8569 static PyObject *__pyx_pw_13cfemIntegrals_53parametricMaps_getValuesTrace(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
8570 static PyMethodDef __pyx_mdef_13cfemIntegrals_53parametricMaps_getValuesTrace = {"parametricMaps_getValuesTrace", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_53parametricMaps_getValuesTrace, METH_VARARGS|METH_KEYWORDS, 0};
8571 static PyObject *__pyx_pw_13cfemIntegrals_53parametricMaps_getValuesTrace(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
8572  PyArrayObject *__pyx_v_psi = 0;
8573  PyArrayObject *__pyx_v_l2g = 0;
8574  PyArrayObject *__pyx_v_nodeArray = 0;
8575  PyArrayObject *__pyx_v_xArray = 0;
8576  int __pyx_lineno = 0;
8577  const char *__pyx_filename = NULL;
8578  int __pyx_clineno = 0;
8579  PyObject *__pyx_r = 0;
8580  __Pyx_RefNannyDeclarations
8581  __Pyx_RefNannySetupContext("parametricMaps_getValuesTrace (wrapper)", 0);
8582  {
8583  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_psi,&__pyx_n_s_l2g,&__pyx_n_s_nodeArray,&__pyx_n_s_xArray,0};
8584  PyObject* values[4] = {0,0,0,0};
8585  if (unlikely(__pyx_kwds)) {
8586  Py_ssize_t kw_args;
8587  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
8588  switch (pos_args) {
8589  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
8590  CYTHON_FALLTHROUGH;
8591  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
8592  CYTHON_FALLTHROUGH;
8593  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
8594  CYTHON_FALLTHROUGH;
8595  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8596  CYTHON_FALLTHROUGH;
8597  case 0: break;
8598  default: goto __pyx_L5_argtuple_error;
8599  }
8600  kw_args = PyDict_Size(__pyx_kwds);
8601  switch (pos_args) {
8602  case 0:
8603  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_psi)) != 0)) kw_args--;
8604  else goto __pyx_L5_argtuple_error;
8605  CYTHON_FALLTHROUGH;
8606  case 1:
8607  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_l2g)) != 0)) kw_args--;
8608  else {
8609  __Pyx_RaiseArgtupleInvalid("parametricMaps_getValuesTrace", 1, 4, 4, 1); __PYX_ERR(0, 2818, __pyx_L3_error)
8610  }
8611  CYTHON_FALLTHROUGH;
8612  case 2:
8613  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodeArray)) != 0)) kw_args--;
8614  else {
8615  __Pyx_RaiseArgtupleInvalid("parametricMaps_getValuesTrace", 1, 4, 4, 2); __PYX_ERR(0, 2818, __pyx_L3_error)
8616  }
8617  CYTHON_FALLTHROUGH;
8618  case 3:
8619  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xArray)) != 0)) kw_args--;
8620  else {
8621  __Pyx_RaiseArgtupleInvalid("parametricMaps_getValuesTrace", 1, 4, 4, 3); __PYX_ERR(0, 2818, __pyx_L3_error)
8622  }
8623  }
8624  if (unlikely(kw_args > 0)) {
8625  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parametricMaps_getValuesTrace") < 0)) __PYX_ERR(0, 2818, __pyx_L3_error)
8626  }
8627  } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
8628  goto __pyx_L5_argtuple_error;
8629  } else {
8630  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8631  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
8632  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
8633  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
8634  }
8635  __pyx_v_psi = ((PyArrayObject *)values[0]);
8636  __pyx_v_l2g = ((PyArrayObject *)values[1]);
8637  __pyx_v_nodeArray = ((PyArrayObject *)values[2]);
8638  __pyx_v_xArray = ((PyArrayObject *)values[3]);
8639  }
8640  goto __pyx_L4_argument_unpacking_done;
8641  __pyx_L5_argtuple_error:;
8642  __Pyx_RaiseArgtupleInvalid("parametricMaps_getValuesTrace", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2818, __pyx_L3_error)
8643  __pyx_L3_error:;
8644  __Pyx_AddTraceback("cfemIntegrals.parametricMaps_getValuesTrace", __pyx_clineno, __pyx_lineno, __pyx_filename);
8645  __Pyx_RefNannyFinishContext();
8646  return NULL;
8647  __pyx_L4_argument_unpacking_done:;
8648  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_psi), __pyx_ptype_5numpy_ndarray, 1, "psi", 0))) __PYX_ERR(0, 2818, __pyx_L1_error)
8649  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_l2g), __pyx_ptype_5numpy_ndarray, 1, "l2g", 0))) __PYX_ERR(0, 2819, __pyx_L1_error)
8650  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodeArray), __pyx_ptype_5numpy_ndarray, 1, "nodeArray", 0))) __PYX_ERR(0, 2820, __pyx_L1_error)
8651  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xArray), __pyx_ptype_5numpy_ndarray, 1, "xArray", 0))) __PYX_ERR(0, 2821, __pyx_L1_error)
8652  __pyx_r = __pyx_pf_13cfemIntegrals_52parametricMaps_getValuesTrace(__pyx_self, __pyx_v_psi, __pyx_v_l2g, __pyx_v_nodeArray, __pyx_v_xArray);
8653 
8654  /* function exit code */
8655  goto __pyx_L0;
8656  __pyx_L1_error:;
8657  __pyx_r = NULL;
8658  __pyx_L0:;
8659  __Pyx_RefNannyFinishContext();
8660  return __pyx_r;
8661 }
8662 
8663 static PyObject *__pyx_pf_13cfemIntegrals_52parametricMaps_getValuesTrace(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_psi, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_nodeArray, PyArrayObject *__pyx_v_xArray) {
8664  int __pyx_v_nElements_global;
8665  int __pyx_v_nElementBoundaries_element;
8666  int __pyx_v_nQuadraturePoints_element;
8667  int __pyx_v_nDOF_element;
8668  int __pyx_v_nSpace_global;
8669  PyObject *__pyx_r = NULL;
8670  __Pyx_RefNannyDeclarations
8671  __Pyx_RefNannySetupContext("parametricMaps_getValuesTrace", 0);
8672 
8673  /* "cfemIntegrals.pyx":2822
8674  * np.ndarray nodeArray,
8675  * np.ndarray xArray):
8676  * cdef int nElements_global = xArray.shape[0] # <<<<<<<<<<<<<<
8677  * cdef int nElementBoundaries_element = xArray.shape[1]
8678  * cdef int nQuadraturePoints_element = xArray.shape[2]
8679  */
8680  __pyx_v_nElements_global = (__pyx_v_xArray->dimensions[0]);
8681 
8682  /* "cfemIntegrals.pyx":2823
8683  * np.ndarray xArray):
8684  * cdef int nElements_global = xArray.shape[0]
8685  * cdef int nElementBoundaries_element = xArray.shape[1] # <<<<<<<<<<<<<<
8686  * cdef int nQuadraturePoints_element = xArray.shape[2]
8687  * cdef int nDOF_element = l2g.shape[1]
8688  */
8689  __pyx_v_nElementBoundaries_element = (__pyx_v_xArray->dimensions[1]);
8690 
8691  /* "cfemIntegrals.pyx":2824
8692  * cdef int nElements_global = xArray.shape[0]
8693  * cdef int nElementBoundaries_element = xArray.shape[1]
8694  * cdef int nQuadraturePoints_element = xArray.shape[2] # <<<<<<<<<<<<<<
8695  * cdef int nDOF_element = l2g.shape[1]
8696  * cdef int nSpace_global = xArray.shape[3]
8697  */
8698  __pyx_v_nQuadraturePoints_element = (__pyx_v_xArray->dimensions[2]);
8699 
8700  /* "cfemIntegrals.pyx":2825
8701  * cdef int nElementBoundaries_element = xArray.shape[1]
8702  * cdef int nQuadraturePoints_element = xArray.shape[2]
8703  * cdef int nDOF_element = l2g.shape[1] # <<<<<<<<<<<<<<
8704  * cdef int nSpace_global = xArray.shape[3]
8705  * cparametricMaps_getValuesTrace(nElements_global,
8706  */
8707  __pyx_v_nDOF_element = (__pyx_v_l2g->dimensions[1]);
8708 
8709  /* "cfemIntegrals.pyx":2826
8710  * cdef int nQuadraturePoints_element = xArray.shape[2]
8711  * cdef int nDOF_element = l2g.shape[1]
8712  * cdef int nSpace_global = xArray.shape[3] # <<<<<<<<<<<<<<
8713  * cparametricMaps_getValuesTrace(nElements_global,
8714  * nElementBoundaries_element,
8715  */
8716  __pyx_v_nSpace_global = (__pyx_v_xArray->dimensions[3]);
8717 
8718  /* "cfemIntegrals.pyx":2827
8719  * cdef int nDOF_element = l2g.shape[1]
8720  * cdef int nSpace_global = xArray.shape[3]
8721  * cparametricMaps_getValuesTrace(nElements_global, # <<<<<<<<<<<<<<
8722  * nElementBoundaries_element,
8723  * nQuadraturePoints_element,
8724  */
8725  parametricMaps_getValuesTrace(__pyx_v_nElements_global, __pyx_v_nElementBoundaries_element, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_element, __pyx_v_nSpace_global, ((double *)__pyx_v_psi->data), ((int *)__pyx_v_l2g->data), ((double *)__pyx_v_nodeArray->data), ((double *)__pyx_v_xArray->data));
8726 
8727  /* "cfemIntegrals.pyx":2818
8728  * <double*>nodeArray.data,
8729  * <double*>xArray.data)
8730  * def parametricMaps_getValuesTrace(np.ndarray psi, # <<<<<<<<<<<<<<
8731  * np.ndarray l2g,
8732  * np.ndarray nodeArray,
8733  */
8734 
8735  /* function exit code */
8736  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8737  __Pyx_XGIVEREF(__pyx_r);
8738  __Pyx_RefNannyFinishContext();
8739  return __pyx_r;
8740 }
8741 
8742 /* "cfemIntegrals.pyx":2836
8743  * <double*>nodeArray.data,
8744  * <double*>xArray.data)
8745  * def parametricMaps_getInverseValues(np.ndarray inverseJacobian, # <<<<<<<<<<<<<<
8746  * np.ndarray l2g,
8747  * np.ndarray nodeArray,
8748  */
8749 
8750 /* Python wrapper */
8751 static PyObject *__pyx_pw_13cfemIntegrals_55parametricMaps_getInverseValues(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
8752 static PyMethodDef __pyx_mdef_13cfemIntegrals_55parametricMaps_getInverseValues = {"parametricMaps_getInverseValues", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_55parametricMaps_getInverseValues, METH_VARARGS|METH_KEYWORDS, 0};
8753 static PyObject *__pyx_pw_13cfemIntegrals_55parametricMaps_getInverseValues(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
8754  PyArrayObject *__pyx_v_inverseJacobian = 0;
8755  PyArrayObject *__pyx_v_l2g = 0;
8756  PyArrayObject *__pyx_v_nodeArray = 0;
8757  PyArrayObject *__pyx_v_xArray = 0;
8758  PyArrayObject *__pyx_v_xiArray = 0;
8759  int __pyx_lineno = 0;
8760  const char *__pyx_filename = NULL;
8761  int __pyx_clineno = 0;
8762  PyObject *__pyx_r = 0;
8763  __Pyx_RefNannyDeclarations
8764  __Pyx_RefNannySetupContext("parametricMaps_getInverseValues (wrapper)", 0);
8765  {
8766  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inverseJacobian,&__pyx_n_s_l2g,&__pyx_n_s_nodeArray,&__pyx_n_s_xArray,&__pyx_n_s_xiArray,0};
8767  PyObject* values[5] = {0,0,0,0,0};
8768  if (unlikely(__pyx_kwds)) {
8769  Py_ssize_t kw_args;
8770  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
8771  switch (pos_args) {
8772  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
8773  CYTHON_FALLTHROUGH;
8774  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
8775  CYTHON_FALLTHROUGH;
8776  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
8777  CYTHON_FALLTHROUGH;
8778  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
8779  CYTHON_FALLTHROUGH;
8780  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8781  CYTHON_FALLTHROUGH;
8782  case 0: break;
8783  default: goto __pyx_L5_argtuple_error;
8784  }
8785  kw_args = PyDict_Size(__pyx_kwds);
8786  switch (pos_args) {
8787  case 0:
8788  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inverseJacobian)) != 0)) kw_args--;
8789  else goto __pyx_L5_argtuple_error;
8790  CYTHON_FALLTHROUGH;
8791  case 1:
8792  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_l2g)) != 0)) kw_args--;
8793  else {
8794  __Pyx_RaiseArgtupleInvalid("parametricMaps_getInverseValues", 1, 5, 5, 1); __PYX_ERR(0, 2836, __pyx_L3_error)
8795  }
8796  CYTHON_FALLTHROUGH;
8797  case 2:
8798  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodeArray)) != 0)) kw_args--;
8799  else {
8800  __Pyx_RaiseArgtupleInvalid("parametricMaps_getInverseValues", 1, 5, 5, 2); __PYX_ERR(0, 2836, __pyx_L3_error)
8801  }
8802  CYTHON_FALLTHROUGH;
8803  case 3:
8804  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xArray)) != 0)) kw_args--;
8805  else {
8806  __Pyx_RaiseArgtupleInvalid("parametricMaps_getInverseValues", 1, 5, 5, 3); __PYX_ERR(0, 2836, __pyx_L3_error)
8807  }
8808  CYTHON_FALLTHROUGH;
8809  case 4:
8810  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xiArray)) != 0)) kw_args--;
8811  else {
8812  __Pyx_RaiseArgtupleInvalid("parametricMaps_getInverseValues", 1, 5, 5, 4); __PYX_ERR(0, 2836, __pyx_L3_error)
8813  }
8814  }
8815  if (unlikely(kw_args > 0)) {
8816  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parametricMaps_getInverseValues") < 0)) __PYX_ERR(0, 2836, __pyx_L3_error)
8817  }
8818  } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
8819  goto __pyx_L5_argtuple_error;
8820  } else {
8821  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8822  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
8823  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
8824  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
8825  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
8826  }
8827  __pyx_v_inverseJacobian = ((PyArrayObject *)values[0]);
8828  __pyx_v_l2g = ((PyArrayObject *)values[1]);
8829  __pyx_v_nodeArray = ((PyArrayObject *)values[2]);
8830  __pyx_v_xArray = ((PyArrayObject *)values[3]);
8831  __pyx_v_xiArray = ((PyArrayObject *)values[4]);
8832  }
8833  goto __pyx_L4_argument_unpacking_done;
8834  __pyx_L5_argtuple_error:;
8835  __Pyx_RaiseArgtupleInvalid("parametricMaps_getInverseValues", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2836, __pyx_L3_error)
8836  __pyx_L3_error:;
8837  __Pyx_AddTraceback("cfemIntegrals.parametricMaps_getInverseValues", __pyx_clineno, __pyx_lineno, __pyx_filename);
8838  __Pyx_RefNannyFinishContext();
8839  return NULL;
8840  __pyx_L4_argument_unpacking_done:;
8841  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_inverseJacobian), __pyx_ptype_5numpy_ndarray, 1, "inverseJacobian", 0))) __PYX_ERR(0, 2836, __pyx_L1_error)
8842  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_l2g), __pyx_ptype_5numpy_ndarray, 1, "l2g", 0))) __PYX_ERR(0, 2837, __pyx_L1_error)
8843  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodeArray), __pyx_ptype_5numpy_ndarray, 1, "nodeArray", 0))) __PYX_ERR(0, 2838, __pyx_L1_error)
8844  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xArray), __pyx_ptype_5numpy_ndarray, 1, "xArray", 0))) __PYX_ERR(0, 2839, __pyx_L1_error)
8845  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xiArray), __pyx_ptype_5numpy_ndarray, 1, "xiArray", 0))) __PYX_ERR(0, 2840, __pyx_L1_error)
8846  __pyx_r = __pyx_pf_13cfemIntegrals_54parametricMaps_getInverseValues(__pyx_self, __pyx_v_inverseJacobian, __pyx_v_l2g, __pyx_v_nodeArray, __pyx_v_xArray, __pyx_v_xiArray);
8847 
8848  /* function exit code */
8849  goto __pyx_L0;
8850  __pyx_L1_error:;
8851  __pyx_r = NULL;
8852  __pyx_L0:;
8853  __Pyx_RefNannyFinishContext();
8854  return __pyx_r;
8855 }
8856 
8857 static PyObject *__pyx_pf_13cfemIntegrals_54parametricMaps_getInverseValues(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_inverseJacobian, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_nodeArray, PyArrayObject *__pyx_v_xArray, PyArrayObject *__pyx_v_xiArray) {
8858  int __pyx_v_nElements_global;
8859  int __pyx_v_nQuadraturePoints_element;
8860  int __pyx_v_nDOF_element;
8861  int __pyx_v_nSpace_global;
8862  PyObject *__pyx_r = NULL;
8863  __Pyx_RefNannyDeclarations
8864  __Pyx_RefNannySetupContext("parametricMaps_getInverseValues", 0);
8865 
8866  /* "cfemIntegrals.pyx":2841
8867  * np.ndarray xArray,
8868  * np.ndarray xiArray):
8869  * cdef int nElements_global = xArray.shape[0] # <<<<<<<<<<<<<<
8870  * cdef int nQuadraturePoints_element = xArray.shape[1]
8871  * cdef int nDOF_element = l2g.shape[1]
8872  */
8873  __pyx_v_nElements_global = (__pyx_v_xArray->dimensions[0]);
8874 
8875  /* "cfemIntegrals.pyx":2842
8876  * np.ndarray xiArray):
8877  * cdef int nElements_global = xArray.shape[0]
8878  * cdef int nQuadraturePoints_element = xArray.shape[1] # <<<<<<<<<<<<<<
8879  * cdef int nDOF_element = l2g.shape[1]
8880  * cdef int nSpace_global = inverseJacobian.shape[2]
8881  */
8882  __pyx_v_nQuadraturePoints_element = (__pyx_v_xArray->dimensions[1]);
8883 
8884  /* "cfemIntegrals.pyx":2843
8885  * cdef int nElements_global = xArray.shape[0]
8886  * cdef int nQuadraturePoints_element = xArray.shape[1]
8887  * cdef int nDOF_element = l2g.shape[1] # <<<<<<<<<<<<<<
8888  * cdef int nSpace_global = inverseJacobian.shape[2]
8889  * cparametricMaps_getInverseValues(nElements_global,
8890  */
8891  __pyx_v_nDOF_element = (__pyx_v_l2g->dimensions[1]);
8892 
8893  /* "cfemIntegrals.pyx":2844
8894  * cdef int nQuadraturePoints_element = xArray.shape[1]
8895  * cdef int nDOF_element = l2g.shape[1]
8896  * cdef int nSpace_global = inverseJacobian.shape[2] # <<<<<<<<<<<<<<
8897  * cparametricMaps_getInverseValues(nElements_global,
8898  * nQuadraturePoints_element,
8899  */
8900  __pyx_v_nSpace_global = (__pyx_v_inverseJacobian->dimensions[2]);
8901 
8902  /* "cfemIntegrals.pyx":2845
8903  * cdef int nDOF_element = l2g.shape[1]
8904  * cdef int nSpace_global = inverseJacobian.shape[2]
8905  * cparametricMaps_getInverseValues(nElements_global, # <<<<<<<<<<<<<<
8906  * nQuadraturePoints_element,
8907  * nDOF_element,
8908  */
8909  parametricMaps_getInverseValues(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_element, __pyx_v_nSpace_global, ((double *)__pyx_v_inverseJacobian->data), ((int *)__pyx_v_l2g->data), ((double *)__pyx_v_nodeArray->data), ((double *)__pyx_v_xArray->data), ((double *)__pyx_v_xiArray->data));
8910 
8911  /* "cfemIntegrals.pyx":2836
8912  * <double*>nodeArray.data,
8913  * <double*>xArray.data)
8914  * def parametricMaps_getInverseValues(np.ndarray inverseJacobian, # <<<<<<<<<<<<<<
8915  * np.ndarray l2g,
8916  * np.ndarray nodeArray,
8917  */
8918 
8919  /* function exit code */
8920  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8921  __Pyx_XGIVEREF(__pyx_r);
8922  __Pyx_RefNannyFinishContext();
8923  return __pyx_r;
8924 }
8925 
8926 /* "cfemIntegrals.pyx":2854
8927  * <double*>xArray.data,
8928  * <double*>xiArray.data)
8929  * def parametricMaps_getInverseValuesTrace(np.ndarray inverseJacobian, # <<<<<<<<<<<<<<
8930  * np.ndarray l2g,
8931  * np.ndarray nodeArray,
8932  */
8933 
8934 /* Python wrapper */
8935 static PyObject *__pyx_pw_13cfemIntegrals_57parametricMaps_getInverseValuesTrace(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
8936 static PyMethodDef __pyx_mdef_13cfemIntegrals_57parametricMaps_getInverseValuesTrace = {"parametricMaps_getInverseValuesTrace", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_57parametricMaps_getInverseValuesTrace, METH_VARARGS|METH_KEYWORDS, 0};
8937 static PyObject *__pyx_pw_13cfemIntegrals_57parametricMaps_getInverseValuesTrace(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
8938  PyArrayObject *__pyx_v_inverseJacobian = 0;
8939  PyArrayObject *__pyx_v_l2g = 0;
8940  PyArrayObject *__pyx_v_nodeArray = 0;
8941  PyArrayObject *__pyx_v_xArray = 0;
8942  PyArrayObject *__pyx_v_xiArray = 0;
8943  int __pyx_lineno = 0;
8944  const char *__pyx_filename = NULL;
8945  int __pyx_clineno = 0;
8946  PyObject *__pyx_r = 0;
8947  __Pyx_RefNannyDeclarations
8948  __Pyx_RefNannySetupContext("parametricMaps_getInverseValuesTrace (wrapper)", 0);
8949  {
8950  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inverseJacobian,&__pyx_n_s_l2g,&__pyx_n_s_nodeArray,&__pyx_n_s_xArray,&__pyx_n_s_xiArray,0};
8951  PyObject* values[5] = {0,0,0,0,0};
8952  if (unlikely(__pyx_kwds)) {
8953  Py_ssize_t kw_args;
8954  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
8955  switch (pos_args) {
8956  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
8957  CYTHON_FALLTHROUGH;
8958  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
8959  CYTHON_FALLTHROUGH;
8960  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
8961  CYTHON_FALLTHROUGH;
8962  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
8963  CYTHON_FALLTHROUGH;
8964  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8965  CYTHON_FALLTHROUGH;
8966  case 0: break;
8967  default: goto __pyx_L5_argtuple_error;
8968  }
8969  kw_args = PyDict_Size(__pyx_kwds);
8970  switch (pos_args) {
8971  case 0:
8972  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inverseJacobian)) != 0)) kw_args--;
8973  else goto __pyx_L5_argtuple_error;
8974  CYTHON_FALLTHROUGH;
8975  case 1:
8976  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_l2g)) != 0)) kw_args--;
8977  else {
8978  __Pyx_RaiseArgtupleInvalid("parametricMaps_getInverseValuesTrace", 1, 5, 5, 1); __PYX_ERR(0, 2854, __pyx_L3_error)
8979  }
8980  CYTHON_FALLTHROUGH;
8981  case 2:
8982  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodeArray)) != 0)) kw_args--;
8983  else {
8984  __Pyx_RaiseArgtupleInvalid("parametricMaps_getInverseValuesTrace", 1, 5, 5, 2); __PYX_ERR(0, 2854, __pyx_L3_error)
8985  }
8986  CYTHON_FALLTHROUGH;
8987  case 3:
8988  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xArray)) != 0)) kw_args--;
8989  else {
8990  __Pyx_RaiseArgtupleInvalid("parametricMaps_getInverseValuesTrace", 1, 5, 5, 3); __PYX_ERR(0, 2854, __pyx_L3_error)
8991  }
8992  CYTHON_FALLTHROUGH;
8993  case 4:
8994  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xiArray)) != 0)) kw_args--;
8995  else {
8996  __Pyx_RaiseArgtupleInvalid("parametricMaps_getInverseValuesTrace", 1, 5, 5, 4); __PYX_ERR(0, 2854, __pyx_L3_error)
8997  }
8998  }
8999  if (unlikely(kw_args > 0)) {
9000  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parametricMaps_getInverseValuesTrace") < 0)) __PYX_ERR(0, 2854, __pyx_L3_error)
9001  }
9002  } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
9003  goto __pyx_L5_argtuple_error;
9004  } else {
9005  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9006  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
9007  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
9008  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
9009  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
9010  }
9011  __pyx_v_inverseJacobian = ((PyArrayObject *)values[0]);
9012  __pyx_v_l2g = ((PyArrayObject *)values[1]);
9013  __pyx_v_nodeArray = ((PyArrayObject *)values[2]);
9014  __pyx_v_xArray = ((PyArrayObject *)values[3]);
9015  __pyx_v_xiArray = ((PyArrayObject *)values[4]);
9016  }
9017  goto __pyx_L4_argument_unpacking_done;
9018  __pyx_L5_argtuple_error:;
9019  __Pyx_RaiseArgtupleInvalid("parametricMaps_getInverseValuesTrace", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2854, __pyx_L3_error)
9020  __pyx_L3_error:;
9021  __Pyx_AddTraceback("cfemIntegrals.parametricMaps_getInverseValuesTrace", __pyx_clineno, __pyx_lineno, __pyx_filename);
9022  __Pyx_RefNannyFinishContext();
9023  return NULL;
9024  __pyx_L4_argument_unpacking_done:;
9025  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_inverseJacobian), __pyx_ptype_5numpy_ndarray, 1, "inverseJacobian", 0))) __PYX_ERR(0, 2854, __pyx_L1_error)
9026  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_l2g), __pyx_ptype_5numpy_ndarray, 1, "l2g", 0))) __PYX_ERR(0, 2855, __pyx_L1_error)
9027  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodeArray), __pyx_ptype_5numpy_ndarray, 1, "nodeArray", 0))) __PYX_ERR(0, 2856, __pyx_L1_error)
9028  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xArray), __pyx_ptype_5numpy_ndarray, 1, "xArray", 0))) __PYX_ERR(0, 2857, __pyx_L1_error)
9029  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xiArray), __pyx_ptype_5numpy_ndarray, 1, "xiArray", 0))) __PYX_ERR(0, 2858, __pyx_L1_error)
9030  __pyx_r = __pyx_pf_13cfemIntegrals_56parametricMaps_getInverseValuesTrace(__pyx_self, __pyx_v_inverseJacobian, __pyx_v_l2g, __pyx_v_nodeArray, __pyx_v_xArray, __pyx_v_xiArray);
9031 
9032  /* function exit code */
9033  goto __pyx_L0;
9034  __pyx_L1_error:;
9035  __pyx_r = NULL;
9036  __pyx_L0:;
9037  __Pyx_RefNannyFinishContext();
9038  return __pyx_r;
9039 }
9040 
9041 static PyObject *__pyx_pf_13cfemIntegrals_56parametricMaps_getInverseValuesTrace(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_inverseJacobian, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_nodeArray, PyArrayObject *__pyx_v_xArray, PyArrayObject *__pyx_v_xiArray) {
9042  int __pyx_v_nElements_global;
9043  int __pyx_v_nElementBoundaries_element;
9044  int __pyx_v_nElementBoundaryQuadraturePoints_elementBoundary;
9045  int __pyx_v_nDOF_element;
9046  int __pyx_v_nSpace_global;
9047  PyObject *__pyx_r = NULL;
9048  __Pyx_RefNannyDeclarations
9049  __Pyx_RefNannySetupContext("parametricMaps_getInverseValuesTrace", 0);
9050 
9051  /* "cfemIntegrals.pyx":2859
9052  * np.ndarray xArray,
9053  * np.ndarray xiArray):
9054  * cdef int nElements_global = xArray.shape[0] # <<<<<<<<<<<<<<
9055  * cdef int nElementBoundaries_element = xArray.shape[1]
9056  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = xArray.shape[2]
9057  */
9058  __pyx_v_nElements_global = (__pyx_v_xArray->dimensions[0]);
9059 
9060  /* "cfemIntegrals.pyx":2860
9061  * np.ndarray xiArray):
9062  * cdef int nElements_global = xArray.shape[0]
9063  * cdef int nElementBoundaries_element = xArray.shape[1] # <<<<<<<<<<<<<<
9064  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = xArray.shape[2]
9065  * cdef int nDOF_element = l2g.shape[1]
9066  */
9067  __pyx_v_nElementBoundaries_element = (__pyx_v_xArray->dimensions[1]);
9068 
9069  /* "cfemIntegrals.pyx":2861
9070  * cdef int nElements_global = xArray.shape[0]
9071  * cdef int nElementBoundaries_element = xArray.shape[1]
9072  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = xArray.shape[2] # <<<<<<<<<<<<<<
9073  * cdef int nDOF_element = l2g.shape[1]
9074  * cdef int nSpace_global = inverseJacobian.shape[3]
9075  */
9076  __pyx_v_nElementBoundaryQuadraturePoints_elementBoundary = (__pyx_v_xArray->dimensions[2]);
9077 
9078  /* "cfemIntegrals.pyx":2862
9079  * cdef int nElementBoundaries_element = xArray.shape[1]
9080  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = xArray.shape[2]
9081  * cdef int nDOF_element = l2g.shape[1] # <<<<<<<<<<<<<<
9082  * cdef int nSpace_global = inverseJacobian.shape[3]
9083  * cparametricMaps_getInverseValuesTrace(nElements_global,
9084  */
9085  __pyx_v_nDOF_element = (__pyx_v_l2g->dimensions[1]);
9086 
9087  /* "cfemIntegrals.pyx":2863
9088  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = xArray.shape[2]
9089  * cdef int nDOF_element = l2g.shape[1]
9090  * cdef int nSpace_global = inverseJacobian.shape[3] # <<<<<<<<<<<<<<
9091  * cparametricMaps_getInverseValuesTrace(nElements_global,
9092  * nElementBoundaries_element,
9093  */
9094  __pyx_v_nSpace_global = (__pyx_v_inverseJacobian->dimensions[3]);
9095 
9096  /* "cfemIntegrals.pyx":2864
9097  * cdef int nDOF_element = l2g.shape[1]
9098  * cdef int nSpace_global = inverseJacobian.shape[3]
9099  * cparametricMaps_getInverseValuesTrace(nElements_global, # <<<<<<<<<<<<<<
9100  * nElementBoundaries_element,
9101  * nElementBoundaryQuadraturePoints_elementBoundary,
9102  */
9103  parametricMaps_getInverseValuesTrace(__pyx_v_nElements_global, __pyx_v_nElementBoundaries_element, __pyx_v_nElementBoundaryQuadraturePoints_elementBoundary, __pyx_v_nDOF_element, __pyx_v_nSpace_global, ((double *)__pyx_v_inverseJacobian->data), ((int *)__pyx_v_l2g->data), ((double *)__pyx_v_nodeArray->data), ((double *)__pyx_v_xArray->data), ((double *)__pyx_v_xiArray->data));
9104 
9105  /* "cfemIntegrals.pyx":2854
9106  * <double*>xArray.data,
9107  * <double*>xiArray.data)
9108  * def parametricMaps_getInverseValuesTrace(np.ndarray inverseJacobian, # <<<<<<<<<<<<<<
9109  * np.ndarray l2g,
9110  * np.ndarray nodeArray,
9111  */
9112 
9113  /* function exit code */
9114  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9115  __Pyx_XGIVEREF(__pyx_r);
9116  __Pyx_RefNannyFinishContext();
9117  return __pyx_r;
9118 }
9119 
9120 /* "cfemIntegrals.pyx":2874
9121  * <double*>xArray.data,
9122  * <double*>xiArray.data)
9123  * def parametricMaps_getJacobianValues(np.ndarray grad_psi, # <<<<<<<<<<<<<<
9124  * np.ndarray l2g,
9125  * np.ndarray nodeArray,
9126  */
9127 
9128 /* Python wrapper */
9129 static PyObject *__pyx_pw_13cfemIntegrals_59parametricMaps_getJacobianValues(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
9130 static PyMethodDef __pyx_mdef_13cfemIntegrals_59parametricMaps_getJacobianValues = {"parametricMaps_getJacobianValues", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_59parametricMaps_getJacobianValues, METH_VARARGS|METH_KEYWORDS, 0};
9131 static PyObject *__pyx_pw_13cfemIntegrals_59parametricMaps_getJacobianValues(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
9132  PyArrayObject *__pyx_v_grad_psi = 0;
9133  PyArrayObject *__pyx_v_l2g = 0;
9134  PyArrayObject *__pyx_v_nodeArray = 0;
9135  PyArrayObject *__pyx_v_jacobianArray = 0;
9136  PyArrayObject *__pyx_v_jacobianDeterminantArray = 0;
9137  PyArrayObject *__pyx_v_jacobianInverseArray = 0;
9138  int __pyx_lineno = 0;
9139  const char *__pyx_filename = NULL;
9140  int __pyx_clineno = 0;
9141  PyObject *__pyx_r = 0;
9142  __Pyx_RefNannyDeclarations
9143  __Pyx_RefNannySetupContext("parametricMaps_getJacobianValues (wrapper)", 0);
9144  {
9145  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_grad_psi,&__pyx_n_s_l2g,&__pyx_n_s_nodeArray,&__pyx_n_s_jacobianArray,&__pyx_n_s_jacobianDeterminantArray,&__pyx_n_s_jacobianInverseArray,0};
9146  PyObject* values[6] = {0,0,0,0,0,0};
9147  if (unlikely(__pyx_kwds)) {
9148  Py_ssize_t kw_args;
9149  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
9150  switch (pos_args) {
9151  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
9152  CYTHON_FALLTHROUGH;
9153  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
9154  CYTHON_FALLTHROUGH;
9155  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
9156  CYTHON_FALLTHROUGH;
9157  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
9158  CYTHON_FALLTHROUGH;
9159  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
9160  CYTHON_FALLTHROUGH;
9161  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9162  CYTHON_FALLTHROUGH;
9163  case 0: break;
9164  default: goto __pyx_L5_argtuple_error;
9165  }
9166  kw_args = PyDict_Size(__pyx_kwds);
9167  switch (pos_args) {
9168  case 0:
9169  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_psi)) != 0)) kw_args--;
9170  else goto __pyx_L5_argtuple_error;
9171  CYTHON_FALLTHROUGH;
9172  case 1:
9173  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_l2g)) != 0)) kw_args--;
9174  else {
9175  __Pyx_RaiseArgtupleInvalid("parametricMaps_getJacobianValues", 1, 6, 6, 1); __PYX_ERR(0, 2874, __pyx_L3_error)
9176  }
9177  CYTHON_FALLTHROUGH;
9178  case 2:
9179  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodeArray)) != 0)) kw_args--;
9180  else {
9181  __Pyx_RaiseArgtupleInvalid("parametricMaps_getJacobianValues", 1, 6, 6, 2); __PYX_ERR(0, 2874, __pyx_L3_error)
9182  }
9183  CYTHON_FALLTHROUGH;
9184  case 3:
9185  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jacobianArray)) != 0)) kw_args--;
9186  else {
9187  __Pyx_RaiseArgtupleInvalid("parametricMaps_getJacobianValues", 1, 6, 6, 3); __PYX_ERR(0, 2874, __pyx_L3_error)
9188  }
9189  CYTHON_FALLTHROUGH;
9190  case 4:
9191  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jacobianDeterminantArray)) != 0)) kw_args--;
9192  else {
9193  __Pyx_RaiseArgtupleInvalid("parametricMaps_getJacobianValues", 1, 6, 6, 4); __PYX_ERR(0, 2874, __pyx_L3_error)
9194  }
9195  CYTHON_FALLTHROUGH;
9196  case 5:
9197  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jacobianInverseArray)) != 0)) kw_args--;
9198  else {
9199  __Pyx_RaiseArgtupleInvalid("parametricMaps_getJacobianValues", 1, 6, 6, 5); __PYX_ERR(0, 2874, __pyx_L3_error)
9200  }
9201  }
9202  if (unlikely(kw_args > 0)) {
9203  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parametricMaps_getJacobianValues") < 0)) __PYX_ERR(0, 2874, __pyx_L3_error)
9204  }
9205  } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
9206  goto __pyx_L5_argtuple_error;
9207  } else {
9208  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9209  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
9210  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
9211  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
9212  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
9213  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
9214  }
9215  __pyx_v_grad_psi = ((PyArrayObject *)values[0]);
9216  __pyx_v_l2g = ((PyArrayObject *)values[1]);
9217  __pyx_v_nodeArray = ((PyArrayObject *)values[2]);
9218  __pyx_v_jacobianArray = ((PyArrayObject *)values[3]);
9219  __pyx_v_jacobianDeterminantArray = ((PyArrayObject *)values[4]);
9220  __pyx_v_jacobianInverseArray = ((PyArrayObject *)values[5]);
9221  }
9222  goto __pyx_L4_argument_unpacking_done;
9223  __pyx_L5_argtuple_error:;
9224  __Pyx_RaiseArgtupleInvalid("parametricMaps_getJacobianValues", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2874, __pyx_L3_error)
9225  __pyx_L3_error:;
9226  __Pyx_AddTraceback("cfemIntegrals.parametricMaps_getJacobianValues", __pyx_clineno, __pyx_lineno, __pyx_filename);
9227  __Pyx_RefNannyFinishContext();
9228  return NULL;
9229  __pyx_L4_argument_unpacking_done:;
9230  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_psi), __pyx_ptype_5numpy_ndarray, 1, "grad_psi", 0))) __PYX_ERR(0, 2874, __pyx_L1_error)
9231  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_l2g), __pyx_ptype_5numpy_ndarray, 1, "l2g", 0))) __PYX_ERR(0, 2875, __pyx_L1_error)
9232  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodeArray), __pyx_ptype_5numpy_ndarray, 1, "nodeArray", 0))) __PYX_ERR(0, 2876, __pyx_L1_error)
9233  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_jacobianArray), __pyx_ptype_5numpy_ndarray, 1, "jacobianArray", 0))) __PYX_ERR(0, 2877, __pyx_L1_error)
9234  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_jacobianDeterminantArray), __pyx_ptype_5numpy_ndarray, 1, "jacobianDeterminantArray", 0))) __PYX_ERR(0, 2878, __pyx_L1_error)
9235  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_jacobianInverseArray), __pyx_ptype_5numpy_ndarray, 1, "jacobianInverseArray", 0))) __PYX_ERR(0, 2879, __pyx_L1_error)
9236  __pyx_r = __pyx_pf_13cfemIntegrals_58parametricMaps_getJacobianValues(__pyx_self, __pyx_v_grad_psi, __pyx_v_l2g, __pyx_v_nodeArray, __pyx_v_jacobianArray, __pyx_v_jacobianDeterminantArray, __pyx_v_jacobianInverseArray);
9237 
9238  /* function exit code */
9239  goto __pyx_L0;
9240  __pyx_L1_error:;
9241  __pyx_r = NULL;
9242  __pyx_L0:;
9243  __Pyx_RefNannyFinishContext();
9244  return __pyx_r;
9245 }
9246 
9247 static PyObject *__pyx_pf_13cfemIntegrals_58parametricMaps_getJacobianValues(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_grad_psi, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_nodeArray, PyArrayObject *__pyx_v_jacobianArray, PyArrayObject *__pyx_v_jacobianDeterminantArray, PyArrayObject *__pyx_v_jacobianInverseArray) {
9248  int __pyx_v_nd;
9249  PyObject *__pyx_r = NULL;
9250  __Pyx_RefNannyDeclarations
9251  int __pyx_lineno = 0;
9252  const char *__pyx_filename = NULL;
9253  int __pyx_clineno = 0;
9254  __Pyx_RefNannySetupContext("parametricMaps_getJacobianValues", 0);
9255 
9256  /* "cfemIntegrals.pyx":2880
9257  * np.ndarray jacobianDeterminantArray,
9258  * np.ndarray jacobianInverseArray):
9259  * cdef int nd = jacobianArray.shape[2] # <<<<<<<<<<<<<<
9260  * if nd == 1:
9261  * cparametricMaps_getJacobianValues1D(jacobianArray.shape[0],
9262  */
9263  __pyx_v_nd = (__pyx_v_jacobianArray->dimensions[2]);
9264 
9265  /* "cfemIntegrals.pyx":2881
9266  * np.ndarray jacobianInverseArray):
9267  * cdef int nd = jacobianArray.shape[2]
9268  * if nd == 1: # <<<<<<<<<<<<<<
9269  * cparametricMaps_getJacobianValues1D(jacobianArray.shape[0],
9270  * jacobianArray.shape[1],
9271  */
9272  switch (__pyx_v_nd) {
9273  case 1:
9274 
9275  /* "cfemIntegrals.pyx":2882
9276  * cdef int nd = jacobianArray.shape[2]
9277  * if nd == 1:
9278  * cparametricMaps_getJacobianValues1D(jacobianArray.shape[0], # <<<<<<<<<<<<<<
9279  * jacobianArray.shape[1],
9280  * l2g.shape[1],
9281  */
9282  parametricMaps_getJacobianValues1D((__pyx_v_jacobianArray->dimensions[0]), (__pyx_v_jacobianArray->dimensions[1]), (__pyx_v_l2g->dimensions[1]), ((double *)__pyx_v_grad_psi->data), ((int *)__pyx_v_l2g->data), ((double *)__pyx_v_nodeArray->data), ((double *)__pyx_v_jacobianArray->data), ((double *)__pyx_v_jacobianDeterminantArray->data), ((double *)__pyx_v_jacobianInverseArray->data));
9283 
9284  /* "cfemIntegrals.pyx":2881
9285  * np.ndarray jacobianInverseArray):
9286  * cdef int nd = jacobianArray.shape[2]
9287  * if nd == 1: # <<<<<<<<<<<<<<
9288  * cparametricMaps_getJacobianValues1D(jacobianArray.shape[0],
9289  * jacobianArray.shape[1],
9290  */
9291  break;
9292  case 2:
9293 
9294  /* "cfemIntegrals.pyx":2892
9295  * <double*>jacobianInverseArray.data)
9296  * elif nd == 2:
9297  * cparametricMaps_getJacobianValues2D(jacobianArray.shape[0], # <<<<<<<<<<<<<<
9298  * jacobianArray.shape[1],
9299  * l2g.shape[1],
9300  */
9301  parametricMaps_getJacobianValues2D((__pyx_v_jacobianArray->dimensions[0]), (__pyx_v_jacobianArray->dimensions[1]), (__pyx_v_l2g->dimensions[1]), ((double *)__pyx_v_grad_psi->data), ((int *)__pyx_v_l2g->data), ((double *)__pyx_v_nodeArray->data), ((double *)__pyx_v_jacobianArray->data), ((double *)__pyx_v_jacobianDeterminantArray->data), ((double *)__pyx_v_jacobianInverseArray->data));
9302 
9303  /* "cfemIntegrals.pyx":2891
9304  * <double*>jacobianDeterminantArray.data,
9305  * <double*>jacobianInverseArray.data)
9306  * elif nd == 2: # <<<<<<<<<<<<<<
9307  * cparametricMaps_getJacobianValues2D(jacobianArray.shape[0],
9308  * jacobianArray.shape[1],
9309  */
9310  break;
9311  case 3:
9312 
9313  /* "cfemIntegrals.pyx":2902
9314  * <double*>jacobianInverseArray.data)
9315  * elif nd == 3:
9316  * cparametricMaps_getJacobianValues3D(jacobianArray.shape[0], # <<<<<<<<<<<<<<
9317  * jacobianArray.shape[1],
9318  * l2g.shape[1],
9319  */
9320  parametricMaps_getJacobianValues3D((__pyx_v_jacobianArray->dimensions[0]), (__pyx_v_jacobianArray->dimensions[1]), (__pyx_v_l2g->dimensions[1]), ((double *)__pyx_v_grad_psi->data), ((int *)__pyx_v_l2g->data), ((double *)__pyx_v_nodeArray->data), ((double *)__pyx_v_jacobianArray->data), ((double *)__pyx_v_jacobianDeterminantArray->data), ((double *)__pyx_v_jacobianInverseArray->data));
9321 
9322  /* "cfemIntegrals.pyx":2901
9323  * <double*>jacobianDeterminantArray.data,
9324  * <double*>jacobianInverseArray.data)
9325  * elif nd == 3: # <<<<<<<<<<<<<<
9326  * cparametricMaps_getJacobianValues3D(jacobianArray.shape[0],
9327  * jacobianArray.shape[1],
9328  */
9329  break;
9330  default:
9331 
9332  /* "cfemIntegrals.pyx":2912
9333  * <double*>jacobianInverseArray.data)
9334  * else:
9335  * print("error in getJacobianValues...jacobian not sized properly") # <<<<<<<<<<<<<<
9336  * def parametricMaps_getJacobianValuesTrace(np.ndarray grad_psi,
9337  * np.ndarray boundaryNormals,
9338  */
9339  if (__Pyx_PrintOne(0, __pyx_kp_s_error_in_getJacobianValues_jacob) < 0) __PYX_ERR(0, 2912, __pyx_L1_error)
9340  break;
9341  }
9342 
9343  /* "cfemIntegrals.pyx":2874
9344  * <double*>xArray.data,
9345  * <double*>xiArray.data)
9346  * def parametricMaps_getJacobianValues(np.ndarray grad_psi, # <<<<<<<<<<<<<<
9347  * np.ndarray l2g,
9348  * np.ndarray nodeArray,
9349  */
9350 
9351  /* function exit code */
9352  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9353  goto __pyx_L0;
9354  __pyx_L1_error:;
9355  __Pyx_AddTraceback("cfemIntegrals.parametricMaps_getJacobianValues", __pyx_clineno, __pyx_lineno, __pyx_filename);
9356  __pyx_r = NULL;
9357  __pyx_L0:;
9358  __Pyx_XGIVEREF(__pyx_r);
9359  __Pyx_RefNannyFinishContext();
9360  return __pyx_r;
9361 }
9362 
9363 /* "cfemIntegrals.pyx":2913
9364  * else:
9365  * print("error in getJacobianValues...jacobian not sized properly")
9366  * def parametricMaps_getJacobianValuesTrace(np.ndarray grad_psi, # <<<<<<<<<<<<<<
9367  * np.ndarray boundaryNormals,
9368  * np.ndarray boundaryJacobians,
9369  */
9370 
9371 /* Python wrapper */
9372 static PyObject *__pyx_pw_13cfemIntegrals_61parametricMaps_getJacobianValuesTrace(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
9373 static PyMethodDef __pyx_mdef_13cfemIntegrals_61parametricMaps_getJacobianValuesTrace = {"parametricMaps_getJacobianValuesTrace", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_61parametricMaps_getJacobianValuesTrace, METH_VARARGS|METH_KEYWORDS, 0};
9374 static PyObject *__pyx_pw_13cfemIntegrals_61parametricMaps_getJacobianValuesTrace(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
9375  PyArrayObject *__pyx_v_grad_psi = 0;
9376  PyArrayObject *__pyx_v_boundaryNormals = 0;
9377  PyArrayObject *__pyx_v_boundaryJacobians = 0;
9378  PyArrayObject *__pyx_v_l2g = 0;
9379  PyArrayObject *__pyx_v_nodeArray = 0;
9380  PyArrayObject *__pyx_v_jacobianInverseArray = 0;
9381  PyArrayObject *__pyx_v_metricTensorArray = 0;
9382  PyArrayObject *__pyx_v_metricTensorDeterminantSqrtArray = 0;
9383  PyArrayObject *__pyx_v_unitNormalArray = 0;
9384  int __pyx_lineno = 0;
9385  const char *__pyx_filename = NULL;
9386  int __pyx_clineno = 0;
9387  PyObject *__pyx_r = 0;
9388  __Pyx_RefNannyDeclarations
9389  __Pyx_RefNannySetupContext("parametricMaps_getJacobianValuesTrace (wrapper)", 0);
9390  {
9391  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_grad_psi,&__pyx_n_s_boundaryNormals,&__pyx_n_s_boundaryJacobians,&__pyx_n_s_l2g,&__pyx_n_s_nodeArray,&__pyx_n_s_jacobianInverseArray,&__pyx_n_s_metricTensorArray,&__pyx_n_s_metricTensorDeterminantSqrtArray,&__pyx_n_s_unitNormalArray,0};
9392  PyObject* values[9] = {0,0,0,0,0,0,0,0,0};
9393  if (unlikely(__pyx_kwds)) {
9394  Py_ssize_t kw_args;
9395  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
9396  switch (pos_args) {
9397  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
9398  CYTHON_FALLTHROUGH;
9399  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
9400  CYTHON_FALLTHROUGH;
9401  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
9402  CYTHON_FALLTHROUGH;
9403  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
9404  CYTHON_FALLTHROUGH;
9405  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
9406  CYTHON_FALLTHROUGH;
9407  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
9408  CYTHON_FALLTHROUGH;
9409  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
9410  CYTHON_FALLTHROUGH;
9411  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
9412  CYTHON_FALLTHROUGH;
9413  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9414  CYTHON_FALLTHROUGH;
9415  case 0: break;
9416  default: goto __pyx_L5_argtuple_error;
9417  }
9418  kw_args = PyDict_Size(__pyx_kwds);
9419  switch (pos_args) {
9420  case 0:
9421  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_psi)) != 0)) kw_args--;
9422  else goto __pyx_L5_argtuple_error;
9423  CYTHON_FALLTHROUGH;
9424  case 1:
9425  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_boundaryNormals)) != 0)) kw_args--;
9426  else {
9427  __Pyx_RaiseArgtupleInvalid("parametricMaps_getJacobianValuesTrace", 1, 9, 9, 1); __PYX_ERR(0, 2913, __pyx_L3_error)
9428  }
9429  CYTHON_FALLTHROUGH;
9430  case 2:
9431  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_boundaryJacobians)) != 0)) kw_args--;
9432  else {
9433  __Pyx_RaiseArgtupleInvalid("parametricMaps_getJacobianValuesTrace", 1, 9, 9, 2); __PYX_ERR(0, 2913, __pyx_L3_error)
9434  }
9435  CYTHON_FALLTHROUGH;
9436  case 3:
9437  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_l2g)) != 0)) kw_args--;
9438  else {
9439  __Pyx_RaiseArgtupleInvalid("parametricMaps_getJacobianValuesTrace", 1, 9, 9, 3); __PYX_ERR(0, 2913, __pyx_L3_error)
9440  }
9441  CYTHON_FALLTHROUGH;
9442  case 4:
9443  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodeArray)) != 0)) kw_args--;
9444  else {
9445  __Pyx_RaiseArgtupleInvalid("parametricMaps_getJacobianValuesTrace", 1, 9, 9, 4); __PYX_ERR(0, 2913, __pyx_L3_error)
9446  }
9447  CYTHON_FALLTHROUGH;
9448  case 5:
9449  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jacobianInverseArray)) != 0)) kw_args--;
9450  else {
9451  __Pyx_RaiseArgtupleInvalid("parametricMaps_getJacobianValuesTrace", 1, 9, 9, 5); __PYX_ERR(0, 2913, __pyx_L3_error)
9452  }
9453  CYTHON_FALLTHROUGH;
9454  case 6:
9455  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_metricTensorArray)) != 0)) kw_args--;
9456  else {
9457  __Pyx_RaiseArgtupleInvalid("parametricMaps_getJacobianValuesTrace", 1, 9, 9, 6); __PYX_ERR(0, 2913, __pyx_L3_error)
9458  }
9459  CYTHON_FALLTHROUGH;
9460  case 7:
9461  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_metricTensorDeterminantSqrtArray)) != 0)) kw_args--;
9462  else {
9463  __Pyx_RaiseArgtupleInvalid("parametricMaps_getJacobianValuesTrace", 1, 9, 9, 7); __PYX_ERR(0, 2913, __pyx_L3_error)
9464  }
9465  CYTHON_FALLTHROUGH;
9466  case 8:
9467  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_unitNormalArray)) != 0)) kw_args--;
9468  else {
9469  __Pyx_RaiseArgtupleInvalid("parametricMaps_getJacobianValuesTrace", 1, 9, 9, 8); __PYX_ERR(0, 2913, __pyx_L3_error)
9470  }
9471  }
9472  if (unlikely(kw_args > 0)) {
9473  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parametricMaps_getJacobianValuesTrace") < 0)) __PYX_ERR(0, 2913, __pyx_L3_error)
9474  }
9475  } else if (PyTuple_GET_SIZE(__pyx_args) != 9) {
9476  goto __pyx_L5_argtuple_error;
9477  } else {
9478  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9479  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
9480  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
9481  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
9482  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
9483  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
9484  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
9485  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
9486  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
9487  }
9488  __pyx_v_grad_psi = ((PyArrayObject *)values[0]);
9489  __pyx_v_boundaryNormals = ((PyArrayObject *)values[1]);
9490  __pyx_v_boundaryJacobians = ((PyArrayObject *)values[2]);
9491  __pyx_v_l2g = ((PyArrayObject *)values[3]);
9492  __pyx_v_nodeArray = ((PyArrayObject *)values[4]);
9493  __pyx_v_jacobianInverseArray = ((PyArrayObject *)values[5]);
9494  __pyx_v_metricTensorArray = ((PyArrayObject *)values[6]);
9495  __pyx_v_metricTensorDeterminantSqrtArray = ((PyArrayObject *)values[7]);
9496  __pyx_v_unitNormalArray = ((PyArrayObject *)values[8]);
9497  }
9498  goto __pyx_L4_argument_unpacking_done;
9499  __pyx_L5_argtuple_error:;
9500  __Pyx_RaiseArgtupleInvalid("parametricMaps_getJacobianValuesTrace", 1, 9, 9, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2913, __pyx_L3_error)
9501  __pyx_L3_error:;
9502  __Pyx_AddTraceback("cfemIntegrals.parametricMaps_getJacobianValuesTrace", __pyx_clineno, __pyx_lineno, __pyx_filename);
9503  __Pyx_RefNannyFinishContext();
9504  return NULL;
9505  __pyx_L4_argument_unpacking_done:;
9506  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_psi), __pyx_ptype_5numpy_ndarray, 1, "grad_psi", 0))) __PYX_ERR(0, 2913, __pyx_L1_error)
9507  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_boundaryNormals), __pyx_ptype_5numpy_ndarray, 1, "boundaryNormals", 0))) __PYX_ERR(0, 2914, __pyx_L1_error)
9508  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_boundaryJacobians), __pyx_ptype_5numpy_ndarray, 1, "boundaryJacobians", 0))) __PYX_ERR(0, 2915, __pyx_L1_error)
9509  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_l2g), __pyx_ptype_5numpy_ndarray, 1, "l2g", 0))) __PYX_ERR(0, 2916, __pyx_L1_error)
9510  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodeArray), __pyx_ptype_5numpy_ndarray, 1, "nodeArray", 0))) __PYX_ERR(0, 2917, __pyx_L1_error)
9511  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_jacobianInverseArray), __pyx_ptype_5numpy_ndarray, 1, "jacobianInverseArray", 0))) __PYX_ERR(0, 2918, __pyx_L1_error)
9512  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_metricTensorArray), __pyx_ptype_5numpy_ndarray, 1, "metricTensorArray", 0))) __PYX_ERR(0, 2919, __pyx_L1_error)
9513  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_metricTensorDeterminantSqrtArray), __pyx_ptype_5numpy_ndarray, 1, "metricTensorDeterminantSqrtArray", 0))) __PYX_ERR(0, 2920, __pyx_L1_error)
9514  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_unitNormalArray), __pyx_ptype_5numpy_ndarray, 1, "unitNormalArray", 0))) __PYX_ERR(0, 2921, __pyx_L1_error)
9515  __pyx_r = __pyx_pf_13cfemIntegrals_60parametricMaps_getJacobianValuesTrace(__pyx_self, __pyx_v_grad_psi, __pyx_v_boundaryNormals, __pyx_v_boundaryJacobians, __pyx_v_l2g, __pyx_v_nodeArray, __pyx_v_jacobianInverseArray, __pyx_v_metricTensorArray, __pyx_v_metricTensorDeterminantSqrtArray, __pyx_v_unitNormalArray);
9516 
9517  /* function exit code */
9518  goto __pyx_L0;
9519  __pyx_L1_error:;
9520  __pyx_r = NULL;
9521  __pyx_L0:;
9522  __Pyx_RefNannyFinishContext();
9523  return __pyx_r;
9524 }
9525 
9526 static PyObject *__pyx_pf_13cfemIntegrals_60parametricMaps_getJacobianValuesTrace(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_grad_psi, PyArrayObject *__pyx_v_boundaryNormals, PyArrayObject *__pyx_v_boundaryJacobians, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_nodeArray, PyArrayObject *__pyx_v_jacobianInverseArray, PyArrayObject *__pyx_v_metricTensorArray, PyArrayObject *__pyx_v_metricTensorDeterminantSqrtArray, PyArrayObject *__pyx_v_unitNormalArray) {
9527  int __pyx_v_nd;
9528  PyObject *__pyx_r = NULL;
9529  __Pyx_RefNannyDeclarations
9530  int __pyx_lineno = 0;
9531  const char *__pyx_filename = NULL;
9532  int __pyx_clineno = 0;
9533  __Pyx_RefNannySetupContext("parametricMaps_getJacobianValuesTrace", 0);
9534 
9535  /* "cfemIntegrals.pyx":2922
9536  * np.ndarray metricTensorDeterminantSqrtArray,
9537  * np.ndarray unitNormalArray):
9538  * cdef int nd = jacobianInverseArray.shape[3] # <<<<<<<<<<<<<<
9539  * if nd == 1:
9540  * cparametricMaps_getJacobianValuesTrace1D(jacobianInverseArray.shape[0],
9541  */
9542  __pyx_v_nd = (__pyx_v_jacobianInverseArray->dimensions[3]);
9543 
9544  /* "cfemIntegrals.pyx":2923
9545  * np.ndarray unitNormalArray):
9546  * cdef int nd = jacobianInverseArray.shape[3]
9547  * if nd == 1: # <<<<<<<<<<<<<<
9548  * cparametricMaps_getJacobianValuesTrace1D(jacobianInverseArray.shape[0],
9549  * jacobianInverseArray.shape[1],
9550  */
9551  switch (__pyx_v_nd) {
9552  case 1:
9553 
9554  /* "cfemIntegrals.pyx":2924
9555  * cdef int nd = jacobianInverseArray.shape[3]
9556  * if nd == 1:
9557  * cparametricMaps_getJacobianValuesTrace1D(jacobianInverseArray.shape[0], # <<<<<<<<<<<<<<
9558  * jacobianInverseArray.shape[1],
9559  * jacobianInverseArray.shape[2],
9560  */
9561  parametricMaps_getJacobianValuesTrace1D((__pyx_v_jacobianInverseArray->dimensions[0]), (__pyx_v_jacobianInverseArray->dimensions[1]), (__pyx_v_jacobianInverseArray->dimensions[2]), (__pyx_v_l2g->dimensions[1]), ((double *)__pyx_v_grad_psi->data), ((double *)__pyx_v_boundaryNormals->data), ((double *)__pyx_v_boundaryJacobians->data), ((int *)__pyx_v_l2g->data), ((double *)__pyx_v_nodeArray->data), ((double *)__pyx_v_jacobianInverseArray->data), ((double *)__pyx_v_metricTensorArray->data), ((double *)__pyx_v_metricTensorDeterminantSqrtArray->data), ((double *)__pyx_v_unitNormalArray->data));
9562 
9563  /* "cfemIntegrals.pyx":2923
9564  * np.ndarray unitNormalArray):
9565  * cdef int nd = jacobianInverseArray.shape[3]
9566  * if nd == 1: # <<<<<<<<<<<<<<
9567  * cparametricMaps_getJacobianValuesTrace1D(jacobianInverseArray.shape[0],
9568  * jacobianInverseArray.shape[1],
9569  */
9570  break;
9571  case 2:
9572 
9573  /* "cfemIntegrals.pyx":2938
9574  * <double*>unitNormalArray.data)
9575  * elif nd == 2:
9576  * cparametricMaps_getJacobianValuesTrace2D(jacobianInverseArray.shape[0], # <<<<<<<<<<<<<<
9577  * jacobianInverseArray.shape[1],
9578  * jacobianInverseArray.shape[2],
9579  */
9580  parametricMaps_getJacobianValuesTrace2D((__pyx_v_jacobianInverseArray->dimensions[0]), (__pyx_v_jacobianInverseArray->dimensions[1]), (__pyx_v_jacobianInverseArray->dimensions[2]), (__pyx_v_l2g->dimensions[1]), ((double *)__pyx_v_grad_psi->data), ((double *)__pyx_v_boundaryNormals->data), ((double *)__pyx_v_boundaryJacobians->data), ((int *)__pyx_v_l2g->data), ((double *)__pyx_v_nodeArray->data), ((double *)__pyx_v_jacobianInverseArray->data), ((double *)__pyx_v_metricTensorArray->data), ((double *)__pyx_v_metricTensorDeterminantSqrtArray->data), ((double *)__pyx_v_unitNormalArray->data));
9581 
9582  /* "cfemIntegrals.pyx":2937
9583  * <double*>metricTensorDeterminantSqrtArray.data,
9584  * <double*>unitNormalArray.data)
9585  * elif nd == 2: # <<<<<<<<<<<<<<
9586  * cparametricMaps_getJacobianValuesTrace2D(jacobianInverseArray.shape[0],
9587  * jacobianInverseArray.shape[1],
9588  */
9589  break;
9590  case 3:
9591 
9592  /* "cfemIntegrals.pyx":2952
9593  * <double*>unitNormalArray.data)
9594  * elif nd == 3:
9595  * cparametricMaps_getJacobianValuesTrace3D(jacobianInverseArray.shape[0], # <<<<<<<<<<<<<<
9596  * jacobianInverseArray.shape[1],
9597  * jacobianInverseArray.shape[2],
9598  */
9599  parametricMaps_getJacobianValuesTrace3D((__pyx_v_jacobianInverseArray->dimensions[0]), (__pyx_v_jacobianInverseArray->dimensions[1]), (__pyx_v_jacobianInverseArray->dimensions[2]), (__pyx_v_l2g->dimensions[1]), ((double *)__pyx_v_grad_psi->data), ((double *)__pyx_v_boundaryNormals->data), ((double *)__pyx_v_boundaryJacobians->data), ((int *)__pyx_v_l2g->data), ((double *)__pyx_v_nodeArray->data), ((double *)__pyx_v_jacobianInverseArray->data), ((double *)__pyx_v_metricTensorArray->data), ((double *)__pyx_v_metricTensorDeterminantSqrtArray->data), ((double *)__pyx_v_unitNormalArray->data));
9600 
9601  /* "cfemIntegrals.pyx":2951
9602  * <double*>metricTensorDeterminantSqrtArray.data,
9603  * <double*>unitNormalArray.data)
9604  * elif nd == 3: # <<<<<<<<<<<<<<
9605  * cparametricMaps_getJacobianValuesTrace3D(jacobianInverseArray.shape[0],
9606  * jacobianInverseArray.shape[1],
9607  */
9608  break;
9609  default:
9610 
9611  /* "cfemIntegrals.pyx":2966
9612  * <double*>unitNormalArray.data)
9613  * else:
9614  * print("error in getJacobianValuesTrace...jacobianInverse not sized properly") # <<<<<<<<<<<<<<
9615  * def updateMass_weak(np.ndarray mt,
9616  * np.ndarray w_dV,
9617  */
9618  if (__Pyx_PrintOne(0, __pyx_kp_s_error_in_getJacobianValuesTrace) < 0) __PYX_ERR(0, 2966, __pyx_L1_error)
9619  break;
9620  }
9621 
9622  /* "cfemIntegrals.pyx":2913
9623  * else:
9624  * print("error in getJacobianValues...jacobian not sized properly")
9625  * def parametricMaps_getJacobianValuesTrace(np.ndarray grad_psi, # <<<<<<<<<<<<<<
9626  * np.ndarray boundaryNormals,
9627  * np.ndarray boundaryJacobians,
9628  */
9629 
9630  /* function exit code */
9631  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9632  goto __pyx_L0;
9633  __pyx_L1_error:;
9634  __Pyx_AddTraceback("cfemIntegrals.parametricMaps_getJacobianValuesTrace", __pyx_clineno, __pyx_lineno, __pyx_filename);
9635  __pyx_r = NULL;
9636  __pyx_L0:;
9637  __Pyx_XGIVEREF(__pyx_r);
9638  __Pyx_RefNannyFinishContext();
9639  return __pyx_r;
9640 }
9641 
9642 /* "cfemIntegrals.pyx":2967
9643  * else:
9644  * print("error in getJacobianValuesTrace...jacobianInverse not sized properly")
9645  * def updateMass_weak(np.ndarray mt, # <<<<<<<<<<<<<<
9646  * np.ndarray w_dV,
9647  * np.ndarray weak_residual):
9648  */
9649 
9650 /* Python wrapper */
9651 static PyObject *__pyx_pw_13cfemIntegrals_63updateMass_weak(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
9652 static PyMethodDef __pyx_mdef_13cfemIntegrals_63updateMass_weak = {"updateMass_weak", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_63updateMass_weak, METH_VARARGS|METH_KEYWORDS, 0};
9653 static PyObject *__pyx_pw_13cfemIntegrals_63updateMass_weak(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
9654  PyArrayObject *__pyx_v_mt = 0;
9655  PyArrayObject *__pyx_v_w_dV = 0;
9656  PyArrayObject *__pyx_v_weak_residual = 0;
9657  int __pyx_lineno = 0;
9658  const char *__pyx_filename = NULL;
9659  int __pyx_clineno = 0;
9660  PyObject *__pyx_r = 0;
9661  __Pyx_RefNannyDeclarations
9662  __Pyx_RefNannySetupContext("updateMass_weak (wrapper)", 0);
9663  {
9664  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_mt,&__pyx_n_s_w_dV,&__pyx_n_s_weak_residual,0};
9665  PyObject* values[3] = {0,0,0};
9666  if (unlikely(__pyx_kwds)) {
9667  Py_ssize_t kw_args;
9668  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
9669  switch (pos_args) {
9670  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
9671  CYTHON_FALLTHROUGH;
9672  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
9673  CYTHON_FALLTHROUGH;
9674  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9675  CYTHON_FALLTHROUGH;
9676  case 0: break;
9677  default: goto __pyx_L5_argtuple_error;
9678  }
9679  kw_args = PyDict_Size(__pyx_kwds);
9680  switch (pos_args) {
9681  case 0:
9682  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mt)) != 0)) kw_args--;
9683  else goto __pyx_L5_argtuple_error;
9684  CYTHON_FALLTHROUGH;
9685  case 1:
9686  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_w_dV)) != 0)) kw_args--;
9687  else {
9688  __Pyx_RaiseArgtupleInvalid("updateMass_weak", 1, 3, 3, 1); __PYX_ERR(0, 2967, __pyx_L3_error)
9689  }
9690  CYTHON_FALLTHROUGH;
9691  case 2:
9692  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weak_residual)) != 0)) kw_args--;
9693  else {
9694  __Pyx_RaiseArgtupleInvalid("updateMass_weak", 1, 3, 3, 2); __PYX_ERR(0, 2967, __pyx_L3_error)
9695  }
9696  }
9697  if (unlikely(kw_args > 0)) {
9698  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateMass_weak") < 0)) __PYX_ERR(0, 2967, __pyx_L3_error)
9699  }
9700  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
9701  goto __pyx_L5_argtuple_error;
9702  } else {
9703  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9704  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
9705  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
9706  }
9707  __pyx_v_mt = ((PyArrayObject *)values[0]);
9708  __pyx_v_w_dV = ((PyArrayObject *)values[1]);
9709  __pyx_v_weak_residual = ((PyArrayObject *)values[2]);
9710  }
9711  goto __pyx_L4_argument_unpacking_done;
9712  __pyx_L5_argtuple_error:;
9713  __Pyx_RaiseArgtupleInvalid("updateMass_weak", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2967, __pyx_L3_error)
9714  __pyx_L3_error:;
9715  __Pyx_AddTraceback("cfemIntegrals.updateMass_weak", __pyx_clineno, __pyx_lineno, __pyx_filename);
9716  __Pyx_RefNannyFinishContext();
9717  return NULL;
9718  __pyx_L4_argument_unpacking_done:;
9719  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mt), __pyx_ptype_5numpy_ndarray, 1, "mt", 0))) __PYX_ERR(0, 2967, __pyx_L1_error)
9720  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w_dV), __pyx_ptype_5numpy_ndarray, 1, "w_dV", 0))) __PYX_ERR(0, 2968, __pyx_L1_error)
9721  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_weak_residual), __pyx_ptype_5numpy_ndarray, 1, "weak_residual", 0))) __PYX_ERR(0, 2969, __pyx_L1_error)
9722  __pyx_r = __pyx_pf_13cfemIntegrals_62updateMass_weak(__pyx_self, __pyx_v_mt, __pyx_v_w_dV, __pyx_v_weak_residual);
9723 
9724  /* function exit code */
9725  goto __pyx_L0;
9726  __pyx_L1_error:;
9727  __pyx_r = NULL;
9728  __pyx_L0:;
9729  __Pyx_RefNannyFinishContext();
9730  return __pyx_r;
9731 }
9732 
9733 static PyObject *__pyx_pf_13cfemIntegrals_62updateMass_weak(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_mt, PyArrayObject *__pyx_v_w_dV, PyArrayObject *__pyx_v_weak_residual) {
9734  int __pyx_v_nElements_global;
9735  int __pyx_v_nQuadraturePoints_element;
9736  int __pyx_v_nDOF_test_element;
9737  PyObject *__pyx_r = NULL;
9738  __Pyx_RefNannyDeclarations
9739  __Pyx_RefNannySetupContext("updateMass_weak", 0);
9740 
9741  /* "cfemIntegrals.pyx":2970
9742  * np.ndarray w_dV,
9743  * np.ndarray weak_residual):
9744  * cdef int nElements_global = w_dV.shape[0] # <<<<<<<<<<<<<<
9745  * cdef int nQuadraturePoints_element = w_dV.shape[1]
9746  * cdef int nDOF_test_element = w_dV.shape[2]
9747  */
9748  __pyx_v_nElements_global = (__pyx_v_w_dV->dimensions[0]);
9749 
9750  /* "cfemIntegrals.pyx":2971
9751  * np.ndarray weak_residual):
9752  * cdef int nElements_global = w_dV.shape[0]
9753  * cdef int nQuadraturePoints_element = w_dV.shape[1] # <<<<<<<<<<<<<<
9754  * cdef int nDOF_test_element = w_dV.shape[2]
9755  * cupdateMass_weak(nElements_global,
9756  */
9757  __pyx_v_nQuadraturePoints_element = (__pyx_v_w_dV->dimensions[1]);
9758 
9759  /* "cfemIntegrals.pyx":2972
9760  * cdef int nElements_global = w_dV.shape[0]
9761  * cdef int nQuadraturePoints_element = w_dV.shape[1]
9762  * cdef int nDOF_test_element = w_dV.shape[2] # <<<<<<<<<<<<<<
9763  * cupdateMass_weak(nElements_global,
9764  * nQuadraturePoints_element,
9765  */
9766  __pyx_v_nDOF_test_element = (__pyx_v_w_dV->dimensions[2]);
9767 
9768  /* "cfemIntegrals.pyx":2973
9769  * cdef int nQuadraturePoints_element = w_dV.shape[1]
9770  * cdef int nDOF_test_element = w_dV.shape[2]
9771  * cupdateMass_weak(nElements_global, # <<<<<<<<<<<<<<
9772  * nQuadraturePoints_element,
9773  * nDOF_test_element,
9774  */
9775  updateMass_weak(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_test_element, ((double *)__pyx_v_mt->data), ((double *)__pyx_v_w_dV->data), ((double *)__pyx_v_weak_residual->data));
9776 
9777  /* "cfemIntegrals.pyx":2967
9778  * else:
9779  * print("error in getJacobianValuesTrace...jacobianInverse not sized properly")
9780  * def updateMass_weak(np.ndarray mt, # <<<<<<<<<<<<<<
9781  * np.ndarray w_dV,
9782  * np.ndarray weak_residual):
9783  */
9784 
9785  /* function exit code */
9786  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9787  __Pyx_XGIVEREF(__pyx_r);
9788  __Pyx_RefNannyFinishContext();
9789  return __pyx_r;
9790 }
9791 
9792 /* "cfemIntegrals.pyx":2979
9793  * <double*>w_dV.data,
9794  * <double*>weak_residual.data)
9795  * def updateMassJacobian_weak(np.ndarray dmt, # <<<<<<<<<<<<<<
9796  * np.ndarray v_X_w_dV,
9797  * np.ndarray jacobian_weak_residual):
9798  */
9799 
9800 /* Python wrapper */
9801 static PyObject *__pyx_pw_13cfemIntegrals_65updateMassJacobian_weak(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
9802 static PyMethodDef __pyx_mdef_13cfemIntegrals_65updateMassJacobian_weak = {"updateMassJacobian_weak", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_65updateMassJacobian_weak, METH_VARARGS|METH_KEYWORDS, 0};
9803 static PyObject *__pyx_pw_13cfemIntegrals_65updateMassJacobian_weak(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
9804  PyArrayObject *__pyx_v_dmt = 0;
9805  PyArrayObject *__pyx_v_v_X_w_dV = 0;
9806  PyArrayObject *__pyx_v_jacobian_weak_residual = 0;
9807  int __pyx_lineno = 0;
9808  const char *__pyx_filename = NULL;
9809  int __pyx_clineno = 0;
9810  PyObject *__pyx_r = 0;
9811  __Pyx_RefNannyDeclarations
9812  __Pyx_RefNannySetupContext("updateMassJacobian_weak (wrapper)", 0);
9813  {
9814  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dmt,&__pyx_n_s_v_X_w_dV,&__pyx_n_s_jacobian_weak_residual,0};
9815  PyObject* values[3] = {0,0,0};
9816  if (unlikely(__pyx_kwds)) {
9817  Py_ssize_t kw_args;
9818  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
9819  switch (pos_args) {
9820  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
9821  CYTHON_FALLTHROUGH;
9822  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
9823  CYTHON_FALLTHROUGH;
9824  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9825  CYTHON_FALLTHROUGH;
9826  case 0: break;
9827  default: goto __pyx_L5_argtuple_error;
9828  }
9829  kw_args = PyDict_Size(__pyx_kwds);
9830  switch (pos_args) {
9831  case 0:
9832  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dmt)) != 0)) kw_args--;
9833  else goto __pyx_L5_argtuple_error;
9834  CYTHON_FALLTHROUGH;
9835  case 1:
9836  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v_X_w_dV)) != 0)) kw_args--;
9837  else {
9838  __Pyx_RaiseArgtupleInvalid("updateMassJacobian_weak", 1, 3, 3, 1); __PYX_ERR(0, 2979, __pyx_L3_error)
9839  }
9840  CYTHON_FALLTHROUGH;
9841  case 2:
9842  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jacobian_weak_residual)) != 0)) kw_args--;
9843  else {
9844  __Pyx_RaiseArgtupleInvalid("updateMassJacobian_weak", 1, 3, 3, 2); __PYX_ERR(0, 2979, __pyx_L3_error)
9845  }
9846  }
9847  if (unlikely(kw_args > 0)) {
9848  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateMassJacobian_weak") < 0)) __PYX_ERR(0, 2979, __pyx_L3_error)
9849  }
9850  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
9851  goto __pyx_L5_argtuple_error;
9852  } else {
9853  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9854  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
9855  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
9856  }
9857  __pyx_v_dmt = ((PyArrayObject *)values[0]);
9858  __pyx_v_v_X_w_dV = ((PyArrayObject *)values[1]);
9859  __pyx_v_jacobian_weak_residual = ((PyArrayObject *)values[2]);
9860  }
9861  goto __pyx_L4_argument_unpacking_done;
9862  __pyx_L5_argtuple_error:;
9863  __Pyx_RaiseArgtupleInvalid("updateMassJacobian_weak", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2979, __pyx_L3_error)
9864  __pyx_L3_error:;
9865  __Pyx_AddTraceback("cfemIntegrals.updateMassJacobian_weak", __pyx_clineno, __pyx_lineno, __pyx_filename);
9866  __Pyx_RefNannyFinishContext();
9867  return NULL;
9868  __pyx_L4_argument_unpacking_done:;
9869  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dmt), __pyx_ptype_5numpy_ndarray, 1, "dmt", 0))) __PYX_ERR(0, 2979, __pyx_L1_error)
9870  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v_X_w_dV), __pyx_ptype_5numpy_ndarray, 1, "v_X_w_dV", 0))) __PYX_ERR(0, 2980, __pyx_L1_error)
9871  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_jacobian_weak_residual), __pyx_ptype_5numpy_ndarray, 1, "jacobian_weak_residual", 0))) __PYX_ERR(0, 2981, __pyx_L1_error)
9872  __pyx_r = __pyx_pf_13cfemIntegrals_64updateMassJacobian_weak(__pyx_self, __pyx_v_dmt, __pyx_v_v_X_w_dV, __pyx_v_jacobian_weak_residual);
9873 
9874  /* function exit code */
9875  goto __pyx_L0;
9876  __pyx_L1_error:;
9877  __pyx_r = NULL;
9878  __pyx_L0:;
9879  __Pyx_RefNannyFinishContext();
9880  return __pyx_r;
9881 }
9882 
9883 static PyObject *__pyx_pf_13cfemIntegrals_64updateMassJacobian_weak(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dmt, PyArrayObject *__pyx_v_v_X_w_dV, PyArrayObject *__pyx_v_jacobian_weak_residual) {
9884  int __pyx_v_nElements_global;
9885  int __pyx_v_nQuadraturePoints_element;
9886  int __pyx_v_nDOF_trial_element;
9887  int __pyx_v_nDOF_test_element;
9888  PyObject *__pyx_r = NULL;
9889  __Pyx_RefNannyDeclarations
9890  __Pyx_RefNannySetupContext("updateMassJacobian_weak", 0);
9891 
9892  /* "cfemIntegrals.pyx":2982
9893  * np.ndarray v_X_w_dV,
9894  * np.ndarray jacobian_weak_residual):
9895  * cdef int nElements_global = v_X_w_dV.shape[0] # <<<<<<<<<<<<<<
9896  * cdef int nQuadraturePoints_element = v_X_w_dV.shape[1]
9897  * cdef int nDOF_trial_element = v_X_w_dV.shape[2]
9898  */
9899  __pyx_v_nElements_global = (__pyx_v_v_X_w_dV->dimensions[0]);
9900 
9901  /* "cfemIntegrals.pyx":2983
9902  * np.ndarray jacobian_weak_residual):
9903  * cdef int nElements_global = v_X_w_dV.shape[0]
9904  * cdef int nQuadraturePoints_element = v_X_w_dV.shape[1] # <<<<<<<<<<<<<<
9905  * cdef int nDOF_trial_element = v_X_w_dV.shape[2]
9906  * cdef int nDOF_test_element = v_X_w_dV.shape[3]
9907  */
9908  __pyx_v_nQuadraturePoints_element = (__pyx_v_v_X_w_dV->dimensions[1]);
9909 
9910  /* "cfemIntegrals.pyx":2984
9911  * cdef int nElements_global = v_X_w_dV.shape[0]
9912  * cdef int nQuadraturePoints_element = v_X_w_dV.shape[1]
9913  * cdef int nDOF_trial_element = v_X_w_dV.shape[2] # <<<<<<<<<<<<<<
9914  * cdef int nDOF_test_element = v_X_w_dV.shape[3]
9915  * cupdateMassJacobian_weak(nElements_global,
9916  */
9917  __pyx_v_nDOF_trial_element = (__pyx_v_v_X_w_dV->dimensions[2]);
9918 
9919  /* "cfemIntegrals.pyx":2985
9920  * cdef int nQuadraturePoints_element = v_X_w_dV.shape[1]
9921  * cdef int nDOF_trial_element = v_X_w_dV.shape[2]
9922  * cdef int nDOF_test_element = v_X_w_dV.shape[3] # <<<<<<<<<<<<<<
9923  * cupdateMassJacobian_weak(nElements_global,
9924  * nQuadraturePoints_element,
9925  */
9926  __pyx_v_nDOF_test_element = (__pyx_v_v_X_w_dV->dimensions[3]);
9927 
9928  /* "cfemIntegrals.pyx":2986
9929  * cdef int nDOF_trial_element = v_X_w_dV.shape[2]
9930  * cdef int nDOF_test_element = v_X_w_dV.shape[3]
9931  * cupdateMassJacobian_weak(nElements_global, # <<<<<<<<<<<<<<
9932  * nQuadraturePoints_element,
9933  * nDOF_trial_element,
9934  */
9935  updateMassJacobian_weak(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_trial_element, __pyx_v_nDOF_test_element, ((double *)__pyx_v_dmt->data), ((double *)__pyx_v_v_X_w_dV->data), ((double *)__pyx_v_jacobian_weak_residual->data));
9936 
9937  /* "cfemIntegrals.pyx":2979
9938  * <double*>w_dV.data,
9939  * <double*>weak_residual.data)
9940  * def updateMassJacobian_weak(np.ndarray dmt, # <<<<<<<<<<<<<<
9941  * np.ndarray v_X_w_dV,
9942  * np.ndarray jacobian_weak_residual):
9943  */
9944 
9945  /* function exit code */
9946  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9947  __Pyx_XGIVEREF(__pyx_r);
9948  __Pyx_RefNannyFinishContext();
9949  return __pyx_r;
9950 }
9951 
9952 /* "cfemIntegrals.pyx":2993
9953  * <double*>v_X_w_dV.data,
9954  * <double*>jacobian_weak_residual.data)
9955  * def updateMassJacobian_weak_lowmem(np.ndarray dmt, # <<<<<<<<<<<<<<
9956  * np.ndarray v,
9957  * np.ndarray w_dV,
9958  */
9959 
9960 /* Python wrapper */
9961 static PyObject *__pyx_pw_13cfemIntegrals_67updateMassJacobian_weak_lowmem(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
9962 static PyMethodDef __pyx_mdef_13cfemIntegrals_67updateMassJacobian_weak_lowmem = {"updateMassJacobian_weak_lowmem", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_67updateMassJacobian_weak_lowmem, METH_VARARGS|METH_KEYWORDS, 0};
9963 static PyObject *__pyx_pw_13cfemIntegrals_67updateMassJacobian_weak_lowmem(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
9964  PyArrayObject *__pyx_v_dmt = 0;
9965  PyArrayObject *__pyx_v_v = 0;
9966  PyArrayObject *__pyx_v_w_dV = 0;
9967  PyArrayObject *__pyx_v_jacobian_weak_residual = 0;
9968  int __pyx_lineno = 0;
9969  const char *__pyx_filename = NULL;
9970  int __pyx_clineno = 0;
9971  PyObject *__pyx_r = 0;
9972  __Pyx_RefNannyDeclarations
9973  __Pyx_RefNannySetupContext("updateMassJacobian_weak_lowmem (wrapper)", 0);
9974  {
9975  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dmt,&__pyx_n_s_v,&__pyx_n_s_w_dV,&__pyx_n_s_jacobian_weak_residual,0};
9976  PyObject* values[4] = {0,0,0,0};
9977  if (unlikely(__pyx_kwds)) {
9978  Py_ssize_t kw_args;
9979  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
9980  switch (pos_args) {
9981  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
9982  CYTHON_FALLTHROUGH;
9983  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
9984  CYTHON_FALLTHROUGH;
9985  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
9986  CYTHON_FALLTHROUGH;
9987  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9988  CYTHON_FALLTHROUGH;
9989  case 0: break;
9990  default: goto __pyx_L5_argtuple_error;
9991  }
9992  kw_args = PyDict_Size(__pyx_kwds);
9993  switch (pos_args) {
9994  case 0:
9995  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dmt)) != 0)) kw_args--;
9996  else goto __pyx_L5_argtuple_error;
9997  CYTHON_FALLTHROUGH;
9998  case 1:
9999  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
10000  else {
10001  __Pyx_RaiseArgtupleInvalid("updateMassJacobian_weak_lowmem", 1, 4, 4, 1); __PYX_ERR(0, 2993, __pyx_L3_error)
10002  }
10003  CYTHON_FALLTHROUGH;
10004  case 2:
10005  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_w_dV)) != 0)) kw_args--;
10006  else {
10007  __Pyx_RaiseArgtupleInvalid("updateMassJacobian_weak_lowmem", 1, 4, 4, 2); __PYX_ERR(0, 2993, __pyx_L3_error)
10008  }
10009  CYTHON_FALLTHROUGH;
10010  case 3:
10011  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jacobian_weak_residual)) != 0)) kw_args--;
10012  else {
10013  __Pyx_RaiseArgtupleInvalid("updateMassJacobian_weak_lowmem", 1, 4, 4, 3); __PYX_ERR(0, 2993, __pyx_L3_error)
10014  }
10015  }
10016  if (unlikely(kw_args > 0)) {
10017  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateMassJacobian_weak_lowmem") < 0)) __PYX_ERR(0, 2993, __pyx_L3_error)
10018  }
10019  } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
10020  goto __pyx_L5_argtuple_error;
10021  } else {
10022  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
10023  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
10024  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
10025  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
10026  }
10027  __pyx_v_dmt = ((PyArrayObject *)values[0]);
10028  __pyx_v_v = ((PyArrayObject *)values[1]);
10029  __pyx_v_w_dV = ((PyArrayObject *)values[2]);
10030  __pyx_v_jacobian_weak_residual = ((PyArrayObject *)values[3]);
10031  }
10032  goto __pyx_L4_argument_unpacking_done;
10033  __pyx_L5_argtuple_error:;
10034  __Pyx_RaiseArgtupleInvalid("updateMassJacobian_weak_lowmem", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2993, __pyx_L3_error)
10035  __pyx_L3_error:;
10036  __Pyx_AddTraceback("cfemIntegrals.updateMassJacobian_weak_lowmem", __pyx_clineno, __pyx_lineno, __pyx_filename);
10037  __Pyx_RefNannyFinishContext();
10038  return NULL;
10039  __pyx_L4_argument_unpacking_done:;
10040  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dmt), __pyx_ptype_5numpy_ndarray, 1, "dmt", 0))) __PYX_ERR(0, 2993, __pyx_L1_error)
10041  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), __pyx_ptype_5numpy_ndarray, 1, "v", 0))) __PYX_ERR(0, 2994, __pyx_L1_error)
10042  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w_dV), __pyx_ptype_5numpy_ndarray, 1, "w_dV", 0))) __PYX_ERR(0, 2995, __pyx_L1_error)
10043  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_jacobian_weak_residual), __pyx_ptype_5numpy_ndarray, 1, "jacobian_weak_residual", 0))) __PYX_ERR(0, 2996, __pyx_L1_error)
10044  __pyx_r = __pyx_pf_13cfemIntegrals_66updateMassJacobian_weak_lowmem(__pyx_self, __pyx_v_dmt, __pyx_v_v, __pyx_v_w_dV, __pyx_v_jacobian_weak_residual);
10045 
10046  /* function exit code */
10047  goto __pyx_L0;
10048  __pyx_L1_error:;
10049  __pyx_r = NULL;
10050  __pyx_L0:;
10051  __Pyx_RefNannyFinishContext();
10052  return __pyx_r;
10053 }
10054 
10055 static PyObject *__pyx_pf_13cfemIntegrals_66updateMassJacobian_weak_lowmem(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dmt, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_w_dV, PyArrayObject *__pyx_v_jacobian_weak_residual) {
10056  int __pyx_v_nElements_global;
10057  int __pyx_v_nQuadraturePoints_element;
10058  int __pyx_v_nDOF_trial_element;
10059  int __pyx_v_nDOF_test_element;
10060  PyObject *__pyx_r = NULL;
10061  __Pyx_RefNannyDeclarations
10062  __Pyx_RefNannySetupContext("updateMassJacobian_weak_lowmem", 0);
10063 
10064  /* "cfemIntegrals.pyx":2997
10065  * np.ndarray w_dV,
10066  * np.ndarray jacobian_weak_residual):
10067  * cdef int nElements_global = v.shape[0] # <<<<<<<<<<<<<<
10068  * cdef int nQuadraturePoints_element = v.shape[1]
10069  * cdef int nDOF_trial_element = v.shape[2]
10070  */
10071  __pyx_v_nElements_global = (__pyx_v_v->dimensions[0]);
10072 
10073  /* "cfemIntegrals.pyx":2998
10074  * np.ndarray jacobian_weak_residual):
10075  * cdef int nElements_global = v.shape[0]
10076  * cdef int nQuadraturePoints_element = v.shape[1] # <<<<<<<<<<<<<<
10077  * cdef int nDOF_trial_element = v.shape[2]
10078  * cdef int nDOF_test_element = w_dV.shape[2]
10079  */
10080  __pyx_v_nQuadraturePoints_element = (__pyx_v_v->dimensions[1]);
10081 
10082  /* "cfemIntegrals.pyx":2999
10083  * cdef int nElements_global = v.shape[0]
10084  * cdef int nQuadraturePoints_element = v.shape[1]
10085  * cdef int nDOF_trial_element = v.shape[2] # <<<<<<<<<<<<<<
10086  * cdef int nDOF_test_element = w_dV.shape[2]
10087  * cupdateMassJacobian_weak_lowmem(nElements_global,
10088  */
10089  __pyx_v_nDOF_trial_element = (__pyx_v_v->dimensions[2]);
10090 
10091  /* "cfemIntegrals.pyx":3000
10092  * cdef int nQuadraturePoints_element = v.shape[1]
10093  * cdef int nDOF_trial_element = v.shape[2]
10094  * cdef int nDOF_test_element = w_dV.shape[2] # <<<<<<<<<<<<<<
10095  * cupdateMassJacobian_weak_lowmem(nElements_global,
10096  * nQuadraturePoints_element,
10097  */
10098  __pyx_v_nDOF_test_element = (__pyx_v_w_dV->dimensions[2]);
10099 
10100  /* "cfemIntegrals.pyx":3001
10101  * cdef int nDOF_trial_element = v.shape[2]
10102  * cdef int nDOF_test_element = w_dV.shape[2]
10103  * cupdateMassJacobian_weak_lowmem(nElements_global, # <<<<<<<<<<<<<<
10104  * nQuadraturePoints_element,
10105  * nDOF_trial_element,
10106  */
10107  updateMassJacobian_weak_lowmem(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_trial_element, __pyx_v_nDOF_test_element, ((double *)__pyx_v_dmt->data), ((double *)__pyx_v_v->data), ((double *)__pyx_v_w_dV->data), ((double *)__pyx_v_jacobian_weak_residual->data));
10108 
10109  /* "cfemIntegrals.pyx":2993
10110  * <double*>v_X_w_dV.data,
10111  * <double*>jacobian_weak_residual.data)
10112  * def updateMassJacobian_weak_lowmem(np.ndarray dmt, # <<<<<<<<<<<<<<
10113  * np.ndarray v,
10114  * np.ndarray w_dV,
10115  */
10116 
10117  /* function exit code */
10118  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10119  __Pyx_XGIVEREF(__pyx_r);
10120  __Pyx_RefNannyFinishContext();
10121  return __pyx_r;
10122 }
10123 
10124 /* "cfemIntegrals.pyx":3009
10125  * <double*> w_dV.data,
10126  * <double*> jacobian_weak_residual.data)
10127  * def updateMass_strong(np.ndarray mt, # <<<<<<<<<<<<<<
10128  * np.ndarray strong_residual):
10129  * cdef int nElements_global = mt.shape[0]
10130  */
10131 
10132 /* Python wrapper */
10133 static PyObject *__pyx_pw_13cfemIntegrals_69updateMass_strong(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
10134 static PyMethodDef __pyx_mdef_13cfemIntegrals_69updateMass_strong = {"updateMass_strong", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_69updateMass_strong, METH_VARARGS|METH_KEYWORDS, 0};
10135 static PyObject *__pyx_pw_13cfemIntegrals_69updateMass_strong(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
10136  PyArrayObject *__pyx_v_mt = 0;
10137  PyArrayObject *__pyx_v_strong_residual = 0;
10138  int __pyx_lineno = 0;
10139  const char *__pyx_filename = NULL;
10140  int __pyx_clineno = 0;
10141  PyObject *__pyx_r = 0;
10142  __Pyx_RefNannyDeclarations
10143  __Pyx_RefNannySetupContext("updateMass_strong (wrapper)", 0);
10144  {
10145  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_mt,&__pyx_n_s_strong_residual,0};
10146  PyObject* values[2] = {0,0};
10147  if (unlikely(__pyx_kwds)) {
10148  Py_ssize_t kw_args;
10149  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
10150  switch (pos_args) {
10151  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
10152  CYTHON_FALLTHROUGH;
10153  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
10154  CYTHON_FALLTHROUGH;
10155  case 0: break;
10156  default: goto __pyx_L5_argtuple_error;
10157  }
10158  kw_args = PyDict_Size(__pyx_kwds);
10159  switch (pos_args) {
10160  case 0:
10161  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mt)) != 0)) kw_args--;
10162  else goto __pyx_L5_argtuple_error;
10163  CYTHON_FALLTHROUGH;
10164  case 1:
10165  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_strong_residual)) != 0)) kw_args--;
10166  else {
10167  __Pyx_RaiseArgtupleInvalid("updateMass_strong", 1, 2, 2, 1); __PYX_ERR(0, 3009, __pyx_L3_error)
10168  }
10169  }
10170  if (unlikely(kw_args > 0)) {
10171  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateMass_strong") < 0)) __PYX_ERR(0, 3009, __pyx_L3_error)
10172  }
10173  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
10174  goto __pyx_L5_argtuple_error;
10175  } else {
10176  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
10177  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
10178  }
10179  __pyx_v_mt = ((PyArrayObject *)values[0]);
10180  __pyx_v_strong_residual = ((PyArrayObject *)values[1]);
10181  }
10182  goto __pyx_L4_argument_unpacking_done;
10183  __pyx_L5_argtuple_error:;
10184  __Pyx_RaiseArgtupleInvalid("updateMass_strong", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3009, __pyx_L3_error)
10185  __pyx_L3_error:;
10186  __Pyx_AddTraceback("cfemIntegrals.updateMass_strong", __pyx_clineno, __pyx_lineno, __pyx_filename);
10187  __Pyx_RefNannyFinishContext();
10188  return NULL;
10189  __pyx_L4_argument_unpacking_done:;
10190  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mt), __pyx_ptype_5numpy_ndarray, 1, "mt", 0))) __PYX_ERR(0, 3009, __pyx_L1_error)
10191  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_strong_residual), __pyx_ptype_5numpy_ndarray, 1, "strong_residual", 0))) __PYX_ERR(0, 3010, __pyx_L1_error)
10192  __pyx_r = __pyx_pf_13cfemIntegrals_68updateMass_strong(__pyx_self, __pyx_v_mt, __pyx_v_strong_residual);
10193 
10194  /* function exit code */
10195  goto __pyx_L0;
10196  __pyx_L1_error:;
10197  __pyx_r = NULL;
10198  __pyx_L0:;
10199  __Pyx_RefNannyFinishContext();
10200  return __pyx_r;
10201 }
10202 
10203 static PyObject *__pyx_pf_13cfemIntegrals_68updateMass_strong(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_mt, PyArrayObject *__pyx_v_strong_residual) {
10204  int __pyx_v_nElements_global;
10205  int __pyx_v_nQuadraturePoints_element;
10206  PyObject *__pyx_r = NULL;
10207  __Pyx_RefNannyDeclarations
10208  __Pyx_RefNannySetupContext("updateMass_strong", 0);
10209 
10210  /* "cfemIntegrals.pyx":3011
10211  * def updateMass_strong(np.ndarray mt,
10212  * np.ndarray strong_residual):
10213  * cdef int nElements_global = mt.shape[0] # <<<<<<<<<<<<<<
10214  * cdef int nQuadraturePoints_element = mt.shape[1]
10215  * cupdateMass_strong(nElements_global,
10216  */
10217  __pyx_v_nElements_global = (__pyx_v_mt->dimensions[0]);
10218 
10219  /* "cfemIntegrals.pyx":3012
10220  * np.ndarray strong_residual):
10221  * cdef int nElements_global = mt.shape[0]
10222  * cdef int nQuadraturePoints_element = mt.shape[1] # <<<<<<<<<<<<<<
10223  * cupdateMass_strong(nElements_global,
10224  * nQuadraturePoints_element,
10225  */
10226  __pyx_v_nQuadraturePoints_element = (__pyx_v_mt->dimensions[1]);
10227 
10228  /* "cfemIntegrals.pyx":3013
10229  * cdef int nElements_global = mt.shape[0]
10230  * cdef int nQuadraturePoints_element = mt.shape[1]
10231  * cupdateMass_strong(nElements_global, # <<<<<<<<<<<<<<
10232  * nQuadraturePoints_element,
10233  * <double*>mt.data,
10234  */
10235  updateMass_strong(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, ((double *)__pyx_v_mt->data), ((double *)__pyx_v_strong_residual->data));
10236 
10237  /* "cfemIntegrals.pyx":3009
10238  * <double*> w_dV.data,
10239  * <double*> jacobian_weak_residual.data)
10240  * def updateMass_strong(np.ndarray mt, # <<<<<<<<<<<<<<
10241  * np.ndarray strong_residual):
10242  * cdef int nElements_global = mt.shape[0]
10243  */
10244 
10245  /* function exit code */
10246  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10247  __Pyx_XGIVEREF(__pyx_r);
10248  __Pyx_RefNannyFinishContext();
10249  return __pyx_r;
10250 }
10251 
10252 /* "cfemIntegrals.pyx":3017
10253  * <double*>mt.data,
10254  * <double*>strong_residual.data)
10255  * def updateMassJacobian_strong(np.ndarray dmt, # <<<<<<<<<<<<<<
10256  * np.ndarray v,
10257  * np.ndarray dstrong_residual):
10258  */
10259 
10260 /* Python wrapper */
10261 static PyObject *__pyx_pw_13cfemIntegrals_71updateMassJacobian_strong(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
10262 static PyMethodDef __pyx_mdef_13cfemIntegrals_71updateMassJacobian_strong = {"updateMassJacobian_strong", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_71updateMassJacobian_strong, METH_VARARGS|METH_KEYWORDS, 0};
10263 static PyObject *__pyx_pw_13cfemIntegrals_71updateMassJacobian_strong(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
10264  PyArrayObject *__pyx_v_dmt = 0;
10265  PyArrayObject *__pyx_v_v = 0;
10266  PyArrayObject *__pyx_v_dstrong_residual = 0;
10267  int __pyx_lineno = 0;
10268  const char *__pyx_filename = NULL;
10269  int __pyx_clineno = 0;
10270  PyObject *__pyx_r = 0;
10271  __Pyx_RefNannyDeclarations
10272  __Pyx_RefNannySetupContext("updateMassJacobian_strong (wrapper)", 0);
10273  {
10274  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dmt,&__pyx_n_s_v,&__pyx_n_s_dstrong_residual,0};
10275  PyObject* values[3] = {0,0,0};
10276  if (unlikely(__pyx_kwds)) {
10277  Py_ssize_t kw_args;
10278  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
10279  switch (pos_args) {
10280  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
10281  CYTHON_FALLTHROUGH;
10282  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
10283  CYTHON_FALLTHROUGH;
10284  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
10285  CYTHON_FALLTHROUGH;
10286  case 0: break;
10287  default: goto __pyx_L5_argtuple_error;
10288  }
10289  kw_args = PyDict_Size(__pyx_kwds);
10290  switch (pos_args) {
10291  case 0:
10292  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dmt)) != 0)) kw_args--;
10293  else goto __pyx_L5_argtuple_error;
10294  CYTHON_FALLTHROUGH;
10295  case 1:
10296  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
10297  else {
10298  __Pyx_RaiseArgtupleInvalid("updateMassJacobian_strong", 1, 3, 3, 1); __PYX_ERR(0, 3017, __pyx_L3_error)
10299  }
10300  CYTHON_FALLTHROUGH;
10301  case 2:
10302  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dstrong_residual)) != 0)) kw_args--;
10303  else {
10304  __Pyx_RaiseArgtupleInvalid("updateMassJacobian_strong", 1, 3, 3, 2); __PYX_ERR(0, 3017, __pyx_L3_error)
10305  }
10306  }
10307  if (unlikely(kw_args > 0)) {
10308  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateMassJacobian_strong") < 0)) __PYX_ERR(0, 3017, __pyx_L3_error)
10309  }
10310  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
10311  goto __pyx_L5_argtuple_error;
10312  } else {
10313  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
10314  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
10315  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
10316  }
10317  __pyx_v_dmt = ((PyArrayObject *)values[0]);
10318  __pyx_v_v = ((PyArrayObject *)values[1]);
10319  __pyx_v_dstrong_residual = ((PyArrayObject *)values[2]);
10320  }
10321  goto __pyx_L4_argument_unpacking_done;
10322  __pyx_L5_argtuple_error:;
10323  __Pyx_RaiseArgtupleInvalid("updateMassJacobian_strong", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3017, __pyx_L3_error)
10324  __pyx_L3_error:;
10325  __Pyx_AddTraceback("cfemIntegrals.updateMassJacobian_strong", __pyx_clineno, __pyx_lineno, __pyx_filename);
10326  __Pyx_RefNannyFinishContext();
10327  return NULL;
10328  __pyx_L4_argument_unpacking_done:;
10329  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dmt), __pyx_ptype_5numpy_ndarray, 1, "dmt", 0))) __PYX_ERR(0, 3017, __pyx_L1_error)
10330  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), __pyx_ptype_5numpy_ndarray, 1, "v", 0))) __PYX_ERR(0, 3018, __pyx_L1_error)
10331  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dstrong_residual), __pyx_ptype_5numpy_ndarray, 1, "dstrong_residual", 0))) __PYX_ERR(0, 3019, __pyx_L1_error)
10332  __pyx_r = __pyx_pf_13cfemIntegrals_70updateMassJacobian_strong(__pyx_self, __pyx_v_dmt, __pyx_v_v, __pyx_v_dstrong_residual);
10333 
10334  /* function exit code */
10335  goto __pyx_L0;
10336  __pyx_L1_error:;
10337  __pyx_r = NULL;
10338  __pyx_L0:;
10339  __Pyx_RefNannyFinishContext();
10340  return __pyx_r;
10341 }
10342 
10343 static PyObject *__pyx_pf_13cfemIntegrals_70updateMassJacobian_strong(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dmt, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_dstrong_residual) {
10344  int __pyx_v_nElements_global;
10345  int __pyx_v_nQuadraturePoints_element;
10346  int __pyx_v_nDOF_trial_element;
10347  PyObject *__pyx_r = NULL;
10348  __Pyx_RefNannyDeclarations
10349  __Pyx_RefNannySetupContext("updateMassJacobian_strong", 0);
10350 
10351  /* "cfemIntegrals.pyx":3020
10352  * np.ndarray v,
10353  * np.ndarray dstrong_residual):
10354  * cdef int nElements_global = v.shape[0] # <<<<<<<<<<<<<<
10355  * cdef int nQuadraturePoints_element = v.shape[1]
10356  * cdef int nDOF_trial_element = v.shape[2]
10357  */
10358  __pyx_v_nElements_global = (__pyx_v_v->dimensions[0]);
10359 
10360  /* "cfemIntegrals.pyx":3021
10361  * np.ndarray dstrong_residual):
10362  * cdef int nElements_global = v.shape[0]
10363  * cdef int nQuadraturePoints_element = v.shape[1] # <<<<<<<<<<<<<<
10364  * cdef int nDOF_trial_element = v.shape[2]
10365  * cupdateMassJacobian_strong(nElements_global,
10366  */
10367  __pyx_v_nQuadraturePoints_element = (__pyx_v_v->dimensions[1]);
10368 
10369  /* "cfemIntegrals.pyx":3022
10370  * cdef int nElements_global = v.shape[0]
10371  * cdef int nQuadraturePoints_element = v.shape[1]
10372  * cdef int nDOF_trial_element = v.shape[2] # <<<<<<<<<<<<<<
10373  * cupdateMassJacobian_strong(nElements_global,
10374  * nQuadraturePoints_element,
10375  */
10376  __pyx_v_nDOF_trial_element = (__pyx_v_v->dimensions[2]);
10377 
10378  /* "cfemIntegrals.pyx":3023
10379  * cdef int nQuadraturePoints_element = v.shape[1]
10380  * cdef int nDOF_trial_element = v.shape[2]
10381  * cupdateMassJacobian_strong(nElements_global, # <<<<<<<<<<<<<<
10382  * nQuadraturePoints_element,
10383  * nDOF_trial_element,
10384  */
10385  updateMassJacobian_strong(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_trial_element, ((double *)__pyx_v_dmt->data), ((double *)__pyx_v_v->data), ((double *)__pyx_v_dstrong_residual->data));
10386 
10387  /* "cfemIntegrals.pyx":3017
10388  * <double*>mt.data,
10389  * <double*>strong_residual.data)
10390  * def updateMassJacobian_strong(np.ndarray dmt, # <<<<<<<<<<<<<<
10391  * np.ndarray v,
10392  * np.ndarray dstrong_residual):
10393  */
10394 
10395  /* function exit code */
10396  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10397  __Pyx_XGIVEREF(__pyx_r);
10398  __Pyx_RefNannyFinishContext();
10399  return __pyx_r;
10400 }
10401 
10402 /* "cfemIntegrals.pyx":3029
10403  * <double*>v.data,
10404  * <double*>dstrong_residual.data)
10405  * def updateMass_adjoint(np.ndarray dmt, # <<<<<<<<<<<<<<
10406  * np.ndarray w_dV,
10407  * np.ndarray Lstar_w_dV):
10408  */
10409 
10410 /* Python wrapper */
10411 static PyObject *__pyx_pw_13cfemIntegrals_73updateMass_adjoint(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
10412 static PyMethodDef __pyx_mdef_13cfemIntegrals_73updateMass_adjoint = {"updateMass_adjoint", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_73updateMass_adjoint, METH_VARARGS|METH_KEYWORDS, 0};
10413 static PyObject *__pyx_pw_13cfemIntegrals_73updateMass_adjoint(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
10414  PyArrayObject *__pyx_v_dmt = 0;
10415  PyArrayObject *__pyx_v_w_dV = 0;
10416  PyArrayObject *__pyx_v_Lstar_w_dV = 0;
10417  int __pyx_lineno = 0;
10418  const char *__pyx_filename = NULL;
10419  int __pyx_clineno = 0;
10420  PyObject *__pyx_r = 0;
10421  __Pyx_RefNannyDeclarations
10422  __Pyx_RefNannySetupContext("updateMass_adjoint (wrapper)", 0);
10423  {
10424  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dmt,&__pyx_n_s_w_dV,&__pyx_n_s_Lstar_w_dV,0};
10425  PyObject* values[3] = {0,0,0};
10426  if (unlikely(__pyx_kwds)) {
10427  Py_ssize_t kw_args;
10428  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
10429  switch (pos_args) {
10430  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
10431  CYTHON_FALLTHROUGH;
10432  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
10433  CYTHON_FALLTHROUGH;
10434  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
10435  CYTHON_FALLTHROUGH;
10436  case 0: break;
10437  default: goto __pyx_L5_argtuple_error;
10438  }
10439  kw_args = PyDict_Size(__pyx_kwds);
10440  switch (pos_args) {
10441  case 0:
10442  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dmt)) != 0)) kw_args--;
10443  else goto __pyx_L5_argtuple_error;
10444  CYTHON_FALLTHROUGH;
10445  case 1:
10446  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_w_dV)) != 0)) kw_args--;
10447  else {
10448  __Pyx_RaiseArgtupleInvalid("updateMass_adjoint", 1, 3, 3, 1); __PYX_ERR(0, 3029, __pyx_L3_error)
10449  }
10450  CYTHON_FALLTHROUGH;
10451  case 2:
10452  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Lstar_w_dV)) != 0)) kw_args--;
10453  else {
10454  __Pyx_RaiseArgtupleInvalid("updateMass_adjoint", 1, 3, 3, 2); __PYX_ERR(0, 3029, __pyx_L3_error)
10455  }
10456  }
10457  if (unlikely(kw_args > 0)) {
10458  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateMass_adjoint") < 0)) __PYX_ERR(0, 3029, __pyx_L3_error)
10459  }
10460  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
10461  goto __pyx_L5_argtuple_error;
10462  } else {
10463  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
10464  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
10465  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
10466  }
10467  __pyx_v_dmt = ((PyArrayObject *)values[0]);
10468  __pyx_v_w_dV = ((PyArrayObject *)values[1]);
10469  __pyx_v_Lstar_w_dV = ((PyArrayObject *)values[2]);
10470  }
10471  goto __pyx_L4_argument_unpacking_done;
10472  __pyx_L5_argtuple_error:;
10473  __Pyx_RaiseArgtupleInvalid("updateMass_adjoint", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3029, __pyx_L3_error)
10474  __pyx_L3_error:;
10475  __Pyx_AddTraceback("cfemIntegrals.updateMass_adjoint", __pyx_clineno, __pyx_lineno, __pyx_filename);
10476  __Pyx_RefNannyFinishContext();
10477  return NULL;
10478  __pyx_L4_argument_unpacking_done:;
10479  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dmt), __pyx_ptype_5numpy_ndarray, 1, "dmt", 0))) __PYX_ERR(0, 3029, __pyx_L1_error)
10480  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w_dV), __pyx_ptype_5numpy_ndarray, 1, "w_dV", 0))) __PYX_ERR(0, 3030, __pyx_L1_error)
10481  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Lstar_w_dV), __pyx_ptype_5numpy_ndarray, 1, "Lstar_w_dV", 0))) __PYX_ERR(0, 3031, __pyx_L1_error)
10482  __pyx_r = __pyx_pf_13cfemIntegrals_72updateMass_adjoint(__pyx_self, __pyx_v_dmt, __pyx_v_w_dV, __pyx_v_Lstar_w_dV);
10483 
10484  /* function exit code */
10485  goto __pyx_L0;
10486  __pyx_L1_error:;
10487  __pyx_r = NULL;
10488  __pyx_L0:;
10489  __Pyx_RefNannyFinishContext();
10490  return __pyx_r;
10491 }
10492 
10493 static PyObject *__pyx_pf_13cfemIntegrals_72updateMass_adjoint(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dmt, PyArrayObject *__pyx_v_w_dV, PyArrayObject *__pyx_v_Lstar_w_dV) {
10494  int __pyx_v_nElements_global;
10495  int __pyx_v_nQuadraturePoints_element;
10496  int __pyx_v_nDOF_test_element;
10497  PyObject *__pyx_r = NULL;
10498  __Pyx_RefNannyDeclarations
10499  __Pyx_RefNannySetupContext("updateMass_adjoint", 0);
10500 
10501  /* "cfemIntegrals.pyx":3032
10502  * np.ndarray w_dV,
10503  * np.ndarray Lstar_w_dV):
10504  * cdef int nElements_global = w_dV.shape[0] # <<<<<<<<<<<<<<
10505  * cdef int nQuadraturePoints_element = w_dV.shape[1]
10506  * cdef int nDOF_test_element = w_dV.shape[2]
10507  */
10508  __pyx_v_nElements_global = (__pyx_v_w_dV->dimensions[0]);
10509 
10510  /* "cfemIntegrals.pyx":3033
10511  * np.ndarray Lstar_w_dV):
10512  * cdef int nElements_global = w_dV.shape[0]
10513  * cdef int nQuadraturePoints_element = w_dV.shape[1] # <<<<<<<<<<<<<<
10514  * cdef int nDOF_test_element = w_dV.shape[2]
10515  * cupdateMass_adjoint(nElements_global,
10516  */
10517  __pyx_v_nQuadraturePoints_element = (__pyx_v_w_dV->dimensions[1]);
10518 
10519  /* "cfemIntegrals.pyx":3034
10520  * cdef int nElements_global = w_dV.shape[0]
10521  * cdef int nQuadraturePoints_element = w_dV.shape[1]
10522  * cdef int nDOF_test_element = w_dV.shape[2] # <<<<<<<<<<<<<<
10523  * cupdateMass_adjoint(nElements_global,
10524  * nQuadraturePoints_element,
10525  */
10526  __pyx_v_nDOF_test_element = (__pyx_v_w_dV->dimensions[2]);
10527 
10528  /* "cfemIntegrals.pyx":3035
10529  * cdef int nQuadraturePoints_element = w_dV.shape[1]
10530  * cdef int nDOF_test_element = w_dV.shape[2]
10531  * cupdateMass_adjoint(nElements_global, # <<<<<<<<<<<<<<
10532  * nQuadraturePoints_element,
10533  * nDOF_test_element,
10534  */
10535  updateMass_adjoint(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_test_element, ((double *)__pyx_v_dmt->data), ((double *)__pyx_v_w_dV->data), ((double *)__pyx_v_Lstar_w_dV->data));
10536 
10537  /* "cfemIntegrals.pyx":3029
10538  * <double*>v.data,
10539  * <double*>dstrong_residual.data)
10540  * def updateMass_adjoint(np.ndarray dmt, # <<<<<<<<<<<<<<
10541  * np.ndarray w_dV,
10542  * np.ndarray Lstar_w_dV):
10543  */
10544 
10545  /* function exit code */
10546  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10547  __Pyx_XGIVEREF(__pyx_r);
10548  __Pyx_RefNannyFinishContext();
10549  return __pyx_r;
10550 }
10551 
10552 /* "cfemIntegrals.pyx":3041
10553  * <double*>w_dV.data,
10554  * <double*>Lstar_w_dV.data)
10555  * def updateAdvection_weak(np.ndarray f, # <<<<<<<<<<<<<<
10556  * np.ndarray grad_w_dV,
10557  * np.ndarray weak_residual):
10558  */
10559 
10560 /* Python wrapper */
10561 static PyObject *__pyx_pw_13cfemIntegrals_75updateAdvection_weak(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
10562 static PyMethodDef __pyx_mdef_13cfemIntegrals_75updateAdvection_weak = {"updateAdvection_weak", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_75updateAdvection_weak, METH_VARARGS|METH_KEYWORDS, 0};
10563 static PyObject *__pyx_pw_13cfemIntegrals_75updateAdvection_weak(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
10564  PyArrayObject *__pyx_v_f = 0;
10565  PyArrayObject *__pyx_v_grad_w_dV = 0;
10566  PyArrayObject *__pyx_v_weak_residual = 0;
10567  int __pyx_lineno = 0;
10568  const char *__pyx_filename = NULL;
10569  int __pyx_clineno = 0;
10570  PyObject *__pyx_r = 0;
10571  __Pyx_RefNannyDeclarations
10572  __Pyx_RefNannySetupContext("updateAdvection_weak (wrapper)", 0);
10573  {
10574  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_f,&__pyx_n_s_grad_w_dV,&__pyx_n_s_weak_residual,0};
10575  PyObject* values[3] = {0,0,0};
10576  if (unlikely(__pyx_kwds)) {
10577  Py_ssize_t kw_args;
10578  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
10579  switch (pos_args) {
10580  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
10581  CYTHON_FALLTHROUGH;
10582  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
10583  CYTHON_FALLTHROUGH;
10584  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
10585  CYTHON_FALLTHROUGH;
10586  case 0: break;
10587  default: goto __pyx_L5_argtuple_error;
10588  }
10589  kw_args = PyDict_Size(__pyx_kwds);
10590  switch (pos_args) {
10591  case 0:
10592  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_f)) != 0)) kw_args--;
10593  else goto __pyx_L5_argtuple_error;
10594  CYTHON_FALLTHROUGH;
10595  case 1:
10596  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_w_dV)) != 0)) kw_args--;
10597  else {
10598  __Pyx_RaiseArgtupleInvalid("updateAdvection_weak", 1, 3, 3, 1); __PYX_ERR(0, 3041, __pyx_L3_error)
10599  }
10600  CYTHON_FALLTHROUGH;
10601  case 2:
10602  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weak_residual)) != 0)) kw_args--;
10603  else {
10604  __Pyx_RaiseArgtupleInvalid("updateAdvection_weak", 1, 3, 3, 2); __PYX_ERR(0, 3041, __pyx_L3_error)
10605  }
10606  }
10607  if (unlikely(kw_args > 0)) {
10608  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateAdvection_weak") < 0)) __PYX_ERR(0, 3041, __pyx_L3_error)
10609  }
10610  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
10611  goto __pyx_L5_argtuple_error;
10612  } else {
10613  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
10614  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
10615  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
10616  }
10617  __pyx_v_f = ((PyArrayObject *)values[0]);
10618  __pyx_v_grad_w_dV = ((PyArrayObject *)values[1]);
10619  __pyx_v_weak_residual = ((PyArrayObject *)values[2]);
10620  }
10621  goto __pyx_L4_argument_unpacking_done;
10622  __pyx_L5_argtuple_error:;
10623  __Pyx_RaiseArgtupleInvalid("updateAdvection_weak", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3041, __pyx_L3_error)
10624  __pyx_L3_error:;
10625  __Pyx_AddTraceback("cfemIntegrals.updateAdvection_weak", __pyx_clineno, __pyx_lineno, __pyx_filename);
10626  __Pyx_RefNannyFinishContext();
10627  return NULL;
10628  __pyx_L4_argument_unpacking_done:;
10629  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_f), __pyx_ptype_5numpy_ndarray, 1, "f", 0))) __PYX_ERR(0, 3041, __pyx_L1_error)
10630  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_w_dV), __pyx_ptype_5numpy_ndarray, 1, "grad_w_dV", 0))) __PYX_ERR(0, 3042, __pyx_L1_error)
10631  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_weak_residual), __pyx_ptype_5numpy_ndarray, 1, "weak_residual", 0))) __PYX_ERR(0, 3043, __pyx_L1_error)
10632  __pyx_r = __pyx_pf_13cfemIntegrals_74updateAdvection_weak(__pyx_self, __pyx_v_f, __pyx_v_grad_w_dV, __pyx_v_weak_residual);
10633 
10634  /* function exit code */
10635  goto __pyx_L0;
10636  __pyx_L1_error:;
10637  __pyx_r = NULL;
10638  __pyx_L0:;
10639  __Pyx_RefNannyFinishContext();
10640  return __pyx_r;
10641 }
10642 
10643 static PyObject *__pyx_pf_13cfemIntegrals_74updateAdvection_weak(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_f, PyArrayObject *__pyx_v_grad_w_dV, PyArrayObject *__pyx_v_weak_residual) {
10644  int __pyx_v_nElements_global;
10645  int __pyx_v_nQuadraturePoints_element;
10646  int __pyx_v_nDOF_test_element;
10647  int __pyx_v_nSpace;
10648  PyObject *__pyx_r = NULL;
10649  __Pyx_RefNannyDeclarations
10650  __Pyx_RefNannySetupContext("updateAdvection_weak", 0);
10651 
10652  /* "cfemIntegrals.pyx":3044
10653  * np.ndarray grad_w_dV,
10654  * np.ndarray weak_residual):
10655  * cdef int nElements_global = grad_w_dV.shape[0] # <<<<<<<<<<<<<<
10656  * cdef int nQuadraturePoints_element = grad_w_dV.shape[1]
10657  * cdef int nDOF_test_element = grad_w_dV.shape[2]
10658  */
10659  __pyx_v_nElements_global = (__pyx_v_grad_w_dV->dimensions[0]);
10660 
10661  /* "cfemIntegrals.pyx":3045
10662  * np.ndarray weak_residual):
10663  * cdef int nElements_global = grad_w_dV.shape[0]
10664  * cdef int nQuadraturePoints_element = grad_w_dV.shape[1] # <<<<<<<<<<<<<<
10665  * cdef int nDOF_test_element = grad_w_dV.shape[2]
10666  * cdef int nSpace = grad_w_dV.shape[3]
10667  */
10668  __pyx_v_nQuadraturePoints_element = (__pyx_v_grad_w_dV->dimensions[1]);
10669 
10670  /* "cfemIntegrals.pyx":3046
10671  * cdef int nElements_global = grad_w_dV.shape[0]
10672  * cdef int nQuadraturePoints_element = grad_w_dV.shape[1]
10673  * cdef int nDOF_test_element = grad_w_dV.shape[2] # <<<<<<<<<<<<<<
10674  * cdef int nSpace = grad_w_dV.shape[3]
10675  * cupdateAdvection_weak(nElements_global,
10676  */
10677  __pyx_v_nDOF_test_element = (__pyx_v_grad_w_dV->dimensions[2]);
10678 
10679  /* "cfemIntegrals.pyx":3047
10680  * cdef int nQuadraturePoints_element = grad_w_dV.shape[1]
10681  * cdef int nDOF_test_element = grad_w_dV.shape[2]
10682  * cdef int nSpace = grad_w_dV.shape[3] # <<<<<<<<<<<<<<
10683  * cupdateAdvection_weak(nElements_global,
10684  * nQuadraturePoints_element,
10685  */
10686  __pyx_v_nSpace = (__pyx_v_grad_w_dV->dimensions[3]);
10687 
10688  /* "cfemIntegrals.pyx":3048
10689  * cdef int nDOF_test_element = grad_w_dV.shape[2]
10690  * cdef int nSpace = grad_w_dV.shape[3]
10691  * cupdateAdvection_weak(nElements_global, # <<<<<<<<<<<<<<
10692  * nQuadraturePoints_element,
10693  * nDOF_test_element,
10694  */
10695  updateAdvection_weak(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_test_element, __pyx_v_nSpace, ((double *)__pyx_v_f->data), ((double *)__pyx_v_grad_w_dV->data), ((double *)__pyx_v_weak_residual->data));
10696 
10697  /* "cfemIntegrals.pyx":3041
10698  * <double*>w_dV.data,
10699  * <double*>Lstar_w_dV.data)
10700  * def updateAdvection_weak(np.ndarray f, # <<<<<<<<<<<<<<
10701  * np.ndarray grad_w_dV,
10702  * np.ndarray weak_residual):
10703  */
10704 
10705  /* function exit code */
10706  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10707  __Pyx_XGIVEREF(__pyx_r);
10708  __Pyx_RefNannyFinishContext();
10709  return __pyx_r;
10710 }
10711 
10712 /* "cfemIntegrals.pyx":3055
10713  * <double*>grad_w_dV.data,
10714  * <double*>weak_residual.data)
10715  * def updateAdvectionJacobian_weak(np.ndarray df, # <<<<<<<<<<<<<<
10716  * np.ndarray v_X_grad_w_dV,
10717  * np.ndarray jacobian_weak_residual):
10718  */
10719 
10720 /* Python wrapper */
10721 static PyObject *__pyx_pw_13cfemIntegrals_77updateAdvectionJacobian_weak(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
10722 static PyMethodDef __pyx_mdef_13cfemIntegrals_77updateAdvectionJacobian_weak = {"updateAdvectionJacobian_weak", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_77updateAdvectionJacobian_weak, METH_VARARGS|METH_KEYWORDS, 0};
10723 static PyObject *__pyx_pw_13cfemIntegrals_77updateAdvectionJacobian_weak(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
10724  PyArrayObject *__pyx_v_df = 0;
10725  PyArrayObject *__pyx_v_v_X_grad_w_dV = 0;
10726  PyArrayObject *__pyx_v_jacobian_weak_residual = 0;
10727  int __pyx_lineno = 0;
10728  const char *__pyx_filename = NULL;
10729  int __pyx_clineno = 0;
10730  PyObject *__pyx_r = 0;
10731  __Pyx_RefNannyDeclarations
10732  __Pyx_RefNannySetupContext("updateAdvectionJacobian_weak (wrapper)", 0);
10733  {
10734  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_df,&__pyx_n_s_v_X_grad_w_dV,&__pyx_n_s_jacobian_weak_residual,0};
10735  PyObject* values[3] = {0,0,0};
10736  if (unlikely(__pyx_kwds)) {
10737  Py_ssize_t kw_args;
10738  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
10739  switch (pos_args) {
10740  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
10741  CYTHON_FALLTHROUGH;
10742  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
10743  CYTHON_FALLTHROUGH;
10744  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
10745  CYTHON_FALLTHROUGH;
10746  case 0: break;
10747  default: goto __pyx_L5_argtuple_error;
10748  }
10749  kw_args = PyDict_Size(__pyx_kwds);
10750  switch (pos_args) {
10751  case 0:
10752  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_df)) != 0)) kw_args--;
10753  else goto __pyx_L5_argtuple_error;
10754  CYTHON_FALLTHROUGH;
10755  case 1:
10756  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v_X_grad_w_dV)) != 0)) kw_args--;
10757  else {
10758  __Pyx_RaiseArgtupleInvalid("updateAdvectionJacobian_weak", 1, 3, 3, 1); __PYX_ERR(0, 3055, __pyx_L3_error)
10759  }
10760  CYTHON_FALLTHROUGH;
10761  case 2:
10762  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jacobian_weak_residual)) != 0)) kw_args--;
10763  else {
10764  __Pyx_RaiseArgtupleInvalid("updateAdvectionJacobian_weak", 1, 3, 3, 2); __PYX_ERR(0, 3055, __pyx_L3_error)
10765  }
10766  }
10767  if (unlikely(kw_args > 0)) {
10768  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateAdvectionJacobian_weak") < 0)) __PYX_ERR(0, 3055, __pyx_L3_error)
10769  }
10770  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
10771  goto __pyx_L5_argtuple_error;
10772  } else {
10773  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
10774  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
10775  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
10776  }
10777  __pyx_v_df = ((PyArrayObject *)values[0]);
10778  __pyx_v_v_X_grad_w_dV = ((PyArrayObject *)values[1]);
10779  __pyx_v_jacobian_weak_residual = ((PyArrayObject *)values[2]);
10780  }
10781  goto __pyx_L4_argument_unpacking_done;
10782  __pyx_L5_argtuple_error:;
10783  __Pyx_RaiseArgtupleInvalid("updateAdvectionJacobian_weak", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3055, __pyx_L3_error)
10784  __pyx_L3_error:;
10785  __Pyx_AddTraceback("cfemIntegrals.updateAdvectionJacobian_weak", __pyx_clineno, __pyx_lineno, __pyx_filename);
10786  __Pyx_RefNannyFinishContext();
10787  return NULL;
10788  __pyx_L4_argument_unpacking_done:;
10789  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_df), __pyx_ptype_5numpy_ndarray, 1, "df", 0))) __PYX_ERR(0, 3055, __pyx_L1_error)
10790  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v_X_grad_w_dV), __pyx_ptype_5numpy_ndarray, 1, "v_X_grad_w_dV", 0))) __PYX_ERR(0, 3056, __pyx_L1_error)
10791  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_jacobian_weak_residual), __pyx_ptype_5numpy_ndarray, 1, "jacobian_weak_residual", 0))) __PYX_ERR(0, 3057, __pyx_L1_error)
10792  __pyx_r = __pyx_pf_13cfemIntegrals_76updateAdvectionJacobian_weak(__pyx_self, __pyx_v_df, __pyx_v_v_X_grad_w_dV, __pyx_v_jacobian_weak_residual);
10793 
10794  /* function exit code */
10795  goto __pyx_L0;
10796  __pyx_L1_error:;
10797  __pyx_r = NULL;
10798  __pyx_L0:;
10799  __Pyx_RefNannyFinishContext();
10800  return __pyx_r;
10801 }
10802 
10803 static PyObject *__pyx_pf_13cfemIntegrals_76updateAdvectionJacobian_weak(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_df, PyArrayObject *__pyx_v_v_X_grad_w_dV, PyArrayObject *__pyx_v_jacobian_weak_residual) {
10804  int __pyx_v_nElements_global;
10805  int __pyx_v_nQuadraturePoints_element;
10806  int __pyx_v_nDOF_trial_element;
10807  int __pyx_v_nDOF_test_element;
10808  int __pyx_v_nSpace;
10809  PyObject *__pyx_r = NULL;
10810  __Pyx_RefNannyDeclarations
10811  __Pyx_RefNannySetupContext("updateAdvectionJacobian_weak", 0);
10812 
10813  /* "cfemIntegrals.pyx":3058
10814  * np.ndarray v_X_grad_w_dV,
10815  * np.ndarray jacobian_weak_residual):
10816  * cdef int nElements_global = v_X_grad_w_dV.shape[0] # <<<<<<<<<<<<<<
10817  * cdef int nQuadraturePoints_element = v_X_grad_w_dV.shape[1]
10818  * cdef int nDOF_trial_element = v_X_grad_w_dV.shape[2]
10819  */
10820  __pyx_v_nElements_global = (__pyx_v_v_X_grad_w_dV->dimensions[0]);
10821 
10822  /* "cfemIntegrals.pyx":3059
10823  * np.ndarray jacobian_weak_residual):
10824  * cdef int nElements_global = v_X_grad_w_dV.shape[0]
10825  * cdef int nQuadraturePoints_element = v_X_grad_w_dV.shape[1] # <<<<<<<<<<<<<<
10826  * cdef int nDOF_trial_element = v_X_grad_w_dV.shape[2]
10827  * cdef int nDOF_test_element = v_X_grad_w_dV.shape[3]
10828  */
10829  __pyx_v_nQuadraturePoints_element = (__pyx_v_v_X_grad_w_dV->dimensions[1]);
10830 
10831  /* "cfemIntegrals.pyx":3060
10832  * cdef int nElements_global = v_X_grad_w_dV.shape[0]
10833  * cdef int nQuadraturePoints_element = v_X_grad_w_dV.shape[1]
10834  * cdef int nDOF_trial_element = v_X_grad_w_dV.shape[2] # <<<<<<<<<<<<<<
10835  * cdef int nDOF_test_element = v_X_grad_w_dV.shape[3]
10836  * cdef int nSpace = v_X_grad_w_dV.shape[4]
10837  */
10838  __pyx_v_nDOF_trial_element = (__pyx_v_v_X_grad_w_dV->dimensions[2]);
10839 
10840  /* "cfemIntegrals.pyx":3061
10841  * cdef int nQuadraturePoints_element = v_X_grad_w_dV.shape[1]
10842  * cdef int nDOF_trial_element = v_X_grad_w_dV.shape[2]
10843  * cdef int nDOF_test_element = v_X_grad_w_dV.shape[3] # <<<<<<<<<<<<<<
10844  * cdef int nSpace = v_X_grad_w_dV.shape[4]
10845  * cupdateAdvectionJacobian_weak(nElements_global,
10846  */
10847  __pyx_v_nDOF_test_element = (__pyx_v_v_X_grad_w_dV->dimensions[3]);
10848 
10849  /* "cfemIntegrals.pyx":3062
10850  * cdef int nDOF_trial_element = v_X_grad_w_dV.shape[2]
10851  * cdef int nDOF_test_element = v_X_grad_w_dV.shape[3]
10852  * cdef int nSpace = v_X_grad_w_dV.shape[4] # <<<<<<<<<<<<<<
10853  * cupdateAdvectionJacobian_weak(nElements_global,
10854  * nQuadraturePoints_element,
10855  */
10856  __pyx_v_nSpace = (__pyx_v_v_X_grad_w_dV->dimensions[4]);
10857 
10858  /* "cfemIntegrals.pyx":3063
10859  * cdef int nDOF_test_element = v_X_grad_w_dV.shape[3]
10860  * cdef int nSpace = v_X_grad_w_dV.shape[4]
10861  * cupdateAdvectionJacobian_weak(nElements_global, # <<<<<<<<<<<<<<
10862  * nQuadraturePoints_element,
10863  * nDOF_trial_element,
10864  */
10865  updateAdvectionJacobian_weak(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_trial_element, __pyx_v_nDOF_test_element, __pyx_v_nSpace, ((double *)__pyx_v_df->data), ((double *)__pyx_v_v_X_grad_w_dV->data), ((double *)__pyx_v_jacobian_weak_residual->data));
10866 
10867  /* "cfemIntegrals.pyx":3055
10868  * <double*>grad_w_dV.data,
10869  * <double*>weak_residual.data)
10870  * def updateAdvectionJacobian_weak(np.ndarray df, # <<<<<<<<<<<<<<
10871  * np.ndarray v_X_grad_w_dV,
10872  * np.ndarray jacobian_weak_residual):
10873  */
10874 
10875  /* function exit code */
10876  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10877  __Pyx_XGIVEREF(__pyx_r);
10878  __Pyx_RefNannyFinishContext();
10879  return __pyx_r;
10880 }
10881 
10882 /* "cfemIntegrals.pyx":3071
10883  * <double*>v_X_grad_w_dV.data,
10884  * <double*>jacobian_weak_residual.data)
10885  * def updateAdvectionJacobian_weak_lowmem(np.ndarray df, # <<<<<<<<<<<<<<
10886  * np.ndarray v,
10887  * np.ndarray grad_w_dV,
10888  */
10889 
10890 /* Python wrapper */
10891 static PyObject *__pyx_pw_13cfemIntegrals_79updateAdvectionJacobian_weak_lowmem(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
10892 static PyMethodDef __pyx_mdef_13cfemIntegrals_79updateAdvectionJacobian_weak_lowmem = {"updateAdvectionJacobian_weak_lowmem", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_79updateAdvectionJacobian_weak_lowmem, METH_VARARGS|METH_KEYWORDS, 0};
10893 static PyObject *__pyx_pw_13cfemIntegrals_79updateAdvectionJacobian_weak_lowmem(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
10894  PyArrayObject *__pyx_v_df = 0;
10895  PyArrayObject *__pyx_v_v = 0;
10896  PyArrayObject *__pyx_v_grad_w_dV = 0;
10897  PyArrayObject *__pyx_v_jacobian_weak_residual = 0;
10898  int __pyx_lineno = 0;
10899  const char *__pyx_filename = NULL;
10900  int __pyx_clineno = 0;
10901  PyObject *__pyx_r = 0;
10902  __Pyx_RefNannyDeclarations
10903  __Pyx_RefNannySetupContext("updateAdvectionJacobian_weak_lowmem (wrapper)", 0);
10904  {
10905  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_df,&__pyx_n_s_v,&__pyx_n_s_grad_w_dV,&__pyx_n_s_jacobian_weak_residual,0};
10906  PyObject* values[4] = {0,0,0,0};
10907  if (unlikely(__pyx_kwds)) {
10908  Py_ssize_t kw_args;
10909  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
10910  switch (pos_args) {
10911  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
10912  CYTHON_FALLTHROUGH;
10913  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
10914  CYTHON_FALLTHROUGH;
10915  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
10916  CYTHON_FALLTHROUGH;
10917  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
10918  CYTHON_FALLTHROUGH;
10919  case 0: break;
10920  default: goto __pyx_L5_argtuple_error;
10921  }
10922  kw_args = PyDict_Size(__pyx_kwds);
10923  switch (pos_args) {
10924  case 0:
10925  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_df)) != 0)) kw_args--;
10926  else goto __pyx_L5_argtuple_error;
10927  CYTHON_FALLTHROUGH;
10928  case 1:
10929  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
10930  else {
10931  __Pyx_RaiseArgtupleInvalid("updateAdvectionJacobian_weak_lowmem", 1, 4, 4, 1); __PYX_ERR(0, 3071, __pyx_L3_error)
10932  }
10933  CYTHON_FALLTHROUGH;
10934  case 2:
10935  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_w_dV)) != 0)) kw_args--;
10936  else {
10937  __Pyx_RaiseArgtupleInvalid("updateAdvectionJacobian_weak_lowmem", 1, 4, 4, 2); __PYX_ERR(0, 3071, __pyx_L3_error)
10938  }
10939  CYTHON_FALLTHROUGH;
10940  case 3:
10941  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jacobian_weak_residual)) != 0)) kw_args--;
10942  else {
10943  __Pyx_RaiseArgtupleInvalid("updateAdvectionJacobian_weak_lowmem", 1, 4, 4, 3); __PYX_ERR(0, 3071, __pyx_L3_error)
10944  }
10945  }
10946  if (unlikely(kw_args > 0)) {
10947  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateAdvectionJacobian_weak_lowmem") < 0)) __PYX_ERR(0, 3071, __pyx_L3_error)
10948  }
10949  } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
10950  goto __pyx_L5_argtuple_error;
10951  } else {
10952  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
10953  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
10954  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
10955  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
10956  }
10957  __pyx_v_df = ((PyArrayObject *)values[0]);
10958  __pyx_v_v = ((PyArrayObject *)values[1]);
10959  __pyx_v_grad_w_dV = ((PyArrayObject *)values[2]);
10960  __pyx_v_jacobian_weak_residual = ((PyArrayObject *)values[3]);
10961  }
10962  goto __pyx_L4_argument_unpacking_done;
10963  __pyx_L5_argtuple_error:;
10964  __Pyx_RaiseArgtupleInvalid("updateAdvectionJacobian_weak_lowmem", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3071, __pyx_L3_error)
10965  __pyx_L3_error:;
10966  __Pyx_AddTraceback("cfemIntegrals.updateAdvectionJacobian_weak_lowmem", __pyx_clineno, __pyx_lineno, __pyx_filename);
10967  __Pyx_RefNannyFinishContext();
10968  return NULL;
10969  __pyx_L4_argument_unpacking_done:;
10970  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_df), __pyx_ptype_5numpy_ndarray, 1, "df", 0))) __PYX_ERR(0, 3071, __pyx_L1_error)
10971  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), __pyx_ptype_5numpy_ndarray, 1, "v", 0))) __PYX_ERR(0, 3072, __pyx_L1_error)
10972  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_w_dV), __pyx_ptype_5numpy_ndarray, 1, "grad_w_dV", 0))) __PYX_ERR(0, 3073, __pyx_L1_error)
10973  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_jacobian_weak_residual), __pyx_ptype_5numpy_ndarray, 1, "jacobian_weak_residual", 0))) __PYX_ERR(0, 3074, __pyx_L1_error)
10974  __pyx_r = __pyx_pf_13cfemIntegrals_78updateAdvectionJacobian_weak_lowmem(__pyx_self, __pyx_v_df, __pyx_v_v, __pyx_v_grad_w_dV, __pyx_v_jacobian_weak_residual);
10975 
10976  /* function exit code */
10977  goto __pyx_L0;
10978  __pyx_L1_error:;
10979  __pyx_r = NULL;
10980  __pyx_L0:;
10981  __Pyx_RefNannyFinishContext();
10982  return __pyx_r;
10983 }
10984 
10985 static PyObject *__pyx_pf_13cfemIntegrals_78updateAdvectionJacobian_weak_lowmem(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_df, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_grad_w_dV, PyArrayObject *__pyx_v_jacobian_weak_residual) {
10986  int __pyx_v_nElements_global;
10987  int __pyx_v_nQuadraturePoints_element;
10988  int __pyx_v_nDOF_trial_element;
10989  int __pyx_v_nDOF_test_element;
10990  int __pyx_v_nSpace;
10991  PyObject *__pyx_r = NULL;
10992  __Pyx_RefNannyDeclarations
10993  __Pyx_RefNannySetupContext("updateAdvectionJacobian_weak_lowmem", 0);
10994 
10995  /* "cfemIntegrals.pyx":3075
10996  * np.ndarray grad_w_dV,
10997  * np.ndarray jacobian_weak_residual):
10998  * cdef int nElements_global = v.shape[0] # <<<<<<<<<<<<<<
10999  * cdef int nQuadraturePoints_element = v.shape[1]
11000  * cdef int nDOF_trial_element = v.shape[2]
11001  */
11002  __pyx_v_nElements_global = (__pyx_v_v->dimensions[0]);
11003 
11004  /* "cfemIntegrals.pyx":3076
11005  * np.ndarray jacobian_weak_residual):
11006  * cdef int nElements_global = v.shape[0]
11007  * cdef int nQuadraturePoints_element = v.shape[1] # <<<<<<<<<<<<<<
11008  * cdef int nDOF_trial_element = v.shape[2]
11009  * cdef int nDOF_test_element = grad_w_dV.shape[2]
11010  */
11011  __pyx_v_nQuadraturePoints_element = (__pyx_v_v->dimensions[1]);
11012 
11013  /* "cfemIntegrals.pyx":3077
11014  * cdef int nElements_global = v.shape[0]
11015  * cdef int nQuadraturePoints_element = v.shape[1]
11016  * cdef int nDOF_trial_element = v.shape[2] # <<<<<<<<<<<<<<
11017  * cdef int nDOF_test_element = grad_w_dV.shape[2]
11018  * cdef int nSpace = grad_w_dV.shape[3]
11019  */
11020  __pyx_v_nDOF_trial_element = (__pyx_v_v->dimensions[2]);
11021 
11022  /* "cfemIntegrals.pyx":3078
11023  * cdef int nQuadraturePoints_element = v.shape[1]
11024  * cdef int nDOF_trial_element = v.shape[2]
11025  * cdef int nDOF_test_element = grad_w_dV.shape[2] # <<<<<<<<<<<<<<
11026  * cdef int nSpace = grad_w_dV.shape[3]
11027  * cupdateAdvectionJacobian_weak_lowmem(nElements_global,
11028  */
11029  __pyx_v_nDOF_test_element = (__pyx_v_grad_w_dV->dimensions[2]);
11030 
11031  /* "cfemIntegrals.pyx":3079
11032  * cdef int nDOF_trial_element = v.shape[2]
11033  * cdef int nDOF_test_element = grad_w_dV.shape[2]
11034  * cdef int nSpace = grad_w_dV.shape[3] # <<<<<<<<<<<<<<
11035  * cupdateAdvectionJacobian_weak_lowmem(nElements_global,
11036  * nQuadraturePoints_element,
11037  */
11038  __pyx_v_nSpace = (__pyx_v_grad_w_dV->dimensions[3]);
11039 
11040  /* "cfemIntegrals.pyx":3080
11041  * cdef int nDOF_test_element = grad_w_dV.shape[2]
11042  * cdef int nSpace = grad_w_dV.shape[3]
11043  * cupdateAdvectionJacobian_weak_lowmem(nElements_global, # <<<<<<<<<<<<<<
11044  * nQuadraturePoints_element,
11045  * nDOF_trial_element,
11046  */
11047  updateAdvectionJacobian_weak_lowmem(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_trial_element, __pyx_v_nDOF_test_element, __pyx_v_nSpace, ((double *)__pyx_v_df->data), ((double *)__pyx_v_v->data), ((double *)__pyx_v_grad_w_dV->data), ((double *)__pyx_v_jacobian_weak_residual->data));
11048 
11049  /* "cfemIntegrals.pyx":3071
11050  * <double*>v_X_grad_w_dV.data,
11051  * <double*>jacobian_weak_residual.data)
11052  * def updateAdvectionJacobian_weak_lowmem(np.ndarray df, # <<<<<<<<<<<<<<
11053  * np.ndarray v,
11054  * np.ndarray grad_w_dV,
11055  */
11056 
11057  /* function exit code */
11058  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11059  __Pyx_XGIVEREF(__pyx_r);
11060  __Pyx_RefNannyFinishContext();
11061  return __pyx_r;
11062 }
11063 
11064 /* "cfemIntegrals.pyx":3089
11065  * <double*> grad_w_dV.data,
11066  * <double*> jacobian_weak_residual.data)
11067  * def updateAdvection_strong(np.ndarray df, # <<<<<<<<<<<<<<
11068  * np.ndarray grad_u,
11069  * np.ndarray strong_residual):
11070  */
11071 
11072 /* Python wrapper */
11073 static PyObject *__pyx_pw_13cfemIntegrals_81updateAdvection_strong(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
11074 static PyMethodDef __pyx_mdef_13cfemIntegrals_81updateAdvection_strong = {"updateAdvection_strong", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_81updateAdvection_strong, METH_VARARGS|METH_KEYWORDS, 0};
11075 static PyObject *__pyx_pw_13cfemIntegrals_81updateAdvection_strong(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
11076  PyArrayObject *__pyx_v_df = 0;
11077  PyArrayObject *__pyx_v_grad_u = 0;
11078  PyArrayObject *__pyx_v_strong_residual = 0;
11079  int __pyx_lineno = 0;
11080  const char *__pyx_filename = NULL;
11081  int __pyx_clineno = 0;
11082  PyObject *__pyx_r = 0;
11083  __Pyx_RefNannyDeclarations
11084  __Pyx_RefNannySetupContext("updateAdvection_strong (wrapper)", 0);
11085  {
11086  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_df,&__pyx_n_s_grad_u,&__pyx_n_s_strong_residual,0};
11087  PyObject* values[3] = {0,0,0};
11088  if (unlikely(__pyx_kwds)) {
11089  Py_ssize_t kw_args;
11090  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
11091  switch (pos_args) {
11092  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
11093  CYTHON_FALLTHROUGH;
11094  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
11095  CYTHON_FALLTHROUGH;
11096  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
11097  CYTHON_FALLTHROUGH;
11098  case 0: break;
11099  default: goto __pyx_L5_argtuple_error;
11100  }
11101  kw_args = PyDict_Size(__pyx_kwds);
11102  switch (pos_args) {
11103  case 0:
11104  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_df)) != 0)) kw_args--;
11105  else goto __pyx_L5_argtuple_error;
11106  CYTHON_FALLTHROUGH;
11107  case 1:
11108  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_u)) != 0)) kw_args--;
11109  else {
11110  __Pyx_RaiseArgtupleInvalid("updateAdvection_strong", 1, 3, 3, 1); __PYX_ERR(0, 3089, __pyx_L3_error)
11111  }
11112  CYTHON_FALLTHROUGH;
11113  case 2:
11114  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_strong_residual)) != 0)) kw_args--;
11115  else {
11116  __Pyx_RaiseArgtupleInvalid("updateAdvection_strong", 1, 3, 3, 2); __PYX_ERR(0, 3089, __pyx_L3_error)
11117  }
11118  }
11119  if (unlikely(kw_args > 0)) {
11120  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateAdvection_strong") < 0)) __PYX_ERR(0, 3089, __pyx_L3_error)
11121  }
11122  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
11123  goto __pyx_L5_argtuple_error;
11124  } else {
11125  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
11126  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
11127  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
11128  }
11129  __pyx_v_df = ((PyArrayObject *)values[0]);
11130  __pyx_v_grad_u = ((PyArrayObject *)values[1]);
11131  __pyx_v_strong_residual = ((PyArrayObject *)values[2]);
11132  }
11133  goto __pyx_L4_argument_unpacking_done;
11134  __pyx_L5_argtuple_error:;
11135  __Pyx_RaiseArgtupleInvalid("updateAdvection_strong", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3089, __pyx_L3_error)
11136  __pyx_L3_error:;
11137  __Pyx_AddTraceback("cfemIntegrals.updateAdvection_strong", __pyx_clineno, __pyx_lineno, __pyx_filename);
11138  __Pyx_RefNannyFinishContext();
11139  return NULL;
11140  __pyx_L4_argument_unpacking_done:;
11141  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_df), __pyx_ptype_5numpy_ndarray, 1, "df", 0))) __PYX_ERR(0, 3089, __pyx_L1_error)
11142  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_u), __pyx_ptype_5numpy_ndarray, 1, "grad_u", 0))) __PYX_ERR(0, 3090, __pyx_L1_error)
11143  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_strong_residual), __pyx_ptype_5numpy_ndarray, 1, "strong_residual", 0))) __PYX_ERR(0, 3091, __pyx_L1_error)
11144  __pyx_r = __pyx_pf_13cfemIntegrals_80updateAdvection_strong(__pyx_self, __pyx_v_df, __pyx_v_grad_u, __pyx_v_strong_residual);
11145 
11146  /* function exit code */
11147  goto __pyx_L0;
11148  __pyx_L1_error:;
11149  __pyx_r = NULL;
11150  __pyx_L0:;
11151  __Pyx_RefNannyFinishContext();
11152  return __pyx_r;
11153 }
11154 
11155 static PyObject *__pyx_pf_13cfemIntegrals_80updateAdvection_strong(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_df, PyArrayObject *__pyx_v_grad_u, PyArrayObject *__pyx_v_strong_residual) {
11156  int __pyx_v_nElements_global;
11157  int __pyx_v_nQuadraturePoints_element;
11158  int __pyx_v_nSpace;
11159  PyObject *__pyx_r = NULL;
11160  __Pyx_RefNannyDeclarations
11161  __Pyx_RefNannySetupContext("updateAdvection_strong", 0);
11162 
11163  /* "cfemIntegrals.pyx":3092
11164  * np.ndarray grad_u,
11165  * np.ndarray strong_residual):
11166  * cdef int nElements_global = grad_u.shape[0] # <<<<<<<<<<<<<<
11167  * cdef int nQuadraturePoints_element = grad_u.shape[1]
11168  * cdef int nSpace = grad_u.shape[2]
11169  */
11170  __pyx_v_nElements_global = (__pyx_v_grad_u->dimensions[0]);
11171 
11172  /* "cfemIntegrals.pyx":3093
11173  * np.ndarray strong_residual):
11174  * cdef int nElements_global = grad_u.shape[0]
11175  * cdef int nQuadraturePoints_element = grad_u.shape[1] # <<<<<<<<<<<<<<
11176  * cdef int nSpace = grad_u.shape[2]
11177  * cupdateAdvection_strong(nElements_global,
11178  */
11179  __pyx_v_nQuadraturePoints_element = (__pyx_v_grad_u->dimensions[1]);
11180 
11181  /* "cfemIntegrals.pyx":3094
11182  * cdef int nElements_global = grad_u.shape[0]
11183  * cdef int nQuadraturePoints_element = grad_u.shape[1]
11184  * cdef int nSpace = grad_u.shape[2] # <<<<<<<<<<<<<<
11185  * cupdateAdvection_strong(nElements_global,
11186  * nQuadraturePoints_element,
11187  */
11188  __pyx_v_nSpace = (__pyx_v_grad_u->dimensions[2]);
11189 
11190  /* "cfemIntegrals.pyx":3095
11191  * cdef int nQuadraturePoints_element = grad_u.shape[1]
11192  * cdef int nSpace = grad_u.shape[2]
11193  * cupdateAdvection_strong(nElements_global, # <<<<<<<<<<<<<<
11194  * nQuadraturePoints_element,
11195  * nSpace,
11196  */
11197  updateAdvection_strong(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nSpace, ((double *)__pyx_v_df->data), ((double *)__pyx_v_grad_u->data), ((double *)__pyx_v_strong_residual->data));
11198 
11199  /* "cfemIntegrals.pyx":3089
11200  * <double*> grad_w_dV.data,
11201  * <double*> jacobian_weak_residual.data)
11202  * def updateAdvection_strong(np.ndarray df, # <<<<<<<<<<<<<<
11203  * np.ndarray grad_u,
11204  * np.ndarray strong_residual):
11205  */
11206 
11207  /* function exit code */
11208  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11209  __Pyx_XGIVEREF(__pyx_r);
11210  __Pyx_RefNannyFinishContext();
11211  return __pyx_r;
11212 }
11213 
11214 /* "cfemIntegrals.pyx":3101
11215  * <double*>grad_u.data,
11216  * <double*>strong_residual.data)
11217  * def updateAdvectionJacobian_strong(np.ndarray df, # <<<<<<<<<<<<<<
11218  * np.ndarray grad_v,
11219  * np.ndarray dstrong_residual):
11220  */
11221 
11222 /* Python wrapper */
11223 static PyObject *__pyx_pw_13cfemIntegrals_83updateAdvectionJacobian_strong(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
11224 static PyMethodDef __pyx_mdef_13cfemIntegrals_83updateAdvectionJacobian_strong = {"updateAdvectionJacobian_strong", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_83updateAdvectionJacobian_strong, METH_VARARGS|METH_KEYWORDS, 0};
11225 static PyObject *__pyx_pw_13cfemIntegrals_83updateAdvectionJacobian_strong(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
11226  PyArrayObject *__pyx_v_df = 0;
11227  PyArrayObject *__pyx_v_grad_v = 0;
11228  PyArrayObject *__pyx_v_dstrong_residual = 0;
11229  int __pyx_lineno = 0;
11230  const char *__pyx_filename = NULL;
11231  int __pyx_clineno = 0;
11232  PyObject *__pyx_r = 0;
11233  __Pyx_RefNannyDeclarations
11234  __Pyx_RefNannySetupContext("updateAdvectionJacobian_strong (wrapper)", 0);
11235  {
11236  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_df,&__pyx_n_s_grad_v,&__pyx_n_s_dstrong_residual,0};
11237  PyObject* values[3] = {0,0,0};
11238  if (unlikely(__pyx_kwds)) {
11239  Py_ssize_t kw_args;
11240  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
11241  switch (pos_args) {
11242  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
11243  CYTHON_FALLTHROUGH;
11244  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
11245  CYTHON_FALLTHROUGH;
11246  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
11247  CYTHON_FALLTHROUGH;
11248  case 0: break;
11249  default: goto __pyx_L5_argtuple_error;
11250  }
11251  kw_args = PyDict_Size(__pyx_kwds);
11252  switch (pos_args) {
11253  case 0:
11254  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_df)) != 0)) kw_args--;
11255  else goto __pyx_L5_argtuple_error;
11256  CYTHON_FALLTHROUGH;
11257  case 1:
11258  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_v)) != 0)) kw_args--;
11259  else {
11260  __Pyx_RaiseArgtupleInvalid("updateAdvectionJacobian_strong", 1, 3, 3, 1); __PYX_ERR(0, 3101, __pyx_L3_error)
11261  }
11262  CYTHON_FALLTHROUGH;
11263  case 2:
11264  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dstrong_residual)) != 0)) kw_args--;
11265  else {
11266  __Pyx_RaiseArgtupleInvalid("updateAdvectionJacobian_strong", 1, 3, 3, 2); __PYX_ERR(0, 3101, __pyx_L3_error)
11267  }
11268  }
11269  if (unlikely(kw_args > 0)) {
11270  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateAdvectionJacobian_strong") < 0)) __PYX_ERR(0, 3101, __pyx_L3_error)
11271  }
11272  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
11273  goto __pyx_L5_argtuple_error;
11274  } else {
11275  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
11276  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
11277  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
11278  }
11279  __pyx_v_df = ((PyArrayObject *)values[0]);
11280  __pyx_v_grad_v = ((PyArrayObject *)values[1]);
11281  __pyx_v_dstrong_residual = ((PyArrayObject *)values[2]);
11282  }
11283  goto __pyx_L4_argument_unpacking_done;
11284  __pyx_L5_argtuple_error:;
11285  __Pyx_RaiseArgtupleInvalid("updateAdvectionJacobian_strong", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3101, __pyx_L3_error)
11286  __pyx_L3_error:;
11287  __Pyx_AddTraceback("cfemIntegrals.updateAdvectionJacobian_strong", __pyx_clineno, __pyx_lineno, __pyx_filename);
11288  __Pyx_RefNannyFinishContext();
11289  return NULL;
11290  __pyx_L4_argument_unpacking_done:;
11291  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_df), __pyx_ptype_5numpy_ndarray, 1, "df", 0))) __PYX_ERR(0, 3101, __pyx_L1_error)
11292  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_v), __pyx_ptype_5numpy_ndarray, 1, "grad_v", 0))) __PYX_ERR(0, 3102, __pyx_L1_error)
11293  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dstrong_residual), __pyx_ptype_5numpy_ndarray, 1, "dstrong_residual", 0))) __PYX_ERR(0, 3103, __pyx_L1_error)
11294  __pyx_r = __pyx_pf_13cfemIntegrals_82updateAdvectionJacobian_strong(__pyx_self, __pyx_v_df, __pyx_v_grad_v, __pyx_v_dstrong_residual);
11295 
11296  /* function exit code */
11297  goto __pyx_L0;
11298  __pyx_L1_error:;
11299  __pyx_r = NULL;
11300  __pyx_L0:;
11301  __Pyx_RefNannyFinishContext();
11302  return __pyx_r;
11303 }
11304 
11305 static PyObject *__pyx_pf_13cfemIntegrals_82updateAdvectionJacobian_strong(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_df, PyArrayObject *__pyx_v_grad_v, PyArrayObject *__pyx_v_dstrong_residual) {
11306  int __pyx_v_nElements_global;
11307  int __pyx_v_nQuadraturePoints_element;
11308  int __pyx_v_nDOF_trial_element;
11309  int __pyx_v_nSpace;
11310  PyObject *__pyx_r = NULL;
11311  __Pyx_RefNannyDeclarations
11312  __Pyx_RefNannySetupContext("updateAdvectionJacobian_strong", 0);
11313 
11314  /* "cfemIntegrals.pyx":3104
11315  * np.ndarray grad_v,
11316  * np.ndarray dstrong_residual):
11317  * cdef int nElements_global = grad_v.shape[0] # <<<<<<<<<<<<<<
11318  * cdef int nQuadraturePoints_element = grad_v.shape[1]
11319  * cdef int nDOF_trial_element = grad_v.shape[2]
11320  */
11321  __pyx_v_nElements_global = (__pyx_v_grad_v->dimensions[0]);
11322 
11323  /* "cfemIntegrals.pyx":3105
11324  * np.ndarray dstrong_residual):
11325  * cdef int nElements_global = grad_v.shape[0]
11326  * cdef int nQuadraturePoints_element = grad_v.shape[1] # <<<<<<<<<<<<<<
11327  * cdef int nDOF_trial_element = grad_v.shape[2]
11328  * cdef int nSpace = grad_v.shape[3]
11329  */
11330  __pyx_v_nQuadraturePoints_element = (__pyx_v_grad_v->dimensions[1]);
11331 
11332  /* "cfemIntegrals.pyx":3106
11333  * cdef int nElements_global = grad_v.shape[0]
11334  * cdef int nQuadraturePoints_element = grad_v.shape[1]
11335  * cdef int nDOF_trial_element = grad_v.shape[2] # <<<<<<<<<<<<<<
11336  * cdef int nSpace = grad_v.shape[3]
11337  * cupdateAdvectionJacobian_strong(nElements_global,
11338  */
11339  __pyx_v_nDOF_trial_element = (__pyx_v_grad_v->dimensions[2]);
11340 
11341  /* "cfemIntegrals.pyx":3107
11342  * cdef int nQuadraturePoints_element = grad_v.shape[1]
11343  * cdef int nDOF_trial_element = grad_v.shape[2]
11344  * cdef int nSpace = grad_v.shape[3] # <<<<<<<<<<<<<<
11345  * cupdateAdvectionJacobian_strong(nElements_global,
11346  * nQuadraturePoints_element,
11347  */
11348  __pyx_v_nSpace = (__pyx_v_grad_v->dimensions[3]);
11349 
11350  /* "cfemIntegrals.pyx":3108
11351  * cdef int nDOF_trial_element = grad_v.shape[2]
11352  * cdef int nSpace = grad_v.shape[3]
11353  * cupdateAdvectionJacobian_strong(nElements_global, # <<<<<<<<<<<<<<
11354  * nQuadraturePoints_element,
11355  * nDOF_trial_element,
11356  */
11357  updateAdvectionJacobian_strong(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_trial_element, __pyx_v_nSpace, ((double *)__pyx_v_df->data), ((double *)__pyx_v_grad_v->data), ((double *)__pyx_v_dstrong_residual->data));
11358 
11359  /* "cfemIntegrals.pyx":3101
11360  * <double*>grad_u.data,
11361  * <double*>strong_residual.data)
11362  * def updateAdvectionJacobian_strong(np.ndarray df, # <<<<<<<<<<<<<<
11363  * np.ndarray grad_v,
11364  * np.ndarray dstrong_residual):
11365  */
11366 
11367  /* function exit code */
11368  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11369  __Pyx_XGIVEREF(__pyx_r);
11370  __Pyx_RefNannyFinishContext();
11371  return __pyx_r;
11372 }
11373 
11374 /* "cfemIntegrals.pyx":3115
11375  * <double*>grad_v.data,
11376  * <double*>dstrong_residual.data)
11377  * def updateAdvection_adjoint(np.ndarray df, # <<<<<<<<<<<<<<
11378  * np.ndarray grad_w_dV,
11379  * np.ndarray Lstar_w_dV):
11380  */
11381 
11382 /* Python wrapper */
11383 static PyObject *__pyx_pw_13cfemIntegrals_85updateAdvection_adjoint(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
11384 static PyMethodDef __pyx_mdef_13cfemIntegrals_85updateAdvection_adjoint = {"updateAdvection_adjoint", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_85updateAdvection_adjoint, METH_VARARGS|METH_KEYWORDS, 0};
11385 static PyObject *__pyx_pw_13cfemIntegrals_85updateAdvection_adjoint(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
11386  PyArrayObject *__pyx_v_df = 0;
11387  PyArrayObject *__pyx_v_grad_w_dV = 0;
11388  PyArrayObject *__pyx_v_Lstar_w_dV = 0;
11389  int __pyx_lineno = 0;
11390  const char *__pyx_filename = NULL;
11391  int __pyx_clineno = 0;
11392  PyObject *__pyx_r = 0;
11393  __Pyx_RefNannyDeclarations
11394  __Pyx_RefNannySetupContext("updateAdvection_adjoint (wrapper)", 0);
11395  {
11396  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_df,&__pyx_n_s_grad_w_dV,&__pyx_n_s_Lstar_w_dV,0};
11397  PyObject* values[3] = {0,0,0};
11398  if (unlikely(__pyx_kwds)) {
11399  Py_ssize_t kw_args;
11400  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
11401  switch (pos_args) {
11402  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
11403  CYTHON_FALLTHROUGH;
11404  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
11405  CYTHON_FALLTHROUGH;
11406  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
11407  CYTHON_FALLTHROUGH;
11408  case 0: break;
11409  default: goto __pyx_L5_argtuple_error;
11410  }
11411  kw_args = PyDict_Size(__pyx_kwds);
11412  switch (pos_args) {
11413  case 0:
11414  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_df)) != 0)) kw_args--;
11415  else goto __pyx_L5_argtuple_error;
11416  CYTHON_FALLTHROUGH;
11417  case 1:
11418  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_w_dV)) != 0)) kw_args--;
11419  else {
11420  __Pyx_RaiseArgtupleInvalid("updateAdvection_adjoint", 1, 3, 3, 1); __PYX_ERR(0, 3115, __pyx_L3_error)
11421  }
11422  CYTHON_FALLTHROUGH;
11423  case 2:
11424  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Lstar_w_dV)) != 0)) kw_args--;
11425  else {
11426  __Pyx_RaiseArgtupleInvalid("updateAdvection_adjoint", 1, 3, 3, 2); __PYX_ERR(0, 3115, __pyx_L3_error)
11427  }
11428  }
11429  if (unlikely(kw_args > 0)) {
11430  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateAdvection_adjoint") < 0)) __PYX_ERR(0, 3115, __pyx_L3_error)
11431  }
11432  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
11433  goto __pyx_L5_argtuple_error;
11434  } else {
11435  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
11436  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
11437  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
11438  }
11439  __pyx_v_df = ((PyArrayObject *)values[0]);
11440  __pyx_v_grad_w_dV = ((PyArrayObject *)values[1]);
11441  __pyx_v_Lstar_w_dV = ((PyArrayObject *)values[2]);
11442  }
11443  goto __pyx_L4_argument_unpacking_done;
11444  __pyx_L5_argtuple_error:;
11445  __Pyx_RaiseArgtupleInvalid("updateAdvection_adjoint", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3115, __pyx_L3_error)
11446  __pyx_L3_error:;
11447  __Pyx_AddTraceback("cfemIntegrals.updateAdvection_adjoint", __pyx_clineno, __pyx_lineno, __pyx_filename);
11448  __Pyx_RefNannyFinishContext();
11449  return NULL;
11450  __pyx_L4_argument_unpacking_done:;
11451  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_df), __pyx_ptype_5numpy_ndarray, 1, "df", 0))) __PYX_ERR(0, 3115, __pyx_L1_error)
11452  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_w_dV), __pyx_ptype_5numpy_ndarray, 1, "grad_w_dV", 0))) __PYX_ERR(0, 3116, __pyx_L1_error)
11453  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Lstar_w_dV), __pyx_ptype_5numpy_ndarray, 1, "Lstar_w_dV", 0))) __PYX_ERR(0, 3117, __pyx_L1_error)
11454  __pyx_r = __pyx_pf_13cfemIntegrals_84updateAdvection_adjoint(__pyx_self, __pyx_v_df, __pyx_v_grad_w_dV, __pyx_v_Lstar_w_dV);
11455 
11456  /* function exit code */
11457  goto __pyx_L0;
11458  __pyx_L1_error:;
11459  __pyx_r = NULL;
11460  __pyx_L0:;
11461  __Pyx_RefNannyFinishContext();
11462  return __pyx_r;
11463 }
11464 
11465 static PyObject *__pyx_pf_13cfemIntegrals_84updateAdvection_adjoint(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_df, PyArrayObject *__pyx_v_grad_w_dV, PyArrayObject *__pyx_v_Lstar_w_dV) {
11466  int __pyx_v_nElements_global;
11467  int __pyx_v_nQuadraturePoints_element;
11468  int __pyx_v_nDOF_test_element;
11469  int __pyx_v_nSpace;
11470  PyObject *__pyx_r = NULL;
11471  __Pyx_RefNannyDeclarations
11472  __Pyx_RefNannySetupContext("updateAdvection_adjoint", 0);
11473 
11474  /* "cfemIntegrals.pyx":3118
11475  * np.ndarray grad_w_dV,
11476  * np.ndarray Lstar_w_dV):
11477  * cdef int nElements_global = grad_w_dV.shape[0] # <<<<<<<<<<<<<<
11478  * cdef int nQuadraturePoints_element = grad_w_dV.shape[1]
11479  * cdef int nDOF_test_element = grad_w_dV.shape[2]
11480  */
11481  __pyx_v_nElements_global = (__pyx_v_grad_w_dV->dimensions[0]);
11482 
11483  /* "cfemIntegrals.pyx":3119
11484  * np.ndarray Lstar_w_dV):
11485  * cdef int nElements_global = grad_w_dV.shape[0]
11486  * cdef int nQuadraturePoints_element = grad_w_dV.shape[1] # <<<<<<<<<<<<<<
11487  * cdef int nDOF_test_element = grad_w_dV.shape[2]
11488  * cdef int nSpace = grad_w_dV.shape[3]
11489  */
11490  __pyx_v_nQuadraturePoints_element = (__pyx_v_grad_w_dV->dimensions[1]);
11491 
11492  /* "cfemIntegrals.pyx":3120
11493  * cdef int nElements_global = grad_w_dV.shape[0]
11494  * cdef int nQuadraturePoints_element = grad_w_dV.shape[1]
11495  * cdef int nDOF_test_element = grad_w_dV.shape[2] # <<<<<<<<<<<<<<
11496  * cdef int nSpace = grad_w_dV.shape[3]
11497  * cupdateAdvection_adjoint(nElements_global,
11498  */
11499  __pyx_v_nDOF_test_element = (__pyx_v_grad_w_dV->dimensions[2]);
11500 
11501  /* "cfemIntegrals.pyx":3121
11502  * cdef int nQuadraturePoints_element = grad_w_dV.shape[1]
11503  * cdef int nDOF_test_element = grad_w_dV.shape[2]
11504  * cdef int nSpace = grad_w_dV.shape[3] # <<<<<<<<<<<<<<
11505  * cupdateAdvection_adjoint(nElements_global,
11506  * nQuadraturePoints_element,
11507  */
11508  __pyx_v_nSpace = (__pyx_v_grad_w_dV->dimensions[3]);
11509 
11510  /* "cfemIntegrals.pyx":3122
11511  * cdef int nDOF_test_element = grad_w_dV.shape[2]
11512  * cdef int nSpace = grad_w_dV.shape[3]
11513  * cupdateAdvection_adjoint(nElements_global, # <<<<<<<<<<<<<<
11514  * nQuadraturePoints_element,
11515  * nDOF_test_element,
11516  */
11517  updateAdvection_adjoint(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_test_element, __pyx_v_nSpace, ((double *)__pyx_v_df->data), ((double *)__pyx_v_grad_w_dV->data), ((double *)__pyx_v_Lstar_w_dV->data));
11518 
11519  /* "cfemIntegrals.pyx":3115
11520  * <double*>grad_v.data,
11521  * <double*>dstrong_residual.data)
11522  * def updateAdvection_adjoint(np.ndarray df, # <<<<<<<<<<<<<<
11523  * np.ndarray grad_w_dV,
11524  * np.ndarray Lstar_w_dV):
11525  */
11526 
11527  /* function exit code */
11528  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11529  __Pyx_XGIVEREF(__pyx_r);
11530  __Pyx_RefNannyFinishContext();
11531  return __pyx_r;
11532 }
11533 
11534 /* "cfemIntegrals.pyx":3129
11535  * <double*>grad_w_dV.data,
11536  * <double*>Lstar_w_dV.data)
11537  * def updateHamiltonian_weak(np.ndarray H, # <<<<<<<<<<<<<<
11538  * np.ndarray w_dV,
11539  * np.ndarray weak_residual):
11540  */
11541 
11542 /* Python wrapper */
11543 static PyObject *__pyx_pw_13cfemIntegrals_87updateHamiltonian_weak(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
11544 static PyMethodDef __pyx_mdef_13cfemIntegrals_87updateHamiltonian_weak = {"updateHamiltonian_weak", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_87updateHamiltonian_weak, METH_VARARGS|METH_KEYWORDS, 0};
11545 static PyObject *__pyx_pw_13cfemIntegrals_87updateHamiltonian_weak(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
11546  PyArrayObject *__pyx_v_H = 0;
11547  PyArrayObject *__pyx_v_w_dV = 0;
11548  PyArrayObject *__pyx_v_weak_residual = 0;
11549  int __pyx_lineno = 0;
11550  const char *__pyx_filename = NULL;
11551  int __pyx_clineno = 0;
11552  PyObject *__pyx_r = 0;
11553  __Pyx_RefNannyDeclarations
11554  __Pyx_RefNannySetupContext("updateHamiltonian_weak (wrapper)", 0);
11555  {
11556  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_H,&__pyx_n_s_w_dV,&__pyx_n_s_weak_residual,0};
11557  PyObject* values[3] = {0,0,0};
11558  if (unlikely(__pyx_kwds)) {
11559  Py_ssize_t kw_args;
11560  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
11561  switch (pos_args) {
11562  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
11563  CYTHON_FALLTHROUGH;
11564  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
11565  CYTHON_FALLTHROUGH;
11566  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
11567  CYTHON_FALLTHROUGH;
11568  case 0: break;
11569  default: goto __pyx_L5_argtuple_error;
11570  }
11571  kw_args = PyDict_Size(__pyx_kwds);
11572  switch (pos_args) {
11573  case 0:
11574  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_H)) != 0)) kw_args--;
11575  else goto __pyx_L5_argtuple_error;
11576  CYTHON_FALLTHROUGH;
11577  case 1:
11578  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_w_dV)) != 0)) kw_args--;
11579  else {
11580  __Pyx_RaiseArgtupleInvalid("updateHamiltonian_weak", 1, 3, 3, 1); __PYX_ERR(0, 3129, __pyx_L3_error)
11581  }
11582  CYTHON_FALLTHROUGH;
11583  case 2:
11584  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weak_residual)) != 0)) kw_args--;
11585  else {
11586  __Pyx_RaiseArgtupleInvalid("updateHamiltonian_weak", 1, 3, 3, 2); __PYX_ERR(0, 3129, __pyx_L3_error)
11587  }
11588  }
11589  if (unlikely(kw_args > 0)) {
11590  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateHamiltonian_weak") < 0)) __PYX_ERR(0, 3129, __pyx_L3_error)
11591  }
11592  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
11593  goto __pyx_L5_argtuple_error;
11594  } else {
11595  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
11596  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
11597  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
11598  }
11599  __pyx_v_H = ((PyArrayObject *)values[0]);
11600  __pyx_v_w_dV = ((PyArrayObject *)values[1]);
11601  __pyx_v_weak_residual = ((PyArrayObject *)values[2]);
11602  }
11603  goto __pyx_L4_argument_unpacking_done;
11604  __pyx_L5_argtuple_error:;
11605  __Pyx_RaiseArgtupleInvalid("updateHamiltonian_weak", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3129, __pyx_L3_error)
11606  __pyx_L3_error:;
11607  __Pyx_AddTraceback("cfemIntegrals.updateHamiltonian_weak", __pyx_clineno, __pyx_lineno, __pyx_filename);
11608  __Pyx_RefNannyFinishContext();
11609  return NULL;
11610  __pyx_L4_argument_unpacking_done:;
11611  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_H), __pyx_ptype_5numpy_ndarray, 1, "H", 0))) __PYX_ERR(0, 3129, __pyx_L1_error)
11612  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w_dV), __pyx_ptype_5numpy_ndarray, 1, "w_dV", 0))) __PYX_ERR(0, 3130, __pyx_L1_error)
11613  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_weak_residual), __pyx_ptype_5numpy_ndarray, 1, "weak_residual", 0))) __PYX_ERR(0, 3131, __pyx_L1_error)
11614  __pyx_r = __pyx_pf_13cfemIntegrals_86updateHamiltonian_weak(__pyx_self, __pyx_v_H, __pyx_v_w_dV, __pyx_v_weak_residual);
11615 
11616  /* function exit code */
11617  goto __pyx_L0;
11618  __pyx_L1_error:;
11619  __pyx_r = NULL;
11620  __pyx_L0:;
11621  __Pyx_RefNannyFinishContext();
11622  return __pyx_r;
11623 }
11624 
11625 static PyObject *__pyx_pf_13cfemIntegrals_86updateHamiltonian_weak(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_H, PyArrayObject *__pyx_v_w_dV, PyArrayObject *__pyx_v_weak_residual) {
11626  int __pyx_v_nElements_global;
11627  int __pyx_v_nQuadraturePoints_element;
11628  int __pyx_v_nDOF_test_element;
11629  PyObject *__pyx_r = NULL;
11630  __Pyx_RefNannyDeclarations
11631  __Pyx_RefNannySetupContext("updateHamiltonian_weak", 0);
11632 
11633  /* "cfemIntegrals.pyx":3132
11634  * np.ndarray w_dV,
11635  * np.ndarray weak_residual):
11636  * cdef int nElements_global = w_dV.shape[0] # <<<<<<<<<<<<<<
11637  * cdef int nQuadraturePoints_element = w_dV.shape[1]
11638  * cdef int nDOF_test_element = w_dV.shape[2]
11639  */
11640  __pyx_v_nElements_global = (__pyx_v_w_dV->dimensions[0]);
11641 
11642  /* "cfemIntegrals.pyx":3133
11643  * np.ndarray weak_residual):
11644  * cdef int nElements_global = w_dV.shape[0]
11645  * cdef int nQuadraturePoints_element = w_dV.shape[1] # <<<<<<<<<<<<<<
11646  * cdef int nDOF_test_element = w_dV.shape[2]
11647  * cupdateHamiltonian_weak(nElements_global,
11648  */
11649  __pyx_v_nQuadraturePoints_element = (__pyx_v_w_dV->dimensions[1]);
11650 
11651  /* "cfemIntegrals.pyx":3134
11652  * cdef int nElements_global = w_dV.shape[0]
11653  * cdef int nQuadraturePoints_element = w_dV.shape[1]
11654  * cdef int nDOF_test_element = w_dV.shape[2] # <<<<<<<<<<<<<<
11655  * cupdateHamiltonian_weak(nElements_global,
11656  * nQuadraturePoints_element,
11657  */
11658  __pyx_v_nDOF_test_element = (__pyx_v_w_dV->dimensions[2]);
11659 
11660  /* "cfemIntegrals.pyx":3135
11661  * cdef int nQuadraturePoints_element = w_dV.shape[1]
11662  * cdef int nDOF_test_element = w_dV.shape[2]
11663  * cupdateHamiltonian_weak(nElements_global, # <<<<<<<<<<<<<<
11664  * nQuadraturePoints_element,
11665  * nDOF_test_element,
11666  */
11667  updateHamiltonian_weak(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_test_element, ((double *)__pyx_v_H->data), ((double *)__pyx_v_w_dV->data), ((double *)__pyx_v_weak_residual->data));
11668 
11669  /* "cfemIntegrals.pyx":3129
11670  * <double*>grad_w_dV.data,
11671  * <double*>Lstar_w_dV.data)
11672  * def updateHamiltonian_weak(np.ndarray H, # <<<<<<<<<<<<<<
11673  * np.ndarray w_dV,
11674  * np.ndarray weak_residual):
11675  */
11676 
11677  /* function exit code */
11678  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11679  __Pyx_XGIVEREF(__pyx_r);
11680  __Pyx_RefNannyFinishContext();
11681  return __pyx_r;
11682 }
11683 
11684 /* "cfemIntegrals.pyx":3141
11685  * <double*>w_dV.data,
11686  * <double*>weak_residual.data)
11687  * def updateHamiltonianJacobian_weak(np.ndarray dH, # <<<<<<<<<<<<<<
11688  * np.ndarray grad_v_X_w_dV,
11689  * np.ndarray jacobian_weak_residual):
11690  */
11691 
11692 /* Python wrapper */
11693 static PyObject *__pyx_pw_13cfemIntegrals_89updateHamiltonianJacobian_weak(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
11694 static PyMethodDef __pyx_mdef_13cfemIntegrals_89updateHamiltonianJacobian_weak = {"updateHamiltonianJacobian_weak", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_89updateHamiltonianJacobian_weak, METH_VARARGS|METH_KEYWORDS, 0};
11695 static PyObject *__pyx_pw_13cfemIntegrals_89updateHamiltonianJacobian_weak(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
11696  PyArrayObject *__pyx_v_dH = 0;
11697  PyArrayObject *__pyx_v_grad_v_X_w_dV = 0;
11698  PyArrayObject *__pyx_v_jacobian_weak_residual = 0;
11699  int __pyx_lineno = 0;
11700  const char *__pyx_filename = NULL;
11701  int __pyx_clineno = 0;
11702  PyObject *__pyx_r = 0;
11703  __Pyx_RefNannyDeclarations
11704  __Pyx_RefNannySetupContext("updateHamiltonianJacobian_weak (wrapper)", 0);
11705  {
11706  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dH,&__pyx_n_s_grad_v_X_w_dV,&__pyx_n_s_jacobian_weak_residual,0};
11707  PyObject* values[3] = {0,0,0};
11708  if (unlikely(__pyx_kwds)) {
11709  Py_ssize_t kw_args;
11710  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
11711  switch (pos_args) {
11712  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
11713  CYTHON_FALLTHROUGH;
11714  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
11715  CYTHON_FALLTHROUGH;
11716  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
11717  CYTHON_FALLTHROUGH;
11718  case 0: break;
11719  default: goto __pyx_L5_argtuple_error;
11720  }
11721  kw_args = PyDict_Size(__pyx_kwds);
11722  switch (pos_args) {
11723  case 0:
11724  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dH)) != 0)) kw_args--;
11725  else goto __pyx_L5_argtuple_error;
11726  CYTHON_FALLTHROUGH;
11727  case 1:
11728  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_v_X_w_dV)) != 0)) kw_args--;
11729  else {
11730  __Pyx_RaiseArgtupleInvalid("updateHamiltonianJacobian_weak", 1, 3, 3, 1); __PYX_ERR(0, 3141, __pyx_L3_error)
11731  }
11732  CYTHON_FALLTHROUGH;
11733  case 2:
11734  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jacobian_weak_residual)) != 0)) kw_args--;
11735  else {
11736  __Pyx_RaiseArgtupleInvalid("updateHamiltonianJacobian_weak", 1, 3, 3, 2); __PYX_ERR(0, 3141, __pyx_L3_error)
11737  }
11738  }
11739  if (unlikely(kw_args > 0)) {
11740  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateHamiltonianJacobian_weak") < 0)) __PYX_ERR(0, 3141, __pyx_L3_error)
11741  }
11742  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
11743  goto __pyx_L5_argtuple_error;
11744  } else {
11745  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
11746  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
11747  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
11748  }
11749  __pyx_v_dH = ((PyArrayObject *)values[0]);
11750  __pyx_v_grad_v_X_w_dV = ((PyArrayObject *)values[1]);
11751  __pyx_v_jacobian_weak_residual = ((PyArrayObject *)values[2]);
11752  }
11753  goto __pyx_L4_argument_unpacking_done;
11754  __pyx_L5_argtuple_error:;
11755  __Pyx_RaiseArgtupleInvalid("updateHamiltonianJacobian_weak", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3141, __pyx_L3_error)
11756  __pyx_L3_error:;
11757  __Pyx_AddTraceback("cfemIntegrals.updateHamiltonianJacobian_weak", __pyx_clineno, __pyx_lineno, __pyx_filename);
11758  __Pyx_RefNannyFinishContext();
11759  return NULL;
11760  __pyx_L4_argument_unpacking_done:;
11761  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dH), __pyx_ptype_5numpy_ndarray, 1, "dH", 0))) __PYX_ERR(0, 3141, __pyx_L1_error)
11762  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_v_X_w_dV), __pyx_ptype_5numpy_ndarray, 1, "grad_v_X_w_dV", 0))) __PYX_ERR(0, 3142, __pyx_L1_error)
11763  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_jacobian_weak_residual), __pyx_ptype_5numpy_ndarray, 1, "jacobian_weak_residual", 0))) __PYX_ERR(0, 3143, __pyx_L1_error)
11764  __pyx_r = __pyx_pf_13cfemIntegrals_88updateHamiltonianJacobian_weak(__pyx_self, __pyx_v_dH, __pyx_v_grad_v_X_w_dV, __pyx_v_jacobian_weak_residual);
11765 
11766  /* function exit code */
11767  goto __pyx_L0;
11768  __pyx_L1_error:;
11769  __pyx_r = NULL;
11770  __pyx_L0:;
11771  __Pyx_RefNannyFinishContext();
11772  return __pyx_r;
11773 }
11774 
11775 static PyObject *__pyx_pf_13cfemIntegrals_88updateHamiltonianJacobian_weak(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dH, PyArrayObject *__pyx_v_grad_v_X_w_dV, PyArrayObject *__pyx_v_jacobian_weak_residual) {
11776  int __pyx_v_nElements_global;
11777  int __pyx_v_nQuadraturePoints_element;
11778  int __pyx_v_nDOF_trial_element;
11779  int __pyx_v_nDOF_test_element;
11780  int __pyx_v_nSpace;
11781  PyObject *__pyx_r = NULL;
11782  __Pyx_RefNannyDeclarations
11783  __Pyx_RefNannySetupContext("updateHamiltonianJacobian_weak", 0);
11784 
11785  /* "cfemIntegrals.pyx":3144
11786  * np.ndarray grad_v_X_w_dV,
11787  * np.ndarray jacobian_weak_residual):
11788  * cdef int nElements_global = grad_v_X_w_dV.shape[0] # <<<<<<<<<<<<<<
11789  * cdef int nQuadraturePoints_element = grad_v_X_w_dV.shape[1]
11790  * cdef int nDOF_trial_element = grad_v_X_w_dV.shape[2]
11791  */
11792  __pyx_v_nElements_global = (__pyx_v_grad_v_X_w_dV->dimensions[0]);
11793 
11794  /* "cfemIntegrals.pyx":3145
11795  * np.ndarray jacobian_weak_residual):
11796  * cdef int nElements_global = grad_v_X_w_dV.shape[0]
11797  * cdef int nQuadraturePoints_element = grad_v_X_w_dV.shape[1] # <<<<<<<<<<<<<<
11798  * cdef int nDOF_trial_element = grad_v_X_w_dV.shape[2]
11799  * cdef int nDOF_test_element = grad_v_X_w_dV.shape[3]
11800  */
11801  __pyx_v_nQuadraturePoints_element = (__pyx_v_grad_v_X_w_dV->dimensions[1]);
11802 
11803  /* "cfemIntegrals.pyx":3146
11804  * cdef int nElements_global = grad_v_X_w_dV.shape[0]
11805  * cdef int nQuadraturePoints_element = grad_v_X_w_dV.shape[1]
11806  * cdef int nDOF_trial_element = grad_v_X_w_dV.shape[2] # <<<<<<<<<<<<<<
11807  * cdef int nDOF_test_element = grad_v_X_w_dV.shape[3]
11808  * cdef int nSpace = grad_v_X_w_dV.shape[4]
11809  */
11810  __pyx_v_nDOF_trial_element = (__pyx_v_grad_v_X_w_dV->dimensions[2]);
11811 
11812  /* "cfemIntegrals.pyx":3147
11813  * cdef int nQuadraturePoints_element = grad_v_X_w_dV.shape[1]
11814  * cdef int nDOF_trial_element = grad_v_X_w_dV.shape[2]
11815  * cdef int nDOF_test_element = grad_v_X_w_dV.shape[3] # <<<<<<<<<<<<<<
11816  * cdef int nSpace = grad_v_X_w_dV.shape[4]
11817  * cupdateHamiltonianJacobian_weak(nElements_global,
11818  */
11819  __pyx_v_nDOF_test_element = (__pyx_v_grad_v_X_w_dV->dimensions[3]);
11820 
11821  /* "cfemIntegrals.pyx":3148
11822  * cdef int nDOF_trial_element = grad_v_X_w_dV.shape[2]
11823  * cdef int nDOF_test_element = grad_v_X_w_dV.shape[3]
11824  * cdef int nSpace = grad_v_X_w_dV.shape[4] # <<<<<<<<<<<<<<
11825  * cupdateHamiltonianJacobian_weak(nElements_global,
11826  * nQuadraturePoints_element,
11827  */
11828  __pyx_v_nSpace = (__pyx_v_grad_v_X_w_dV->dimensions[4]);
11829 
11830  /* "cfemIntegrals.pyx":3149
11831  * cdef int nDOF_test_element = grad_v_X_w_dV.shape[3]
11832  * cdef int nSpace = grad_v_X_w_dV.shape[4]
11833  * cupdateHamiltonianJacobian_weak(nElements_global, # <<<<<<<<<<<<<<
11834  * nQuadraturePoints_element,
11835  * nDOF_trial_element,
11836  */
11837  updateHamiltonianJacobian_weak(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_trial_element, __pyx_v_nDOF_test_element, __pyx_v_nSpace, ((double *)__pyx_v_dH->data), ((double *)__pyx_v_grad_v_X_w_dV->data), ((double *)__pyx_v_jacobian_weak_residual->data));
11838 
11839  /* "cfemIntegrals.pyx":3141
11840  * <double*>w_dV.data,
11841  * <double*>weak_residual.data)
11842  * def updateHamiltonianJacobian_weak(np.ndarray dH, # <<<<<<<<<<<<<<
11843  * np.ndarray grad_v_X_w_dV,
11844  * np.ndarray jacobian_weak_residual):
11845  */
11846 
11847  /* function exit code */
11848  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11849  __Pyx_XGIVEREF(__pyx_r);
11850  __Pyx_RefNannyFinishContext();
11851  return __pyx_r;
11852 }
11853 
11854 /* "cfemIntegrals.pyx":3157
11855  * <double*>grad_v_X_w_dV.data,
11856  * <double*>jacobian_weak_residual.data)
11857  * def updateHamiltonianJacobian_weak_lowmem(np.ndarray dH, # <<<<<<<<<<<<<<
11858  * np.ndarray grad_v,
11859  * np.ndarray w_dV,
11860  */
11861 
11862 /* Python wrapper */
11863 static PyObject *__pyx_pw_13cfemIntegrals_91updateHamiltonianJacobian_weak_lowmem(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
11864 static PyMethodDef __pyx_mdef_13cfemIntegrals_91updateHamiltonianJacobian_weak_lowmem = {"updateHamiltonianJacobian_weak_lowmem", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_91updateHamiltonianJacobian_weak_lowmem, METH_VARARGS|METH_KEYWORDS, 0};
11865 static PyObject *__pyx_pw_13cfemIntegrals_91updateHamiltonianJacobian_weak_lowmem(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
11866  PyArrayObject *__pyx_v_dH = 0;
11867  PyArrayObject *__pyx_v_grad_v = 0;
11868  PyArrayObject *__pyx_v_w_dV = 0;
11869  PyArrayObject *__pyx_v_jacobian_weak_residual = 0;
11870  int __pyx_lineno = 0;
11871  const char *__pyx_filename = NULL;
11872  int __pyx_clineno = 0;
11873  PyObject *__pyx_r = 0;
11874  __Pyx_RefNannyDeclarations
11875  __Pyx_RefNannySetupContext("updateHamiltonianJacobian_weak_lowmem (wrapper)", 0);
11876  {
11877  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dH,&__pyx_n_s_grad_v,&__pyx_n_s_w_dV,&__pyx_n_s_jacobian_weak_residual,0};
11878  PyObject* values[4] = {0,0,0,0};
11879  if (unlikely(__pyx_kwds)) {
11880  Py_ssize_t kw_args;
11881  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
11882  switch (pos_args) {
11883  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
11884  CYTHON_FALLTHROUGH;
11885  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
11886  CYTHON_FALLTHROUGH;
11887  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
11888  CYTHON_FALLTHROUGH;
11889  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
11890  CYTHON_FALLTHROUGH;
11891  case 0: break;
11892  default: goto __pyx_L5_argtuple_error;
11893  }
11894  kw_args = PyDict_Size(__pyx_kwds);
11895  switch (pos_args) {
11896  case 0:
11897  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dH)) != 0)) kw_args--;
11898  else goto __pyx_L5_argtuple_error;
11899  CYTHON_FALLTHROUGH;
11900  case 1:
11901  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_v)) != 0)) kw_args--;
11902  else {
11903  __Pyx_RaiseArgtupleInvalid("updateHamiltonianJacobian_weak_lowmem", 1, 4, 4, 1); __PYX_ERR(0, 3157, __pyx_L3_error)
11904  }
11905  CYTHON_FALLTHROUGH;
11906  case 2:
11907  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_w_dV)) != 0)) kw_args--;
11908  else {
11909  __Pyx_RaiseArgtupleInvalid("updateHamiltonianJacobian_weak_lowmem", 1, 4, 4, 2); __PYX_ERR(0, 3157, __pyx_L3_error)
11910  }
11911  CYTHON_FALLTHROUGH;
11912  case 3:
11913  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jacobian_weak_residual)) != 0)) kw_args--;
11914  else {
11915  __Pyx_RaiseArgtupleInvalid("updateHamiltonianJacobian_weak_lowmem", 1, 4, 4, 3); __PYX_ERR(0, 3157, __pyx_L3_error)
11916  }
11917  }
11918  if (unlikely(kw_args > 0)) {
11919  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateHamiltonianJacobian_weak_lowmem") < 0)) __PYX_ERR(0, 3157, __pyx_L3_error)
11920  }
11921  } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
11922  goto __pyx_L5_argtuple_error;
11923  } else {
11924  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
11925  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
11926  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
11927  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
11928  }
11929  __pyx_v_dH = ((PyArrayObject *)values[0]);
11930  __pyx_v_grad_v = ((PyArrayObject *)values[1]);
11931  __pyx_v_w_dV = ((PyArrayObject *)values[2]);
11932  __pyx_v_jacobian_weak_residual = ((PyArrayObject *)values[3]);
11933  }
11934  goto __pyx_L4_argument_unpacking_done;
11935  __pyx_L5_argtuple_error:;
11936  __Pyx_RaiseArgtupleInvalid("updateHamiltonianJacobian_weak_lowmem", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3157, __pyx_L3_error)
11937  __pyx_L3_error:;
11938  __Pyx_AddTraceback("cfemIntegrals.updateHamiltonianJacobian_weak_lowmem", __pyx_clineno, __pyx_lineno, __pyx_filename);
11939  __Pyx_RefNannyFinishContext();
11940  return NULL;
11941  __pyx_L4_argument_unpacking_done:;
11942  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dH), __pyx_ptype_5numpy_ndarray, 1, "dH", 0))) __PYX_ERR(0, 3157, __pyx_L1_error)
11943  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_v), __pyx_ptype_5numpy_ndarray, 1, "grad_v", 0))) __PYX_ERR(0, 3158, __pyx_L1_error)
11944  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w_dV), __pyx_ptype_5numpy_ndarray, 1, "w_dV", 0))) __PYX_ERR(0, 3159, __pyx_L1_error)
11945  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_jacobian_weak_residual), __pyx_ptype_5numpy_ndarray, 1, "jacobian_weak_residual", 0))) __PYX_ERR(0, 3160, __pyx_L1_error)
11946  __pyx_r = __pyx_pf_13cfemIntegrals_90updateHamiltonianJacobian_weak_lowmem(__pyx_self, __pyx_v_dH, __pyx_v_grad_v, __pyx_v_w_dV, __pyx_v_jacobian_weak_residual);
11947 
11948  /* function exit code */
11949  goto __pyx_L0;
11950  __pyx_L1_error:;
11951  __pyx_r = NULL;
11952  __pyx_L0:;
11953  __Pyx_RefNannyFinishContext();
11954  return __pyx_r;
11955 }
11956 
11957 static PyObject *__pyx_pf_13cfemIntegrals_90updateHamiltonianJacobian_weak_lowmem(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dH, PyArrayObject *__pyx_v_grad_v, PyArrayObject *__pyx_v_w_dV, PyArrayObject *__pyx_v_jacobian_weak_residual) {
11958  int __pyx_v_nElements_global;
11959  int __pyx_v_nQuadraturePoints_element;
11960  int __pyx_v_nDOF_trial_element;
11961  int __pyx_v_nDOF_test_element;
11962  int __pyx_v_nSpace;
11963  PyObject *__pyx_r = NULL;
11964  __Pyx_RefNannyDeclarations
11965  __Pyx_RefNannySetupContext("updateHamiltonianJacobian_weak_lowmem", 0);
11966 
11967  /* "cfemIntegrals.pyx":3161
11968  * np.ndarray w_dV,
11969  * np.ndarray jacobian_weak_residual):
11970  * cdef int nElements_global = grad_v.shape[0] # <<<<<<<<<<<<<<
11971  * cdef int nQuadraturePoints_element = grad_v.shape[1]
11972  * cdef int nDOF_trial_element = grad_v.shape[2]
11973  */
11974  __pyx_v_nElements_global = (__pyx_v_grad_v->dimensions[0]);
11975 
11976  /* "cfemIntegrals.pyx":3162
11977  * np.ndarray jacobian_weak_residual):
11978  * cdef int nElements_global = grad_v.shape[0]
11979  * cdef int nQuadraturePoints_element = grad_v.shape[1] # <<<<<<<<<<<<<<
11980  * cdef int nDOF_trial_element = grad_v.shape[2]
11981  * cdef int nDOF_test_element = w_dV.shape[2]
11982  */
11983  __pyx_v_nQuadraturePoints_element = (__pyx_v_grad_v->dimensions[1]);
11984 
11985  /* "cfemIntegrals.pyx":3163
11986  * cdef int nElements_global = grad_v.shape[0]
11987  * cdef int nQuadraturePoints_element = grad_v.shape[1]
11988  * cdef int nDOF_trial_element = grad_v.shape[2] # <<<<<<<<<<<<<<
11989  * cdef int nDOF_test_element = w_dV.shape[2]
11990  * cdef int nSpace = grad_v.shape[3]
11991  */
11992  __pyx_v_nDOF_trial_element = (__pyx_v_grad_v->dimensions[2]);
11993 
11994  /* "cfemIntegrals.pyx":3164
11995  * cdef int nQuadraturePoints_element = grad_v.shape[1]
11996  * cdef int nDOF_trial_element = grad_v.shape[2]
11997  * cdef int nDOF_test_element = w_dV.shape[2] # <<<<<<<<<<<<<<
11998  * cdef int nSpace = grad_v.shape[3]
11999  * cupdateHamiltonianJacobian_weak_lowmem(nElements_global,
12000  */
12001  __pyx_v_nDOF_test_element = (__pyx_v_w_dV->dimensions[2]);
12002 
12003  /* "cfemIntegrals.pyx":3165
12004  * cdef int nDOF_trial_element = grad_v.shape[2]
12005  * cdef int nDOF_test_element = w_dV.shape[2]
12006  * cdef int nSpace = grad_v.shape[3] # <<<<<<<<<<<<<<
12007  * cupdateHamiltonianJacobian_weak_lowmem(nElements_global,
12008  * nQuadraturePoints_element,
12009  */
12010  __pyx_v_nSpace = (__pyx_v_grad_v->dimensions[3]);
12011 
12012  /* "cfemIntegrals.pyx":3166
12013  * cdef int nDOF_test_element = w_dV.shape[2]
12014  * cdef int nSpace = grad_v.shape[3]
12015  * cupdateHamiltonianJacobian_weak_lowmem(nElements_global, # <<<<<<<<<<<<<<
12016  * nQuadraturePoints_element,
12017  * nDOF_trial_element,
12018  */
12019  updateHamiltonianJacobian_weak_lowmem(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_trial_element, __pyx_v_nDOF_test_element, __pyx_v_nSpace, ((double *)__pyx_v_dH->data), ((double *)__pyx_v_grad_v->data), ((double *)__pyx_v_w_dV->data), ((double *)__pyx_v_jacobian_weak_residual->data));
12020 
12021  /* "cfemIntegrals.pyx":3157
12022  * <double*>grad_v_X_w_dV.data,
12023  * <double*>jacobian_weak_residual.data)
12024  * def updateHamiltonianJacobian_weak_lowmem(np.ndarray dH, # <<<<<<<<<<<<<<
12025  * np.ndarray grad_v,
12026  * np.ndarray w_dV,
12027  */
12028 
12029  /* function exit code */
12030  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
12031  __Pyx_XGIVEREF(__pyx_r);
12032  __Pyx_RefNannyFinishContext();
12033  return __pyx_r;
12034 }
12035 
12036 /* "cfemIntegrals.pyx":3175
12037  * <double*> w_dV.data,
12038  * <double*> jacobian_weak_residual.data)
12039  * def updateHamiltonian_strong(np.ndarray dH, # <<<<<<<<<<<<<<
12040  * np.ndarray grad_u,
12041  * np.ndarray strong_residual):
12042  */
12043 
12044 /* Python wrapper */
12045 static PyObject *__pyx_pw_13cfemIntegrals_93updateHamiltonian_strong(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12046 static PyMethodDef __pyx_mdef_13cfemIntegrals_93updateHamiltonian_strong = {"updateHamiltonian_strong", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_93updateHamiltonian_strong, METH_VARARGS|METH_KEYWORDS, 0};
12047 static PyObject *__pyx_pw_13cfemIntegrals_93updateHamiltonian_strong(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
12048  PyArrayObject *__pyx_v_dH = 0;
12049  PyArrayObject *__pyx_v_grad_u = 0;
12050  PyArrayObject *__pyx_v_strong_residual = 0;
12051  int __pyx_lineno = 0;
12052  const char *__pyx_filename = NULL;
12053  int __pyx_clineno = 0;
12054  PyObject *__pyx_r = 0;
12055  __Pyx_RefNannyDeclarations
12056  __Pyx_RefNannySetupContext("updateHamiltonian_strong (wrapper)", 0);
12057  {
12058  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dH,&__pyx_n_s_grad_u,&__pyx_n_s_strong_residual,0};
12059  PyObject* values[3] = {0,0,0};
12060  if (unlikely(__pyx_kwds)) {
12061  Py_ssize_t kw_args;
12062  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
12063  switch (pos_args) {
12064  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
12065  CYTHON_FALLTHROUGH;
12066  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12067  CYTHON_FALLTHROUGH;
12068  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12069  CYTHON_FALLTHROUGH;
12070  case 0: break;
12071  default: goto __pyx_L5_argtuple_error;
12072  }
12073  kw_args = PyDict_Size(__pyx_kwds);
12074  switch (pos_args) {
12075  case 0:
12076  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dH)) != 0)) kw_args--;
12077  else goto __pyx_L5_argtuple_error;
12078  CYTHON_FALLTHROUGH;
12079  case 1:
12080  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_u)) != 0)) kw_args--;
12081  else {
12082  __Pyx_RaiseArgtupleInvalid("updateHamiltonian_strong", 1, 3, 3, 1); __PYX_ERR(0, 3175, __pyx_L3_error)
12083  }
12084  CYTHON_FALLTHROUGH;
12085  case 2:
12086  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_strong_residual)) != 0)) kw_args--;
12087  else {
12088  __Pyx_RaiseArgtupleInvalid("updateHamiltonian_strong", 1, 3, 3, 2); __PYX_ERR(0, 3175, __pyx_L3_error)
12089  }
12090  }
12091  if (unlikely(kw_args > 0)) {
12092  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateHamiltonian_strong") < 0)) __PYX_ERR(0, 3175, __pyx_L3_error)
12093  }
12094  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
12095  goto __pyx_L5_argtuple_error;
12096  } else {
12097  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12098  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12099  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
12100  }
12101  __pyx_v_dH = ((PyArrayObject *)values[0]);
12102  __pyx_v_grad_u = ((PyArrayObject *)values[1]);
12103  __pyx_v_strong_residual = ((PyArrayObject *)values[2]);
12104  }
12105  goto __pyx_L4_argument_unpacking_done;
12106  __pyx_L5_argtuple_error:;
12107  __Pyx_RaiseArgtupleInvalid("updateHamiltonian_strong", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3175, __pyx_L3_error)
12108  __pyx_L3_error:;
12109  __Pyx_AddTraceback("cfemIntegrals.updateHamiltonian_strong", __pyx_clineno, __pyx_lineno, __pyx_filename);
12110  __Pyx_RefNannyFinishContext();
12111  return NULL;
12112  __pyx_L4_argument_unpacking_done:;
12113  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dH), __pyx_ptype_5numpy_ndarray, 1, "dH", 0))) __PYX_ERR(0, 3175, __pyx_L1_error)
12114  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_u), __pyx_ptype_5numpy_ndarray, 1, "grad_u", 0))) __PYX_ERR(0, 3176, __pyx_L1_error)
12115  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_strong_residual), __pyx_ptype_5numpy_ndarray, 1, "strong_residual", 0))) __PYX_ERR(0, 3177, __pyx_L1_error)
12116  __pyx_r = __pyx_pf_13cfemIntegrals_92updateHamiltonian_strong(__pyx_self, __pyx_v_dH, __pyx_v_grad_u, __pyx_v_strong_residual);
12117 
12118  /* function exit code */
12119  goto __pyx_L0;
12120  __pyx_L1_error:;
12121  __pyx_r = NULL;
12122  __pyx_L0:;
12123  __Pyx_RefNannyFinishContext();
12124  return __pyx_r;
12125 }
12126 
12127 static PyObject *__pyx_pf_13cfemIntegrals_92updateHamiltonian_strong(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dH, PyArrayObject *__pyx_v_grad_u, PyArrayObject *__pyx_v_strong_residual) {
12128  int __pyx_v_nElements_global;
12129  int __pyx_v_nQuadraturePoints_element;
12130  int __pyx_v_nSpace;
12131  PyObject *__pyx_r = NULL;
12132  __Pyx_RefNannyDeclarations
12133  __Pyx_RefNannySetupContext("updateHamiltonian_strong", 0);
12134 
12135  /* "cfemIntegrals.pyx":3178
12136  * np.ndarray grad_u,
12137  * np.ndarray strong_residual):
12138  * cdef int nElements_global = grad_u.shape[0] # <<<<<<<<<<<<<<
12139  * cdef int nQuadraturePoints_element = grad_u.shape[1]
12140  * cdef int nSpace = grad_u.shape[2]
12141  */
12142  __pyx_v_nElements_global = (__pyx_v_grad_u->dimensions[0]);
12143 
12144  /* "cfemIntegrals.pyx":3179
12145  * np.ndarray strong_residual):
12146  * cdef int nElements_global = grad_u.shape[0]
12147  * cdef int nQuadraturePoints_element = grad_u.shape[1] # <<<<<<<<<<<<<<
12148  * cdef int nSpace = grad_u.shape[2]
12149  * cupdateHamiltonian_strong(nElements_global,
12150  */
12151  __pyx_v_nQuadraturePoints_element = (__pyx_v_grad_u->dimensions[1]);
12152 
12153  /* "cfemIntegrals.pyx":3180
12154  * cdef int nElements_global = grad_u.shape[0]
12155  * cdef int nQuadraturePoints_element = grad_u.shape[1]
12156  * cdef int nSpace = grad_u.shape[2] # <<<<<<<<<<<<<<
12157  * cupdateHamiltonian_strong(nElements_global,
12158  * nQuadraturePoints_element,
12159  */
12160  __pyx_v_nSpace = (__pyx_v_grad_u->dimensions[2]);
12161 
12162  /* "cfemIntegrals.pyx":3181
12163  * cdef int nQuadraturePoints_element = grad_u.shape[1]
12164  * cdef int nSpace = grad_u.shape[2]
12165  * cupdateHamiltonian_strong(nElements_global, # <<<<<<<<<<<<<<
12166  * nQuadraturePoints_element,
12167  * nSpace,
12168  */
12169  updateHamiltonian_strong(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nSpace, ((double *)__pyx_v_dH->data), ((double *)__pyx_v_grad_u->data), ((double *)__pyx_v_strong_residual->data));
12170 
12171  /* "cfemIntegrals.pyx":3175
12172  * <double*> w_dV.data,
12173  * <double*> jacobian_weak_residual.data)
12174  * def updateHamiltonian_strong(np.ndarray dH, # <<<<<<<<<<<<<<
12175  * np.ndarray grad_u,
12176  * np.ndarray strong_residual):
12177  */
12178 
12179  /* function exit code */
12180  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
12181  __Pyx_XGIVEREF(__pyx_r);
12182  __Pyx_RefNannyFinishContext();
12183  return __pyx_r;
12184 }
12185 
12186 /* "cfemIntegrals.pyx":3187
12187  * <double*>grad_u.data,
12188  * <double*>strong_residual.data)
12189  * def updateHamiltonianJacobian_strong(np.ndarray dH, # <<<<<<<<<<<<<<
12190  * np.ndarray grad_v,
12191  * np.ndarray dstrong_residual):
12192  */
12193 
12194 /* Python wrapper */
12195 static PyObject *__pyx_pw_13cfemIntegrals_95updateHamiltonianJacobian_strong(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12196 static PyMethodDef __pyx_mdef_13cfemIntegrals_95updateHamiltonianJacobian_strong = {"updateHamiltonianJacobian_strong", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_95updateHamiltonianJacobian_strong, METH_VARARGS|METH_KEYWORDS, 0};
12197 static PyObject *__pyx_pw_13cfemIntegrals_95updateHamiltonianJacobian_strong(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
12198  PyArrayObject *__pyx_v_dH = 0;
12199  PyArrayObject *__pyx_v_grad_v = 0;
12200  PyArrayObject *__pyx_v_dstrong_residual = 0;
12201  int __pyx_lineno = 0;
12202  const char *__pyx_filename = NULL;
12203  int __pyx_clineno = 0;
12204  PyObject *__pyx_r = 0;
12205  __Pyx_RefNannyDeclarations
12206  __Pyx_RefNannySetupContext("updateHamiltonianJacobian_strong (wrapper)", 0);
12207  {
12208  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dH,&__pyx_n_s_grad_v,&__pyx_n_s_dstrong_residual,0};
12209  PyObject* values[3] = {0,0,0};
12210  if (unlikely(__pyx_kwds)) {
12211  Py_ssize_t kw_args;
12212  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
12213  switch (pos_args) {
12214  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
12215  CYTHON_FALLTHROUGH;
12216  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12217  CYTHON_FALLTHROUGH;
12218  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12219  CYTHON_FALLTHROUGH;
12220  case 0: break;
12221  default: goto __pyx_L5_argtuple_error;
12222  }
12223  kw_args = PyDict_Size(__pyx_kwds);
12224  switch (pos_args) {
12225  case 0:
12226  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dH)) != 0)) kw_args--;
12227  else goto __pyx_L5_argtuple_error;
12228  CYTHON_FALLTHROUGH;
12229  case 1:
12230  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_v)) != 0)) kw_args--;
12231  else {
12232  __Pyx_RaiseArgtupleInvalid("updateHamiltonianJacobian_strong", 1, 3, 3, 1); __PYX_ERR(0, 3187, __pyx_L3_error)
12233  }
12234  CYTHON_FALLTHROUGH;
12235  case 2:
12236  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dstrong_residual)) != 0)) kw_args--;
12237  else {
12238  __Pyx_RaiseArgtupleInvalid("updateHamiltonianJacobian_strong", 1, 3, 3, 2); __PYX_ERR(0, 3187, __pyx_L3_error)
12239  }
12240  }
12241  if (unlikely(kw_args > 0)) {
12242  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateHamiltonianJacobian_strong") < 0)) __PYX_ERR(0, 3187, __pyx_L3_error)
12243  }
12244  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
12245  goto __pyx_L5_argtuple_error;
12246  } else {
12247  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12248  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12249  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
12250  }
12251  __pyx_v_dH = ((PyArrayObject *)values[0]);
12252  __pyx_v_grad_v = ((PyArrayObject *)values[1]);
12253  __pyx_v_dstrong_residual = ((PyArrayObject *)values[2]);
12254  }
12255  goto __pyx_L4_argument_unpacking_done;
12256  __pyx_L5_argtuple_error:;
12257  __Pyx_RaiseArgtupleInvalid("updateHamiltonianJacobian_strong", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3187, __pyx_L3_error)
12258  __pyx_L3_error:;
12259  __Pyx_AddTraceback("cfemIntegrals.updateHamiltonianJacobian_strong", __pyx_clineno, __pyx_lineno, __pyx_filename);
12260  __Pyx_RefNannyFinishContext();
12261  return NULL;
12262  __pyx_L4_argument_unpacking_done:;
12263  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dH), __pyx_ptype_5numpy_ndarray, 1, "dH", 0))) __PYX_ERR(0, 3187, __pyx_L1_error)
12264  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_v), __pyx_ptype_5numpy_ndarray, 1, "grad_v", 0))) __PYX_ERR(0, 3188, __pyx_L1_error)
12265  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dstrong_residual), __pyx_ptype_5numpy_ndarray, 1, "dstrong_residual", 0))) __PYX_ERR(0, 3189, __pyx_L1_error)
12266  __pyx_r = __pyx_pf_13cfemIntegrals_94updateHamiltonianJacobian_strong(__pyx_self, __pyx_v_dH, __pyx_v_grad_v, __pyx_v_dstrong_residual);
12267 
12268  /* function exit code */
12269  goto __pyx_L0;
12270  __pyx_L1_error:;
12271  __pyx_r = NULL;
12272  __pyx_L0:;
12273  __Pyx_RefNannyFinishContext();
12274  return __pyx_r;
12275 }
12276 
12277 static PyObject *__pyx_pf_13cfemIntegrals_94updateHamiltonianJacobian_strong(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dH, PyArrayObject *__pyx_v_grad_v, PyArrayObject *__pyx_v_dstrong_residual) {
12278  int __pyx_v_nElements_global;
12279  int __pyx_v_nQuadraturePoints_element;
12280  int __pyx_v_nDOF_trial_element;
12281  int __pyx_v_nSpace;
12282  PyObject *__pyx_r = NULL;
12283  __Pyx_RefNannyDeclarations
12284  __Pyx_RefNannySetupContext("updateHamiltonianJacobian_strong", 0);
12285 
12286  /* "cfemIntegrals.pyx":3190
12287  * np.ndarray grad_v,
12288  * np.ndarray dstrong_residual):
12289  * cdef int nElements_global = grad_v.shape[0] # <<<<<<<<<<<<<<
12290  * cdef int nQuadraturePoints_element = grad_v.shape[1]
12291  * cdef int nDOF_trial_element = grad_v.shape[2]
12292  */
12293  __pyx_v_nElements_global = (__pyx_v_grad_v->dimensions[0]);
12294 
12295  /* "cfemIntegrals.pyx":3191
12296  * np.ndarray dstrong_residual):
12297  * cdef int nElements_global = grad_v.shape[0]
12298  * cdef int nQuadraturePoints_element = grad_v.shape[1] # <<<<<<<<<<<<<<
12299  * cdef int nDOF_trial_element = grad_v.shape[2]
12300  * cdef int nSpace = grad_v.shape[3]
12301  */
12302  __pyx_v_nQuadraturePoints_element = (__pyx_v_grad_v->dimensions[1]);
12303 
12304  /* "cfemIntegrals.pyx":3192
12305  * cdef int nElements_global = grad_v.shape[0]
12306  * cdef int nQuadraturePoints_element = grad_v.shape[1]
12307  * cdef int nDOF_trial_element = grad_v.shape[2] # <<<<<<<<<<<<<<
12308  * cdef int nSpace = grad_v.shape[3]
12309  * cupdateHamiltonianJacobian_strong(nElements_global,
12310  */
12311  __pyx_v_nDOF_trial_element = (__pyx_v_grad_v->dimensions[2]);
12312 
12313  /* "cfemIntegrals.pyx":3193
12314  * cdef int nQuadraturePoints_element = grad_v.shape[1]
12315  * cdef int nDOF_trial_element = grad_v.shape[2]
12316  * cdef int nSpace = grad_v.shape[3] # <<<<<<<<<<<<<<
12317  * cupdateHamiltonianJacobian_strong(nElements_global,
12318  * nQuadraturePoints_element,
12319  */
12320  __pyx_v_nSpace = (__pyx_v_grad_v->dimensions[3]);
12321 
12322  /* "cfemIntegrals.pyx":3194
12323  * cdef int nDOF_trial_element = grad_v.shape[2]
12324  * cdef int nSpace = grad_v.shape[3]
12325  * cupdateHamiltonianJacobian_strong(nElements_global, # <<<<<<<<<<<<<<
12326  * nQuadraturePoints_element,
12327  * nDOF_trial_element,
12328  */
12329  updateHamiltonianJacobian_strong(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_trial_element, __pyx_v_nSpace, ((double *)__pyx_v_dH->data), ((double *)__pyx_v_grad_v->data), ((double *)__pyx_v_dstrong_residual->data));
12330 
12331  /* "cfemIntegrals.pyx":3187
12332  * <double*>grad_u.data,
12333  * <double*>strong_residual.data)
12334  * def updateHamiltonianJacobian_strong(np.ndarray dH, # <<<<<<<<<<<<<<
12335  * np.ndarray grad_v,
12336  * np.ndarray dstrong_residual):
12337  */
12338 
12339  /* function exit code */
12340  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
12341  __Pyx_XGIVEREF(__pyx_r);
12342  __Pyx_RefNannyFinishContext();
12343  return __pyx_r;
12344 }
12345 
12346 /* "cfemIntegrals.pyx":3201
12347  * <double*>grad_v.data,
12348  * <double*>dstrong_residual.data)
12349  * def updateHamiltonian_adjoint(np.ndarray dH, # <<<<<<<<<<<<<<
12350  * np.ndarray grad_w_dV,
12351  * np.ndarray Lstar_w_dV):
12352  */
12353 
12354 /* Python wrapper */
12355 static PyObject *__pyx_pw_13cfemIntegrals_97updateHamiltonian_adjoint(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12356 static PyMethodDef __pyx_mdef_13cfemIntegrals_97updateHamiltonian_adjoint = {"updateHamiltonian_adjoint", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_97updateHamiltonian_adjoint, METH_VARARGS|METH_KEYWORDS, 0};
12357 static PyObject *__pyx_pw_13cfemIntegrals_97updateHamiltonian_adjoint(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
12358  PyArrayObject *__pyx_v_dH = 0;
12359  PyArrayObject *__pyx_v_grad_w_dV = 0;
12360  PyArrayObject *__pyx_v_Lstar_w_dV = 0;
12361  int __pyx_lineno = 0;
12362  const char *__pyx_filename = NULL;
12363  int __pyx_clineno = 0;
12364  PyObject *__pyx_r = 0;
12365  __Pyx_RefNannyDeclarations
12366  __Pyx_RefNannySetupContext("updateHamiltonian_adjoint (wrapper)", 0);
12367  {
12368  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dH,&__pyx_n_s_grad_w_dV,&__pyx_n_s_Lstar_w_dV,0};
12369  PyObject* values[3] = {0,0,0};
12370  if (unlikely(__pyx_kwds)) {
12371  Py_ssize_t kw_args;
12372  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
12373  switch (pos_args) {
12374  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
12375  CYTHON_FALLTHROUGH;
12376  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12377  CYTHON_FALLTHROUGH;
12378  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12379  CYTHON_FALLTHROUGH;
12380  case 0: break;
12381  default: goto __pyx_L5_argtuple_error;
12382  }
12383  kw_args = PyDict_Size(__pyx_kwds);
12384  switch (pos_args) {
12385  case 0:
12386  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dH)) != 0)) kw_args--;
12387  else goto __pyx_L5_argtuple_error;
12388  CYTHON_FALLTHROUGH;
12389  case 1:
12390  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_w_dV)) != 0)) kw_args--;
12391  else {
12392  __Pyx_RaiseArgtupleInvalid("updateHamiltonian_adjoint", 1, 3, 3, 1); __PYX_ERR(0, 3201, __pyx_L3_error)
12393  }
12394  CYTHON_FALLTHROUGH;
12395  case 2:
12396  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Lstar_w_dV)) != 0)) kw_args--;
12397  else {
12398  __Pyx_RaiseArgtupleInvalid("updateHamiltonian_adjoint", 1, 3, 3, 2); __PYX_ERR(0, 3201, __pyx_L3_error)
12399  }
12400  }
12401  if (unlikely(kw_args > 0)) {
12402  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateHamiltonian_adjoint") < 0)) __PYX_ERR(0, 3201, __pyx_L3_error)
12403  }
12404  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
12405  goto __pyx_L5_argtuple_error;
12406  } else {
12407  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12408  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12409  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
12410  }
12411  __pyx_v_dH = ((PyArrayObject *)values[0]);
12412  __pyx_v_grad_w_dV = ((PyArrayObject *)values[1]);
12413  __pyx_v_Lstar_w_dV = ((PyArrayObject *)values[2]);
12414  }
12415  goto __pyx_L4_argument_unpacking_done;
12416  __pyx_L5_argtuple_error:;
12417  __Pyx_RaiseArgtupleInvalid("updateHamiltonian_adjoint", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3201, __pyx_L3_error)
12418  __pyx_L3_error:;
12419  __Pyx_AddTraceback("cfemIntegrals.updateHamiltonian_adjoint", __pyx_clineno, __pyx_lineno, __pyx_filename);
12420  __Pyx_RefNannyFinishContext();
12421  return NULL;
12422  __pyx_L4_argument_unpacking_done:;
12423  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dH), __pyx_ptype_5numpy_ndarray, 1, "dH", 0))) __PYX_ERR(0, 3201, __pyx_L1_error)
12424  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_w_dV), __pyx_ptype_5numpy_ndarray, 1, "grad_w_dV", 0))) __PYX_ERR(0, 3202, __pyx_L1_error)
12425  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Lstar_w_dV), __pyx_ptype_5numpy_ndarray, 1, "Lstar_w_dV", 0))) __PYX_ERR(0, 3203, __pyx_L1_error)
12426  __pyx_r = __pyx_pf_13cfemIntegrals_96updateHamiltonian_adjoint(__pyx_self, __pyx_v_dH, __pyx_v_grad_w_dV, __pyx_v_Lstar_w_dV);
12427 
12428  /* function exit code */
12429  goto __pyx_L0;
12430  __pyx_L1_error:;
12431  __pyx_r = NULL;
12432  __pyx_L0:;
12433  __Pyx_RefNannyFinishContext();
12434  return __pyx_r;
12435 }
12436 
12437 static PyObject *__pyx_pf_13cfemIntegrals_96updateHamiltonian_adjoint(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dH, PyArrayObject *__pyx_v_grad_w_dV, PyArrayObject *__pyx_v_Lstar_w_dV) {
12438  int __pyx_v_nElements_global;
12439  int __pyx_v_nQuadraturePoints_element;
12440  int __pyx_v_nDOF_test_element;
12441  int __pyx_v_nSpace;
12442  PyObject *__pyx_r = NULL;
12443  __Pyx_RefNannyDeclarations
12444  __Pyx_RefNannySetupContext("updateHamiltonian_adjoint", 0);
12445 
12446  /* "cfemIntegrals.pyx":3204
12447  * np.ndarray grad_w_dV,
12448  * np.ndarray Lstar_w_dV):
12449  * cdef int nElements_global = grad_w_dV.shape[0] # <<<<<<<<<<<<<<
12450  * cdef int nQuadraturePoints_element = grad_w_dV.shape[1]
12451  * cdef int nDOF_test_element = grad_w_dV.shape[2]
12452  */
12453  __pyx_v_nElements_global = (__pyx_v_grad_w_dV->dimensions[0]);
12454 
12455  /* "cfemIntegrals.pyx":3205
12456  * np.ndarray Lstar_w_dV):
12457  * cdef int nElements_global = grad_w_dV.shape[0]
12458  * cdef int nQuadraturePoints_element = grad_w_dV.shape[1] # <<<<<<<<<<<<<<
12459  * cdef int nDOF_test_element = grad_w_dV.shape[2]
12460  * cdef int nSpace = grad_w_dV.shape[3]
12461  */
12462  __pyx_v_nQuadraturePoints_element = (__pyx_v_grad_w_dV->dimensions[1]);
12463 
12464  /* "cfemIntegrals.pyx":3206
12465  * cdef int nElements_global = grad_w_dV.shape[0]
12466  * cdef int nQuadraturePoints_element = grad_w_dV.shape[1]
12467  * cdef int nDOF_test_element = grad_w_dV.shape[2] # <<<<<<<<<<<<<<
12468  * cdef int nSpace = grad_w_dV.shape[3]
12469  * cupdateHamiltonian_adjoint(nElements_global,
12470  */
12471  __pyx_v_nDOF_test_element = (__pyx_v_grad_w_dV->dimensions[2]);
12472 
12473  /* "cfemIntegrals.pyx":3207
12474  * cdef int nQuadraturePoints_element = grad_w_dV.shape[1]
12475  * cdef int nDOF_test_element = grad_w_dV.shape[2]
12476  * cdef int nSpace = grad_w_dV.shape[3] # <<<<<<<<<<<<<<
12477  * cupdateHamiltonian_adjoint(nElements_global,
12478  * nQuadraturePoints_element,
12479  */
12480  __pyx_v_nSpace = (__pyx_v_grad_w_dV->dimensions[3]);
12481 
12482  /* "cfemIntegrals.pyx":3208
12483  * cdef int nDOF_test_element = grad_w_dV.shape[2]
12484  * cdef int nSpace = grad_w_dV.shape[3]
12485  * cupdateHamiltonian_adjoint(nElements_global, # <<<<<<<<<<<<<<
12486  * nQuadraturePoints_element,
12487  * nDOF_test_element,
12488  */
12489  updateHamiltonian_adjoint(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_test_element, __pyx_v_nSpace, ((double *)__pyx_v_dH->data), ((double *)__pyx_v_grad_w_dV->data), ((double *)__pyx_v_Lstar_w_dV->data));
12490 
12491  /* "cfemIntegrals.pyx":3201
12492  * <double*>grad_v.data,
12493  * <double*>dstrong_residual.data)
12494  * def updateHamiltonian_adjoint(np.ndarray dH, # <<<<<<<<<<<<<<
12495  * np.ndarray grad_w_dV,
12496  * np.ndarray Lstar_w_dV):
12497  */
12498 
12499  /* function exit code */
12500  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
12501  __Pyx_XGIVEREF(__pyx_r);
12502  __Pyx_RefNannyFinishContext();
12503  return __pyx_r;
12504 }
12505 
12506 /* "cfemIntegrals.pyx":3215
12507  * <double*>grad_w_dV.data,
12508  * <double*>Lstar_w_dV.data)
12509  * def updateDiffusion_weak(np.ndarray a, # <<<<<<<<<<<<<<
12510  * np.ndarray grad_phi_X_grad_w_dV,
12511  * np.ndarray weak_residual):
12512  */
12513 
12514 /* Python wrapper */
12515 static PyObject *__pyx_pw_13cfemIntegrals_99updateDiffusion_weak(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12516 static PyMethodDef __pyx_mdef_13cfemIntegrals_99updateDiffusion_weak = {"updateDiffusion_weak", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_99updateDiffusion_weak, METH_VARARGS|METH_KEYWORDS, 0};
12517 static PyObject *__pyx_pw_13cfemIntegrals_99updateDiffusion_weak(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
12518  PyArrayObject *__pyx_v_a = 0;
12519  PyArrayObject *__pyx_v_grad_phi_X_grad_w_dV = 0;
12520  PyArrayObject *__pyx_v_weak_residual = 0;
12521  int __pyx_lineno = 0;
12522  const char *__pyx_filename = NULL;
12523  int __pyx_clineno = 0;
12524  PyObject *__pyx_r = 0;
12525  __Pyx_RefNannyDeclarations
12526  __Pyx_RefNannySetupContext("updateDiffusion_weak (wrapper)", 0);
12527  {
12528  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_a,&__pyx_n_s_grad_phi_X_grad_w_dV,&__pyx_n_s_weak_residual,0};
12529  PyObject* values[3] = {0,0,0};
12530  if (unlikely(__pyx_kwds)) {
12531  Py_ssize_t kw_args;
12532  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
12533  switch (pos_args) {
12534  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
12535  CYTHON_FALLTHROUGH;
12536  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12537  CYTHON_FALLTHROUGH;
12538  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12539  CYTHON_FALLTHROUGH;
12540  case 0: break;
12541  default: goto __pyx_L5_argtuple_error;
12542  }
12543  kw_args = PyDict_Size(__pyx_kwds);
12544  switch (pos_args) {
12545  case 0:
12546  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
12547  else goto __pyx_L5_argtuple_error;
12548  CYTHON_FALLTHROUGH;
12549  case 1:
12550  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_phi_X_grad_w_dV)) != 0)) kw_args--;
12551  else {
12552  __Pyx_RaiseArgtupleInvalid("updateDiffusion_weak", 1, 3, 3, 1); __PYX_ERR(0, 3215, __pyx_L3_error)
12553  }
12554  CYTHON_FALLTHROUGH;
12555  case 2:
12556  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weak_residual)) != 0)) kw_args--;
12557  else {
12558  __Pyx_RaiseArgtupleInvalid("updateDiffusion_weak", 1, 3, 3, 2); __PYX_ERR(0, 3215, __pyx_L3_error)
12559  }
12560  }
12561  if (unlikely(kw_args > 0)) {
12562  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateDiffusion_weak") < 0)) __PYX_ERR(0, 3215, __pyx_L3_error)
12563  }
12564  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
12565  goto __pyx_L5_argtuple_error;
12566  } else {
12567  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12568  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12569  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
12570  }
12571  __pyx_v_a = ((PyArrayObject *)values[0]);
12572  __pyx_v_grad_phi_X_grad_w_dV = ((PyArrayObject *)values[1]);
12573  __pyx_v_weak_residual = ((PyArrayObject *)values[2]);
12574  }
12575  goto __pyx_L4_argument_unpacking_done;
12576  __pyx_L5_argtuple_error:;
12577  __Pyx_RaiseArgtupleInvalid("updateDiffusion_weak", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3215, __pyx_L3_error)
12578  __pyx_L3_error:;
12579  __Pyx_AddTraceback("cfemIntegrals.updateDiffusion_weak", __pyx_clineno, __pyx_lineno, __pyx_filename);
12580  __Pyx_RefNannyFinishContext();
12581  return NULL;
12582  __pyx_L4_argument_unpacking_done:;
12583  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1, "a", 0))) __PYX_ERR(0, 3215, __pyx_L1_error)
12584  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_phi_X_grad_w_dV), __pyx_ptype_5numpy_ndarray, 1, "grad_phi_X_grad_w_dV", 0))) __PYX_ERR(0, 3216, __pyx_L1_error)
12585  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_weak_residual), __pyx_ptype_5numpy_ndarray, 1, "weak_residual", 0))) __PYX_ERR(0, 3217, __pyx_L1_error)
12586  __pyx_r = __pyx_pf_13cfemIntegrals_98updateDiffusion_weak(__pyx_self, __pyx_v_a, __pyx_v_grad_phi_X_grad_w_dV, __pyx_v_weak_residual);
12587 
12588  /* function exit code */
12589  goto __pyx_L0;
12590  __pyx_L1_error:;
12591  __pyx_r = NULL;
12592  __pyx_L0:;
12593  __Pyx_RefNannyFinishContext();
12594  return __pyx_r;
12595 }
12596 
12597 static PyObject *__pyx_pf_13cfemIntegrals_98updateDiffusion_weak(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_grad_phi_X_grad_w_dV, PyArrayObject *__pyx_v_weak_residual) {
12598  int __pyx_v_nElements_global;
12599  int __pyx_v_nQuadraturePoints_element;
12600  int __pyx_v_nDOF_test_element;
12601  int __pyx_v_nSpace;
12602  PyObject *__pyx_r = NULL;
12603  __Pyx_RefNannyDeclarations
12604  __Pyx_RefNannySetupContext("updateDiffusion_weak", 0);
12605 
12606  /* "cfemIntegrals.pyx":3218
12607  * np.ndarray grad_phi_X_grad_w_dV,
12608  * np.ndarray weak_residual):
12609  * cdef int nElements_global = grad_phi_X_grad_w_dV.shape[0] # <<<<<<<<<<<<<<
12610  * cdef int nQuadraturePoints_element = grad_phi_X_grad_w_dV.shape[1]
12611  * cdef int nDOF_test_element = grad_phi_X_grad_w_dV.shape[2]
12612  */
12613  __pyx_v_nElements_global = (__pyx_v_grad_phi_X_grad_w_dV->dimensions[0]);
12614 
12615  /* "cfemIntegrals.pyx":3219
12616  * np.ndarray weak_residual):
12617  * cdef int nElements_global = grad_phi_X_grad_w_dV.shape[0]
12618  * cdef int nQuadraturePoints_element = grad_phi_X_grad_w_dV.shape[1] # <<<<<<<<<<<<<<
12619  * cdef int nDOF_test_element = grad_phi_X_grad_w_dV.shape[2]
12620  * cdef int nSpace = grad_phi_X_grad_w_dV.shape[3]
12621  */
12622  __pyx_v_nQuadraturePoints_element = (__pyx_v_grad_phi_X_grad_w_dV->dimensions[1]);
12623 
12624  /* "cfemIntegrals.pyx":3220
12625  * cdef int nElements_global = grad_phi_X_grad_w_dV.shape[0]
12626  * cdef int nQuadraturePoints_element = grad_phi_X_grad_w_dV.shape[1]
12627  * cdef int nDOF_test_element = grad_phi_X_grad_w_dV.shape[2] # <<<<<<<<<<<<<<
12628  * cdef int nSpace = grad_phi_X_grad_w_dV.shape[3]
12629  * cupdateDiffusion_weak(nElements_global,
12630  */
12631  __pyx_v_nDOF_test_element = (__pyx_v_grad_phi_X_grad_w_dV->dimensions[2]);
12632 
12633  /* "cfemIntegrals.pyx":3221
12634  * cdef int nQuadraturePoints_element = grad_phi_X_grad_w_dV.shape[1]
12635  * cdef int nDOF_test_element = grad_phi_X_grad_w_dV.shape[2]
12636  * cdef int nSpace = grad_phi_X_grad_w_dV.shape[3] # <<<<<<<<<<<<<<
12637  * cupdateDiffusion_weak(nElements_global,
12638  * nQuadraturePoints_element,
12639  */
12640  __pyx_v_nSpace = (__pyx_v_grad_phi_X_grad_w_dV->dimensions[3]);
12641 
12642  /* "cfemIntegrals.pyx":3222
12643  * cdef int nDOF_test_element = grad_phi_X_grad_w_dV.shape[2]
12644  * cdef int nSpace = grad_phi_X_grad_w_dV.shape[3]
12645  * cupdateDiffusion_weak(nElements_global, # <<<<<<<<<<<<<<
12646  * nQuadraturePoints_element,
12647  * nDOF_test_element,
12648  */
12649  updateDiffusion_weak(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_test_element, __pyx_v_nSpace, ((double *)__pyx_v_a->data), ((double *)__pyx_v_grad_phi_X_grad_w_dV->data), ((double *)__pyx_v_weak_residual->data));
12650 
12651  /* "cfemIntegrals.pyx":3215
12652  * <double*>grad_w_dV.data,
12653  * <double*>Lstar_w_dV.data)
12654  * def updateDiffusion_weak(np.ndarray a, # <<<<<<<<<<<<<<
12655  * np.ndarray grad_phi_X_grad_w_dV,
12656  * np.ndarray weak_residual):
12657  */
12658 
12659  /* function exit code */
12660  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
12661  __Pyx_XGIVEREF(__pyx_r);
12662  __Pyx_RefNannyFinishContext();
12663  return __pyx_r;
12664 }
12665 
12666 /* "cfemIntegrals.pyx":3229
12667  * <double*>grad_phi_X_grad_w_dV.data,
12668  * <double*>weak_residual.data)
12669  * def updateDiffusion_weak_lowmem(np.ndarray a, # <<<<<<<<<<<<<<
12670  * np.ndarray grad_phi,
12671  * np.ndarray grad_w_dV,
12672  */
12673 
12674 /* Python wrapper */
12675 static PyObject *__pyx_pw_13cfemIntegrals_101updateDiffusion_weak_lowmem(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12676 static PyMethodDef __pyx_mdef_13cfemIntegrals_101updateDiffusion_weak_lowmem = {"updateDiffusion_weak_lowmem", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_101updateDiffusion_weak_lowmem, METH_VARARGS|METH_KEYWORDS, 0};
12677 static PyObject *__pyx_pw_13cfemIntegrals_101updateDiffusion_weak_lowmem(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
12678  PyArrayObject *__pyx_v_a = 0;
12679  PyArrayObject *__pyx_v_grad_phi = 0;
12680  PyArrayObject *__pyx_v_grad_w_dV = 0;
12681  PyArrayObject *__pyx_v_weak_residual = 0;
12682  int __pyx_lineno = 0;
12683  const char *__pyx_filename = NULL;
12684  int __pyx_clineno = 0;
12685  PyObject *__pyx_r = 0;
12686  __Pyx_RefNannyDeclarations
12687  __Pyx_RefNannySetupContext("updateDiffusion_weak_lowmem (wrapper)", 0);
12688  {
12689  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_a,&__pyx_n_s_grad_phi,&__pyx_n_s_grad_w_dV,&__pyx_n_s_weak_residual,0};
12690  PyObject* values[4] = {0,0,0,0};
12691  if (unlikely(__pyx_kwds)) {
12692  Py_ssize_t kw_args;
12693  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
12694  switch (pos_args) {
12695  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
12696  CYTHON_FALLTHROUGH;
12697  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
12698  CYTHON_FALLTHROUGH;
12699  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12700  CYTHON_FALLTHROUGH;
12701  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12702  CYTHON_FALLTHROUGH;
12703  case 0: break;
12704  default: goto __pyx_L5_argtuple_error;
12705  }
12706  kw_args = PyDict_Size(__pyx_kwds);
12707  switch (pos_args) {
12708  case 0:
12709  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
12710  else goto __pyx_L5_argtuple_error;
12711  CYTHON_FALLTHROUGH;
12712  case 1:
12713  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_phi)) != 0)) kw_args--;
12714  else {
12715  __Pyx_RaiseArgtupleInvalid("updateDiffusion_weak_lowmem", 1, 4, 4, 1); __PYX_ERR(0, 3229, __pyx_L3_error)
12716  }
12717  CYTHON_FALLTHROUGH;
12718  case 2:
12719  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_w_dV)) != 0)) kw_args--;
12720  else {
12721  __Pyx_RaiseArgtupleInvalid("updateDiffusion_weak_lowmem", 1, 4, 4, 2); __PYX_ERR(0, 3229, __pyx_L3_error)
12722  }
12723  CYTHON_FALLTHROUGH;
12724  case 3:
12725  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weak_residual)) != 0)) kw_args--;
12726  else {
12727  __Pyx_RaiseArgtupleInvalid("updateDiffusion_weak_lowmem", 1, 4, 4, 3); __PYX_ERR(0, 3229, __pyx_L3_error)
12728  }
12729  }
12730  if (unlikely(kw_args > 0)) {
12731  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateDiffusion_weak_lowmem") < 0)) __PYX_ERR(0, 3229, __pyx_L3_error)
12732  }
12733  } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
12734  goto __pyx_L5_argtuple_error;
12735  } else {
12736  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12737  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12738  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
12739  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
12740  }
12741  __pyx_v_a = ((PyArrayObject *)values[0]);
12742  __pyx_v_grad_phi = ((PyArrayObject *)values[1]);
12743  __pyx_v_grad_w_dV = ((PyArrayObject *)values[2]);
12744  __pyx_v_weak_residual = ((PyArrayObject *)values[3]);
12745  }
12746  goto __pyx_L4_argument_unpacking_done;
12747  __pyx_L5_argtuple_error:;
12748  __Pyx_RaiseArgtupleInvalid("updateDiffusion_weak_lowmem", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3229, __pyx_L3_error)
12749  __pyx_L3_error:;
12750  __Pyx_AddTraceback("cfemIntegrals.updateDiffusion_weak_lowmem", __pyx_clineno, __pyx_lineno, __pyx_filename);
12751  __Pyx_RefNannyFinishContext();
12752  return NULL;
12753  __pyx_L4_argument_unpacking_done:;
12754  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1, "a", 0))) __PYX_ERR(0, 3229, __pyx_L1_error)
12755  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_phi), __pyx_ptype_5numpy_ndarray, 1, "grad_phi", 0))) __PYX_ERR(0, 3230, __pyx_L1_error)
12756  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_w_dV), __pyx_ptype_5numpy_ndarray, 1, "grad_w_dV", 0))) __PYX_ERR(0, 3231, __pyx_L1_error)
12757  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_weak_residual), __pyx_ptype_5numpy_ndarray, 1, "weak_residual", 0))) __PYX_ERR(0, 3232, __pyx_L1_error)
12758  __pyx_r = __pyx_pf_13cfemIntegrals_100updateDiffusion_weak_lowmem(__pyx_self, __pyx_v_a, __pyx_v_grad_phi, __pyx_v_grad_w_dV, __pyx_v_weak_residual);
12759 
12760  /* function exit code */
12761  goto __pyx_L0;
12762  __pyx_L1_error:;
12763  __pyx_r = NULL;
12764  __pyx_L0:;
12765  __Pyx_RefNannyFinishContext();
12766  return __pyx_r;
12767 }
12768 
12769 static PyObject *__pyx_pf_13cfemIntegrals_100updateDiffusion_weak_lowmem(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_grad_phi, PyArrayObject *__pyx_v_grad_w_dV, PyArrayObject *__pyx_v_weak_residual) {
12770  npy_intp __pyx_v_nElements_global;
12771  npy_intp __pyx_v_nQuadraturePoints_element;
12772  npy_intp __pyx_v_nDOF_test_element;
12773  npy_intp __pyx_v_nSpace;
12774  PyObject *__pyx_r = NULL;
12775  __Pyx_RefNannyDeclarations
12776  __Pyx_RefNannySetupContext("updateDiffusion_weak_lowmem", 0);
12777 
12778  /* "cfemIntegrals.pyx":3233
12779  * np.ndarray grad_w_dV,
12780  * np.ndarray weak_residual):
12781  * nElements_global = grad_w_dV.shape[0] # <<<<<<<<<<<<<<
12782  * nQuadraturePoints_element = grad_w_dV.shape[1]
12783  * nDOF_test_element = grad_w_dV.shape[2]
12784  */
12785  __pyx_v_nElements_global = (__pyx_v_grad_w_dV->dimensions[0]);
12786 
12787  /* "cfemIntegrals.pyx":3234
12788  * np.ndarray weak_residual):
12789  * nElements_global = grad_w_dV.shape[0]
12790  * nQuadraturePoints_element = grad_w_dV.shape[1] # <<<<<<<<<<<<<<
12791  * nDOF_test_element = grad_w_dV.shape[2]
12792  * nSpace = grad_w_dV.shape[3]
12793  */
12794  __pyx_v_nQuadraturePoints_element = (__pyx_v_grad_w_dV->dimensions[1]);
12795 
12796  /* "cfemIntegrals.pyx":3235
12797  * nElements_global = grad_w_dV.shape[0]
12798  * nQuadraturePoints_element = grad_w_dV.shape[1]
12799  * nDOF_test_element = grad_w_dV.shape[2] # <<<<<<<<<<<<<<
12800  * nSpace = grad_w_dV.shape[3]
12801  * cupdateDiffusion_weak_lowmem(nElements_global,
12802  */
12803  __pyx_v_nDOF_test_element = (__pyx_v_grad_w_dV->dimensions[2]);
12804 
12805  /* "cfemIntegrals.pyx":3236
12806  * nQuadraturePoints_element = grad_w_dV.shape[1]
12807  * nDOF_test_element = grad_w_dV.shape[2]
12808  * nSpace = grad_w_dV.shape[3] # <<<<<<<<<<<<<<
12809  * cupdateDiffusion_weak_lowmem(nElements_global,
12810  * nQuadraturePoints_element,
12811  */
12812  __pyx_v_nSpace = (__pyx_v_grad_w_dV->dimensions[3]);
12813 
12814  /* "cfemIntegrals.pyx":3237
12815  * nDOF_test_element = grad_w_dV.shape[2]
12816  * nSpace = grad_w_dV.shape[3]
12817  * cupdateDiffusion_weak_lowmem(nElements_global, # <<<<<<<<<<<<<<
12818  * nQuadraturePoints_element,
12819  * nDOF_test_element,
12820  */
12821  updateDiffusion_weak_lowmem(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_test_element, __pyx_v_nSpace, ((double *)__pyx_v_a->data), ((double *)__pyx_v_grad_phi->data), ((double *)__pyx_v_grad_w_dV->data), ((double *)__pyx_v_weak_residual->data));
12822 
12823  /* "cfemIntegrals.pyx":3229
12824  * <double*>grad_phi_X_grad_w_dV.data,
12825  * <double*>weak_residual.data)
12826  * def updateDiffusion_weak_lowmem(np.ndarray a, # <<<<<<<<<<<<<<
12827  * np.ndarray grad_phi,
12828  * np.ndarray grad_w_dV,
12829  */
12830 
12831  /* function exit code */
12832  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
12833  __Pyx_XGIVEREF(__pyx_r);
12834  __Pyx_RefNannyFinishContext();
12835  return __pyx_r;
12836 }
12837 
12838 /* "cfemIntegrals.pyx":3245
12839  * <double*> grad_w_dV.data,
12840  * <double*> weak_residual.data)
12841  * def updateDiffusion_weak_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
12842  * np.ndarray colind,
12843  * np.ndarray a,
12844  */
12845 
12846 /* Python wrapper */
12847 static PyObject *__pyx_pw_13cfemIntegrals_103updateDiffusion_weak_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12848 static PyMethodDef __pyx_mdef_13cfemIntegrals_103updateDiffusion_weak_sd = {"updateDiffusion_weak_sd", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_103updateDiffusion_weak_sd, METH_VARARGS|METH_KEYWORDS, 0};
12849 static PyObject *__pyx_pw_13cfemIntegrals_103updateDiffusion_weak_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
12850  PyArrayObject *__pyx_v_rowptr = 0;
12851  PyArrayObject *__pyx_v_colind = 0;
12852  PyArrayObject *__pyx_v_a = 0;
12853  PyArrayObject *__pyx_v_grad_phi = 0;
12854  PyArrayObject *__pyx_v_grad_w_dV = 0;
12855  PyArrayObject *__pyx_v_weak_residual = 0;
12856  int __pyx_lineno = 0;
12857  const char *__pyx_filename = NULL;
12858  int __pyx_clineno = 0;
12859  PyObject *__pyx_r = 0;
12860  __Pyx_RefNannyDeclarations
12861  __Pyx_RefNannySetupContext("updateDiffusion_weak_sd (wrapper)", 0);
12862  {
12863  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rowptr,&__pyx_n_s_colind,&__pyx_n_s_a,&__pyx_n_s_grad_phi,&__pyx_n_s_grad_w_dV,&__pyx_n_s_weak_residual,0};
12864  PyObject* values[6] = {0,0,0,0,0,0};
12865  if (unlikely(__pyx_kwds)) {
12866  Py_ssize_t kw_args;
12867  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
12868  switch (pos_args) {
12869  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
12870  CYTHON_FALLTHROUGH;
12871  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
12872  CYTHON_FALLTHROUGH;
12873  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
12874  CYTHON_FALLTHROUGH;
12875  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
12876  CYTHON_FALLTHROUGH;
12877  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12878  CYTHON_FALLTHROUGH;
12879  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12880  CYTHON_FALLTHROUGH;
12881  case 0: break;
12882  default: goto __pyx_L5_argtuple_error;
12883  }
12884  kw_args = PyDict_Size(__pyx_kwds);
12885  switch (pos_args) {
12886  case 0:
12887  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rowptr)) != 0)) kw_args--;
12888  else goto __pyx_L5_argtuple_error;
12889  CYTHON_FALLTHROUGH;
12890  case 1:
12891  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_colind)) != 0)) kw_args--;
12892  else {
12893  __Pyx_RaiseArgtupleInvalid("updateDiffusion_weak_sd", 1, 6, 6, 1); __PYX_ERR(0, 3245, __pyx_L3_error)
12894  }
12895  CYTHON_FALLTHROUGH;
12896  case 2:
12897  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
12898  else {
12899  __Pyx_RaiseArgtupleInvalid("updateDiffusion_weak_sd", 1, 6, 6, 2); __PYX_ERR(0, 3245, __pyx_L3_error)
12900  }
12901  CYTHON_FALLTHROUGH;
12902  case 3:
12903  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_phi)) != 0)) kw_args--;
12904  else {
12905  __Pyx_RaiseArgtupleInvalid("updateDiffusion_weak_sd", 1, 6, 6, 3); __PYX_ERR(0, 3245, __pyx_L3_error)
12906  }
12907  CYTHON_FALLTHROUGH;
12908  case 4:
12909  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_w_dV)) != 0)) kw_args--;
12910  else {
12911  __Pyx_RaiseArgtupleInvalid("updateDiffusion_weak_sd", 1, 6, 6, 4); __PYX_ERR(0, 3245, __pyx_L3_error)
12912  }
12913  CYTHON_FALLTHROUGH;
12914  case 5:
12915  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weak_residual)) != 0)) kw_args--;
12916  else {
12917  __Pyx_RaiseArgtupleInvalid("updateDiffusion_weak_sd", 1, 6, 6, 5); __PYX_ERR(0, 3245, __pyx_L3_error)
12918  }
12919  }
12920  if (unlikely(kw_args > 0)) {
12921  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateDiffusion_weak_sd") < 0)) __PYX_ERR(0, 3245, __pyx_L3_error)
12922  }
12923  } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
12924  goto __pyx_L5_argtuple_error;
12925  } else {
12926  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12927  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12928  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
12929  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
12930  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
12931  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
12932  }
12933  __pyx_v_rowptr = ((PyArrayObject *)values[0]);
12934  __pyx_v_colind = ((PyArrayObject *)values[1]);
12935  __pyx_v_a = ((PyArrayObject *)values[2]);
12936  __pyx_v_grad_phi = ((PyArrayObject *)values[3]);
12937  __pyx_v_grad_w_dV = ((PyArrayObject *)values[4]);
12938  __pyx_v_weak_residual = ((PyArrayObject *)values[5]);
12939  }
12940  goto __pyx_L4_argument_unpacking_done;
12941  __pyx_L5_argtuple_error:;
12942  __Pyx_RaiseArgtupleInvalid("updateDiffusion_weak_sd", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3245, __pyx_L3_error)
12943  __pyx_L3_error:;
12944  __Pyx_AddTraceback("cfemIntegrals.updateDiffusion_weak_sd", __pyx_clineno, __pyx_lineno, __pyx_filename);
12945  __Pyx_RefNannyFinishContext();
12946  return NULL;
12947  __pyx_L4_argument_unpacking_done:;
12948  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rowptr), __pyx_ptype_5numpy_ndarray, 1, "rowptr", 0))) __PYX_ERR(0, 3245, __pyx_L1_error)
12949  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_colind), __pyx_ptype_5numpy_ndarray, 1, "colind", 0))) __PYX_ERR(0, 3246, __pyx_L1_error)
12950  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1, "a", 0))) __PYX_ERR(0, 3247, __pyx_L1_error)
12951  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_phi), __pyx_ptype_5numpy_ndarray, 1, "grad_phi", 0))) __PYX_ERR(0, 3248, __pyx_L1_error)
12952  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_w_dV), __pyx_ptype_5numpy_ndarray, 1, "grad_w_dV", 0))) __PYX_ERR(0, 3249, __pyx_L1_error)
12953  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_weak_residual), __pyx_ptype_5numpy_ndarray, 1, "weak_residual", 0))) __PYX_ERR(0, 3250, __pyx_L1_error)
12954  __pyx_r = __pyx_pf_13cfemIntegrals_102updateDiffusion_weak_sd(__pyx_self, __pyx_v_rowptr, __pyx_v_colind, __pyx_v_a, __pyx_v_grad_phi, __pyx_v_grad_w_dV, __pyx_v_weak_residual);
12955 
12956  /* function exit code */
12957  goto __pyx_L0;
12958  __pyx_L1_error:;
12959  __pyx_r = NULL;
12960  __pyx_L0:;
12961  __Pyx_RefNannyFinishContext();
12962  return __pyx_r;
12963 }
12964 
12965 static PyObject *__pyx_pf_13cfemIntegrals_102updateDiffusion_weak_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_grad_phi, PyArrayObject *__pyx_v_grad_w_dV, PyArrayObject *__pyx_v_weak_residual) {
12966  int __pyx_v_nElements_global;
12967  int __pyx_v_nQuadraturePoints_element;
12968  int __pyx_v_nDOF_test_element;
12969  int __pyx_v_nSpace;
12970  PyObject *__pyx_r = NULL;
12971  __Pyx_RefNannyDeclarations
12972  __Pyx_RefNannySetupContext("updateDiffusion_weak_sd", 0);
12973 
12974  /* "cfemIntegrals.pyx":3251
12975  * np.ndarray grad_w_dV,
12976  * np.ndarray weak_residual):
12977  * cdef int nElements_global = grad_w_dV.shape[0] # <<<<<<<<<<<<<<
12978  * cdef int nQuadraturePoints_element = grad_w_dV.shape[1]
12979  * cdef int nDOF_test_element = grad_w_dV.shape[2]
12980  */
12981  __pyx_v_nElements_global = (__pyx_v_grad_w_dV->dimensions[0]);
12982 
12983  /* "cfemIntegrals.pyx":3252
12984  * np.ndarray weak_residual):
12985  * cdef int nElements_global = grad_w_dV.shape[0]
12986  * cdef int nQuadraturePoints_element = grad_w_dV.shape[1] # <<<<<<<<<<<<<<
12987  * cdef int nDOF_test_element = grad_w_dV.shape[2]
12988  * cdef int nSpace = grad_w_dV.shape[3]
12989  */
12990  __pyx_v_nQuadraturePoints_element = (__pyx_v_grad_w_dV->dimensions[1]);
12991 
12992  /* "cfemIntegrals.pyx":3253
12993  * cdef int nElements_global = grad_w_dV.shape[0]
12994  * cdef int nQuadraturePoints_element = grad_w_dV.shape[1]
12995  * cdef int nDOF_test_element = grad_w_dV.shape[2] # <<<<<<<<<<<<<<
12996  * cdef int nSpace = grad_w_dV.shape[3]
12997  * cupdateDiffusion_weak_sd(nElements_global,
12998  */
12999  __pyx_v_nDOF_test_element = (__pyx_v_grad_w_dV->dimensions[2]);
13000 
13001  /* "cfemIntegrals.pyx":3254
13002  * cdef int nQuadraturePoints_element = grad_w_dV.shape[1]
13003  * cdef int nDOF_test_element = grad_w_dV.shape[2]
13004  * cdef int nSpace = grad_w_dV.shape[3] # <<<<<<<<<<<<<<
13005  * cupdateDiffusion_weak_sd(nElements_global,
13006  * nQuadraturePoints_element,
13007  */
13008  __pyx_v_nSpace = (__pyx_v_grad_w_dV->dimensions[3]);
13009 
13010  /* "cfemIntegrals.pyx":3255
13011  * cdef int nDOF_test_element = grad_w_dV.shape[2]
13012  * cdef int nSpace = grad_w_dV.shape[3]
13013  * cupdateDiffusion_weak_sd(nElements_global, # <<<<<<<<<<<<<<
13014  * nQuadraturePoints_element,
13015  * nDOF_test_element,
13016  */
13017  updateDiffusion_weak_sd(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_test_element, __pyx_v_nSpace, ((int *)__pyx_v_rowptr->data), ((int *)__pyx_v_colind->data), ((double *)__pyx_v_a->data), ((double *)__pyx_v_grad_phi->data), ((double *)__pyx_v_grad_w_dV->data), ((double *)__pyx_v_weak_residual->data));
13018 
13019  /* "cfemIntegrals.pyx":3245
13020  * <double*> grad_w_dV.data,
13021  * <double*> weak_residual.data)
13022  * def updateDiffusion_weak_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
13023  * np.ndarray colind,
13024  * np.ndarray a,
13025  */
13026 
13027  /* function exit code */
13028  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
13029  __Pyx_XGIVEREF(__pyx_r);
13030  __Pyx_RefNannyFinishContext();
13031  return __pyx_r;
13032 }
13033 
13034 /* "cfemIntegrals.pyx":3265
13035  * <double*> grad_w_dV.data,
13036  * <double*> weak_residual.data)
13037  * def updateDiffusionJacobian_weak(np.ndarray l2g, # <<<<<<<<<<<<<<
13038  * np.ndarray a,
13039  * np.ndarray da,
13040  */
13041 
13042 /* Python wrapper */
13043 static PyObject *__pyx_pw_13cfemIntegrals_105updateDiffusionJacobian_weak(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13044 static PyMethodDef __pyx_mdef_13cfemIntegrals_105updateDiffusionJacobian_weak = {"updateDiffusionJacobian_weak", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_105updateDiffusionJacobian_weak, METH_VARARGS|METH_KEYWORDS, 0};
13045 static PyObject *__pyx_pw_13cfemIntegrals_105updateDiffusionJacobian_weak(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13046  PyArrayObject *__pyx_v_l2g = 0;
13047  PyArrayObject *__pyx_v_a = 0;
13048  PyArrayObject *__pyx_v_da = 0;
13049  PyArrayObject *__pyx_v_grad_phi_X_grad_w_dV = 0;
13050  PyArrayObject *__pyx_v_dphi = 0;
13051  PyArrayObject *__pyx_v_v = 0;
13052  PyArrayObject *__pyx_v_grad_v_X_grad_w_dV = 0;
13053  PyArrayObject *__pyx_v_jacobian_weak_residual = 0;
13054  int __pyx_lineno = 0;
13055  const char *__pyx_filename = NULL;
13056  int __pyx_clineno = 0;
13057  PyObject *__pyx_r = 0;
13058  __Pyx_RefNannyDeclarations
13059  __Pyx_RefNannySetupContext("updateDiffusionJacobian_weak (wrapper)", 0);
13060  {
13061  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_l2g,&__pyx_n_s_a,&__pyx_n_s_da,&__pyx_n_s_grad_phi_X_grad_w_dV,&__pyx_n_s_dphi,&__pyx_n_s_v,&__pyx_n_s_grad_v_X_grad_w_dV,&__pyx_n_s_jacobian_weak_residual,0};
13062  PyObject* values[8] = {0,0,0,0,0,0,0,0};
13063  if (unlikely(__pyx_kwds)) {
13064  Py_ssize_t kw_args;
13065  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
13066  switch (pos_args) {
13067  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
13068  CYTHON_FALLTHROUGH;
13069  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
13070  CYTHON_FALLTHROUGH;
13071  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
13072  CYTHON_FALLTHROUGH;
13073  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
13074  CYTHON_FALLTHROUGH;
13075  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
13076  CYTHON_FALLTHROUGH;
13077  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
13078  CYTHON_FALLTHROUGH;
13079  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13080  CYTHON_FALLTHROUGH;
13081  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13082  CYTHON_FALLTHROUGH;
13083  case 0: break;
13084  default: goto __pyx_L5_argtuple_error;
13085  }
13086  kw_args = PyDict_Size(__pyx_kwds);
13087  switch (pos_args) {
13088  case 0:
13089  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_l2g)) != 0)) kw_args--;
13090  else goto __pyx_L5_argtuple_error;
13091  CYTHON_FALLTHROUGH;
13092  case 1:
13093  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
13094  else {
13095  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_weak", 1, 8, 8, 1); __PYX_ERR(0, 3265, __pyx_L3_error)
13096  }
13097  CYTHON_FALLTHROUGH;
13098  case 2:
13099  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_da)) != 0)) kw_args--;
13100  else {
13101  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_weak", 1, 8, 8, 2); __PYX_ERR(0, 3265, __pyx_L3_error)
13102  }
13103  CYTHON_FALLTHROUGH;
13104  case 3:
13105  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_phi_X_grad_w_dV)) != 0)) kw_args--;
13106  else {
13107  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_weak", 1, 8, 8, 3); __PYX_ERR(0, 3265, __pyx_L3_error)
13108  }
13109  CYTHON_FALLTHROUGH;
13110  case 4:
13111  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dphi)) != 0)) kw_args--;
13112  else {
13113  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_weak", 1, 8, 8, 4); __PYX_ERR(0, 3265, __pyx_L3_error)
13114  }
13115  CYTHON_FALLTHROUGH;
13116  case 5:
13117  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
13118  else {
13119  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_weak", 1, 8, 8, 5); __PYX_ERR(0, 3265, __pyx_L3_error)
13120  }
13121  CYTHON_FALLTHROUGH;
13122  case 6:
13123  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_v_X_grad_w_dV)) != 0)) kw_args--;
13124  else {
13125  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_weak", 1, 8, 8, 6); __PYX_ERR(0, 3265, __pyx_L3_error)
13126  }
13127  CYTHON_FALLTHROUGH;
13128  case 7:
13129  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jacobian_weak_residual)) != 0)) kw_args--;
13130  else {
13131  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_weak", 1, 8, 8, 7); __PYX_ERR(0, 3265, __pyx_L3_error)
13132  }
13133  }
13134  if (unlikely(kw_args > 0)) {
13135  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateDiffusionJacobian_weak") < 0)) __PYX_ERR(0, 3265, __pyx_L3_error)
13136  }
13137  } else if (PyTuple_GET_SIZE(__pyx_args) != 8) {
13138  goto __pyx_L5_argtuple_error;
13139  } else {
13140  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13141  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13142  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
13143  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
13144  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
13145  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
13146  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
13147  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
13148  }
13149  __pyx_v_l2g = ((PyArrayObject *)values[0]);
13150  __pyx_v_a = ((PyArrayObject *)values[1]);
13151  __pyx_v_da = ((PyArrayObject *)values[2]);
13152  __pyx_v_grad_phi_X_grad_w_dV = ((PyArrayObject *)values[3]);
13153  __pyx_v_dphi = ((PyArrayObject *)values[4]);
13154  __pyx_v_v = ((PyArrayObject *)values[5]);
13155  __pyx_v_grad_v_X_grad_w_dV = ((PyArrayObject *)values[6]);
13156  __pyx_v_jacobian_weak_residual = ((PyArrayObject *)values[7]);
13157  }
13158  goto __pyx_L4_argument_unpacking_done;
13159  __pyx_L5_argtuple_error:;
13160  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_weak", 1, 8, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3265, __pyx_L3_error)
13161  __pyx_L3_error:;
13162  __Pyx_AddTraceback("cfemIntegrals.updateDiffusionJacobian_weak", __pyx_clineno, __pyx_lineno, __pyx_filename);
13163  __Pyx_RefNannyFinishContext();
13164  return NULL;
13165  __pyx_L4_argument_unpacking_done:;
13166  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_l2g), __pyx_ptype_5numpy_ndarray, 1, "l2g", 0))) __PYX_ERR(0, 3265, __pyx_L1_error)
13167  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1, "a", 0))) __PYX_ERR(0, 3266, __pyx_L1_error)
13168  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_da), __pyx_ptype_5numpy_ndarray, 1, "da", 0))) __PYX_ERR(0, 3267, __pyx_L1_error)
13169  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_phi_X_grad_w_dV), __pyx_ptype_5numpy_ndarray, 1, "grad_phi_X_grad_w_dV", 0))) __PYX_ERR(0, 3268, __pyx_L1_error)
13170  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dphi), __pyx_ptype_5numpy_ndarray, 1, "dphi", 0))) __PYX_ERR(0, 3269, __pyx_L1_error)
13171  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), __pyx_ptype_5numpy_ndarray, 1, "v", 0))) __PYX_ERR(0, 3270, __pyx_L1_error)
13172  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_v_X_grad_w_dV), __pyx_ptype_5numpy_ndarray, 1, "grad_v_X_grad_w_dV", 0))) __PYX_ERR(0, 3271, __pyx_L1_error)
13173  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_jacobian_weak_residual), __pyx_ptype_5numpy_ndarray, 1, "jacobian_weak_residual", 0))) __PYX_ERR(0, 3272, __pyx_L1_error)
13174  __pyx_r = __pyx_pf_13cfemIntegrals_104updateDiffusionJacobian_weak(__pyx_self, __pyx_v_l2g, __pyx_v_a, __pyx_v_da, __pyx_v_grad_phi_X_grad_w_dV, __pyx_v_dphi, __pyx_v_v, __pyx_v_grad_v_X_grad_w_dV, __pyx_v_jacobian_weak_residual);
13175 
13176  /* function exit code */
13177  goto __pyx_L0;
13178  __pyx_L1_error:;
13179  __pyx_r = NULL;
13180  __pyx_L0:;
13181  __Pyx_RefNannyFinishContext();
13182  return __pyx_r;
13183 }
13184 
13185 static PyObject *__pyx_pf_13cfemIntegrals_104updateDiffusionJacobian_weak(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_da, PyArrayObject *__pyx_v_grad_phi_X_grad_w_dV, PyArrayObject *__pyx_v_dphi, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_grad_v_X_grad_w_dV, PyArrayObject *__pyx_v_jacobian_weak_residual) {
13186  int __pyx_v_nElements_global;
13187  int __pyx_v_nQuadraturePoints_element;
13188  int __pyx_v_nDOF_trial_element;
13189  int __pyx_v_nDOF_test_element;
13190  int __pyx_v_nSpace;
13191  PyObject *__pyx_r = NULL;
13192  __Pyx_RefNannyDeclarations
13193  __Pyx_RefNannySetupContext("updateDiffusionJacobian_weak", 0);
13194 
13195  /* "cfemIntegrals.pyx":3273
13196  * np.ndarray grad_v_X_grad_w_dV,
13197  * np.ndarray jacobian_weak_residual):
13198  * cdef int nElements_global = grad_v_X_grad_w_dV.shape[0] # <<<<<<<<<<<<<<
13199  * cdef int nQuadraturePoints_element = grad_v_X_grad_w_dV.shape[1]
13200  * cdef int nDOF_trial_element = grad_v_X_grad_w_dV.shape[2]
13201  */
13202  __pyx_v_nElements_global = (__pyx_v_grad_v_X_grad_w_dV->dimensions[0]);
13203 
13204  /* "cfemIntegrals.pyx":3274
13205  * np.ndarray jacobian_weak_residual):
13206  * cdef int nElements_global = grad_v_X_grad_w_dV.shape[0]
13207  * cdef int nQuadraturePoints_element = grad_v_X_grad_w_dV.shape[1] # <<<<<<<<<<<<<<
13208  * cdef int nDOF_trial_element = grad_v_X_grad_w_dV.shape[2]
13209  * cdef int nDOF_test_element = grad_v_X_grad_w_dV.shape[3]
13210  */
13211  __pyx_v_nQuadraturePoints_element = (__pyx_v_grad_v_X_grad_w_dV->dimensions[1]);
13212 
13213  /* "cfemIntegrals.pyx":3275
13214  * cdef int nElements_global = grad_v_X_grad_w_dV.shape[0]
13215  * cdef int nQuadraturePoints_element = grad_v_X_grad_w_dV.shape[1]
13216  * cdef int nDOF_trial_element = grad_v_X_grad_w_dV.shape[2] # <<<<<<<<<<<<<<
13217  * cdef int nDOF_test_element = grad_v_X_grad_w_dV.shape[3]
13218  * cdef int nSpace = grad_v_X_grad_w_dV.shape[4]
13219  */
13220  __pyx_v_nDOF_trial_element = (__pyx_v_grad_v_X_grad_w_dV->dimensions[2]);
13221 
13222  /* "cfemIntegrals.pyx":3276
13223  * cdef int nQuadraturePoints_element = grad_v_X_grad_w_dV.shape[1]
13224  * cdef int nDOF_trial_element = grad_v_X_grad_w_dV.shape[2]
13225  * cdef int nDOF_test_element = grad_v_X_grad_w_dV.shape[3] # <<<<<<<<<<<<<<
13226  * cdef int nSpace = grad_v_X_grad_w_dV.shape[4]
13227  * cupdateDiffusionJacobian_weak(nElements_global,
13228  */
13229  __pyx_v_nDOF_test_element = (__pyx_v_grad_v_X_grad_w_dV->dimensions[3]);
13230 
13231  /* "cfemIntegrals.pyx":3277
13232  * cdef int nDOF_trial_element = grad_v_X_grad_w_dV.shape[2]
13233  * cdef int nDOF_test_element = grad_v_X_grad_w_dV.shape[3]
13234  * cdef int nSpace = grad_v_X_grad_w_dV.shape[4] # <<<<<<<<<<<<<<
13235  * cupdateDiffusionJacobian_weak(nElements_global,
13236  * nQuadraturePoints_element,
13237  */
13238  __pyx_v_nSpace = (__pyx_v_grad_v_X_grad_w_dV->dimensions[4]);
13239 
13240  /* "cfemIntegrals.pyx":3278
13241  * cdef int nDOF_test_element = grad_v_X_grad_w_dV.shape[3]
13242  * cdef int nSpace = grad_v_X_grad_w_dV.shape[4]
13243  * cupdateDiffusionJacobian_weak(nElements_global, # <<<<<<<<<<<<<<
13244  * nQuadraturePoints_element,
13245  * nDOF_trial_element,
13246  */
13247  updateDiffusionJacobian_weak(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_trial_element, __pyx_v_nDOF_test_element, __pyx_v_nSpace, ((int *)__pyx_v_l2g->data), ((double *)__pyx_v_a->data), ((double *)__pyx_v_da->data), ((double *)__pyx_v_grad_phi_X_grad_w_dV->data), ((double *)__pyx_v_dphi->data), ((double *)__pyx_v_v->data), ((double *)__pyx_v_grad_v_X_grad_w_dV->data), ((double *)__pyx_v_jacobian_weak_residual->data));
13248 
13249  /* "cfemIntegrals.pyx":3265
13250  * <double*> grad_w_dV.data,
13251  * <double*> weak_residual.data)
13252  * def updateDiffusionJacobian_weak(np.ndarray l2g, # <<<<<<<<<<<<<<
13253  * np.ndarray a,
13254  * np.ndarray da,
13255  */
13256 
13257  /* function exit code */
13258  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
13259  __Pyx_XGIVEREF(__pyx_r);
13260  __Pyx_RefNannyFinishContext();
13261  return __pyx_r;
13262 }
13263 
13264 /* "cfemIntegrals.pyx":3291
13265  * <double*>grad_v_X_grad_w_dV.data,
13266  * <double*>jacobian_weak_residual.data)
13267  * def updateDiffusionJacobian_weak_lowmem(np.ndarray l2g, # <<<<<<<<<<<<<<
13268  * np.ndarray a,
13269  * np.ndarray da,
13270  */
13271 
13272 /* Python wrapper */
13273 static PyObject *__pyx_pw_13cfemIntegrals_107updateDiffusionJacobian_weak_lowmem(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13274 static PyMethodDef __pyx_mdef_13cfemIntegrals_107updateDiffusionJacobian_weak_lowmem = {"updateDiffusionJacobian_weak_lowmem", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_107updateDiffusionJacobian_weak_lowmem, METH_VARARGS|METH_KEYWORDS, 0};
13275 static PyObject *__pyx_pw_13cfemIntegrals_107updateDiffusionJacobian_weak_lowmem(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13276  PyArrayObject *__pyx_v_l2g = 0;
13277  PyArrayObject *__pyx_v_a = 0;
13278  PyArrayObject *__pyx_v_da = 0;
13279  PyArrayObject *__pyx_v_grad_phi = 0;
13280  PyArrayObject *__pyx_v_grad_w_dV = 0;
13281  PyArrayObject *__pyx_v_dphi = 0;
13282  PyArrayObject *__pyx_v_v = 0;
13283  PyArrayObject *__pyx_v_grad_v = 0;
13284  PyArrayObject *__pyx_v_jacobian_weak_residual = 0;
13285  int __pyx_lineno = 0;
13286  const char *__pyx_filename = NULL;
13287  int __pyx_clineno = 0;
13288  PyObject *__pyx_r = 0;
13289  __Pyx_RefNannyDeclarations
13290  __Pyx_RefNannySetupContext("updateDiffusionJacobian_weak_lowmem (wrapper)", 0);
13291  {
13292  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_l2g,&__pyx_n_s_a,&__pyx_n_s_da,&__pyx_n_s_grad_phi,&__pyx_n_s_grad_w_dV,&__pyx_n_s_dphi,&__pyx_n_s_v,&__pyx_n_s_grad_v,&__pyx_n_s_jacobian_weak_residual,0};
13293  PyObject* values[9] = {0,0,0,0,0,0,0,0,0};
13294  if (unlikely(__pyx_kwds)) {
13295  Py_ssize_t kw_args;
13296  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
13297  switch (pos_args) {
13298  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
13299  CYTHON_FALLTHROUGH;
13300  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
13301  CYTHON_FALLTHROUGH;
13302  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
13303  CYTHON_FALLTHROUGH;
13304  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
13305  CYTHON_FALLTHROUGH;
13306  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
13307  CYTHON_FALLTHROUGH;
13308  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
13309  CYTHON_FALLTHROUGH;
13310  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
13311  CYTHON_FALLTHROUGH;
13312  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13313  CYTHON_FALLTHROUGH;
13314  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13315  CYTHON_FALLTHROUGH;
13316  case 0: break;
13317  default: goto __pyx_L5_argtuple_error;
13318  }
13319  kw_args = PyDict_Size(__pyx_kwds);
13320  switch (pos_args) {
13321  case 0:
13322  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_l2g)) != 0)) kw_args--;
13323  else goto __pyx_L5_argtuple_error;
13324  CYTHON_FALLTHROUGH;
13325  case 1:
13326  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
13327  else {
13328  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_weak_lowmem", 1, 9, 9, 1); __PYX_ERR(0, 3291, __pyx_L3_error)
13329  }
13330  CYTHON_FALLTHROUGH;
13331  case 2:
13332  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_da)) != 0)) kw_args--;
13333  else {
13334  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_weak_lowmem", 1, 9, 9, 2); __PYX_ERR(0, 3291, __pyx_L3_error)
13335  }
13336  CYTHON_FALLTHROUGH;
13337  case 3:
13338  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_phi)) != 0)) kw_args--;
13339  else {
13340  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_weak_lowmem", 1, 9, 9, 3); __PYX_ERR(0, 3291, __pyx_L3_error)
13341  }
13342  CYTHON_FALLTHROUGH;
13343  case 4:
13344  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_w_dV)) != 0)) kw_args--;
13345  else {
13346  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_weak_lowmem", 1, 9, 9, 4); __PYX_ERR(0, 3291, __pyx_L3_error)
13347  }
13348  CYTHON_FALLTHROUGH;
13349  case 5:
13350  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dphi)) != 0)) kw_args--;
13351  else {
13352  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_weak_lowmem", 1, 9, 9, 5); __PYX_ERR(0, 3291, __pyx_L3_error)
13353  }
13354  CYTHON_FALLTHROUGH;
13355  case 6:
13356  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
13357  else {
13358  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_weak_lowmem", 1, 9, 9, 6); __PYX_ERR(0, 3291, __pyx_L3_error)
13359  }
13360  CYTHON_FALLTHROUGH;
13361  case 7:
13362  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_v)) != 0)) kw_args--;
13363  else {
13364  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_weak_lowmem", 1, 9, 9, 7); __PYX_ERR(0, 3291, __pyx_L3_error)
13365  }
13366  CYTHON_FALLTHROUGH;
13367  case 8:
13368  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jacobian_weak_residual)) != 0)) kw_args--;
13369  else {
13370  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_weak_lowmem", 1, 9, 9, 8); __PYX_ERR(0, 3291, __pyx_L3_error)
13371  }
13372  }
13373  if (unlikely(kw_args > 0)) {
13374  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateDiffusionJacobian_weak_lowmem") < 0)) __PYX_ERR(0, 3291, __pyx_L3_error)
13375  }
13376  } else if (PyTuple_GET_SIZE(__pyx_args) != 9) {
13377  goto __pyx_L5_argtuple_error;
13378  } else {
13379  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13380  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13381  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
13382  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
13383  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
13384  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
13385  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
13386  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
13387  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
13388  }
13389  __pyx_v_l2g = ((PyArrayObject *)values[0]);
13390  __pyx_v_a = ((PyArrayObject *)values[1]);
13391  __pyx_v_da = ((PyArrayObject *)values[2]);
13392  __pyx_v_grad_phi = ((PyArrayObject *)values[3]);
13393  __pyx_v_grad_w_dV = ((PyArrayObject *)values[4]);
13394  __pyx_v_dphi = ((PyArrayObject *)values[5]);
13395  __pyx_v_v = ((PyArrayObject *)values[6]);
13396  __pyx_v_grad_v = ((PyArrayObject *)values[7]);
13397  __pyx_v_jacobian_weak_residual = ((PyArrayObject *)values[8]);
13398  }
13399  goto __pyx_L4_argument_unpacking_done;
13400  __pyx_L5_argtuple_error:;
13401  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_weak_lowmem", 1, 9, 9, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3291, __pyx_L3_error)
13402  __pyx_L3_error:;
13403  __Pyx_AddTraceback("cfemIntegrals.updateDiffusionJacobian_weak_lowmem", __pyx_clineno, __pyx_lineno, __pyx_filename);
13404  __Pyx_RefNannyFinishContext();
13405  return NULL;
13406  __pyx_L4_argument_unpacking_done:;
13407  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_l2g), __pyx_ptype_5numpy_ndarray, 1, "l2g", 0))) __PYX_ERR(0, 3291, __pyx_L1_error)
13408  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1, "a", 0))) __PYX_ERR(0, 3292, __pyx_L1_error)
13409  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_da), __pyx_ptype_5numpy_ndarray, 1, "da", 0))) __PYX_ERR(0, 3293, __pyx_L1_error)
13410  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_phi), __pyx_ptype_5numpy_ndarray, 1, "grad_phi", 0))) __PYX_ERR(0, 3294, __pyx_L1_error)
13411  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_w_dV), __pyx_ptype_5numpy_ndarray, 1, "grad_w_dV", 0))) __PYX_ERR(0, 3295, __pyx_L1_error)
13412  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dphi), __pyx_ptype_5numpy_ndarray, 1, "dphi", 0))) __PYX_ERR(0, 3296, __pyx_L1_error)
13413  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), __pyx_ptype_5numpy_ndarray, 1, "v", 0))) __PYX_ERR(0, 3297, __pyx_L1_error)
13414  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_v), __pyx_ptype_5numpy_ndarray, 1, "grad_v", 0))) __PYX_ERR(0, 3298, __pyx_L1_error)
13415  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_jacobian_weak_residual), __pyx_ptype_5numpy_ndarray, 1, "jacobian_weak_residual", 0))) __PYX_ERR(0, 3299, __pyx_L1_error)
13416  __pyx_r = __pyx_pf_13cfemIntegrals_106updateDiffusionJacobian_weak_lowmem(__pyx_self, __pyx_v_l2g, __pyx_v_a, __pyx_v_da, __pyx_v_grad_phi, __pyx_v_grad_w_dV, __pyx_v_dphi, __pyx_v_v, __pyx_v_grad_v, __pyx_v_jacobian_weak_residual);
13417 
13418  /* function exit code */
13419  goto __pyx_L0;
13420  __pyx_L1_error:;
13421  __pyx_r = NULL;
13422  __pyx_L0:;
13423  __Pyx_RefNannyFinishContext();
13424  return __pyx_r;
13425 }
13426 
13427 static PyObject *__pyx_pf_13cfemIntegrals_106updateDiffusionJacobian_weak_lowmem(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_da, PyArrayObject *__pyx_v_grad_phi, PyArrayObject *__pyx_v_grad_w_dV, PyArrayObject *__pyx_v_dphi, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_grad_v, PyArrayObject *__pyx_v_jacobian_weak_residual) {
13428  int __pyx_v_nElements_global;
13429  int __pyx_v_nQuadraturePoints_element;
13430  int __pyx_v_nDOF_trial_element;
13431  int __pyx_v_nDOF_test_element;
13432  int __pyx_v_nSpace;
13433  PyObject *__pyx_r = NULL;
13434  __Pyx_RefNannyDeclarations
13435  __Pyx_RefNannySetupContext("updateDiffusionJacobian_weak_lowmem", 0);
13436 
13437  /* "cfemIntegrals.pyx":3300
13438  * np.ndarray grad_v,
13439  * np.ndarray jacobian_weak_residual):
13440  * cdef int nElements_global = grad_w_dV.shape[0] # <<<<<<<<<<<<<<
13441  * cdef int nQuadraturePoints_element = grad_w_dV.shape[1]
13442  * cdef int nDOF_trial_element = grad_v.shape[2]
13443  */
13444  __pyx_v_nElements_global = (__pyx_v_grad_w_dV->dimensions[0]);
13445 
13446  /* "cfemIntegrals.pyx":3301
13447  * np.ndarray jacobian_weak_residual):
13448  * cdef int nElements_global = grad_w_dV.shape[0]
13449  * cdef int nQuadraturePoints_element = grad_w_dV.shape[1] # <<<<<<<<<<<<<<
13450  * cdef int nDOF_trial_element = grad_v.shape[2]
13451  * cdef int nDOF_test_element = grad_w_dV.shape[2]
13452  */
13453  __pyx_v_nQuadraturePoints_element = (__pyx_v_grad_w_dV->dimensions[1]);
13454 
13455  /* "cfemIntegrals.pyx":3302
13456  * cdef int nElements_global = grad_w_dV.shape[0]
13457  * cdef int nQuadraturePoints_element = grad_w_dV.shape[1]
13458  * cdef int nDOF_trial_element = grad_v.shape[2] # <<<<<<<<<<<<<<
13459  * cdef int nDOF_test_element = grad_w_dV.shape[2]
13460  * cdef int nSpace = grad_w_dV.shape[3]
13461  */
13462  __pyx_v_nDOF_trial_element = (__pyx_v_grad_v->dimensions[2]);
13463 
13464  /* "cfemIntegrals.pyx":3303
13465  * cdef int nQuadraturePoints_element = grad_w_dV.shape[1]
13466  * cdef int nDOF_trial_element = grad_v.shape[2]
13467  * cdef int nDOF_test_element = grad_w_dV.shape[2] # <<<<<<<<<<<<<<
13468  * cdef int nSpace = grad_w_dV.shape[3]
13469  * cupdateDiffusionJacobian_weak_lowmem(nElements_global,
13470  */
13471  __pyx_v_nDOF_test_element = (__pyx_v_grad_w_dV->dimensions[2]);
13472 
13473  /* "cfemIntegrals.pyx":3304
13474  * cdef int nDOF_trial_element = grad_v.shape[2]
13475  * cdef int nDOF_test_element = grad_w_dV.shape[2]
13476  * cdef int nSpace = grad_w_dV.shape[3] # <<<<<<<<<<<<<<
13477  * cupdateDiffusionJacobian_weak_lowmem(nElements_global,
13478  * nQuadraturePoints_element,
13479  */
13480  __pyx_v_nSpace = (__pyx_v_grad_w_dV->dimensions[3]);
13481 
13482  /* "cfemIntegrals.pyx":3305
13483  * cdef int nDOF_test_element = grad_w_dV.shape[2]
13484  * cdef int nSpace = grad_w_dV.shape[3]
13485  * cupdateDiffusionJacobian_weak_lowmem(nElements_global, # <<<<<<<<<<<<<<
13486  * nQuadraturePoints_element,
13487  * nDOF_trial_element,
13488  */
13489  updateDiffusionJacobian_weak_lowmem(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_trial_element, __pyx_v_nDOF_test_element, __pyx_v_nSpace, ((int *)__pyx_v_l2g->data), ((double *)__pyx_v_a->data), ((double *)__pyx_v_da->data), ((double *)__pyx_v_grad_phi->data), ((double *)__pyx_v_grad_w_dV->data), ((double *)__pyx_v_dphi->data), ((double *)__pyx_v_v->data), ((double *)__pyx_v_grad_v->data), ((double *)__pyx_v_jacobian_weak_residual->data));
13490 
13491  /* "cfemIntegrals.pyx":3291
13492  * <double*>grad_v_X_grad_w_dV.data,
13493  * <double*>jacobian_weak_residual.data)
13494  * def updateDiffusionJacobian_weak_lowmem(np.ndarray l2g, # <<<<<<<<<<<<<<
13495  * np.ndarray a,
13496  * np.ndarray da,
13497  */
13498 
13499  /* function exit code */
13500  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
13501  __Pyx_XGIVEREF(__pyx_r);
13502  __Pyx_RefNannyFinishContext();
13503  return __pyx_r;
13504 }
13505 
13506 /* "cfemIntegrals.pyx":3319
13507  * <double*> grad_v.data,
13508  * <double*> jacobian_weak_residual.data)
13509  * def updateDiffusionJacobian_weak_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
13510  * np.ndarray colind,
13511  * np.ndarray l2g,
13512  */
13513 
13514 /* Python wrapper */
13515 static PyObject *__pyx_pw_13cfemIntegrals_109updateDiffusionJacobian_weak_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13516 static PyMethodDef __pyx_mdef_13cfemIntegrals_109updateDiffusionJacobian_weak_sd = {"updateDiffusionJacobian_weak_sd", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_109updateDiffusionJacobian_weak_sd, METH_VARARGS|METH_KEYWORDS, 0};
13517 static PyObject *__pyx_pw_13cfemIntegrals_109updateDiffusionJacobian_weak_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13518  PyArrayObject *__pyx_v_rowptr = 0;
13519  PyArrayObject *__pyx_v_colind = 0;
13520  PyArrayObject *__pyx_v_l2g = 0;
13521  PyArrayObject *__pyx_v_a = 0;
13522  PyArrayObject *__pyx_v_da = 0;
13523  PyArrayObject *__pyx_v_grad_phi = 0;
13524  PyArrayObject *__pyx_v_grad_w_dV = 0;
13525  PyArrayObject *__pyx_v_dphi = 0;
13526  PyArrayObject *__pyx_v_v = 0;
13527  PyArrayObject *__pyx_v_grad_v = 0;
13528  PyArrayObject *__pyx_v_jacobian_weak_residual = 0;
13529  int __pyx_lineno = 0;
13530  const char *__pyx_filename = NULL;
13531  int __pyx_clineno = 0;
13532  PyObject *__pyx_r = 0;
13533  __Pyx_RefNannyDeclarations
13534  __Pyx_RefNannySetupContext("updateDiffusionJacobian_weak_sd (wrapper)", 0);
13535  {
13536  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rowptr,&__pyx_n_s_colind,&__pyx_n_s_l2g,&__pyx_n_s_a,&__pyx_n_s_da,&__pyx_n_s_grad_phi,&__pyx_n_s_grad_w_dV,&__pyx_n_s_dphi,&__pyx_n_s_v,&__pyx_n_s_grad_v,&__pyx_n_s_jacobian_weak_residual,0};
13537  PyObject* values[11] = {0,0,0,0,0,0,0,0,0,0,0};
13538  if (unlikely(__pyx_kwds)) {
13539  Py_ssize_t kw_args;
13540  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
13541  switch (pos_args) {
13542  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
13543  CYTHON_FALLTHROUGH;
13544  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
13545  CYTHON_FALLTHROUGH;
13546  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
13547  CYTHON_FALLTHROUGH;
13548  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
13549  CYTHON_FALLTHROUGH;
13550  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
13551  CYTHON_FALLTHROUGH;
13552  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
13553  CYTHON_FALLTHROUGH;
13554  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
13555  CYTHON_FALLTHROUGH;
13556  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
13557  CYTHON_FALLTHROUGH;
13558  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
13559  CYTHON_FALLTHROUGH;
13560  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13561  CYTHON_FALLTHROUGH;
13562  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13563  CYTHON_FALLTHROUGH;
13564  case 0: break;
13565  default: goto __pyx_L5_argtuple_error;
13566  }
13567  kw_args = PyDict_Size(__pyx_kwds);
13568  switch (pos_args) {
13569  case 0:
13570  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rowptr)) != 0)) kw_args--;
13571  else goto __pyx_L5_argtuple_error;
13572  CYTHON_FALLTHROUGH;
13573  case 1:
13574  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_colind)) != 0)) kw_args--;
13575  else {
13576  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_weak_sd", 1, 11, 11, 1); __PYX_ERR(0, 3319, __pyx_L3_error)
13577  }
13578  CYTHON_FALLTHROUGH;
13579  case 2:
13580  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_l2g)) != 0)) kw_args--;
13581  else {
13582  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_weak_sd", 1, 11, 11, 2); __PYX_ERR(0, 3319, __pyx_L3_error)
13583  }
13584  CYTHON_FALLTHROUGH;
13585  case 3:
13586  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
13587  else {
13588  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_weak_sd", 1, 11, 11, 3); __PYX_ERR(0, 3319, __pyx_L3_error)
13589  }
13590  CYTHON_FALLTHROUGH;
13591  case 4:
13592  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_da)) != 0)) kw_args--;
13593  else {
13594  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_weak_sd", 1, 11, 11, 4); __PYX_ERR(0, 3319, __pyx_L3_error)
13595  }
13596  CYTHON_FALLTHROUGH;
13597  case 5:
13598  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_phi)) != 0)) kw_args--;
13599  else {
13600  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_weak_sd", 1, 11, 11, 5); __PYX_ERR(0, 3319, __pyx_L3_error)
13601  }
13602  CYTHON_FALLTHROUGH;
13603  case 6:
13604  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_w_dV)) != 0)) kw_args--;
13605  else {
13606  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_weak_sd", 1, 11, 11, 6); __PYX_ERR(0, 3319, __pyx_L3_error)
13607  }
13608  CYTHON_FALLTHROUGH;
13609  case 7:
13610  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dphi)) != 0)) kw_args--;
13611  else {
13612  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_weak_sd", 1, 11, 11, 7); __PYX_ERR(0, 3319, __pyx_L3_error)
13613  }
13614  CYTHON_FALLTHROUGH;
13615  case 8:
13616  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
13617  else {
13618  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_weak_sd", 1, 11, 11, 8); __PYX_ERR(0, 3319, __pyx_L3_error)
13619  }
13620  CYTHON_FALLTHROUGH;
13621  case 9:
13622  if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_v)) != 0)) kw_args--;
13623  else {
13624  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_weak_sd", 1, 11, 11, 9); __PYX_ERR(0, 3319, __pyx_L3_error)
13625  }
13626  CYTHON_FALLTHROUGH;
13627  case 10:
13628  if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jacobian_weak_residual)) != 0)) kw_args--;
13629  else {
13630  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_weak_sd", 1, 11, 11, 10); __PYX_ERR(0, 3319, __pyx_L3_error)
13631  }
13632  }
13633  if (unlikely(kw_args > 0)) {
13634  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateDiffusionJacobian_weak_sd") < 0)) __PYX_ERR(0, 3319, __pyx_L3_error)
13635  }
13636  } else if (PyTuple_GET_SIZE(__pyx_args) != 11) {
13637  goto __pyx_L5_argtuple_error;
13638  } else {
13639  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13640  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13641  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
13642  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
13643  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
13644  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
13645  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
13646  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
13647  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
13648  values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
13649  values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
13650  }
13651  __pyx_v_rowptr = ((PyArrayObject *)values[0]);
13652  __pyx_v_colind = ((PyArrayObject *)values[1]);
13653  __pyx_v_l2g = ((PyArrayObject *)values[2]);
13654  __pyx_v_a = ((PyArrayObject *)values[3]);
13655  __pyx_v_da = ((PyArrayObject *)values[4]);
13656  __pyx_v_grad_phi = ((PyArrayObject *)values[5]);
13657  __pyx_v_grad_w_dV = ((PyArrayObject *)values[6]);
13658  __pyx_v_dphi = ((PyArrayObject *)values[7]);
13659  __pyx_v_v = ((PyArrayObject *)values[8]);
13660  __pyx_v_grad_v = ((PyArrayObject *)values[9]);
13661  __pyx_v_jacobian_weak_residual = ((PyArrayObject *)values[10]);
13662  }
13663  goto __pyx_L4_argument_unpacking_done;
13664  __pyx_L5_argtuple_error:;
13665  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_weak_sd", 1, 11, 11, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3319, __pyx_L3_error)
13666  __pyx_L3_error:;
13667  __Pyx_AddTraceback("cfemIntegrals.updateDiffusionJacobian_weak_sd", __pyx_clineno, __pyx_lineno, __pyx_filename);
13668  __Pyx_RefNannyFinishContext();
13669  return NULL;
13670  __pyx_L4_argument_unpacking_done:;
13671  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rowptr), __pyx_ptype_5numpy_ndarray, 1, "rowptr", 0))) __PYX_ERR(0, 3319, __pyx_L1_error)
13672  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_colind), __pyx_ptype_5numpy_ndarray, 1, "colind", 0))) __PYX_ERR(0, 3320, __pyx_L1_error)
13673  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_l2g), __pyx_ptype_5numpy_ndarray, 1, "l2g", 0))) __PYX_ERR(0, 3321, __pyx_L1_error)
13674  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1, "a", 0))) __PYX_ERR(0, 3322, __pyx_L1_error)
13675  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_da), __pyx_ptype_5numpy_ndarray, 1, "da", 0))) __PYX_ERR(0, 3323, __pyx_L1_error)
13676  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_phi), __pyx_ptype_5numpy_ndarray, 1, "grad_phi", 0))) __PYX_ERR(0, 3324, __pyx_L1_error)
13677  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_w_dV), __pyx_ptype_5numpy_ndarray, 1, "grad_w_dV", 0))) __PYX_ERR(0, 3325, __pyx_L1_error)
13678  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dphi), __pyx_ptype_5numpy_ndarray, 1, "dphi", 0))) __PYX_ERR(0, 3326, __pyx_L1_error)
13679  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), __pyx_ptype_5numpy_ndarray, 1, "v", 0))) __PYX_ERR(0, 3327, __pyx_L1_error)
13680  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_v), __pyx_ptype_5numpy_ndarray, 1, "grad_v", 0))) __PYX_ERR(0, 3328, __pyx_L1_error)
13681  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_jacobian_weak_residual), __pyx_ptype_5numpy_ndarray, 1, "jacobian_weak_residual", 0))) __PYX_ERR(0, 3329, __pyx_L1_error)
13682  __pyx_r = __pyx_pf_13cfemIntegrals_108updateDiffusionJacobian_weak_sd(__pyx_self, __pyx_v_rowptr, __pyx_v_colind, __pyx_v_l2g, __pyx_v_a, __pyx_v_da, __pyx_v_grad_phi, __pyx_v_grad_w_dV, __pyx_v_dphi, __pyx_v_v, __pyx_v_grad_v, __pyx_v_jacobian_weak_residual);
13683 
13684  /* function exit code */
13685  goto __pyx_L0;
13686  __pyx_L1_error:;
13687  __pyx_r = NULL;
13688  __pyx_L0:;
13689  __Pyx_RefNannyFinishContext();
13690  return __pyx_r;
13691 }
13692 
13693 static PyObject *__pyx_pf_13cfemIntegrals_108updateDiffusionJacobian_weak_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_da, PyArrayObject *__pyx_v_grad_phi, PyArrayObject *__pyx_v_grad_w_dV, PyArrayObject *__pyx_v_dphi, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_grad_v, PyArrayObject *__pyx_v_jacobian_weak_residual) {
13694  int __pyx_v_nElements_global;
13695  int __pyx_v_nQuadraturePoints_element;
13696  int __pyx_v_nDOF_trial_element;
13697  int __pyx_v_nDOF_test_element;
13698  int __pyx_v_nSpace;
13699  PyObject *__pyx_r = NULL;
13700  __Pyx_RefNannyDeclarations
13701  __Pyx_RefNannySetupContext("updateDiffusionJacobian_weak_sd", 0);
13702 
13703  /* "cfemIntegrals.pyx":3330
13704  * np.ndarray grad_v,
13705  * np.ndarray jacobian_weak_residual):
13706  * cdef int nElements_global = grad_w_dV.shape[0] # <<<<<<<<<<<<<<
13707  * cdef int nQuadraturePoints_element = grad_w_dV.shape[1]
13708  * cdef int nDOF_trial_element = grad_v.shape[2]
13709  */
13710  __pyx_v_nElements_global = (__pyx_v_grad_w_dV->dimensions[0]);
13711 
13712  /* "cfemIntegrals.pyx":3331
13713  * np.ndarray jacobian_weak_residual):
13714  * cdef int nElements_global = grad_w_dV.shape[0]
13715  * cdef int nQuadraturePoints_element = grad_w_dV.shape[1] # <<<<<<<<<<<<<<
13716  * cdef int nDOF_trial_element = grad_v.shape[2]
13717  * cdef int nDOF_test_element = grad_w_dV.shape[2]
13718  */
13719  __pyx_v_nQuadraturePoints_element = (__pyx_v_grad_w_dV->dimensions[1]);
13720 
13721  /* "cfemIntegrals.pyx":3332
13722  * cdef int nElements_global = grad_w_dV.shape[0]
13723  * cdef int nQuadraturePoints_element = grad_w_dV.shape[1]
13724  * cdef int nDOF_trial_element = grad_v.shape[2] # <<<<<<<<<<<<<<
13725  * cdef int nDOF_test_element = grad_w_dV.shape[2]
13726  * cdef int nSpace = grad_w_dV.shape[3]
13727  */
13728  __pyx_v_nDOF_trial_element = (__pyx_v_grad_v->dimensions[2]);
13729 
13730  /* "cfemIntegrals.pyx":3333
13731  * cdef int nQuadraturePoints_element = grad_w_dV.shape[1]
13732  * cdef int nDOF_trial_element = grad_v.shape[2]
13733  * cdef int nDOF_test_element = grad_w_dV.shape[2] # <<<<<<<<<<<<<<
13734  * cdef int nSpace = grad_w_dV.shape[3]
13735  * cupdateDiffusionJacobian_weak_sd(nElements_global,
13736  */
13737  __pyx_v_nDOF_test_element = (__pyx_v_grad_w_dV->dimensions[2]);
13738 
13739  /* "cfemIntegrals.pyx":3334
13740  * cdef int nDOF_trial_element = grad_v.shape[2]
13741  * cdef int nDOF_test_element = grad_w_dV.shape[2]
13742  * cdef int nSpace = grad_w_dV.shape[3] # <<<<<<<<<<<<<<
13743  * cupdateDiffusionJacobian_weak_sd(nElements_global,
13744  * nQuadraturePoints_element,
13745  */
13746  __pyx_v_nSpace = (__pyx_v_grad_w_dV->dimensions[3]);
13747 
13748  /* "cfemIntegrals.pyx":3335
13749  * cdef int nDOF_test_element = grad_w_dV.shape[2]
13750  * cdef int nSpace = grad_w_dV.shape[3]
13751  * cupdateDiffusionJacobian_weak_sd(nElements_global, # <<<<<<<<<<<<<<
13752  * nQuadraturePoints_element,
13753  * nDOF_trial_element,
13754  */
13755  updateDiffusionJacobian_weak_sd(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_trial_element, __pyx_v_nDOF_test_element, __pyx_v_nSpace, ((int *)__pyx_v_rowptr->data), ((int *)__pyx_v_colind->data), ((int *)__pyx_v_l2g->data), ((double *)__pyx_v_a->data), ((double *)__pyx_v_da->data), ((double *)__pyx_v_grad_phi->data), ((double *)__pyx_v_grad_w_dV->data), ((double *)__pyx_v_dphi->data), ((double *)__pyx_v_v->data), ((double *)__pyx_v_grad_v->data), ((double *)__pyx_v_jacobian_weak_residual->data));
13756 
13757  /* "cfemIntegrals.pyx":3319
13758  * <double*> grad_v.data,
13759  * <double*> jacobian_weak_residual.data)
13760  * def updateDiffusionJacobian_weak_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
13761  * np.ndarray colind,
13762  * np.ndarray l2g,
13763  */
13764 
13765  /* function exit code */
13766  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
13767  __Pyx_XGIVEREF(__pyx_r);
13768  __Pyx_RefNannyFinishContext();
13769  return __pyx_r;
13770 }
13771 
13772 /* "cfemIntegrals.pyx":3351
13773  * <double*> grad_v.data,
13774  * <double*> jacobian_weak_residual.data)
13775  * def updateDiffusion_strong(np.ndarray da, # <<<<<<<<<<<<<<
13776  * np.ndarray grad_phi,
13777  * np.ndarray grad_u,
13778  */
13779 
13780 /* Python wrapper */
13781 static PyObject *__pyx_pw_13cfemIntegrals_111updateDiffusion_strong(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13782 static PyMethodDef __pyx_mdef_13cfemIntegrals_111updateDiffusion_strong = {"updateDiffusion_strong", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_111updateDiffusion_strong, METH_VARARGS|METH_KEYWORDS, 0};
13783 static PyObject *__pyx_pw_13cfemIntegrals_111updateDiffusion_strong(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13784  PyArrayObject *__pyx_v_da = 0;
13785  PyArrayObject *__pyx_v_grad_phi = 0;
13786  PyArrayObject *__pyx_v_grad_u = 0;
13787  PyArrayObject *__pyx_v_strong_residual = 0;
13788  int __pyx_lineno = 0;
13789  const char *__pyx_filename = NULL;
13790  int __pyx_clineno = 0;
13791  PyObject *__pyx_r = 0;
13792  __Pyx_RefNannyDeclarations
13793  __Pyx_RefNannySetupContext("updateDiffusion_strong (wrapper)", 0);
13794  {
13795  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_da,&__pyx_n_s_grad_phi,&__pyx_n_s_grad_u,&__pyx_n_s_strong_residual,0};
13796  PyObject* values[4] = {0,0,0,0};
13797  if (unlikely(__pyx_kwds)) {
13798  Py_ssize_t kw_args;
13799  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
13800  switch (pos_args) {
13801  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
13802  CYTHON_FALLTHROUGH;
13803  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
13804  CYTHON_FALLTHROUGH;
13805  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13806  CYTHON_FALLTHROUGH;
13807  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13808  CYTHON_FALLTHROUGH;
13809  case 0: break;
13810  default: goto __pyx_L5_argtuple_error;
13811  }
13812  kw_args = PyDict_Size(__pyx_kwds);
13813  switch (pos_args) {
13814  case 0:
13815  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_da)) != 0)) kw_args--;
13816  else goto __pyx_L5_argtuple_error;
13817  CYTHON_FALLTHROUGH;
13818  case 1:
13819  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_phi)) != 0)) kw_args--;
13820  else {
13821  __Pyx_RaiseArgtupleInvalid("updateDiffusion_strong", 1, 4, 4, 1); __PYX_ERR(0, 3351, __pyx_L3_error)
13822  }
13823  CYTHON_FALLTHROUGH;
13824  case 2:
13825  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_u)) != 0)) kw_args--;
13826  else {
13827  __Pyx_RaiseArgtupleInvalid("updateDiffusion_strong", 1, 4, 4, 2); __PYX_ERR(0, 3351, __pyx_L3_error)
13828  }
13829  CYTHON_FALLTHROUGH;
13830  case 3:
13831  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_strong_residual)) != 0)) kw_args--;
13832  else {
13833  __Pyx_RaiseArgtupleInvalid("updateDiffusion_strong", 1, 4, 4, 3); __PYX_ERR(0, 3351, __pyx_L3_error)
13834  }
13835  }
13836  if (unlikely(kw_args > 0)) {
13837  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateDiffusion_strong") < 0)) __PYX_ERR(0, 3351, __pyx_L3_error)
13838  }
13839  } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
13840  goto __pyx_L5_argtuple_error;
13841  } else {
13842  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13843  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13844  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
13845  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
13846  }
13847  __pyx_v_da = ((PyArrayObject *)values[0]);
13848  __pyx_v_grad_phi = ((PyArrayObject *)values[1]);
13849  __pyx_v_grad_u = ((PyArrayObject *)values[2]);
13850  __pyx_v_strong_residual = ((PyArrayObject *)values[3]);
13851  }
13852  goto __pyx_L4_argument_unpacking_done;
13853  __pyx_L5_argtuple_error:;
13854  __Pyx_RaiseArgtupleInvalid("updateDiffusion_strong", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3351, __pyx_L3_error)
13855  __pyx_L3_error:;
13856  __Pyx_AddTraceback("cfemIntegrals.updateDiffusion_strong", __pyx_clineno, __pyx_lineno, __pyx_filename);
13857  __Pyx_RefNannyFinishContext();
13858  return NULL;
13859  __pyx_L4_argument_unpacking_done:;
13860  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_da), __pyx_ptype_5numpy_ndarray, 1, "da", 0))) __PYX_ERR(0, 3351, __pyx_L1_error)
13861  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_phi), __pyx_ptype_5numpy_ndarray, 1, "grad_phi", 0))) __PYX_ERR(0, 3352, __pyx_L1_error)
13862  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_u), __pyx_ptype_5numpy_ndarray, 1, "grad_u", 0))) __PYX_ERR(0, 3353, __pyx_L1_error)
13863  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_strong_residual), __pyx_ptype_5numpy_ndarray, 1, "strong_residual", 0))) __PYX_ERR(0, 3354, __pyx_L1_error)
13864  __pyx_r = __pyx_pf_13cfemIntegrals_110updateDiffusion_strong(__pyx_self, __pyx_v_da, __pyx_v_grad_phi, __pyx_v_grad_u, __pyx_v_strong_residual);
13865 
13866  /* function exit code */
13867  goto __pyx_L0;
13868  __pyx_L1_error:;
13869  __pyx_r = NULL;
13870  __pyx_L0:;
13871  __Pyx_RefNannyFinishContext();
13872  return __pyx_r;
13873 }
13874 
13875 static PyObject *__pyx_pf_13cfemIntegrals_110updateDiffusion_strong(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_da, PyArrayObject *__pyx_v_grad_phi, PyArrayObject *__pyx_v_grad_u, PyArrayObject *__pyx_v_strong_residual) {
13876  int __pyx_v_nElements_global;
13877  int __pyx_v_nQuadraturePoints_element;
13878  int __pyx_v_nSpace;
13879  PyObject *__pyx_r = NULL;
13880  __Pyx_RefNannyDeclarations
13881  __Pyx_RefNannySetupContext("updateDiffusion_strong", 0);
13882 
13883  /* "cfemIntegrals.pyx":3355
13884  * np.ndarray grad_u,
13885  * np.ndarray strong_residual):
13886  * cdef int nElements_global = grad_u.shape[0] # <<<<<<<<<<<<<<
13887  * cdef int nQuadraturePoints_element = grad_u.shape[1]
13888  * cdef int nSpace = grad_u.shape[2]
13889  */
13890  __pyx_v_nElements_global = (__pyx_v_grad_u->dimensions[0]);
13891 
13892  /* "cfemIntegrals.pyx":3356
13893  * np.ndarray strong_residual):
13894  * cdef int nElements_global = grad_u.shape[0]
13895  * cdef int nQuadraturePoints_element = grad_u.shape[1] # <<<<<<<<<<<<<<
13896  * cdef int nSpace = grad_u.shape[2]
13897  * cupdateDiffusion_strong(nElements_global,
13898  */
13899  __pyx_v_nQuadraturePoints_element = (__pyx_v_grad_u->dimensions[1]);
13900 
13901  /* "cfemIntegrals.pyx":3357
13902  * cdef int nElements_global = grad_u.shape[0]
13903  * cdef int nQuadraturePoints_element = grad_u.shape[1]
13904  * cdef int nSpace = grad_u.shape[2] # <<<<<<<<<<<<<<
13905  * cupdateDiffusion_strong(nElements_global,
13906  * nQuadraturePoints_element,
13907  */
13908  __pyx_v_nSpace = (__pyx_v_grad_u->dimensions[2]);
13909 
13910  /* "cfemIntegrals.pyx":3358
13911  * cdef int nQuadraturePoints_element = grad_u.shape[1]
13912  * cdef int nSpace = grad_u.shape[2]
13913  * cupdateDiffusion_strong(nElements_global, # <<<<<<<<<<<<<<
13914  * nQuadraturePoints_element,
13915  * nSpace,
13916  */
13917  updateDiffusion_strong(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nSpace, ((double *)__pyx_v_da->data), ((double *)__pyx_v_grad_phi->data), ((double *)__pyx_v_grad_u->data), ((double *)__pyx_v_strong_residual->data));
13918 
13919  /* "cfemIntegrals.pyx":3351
13920  * <double*> grad_v.data,
13921  * <double*> jacobian_weak_residual.data)
13922  * def updateDiffusion_strong(np.ndarray da, # <<<<<<<<<<<<<<
13923  * np.ndarray grad_phi,
13924  * np.ndarray grad_u,
13925  */
13926 
13927  /* function exit code */
13928  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
13929  __Pyx_XGIVEREF(__pyx_r);
13930  __Pyx_RefNannyFinishContext();
13931  return __pyx_r;
13932 }
13933 
13934 /* "cfemIntegrals.pyx":3365
13935  * <double*>grad_u.data,
13936  * <double*>strong_residual.data)
13937  * def updateDiffusion_strong_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
13938  * np.ndarray colind,
13939  * np.ndarray da,
13940  */
13941 
13942 /* Python wrapper */
13943 static PyObject *__pyx_pw_13cfemIntegrals_113updateDiffusion_strong_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13944 static PyMethodDef __pyx_mdef_13cfemIntegrals_113updateDiffusion_strong_sd = {"updateDiffusion_strong_sd", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_113updateDiffusion_strong_sd, METH_VARARGS|METH_KEYWORDS, 0};
13945 static PyObject *__pyx_pw_13cfemIntegrals_113updateDiffusion_strong_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13946  PyArrayObject *__pyx_v_rowptr = 0;
13947  PyArrayObject *__pyx_v_colind = 0;
13948  PyArrayObject *__pyx_v_da = 0;
13949  PyArrayObject *__pyx_v_grad_phi = 0;
13950  PyArrayObject *__pyx_v_grad_u = 0;
13951  PyArrayObject *__pyx_v_strong_residual = 0;
13952  int __pyx_lineno = 0;
13953  const char *__pyx_filename = NULL;
13954  int __pyx_clineno = 0;
13955  PyObject *__pyx_r = 0;
13956  __Pyx_RefNannyDeclarations
13957  __Pyx_RefNannySetupContext("updateDiffusion_strong_sd (wrapper)", 0);
13958  {
13959  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rowptr,&__pyx_n_s_colind,&__pyx_n_s_da,&__pyx_n_s_grad_phi,&__pyx_n_s_grad_u,&__pyx_n_s_strong_residual,0};
13960  PyObject* values[6] = {0,0,0,0,0,0};
13961  if (unlikely(__pyx_kwds)) {
13962  Py_ssize_t kw_args;
13963  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
13964  switch (pos_args) {
13965  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
13966  CYTHON_FALLTHROUGH;
13967  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
13968  CYTHON_FALLTHROUGH;
13969  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
13970  CYTHON_FALLTHROUGH;
13971  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
13972  CYTHON_FALLTHROUGH;
13973  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13974  CYTHON_FALLTHROUGH;
13975  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13976  CYTHON_FALLTHROUGH;
13977  case 0: break;
13978  default: goto __pyx_L5_argtuple_error;
13979  }
13980  kw_args = PyDict_Size(__pyx_kwds);
13981  switch (pos_args) {
13982  case 0:
13983  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rowptr)) != 0)) kw_args--;
13984  else goto __pyx_L5_argtuple_error;
13985  CYTHON_FALLTHROUGH;
13986  case 1:
13987  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_colind)) != 0)) kw_args--;
13988  else {
13989  __Pyx_RaiseArgtupleInvalid("updateDiffusion_strong_sd", 1, 6, 6, 1); __PYX_ERR(0, 3365, __pyx_L3_error)
13990  }
13991  CYTHON_FALLTHROUGH;
13992  case 2:
13993  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_da)) != 0)) kw_args--;
13994  else {
13995  __Pyx_RaiseArgtupleInvalid("updateDiffusion_strong_sd", 1, 6, 6, 2); __PYX_ERR(0, 3365, __pyx_L3_error)
13996  }
13997  CYTHON_FALLTHROUGH;
13998  case 3:
13999  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_phi)) != 0)) kw_args--;
14000  else {
14001  __Pyx_RaiseArgtupleInvalid("updateDiffusion_strong_sd", 1, 6, 6, 3); __PYX_ERR(0, 3365, __pyx_L3_error)
14002  }
14003  CYTHON_FALLTHROUGH;
14004  case 4:
14005  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_u)) != 0)) kw_args--;
14006  else {
14007  __Pyx_RaiseArgtupleInvalid("updateDiffusion_strong_sd", 1, 6, 6, 4); __PYX_ERR(0, 3365, __pyx_L3_error)
14008  }
14009  CYTHON_FALLTHROUGH;
14010  case 5:
14011  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_strong_residual)) != 0)) kw_args--;
14012  else {
14013  __Pyx_RaiseArgtupleInvalid("updateDiffusion_strong_sd", 1, 6, 6, 5); __PYX_ERR(0, 3365, __pyx_L3_error)
14014  }
14015  }
14016  if (unlikely(kw_args > 0)) {
14017  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateDiffusion_strong_sd") < 0)) __PYX_ERR(0, 3365, __pyx_L3_error)
14018  }
14019  } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
14020  goto __pyx_L5_argtuple_error;
14021  } else {
14022  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14023  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14024  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
14025  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
14026  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
14027  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
14028  }
14029  __pyx_v_rowptr = ((PyArrayObject *)values[0]);
14030  __pyx_v_colind = ((PyArrayObject *)values[1]);
14031  __pyx_v_da = ((PyArrayObject *)values[2]);
14032  __pyx_v_grad_phi = ((PyArrayObject *)values[3]);
14033  __pyx_v_grad_u = ((PyArrayObject *)values[4]);
14034  __pyx_v_strong_residual = ((PyArrayObject *)values[5]);
14035  }
14036  goto __pyx_L4_argument_unpacking_done;
14037  __pyx_L5_argtuple_error:;
14038  __Pyx_RaiseArgtupleInvalid("updateDiffusion_strong_sd", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3365, __pyx_L3_error)
14039  __pyx_L3_error:;
14040  __Pyx_AddTraceback("cfemIntegrals.updateDiffusion_strong_sd", __pyx_clineno, __pyx_lineno, __pyx_filename);
14041  __Pyx_RefNannyFinishContext();
14042  return NULL;
14043  __pyx_L4_argument_unpacking_done:;
14044  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rowptr), __pyx_ptype_5numpy_ndarray, 1, "rowptr", 0))) __PYX_ERR(0, 3365, __pyx_L1_error)
14045  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_colind), __pyx_ptype_5numpy_ndarray, 1, "colind", 0))) __PYX_ERR(0, 3366, __pyx_L1_error)
14046  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_da), __pyx_ptype_5numpy_ndarray, 1, "da", 0))) __PYX_ERR(0, 3367, __pyx_L1_error)
14047  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_phi), __pyx_ptype_5numpy_ndarray, 1, "grad_phi", 0))) __PYX_ERR(0, 3368, __pyx_L1_error)
14048  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_u), __pyx_ptype_5numpy_ndarray, 1, "grad_u", 0))) __PYX_ERR(0, 3369, __pyx_L1_error)
14049  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_strong_residual), __pyx_ptype_5numpy_ndarray, 1, "strong_residual", 0))) __PYX_ERR(0, 3370, __pyx_L1_error)
14050  __pyx_r = __pyx_pf_13cfemIntegrals_112updateDiffusion_strong_sd(__pyx_self, __pyx_v_rowptr, __pyx_v_colind, __pyx_v_da, __pyx_v_grad_phi, __pyx_v_grad_u, __pyx_v_strong_residual);
14051 
14052  /* function exit code */
14053  goto __pyx_L0;
14054  __pyx_L1_error:;
14055  __pyx_r = NULL;
14056  __pyx_L0:;
14057  __Pyx_RefNannyFinishContext();
14058  return __pyx_r;
14059 }
14060 
14061 static PyObject *__pyx_pf_13cfemIntegrals_112updateDiffusion_strong_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_da, PyArrayObject *__pyx_v_grad_phi, PyArrayObject *__pyx_v_grad_u, PyArrayObject *__pyx_v_strong_residual) {
14062  int __pyx_v_nElements_global;
14063  int __pyx_v_nQuadraturePoints_element;
14064  int __pyx_v_nSpace;
14065  PyObject *__pyx_r = NULL;
14066  __Pyx_RefNannyDeclarations
14067  __Pyx_RefNannySetupContext("updateDiffusion_strong_sd", 0);
14068 
14069  /* "cfemIntegrals.pyx":3371
14070  * np.ndarray grad_u,
14071  * np.ndarray strong_residual):
14072  * cdef int nElements_global = grad_u.shape[0] # <<<<<<<<<<<<<<
14073  * cdef int nQuadraturePoints_element = grad_u.shape[1]
14074  * cdef int nSpace = grad_u.shape[2]
14075  */
14076  __pyx_v_nElements_global = (__pyx_v_grad_u->dimensions[0]);
14077 
14078  /* "cfemIntegrals.pyx":3372
14079  * np.ndarray strong_residual):
14080  * cdef int nElements_global = grad_u.shape[0]
14081  * cdef int nQuadraturePoints_element = grad_u.shape[1] # <<<<<<<<<<<<<<
14082  * cdef int nSpace = grad_u.shape[2]
14083  * cupdateDiffusion_strong_sd(nElements_global,
14084  */
14085  __pyx_v_nQuadraturePoints_element = (__pyx_v_grad_u->dimensions[1]);
14086 
14087  /* "cfemIntegrals.pyx":3373
14088  * cdef int nElements_global = grad_u.shape[0]
14089  * cdef int nQuadraturePoints_element = grad_u.shape[1]
14090  * cdef int nSpace = grad_u.shape[2] # <<<<<<<<<<<<<<
14091  * cupdateDiffusion_strong_sd(nElements_global,
14092  * nQuadraturePoints_element,
14093  */
14094  __pyx_v_nSpace = (__pyx_v_grad_u->dimensions[2]);
14095 
14096  /* "cfemIntegrals.pyx":3374
14097  * cdef int nQuadraturePoints_element = grad_u.shape[1]
14098  * cdef int nSpace = grad_u.shape[2]
14099  * cupdateDiffusion_strong_sd(nElements_global, # <<<<<<<<<<<<<<
14100  * nQuadraturePoints_element,
14101  * nSpace,
14102  */
14103  updateDiffusion_strong_sd(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nSpace, ((int *)__pyx_v_rowptr->data), ((int *)__pyx_v_colind->data), ((double *)__pyx_v_da->data), ((double *)__pyx_v_grad_phi->data), ((double *)__pyx_v_grad_u->data), ((double *)__pyx_v_strong_residual->data));
14104 
14105  /* "cfemIntegrals.pyx":3365
14106  * <double*>grad_u.data,
14107  * <double*>strong_residual.data)
14108  * def updateDiffusion_strong_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
14109  * np.ndarray colind,
14110  * np.ndarray da,
14111  */
14112 
14113  /* function exit code */
14114  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
14115  __Pyx_XGIVEREF(__pyx_r);
14116  __Pyx_RefNannyFinishContext();
14117  return __pyx_r;
14118 }
14119 
14120 /* "cfemIntegrals.pyx":3383
14121  * <double*> grad_u.data,
14122  * <double*> strong_residual.data)
14123  * def updateDiffusionJacobian_strong(np.ndarray l2g, # <<<<<<<<<<<<<<
14124  * np.ndarray da,
14125  * np.ndarray dphi,
14126  */
14127 
14128 /* Python wrapper */
14129 static PyObject *__pyx_pw_13cfemIntegrals_115updateDiffusionJacobian_strong(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14130 static PyMethodDef __pyx_mdef_13cfemIntegrals_115updateDiffusionJacobian_strong = {"updateDiffusionJacobian_strong", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_115updateDiffusionJacobian_strong, METH_VARARGS|METH_KEYWORDS, 0};
14131 static PyObject *__pyx_pw_13cfemIntegrals_115updateDiffusionJacobian_strong(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14132  PyArrayObject *__pyx_v_l2g = 0;
14133  PyArrayObject *__pyx_v_da = 0;
14134  PyArrayObject *__pyx_v_dphi = 0;
14135  PyArrayObject *__pyx_v_grad_phi = 0;
14136  PyArrayObject *__pyx_v_grad_u = 0;
14137  PyArrayObject *__pyx_v_grad_v = 0;
14138  PyArrayObject *__pyx_v_dstrong_residual = 0;
14139  int __pyx_lineno = 0;
14140  const char *__pyx_filename = NULL;
14141  int __pyx_clineno = 0;
14142  PyObject *__pyx_r = 0;
14143  __Pyx_RefNannyDeclarations
14144  __Pyx_RefNannySetupContext("updateDiffusionJacobian_strong (wrapper)", 0);
14145  {
14146  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_l2g,&__pyx_n_s_da,&__pyx_n_s_dphi,&__pyx_n_s_grad_phi,&__pyx_n_s_grad_u,&__pyx_n_s_grad_v,&__pyx_n_s_dstrong_residual,0};
14147  PyObject* values[7] = {0,0,0,0,0,0,0};
14148  if (unlikely(__pyx_kwds)) {
14149  Py_ssize_t kw_args;
14150  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14151  switch (pos_args) {
14152  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
14153  CYTHON_FALLTHROUGH;
14154  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
14155  CYTHON_FALLTHROUGH;
14156  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
14157  CYTHON_FALLTHROUGH;
14158  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
14159  CYTHON_FALLTHROUGH;
14160  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
14161  CYTHON_FALLTHROUGH;
14162  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14163  CYTHON_FALLTHROUGH;
14164  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14165  CYTHON_FALLTHROUGH;
14166  case 0: break;
14167  default: goto __pyx_L5_argtuple_error;
14168  }
14169  kw_args = PyDict_Size(__pyx_kwds);
14170  switch (pos_args) {
14171  case 0:
14172  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_l2g)) != 0)) kw_args--;
14173  else goto __pyx_L5_argtuple_error;
14174  CYTHON_FALLTHROUGH;
14175  case 1:
14176  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_da)) != 0)) kw_args--;
14177  else {
14178  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_strong", 1, 7, 7, 1); __PYX_ERR(0, 3383, __pyx_L3_error)
14179  }
14180  CYTHON_FALLTHROUGH;
14181  case 2:
14182  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dphi)) != 0)) kw_args--;
14183  else {
14184  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_strong", 1, 7, 7, 2); __PYX_ERR(0, 3383, __pyx_L3_error)
14185  }
14186  CYTHON_FALLTHROUGH;
14187  case 3:
14188  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_phi)) != 0)) kw_args--;
14189  else {
14190  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_strong", 1, 7, 7, 3); __PYX_ERR(0, 3383, __pyx_L3_error)
14191  }
14192  CYTHON_FALLTHROUGH;
14193  case 4:
14194  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_u)) != 0)) kw_args--;
14195  else {
14196  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_strong", 1, 7, 7, 4); __PYX_ERR(0, 3383, __pyx_L3_error)
14197  }
14198  CYTHON_FALLTHROUGH;
14199  case 5:
14200  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_v)) != 0)) kw_args--;
14201  else {
14202  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_strong", 1, 7, 7, 5); __PYX_ERR(0, 3383, __pyx_L3_error)
14203  }
14204  CYTHON_FALLTHROUGH;
14205  case 6:
14206  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dstrong_residual)) != 0)) kw_args--;
14207  else {
14208  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_strong", 1, 7, 7, 6); __PYX_ERR(0, 3383, __pyx_L3_error)
14209  }
14210  }
14211  if (unlikely(kw_args > 0)) {
14212  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateDiffusionJacobian_strong") < 0)) __PYX_ERR(0, 3383, __pyx_L3_error)
14213  }
14214  } else if (PyTuple_GET_SIZE(__pyx_args) != 7) {
14215  goto __pyx_L5_argtuple_error;
14216  } else {
14217  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14218  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14219  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
14220  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
14221  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
14222  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
14223  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
14224  }
14225  __pyx_v_l2g = ((PyArrayObject *)values[0]);
14226  __pyx_v_da = ((PyArrayObject *)values[1]);
14227  __pyx_v_dphi = ((PyArrayObject *)values[2]);
14228  __pyx_v_grad_phi = ((PyArrayObject *)values[3]);
14229  __pyx_v_grad_u = ((PyArrayObject *)values[4]);
14230  __pyx_v_grad_v = ((PyArrayObject *)values[5]);
14231  __pyx_v_dstrong_residual = ((PyArrayObject *)values[6]);
14232  }
14233  goto __pyx_L4_argument_unpacking_done;
14234  __pyx_L5_argtuple_error:;
14235  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_strong", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3383, __pyx_L3_error)
14236  __pyx_L3_error:;
14237  __Pyx_AddTraceback("cfemIntegrals.updateDiffusionJacobian_strong", __pyx_clineno, __pyx_lineno, __pyx_filename);
14238  __Pyx_RefNannyFinishContext();
14239  return NULL;
14240  __pyx_L4_argument_unpacking_done:;
14241  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_l2g), __pyx_ptype_5numpy_ndarray, 1, "l2g", 0))) __PYX_ERR(0, 3383, __pyx_L1_error)
14242  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_da), __pyx_ptype_5numpy_ndarray, 1, "da", 0))) __PYX_ERR(0, 3384, __pyx_L1_error)
14243  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dphi), __pyx_ptype_5numpy_ndarray, 1, "dphi", 0))) __PYX_ERR(0, 3385, __pyx_L1_error)
14244  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_phi), __pyx_ptype_5numpy_ndarray, 1, "grad_phi", 0))) __PYX_ERR(0, 3386, __pyx_L1_error)
14245  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_u), __pyx_ptype_5numpy_ndarray, 1, "grad_u", 0))) __PYX_ERR(0, 3387, __pyx_L1_error)
14246  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_v), __pyx_ptype_5numpy_ndarray, 1, "grad_v", 0))) __PYX_ERR(0, 3388, __pyx_L1_error)
14247  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dstrong_residual), __pyx_ptype_5numpy_ndarray, 1, "dstrong_residual", 0))) __PYX_ERR(0, 3389, __pyx_L1_error)
14248  __pyx_r = __pyx_pf_13cfemIntegrals_114updateDiffusionJacobian_strong(__pyx_self, __pyx_v_l2g, __pyx_v_da, __pyx_v_dphi, __pyx_v_grad_phi, __pyx_v_grad_u, __pyx_v_grad_v, __pyx_v_dstrong_residual);
14249 
14250  /* function exit code */
14251  goto __pyx_L0;
14252  __pyx_L1_error:;
14253  __pyx_r = NULL;
14254  __pyx_L0:;
14255  __Pyx_RefNannyFinishContext();
14256  return __pyx_r;
14257 }
14258 
14259 static PyObject *__pyx_pf_13cfemIntegrals_114updateDiffusionJacobian_strong(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_da, PyArrayObject *__pyx_v_dphi, PyArrayObject *__pyx_v_grad_phi, PyArrayObject *__pyx_v_grad_u, PyArrayObject *__pyx_v_grad_v, PyArrayObject *__pyx_v_dstrong_residual) {
14260  int __pyx_v_nElements_global;
14261  int __pyx_v_nQuadraturePoints_element;
14262  int __pyx_v_nDOF_trial_element;
14263  int __pyx_v_nSpace;
14264  PyObject *__pyx_r = NULL;
14265  __Pyx_RefNannyDeclarations
14266  __Pyx_RefNannySetupContext("updateDiffusionJacobian_strong", 0);
14267 
14268  /* "cfemIntegrals.pyx":3390
14269  * np.ndarray grad_v,
14270  * np.ndarray dstrong_residual):
14271  * cdef int nElements_global = grad_v.shape[0] # <<<<<<<<<<<<<<
14272  * cdef int nQuadraturePoints_element = grad_v.shape[1]
14273  * cdef int nDOF_trial_element = grad_v.shape[2]
14274  */
14275  __pyx_v_nElements_global = (__pyx_v_grad_v->dimensions[0]);
14276 
14277  /* "cfemIntegrals.pyx":3391
14278  * np.ndarray dstrong_residual):
14279  * cdef int nElements_global = grad_v.shape[0]
14280  * cdef int nQuadraturePoints_element = grad_v.shape[1] # <<<<<<<<<<<<<<
14281  * cdef int nDOF_trial_element = grad_v.shape[2]
14282  * cdef int nSpace = grad_v.shape[3]
14283  */
14284  __pyx_v_nQuadraturePoints_element = (__pyx_v_grad_v->dimensions[1]);
14285 
14286  /* "cfemIntegrals.pyx":3392
14287  * cdef int nElements_global = grad_v.shape[0]
14288  * cdef int nQuadraturePoints_element = grad_v.shape[1]
14289  * cdef int nDOF_trial_element = grad_v.shape[2] # <<<<<<<<<<<<<<
14290  * cdef int nSpace = grad_v.shape[3]
14291  * cupdateDiffusionJacobian_strong(nElements_global,
14292  */
14293  __pyx_v_nDOF_trial_element = (__pyx_v_grad_v->dimensions[2]);
14294 
14295  /* "cfemIntegrals.pyx":3393
14296  * cdef int nQuadraturePoints_element = grad_v.shape[1]
14297  * cdef int nDOF_trial_element = grad_v.shape[2]
14298  * cdef int nSpace = grad_v.shape[3] # <<<<<<<<<<<<<<
14299  * cupdateDiffusionJacobian_strong(nElements_global,
14300  * nQuadraturePoints_element,
14301  */
14302  __pyx_v_nSpace = (__pyx_v_grad_v->dimensions[3]);
14303 
14304  /* "cfemIntegrals.pyx":3394
14305  * cdef int nDOF_trial_element = grad_v.shape[2]
14306  * cdef int nSpace = grad_v.shape[3]
14307  * cupdateDiffusionJacobian_strong(nElements_global, # <<<<<<<<<<<<<<
14308  * nQuadraturePoints_element,
14309  * nDOF_trial_element,
14310  */
14311  updateDiffusionJacobian_strong(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_trial_element, __pyx_v_nSpace, ((int *)__pyx_v_l2g->data), ((double *)__pyx_v_da->data), ((double *)__pyx_v_dphi->data), ((double *)__pyx_v_grad_phi->data), ((double *)__pyx_v_grad_u->data), ((double *)__pyx_v_grad_v->data), ((double *)__pyx_v_dstrong_residual->data));
14312 
14313  /* "cfemIntegrals.pyx":3383
14314  * <double*> grad_u.data,
14315  * <double*> strong_residual.data)
14316  * def updateDiffusionJacobian_strong(np.ndarray l2g, # <<<<<<<<<<<<<<
14317  * np.ndarray da,
14318  * np.ndarray dphi,
14319  */
14320 
14321  /* function exit code */
14322  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
14323  __Pyx_XGIVEREF(__pyx_r);
14324  __Pyx_RefNannyFinishContext();
14325  return __pyx_r;
14326 }
14327 
14328 /* "cfemIntegrals.pyx":3405
14329  * <double*>grad_v.data,
14330  * <double*>dstrong_residual.data)
14331  * def updateDiffusionJacobian_strong_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
14332  * np.ndarray colind,
14333  * np.ndarray l2g,
14334  */
14335 
14336 /* Python wrapper */
14337 static PyObject *__pyx_pw_13cfemIntegrals_117updateDiffusionJacobian_strong_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14338 static PyMethodDef __pyx_mdef_13cfemIntegrals_117updateDiffusionJacobian_strong_sd = {"updateDiffusionJacobian_strong_sd", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_117updateDiffusionJacobian_strong_sd, METH_VARARGS|METH_KEYWORDS, 0};
14339 static PyObject *__pyx_pw_13cfemIntegrals_117updateDiffusionJacobian_strong_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14340  PyArrayObject *__pyx_v_rowptr = 0;
14341  PyArrayObject *__pyx_v_colind = 0;
14342  PyArrayObject *__pyx_v_l2g = 0;
14343  PyArrayObject *__pyx_v_da = 0;
14344  PyArrayObject *__pyx_v_dphi = 0;
14345  PyArrayObject *__pyx_v_grad_phi = 0;
14346  PyArrayObject *__pyx_v_grad_u = 0;
14347  PyArrayObject *__pyx_v_grad_v = 0;
14348  PyArrayObject *__pyx_v_dstrong_residual = 0;
14349  int __pyx_lineno = 0;
14350  const char *__pyx_filename = NULL;
14351  int __pyx_clineno = 0;
14352  PyObject *__pyx_r = 0;
14353  __Pyx_RefNannyDeclarations
14354  __Pyx_RefNannySetupContext("updateDiffusionJacobian_strong_sd (wrapper)", 0);
14355  {
14356  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rowptr,&__pyx_n_s_colind,&__pyx_n_s_l2g,&__pyx_n_s_da,&__pyx_n_s_dphi,&__pyx_n_s_grad_phi,&__pyx_n_s_grad_u,&__pyx_n_s_grad_v,&__pyx_n_s_dstrong_residual,0};
14357  PyObject* values[9] = {0,0,0,0,0,0,0,0,0};
14358  if (unlikely(__pyx_kwds)) {
14359  Py_ssize_t kw_args;
14360  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14361  switch (pos_args) {
14362  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
14363  CYTHON_FALLTHROUGH;
14364  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
14365  CYTHON_FALLTHROUGH;
14366  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
14367  CYTHON_FALLTHROUGH;
14368  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
14369  CYTHON_FALLTHROUGH;
14370  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
14371  CYTHON_FALLTHROUGH;
14372  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
14373  CYTHON_FALLTHROUGH;
14374  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
14375  CYTHON_FALLTHROUGH;
14376  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14377  CYTHON_FALLTHROUGH;
14378  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14379  CYTHON_FALLTHROUGH;
14380  case 0: break;
14381  default: goto __pyx_L5_argtuple_error;
14382  }
14383  kw_args = PyDict_Size(__pyx_kwds);
14384  switch (pos_args) {
14385  case 0:
14386  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rowptr)) != 0)) kw_args--;
14387  else goto __pyx_L5_argtuple_error;
14388  CYTHON_FALLTHROUGH;
14389  case 1:
14390  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_colind)) != 0)) kw_args--;
14391  else {
14392  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_strong_sd", 1, 9, 9, 1); __PYX_ERR(0, 3405, __pyx_L3_error)
14393  }
14394  CYTHON_FALLTHROUGH;
14395  case 2:
14396  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_l2g)) != 0)) kw_args--;
14397  else {
14398  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_strong_sd", 1, 9, 9, 2); __PYX_ERR(0, 3405, __pyx_L3_error)
14399  }
14400  CYTHON_FALLTHROUGH;
14401  case 3:
14402  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_da)) != 0)) kw_args--;
14403  else {
14404  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_strong_sd", 1, 9, 9, 3); __PYX_ERR(0, 3405, __pyx_L3_error)
14405  }
14406  CYTHON_FALLTHROUGH;
14407  case 4:
14408  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dphi)) != 0)) kw_args--;
14409  else {
14410  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_strong_sd", 1, 9, 9, 4); __PYX_ERR(0, 3405, __pyx_L3_error)
14411  }
14412  CYTHON_FALLTHROUGH;
14413  case 5:
14414  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_phi)) != 0)) kw_args--;
14415  else {
14416  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_strong_sd", 1, 9, 9, 5); __PYX_ERR(0, 3405, __pyx_L3_error)
14417  }
14418  CYTHON_FALLTHROUGH;
14419  case 6:
14420  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_u)) != 0)) kw_args--;
14421  else {
14422  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_strong_sd", 1, 9, 9, 6); __PYX_ERR(0, 3405, __pyx_L3_error)
14423  }
14424  CYTHON_FALLTHROUGH;
14425  case 7:
14426  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_v)) != 0)) kw_args--;
14427  else {
14428  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_strong_sd", 1, 9, 9, 7); __PYX_ERR(0, 3405, __pyx_L3_error)
14429  }
14430  CYTHON_FALLTHROUGH;
14431  case 8:
14432  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dstrong_residual)) != 0)) kw_args--;
14433  else {
14434  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_strong_sd", 1, 9, 9, 8); __PYX_ERR(0, 3405, __pyx_L3_error)
14435  }
14436  }
14437  if (unlikely(kw_args > 0)) {
14438  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateDiffusionJacobian_strong_sd") < 0)) __PYX_ERR(0, 3405, __pyx_L3_error)
14439  }
14440  } else if (PyTuple_GET_SIZE(__pyx_args) != 9) {
14441  goto __pyx_L5_argtuple_error;
14442  } else {
14443  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14444  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14445  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
14446  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
14447  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
14448  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
14449  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
14450  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
14451  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
14452  }
14453  __pyx_v_rowptr = ((PyArrayObject *)values[0]);
14454  __pyx_v_colind = ((PyArrayObject *)values[1]);
14455  __pyx_v_l2g = ((PyArrayObject *)values[2]);
14456  __pyx_v_da = ((PyArrayObject *)values[3]);
14457  __pyx_v_dphi = ((PyArrayObject *)values[4]);
14458  __pyx_v_grad_phi = ((PyArrayObject *)values[5]);
14459  __pyx_v_grad_u = ((PyArrayObject *)values[6]);
14460  __pyx_v_grad_v = ((PyArrayObject *)values[7]);
14461  __pyx_v_dstrong_residual = ((PyArrayObject *)values[8]);
14462  }
14463  goto __pyx_L4_argument_unpacking_done;
14464  __pyx_L5_argtuple_error:;
14465  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_strong_sd", 1, 9, 9, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3405, __pyx_L3_error)
14466  __pyx_L3_error:;
14467  __Pyx_AddTraceback("cfemIntegrals.updateDiffusionJacobian_strong_sd", __pyx_clineno, __pyx_lineno, __pyx_filename);
14468  __Pyx_RefNannyFinishContext();
14469  return NULL;
14470  __pyx_L4_argument_unpacking_done:;
14471  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rowptr), __pyx_ptype_5numpy_ndarray, 1, "rowptr", 0))) __PYX_ERR(0, 3405, __pyx_L1_error)
14472  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_colind), __pyx_ptype_5numpy_ndarray, 1, "colind", 0))) __PYX_ERR(0, 3406, __pyx_L1_error)
14473  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_l2g), __pyx_ptype_5numpy_ndarray, 1, "l2g", 0))) __PYX_ERR(0, 3407, __pyx_L1_error)
14474  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_da), __pyx_ptype_5numpy_ndarray, 1, "da", 0))) __PYX_ERR(0, 3408, __pyx_L1_error)
14475  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dphi), __pyx_ptype_5numpy_ndarray, 1, "dphi", 0))) __PYX_ERR(0, 3409, __pyx_L1_error)
14476  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_phi), __pyx_ptype_5numpy_ndarray, 1, "grad_phi", 0))) __PYX_ERR(0, 3410, __pyx_L1_error)
14477  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_u), __pyx_ptype_5numpy_ndarray, 1, "grad_u", 0))) __PYX_ERR(0, 3411, __pyx_L1_error)
14478  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_v), __pyx_ptype_5numpy_ndarray, 1, "grad_v", 0))) __PYX_ERR(0, 3412, __pyx_L1_error)
14479  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dstrong_residual), __pyx_ptype_5numpy_ndarray, 1, "dstrong_residual", 0))) __PYX_ERR(0, 3413, __pyx_L1_error)
14480  __pyx_r = __pyx_pf_13cfemIntegrals_116updateDiffusionJacobian_strong_sd(__pyx_self, __pyx_v_rowptr, __pyx_v_colind, __pyx_v_l2g, __pyx_v_da, __pyx_v_dphi, __pyx_v_grad_phi, __pyx_v_grad_u, __pyx_v_grad_v, __pyx_v_dstrong_residual);
14481 
14482  /* function exit code */
14483  goto __pyx_L0;
14484  __pyx_L1_error:;
14485  __pyx_r = NULL;
14486  __pyx_L0:;
14487  __Pyx_RefNannyFinishContext();
14488  return __pyx_r;
14489 }
14490 
14491 static PyObject *__pyx_pf_13cfemIntegrals_116updateDiffusionJacobian_strong_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_da, PyArrayObject *__pyx_v_dphi, PyArrayObject *__pyx_v_grad_phi, PyArrayObject *__pyx_v_grad_u, PyArrayObject *__pyx_v_grad_v, PyArrayObject *__pyx_v_dstrong_residual) {
14492  int __pyx_v_nElements_global;
14493  int __pyx_v_nQuadraturePoints_element;
14494  int __pyx_v_nDOF_trial_element;
14495  int __pyx_v_nSpace;
14496  PyObject *__pyx_r = NULL;
14497  __Pyx_RefNannyDeclarations
14498  __Pyx_RefNannySetupContext("updateDiffusionJacobian_strong_sd", 0);
14499 
14500  /* "cfemIntegrals.pyx":3414
14501  * np.ndarray grad_v,
14502  * np.ndarray dstrong_residual):
14503  * cdef int nElements_global = grad_v.shape[0] # <<<<<<<<<<<<<<
14504  * cdef int nQuadraturePoints_element = grad_v.shape[1]
14505  * cdef int nDOF_trial_element = grad_v.shape[2]
14506  */
14507  __pyx_v_nElements_global = (__pyx_v_grad_v->dimensions[0]);
14508 
14509  /* "cfemIntegrals.pyx":3415
14510  * np.ndarray dstrong_residual):
14511  * cdef int nElements_global = grad_v.shape[0]
14512  * cdef int nQuadraturePoints_element = grad_v.shape[1] # <<<<<<<<<<<<<<
14513  * cdef int nDOF_trial_element = grad_v.shape[2]
14514  * cdef int nSpace = grad_v.shape[3]
14515  */
14516  __pyx_v_nQuadraturePoints_element = (__pyx_v_grad_v->dimensions[1]);
14517 
14518  /* "cfemIntegrals.pyx":3416
14519  * cdef int nElements_global = grad_v.shape[0]
14520  * cdef int nQuadraturePoints_element = grad_v.shape[1]
14521  * cdef int nDOF_trial_element = grad_v.shape[2] # <<<<<<<<<<<<<<
14522  * cdef int nSpace = grad_v.shape[3]
14523  * cupdateDiffusionJacobian_strong_sd(nElements_global,
14524  */
14525  __pyx_v_nDOF_trial_element = (__pyx_v_grad_v->dimensions[2]);
14526 
14527  /* "cfemIntegrals.pyx":3417
14528  * cdef int nQuadraturePoints_element = grad_v.shape[1]
14529  * cdef int nDOF_trial_element = grad_v.shape[2]
14530  * cdef int nSpace = grad_v.shape[3] # <<<<<<<<<<<<<<
14531  * cupdateDiffusionJacobian_strong_sd(nElements_global,
14532  * nQuadraturePoints_element,
14533  */
14534  __pyx_v_nSpace = (__pyx_v_grad_v->dimensions[3]);
14535 
14536  /* "cfemIntegrals.pyx":3418
14537  * cdef int nDOF_trial_element = grad_v.shape[2]
14538  * cdef int nSpace = grad_v.shape[3]
14539  * cupdateDiffusionJacobian_strong_sd(nElements_global, # <<<<<<<<<<<<<<
14540  * nQuadraturePoints_element,
14541  * nDOF_trial_element,
14542  */
14543  updateDiffusionJacobian_strong_sd(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_trial_element, __pyx_v_nSpace, ((int *)__pyx_v_rowptr->data), ((int *)__pyx_v_colind->data), ((int *)__pyx_v_l2g->data), ((double *)__pyx_v_da->data), ((double *)__pyx_v_dphi->data), ((double *)__pyx_v_grad_phi->data), ((double *)__pyx_v_grad_u->data), ((double *)__pyx_v_grad_v->data), ((double *)__pyx_v_dstrong_residual->data));
14544 
14545  /* "cfemIntegrals.pyx":3405
14546  * <double*>grad_v.data,
14547  * <double*>dstrong_residual.data)
14548  * def updateDiffusionJacobian_strong_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
14549  * np.ndarray colind,
14550  * np.ndarray l2g,
14551  */
14552 
14553  /* function exit code */
14554  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
14555  __Pyx_XGIVEREF(__pyx_r);
14556  __Pyx_RefNannyFinishContext();
14557  return __pyx_r;
14558 }
14559 
14560 /* "cfemIntegrals.pyx":3431
14561  * <double*> grad_v.data,
14562  * <double*> dstrong_residual.data)
14563  * def updateDiffusion_adjoint(np.ndarray da, # <<<<<<<<<<<<<<
14564  * np.ndarray grad_phi,
14565  * np.ndarray grad_w_dV,
14566  */
14567 
14568 /* Python wrapper */
14569 static PyObject *__pyx_pw_13cfemIntegrals_119updateDiffusion_adjoint(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14570 static PyMethodDef __pyx_mdef_13cfemIntegrals_119updateDiffusion_adjoint = {"updateDiffusion_adjoint", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_119updateDiffusion_adjoint, METH_VARARGS|METH_KEYWORDS, 0};
14571 static PyObject *__pyx_pw_13cfemIntegrals_119updateDiffusion_adjoint(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14572  PyArrayObject *__pyx_v_da = 0;
14573  PyArrayObject *__pyx_v_grad_phi = 0;
14574  PyArrayObject *__pyx_v_grad_w_dV = 0;
14575  PyArrayObject *__pyx_v_Lstar_w_dV = 0;
14576  int __pyx_lineno = 0;
14577  const char *__pyx_filename = NULL;
14578  int __pyx_clineno = 0;
14579  PyObject *__pyx_r = 0;
14580  __Pyx_RefNannyDeclarations
14581  __Pyx_RefNannySetupContext("updateDiffusion_adjoint (wrapper)", 0);
14582  {
14583  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_da,&__pyx_n_s_grad_phi,&__pyx_n_s_grad_w_dV,&__pyx_n_s_Lstar_w_dV,0};
14584  PyObject* values[4] = {0,0,0,0};
14585  if (unlikely(__pyx_kwds)) {
14586  Py_ssize_t kw_args;
14587  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14588  switch (pos_args) {
14589  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
14590  CYTHON_FALLTHROUGH;
14591  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
14592  CYTHON_FALLTHROUGH;
14593  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14594  CYTHON_FALLTHROUGH;
14595  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14596  CYTHON_FALLTHROUGH;
14597  case 0: break;
14598  default: goto __pyx_L5_argtuple_error;
14599  }
14600  kw_args = PyDict_Size(__pyx_kwds);
14601  switch (pos_args) {
14602  case 0:
14603  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_da)) != 0)) kw_args--;
14604  else goto __pyx_L5_argtuple_error;
14605  CYTHON_FALLTHROUGH;
14606  case 1:
14607  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_phi)) != 0)) kw_args--;
14608  else {
14609  __Pyx_RaiseArgtupleInvalid("updateDiffusion_adjoint", 1, 4, 4, 1); __PYX_ERR(0, 3431, __pyx_L3_error)
14610  }
14611  CYTHON_FALLTHROUGH;
14612  case 2:
14613  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_w_dV)) != 0)) kw_args--;
14614  else {
14615  __Pyx_RaiseArgtupleInvalid("updateDiffusion_adjoint", 1, 4, 4, 2); __PYX_ERR(0, 3431, __pyx_L3_error)
14616  }
14617  CYTHON_FALLTHROUGH;
14618  case 3:
14619  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Lstar_w_dV)) != 0)) kw_args--;
14620  else {
14621  __Pyx_RaiseArgtupleInvalid("updateDiffusion_adjoint", 1, 4, 4, 3); __PYX_ERR(0, 3431, __pyx_L3_error)
14622  }
14623  }
14624  if (unlikely(kw_args > 0)) {
14625  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateDiffusion_adjoint") < 0)) __PYX_ERR(0, 3431, __pyx_L3_error)
14626  }
14627  } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
14628  goto __pyx_L5_argtuple_error;
14629  } else {
14630  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14631  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14632  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
14633  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
14634  }
14635  __pyx_v_da = ((PyArrayObject *)values[0]);
14636  __pyx_v_grad_phi = ((PyArrayObject *)values[1]);
14637  __pyx_v_grad_w_dV = ((PyArrayObject *)values[2]);
14638  __pyx_v_Lstar_w_dV = ((PyArrayObject *)values[3]);
14639  }
14640  goto __pyx_L4_argument_unpacking_done;
14641  __pyx_L5_argtuple_error:;
14642  __Pyx_RaiseArgtupleInvalid("updateDiffusion_adjoint", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3431, __pyx_L3_error)
14643  __pyx_L3_error:;
14644  __Pyx_AddTraceback("cfemIntegrals.updateDiffusion_adjoint", __pyx_clineno, __pyx_lineno, __pyx_filename);
14645  __Pyx_RefNannyFinishContext();
14646  return NULL;
14647  __pyx_L4_argument_unpacking_done:;
14648  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_da), __pyx_ptype_5numpy_ndarray, 1, "da", 0))) __PYX_ERR(0, 3431, __pyx_L1_error)
14649  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_phi), __pyx_ptype_5numpy_ndarray, 1, "grad_phi", 0))) __PYX_ERR(0, 3432, __pyx_L1_error)
14650  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_w_dV), __pyx_ptype_5numpy_ndarray, 1, "grad_w_dV", 0))) __PYX_ERR(0, 3433, __pyx_L1_error)
14651  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Lstar_w_dV), __pyx_ptype_5numpy_ndarray, 1, "Lstar_w_dV", 0))) __PYX_ERR(0, 3434, __pyx_L1_error)
14652  __pyx_r = __pyx_pf_13cfemIntegrals_118updateDiffusion_adjoint(__pyx_self, __pyx_v_da, __pyx_v_grad_phi, __pyx_v_grad_w_dV, __pyx_v_Lstar_w_dV);
14653 
14654  /* function exit code */
14655  goto __pyx_L0;
14656  __pyx_L1_error:;
14657  __pyx_r = NULL;
14658  __pyx_L0:;
14659  __Pyx_RefNannyFinishContext();
14660  return __pyx_r;
14661 }
14662 
14663 static PyObject *__pyx_pf_13cfemIntegrals_118updateDiffusion_adjoint(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_da, PyArrayObject *__pyx_v_grad_phi, PyArrayObject *__pyx_v_grad_w_dV, PyArrayObject *__pyx_v_Lstar_w_dV) {
14664  int __pyx_v_nElements_global;
14665  int __pyx_v_nQuadraturePoints_element;
14666  int __pyx_v_nDOF_test_element;
14667  int __pyx_v_nSpace;
14668  PyObject *__pyx_r = NULL;
14669  __Pyx_RefNannyDeclarations
14670  __Pyx_RefNannySetupContext("updateDiffusion_adjoint", 0);
14671 
14672  /* "cfemIntegrals.pyx":3435
14673  * np.ndarray grad_w_dV,
14674  * np.ndarray Lstar_w_dV):
14675  * cdef int nElements_global = grad_w_dV.shape[0] # <<<<<<<<<<<<<<
14676  * cdef int nQuadraturePoints_element = grad_w_dV.shape[1]
14677  * cdef int nDOF_test_element = grad_w_dV.shape[2]
14678  */
14679  __pyx_v_nElements_global = (__pyx_v_grad_w_dV->dimensions[0]);
14680 
14681  /* "cfemIntegrals.pyx":3436
14682  * np.ndarray Lstar_w_dV):
14683  * cdef int nElements_global = grad_w_dV.shape[0]
14684  * cdef int nQuadraturePoints_element = grad_w_dV.shape[1] # <<<<<<<<<<<<<<
14685  * cdef int nDOF_test_element = grad_w_dV.shape[2]
14686  * cdef int nSpace = grad_w_dV.shape[3]
14687  */
14688  __pyx_v_nQuadraturePoints_element = (__pyx_v_grad_w_dV->dimensions[1]);
14689 
14690  /* "cfemIntegrals.pyx":3437
14691  * cdef int nElements_global = grad_w_dV.shape[0]
14692  * cdef int nQuadraturePoints_element = grad_w_dV.shape[1]
14693  * cdef int nDOF_test_element = grad_w_dV.shape[2] # <<<<<<<<<<<<<<
14694  * cdef int nSpace = grad_w_dV.shape[3]
14695  * cupdateDiffusion_adjoint(nElements_global,
14696  */
14697  __pyx_v_nDOF_test_element = (__pyx_v_grad_w_dV->dimensions[2]);
14698 
14699  /* "cfemIntegrals.pyx":3438
14700  * cdef int nQuadraturePoints_element = grad_w_dV.shape[1]
14701  * cdef int nDOF_test_element = grad_w_dV.shape[2]
14702  * cdef int nSpace = grad_w_dV.shape[3] # <<<<<<<<<<<<<<
14703  * cupdateDiffusion_adjoint(nElements_global,
14704  * nQuadraturePoints_element,
14705  */
14706  __pyx_v_nSpace = (__pyx_v_grad_w_dV->dimensions[3]);
14707 
14708  /* "cfemIntegrals.pyx":3439
14709  * cdef int nDOF_test_element = grad_w_dV.shape[2]
14710  * cdef int nSpace = grad_w_dV.shape[3]
14711  * cupdateDiffusion_adjoint(nElements_global, # <<<<<<<<<<<<<<
14712  * nQuadraturePoints_element,
14713  * nDOF_test_element,
14714  */
14715  updateDiffusion_adjoint(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_test_element, __pyx_v_nSpace, ((double *)__pyx_v_da->data), ((double *)__pyx_v_grad_phi->data), ((double *)__pyx_v_grad_w_dV->data), ((double *)__pyx_v_Lstar_w_dV->data));
14716 
14717  /* "cfemIntegrals.pyx":3431
14718  * <double*> grad_v.data,
14719  * <double*> dstrong_residual.data)
14720  * def updateDiffusion_adjoint(np.ndarray da, # <<<<<<<<<<<<<<
14721  * np.ndarray grad_phi,
14722  * np.ndarray grad_w_dV,
14723  */
14724 
14725  /* function exit code */
14726  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
14727  __Pyx_XGIVEREF(__pyx_r);
14728  __Pyx_RefNannyFinishContext();
14729  return __pyx_r;
14730 }
14731 
14732 /* "cfemIntegrals.pyx":3447
14733  * <double*>grad_w_dV.data,
14734  * <double*>Lstar_w_dV.data)
14735  * def updateDiffusion_adjoint_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
14736  * np.ndarray colind,
14737  * np.ndarray da,
14738  */
14739 
14740 /* Python wrapper */
14741 static PyObject *__pyx_pw_13cfemIntegrals_121updateDiffusion_adjoint_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14742 static PyMethodDef __pyx_mdef_13cfemIntegrals_121updateDiffusion_adjoint_sd = {"updateDiffusion_adjoint_sd", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_121updateDiffusion_adjoint_sd, METH_VARARGS|METH_KEYWORDS, 0};
14743 static PyObject *__pyx_pw_13cfemIntegrals_121updateDiffusion_adjoint_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14744  PyArrayObject *__pyx_v_rowptr = 0;
14745  PyArrayObject *__pyx_v_colind = 0;
14746  PyArrayObject *__pyx_v_da = 0;
14747  PyArrayObject *__pyx_v_grad_phi = 0;
14748  PyArrayObject *__pyx_v_grad_w_dV = 0;
14749  PyArrayObject *__pyx_v_Lstar_w_dV = 0;
14750  int __pyx_lineno = 0;
14751  const char *__pyx_filename = NULL;
14752  int __pyx_clineno = 0;
14753  PyObject *__pyx_r = 0;
14754  __Pyx_RefNannyDeclarations
14755  __Pyx_RefNannySetupContext("updateDiffusion_adjoint_sd (wrapper)", 0);
14756  {
14757  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rowptr,&__pyx_n_s_colind,&__pyx_n_s_da,&__pyx_n_s_grad_phi,&__pyx_n_s_grad_w_dV,&__pyx_n_s_Lstar_w_dV,0};
14758  PyObject* values[6] = {0,0,0,0,0,0};
14759  if (unlikely(__pyx_kwds)) {
14760  Py_ssize_t kw_args;
14761  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14762  switch (pos_args) {
14763  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
14764  CYTHON_FALLTHROUGH;
14765  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
14766  CYTHON_FALLTHROUGH;
14767  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
14768  CYTHON_FALLTHROUGH;
14769  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
14770  CYTHON_FALLTHROUGH;
14771  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14772  CYTHON_FALLTHROUGH;
14773  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14774  CYTHON_FALLTHROUGH;
14775  case 0: break;
14776  default: goto __pyx_L5_argtuple_error;
14777  }
14778  kw_args = PyDict_Size(__pyx_kwds);
14779  switch (pos_args) {
14780  case 0:
14781  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rowptr)) != 0)) kw_args--;
14782  else goto __pyx_L5_argtuple_error;
14783  CYTHON_FALLTHROUGH;
14784  case 1:
14785  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_colind)) != 0)) kw_args--;
14786  else {
14787  __Pyx_RaiseArgtupleInvalid("updateDiffusion_adjoint_sd", 1, 6, 6, 1); __PYX_ERR(0, 3447, __pyx_L3_error)
14788  }
14789  CYTHON_FALLTHROUGH;
14790  case 2:
14791  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_da)) != 0)) kw_args--;
14792  else {
14793  __Pyx_RaiseArgtupleInvalid("updateDiffusion_adjoint_sd", 1, 6, 6, 2); __PYX_ERR(0, 3447, __pyx_L3_error)
14794  }
14795  CYTHON_FALLTHROUGH;
14796  case 3:
14797  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_phi)) != 0)) kw_args--;
14798  else {
14799  __Pyx_RaiseArgtupleInvalid("updateDiffusion_adjoint_sd", 1, 6, 6, 3); __PYX_ERR(0, 3447, __pyx_L3_error)
14800  }
14801  CYTHON_FALLTHROUGH;
14802  case 4:
14803  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_w_dV)) != 0)) kw_args--;
14804  else {
14805  __Pyx_RaiseArgtupleInvalid("updateDiffusion_adjoint_sd", 1, 6, 6, 4); __PYX_ERR(0, 3447, __pyx_L3_error)
14806  }
14807  CYTHON_FALLTHROUGH;
14808  case 5:
14809  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Lstar_w_dV)) != 0)) kw_args--;
14810  else {
14811  __Pyx_RaiseArgtupleInvalid("updateDiffusion_adjoint_sd", 1, 6, 6, 5); __PYX_ERR(0, 3447, __pyx_L3_error)
14812  }
14813  }
14814  if (unlikely(kw_args > 0)) {
14815  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateDiffusion_adjoint_sd") < 0)) __PYX_ERR(0, 3447, __pyx_L3_error)
14816  }
14817  } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
14818  goto __pyx_L5_argtuple_error;
14819  } else {
14820  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14821  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14822  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
14823  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
14824  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
14825  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
14826  }
14827  __pyx_v_rowptr = ((PyArrayObject *)values[0]);
14828  __pyx_v_colind = ((PyArrayObject *)values[1]);
14829  __pyx_v_da = ((PyArrayObject *)values[2]);
14830  __pyx_v_grad_phi = ((PyArrayObject *)values[3]);
14831  __pyx_v_grad_w_dV = ((PyArrayObject *)values[4]);
14832  __pyx_v_Lstar_w_dV = ((PyArrayObject *)values[5]);
14833  }
14834  goto __pyx_L4_argument_unpacking_done;
14835  __pyx_L5_argtuple_error:;
14836  __Pyx_RaiseArgtupleInvalid("updateDiffusion_adjoint_sd", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3447, __pyx_L3_error)
14837  __pyx_L3_error:;
14838  __Pyx_AddTraceback("cfemIntegrals.updateDiffusion_adjoint_sd", __pyx_clineno, __pyx_lineno, __pyx_filename);
14839  __Pyx_RefNannyFinishContext();
14840  return NULL;
14841  __pyx_L4_argument_unpacking_done:;
14842  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rowptr), __pyx_ptype_5numpy_ndarray, 1, "rowptr", 0))) __PYX_ERR(0, 3447, __pyx_L1_error)
14843  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_colind), __pyx_ptype_5numpy_ndarray, 1, "colind", 0))) __PYX_ERR(0, 3448, __pyx_L1_error)
14844  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_da), __pyx_ptype_5numpy_ndarray, 1, "da", 0))) __PYX_ERR(0, 3449, __pyx_L1_error)
14845  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_phi), __pyx_ptype_5numpy_ndarray, 1, "grad_phi", 0))) __PYX_ERR(0, 3450, __pyx_L1_error)
14846  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_w_dV), __pyx_ptype_5numpy_ndarray, 1, "grad_w_dV", 0))) __PYX_ERR(0, 3451, __pyx_L1_error)
14847  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Lstar_w_dV), __pyx_ptype_5numpy_ndarray, 1, "Lstar_w_dV", 0))) __PYX_ERR(0, 3452, __pyx_L1_error)
14848  __pyx_r = __pyx_pf_13cfemIntegrals_120updateDiffusion_adjoint_sd(__pyx_self, __pyx_v_rowptr, __pyx_v_colind, __pyx_v_da, __pyx_v_grad_phi, __pyx_v_grad_w_dV, __pyx_v_Lstar_w_dV);
14849 
14850  /* function exit code */
14851  goto __pyx_L0;
14852  __pyx_L1_error:;
14853  __pyx_r = NULL;
14854  __pyx_L0:;
14855  __Pyx_RefNannyFinishContext();
14856  return __pyx_r;
14857 }
14858 
14859 static PyObject *__pyx_pf_13cfemIntegrals_120updateDiffusion_adjoint_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_da, PyArrayObject *__pyx_v_grad_phi, PyArrayObject *__pyx_v_grad_w_dV, PyArrayObject *__pyx_v_Lstar_w_dV) {
14860  npy_intp __pyx_v_nElements_global;
14861  npy_intp __pyx_v_nQuadraturePoints_element;
14862  npy_intp __pyx_v_nDOF_test_element;
14863  npy_intp __pyx_v_nSpace;
14864  PyObject *__pyx_r = NULL;
14865  __Pyx_RefNannyDeclarations
14866  __Pyx_RefNannySetupContext("updateDiffusion_adjoint_sd", 0);
14867 
14868  /* "cfemIntegrals.pyx":3453
14869  * np.ndarray grad_w_dV,
14870  * np.ndarray Lstar_w_dV):
14871  * nElements_global = grad_w_dV.shape[0] # <<<<<<<<<<<<<<
14872  * nQuadraturePoints_element = grad_w_dV.shape[1]
14873  * nDOF_test_element = grad_w_dV.shape[2]
14874  */
14875  __pyx_v_nElements_global = (__pyx_v_grad_w_dV->dimensions[0]);
14876 
14877  /* "cfemIntegrals.pyx":3454
14878  * np.ndarray Lstar_w_dV):
14879  * nElements_global = grad_w_dV.shape[0]
14880  * nQuadraturePoints_element = grad_w_dV.shape[1] # <<<<<<<<<<<<<<
14881  * nDOF_test_element = grad_w_dV.shape[2]
14882  * nSpace = grad_w_dV.shape[3]
14883  */
14884  __pyx_v_nQuadraturePoints_element = (__pyx_v_grad_w_dV->dimensions[1]);
14885 
14886  /* "cfemIntegrals.pyx":3455
14887  * nElements_global = grad_w_dV.shape[0]
14888  * nQuadraturePoints_element = grad_w_dV.shape[1]
14889  * nDOF_test_element = grad_w_dV.shape[2] # <<<<<<<<<<<<<<
14890  * nSpace = grad_w_dV.shape[3]
14891  * cupdateDiffusion_adjoint_sd(nElements_global,
14892  */
14893  __pyx_v_nDOF_test_element = (__pyx_v_grad_w_dV->dimensions[2]);
14894 
14895  /* "cfemIntegrals.pyx":3456
14896  * nQuadraturePoints_element = grad_w_dV.shape[1]
14897  * nDOF_test_element = grad_w_dV.shape[2]
14898  * nSpace = grad_w_dV.shape[3] # <<<<<<<<<<<<<<
14899  * cupdateDiffusion_adjoint_sd(nElements_global,
14900  * nQuadraturePoints_element,
14901  */
14902  __pyx_v_nSpace = (__pyx_v_grad_w_dV->dimensions[3]);
14903 
14904  /* "cfemIntegrals.pyx":3457
14905  * nDOF_test_element = grad_w_dV.shape[2]
14906  * nSpace = grad_w_dV.shape[3]
14907  * cupdateDiffusion_adjoint_sd(nElements_global, # <<<<<<<<<<<<<<
14908  * nQuadraturePoints_element,
14909  * nDOF_test_element,
14910  */
14911  updateDiffusion_adjoint_sd(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_test_element, __pyx_v_nSpace, ((int *)__pyx_v_rowptr->data), ((int *)__pyx_v_colind->data), ((double *)__pyx_v_da->data), ((double *)__pyx_v_grad_phi->data), ((double *)__pyx_v_grad_w_dV->data), ((double *)__pyx_v_Lstar_w_dV->data));
14912 
14913  /* "cfemIntegrals.pyx":3447
14914  * <double*>grad_w_dV.data,
14915  * <double*>Lstar_w_dV.data)
14916  * def updateDiffusion_adjoint_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
14917  * np.ndarray colind,
14918  * np.ndarray da,
14919  */
14920 
14921  /* function exit code */
14922  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
14923  __Pyx_XGIVEREF(__pyx_r);
14924  __Pyx_RefNannyFinishContext();
14925  return __pyx_r;
14926 }
14927 
14928 /* "cfemIntegrals.pyx":3467
14929  * <double*> grad_w_dV.data,
14930  * <double*> Lstar_w_dV.data)
14931  * def updateReaction_weak(np.ndarray r, # <<<<<<<<<<<<<<
14932  * np.ndarray w_dV,
14933  * np.ndarray weak_residual):
14934  */
14935 
14936 /* Python wrapper */
14937 static PyObject *__pyx_pw_13cfemIntegrals_123updateReaction_weak(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14938 static PyMethodDef __pyx_mdef_13cfemIntegrals_123updateReaction_weak = {"updateReaction_weak", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_123updateReaction_weak, METH_VARARGS|METH_KEYWORDS, 0};
14939 static PyObject *__pyx_pw_13cfemIntegrals_123updateReaction_weak(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14940  PyArrayObject *__pyx_v_r = 0;
14941  PyArrayObject *__pyx_v_w_dV = 0;
14942  PyArrayObject *__pyx_v_weak_residual = 0;
14943  int __pyx_lineno = 0;
14944  const char *__pyx_filename = NULL;
14945  int __pyx_clineno = 0;
14946  PyObject *__pyx_r = 0;
14947  __Pyx_RefNannyDeclarations
14948  __Pyx_RefNannySetupContext("updateReaction_weak (wrapper)", 0);
14949  {
14950  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_r,&__pyx_n_s_w_dV,&__pyx_n_s_weak_residual,0};
14951  PyObject* values[3] = {0,0,0};
14952  if (unlikely(__pyx_kwds)) {
14953  Py_ssize_t kw_args;
14954  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14955  switch (pos_args) {
14956  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
14957  CYTHON_FALLTHROUGH;
14958  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14959  CYTHON_FALLTHROUGH;
14960  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14961  CYTHON_FALLTHROUGH;
14962  case 0: break;
14963  default: goto __pyx_L5_argtuple_error;
14964  }
14965  kw_args = PyDict_Size(__pyx_kwds);
14966  switch (pos_args) {
14967  case 0:
14968  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_r)) != 0)) kw_args--;
14969  else goto __pyx_L5_argtuple_error;
14970  CYTHON_FALLTHROUGH;
14971  case 1:
14972  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_w_dV)) != 0)) kw_args--;
14973  else {
14974  __Pyx_RaiseArgtupleInvalid("updateReaction_weak", 1, 3, 3, 1); __PYX_ERR(0, 3467, __pyx_L3_error)
14975  }
14976  CYTHON_FALLTHROUGH;
14977  case 2:
14978  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weak_residual)) != 0)) kw_args--;
14979  else {
14980  __Pyx_RaiseArgtupleInvalid("updateReaction_weak", 1, 3, 3, 2); __PYX_ERR(0, 3467, __pyx_L3_error)
14981  }
14982  }
14983  if (unlikely(kw_args > 0)) {
14984  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateReaction_weak") < 0)) __PYX_ERR(0, 3467, __pyx_L3_error)
14985  }
14986  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
14987  goto __pyx_L5_argtuple_error;
14988  } else {
14989  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14990  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14991  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
14992  }
14993  __pyx_v_r = ((PyArrayObject *)values[0]);
14994  __pyx_v_w_dV = ((PyArrayObject *)values[1]);
14995  __pyx_v_weak_residual = ((PyArrayObject *)values[2]);
14996  }
14997  goto __pyx_L4_argument_unpacking_done;
14998  __pyx_L5_argtuple_error:;
14999  __Pyx_RaiseArgtupleInvalid("updateReaction_weak", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3467, __pyx_L3_error)
15000  __pyx_L3_error:;
15001  __Pyx_AddTraceback("cfemIntegrals.updateReaction_weak", __pyx_clineno, __pyx_lineno, __pyx_filename);
15002  __Pyx_RefNannyFinishContext();
15003  return NULL;
15004  __pyx_L4_argument_unpacking_done:;
15005  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_r), __pyx_ptype_5numpy_ndarray, 1, "r", 0))) __PYX_ERR(0, 3467, __pyx_L1_error)
15006  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w_dV), __pyx_ptype_5numpy_ndarray, 1, "w_dV", 0))) __PYX_ERR(0, 3468, __pyx_L1_error)
15007  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_weak_residual), __pyx_ptype_5numpy_ndarray, 1, "weak_residual", 0))) __PYX_ERR(0, 3469, __pyx_L1_error)
15008  __pyx_r = __pyx_pf_13cfemIntegrals_122updateReaction_weak(__pyx_self, __pyx_v_r, __pyx_v_w_dV, __pyx_v_weak_residual);
15009 
15010  /* function exit code */
15011  goto __pyx_L0;
15012  __pyx_L1_error:;
15013  __pyx_r = NULL;
15014  __pyx_L0:;
15015  __Pyx_RefNannyFinishContext();
15016  return __pyx_r;
15017 }
15018 
15019 static PyObject *__pyx_pf_13cfemIntegrals_122updateReaction_weak(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_r, PyArrayObject *__pyx_v_w_dV, PyArrayObject *__pyx_v_weak_residual) {
15020  int __pyx_v_nElements_global;
15021  int __pyx_v_nQuadraturePoints_element;
15022  int __pyx_v_nDOF_test_element;
15023  PyObject *__pyx_r = NULL;
15024  __Pyx_RefNannyDeclarations
15025  __Pyx_RefNannySetupContext("updateReaction_weak", 0);
15026 
15027  /* "cfemIntegrals.pyx":3470
15028  * np.ndarray w_dV,
15029  * np.ndarray weak_residual):
15030  * cdef int nElements_global = w_dV.shape[0] # <<<<<<<<<<<<<<
15031  * cdef int nQuadraturePoints_element = w_dV.shape[1]
15032  * cdef int nDOF_test_element = w_dV.shape[2]
15033  */
15034  __pyx_v_nElements_global = (__pyx_v_w_dV->dimensions[0]);
15035 
15036  /* "cfemIntegrals.pyx":3471
15037  * np.ndarray weak_residual):
15038  * cdef int nElements_global = w_dV.shape[0]
15039  * cdef int nQuadraturePoints_element = w_dV.shape[1] # <<<<<<<<<<<<<<
15040  * cdef int nDOF_test_element = w_dV.shape[2]
15041  * cupdateReaction_weak(nElements_global,
15042  */
15043  __pyx_v_nQuadraturePoints_element = (__pyx_v_w_dV->dimensions[1]);
15044 
15045  /* "cfemIntegrals.pyx":3472
15046  * cdef int nElements_global = w_dV.shape[0]
15047  * cdef int nQuadraturePoints_element = w_dV.shape[1]
15048  * cdef int nDOF_test_element = w_dV.shape[2] # <<<<<<<<<<<<<<
15049  * cupdateReaction_weak(nElements_global,
15050  * nQuadraturePoints_element,
15051  */
15052  __pyx_v_nDOF_test_element = (__pyx_v_w_dV->dimensions[2]);
15053 
15054  /* "cfemIntegrals.pyx":3473
15055  * cdef int nQuadraturePoints_element = w_dV.shape[1]
15056  * cdef int nDOF_test_element = w_dV.shape[2]
15057  * cupdateReaction_weak(nElements_global, # <<<<<<<<<<<<<<
15058  * nQuadraturePoints_element,
15059  * nDOF_test_element,
15060  */
15061  updateReaction_weak(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_test_element, ((double *)__pyx_v_r->data), ((double *)__pyx_v_w_dV->data), ((double *)__pyx_v_weak_residual->data));
15062 
15063  /* "cfemIntegrals.pyx":3467
15064  * <double*> grad_w_dV.data,
15065  * <double*> Lstar_w_dV.data)
15066  * def updateReaction_weak(np.ndarray r, # <<<<<<<<<<<<<<
15067  * np.ndarray w_dV,
15068  * np.ndarray weak_residual):
15069  */
15070 
15071  /* function exit code */
15072  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
15073  __Pyx_XGIVEREF(__pyx_r);
15074  __Pyx_RefNannyFinishContext();
15075  return __pyx_r;
15076 }
15077 
15078 /* "cfemIntegrals.pyx":3479
15079  * <double*>w_dV.data,
15080  * <double*>weak_residual.data)
15081  * def updateReactionJacobian_weak(np.ndarray dr, # <<<<<<<<<<<<<<
15082  * np.ndarray v_X_w_dV,
15083  * np.ndarray jacobian_weak_residual):
15084  */
15085 
15086 /* Python wrapper */
15087 static PyObject *__pyx_pw_13cfemIntegrals_125updateReactionJacobian_weak(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15088 static PyMethodDef __pyx_mdef_13cfemIntegrals_125updateReactionJacobian_weak = {"updateReactionJacobian_weak", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_125updateReactionJacobian_weak, METH_VARARGS|METH_KEYWORDS, 0};
15089 static PyObject *__pyx_pw_13cfemIntegrals_125updateReactionJacobian_weak(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15090  PyArrayObject *__pyx_v_dr = 0;
15091  PyArrayObject *__pyx_v_v_X_w_dV = 0;
15092  PyArrayObject *__pyx_v_jacobian_weak_residual = 0;
15093  int __pyx_lineno = 0;
15094  const char *__pyx_filename = NULL;
15095  int __pyx_clineno = 0;
15096  PyObject *__pyx_r = 0;
15097  __Pyx_RefNannyDeclarations
15098  __Pyx_RefNannySetupContext("updateReactionJacobian_weak (wrapper)", 0);
15099  {
15100  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dr,&__pyx_n_s_v_X_w_dV,&__pyx_n_s_jacobian_weak_residual,0};
15101  PyObject* values[3] = {0,0,0};
15102  if (unlikely(__pyx_kwds)) {
15103  Py_ssize_t kw_args;
15104  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15105  switch (pos_args) {
15106  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
15107  CYTHON_FALLTHROUGH;
15108  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15109  CYTHON_FALLTHROUGH;
15110  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15111  CYTHON_FALLTHROUGH;
15112  case 0: break;
15113  default: goto __pyx_L5_argtuple_error;
15114  }
15115  kw_args = PyDict_Size(__pyx_kwds);
15116  switch (pos_args) {
15117  case 0:
15118  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dr)) != 0)) kw_args--;
15119  else goto __pyx_L5_argtuple_error;
15120  CYTHON_FALLTHROUGH;
15121  case 1:
15122  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v_X_w_dV)) != 0)) kw_args--;
15123  else {
15124  __Pyx_RaiseArgtupleInvalid("updateReactionJacobian_weak", 1, 3, 3, 1); __PYX_ERR(0, 3479, __pyx_L3_error)
15125  }
15126  CYTHON_FALLTHROUGH;
15127  case 2:
15128  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jacobian_weak_residual)) != 0)) kw_args--;
15129  else {
15130  __Pyx_RaiseArgtupleInvalid("updateReactionJacobian_weak", 1, 3, 3, 2); __PYX_ERR(0, 3479, __pyx_L3_error)
15131  }
15132  }
15133  if (unlikely(kw_args > 0)) {
15134  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateReactionJacobian_weak") < 0)) __PYX_ERR(0, 3479, __pyx_L3_error)
15135  }
15136  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
15137  goto __pyx_L5_argtuple_error;
15138  } else {
15139  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15140  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15141  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
15142  }
15143  __pyx_v_dr = ((PyArrayObject *)values[0]);
15144  __pyx_v_v_X_w_dV = ((PyArrayObject *)values[1]);
15145  __pyx_v_jacobian_weak_residual = ((PyArrayObject *)values[2]);
15146  }
15147  goto __pyx_L4_argument_unpacking_done;
15148  __pyx_L5_argtuple_error:;
15149  __Pyx_RaiseArgtupleInvalid("updateReactionJacobian_weak", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3479, __pyx_L3_error)
15150  __pyx_L3_error:;
15151  __Pyx_AddTraceback("cfemIntegrals.updateReactionJacobian_weak", __pyx_clineno, __pyx_lineno, __pyx_filename);
15152  __Pyx_RefNannyFinishContext();
15153  return NULL;
15154  __pyx_L4_argument_unpacking_done:;
15155  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dr), __pyx_ptype_5numpy_ndarray, 1, "dr", 0))) __PYX_ERR(0, 3479, __pyx_L1_error)
15156  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v_X_w_dV), __pyx_ptype_5numpy_ndarray, 1, "v_X_w_dV", 0))) __PYX_ERR(0, 3480, __pyx_L1_error)
15157  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_jacobian_weak_residual), __pyx_ptype_5numpy_ndarray, 1, "jacobian_weak_residual", 0))) __PYX_ERR(0, 3481, __pyx_L1_error)
15158  __pyx_r = __pyx_pf_13cfemIntegrals_124updateReactionJacobian_weak(__pyx_self, __pyx_v_dr, __pyx_v_v_X_w_dV, __pyx_v_jacobian_weak_residual);
15159 
15160  /* function exit code */
15161  goto __pyx_L0;
15162  __pyx_L1_error:;
15163  __pyx_r = NULL;
15164  __pyx_L0:;
15165  __Pyx_RefNannyFinishContext();
15166  return __pyx_r;
15167 }
15168 
15169 static PyObject *__pyx_pf_13cfemIntegrals_124updateReactionJacobian_weak(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dr, PyArrayObject *__pyx_v_v_X_w_dV, PyArrayObject *__pyx_v_jacobian_weak_residual) {
15170  int __pyx_v_nElements_global;
15171  int __pyx_v_nQuadraturePoints_element;
15172  int __pyx_v_nDOF_trial_element;
15173  int __pyx_v_nDOF_test_element;
15174  PyObject *__pyx_r = NULL;
15175  __Pyx_RefNannyDeclarations
15176  __Pyx_RefNannySetupContext("updateReactionJacobian_weak", 0);
15177 
15178  /* "cfemIntegrals.pyx":3482
15179  * np.ndarray v_X_w_dV,
15180  * np.ndarray jacobian_weak_residual):
15181  * cdef int nElements_global = v_X_w_dV.shape[0] # <<<<<<<<<<<<<<
15182  * cdef int nQuadraturePoints_element = v_X_w_dV.shape[1]
15183  * cdef int nDOF_trial_element = v_X_w_dV.shape[2]
15184  */
15185  __pyx_v_nElements_global = (__pyx_v_v_X_w_dV->dimensions[0]);
15186 
15187  /* "cfemIntegrals.pyx":3483
15188  * np.ndarray jacobian_weak_residual):
15189  * cdef int nElements_global = v_X_w_dV.shape[0]
15190  * cdef int nQuadraturePoints_element = v_X_w_dV.shape[1] # <<<<<<<<<<<<<<
15191  * cdef int nDOF_trial_element = v_X_w_dV.shape[2]
15192  * cdef int nDOF_test_element = v_X_w_dV.shape[3]
15193  */
15194  __pyx_v_nQuadraturePoints_element = (__pyx_v_v_X_w_dV->dimensions[1]);
15195 
15196  /* "cfemIntegrals.pyx":3484
15197  * cdef int nElements_global = v_X_w_dV.shape[0]
15198  * cdef int nQuadraturePoints_element = v_X_w_dV.shape[1]
15199  * cdef int nDOF_trial_element = v_X_w_dV.shape[2] # <<<<<<<<<<<<<<
15200  * cdef int nDOF_test_element = v_X_w_dV.shape[3]
15201  * cupdateReactionJacobian_weak(nElements_global,
15202  */
15203  __pyx_v_nDOF_trial_element = (__pyx_v_v_X_w_dV->dimensions[2]);
15204 
15205  /* "cfemIntegrals.pyx":3485
15206  * cdef int nQuadraturePoints_element = v_X_w_dV.shape[1]
15207  * cdef int nDOF_trial_element = v_X_w_dV.shape[2]
15208  * cdef int nDOF_test_element = v_X_w_dV.shape[3] # <<<<<<<<<<<<<<
15209  * cupdateReactionJacobian_weak(nElements_global,
15210  * nQuadraturePoints_element,
15211  */
15212  __pyx_v_nDOF_test_element = (__pyx_v_v_X_w_dV->dimensions[3]);
15213 
15214  /* "cfemIntegrals.pyx":3486
15215  * cdef int nDOF_trial_element = v_X_w_dV.shape[2]
15216  * cdef int nDOF_test_element = v_X_w_dV.shape[3]
15217  * cupdateReactionJacobian_weak(nElements_global, # <<<<<<<<<<<<<<
15218  * nQuadraturePoints_element,
15219  * nDOF_trial_element,
15220  */
15221  updateReactionJacobian_weak(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_trial_element, __pyx_v_nDOF_test_element, ((double *)__pyx_v_dr->data), ((double *)__pyx_v_v_X_w_dV->data), ((double *)__pyx_v_jacobian_weak_residual->data));
15222 
15223  /* "cfemIntegrals.pyx":3479
15224  * <double*>w_dV.data,
15225  * <double*>weak_residual.data)
15226  * def updateReactionJacobian_weak(np.ndarray dr, # <<<<<<<<<<<<<<
15227  * np.ndarray v_X_w_dV,
15228  * np.ndarray jacobian_weak_residual):
15229  */
15230 
15231  /* function exit code */
15232  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
15233  __Pyx_XGIVEREF(__pyx_r);
15234  __Pyx_RefNannyFinishContext();
15235  return __pyx_r;
15236 }
15237 
15238 /* "cfemIntegrals.pyx":3493
15239  * <double*>v_X_w_dV.data,
15240  * <double*>jacobian_weak_residual.data)
15241  * def updateReactionJacobian_weak_lowmem(np.ndarray dr, # <<<<<<<<<<<<<<
15242  * np.ndarray v,
15243  * np.ndarray w_dV,
15244  */
15245 
15246 /* Python wrapper */
15247 static PyObject *__pyx_pw_13cfemIntegrals_127updateReactionJacobian_weak_lowmem(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15248 static PyMethodDef __pyx_mdef_13cfemIntegrals_127updateReactionJacobian_weak_lowmem = {"updateReactionJacobian_weak_lowmem", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_127updateReactionJacobian_weak_lowmem, METH_VARARGS|METH_KEYWORDS, 0};
15249 static PyObject *__pyx_pw_13cfemIntegrals_127updateReactionJacobian_weak_lowmem(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15250  PyArrayObject *__pyx_v_dr = 0;
15251  PyArrayObject *__pyx_v_v = 0;
15252  PyArrayObject *__pyx_v_w_dV = 0;
15253  PyArrayObject *__pyx_v_jacobian_weak_residual = 0;
15254  int __pyx_lineno = 0;
15255  const char *__pyx_filename = NULL;
15256  int __pyx_clineno = 0;
15257  PyObject *__pyx_r = 0;
15258  __Pyx_RefNannyDeclarations
15259  __Pyx_RefNannySetupContext("updateReactionJacobian_weak_lowmem (wrapper)", 0);
15260  {
15261  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dr,&__pyx_n_s_v,&__pyx_n_s_w_dV,&__pyx_n_s_jacobian_weak_residual,0};
15262  PyObject* values[4] = {0,0,0,0};
15263  if (unlikely(__pyx_kwds)) {
15264  Py_ssize_t kw_args;
15265  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15266  switch (pos_args) {
15267  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
15268  CYTHON_FALLTHROUGH;
15269  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
15270  CYTHON_FALLTHROUGH;
15271  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15272  CYTHON_FALLTHROUGH;
15273  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15274  CYTHON_FALLTHROUGH;
15275  case 0: break;
15276  default: goto __pyx_L5_argtuple_error;
15277  }
15278  kw_args = PyDict_Size(__pyx_kwds);
15279  switch (pos_args) {
15280  case 0:
15281  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dr)) != 0)) kw_args--;
15282  else goto __pyx_L5_argtuple_error;
15283  CYTHON_FALLTHROUGH;
15284  case 1:
15285  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
15286  else {
15287  __Pyx_RaiseArgtupleInvalid("updateReactionJacobian_weak_lowmem", 1, 4, 4, 1); __PYX_ERR(0, 3493, __pyx_L3_error)
15288  }
15289  CYTHON_FALLTHROUGH;
15290  case 2:
15291  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_w_dV)) != 0)) kw_args--;
15292  else {
15293  __Pyx_RaiseArgtupleInvalid("updateReactionJacobian_weak_lowmem", 1, 4, 4, 2); __PYX_ERR(0, 3493, __pyx_L3_error)
15294  }
15295  CYTHON_FALLTHROUGH;
15296  case 3:
15297  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jacobian_weak_residual)) != 0)) kw_args--;
15298  else {
15299  __Pyx_RaiseArgtupleInvalid("updateReactionJacobian_weak_lowmem", 1, 4, 4, 3); __PYX_ERR(0, 3493, __pyx_L3_error)
15300  }
15301  }
15302  if (unlikely(kw_args > 0)) {
15303  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateReactionJacobian_weak_lowmem") < 0)) __PYX_ERR(0, 3493, __pyx_L3_error)
15304  }
15305  } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
15306  goto __pyx_L5_argtuple_error;
15307  } else {
15308  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15309  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15310  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
15311  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
15312  }
15313  __pyx_v_dr = ((PyArrayObject *)values[0]);
15314  __pyx_v_v = ((PyArrayObject *)values[1]);
15315  __pyx_v_w_dV = ((PyArrayObject *)values[2]);
15316  __pyx_v_jacobian_weak_residual = ((PyArrayObject *)values[3]);
15317  }
15318  goto __pyx_L4_argument_unpacking_done;
15319  __pyx_L5_argtuple_error:;
15320  __Pyx_RaiseArgtupleInvalid("updateReactionJacobian_weak_lowmem", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3493, __pyx_L3_error)
15321  __pyx_L3_error:;
15322  __Pyx_AddTraceback("cfemIntegrals.updateReactionJacobian_weak_lowmem", __pyx_clineno, __pyx_lineno, __pyx_filename);
15323  __Pyx_RefNannyFinishContext();
15324  return NULL;
15325  __pyx_L4_argument_unpacking_done:;
15326  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dr), __pyx_ptype_5numpy_ndarray, 1, "dr", 0))) __PYX_ERR(0, 3493, __pyx_L1_error)
15327  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), __pyx_ptype_5numpy_ndarray, 1, "v", 0))) __PYX_ERR(0, 3494, __pyx_L1_error)
15328  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w_dV), __pyx_ptype_5numpy_ndarray, 1, "w_dV", 0))) __PYX_ERR(0, 3495, __pyx_L1_error)
15329  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_jacobian_weak_residual), __pyx_ptype_5numpy_ndarray, 1, "jacobian_weak_residual", 0))) __PYX_ERR(0, 3496, __pyx_L1_error)
15330  __pyx_r = __pyx_pf_13cfemIntegrals_126updateReactionJacobian_weak_lowmem(__pyx_self, __pyx_v_dr, __pyx_v_v, __pyx_v_w_dV, __pyx_v_jacobian_weak_residual);
15331 
15332  /* function exit code */
15333  goto __pyx_L0;
15334  __pyx_L1_error:;
15335  __pyx_r = NULL;
15336  __pyx_L0:;
15337  __Pyx_RefNannyFinishContext();
15338  return __pyx_r;
15339 }
15340 
15341 static PyObject *__pyx_pf_13cfemIntegrals_126updateReactionJacobian_weak_lowmem(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dr, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_w_dV, PyArrayObject *__pyx_v_jacobian_weak_residual) {
15342  int __pyx_v_nElements_global;
15343  int __pyx_v_nQuadraturePoints_element;
15344  int __pyx_v_nDOF_trial_element;
15345  int __pyx_v_nDOF_test_element;
15346  PyObject *__pyx_r = NULL;
15347  __Pyx_RefNannyDeclarations
15348  __Pyx_RefNannySetupContext("updateReactionJacobian_weak_lowmem", 0);
15349 
15350  /* "cfemIntegrals.pyx":3497
15351  * np.ndarray w_dV,
15352  * np.ndarray jacobian_weak_residual):
15353  * cdef int nElements_global = v.shape[0] # <<<<<<<<<<<<<<
15354  * cdef int nQuadraturePoints_element = v.shape[1]
15355  * cdef int nDOF_trial_element = v.shape[2]
15356  */
15357  __pyx_v_nElements_global = (__pyx_v_v->dimensions[0]);
15358 
15359  /* "cfemIntegrals.pyx":3498
15360  * np.ndarray jacobian_weak_residual):
15361  * cdef int nElements_global = v.shape[0]
15362  * cdef int nQuadraturePoints_element = v.shape[1] # <<<<<<<<<<<<<<
15363  * cdef int nDOF_trial_element = v.shape[2]
15364  * cdef int nDOF_test_element = w_dV.shape[2]
15365  */
15366  __pyx_v_nQuadraturePoints_element = (__pyx_v_v->dimensions[1]);
15367 
15368  /* "cfemIntegrals.pyx":3499
15369  * cdef int nElements_global = v.shape[0]
15370  * cdef int nQuadraturePoints_element = v.shape[1]
15371  * cdef int nDOF_trial_element = v.shape[2] # <<<<<<<<<<<<<<
15372  * cdef int nDOF_test_element = w_dV.shape[2]
15373  * cupdateReactionJacobian_weak_lowmem(nElements_global,
15374  */
15375  __pyx_v_nDOF_trial_element = (__pyx_v_v->dimensions[2]);
15376 
15377  /* "cfemIntegrals.pyx":3500
15378  * cdef int nQuadraturePoints_element = v.shape[1]
15379  * cdef int nDOF_trial_element = v.shape[2]
15380  * cdef int nDOF_test_element = w_dV.shape[2] # <<<<<<<<<<<<<<
15381  * cupdateReactionJacobian_weak_lowmem(nElements_global,
15382  * nQuadraturePoints_element,
15383  */
15384  __pyx_v_nDOF_test_element = (__pyx_v_w_dV->dimensions[2]);
15385 
15386  /* "cfemIntegrals.pyx":3501
15387  * cdef int nDOF_trial_element = v.shape[2]
15388  * cdef int nDOF_test_element = w_dV.shape[2]
15389  * cupdateReactionJacobian_weak_lowmem(nElements_global, # <<<<<<<<<<<<<<
15390  * nQuadraturePoints_element,
15391  * nDOF_trial_element,
15392  */
15393  updateReactionJacobian_weak_lowmem(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_trial_element, __pyx_v_nDOF_test_element, ((double *)__pyx_v_dr->data), ((double *)__pyx_v_v->data), ((double *)__pyx_v_w_dV->data), ((double *)__pyx_v_jacobian_weak_residual->data));
15394 
15395  /* "cfemIntegrals.pyx":3493
15396  * <double*>v_X_w_dV.data,
15397  * <double*>jacobian_weak_residual.data)
15398  * def updateReactionJacobian_weak_lowmem(np.ndarray dr, # <<<<<<<<<<<<<<
15399  * np.ndarray v,
15400  * np.ndarray w_dV,
15401  */
15402 
15403  /* function exit code */
15404  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
15405  __Pyx_XGIVEREF(__pyx_r);
15406  __Pyx_RefNannyFinishContext();
15407  return __pyx_r;
15408 }
15409 
15410 /* "cfemIntegrals.pyx":3509
15411  * <double*> w_dV.data,
15412  * <double*> jacobian_weak_residual.data)
15413  * def updateReaction_strong(np.ndarray r, # <<<<<<<<<<<<<<
15414  * np.ndarray strong_residual):
15415  * cdef int nElements_global = r.shape[0]
15416  */
15417 
15418 /* Python wrapper */
15419 static PyObject *__pyx_pw_13cfemIntegrals_129updateReaction_strong(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15420 static PyMethodDef __pyx_mdef_13cfemIntegrals_129updateReaction_strong = {"updateReaction_strong", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_129updateReaction_strong, METH_VARARGS|METH_KEYWORDS, 0};
15421 static PyObject *__pyx_pw_13cfemIntegrals_129updateReaction_strong(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15422  PyArrayObject *__pyx_v_r = 0;
15423  PyArrayObject *__pyx_v_strong_residual = 0;
15424  int __pyx_lineno = 0;
15425  const char *__pyx_filename = NULL;
15426  int __pyx_clineno = 0;
15427  PyObject *__pyx_r = 0;
15428  __Pyx_RefNannyDeclarations
15429  __Pyx_RefNannySetupContext("updateReaction_strong (wrapper)", 0);
15430  {
15431  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_r,&__pyx_n_s_strong_residual,0};
15432  PyObject* values[2] = {0,0};
15433  if (unlikely(__pyx_kwds)) {
15434  Py_ssize_t kw_args;
15435  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15436  switch (pos_args) {
15437  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15438  CYTHON_FALLTHROUGH;
15439  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15440  CYTHON_FALLTHROUGH;
15441  case 0: break;
15442  default: goto __pyx_L5_argtuple_error;
15443  }
15444  kw_args = PyDict_Size(__pyx_kwds);
15445  switch (pos_args) {
15446  case 0:
15447  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_r)) != 0)) kw_args--;
15448  else goto __pyx_L5_argtuple_error;
15449  CYTHON_FALLTHROUGH;
15450  case 1:
15451  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_strong_residual)) != 0)) kw_args--;
15452  else {
15453  __Pyx_RaiseArgtupleInvalid("updateReaction_strong", 1, 2, 2, 1); __PYX_ERR(0, 3509, __pyx_L3_error)
15454  }
15455  }
15456  if (unlikely(kw_args > 0)) {
15457  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateReaction_strong") < 0)) __PYX_ERR(0, 3509, __pyx_L3_error)
15458  }
15459  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
15460  goto __pyx_L5_argtuple_error;
15461  } else {
15462  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15463  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15464  }
15465  __pyx_v_r = ((PyArrayObject *)values[0]);
15466  __pyx_v_strong_residual = ((PyArrayObject *)values[1]);
15467  }
15468  goto __pyx_L4_argument_unpacking_done;
15469  __pyx_L5_argtuple_error:;
15470  __Pyx_RaiseArgtupleInvalid("updateReaction_strong", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3509, __pyx_L3_error)
15471  __pyx_L3_error:;
15472  __Pyx_AddTraceback("cfemIntegrals.updateReaction_strong", __pyx_clineno, __pyx_lineno, __pyx_filename);
15473  __Pyx_RefNannyFinishContext();
15474  return NULL;
15475  __pyx_L4_argument_unpacking_done:;
15476  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_r), __pyx_ptype_5numpy_ndarray, 1, "r", 0))) __PYX_ERR(0, 3509, __pyx_L1_error)
15477  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_strong_residual), __pyx_ptype_5numpy_ndarray, 1, "strong_residual", 0))) __PYX_ERR(0, 3510, __pyx_L1_error)
15478  __pyx_r = __pyx_pf_13cfemIntegrals_128updateReaction_strong(__pyx_self, __pyx_v_r, __pyx_v_strong_residual);
15479 
15480  /* function exit code */
15481  goto __pyx_L0;
15482  __pyx_L1_error:;
15483  __pyx_r = NULL;
15484  __pyx_L0:;
15485  __Pyx_RefNannyFinishContext();
15486  return __pyx_r;
15487 }
15488 
15489 static PyObject *__pyx_pf_13cfemIntegrals_128updateReaction_strong(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_r, PyArrayObject *__pyx_v_strong_residual) {
15490  int __pyx_v_nElements_global;
15491  int __pyx_v_nQuadraturePoints_element;
15492  PyObject *__pyx_r = NULL;
15493  __Pyx_RefNannyDeclarations
15494  __Pyx_RefNannySetupContext("updateReaction_strong", 0);
15495 
15496  /* "cfemIntegrals.pyx":3511
15497  * def updateReaction_strong(np.ndarray r,
15498  * np.ndarray strong_residual):
15499  * cdef int nElements_global = r.shape[0] # <<<<<<<<<<<<<<
15500  * cdef int nQuadraturePoints_element = r.shape[1]
15501  * cupdateReaction_strong(nElements_global,
15502  */
15503  __pyx_v_nElements_global = (__pyx_v_r->dimensions[0]);
15504 
15505  /* "cfemIntegrals.pyx":3512
15506  * np.ndarray strong_residual):
15507  * cdef int nElements_global = r.shape[0]
15508  * cdef int nQuadraturePoints_element = r.shape[1] # <<<<<<<<<<<<<<
15509  * cupdateReaction_strong(nElements_global,
15510  * nQuadraturePoints_element,
15511  */
15512  __pyx_v_nQuadraturePoints_element = (__pyx_v_r->dimensions[1]);
15513 
15514  /* "cfemIntegrals.pyx":3513
15515  * cdef int nElements_global = r.shape[0]
15516  * cdef int nQuadraturePoints_element = r.shape[1]
15517  * cupdateReaction_strong(nElements_global, # <<<<<<<<<<<<<<
15518  * nQuadraturePoints_element,
15519  * <double*>r.data,
15520  */
15521  updateReaction_strong(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, ((double *)__pyx_v_r->data), ((double *)__pyx_v_strong_residual->data));
15522 
15523  /* "cfemIntegrals.pyx":3509
15524  * <double*> w_dV.data,
15525  * <double*> jacobian_weak_residual.data)
15526  * def updateReaction_strong(np.ndarray r, # <<<<<<<<<<<<<<
15527  * np.ndarray strong_residual):
15528  * cdef int nElements_global = r.shape[0]
15529  */
15530 
15531  /* function exit code */
15532  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
15533  __Pyx_XGIVEREF(__pyx_r);
15534  __Pyx_RefNannyFinishContext();
15535  return __pyx_r;
15536 }
15537 
15538 /* "cfemIntegrals.pyx":3517
15539  * <double*>r.data,
15540  * <double*>strong_residual.data)
15541  * def updateReactionJacobian_strong(np.ndarray dr, # <<<<<<<<<<<<<<
15542  * np.ndarray v,
15543  * np.ndarray dstrong_residual):
15544  */
15545 
15546 /* Python wrapper */
15547 static PyObject *__pyx_pw_13cfemIntegrals_131updateReactionJacobian_strong(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15548 static PyMethodDef __pyx_mdef_13cfemIntegrals_131updateReactionJacobian_strong = {"updateReactionJacobian_strong", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_131updateReactionJacobian_strong, METH_VARARGS|METH_KEYWORDS, 0};
15549 static PyObject *__pyx_pw_13cfemIntegrals_131updateReactionJacobian_strong(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15550  PyArrayObject *__pyx_v_dr = 0;
15551  PyArrayObject *__pyx_v_v = 0;
15552  PyArrayObject *__pyx_v_dstrong_residual = 0;
15553  int __pyx_lineno = 0;
15554  const char *__pyx_filename = NULL;
15555  int __pyx_clineno = 0;
15556  PyObject *__pyx_r = 0;
15557  __Pyx_RefNannyDeclarations
15558  __Pyx_RefNannySetupContext("updateReactionJacobian_strong (wrapper)", 0);
15559  {
15560  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dr,&__pyx_n_s_v,&__pyx_n_s_dstrong_residual,0};
15561  PyObject* values[3] = {0,0,0};
15562  if (unlikely(__pyx_kwds)) {
15563  Py_ssize_t kw_args;
15564  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15565  switch (pos_args) {
15566  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
15567  CYTHON_FALLTHROUGH;
15568  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15569  CYTHON_FALLTHROUGH;
15570  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15571  CYTHON_FALLTHROUGH;
15572  case 0: break;
15573  default: goto __pyx_L5_argtuple_error;
15574  }
15575  kw_args = PyDict_Size(__pyx_kwds);
15576  switch (pos_args) {
15577  case 0:
15578  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dr)) != 0)) kw_args--;
15579  else goto __pyx_L5_argtuple_error;
15580  CYTHON_FALLTHROUGH;
15581  case 1:
15582  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
15583  else {
15584  __Pyx_RaiseArgtupleInvalid("updateReactionJacobian_strong", 1, 3, 3, 1); __PYX_ERR(0, 3517, __pyx_L3_error)
15585  }
15586  CYTHON_FALLTHROUGH;
15587  case 2:
15588  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dstrong_residual)) != 0)) kw_args--;
15589  else {
15590  __Pyx_RaiseArgtupleInvalid("updateReactionJacobian_strong", 1, 3, 3, 2); __PYX_ERR(0, 3517, __pyx_L3_error)
15591  }
15592  }
15593  if (unlikely(kw_args > 0)) {
15594  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateReactionJacobian_strong") < 0)) __PYX_ERR(0, 3517, __pyx_L3_error)
15595  }
15596  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
15597  goto __pyx_L5_argtuple_error;
15598  } else {
15599  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15600  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15601  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
15602  }
15603  __pyx_v_dr = ((PyArrayObject *)values[0]);
15604  __pyx_v_v = ((PyArrayObject *)values[1]);
15605  __pyx_v_dstrong_residual = ((PyArrayObject *)values[2]);
15606  }
15607  goto __pyx_L4_argument_unpacking_done;
15608  __pyx_L5_argtuple_error:;
15609  __Pyx_RaiseArgtupleInvalid("updateReactionJacobian_strong", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3517, __pyx_L3_error)
15610  __pyx_L3_error:;
15611  __Pyx_AddTraceback("cfemIntegrals.updateReactionJacobian_strong", __pyx_clineno, __pyx_lineno, __pyx_filename);
15612  __Pyx_RefNannyFinishContext();
15613  return NULL;
15614  __pyx_L4_argument_unpacking_done:;
15615  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dr), __pyx_ptype_5numpy_ndarray, 1, "dr", 0))) __PYX_ERR(0, 3517, __pyx_L1_error)
15616  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), __pyx_ptype_5numpy_ndarray, 1, "v", 0))) __PYX_ERR(0, 3518, __pyx_L1_error)
15617  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dstrong_residual), __pyx_ptype_5numpy_ndarray, 1, "dstrong_residual", 0))) __PYX_ERR(0, 3519, __pyx_L1_error)
15618  __pyx_r = __pyx_pf_13cfemIntegrals_130updateReactionJacobian_strong(__pyx_self, __pyx_v_dr, __pyx_v_v, __pyx_v_dstrong_residual);
15619 
15620  /* function exit code */
15621  goto __pyx_L0;
15622  __pyx_L1_error:;
15623  __pyx_r = NULL;
15624  __pyx_L0:;
15625  __Pyx_RefNannyFinishContext();
15626  return __pyx_r;
15627 }
15628 
15629 static PyObject *__pyx_pf_13cfemIntegrals_130updateReactionJacobian_strong(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dr, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_dstrong_residual) {
15630  int __pyx_v_nElements_global;
15631  int __pyx_v_nQuadraturePoints_element;
15632  int __pyx_v_nDOF_trial_element;
15633  PyObject *__pyx_r = NULL;
15634  __Pyx_RefNannyDeclarations
15635  __Pyx_RefNannySetupContext("updateReactionJacobian_strong", 0);
15636 
15637  /* "cfemIntegrals.pyx":3520
15638  * np.ndarray v,
15639  * np.ndarray dstrong_residual):
15640  * cdef int nElements_global = v.shape[0] # <<<<<<<<<<<<<<
15641  * cdef int nQuadraturePoints_element = v.shape[1]
15642  * cdef int nDOF_trial_element = v.shape[2]
15643  */
15644  __pyx_v_nElements_global = (__pyx_v_v->dimensions[0]);
15645 
15646  /* "cfemIntegrals.pyx":3521
15647  * np.ndarray dstrong_residual):
15648  * cdef int nElements_global = v.shape[0]
15649  * cdef int nQuadraturePoints_element = v.shape[1] # <<<<<<<<<<<<<<
15650  * cdef int nDOF_trial_element = v.shape[2]
15651  * cupdateReactionJacobian_strong(nElements_global,
15652  */
15653  __pyx_v_nQuadraturePoints_element = (__pyx_v_v->dimensions[1]);
15654 
15655  /* "cfemIntegrals.pyx":3522
15656  * cdef int nElements_global = v.shape[0]
15657  * cdef int nQuadraturePoints_element = v.shape[1]
15658  * cdef int nDOF_trial_element = v.shape[2] # <<<<<<<<<<<<<<
15659  * cupdateReactionJacobian_strong(nElements_global,
15660  * nQuadraturePoints_element,
15661  */
15662  __pyx_v_nDOF_trial_element = (__pyx_v_v->dimensions[2]);
15663 
15664  /* "cfemIntegrals.pyx":3523
15665  * cdef int nQuadraturePoints_element = v.shape[1]
15666  * cdef int nDOF_trial_element = v.shape[2]
15667  * cupdateReactionJacobian_strong(nElements_global, # <<<<<<<<<<<<<<
15668  * nQuadraturePoints_element,
15669  * nDOF_trial_element,
15670  */
15671  updateReactionJacobian_strong(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_trial_element, ((double *)__pyx_v_dr->data), ((double *)__pyx_v_v->data), ((double *)__pyx_v_dstrong_residual->data));
15672 
15673  /* "cfemIntegrals.pyx":3517
15674  * <double*>r.data,
15675  * <double*>strong_residual.data)
15676  * def updateReactionJacobian_strong(np.ndarray dr, # <<<<<<<<<<<<<<
15677  * np.ndarray v,
15678  * np.ndarray dstrong_residual):
15679  */
15680 
15681  /* function exit code */
15682  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
15683  __Pyx_XGIVEREF(__pyx_r);
15684  __Pyx_RefNannyFinishContext();
15685  return __pyx_r;
15686 }
15687 
15688 /* "cfemIntegrals.pyx":3529
15689  * <double*>v.data,
15690  * <double*>dstrong_residual.data)
15691  * def updateReaction_adjoint(np.ndarray dr, # <<<<<<<<<<<<<<
15692  * np.ndarray w_dV,
15693  * np.ndarray Lstar_w_dV):
15694  */
15695 
15696 /* Python wrapper */
15697 static PyObject *__pyx_pw_13cfemIntegrals_133updateReaction_adjoint(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15698 static PyMethodDef __pyx_mdef_13cfemIntegrals_133updateReaction_adjoint = {"updateReaction_adjoint", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_133updateReaction_adjoint, METH_VARARGS|METH_KEYWORDS, 0};
15699 static PyObject *__pyx_pw_13cfemIntegrals_133updateReaction_adjoint(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15700  PyArrayObject *__pyx_v_dr = 0;
15701  PyArrayObject *__pyx_v_w_dV = 0;
15702  PyArrayObject *__pyx_v_Lstar_w_dV = 0;
15703  int __pyx_lineno = 0;
15704  const char *__pyx_filename = NULL;
15705  int __pyx_clineno = 0;
15706  PyObject *__pyx_r = 0;
15707  __Pyx_RefNannyDeclarations
15708  __Pyx_RefNannySetupContext("updateReaction_adjoint (wrapper)", 0);
15709  {
15710  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dr,&__pyx_n_s_w_dV,&__pyx_n_s_Lstar_w_dV,0};
15711  PyObject* values[3] = {0,0,0};
15712  if (unlikely(__pyx_kwds)) {
15713  Py_ssize_t kw_args;
15714  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15715  switch (pos_args) {
15716  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
15717  CYTHON_FALLTHROUGH;
15718  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15719  CYTHON_FALLTHROUGH;
15720  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15721  CYTHON_FALLTHROUGH;
15722  case 0: break;
15723  default: goto __pyx_L5_argtuple_error;
15724  }
15725  kw_args = PyDict_Size(__pyx_kwds);
15726  switch (pos_args) {
15727  case 0:
15728  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dr)) != 0)) kw_args--;
15729  else goto __pyx_L5_argtuple_error;
15730  CYTHON_FALLTHROUGH;
15731  case 1:
15732  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_w_dV)) != 0)) kw_args--;
15733  else {
15734  __Pyx_RaiseArgtupleInvalid("updateReaction_adjoint", 1, 3, 3, 1); __PYX_ERR(0, 3529, __pyx_L3_error)
15735  }
15736  CYTHON_FALLTHROUGH;
15737  case 2:
15738  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Lstar_w_dV)) != 0)) kw_args--;
15739  else {
15740  __Pyx_RaiseArgtupleInvalid("updateReaction_adjoint", 1, 3, 3, 2); __PYX_ERR(0, 3529, __pyx_L3_error)
15741  }
15742  }
15743  if (unlikely(kw_args > 0)) {
15744  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateReaction_adjoint") < 0)) __PYX_ERR(0, 3529, __pyx_L3_error)
15745  }
15746  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
15747  goto __pyx_L5_argtuple_error;
15748  } else {
15749  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15750  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15751  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
15752  }
15753  __pyx_v_dr = ((PyArrayObject *)values[0]);
15754  __pyx_v_w_dV = ((PyArrayObject *)values[1]);
15755  __pyx_v_Lstar_w_dV = ((PyArrayObject *)values[2]);
15756  }
15757  goto __pyx_L4_argument_unpacking_done;
15758  __pyx_L5_argtuple_error:;
15759  __Pyx_RaiseArgtupleInvalid("updateReaction_adjoint", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3529, __pyx_L3_error)
15760  __pyx_L3_error:;
15761  __Pyx_AddTraceback("cfemIntegrals.updateReaction_adjoint", __pyx_clineno, __pyx_lineno, __pyx_filename);
15762  __Pyx_RefNannyFinishContext();
15763  return NULL;
15764  __pyx_L4_argument_unpacking_done:;
15765  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dr), __pyx_ptype_5numpy_ndarray, 1, "dr", 0))) __PYX_ERR(0, 3529, __pyx_L1_error)
15766  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w_dV), __pyx_ptype_5numpy_ndarray, 1, "w_dV", 0))) __PYX_ERR(0, 3530, __pyx_L1_error)
15767  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Lstar_w_dV), __pyx_ptype_5numpy_ndarray, 1, "Lstar_w_dV", 0))) __PYX_ERR(0, 3531, __pyx_L1_error)
15768  __pyx_r = __pyx_pf_13cfemIntegrals_132updateReaction_adjoint(__pyx_self, __pyx_v_dr, __pyx_v_w_dV, __pyx_v_Lstar_w_dV);
15769 
15770  /* function exit code */
15771  goto __pyx_L0;
15772  __pyx_L1_error:;
15773  __pyx_r = NULL;
15774  __pyx_L0:;
15775  __Pyx_RefNannyFinishContext();
15776  return __pyx_r;
15777 }
15778 
15779 static PyObject *__pyx_pf_13cfemIntegrals_132updateReaction_adjoint(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dr, PyArrayObject *__pyx_v_w_dV, PyArrayObject *__pyx_v_Lstar_w_dV) {
15780  int __pyx_v_nElements_global;
15781  int __pyx_v_nQuadraturePoints_element;
15782  int __pyx_v_nDOF_test_element;
15783  PyObject *__pyx_r = NULL;
15784  __Pyx_RefNannyDeclarations
15785  __Pyx_RefNannySetupContext("updateReaction_adjoint", 0);
15786 
15787  /* "cfemIntegrals.pyx":3532
15788  * np.ndarray w_dV,
15789  * np.ndarray Lstar_w_dV):
15790  * cdef int nElements_global = w_dV.shape[0] # <<<<<<<<<<<<<<
15791  * cdef int nQuadraturePoints_element = w_dV.shape[1]
15792  * cdef int nDOF_test_element = w_dV.shape[2]
15793  */
15794  __pyx_v_nElements_global = (__pyx_v_w_dV->dimensions[0]);
15795 
15796  /* "cfemIntegrals.pyx":3533
15797  * np.ndarray Lstar_w_dV):
15798  * cdef int nElements_global = w_dV.shape[0]
15799  * cdef int nQuadraturePoints_element = w_dV.shape[1] # <<<<<<<<<<<<<<
15800  * cdef int nDOF_test_element = w_dV.shape[2]
15801  * cupdateReaction_adjoint(nElements_global,
15802  */
15803  __pyx_v_nQuadraturePoints_element = (__pyx_v_w_dV->dimensions[1]);
15804 
15805  /* "cfemIntegrals.pyx":3534
15806  * cdef int nElements_global = w_dV.shape[0]
15807  * cdef int nQuadraturePoints_element = w_dV.shape[1]
15808  * cdef int nDOF_test_element = w_dV.shape[2] # <<<<<<<<<<<<<<
15809  * cupdateReaction_adjoint(nElements_global,
15810  * nQuadraturePoints_element,
15811  */
15812  __pyx_v_nDOF_test_element = (__pyx_v_w_dV->dimensions[2]);
15813 
15814  /* "cfemIntegrals.pyx":3535
15815  * cdef int nQuadraturePoints_element = w_dV.shape[1]
15816  * cdef int nDOF_test_element = w_dV.shape[2]
15817  * cupdateReaction_adjoint(nElements_global, # <<<<<<<<<<<<<<
15818  * nQuadraturePoints_element,
15819  * nDOF_test_element,
15820  */
15821  updateReaction_adjoint(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_test_element, ((double *)__pyx_v_dr->data), ((double *)__pyx_v_w_dV->data), ((double *)__pyx_v_Lstar_w_dV->data));
15822 
15823  /* "cfemIntegrals.pyx":3529
15824  * <double*>v.data,
15825  * <double*>dstrong_residual.data)
15826  * def updateReaction_adjoint(np.ndarray dr, # <<<<<<<<<<<<<<
15827  * np.ndarray w_dV,
15828  * np.ndarray Lstar_w_dV):
15829  */
15830 
15831  /* function exit code */
15832  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
15833  __Pyx_XGIVEREF(__pyx_r);
15834  __Pyx_RefNannyFinishContext();
15835  return __pyx_r;
15836 }
15837 
15838 /* "cfemIntegrals.pyx":3541
15839  * <double*>w_dV.data,
15840  * <double*>Lstar_w_dV.data)
15841  * def updateSubgridError(np.ndarray error, # <<<<<<<<<<<<<<
15842  * np.ndarray Lstar_w_dV,
15843  * np.ndarray weak_residual):
15844  */
15845 
15846 /* Python wrapper */
15847 static PyObject *__pyx_pw_13cfemIntegrals_135updateSubgridError(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15848 static PyMethodDef __pyx_mdef_13cfemIntegrals_135updateSubgridError = {"updateSubgridError", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_135updateSubgridError, METH_VARARGS|METH_KEYWORDS, 0};
15849 static PyObject *__pyx_pw_13cfemIntegrals_135updateSubgridError(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15850  PyArrayObject *__pyx_v_error = 0;
15851  PyArrayObject *__pyx_v_Lstar_w_dV = 0;
15852  PyArrayObject *__pyx_v_weak_residual = 0;
15853  int __pyx_lineno = 0;
15854  const char *__pyx_filename = NULL;
15855  int __pyx_clineno = 0;
15856  PyObject *__pyx_r = 0;
15857  __Pyx_RefNannyDeclarations
15858  __Pyx_RefNannySetupContext("updateSubgridError (wrapper)", 0);
15859  {
15860  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_error,&__pyx_n_s_Lstar_w_dV,&__pyx_n_s_weak_residual,0};
15861  PyObject* values[3] = {0,0,0};
15862  if (unlikely(__pyx_kwds)) {
15863  Py_ssize_t kw_args;
15864  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15865  switch (pos_args) {
15866  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
15867  CYTHON_FALLTHROUGH;
15868  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15869  CYTHON_FALLTHROUGH;
15870  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15871  CYTHON_FALLTHROUGH;
15872  case 0: break;
15873  default: goto __pyx_L5_argtuple_error;
15874  }
15875  kw_args = PyDict_Size(__pyx_kwds);
15876  switch (pos_args) {
15877  case 0:
15878  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_error)) != 0)) kw_args--;
15879  else goto __pyx_L5_argtuple_error;
15880  CYTHON_FALLTHROUGH;
15881  case 1:
15882  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Lstar_w_dV)) != 0)) kw_args--;
15883  else {
15884  __Pyx_RaiseArgtupleInvalid("updateSubgridError", 1, 3, 3, 1); __PYX_ERR(0, 3541, __pyx_L3_error)
15885  }
15886  CYTHON_FALLTHROUGH;
15887  case 2:
15888  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weak_residual)) != 0)) kw_args--;
15889  else {
15890  __Pyx_RaiseArgtupleInvalid("updateSubgridError", 1, 3, 3, 2); __PYX_ERR(0, 3541, __pyx_L3_error)
15891  }
15892  }
15893  if (unlikely(kw_args > 0)) {
15894  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateSubgridError") < 0)) __PYX_ERR(0, 3541, __pyx_L3_error)
15895  }
15896  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
15897  goto __pyx_L5_argtuple_error;
15898  } else {
15899  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15900  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15901  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
15902  }
15903  __pyx_v_error = ((PyArrayObject *)values[0]);
15904  __pyx_v_Lstar_w_dV = ((PyArrayObject *)values[1]);
15905  __pyx_v_weak_residual = ((PyArrayObject *)values[2]);
15906  }
15907  goto __pyx_L4_argument_unpacking_done;
15908  __pyx_L5_argtuple_error:;
15909  __Pyx_RaiseArgtupleInvalid("updateSubgridError", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3541, __pyx_L3_error)
15910  __pyx_L3_error:;
15911  __Pyx_AddTraceback("cfemIntegrals.updateSubgridError", __pyx_clineno, __pyx_lineno, __pyx_filename);
15912  __Pyx_RefNannyFinishContext();
15913  return NULL;
15914  __pyx_L4_argument_unpacking_done:;
15915  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_error), __pyx_ptype_5numpy_ndarray, 1, "error", 0))) __PYX_ERR(0, 3541, __pyx_L1_error)
15916  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Lstar_w_dV), __pyx_ptype_5numpy_ndarray, 1, "Lstar_w_dV", 0))) __PYX_ERR(0, 3542, __pyx_L1_error)
15917  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_weak_residual), __pyx_ptype_5numpy_ndarray, 1, "weak_residual", 0))) __PYX_ERR(0, 3543, __pyx_L1_error)
15918  __pyx_r = __pyx_pf_13cfemIntegrals_134updateSubgridError(__pyx_self, __pyx_v_error, __pyx_v_Lstar_w_dV, __pyx_v_weak_residual);
15919 
15920  /* function exit code */
15921  goto __pyx_L0;
15922  __pyx_L1_error:;
15923  __pyx_r = NULL;
15924  __pyx_L0:;
15925  __Pyx_RefNannyFinishContext();
15926  return __pyx_r;
15927 }
15928 
15929 static PyObject *__pyx_pf_13cfemIntegrals_134updateSubgridError(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_error, PyArrayObject *__pyx_v_Lstar_w_dV, PyArrayObject *__pyx_v_weak_residual) {
15930  int __pyx_v_nElements_global;
15931  int __pyx_v_nQuadraturePoints_element;
15932  int __pyx_v_nDOF_test_element;
15933  PyObject *__pyx_r = NULL;
15934  __Pyx_RefNannyDeclarations
15935  __Pyx_RefNannySetupContext("updateSubgridError", 0);
15936 
15937  /* "cfemIntegrals.pyx":3544
15938  * np.ndarray Lstar_w_dV,
15939  * np.ndarray weak_residual):
15940  * cdef int nElements_global = Lstar_w_dV.shape[0] # <<<<<<<<<<<<<<
15941  * cdef int nQuadraturePoints_element = Lstar_w_dV.shape[1]
15942  * cdef int nDOF_test_element = Lstar_w_dV.shape[2]
15943  */
15944  __pyx_v_nElements_global = (__pyx_v_Lstar_w_dV->dimensions[0]);
15945 
15946  /* "cfemIntegrals.pyx":3545
15947  * np.ndarray weak_residual):
15948  * cdef int nElements_global = Lstar_w_dV.shape[0]
15949  * cdef int nQuadraturePoints_element = Lstar_w_dV.shape[1] # <<<<<<<<<<<<<<
15950  * cdef int nDOF_test_element = Lstar_w_dV.shape[2]
15951  * cupdateSubgridError(nElements_global,
15952  */
15953  __pyx_v_nQuadraturePoints_element = (__pyx_v_Lstar_w_dV->dimensions[1]);
15954 
15955  /* "cfemIntegrals.pyx":3546
15956  * cdef int nElements_global = Lstar_w_dV.shape[0]
15957  * cdef int nQuadraturePoints_element = Lstar_w_dV.shape[1]
15958  * cdef int nDOF_test_element = Lstar_w_dV.shape[2] # <<<<<<<<<<<<<<
15959  * cupdateSubgridError(nElements_global,
15960  * nQuadraturePoints_element,
15961  */
15962  __pyx_v_nDOF_test_element = (__pyx_v_Lstar_w_dV->dimensions[2]);
15963 
15964  /* "cfemIntegrals.pyx":3547
15965  * cdef int nQuadraturePoints_element = Lstar_w_dV.shape[1]
15966  * cdef int nDOF_test_element = Lstar_w_dV.shape[2]
15967  * cupdateSubgridError(nElements_global, # <<<<<<<<<<<<<<
15968  * nQuadraturePoints_element,
15969  * nDOF_test_element,
15970  */
15971  updateSubgridError(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_test_element, ((double *)__pyx_v_error->data), ((double *)__pyx_v_Lstar_w_dV->data), ((double *)__pyx_v_weak_residual->data));
15972 
15973  /* "cfemIntegrals.pyx":3541
15974  * <double*>w_dV.data,
15975  * <double*>Lstar_w_dV.data)
15976  * def updateSubgridError(np.ndarray error, # <<<<<<<<<<<<<<
15977  * np.ndarray Lstar_w_dV,
15978  * np.ndarray weak_residual):
15979  */
15980 
15981  /* function exit code */
15982  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
15983  __Pyx_XGIVEREF(__pyx_r);
15984  __Pyx_RefNannyFinishContext();
15985  return __pyx_r;
15986 }
15987 
15988 /* "cfemIntegrals.pyx":3553
15989  * <double*>Lstar_w_dV.data,
15990  * <double*>weak_residual.data)
15991  * def updateSubgridErrorJacobian(np.ndarray derror, # <<<<<<<<<<<<<<
15992  * np.ndarray Lstar_w_dV,
15993  * np.ndarray jacobian_weak_residual):
15994  */
15995 
15996 /* Python wrapper */
15997 static PyObject *__pyx_pw_13cfemIntegrals_137updateSubgridErrorJacobian(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15998 static PyMethodDef __pyx_mdef_13cfemIntegrals_137updateSubgridErrorJacobian = {"updateSubgridErrorJacobian", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_137updateSubgridErrorJacobian, METH_VARARGS|METH_KEYWORDS, 0};
15999 static PyObject *__pyx_pw_13cfemIntegrals_137updateSubgridErrorJacobian(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16000  PyArrayObject *__pyx_v_derror = 0;
16001  PyArrayObject *__pyx_v_Lstar_w_dV = 0;
16002  PyArrayObject *__pyx_v_jacobian_weak_residual = 0;
16003  int __pyx_lineno = 0;
16004  const char *__pyx_filename = NULL;
16005  int __pyx_clineno = 0;
16006  PyObject *__pyx_r = 0;
16007  __Pyx_RefNannyDeclarations
16008  __Pyx_RefNannySetupContext("updateSubgridErrorJacobian (wrapper)", 0);
16009  {
16010  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_derror,&__pyx_n_s_Lstar_w_dV,&__pyx_n_s_jacobian_weak_residual,0};
16011  PyObject* values[3] = {0,0,0};
16012  if (unlikely(__pyx_kwds)) {
16013  Py_ssize_t kw_args;
16014  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16015  switch (pos_args) {
16016  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
16017  CYTHON_FALLTHROUGH;
16018  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16019  CYTHON_FALLTHROUGH;
16020  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16021  CYTHON_FALLTHROUGH;
16022  case 0: break;
16023  default: goto __pyx_L5_argtuple_error;
16024  }
16025  kw_args = PyDict_Size(__pyx_kwds);
16026  switch (pos_args) {
16027  case 0:
16028  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_derror)) != 0)) kw_args--;
16029  else goto __pyx_L5_argtuple_error;
16030  CYTHON_FALLTHROUGH;
16031  case 1:
16032  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Lstar_w_dV)) != 0)) kw_args--;
16033  else {
16034  __Pyx_RaiseArgtupleInvalid("updateSubgridErrorJacobian", 1, 3, 3, 1); __PYX_ERR(0, 3553, __pyx_L3_error)
16035  }
16036  CYTHON_FALLTHROUGH;
16037  case 2:
16038  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jacobian_weak_residual)) != 0)) kw_args--;
16039  else {
16040  __Pyx_RaiseArgtupleInvalid("updateSubgridErrorJacobian", 1, 3, 3, 2); __PYX_ERR(0, 3553, __pyx_L3_error)
16041  }
16042  }
16043  if (unlikely(kw_args > 0)) {
16044  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateSubgridErrorJacobian") < 0)) __PYX_ERR(0, 3553, __pyx_L3_error)
16045  }
16046  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
16047  goto __pyx_L5_argtuple_error;
16048  } else {
16049  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16050  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16051  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
16052  }
16053  __pyx_v_derror = ((PyArrayObject *)values[0]);
16054  __pyx_v_Lstar_w_dV = ((PyArrayObject *)values[1]);
16055  __pyx_v_jacobian_weak_residual = ((PyArrayObject *)values[2]);
16056  }
16057  goto __pyx_L4_argument_unpacking_done;
16058  __pyx_L5_argtuple_error:;
16059  __Pyx_RaiseArgtupleInvalid("updateSubgridErrorJacobian", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3553, __pyx_L3_error)
16060  __pyx_L3_error:;
16061  __Pyx_AddTraceback("cfemIntegrals.updateSubgridErrorJacobian", __pyx_clineno, __pyx_lineno, __pyx_filename);
16062  __Pyx_RefNannyFinishContext();
16063  return NULL;
16064  __pyx_L4_argument_unpacking_done:;
16065  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_derror), __pyx_ptype_5numpy_ndarray, 1, "derror", 0))) __PYX_ERR(0, 3553, __pyx_L1_error)
16066  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Lstar_w_dV), __pyx_ptype_5numpy_ndarray, 1, "Lstar_w_dV", 0))) __PYX_ERR(0, 3554, __pyx_L1_error)
16067  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_jacobian_weak_residual), __pyx_ptype_5numpy_ndarray, 1, "jacobian_weak_residual", 0))) __PYX_ERR(0, 3555, __pyx_L1_error)
16068  __pyx_r = __pyx_pf_13cfemIntegrals_136updateSubgridErrorJacobian(__pyx_self, __pyx_v_derror, __pyx_v_Lstar_w_dV, __pyx_v_jacobian_weak_residual);
16069 
16070  /* function exit code */
16071  goto __pyx_L0;
16072  __pyx_L1_error:;
16073  __pyx_r = NULL;
16074  __pyx_L0:;
16075  __Pyx_RefNannyFinishContext();
16076  return __pyx_r;
16077 }
16078 
16079 static PyObject *__pyx_pf_13cfemIntegrals_136updateSubgridErrorJacobian(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_derror, PyArrayObject *__pyx_v_Lstar_w_dV, PyArrayObject *__pyx_v_jacobian_weak_residual) {
16080  int __pyx_v_nElements_global;
16081  int __pyx_v_nQuadraturePoints_element;
16082  int __pyx_v_nDOF_trial_element;
16083  int __pyx_v_nDOF_test_element;
16084  PyObject *__pyx_r = NULL;
16085  __Pyx_RefNannyDeclarations
16086  __Pyx_RefNannySetupContext("updateSubgridErrorJacobian", 0);
16087 
16088  /* "cfemIntegrals.pyx":3556
16089  * np.ndarray Lstar_w_dV,
16090  * np.ndarray jacobian_weak_residual):
16091  * cdef int nElements_global = Lstar_w_dV.shape[0] # <<<<<<<<<<<<<<
16092  * cdef int nQuadraturePoints_element = Lstar_w_dV.shape[1]
16093  * cdef int nDOF_trial_element = derror.shape[2]
16094  */
16095  __pyx_v_nElements_global = (__pyx_v_Lstar_w_dV->dimensions[0]);
16096 
16097  /* "cfemIntegrals.pyx":3557
16098  * np.ndarray jacobian_weak_residual):
16099  * cdef int nElements_global = Lstar_w_dV.shape[0]
16100  * cdef int nQuadraturePoints_element = Lstar_w_dV.shape[1] # <<<<<<<<<<<<<<
16101  * cdef int nDOF_trial_element = derror.shape[2]
16102  * cdef int nDOF_test_element = Lstar_w_dV.shape[2]
16103  */
16104  __pyx_v_nQuadraturePoints_element = (__pyx_v_Lstar_w_dV->dimensions[1]);
16105 
16106  /* "cfemIntegrals.pyx":3558
16107  * cdef int nElements_global = Lstar_w_dV.shape[0]
16108  * cdef int nQuadraturePoints_element = Lstar_w_dV.shape[1]
16109  * cdef int nDOF_trial_element = derror.shape[2] # <<<<<<<<<<<<<<
16110  * cdef int nDOF_test_element = Lstar_w_dV.shape[2]
16111  * cupdateSubgridErrorJacobian(nElements_global,
16112  */
16113  __pyx_v_nDOF_trial_element = (__pyx_v_derror->dimensions[2]);
16114 
16115  /* "cfemIntegrals.pyx":3559
16116  * cdef int nQuadraturePoints_element = Lstar_w_dV.shape[1]
16117  * cdef int nDOF_trial_element = derror.shape[2]
16118  * cdef int nDOF_test_element = Lstar_w_dV.shape[2] # <<<<<<<<<<<<<<
16119  * cupdateSubgridErrorJacobian(nElements_global,
16120  * nQuadraturePoints_element,
16121  */
16122  __pyx_v_nDOF_test_element = (__pyx_v_Lstar_w_dV->dimensions[2]);
16123 
16124  /* "cfemIntegrals.pyx":3560
16125  * cdef int nDOF_trial_element = derror.shape[2]
16126  * cdef int nDOF_test_element = Lstar_w_dV.shape[2]
16127  * cupdateSubgridErrorJacobian(nElements_global, # <<<<<<<<<<<<<<
16128  * nQuadraturePoints_element,
16129  * nDOF_trial_element,
16130  */
16131  updateSubgridErrorJacobian(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_trial_element, __pyx_v_nDOF_test_element, ((double *)__pyx_v_derror->data), ((double *)__pyx_v_Lstar_w_dV->data), ((double *)__pyx_v_jacobian_weak_residual->data));
16132 
16133  /* "cfemIntegrals.pyx":3553
16134  * <double*>Lstar_w_dV.data,
16135  * <double*>weak_residual.data)
16136  * def updateSubgridErrorJacobian(np.ndarray derror, # <<<<<<<<<<<<<<
16137  * np.ndarray Lstar_w_dV,
16138  * np.ndarray jacobian_weak_residual):
16139  */
16140 
16141  /* function exit code */
16142  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
16143  __Pyx_XGIVEREF(__pyx_r);
16144  __Pyx_RefNannyFinishContext();
16145  return __pyx_r;
16146 }
16147 
16148 /* "cfemIntegrals.pyx":3567
16149  * <double*>Lstar_w_dV.data,
16150  * <double*>jacobian_weak_residual.data)
16151  * def updateNumericalDiffusion(np.ndarray numDiff, # <<<<<<<<<<<<<<
16152  * np.ndarray grad_u_X_grad_w_dV,
16153  * np.ndarray weak_residual):
16154  */
16155 
16156 /* Python wrapper */
16157 static PyObject *__pyx_pw_13cfemIntegrals_139updateNumericalDiffusion(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16158 static PyMethodDef __pyx_mdef_13cfemIntegrals_139updateNumericalDiffusion = {"updateNumericalDiffusion", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_139updateNumericalDiffusion, METH_VARARGS|METH_KEYWORDS, 0};
16159 static PyObject *__pyx_pw_13cfemIntegrals_139updateNumericalDiffusion(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16160  PyArrayObject *__pyx_v_numDiff = 0;
16161  PyArrayObject *__pyx_v_grad_u_X_grad_w_dV = 0;
16162  PyArrayObject *__pyx_v_weak_residual = 0;
16163  int __pyx_lineno = 0;
16164  const char *__pyx_filename = NULL;
16165  int __pyx_clineno = 0;
16166  PyObject *__pyx_r = 0;
16167  __Pyx_RefNannyDeclarations
16168  __Pyx_RefNannySetupContext("updateNumericalDiffusion (wrapper)", 0);
16169  {
16170  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_numDiff,&__pyx_n_s_grad_u_X_grad_w_dV,&__pyx_n_s_weak_residual,0};
16171  PyObject* values[3] = {0,0,0};
16172  if (unlikely(__pyx_kwds)) {
16173  Py_ssize_t kw_args;
16174  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16175  switch (pos_args) {
16176  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
16177  CYTHON_FALLTHROUGH;
16178  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16179  CYTHON_FALLTHROUGH;
16180  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16181  CYTHON_FALLTHROUGH;
16182  case 0: break;
16183  default: goto __pyx_L5_argtuple_error;
16184  }
16185  kw_args = PyDict_Size(__pyx_kwds);
16186  switch (pos_args) {
16187  case 0:
16188  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_numDiff)) != 0)) kw_args--;
16189  else goto __pyx_L5_argtuple_error;
16190  CYTHON_FALLTHROUGH;
16191  case 1:
16192  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_u_X_grad_w_dV)) != 0)) kw_args--;
16193  else {
16194  __Pyx_RaiseArgtupleInvalid("updateNumericalDiffusion", 1, 3, 3, 1); __PYX_ERR(0, 3567, __pyx_L3_error)
16195  }
16196  CYTHON_FALLTHROUGH;
16197  case 2:
16198  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weak_residual)) != 0)) kw_args--;
16199  else {
16200  __Pyx_RaiseArgtupleInvalid("updateNumericalDiffusion", 1, 3, 3, 2); __PYX_ERR(0, 3567, __pyx_L3_error)
16201  }
16202  }
16203  if (unlikely(kw_args > 0)) {
16204  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateNumericalDiffusion") < 0)) __PYX_ERR(0, 3567, __pyx_L3_error)
16205  }
16206  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
16207  goto __pyx_L5_argtuple_error;
16208  } else {
16209  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16210  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16211  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
16212  }
16213  __pyx_v_numDiff = ((PyArrayObject *)values[0]);
16214  __pyx_v_grad_u_X_grad_w_dV = ((PyArrayObject *)values[1]);
16215  __pyx_v_weak_residual = ((PyArrayObject *)values[2]);
16216  }
16217  goto __pyx_L4_argument_unpacking_done;
16218  __pyx_L5_argtuple_error:;
16219  __Pyx_RaiseArgtupleInvalid("updateNumericalDiffusion", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3567, __pyx_L3_error)
16220  __pyx_L3_error:;
16221  __Pyx_AddTraceback("cfemIntegrals.updateNumericalDiffusion", __pyx_clineno, __pyx_lineno, __pyx_filename);
16222  __Pyx_RefNannyFinishContext();
16223  return NULL;
16224  __pyx_L4_argument_unpacking_done:;
16225  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_numDiff), __pyx_ptype_5numpy_ndarray, 1, "numDiff", 0))) __PYX_ERR(0, 3567, __pyx_L1_error)
16226  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_u_X_grad_w_dV), __pyx_ptype_5numpy_ndarray, 1, "grad_u_X_grad_w_dV", 0))) __PYX_ERR(0, 3568, __pyx_L1_error)
16227  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_weak_residual), __pyx_ptype_5numpy_ndarray, 1, "weak_residual", 0))) __PYX_ERR(0, 3569, __pyx_L1_error)
16228  __pyx_r = __pyx_pf_13cfemIntegrals_138updateNumericalDiffusion(__pyx_self, __pyx_v_numDiff, __pyx_v_grad_u_X_grad_w_dV, __pyx_v_weak_residual);
16229 
16230  /* function exit code */
16231  goto __pyx_L0;
16232  __pyx_L1_error:;
16233  __pyx_r = NULL;
16234  __pyx_L0:;
16235  __Pyx_RefNannyFinishContext();
16236  return __pyx_r;
16237 }
16238 
16239 static PyObject *__pyx_pf_13cfemIntegrals_138updateNumericalDiffusion(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_numDiff, PyArrayObject *__pyx_v_grad_u_X_grad_w_dV, PyArrayObject *__pyx_v_weak_residual) {
16240  int __pyx_v_nElements_global;
16241  int __pyx_v_nQuadraturePoints_element;
16242  int __pyx_v_nDOF_test_element;
16243  int __pyx_v_nSpace;
16244  PyObject *__pyx_r = NULL;
16245  __Pyx_RefNannyDeclarations
16246  __Pyx_RefNannySetupContext("updateNumericalDiffusion", 0);
16247 
16248  /* "cfemIntegrals.pyx":3570
16249  * np.ndarray grad_u_X_grad_w_dV,
16250  * np.ndarray weak_residual):
16251  * cdef int nElements_global = grad_u_X_grad_w_dV.shape[0] # <<<<<<<<<<<<<<
16252  * cdef int nQuadraturePoints_element = grad_u_X_grad_w_dV.shape[1]
16253  * cdef int nDOF_test_element = grad_u_X_grad_w_dV.shape[2]
16254  */
16255  __pyx_v_nElements_global = (__pyx_v_grad_u_X_grad_w_dV->dimensions[0]);
16256 
16257  /* "cfemIntegrals.pyx":3571
16258  * np.ndarray weak_residual):
16259  * cdef int nElements_global = grad_u_X_grad_w_dV.shape[0]
16260  * cdef int nQuadraturePoints_element = grad_u_X_grad_w_dV.shape[1] # <<<<<<<<<<<<<<
16261  * cdef int nDOF_test_element = grad_u_X_grad_w_dV.shape[2]
16262  * cdef int nSpace = grad_u_X_grad_w_dV.shape[3]
16263  */
16264  __pyx_v_nQuadraturePoints_element = (__pyx_v_grad_u_X_grad_w_dV->dimensions[1]);
16265 
16266  /* "cfemIntegrals.pyx":3572
16267  * cdef int nElements_global = grad_u_X_grad_w_dV.shape[0]
16268  * cdef int nQuadraturePoints_element = grad_u_X_grad_w_dV.shape[1]
16269  * cdef int nDOF_test_element = grad_u_X_grad_w_dV.shape[2] # <<<<<<<<<<<<<<
16270  * cdef int nSpace = grad_u_X_grad_w_dV.shape[3]
16271  * cupdateNumericalDiffusion(nElements_global,
16272  */
16273  __pyx_v_nDOF_test_element = (__pyx_v_grad_u_X_grad_w_dV->dimensions[2]);
16274 
16275  /* "cfemIntegrals.pyx":3573
16276  * cdef int nQuadraturePoints_element = grad_u_X_grad_w_dV.shape[1]
16277  * cdef int nDOF_test_element = grad_u_X_grad_w_dV.shape[2]
16278  * cdef int nSpace = grad_u_X_grad_w_dV.shape[3] # <<<<<<<<<<<<<<
16279  * cupdateNumericalDiffusion(nElements_global,
16280  * nQuadraturePoints_element,
16281  */
16282  __pyx_v_nSpace = (__pyx_v_grad_u_X_grad_w_dV->dimensions[3]);
16283 
16284  /* "cfemIntegrals.pyx":3574
16285  * cdef int nDOF_test_element = grad_u_X_grad_w_dV.shape[2]
16286  * cdef int nSpace = grad_u_X_grad_w_dV.shape[3]
16287  * cupdateNumericalDiffusion(nElements_global, # <<<<<<<<<<<<<<
16288  * nQuadraturePoints_element,
16289  * nDOF_test_element,
16290  */
16291  updateNumericalDiffusion(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_test_element, __pyx_v_nSpace, ((double *)__pyx_v_numDiff->data), ((double *)__pyx_v_grad_u_X_grad_w_dV->data), ((double *)__pyx_v_weak_residual->data));
16292 
16293  /* "cfemIntegrals.pyx":3567
16294  * <double*>Lstar_w_dV.data,
16295  * <double*>jacobian_weak_residual.data)
16296  * def updateNumericalDiffusion(np.ndarray numDiff, # <<<<<<<<<<<<<<
16297  * np.ndarray grad_u_X_grad_w_dV,
16298  * np.ndarray weak_residual):
16299  */
16300 
16301  /* function exit code */
16302  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
16303  __Pyx_XGIVEREF(__pyx_r);
16304  __Pyx_RefNannyFinishContext();
16305  return __pyx_r;
16306 }
16307 
16308 /* "cfemIntegrals.pyx":3581
16309  * <double*>grad_u_X_grad_w_dV.data,
16310  * <double*>weak_residual.data)
16311  * def updateNumericalDiffusion_lowmem(np.ndarray numDiff, # <<<<<<<<<<<<<<
16312  * np.ndarray grad_u,
16313  * np.ndarray grad_w_dV,
16314  */
16315 
16316 /* Python wrapper */
16317 static PyObject *__pyx_pw_13cfemIntegrals_141updateNumericalDiffusion_lowmem(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16318 static PyMethodDef __pyx_mdef_13cfemIntegrals_141updateNumericalDiffusion_lowmem = {"updateNumericalDiffusion_lowmem", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_141updateNumericalDiffusion_lowmem, METH_VARARGS|METH_KEYWORDS, 0};
16319 static PyObject *__pyx_pw_13cfemIntegrals_141updateNumericalDiffusion_lowmem(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16320  PyArrayObject *__pyx_v_numDiff = 0;
16321  PyArrayObject *__pyx_v_grad_u = 0;
16322  PyArrayObject *__pyx_v_grad_w_dV = 0;
16323  PyArrayObject *__pyx_v_weak_residual = 0;
16324  int __pyx_lineno = 0;
16325  const char *__pyx_filename = NULL;
16326  int __pyx_clineno = 0;
16327  PyObject *__pyx_r = 0;
16328  __Pyx_RefNannyDeclarations
16329  __Pyx_RefNannySetupContext("updateNumericalDiffusion_lowmem (wrapper)", 0);
16330  {
16331  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_numDiff,&__pyx_n_s_grad_u,&__pyx_n_s_grad_w_dV,&__pyx_n_s_weak_residual,0};
16332  PyObject* values[4] = {0,0,0,0};
16333  if (unlikely(__pyx_kwds)) {
16334  Py_ssize_t kw_args;
16335  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16336  switch (pos_args) {
16337  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
16338  CYTHON_FALLTHROUGH;
16339  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
16340  CYTHON_FALLTHROUGH;
16341  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16342  CYTHON_FALLTHROUGH;
16343  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16344  CYTHON_FALLTHROUGH;
16345  case 0: break;
16346  default: goto __pyx_L5_argtuple_error;
16347  }
16348  kw_args = PyDict_Size(__pyx_kwds);
16349  switch (pos_args) {
16350  case 0:
16351  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_numDiff)) != 0)) kw_args--;
16352  else goto __pyx_L5_argtuple_error;
16353  CYTHON_FALLTHROUGH;
16354  case 1:
16355  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_u)) != 0)) kw_args--;
16356  else {
16357  __Pyx_RaiseArgtupleInvalid("updateNumericalDiffusion_lowmem", 1, 4, 4, 1); __PYX_ERR(0, 3581, __pyx_L3_error)
16358  }
16359  CYTHON_FALLTHROUGH;
16360  case 2:
16361  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_w_dV)) != 0)) kw_args--;
16362  else {
16363  __Pyx_RaiseArgtupleInvalid("updateNumericalDiffusion_lowmem", 1, 4, 4, 2); __PYX_ERR(0, 3581, __pyx_L3_error)
16364  }
16365  CYTHON_FALLTHROUGH;
16366  case 3:
16367  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weak_residual)) != 0)) kw_args--;
16368  else {
16369  __Pyx_RaiseArgtupleInvalid("updateNumericalDiffusion_lowmem", 1, 4, 4, 3); __PYX_ERR(0, 3581, __pyx_L3_error)
16370  }
16371  }
16372  if (unlikely(kw_args > 0)) {
16373  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateNumericalDiffusion_lowmem") < 0)) __PYX_ERR(0, 3581, __pyx_L3_error)
16374  }
16375  } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
16376  goto __pyx_L5_argtuple_error;
16377  } else {
16378  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16379  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16380  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
16381  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
16382  }
16383  __pyx_v_numDiff = ((PyArrayObject *)values[0]);
16384  __pyx_v_grad_u = ((PyArrayObject *)values[1]);
16385  __pyx_v_grad_w_dV = ((PyArrayObject *)values[2]);
16386  __pyx_v_weak_residual = ((PyArrayObject *)values[3]);
16387  }
16388  goto __pyx_L4_argument_unpacking_done;
16389  __pyx_L5_argtuple_error:;
16390  __Pyx_RaiseArgtupleInvalid("updateNumericalDiffusion_lowmem", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3581, __pyx_L3_error)
16391  __pyx_L3_error:;
16392  __Pyx_AddTraceback("cfemIntegrals.updateNumericalDiffusion_lowmem", __pyx_clineno, __pyx_lineno, __pyx_filename);
16393  __Pyx_RefNannyFinishContext();
16394  return NULL;
16395  __pyx_L4_argument_unpacking_done:;
16396  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_numDiff), __pyx_ptype_5numpy_ndarray, 1, "numDiff", 0))) __PYX_ERR(0, 3581, __pyx_L1_error)
16397  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_u), __pyx_ptype_5numpy_ndarray, 1, "grad_u", 0))) __PYX_ERR(0, 3582, __pyx_L1_error)
16398  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_w_dV), __pyx_ptype_5numpy_ndarray, 1, "grad_w_dV", 0))) __PYX_ERR(0, 3583, __pyx_L1_error)
16399  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_weak_residual), __pyx_ptype_5numpy_ndarray, 1, "weak_residual", 0))) __PYX_ERR(0, 3584, __pyx_L1_error)
16400  __pyx_r = __pyx_pf_13cfemIntegrals_140updateNumericalDiffusion_lowmem(__pyx_self, __pyx_v_numDiff, __pyx_v_grad_u, __pyx_v_grad_w_dV, __pyx_v_weak_residual);
16401 
16402  /* function exit code */
16403  goto __pyx_L0;
16404  __pyx_L1_error:;
16405  __pyx_r = NULL;
16406  __pyx_L0:;
16407  __Pyx_RefNannyFinishContext();
16408  return __pyx_r;
16409 }
16410 
16411 static PyObject *__pyx_pf_13cfemIntegrals_140updateNumericalDiffusion_lowmem(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_numDiff, PyArrayObject *__pyx_v_grad_u, PyArrayObject *__pyx_v_grad_w_dV, PyArrayObject *__pyx_v_weak_residual) {
16412  int __pyx_v_nElements_global;
16413  int __pyx_v_nQuadraturePoints_element;
16414  int __pyx_v_nDOF_test_element;
16415  int __pyx_v_nSpace;
16416  PyObject *__pyx_r = NULL;
16417  __Pyx_RefNannyDeclarations
16418  __Pyx_RefNannySetupContext("updateNumericalDiffusion_lowmem", 0);
16419 
16420  /* "cfemIntegrals.pyx":3585
16421  * np.ndarray grad_w_dV,
16422  * np.ndarray weak_residual):
16423  * cdef int nElements_global = grad_w_dV.shape[0] # <<<<<<<<<<<<<<
16424  * cdef int nQuadraturePoints_element = grad_w_dV.shape[1]
16425  * cdef int nDOF_test_element = grad_w_dV.shape[2]
16426  */
16427  __pyx_v_nElements_global = (__pyx_v_grad_w_dV->dimensions[0]);
16428 
16429  /* "cfemIntegrals.pyx":3586
16430  * np.ndarray weak_residual):
16431  * cdef int nElements_global = grad_w_dV.shape[0]
16432  * cdef int nQuadraturePoints_element = grad_w_dV.shape[1] # <<<<<<<<<<<<<<
16433  * cdef int nDOF_test_element = grad_w_dV.shape[2]
16434  * cdef int nSpace = grad_w_dV.shape[3]
16435  */
16436  __pyx_v_nQuadraturePoints_element = (__pyx_v_grad_w_dV->dimensions[1]);
16437 
16438  /* "cfemIntegrals.pyx":3587
16439  * cdef int nElements_global = grad_w_dV.shape[0]
16440  * cdef int nQuadraturePoints_element = grad_w_dV.shape[1]
16441  * cdef int nDOF_test_element = grad_w_dV.shape[2] # <<<<<<<<<<<<<<
16442  * cdef int nSpace = grad_w_dV.shape[3]
16443  * cupdateNumericalDiffusion_lowmem(nElements_global,
16444  */
16445  __pyx_v_nDOF_test_element = (__pyx_v_grad_w_dV->dimensions[2]);
16446 
16447  /* "cfemIntegrals.pyx":3588
16448  * cdef int nQuadraturePoints_element = grad_w_dV.shape[1]
16449  * cdef int nDOF_test_element = grad_w_dV.shape[2]
16450  * cdef int nSpace = grad_w_dV.shape[3] # <<<<<<<<<<<<<<
16451  * cupdateNumericalDiffusion_lowmem(nElements_global,
16452  * nQuadraturePoints_element,
16453  */
16454  __pyx_v_nSpace = (__pyx_v_grad_w_dV->dimensions[3]);
16455 
16456  /* "cfemIntegrals.pyx":3589
16457  * cdef int nDOF_test_element = grad_w_dV.shape[2]
16458  * cdef int nSpace = grad_w_dV.shape[3]
16459  * cupdateNumericalDiffusion_lowmem(nElements_global, # <<<<<<<<<<<<<<
16460  * nQuadraturePoints_element,
16461  * nDOF_test_element,
16462  */
16463  updateNumericalDiffusion_lowmem(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_test_element, __pyx_v_nSpace, ((double *)__pyx_v_numDiff->data), ((double *)__pyx_v_grad_u->data), ((double *)__pyx_v_grad_w_dV->data), ((double *)__pyx_v_weak_residual->data));
16464 
16465  /* "cfemIntegrals.pyx":3581
16466  * <double*>grad_u_X_grad_w_dV.data,
16467  * <double*>weak_residual.data)
16468  * def updateNumericalDiffusion_lowmem(np.ndarray numDiff, # <<<<<<<<<<<<<<
16469  * np.ndarray grad_u,
16470  * np.ndarray grad_w_dV,
16471  */
16472 
16473  /* function exit code */
16474  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
16475  __Pyx_XGIVEREF(__pyx_r);
16476  __Pyx_RefNannyFinishContext();
16477  return __pyx_r;
16478 }
16479 
16480 /* "cfemIntegrals.pyx":3597
16481  * <double*> grad_w_dV.data,
16482  * <double*> weak_residual.data)
16483  * def updateNumericalDiffusionJacobian(np.ndarray numDiff, # <<<<<<<<<<<<<<
16484  * np.ndarray grad_v_X_grad_w_dV,
16485  * np.ndarray jacobian_weak_residual):
16486  */
16487 
16488 /* Python wrapper */
16489 static PyObject *__pyx_pw_13cfemIntegrals_143updateNumericalDiffusionJacobian(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16490 static PyMethodDef __pyx_mdef_13cfemIntegrals_143updateNumericalDiffusionJacobian = {"updateNumericalDiffusionJacobian", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_143updateNumericalDiffusionJacobian, METH_VARARGS|METH_KEYWORDS, 0};
16491 static PyObject *__pyx_pw_13cfemIntegrals_143updateNumericalDiffusionJacobian(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16492  PyArrayObject *__pyx_v_numDiff = 0;
16493  PyArrayObject *__pyx_v_grad_v_X_grad_w_dV = 0;
16494  PyArrayObject *__pyx_v_jacobian_weak_residual = 0;
16495  int __pyx_lineno = 0;
16496  const char *__pyx_filename = NULL;
16497  int __pyx_clineno = 0;
16498  PyObject *__pyx_r = 0;
16499  __Pyx_RefNannyDeclarations
16500  __Pyx_RefNannySetupContext("updateNumericalDiffusionJacobian (wrapper)", 0);
16501  {
16502  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_numDiff,&__pyx_n_s_grad_v_X_grad_w_dV,&__pyx_n_s_jacobian_weak_residual,0};
16503  PyObject* values[3] = {0,0,0};
16504  if (unlikely(__pyx_kwds)) {
16505  Py_ssize_t kw_args;
16506  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16507  switch (pos_args) {
16508  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
16509  CYTHON_FALLTHROUGH;
16510  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16511  CYTHON_FALLTHROUGH;
16512  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16513  CYTHON_FALLTHROUGH;
16514  case 0: break;
16515  default: goto __pyx_L5_argtuple_error;
16516  }
16517  kw_args = PyDict_Size(__pyx_kwds);
16518  switch (pos_args) {
16519  case 0:
16520  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_numDiff)) != 0)) kw_args--;
16521  else goto __pyx_L5_argtuple_error;
16522  CYTHON_FALLTHROUGH;
16523  case 1:
16524  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_v_X_grad_w_dV)) != 0)) kw_args--;
16525  else {
16526  __Pyx_RaiseArgtupleInvalid("updateNumericalDiffusionJacobian", 1, 3, 3, 1); __PYX_ERR(0, 3597, __pyx_L3_error)
16527  }
16528  CYTHON_FALLTHROUGH;
16529  case 2:
16530  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jacobian_weak_residual)) != 0)) kw_args--;
16531  else {
16532  __Pyx_RaiseArgtupleInvalid("updateNumericalDiffusionJacobian", 1, 3, 3, 2); __PYX_ERR(0, 3597, __pyx_L3_error)
16533  }
16534  }
16535  if (unlikely(kw_args > 0)) {
16536  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateNumericalDiffusionJacobian") < 0)) __PYX_ERR(0, 3597, __pyx_L3_error)
16537  }
16538  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
16539  goto __pyx_L5_argtuple_error;
16540  } else {
16541  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16542  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16543  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
16544  }
16545  __pyx_v_numDiff = ((PyArrayObject *)values[0]);
16546  __pyx_v_grad_v_X_grad_w_dV = ((PyArrayObject *)values[1]);
16547  __pyx_v_jacobian_weak_residual = ((PyArrayObject *)values[2]);
16548  }
16549  goto __pyx_L4_argument_unpacking_done;
16550  __pyx_L5_argtuple_error:;
16551  __Pyx_RaiseArgtupleInvalid("updateNumericalDiffusionJacobian", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3597, __pyx_L3_error)
16552  __pyx_L3_error:;
16553  __Pyx_AddTraceback("cfemIntegrals.updateNumericalDiffusionJacobian", __pyx_clineno, __pyx_lineno, __pyx_filename);
16554  __Pyx_RefNannyFinishContext();
16555  return NULL;
16556  __pyx_L4_argument_unpacking_done:;
16557  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_numDiff), __pyx_ptype_5numpy_ndarray, 1, "numDiff", 0))) __PYX_ERR(0, 3597, __pyx_L1_error)
16558  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_v_X_grad_w_dV), __pyx_ptype_5numpy_ndarray, 1, "grad_v_X_grad_w_dV", 0))) __PYX_ERR(0, 3598, __pyx_L1_error)
16559  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_jacobian_weak_residual), __pyx_ptype_5numpy_ndarray, 1, "jacobian_weak_residual", 0))) __PYX_ERR(0, 3599, __pyx_L1_error)
16560  __pyx_r = __pyx_pf_13cfemIntegrals_142updateNumericalDiffusionJacobian(__pyx_self, __pyx_v_numDiff, __pyx_v_grad_v_X_grad_w_dV, __pyx_v_jacobian_weak_residual);
16561 
16562  /* function exit code */
16563  goto __pyx_L0;
16564  __pyx_L1_error:;
16565  __pyx_r = NULL;
16566  __pyx_L0:;
16567  __Pyx_RefNannyFinishContext();
16568  return __pyx_r;
16569 }
16570 
16571 static PyObject *__pyx_pf_13cfemIntegrals_142updateNumericalDiffusionJacobian(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_numDiff, PyArrayObject *__pyx_v_grad_v_X_grad_w_dV, PyArrayObject *__pyx_v_jacobian_weak_residual) {
16572  int __pyx_v_nElements_global;
16573  int __pyx_v_nQuadraturePoints_element;
16574  int __pyx_v_nDOF_trial_element;
16575  int __pyx_v_nDOF_test_element;
16576  int __pyx_v_nSpace;
16577  PyObject *__pyx_r = NULL;
16578  __Pyx_RefNannyDeclarations
16579  __Pyx_RefNannySetupContext("updateNumericalDiffusionJacobian", 0);
16580 
16581  /* "cfemIntegrals.pyx":3600
16582  * np.ndarray grad_v_X_grad_w_dV,
16583  * np.ndarray jacobian_weak_residual):
16584  * cdef int nElements_global = grad_v_X_grad_w_dV.shape[0] # <<<<<<<<<<<<<<
16585  * cdef int nQuadraturePoints_element = grad_v_X_grad_w_dV.shape[1]
16586  * cdef int nDOF_trial_element = grad_v_X_grad_w_dV.shape[2]
16587  */
16588  __pyx_v_nElements_global = (__pyx_v_grad_v_X_grad_w_dV->dimensions[0]);
16589 
16590  /* "cfemIntegrals.pyx":3601
16591  * np.ndarray jacobian_weak_residual):
16592  * cdef int nElements_global = grad_v_X_grad_w_dV.shape[0]
16593  * cdef int nQuadraturePoints_element = grad_v_X_grad_w_dV.shape[1] # <<<<<<<<<<<<<<
16594  * cdef int nDOF_trial_element = grad_v_X_grad_w_dV.shape[2]
16595  * cdef int nDOF_test_element = grad_v_X_grad_w_dV.shape[3]
16596  */
16597  __pyx_v_nQuadraturePoints_element = (__pyx_v_grad_v_X_grad_w_dV->dimensions[1]);
16598 
16599  /* "cfemIntegrals.pyx":3602
16600  * cdef int nElements_global = grad_v_X_grad_w_dV.shape[0]
16601  * cdef int nQuadraturePoints_element = grad_v_X_grad_w_dV.shape[1]
16602  * cdef int nDOF_trial_element = grad_v_X_grad_w_dV.shape[2] # <<<<<<<<<<<<<<
16603  * cdef int nDOF_test_element = grad_v_X_grad_w_dV.shape[3]
16604  * cdef int nSpace = grad_v_X_grad_w_dV.shape[4]
16605  */
16606  __pyx_v_nDOF_trial_element = (__pyx_v_grad_v_X_grad_w_dV->dimensions[2]);
16607 
16608  /* "cfemIntegrals.pyx":3603
16609  * cdef int nQuadraturePoints_element = grad_v_X_grad_w_dV.shape[1]
16610  * cdef int nDOF_trial_element = grad_v_X_grad_w_dV.shape[2]
16611  * cdef int nDOF_test_element = grad_v_X_grad_w_dV.shape[3] # <<<<<<<<<<<<<<
16612  * cdef int nSpace = grad_v_X_grad_w_dV.shape[4]
16613  * cupdateNumericalDiffusionJacobian(nElements_global,
16614  */
16615  __pyx_v_nDOF_test_element = (__pyx_v_grad_v_X_grad_w_dV->dimensions[3]);
16616 
16617  /* "cfemIntegrals.pyx":3604
16618  * cdef int nDOF_trial_element = grad_v_X_grad_w_dV.shape[2]
16619  * cdef int nDOF_test_element = grad_v_X_grad_w_dV.shape[3]
16620  * cdef int nSpace = grad_v_X_grad_w_dV.shape[4] # <<<<<<<<<<<<<<
16621  * cupdateNumericalDiffusionJacobian(nElements_global,
16622  * nQuadraturePoints_element,
16623  */
16624  __pyx_v_nSpace = (__pyx_v_grad_v_X_grad_w_dV->dimensions[4]);
16625 
16626  /* "cfemIntegrals.pyx":3605
16627  * cdef int nDOF_test_element = grad_v_X_grad_w_dV.shape[3]
16628  * cdef int nSpace = grad_v_X_grad_w_dV.shape[4]
16629  * cupdateNumericalDiffusionJacobian(nElements_global, # <<<<<<<<<<<<<<
16630  * nQuadraturePoints_element,
16631  * nDOF_trial_element,
16632  */
16633  updateNumericalDiffusionJacobian(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_trial_element, __pyx_v_nDOF_test_element, __pyx_v_nSpace, ((double *)__pyx_v_numDiff->data), ((double *)__pyx_v_grad_v_X_grad_w_dV->data), ((double *)__pyx_v_jacobian_weak_residual->data));
16634 
16635  /* "cfemIntegrals.pyx":3597
16636  * <double*> grad_w_dV.data,
16637  * <double*> weak_residual.data)
16638  * def updateNumericalDiffusionJacobian(np.ndarray numDiff, # <<<<<<<<<<<<<<
16639  * np.ndarray grad_v_X_grad_w_dV,
16640  * np.ndarray jacobian_weak_residual):
16641  */
16642 
16643  /* function exit code */
16644  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
16645  __Pyx_XGIVEREF(__pyx_r);
16646  __Pyx_RefNannyFinishContext();
16647  return __pyx_r;
16648 }
16649 
16650 /* "cfemIntegrals.pyx":3613
16651  * <double*>grad_v_X_grad_w_dV.data,
16652  * <double*>jacobian_weak_residual.data)
16653  * def updateNumericalDiffusionJacobian_lowmem(np.ndarray numDiff, # <<<<<<<<<<<<<<
16654  * np.ndarray grad_v,
16655  * np.ndarray grad_w_dV,
16656  */
16657 
16658 /* Python wrapper */
16659 static PyObject *__pyx_pw_13cfemIntegrals_145updateNumericalDiffusionJacobian_lowmem(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16660 static PyMethodDef __pyx_mdef_13cfemIntegrals_145updateNumericalDiffusionJacobian_lowmem = {"updateNumericalDiffusionJacobian_lowmem", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_145updateNumericalDiffusionJacobian_lowmem, METH_VARARGS|METH_KEYWORDS, 0};
16661 static PyObject *__pyx_pw_13cfemIntegrals_145updateNumericalDiffusionJacobian_lowmem(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16662  PyArrayObject *__pyx_v_numDiff = 0;
16663  PyArrayObject *__pyx_v_grad_v = 0;
16664  PyArrayObject *__pyx_v_grad_w_dV = 0;
16665  PyArrayObject *__pyx_v_jacobian_weak_residual = 0;
16666  int __pyx_lineno = 0;
16667  const char *__pyx_filename = NULL;
16668  int __pyx_clineno = 0;
16669  PyObject *__pyx_r = 0;
16670  __Pyx_RefNannyDeclarations
16671  __Pyx_RefNannySetupContext("updateNumericalDiffusionJacobian_lowmem (wrapper)", 0);
16672  {
16673  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_numDiff,&__pyx_n_s_grad_v,&__pyx_n_s_grad_w_dV,&__pyx_n_s_jacobian_weak_residual,0};
16674  PyObject* values[4] = {0,0,0,0};
16675  if (unlikely(__pyx_kwds)) {
16676  Py_ssize_t kw_args;
16677  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16678  switch (pos_args) {
16679  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
16680  CYTHON_FALLTHROUGH;
16681  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
16682  CYTHON_FALLTHROUGH;
16683  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16684  CYTHON_FALLTHROUGH;
16685  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16686  CYTHON_FALLTHROUGH;
16687  case 0: break;
16688  default: goto __pyx_L5_argtuple_error;
16689  }
16690  kw_args = PyDict_Size(__pyx_kwds);
16691  switch (pos_args) {
16692  case 0:
16693  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_numDiff)) != 0)) kw_args--;
16694  else goto __pyx_L5_argtuple_error;
16695  CYTHON_FALLTHROUGH;
16696  case 1:
16697  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_v)) != 0)) kw_args--;
16698  else {
16699  __Pyx_RaiseArgtupleInvalid("updateNumericalDiffusionJacobian_lowmem", 1, 4, 4, 1); __PYX_ERR(0, 3613, __pyx_L3_error)
16700  }
16701  CYTHON_FALLTHROUGH;
16702  case 2:
16703  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_w_dV)) != 0)) kw_args--;
16704  else {
16705  __Pyx_RaiseArgtupleInvalid("updateNumericalDiffusionJacobian_lowmem", 1, 4, 4, 2); __PYX_ERR(0, 3613, __pyx_L3_error)
16706  }
16707  CYTHON_FALLTHROUGH;
16708  case 3:
16709  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jacobian_weak_residual)) != 0)) kw_args--;
16710  else {
16711  __Pyx_RaiseArgtupleInvalid("updateNumericalDiffusionJacobian_lowmem", 1, 4, 4, 3); __PYX_ERR(0, 3613, __pyx_L3_error)
16712  }
16713  }
16714  if (unlikely(kw_args > 0)) {
16715  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateNumericalDiffusionJacobian_lowmem") < 0)) __PYX_ERR(0, 3613, __pyx_L3_error)
16716  }
16717  } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
16718  goto __pyx_L5_argtuple_error;
16719  } else {
16720  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16721  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16722  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
16723  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
16724  }
16725  __pyx_v_numDiff = ((PyArrayObject *)values[0]);
16726  __pyx_v_grad_v = ((PyArrayObject *)values[1]);
16727  __pyx_v_grad_w_dV = ((PyArrayObject *)values[2]);
16728  __pyx_v_jacobian_weak_residual = ((PyArrayObject *)values[3]);
16729  }
16730  goto __pyx_L4_argument_unpacking_done;
16731  __pyx_L5_argtuple_error:;
16732  __Pyx_RaiseArgtupleInvalid("updateNumericalDiffusionJacobian_lowmem", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3613, __pyx_L3_error)
16733  __pyx_L3_error:;
16734  __Pyx_AddTraceback("cfemIntegrals.updateNumericalDiffusionJacobian_lowmem", __pyx_clineno, __pyx_lineno, __pyx_filename);
16735  __Pyx_RefNannyFinishContext();
16736  return NULL;
16737  __pyx_L4_argument_unpacking_done:;
16738  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_numDiff), __pyx_ptype_5numpy_ndarray, 1, "numDiff", 0))) __PYX_ERR(0, 3613, __pyx_L1_error)
16739  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_v), __pyx_ptype_5numpy_ndarray, 1, "grad_v", 0))) __PYX_ERR(0, 3614, __pyx_L1_error)
16740  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_w_dV), __pyx_ptype_5numpy_ndarray, 1, "grad_w_dV", 0))) __PYX_ERR(0, 3615, __pyx_L1_error)
16741  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_jacobian_weak_residual), __pyx_ptype_5numpy_ndarray, 1, "jacobian_weak_residual", 0))) __PYX_ERR(0, 3616, __pyx_L1_error)
16742  __pyx_r = __pyx_pf_13cfemIntegrals_144updateNumericalDiffusionJacobian_lowmem(__pyx_self, __pyx_v_numDiff, __pyx_v_grad_v, __pyx_v_grad_w_dV, __pyx_v_jacobian_weak_residual);
16743 
16744  /* function exit code */
16745  goto __pyx_L0;
16746  __pyx_L1_error:;
16747  __pyx_r = NULL;
16748  __pyx_L0:;
16749  __Pyx_RefNannyFinishContext();
16750  return __pyx_r;
16751 }
16752 
16753 static PyObject *__pyx_pf_13cfemIntegrals_144updateNumericalDiffusionJacobian_lowmem(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_numDiff, PyArrayObject *__pyx_v_grad_v, PyArrayObject *__pyx_v_grad_w_dV, PyArrayObject *__pyx_v_jacobian_weak_residual) {
16754  npy_intp __pyx_v_nElements_global;
16755  npy_intp __pyx_v_nQuadraturePoints_element;
16756  npy_intp __pyx_v_nDOF_trial_element;
16757  npy_intp __pyx_v_nDOF_test_element;
16758  npy_intp __pyx_v_nSpace;
16759  PyObject *__pyx_r = NULL;
16760  __Pyx_RefNannyDeclarations
16761  __Pyx_RefNannySetupContext("updateNumericalDiffusionJacobian_lowmem", 0);
16762 
16763  /* "cfemIntegrals.pyx":3617
16764  * np.ndarray grad_w_dV,
16765  * np.ndarray jacobian_weak_residual):
16766  * nElements_global = grad_v.shape[0] # <<<<<<<<<<<<<<
16767  * nQuadraturePoints_element = grad_v.shape[1]
16768  * nDOF_trial_element = grad_v.shape[2]
16769  */
16770  __pyx_v_nElements_global = (__pyx_v_grad_v->dimensions[0]);
16771 
16772  /* "cfemIntegrals.pyx":3618
16773  * np.ndarray jacobian_weak_residual):
16774  * nElements_global = grad_v.shape[0]
16775  * nQuadraturePoints_element = grad_v.shape[1] # <<<<<<<<<<<<<<
16776  * nDOF_trial_element = grad_v.shape[2]
16777  * nDOF_test_element = grad_w_dV.shape[2]
16778  */
16779  __pyx_v_nQuadraturePoints_element = (__pyx_v_grad_v->dimensions[1]);
16780 
16781  /* "cfemIntegrals.pyx":3619
16782  * nElements_global = grad_v.shape[0]
16783  * nQuadraturePoints_element = grad_v.shape[1]
16784  * nDOF_trial_element = grad_v.shape[2] # <<<<<<<<<<<<<<
16785  * nDOF_test_element = grad_w_dV.shape[2]
16786  * nSpace = grad_w_dV.shape[3]
16787  */
16788  __pyx_v_nDOF_trial_element = (__pyx_v_grad_v->dimensions[2]);
16789 
16790  /* "cfemIntegrals.pyx":3620
16791  * nQuadraturePoints_element = grad_v.shape[1]
16792  * nDOF_trial_element = grad_v.shape[2]
16793  * nDOF_test_element = grad_w_dV.shape[2] # <<<<<<<<<<<<<<
16794  * nSpace = grad_w_dV.shape[3]
16795  * cupdateNumericalDiffusionJacobian_lowmem(nElements_global,
16796  */
16797  __pyx_v_nDOF_test_element = (__pyx_v_grad_w_dV->dimensions[2]);
16798 
16799  /* "cfemIntegrals.pyx":3621
16800  * nDOF_trial_element = grad_v.shape[2]
16801  * nDOF_test_element = grad_w_dV.shape[2]
16802  * nSpace = grad_w_dV.shape[3] # <<<<<<<<<<<<<<
16803  * cupdateNumericalDiffusionJacobian_lowmem(nElements_global,
16804  * nQuadraturePoints_element,
16805  */
16806  __pyx_v_nSpace = (__pyx_v_grad_w_dV->dimensions[3]);
16807 
16808  /* "cfemIntegrals.pyx":3622
16809  * nDOF_test_element = grad_w_dV.shape[2]
16810  * nSpace = grad_w_dV.shape[3]
16811  * cupdateNumericalDiffusionJacobian_lowmem(nElements_global, # <<<<<<<<<<<<<<
16812  * nQuadraturePoints_element,
16813  * nDOF_trial_element,
16814  */
16815  updateNumericalDiffusionJacobian_lowmem(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_trial_element, __pyx_v_nDOF_test_element, __pyx_v_nSpace, ((double *)__pyx_v_numDiff->data), ((double *)__pyx_v_grad_v->data), ((double *)__pyx_v_grad_w_dV->data), ((double *)__pyx_v_jacobian_weak_residual->data));
16816 
16817  /* "cfemIntegrals.pyx":3613
16818  * <double*>grad_v_X_grad_w_dV.data,
16819  * <double*>jacobian_weak_residual.data)
16820  * def updateNumericalDiffusionJacobian_lowmem(np.ndarray numDiff, # <<<<<<<<<<<<<<
16821  * np.ndarray grad_v,
16822  * np.ndarray grad_w_dV,
16823  */
16824 
16825  /* function exit code */
16826  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
16827  __Pyx_XGIVEREF(__pyx_r);
16828  __Pyx_RefNannyFinishContext();
16829  return __pyx_r;
16830 }
16831 
16832 /* "cfemIntegrals.pyx":3631
16833  * <double*> grad_w_dV.data,
16834  * <double*> jacobian_weak_residual.data)
16835  * def calculateScalarScalarProduct(np.ndarray s1, # <<<<<<<<<<<<<<
16836  * np.ndarray s2,
16837  * np.ndarray sResult):
16838  */
16839 
16840 /* Python wrapper */
16841 static PyObject *__pyx_pw_13cfemIntegrals_147calculateScalarScalarProduct(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16842 static PyMethodDef __pyx_mdef_13cfemIntegrals_147calculateScalarScalarProduct = {"calculateScalarScalarProduct", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_147calculateScalarScalarProduct, METH_VARARGS|METH_KEYWORDS, 0};
16843 static PyObject *__pyx_pw_13cfemIntegrals_147calculateScalarScalarProduct(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16844  PyArrayObject *__pyx_v_s1 = 0;
16845  PyArrayObject *__pyx_v_s2 = 0;
16846  PyArrayObject *__pyx_v_sResult = 0;
16847  int __pyx_lineno = 0;
16848  const char *__pyx_filename = NULL;
16849  int __pyx_clineno = 0;
16850  PyObject *__pyx_r = 0;
16851  __Pyx_RefNannyDeclarations
16852  __Pyx_RefNannySetupContext("calculateScalarScalarProduct (wrapper)", 0);
16853  {
16854  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_s1,&__pyx_n_s_s2,&__pyx_n_s_sResult,0};
16855  PyObject* values[3] = {0,0,0};
16856  if (unlikely(__pyx_kwds)) {
16857  Py_ssize_t kw_args;
16858  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16859  switch (pos_args) {
16860  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
16861  CYTHON_FALLTHROUGH;
16862  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16863  CYTHON_FALLTHROUGH;
16864  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16865  CYTHON_FALLTHROUGH;
16866  case 0: break;
16867  default: goto __pyx_L5_argtuple_error;
16868  }
16869  kw_args = PyDict_Size(__pyx_kwds);
16870  switch (pos_args) {
16871  case 0:
16872  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_s1)) != 0)) kw_args--;
16873  else goto __pyx_L5_argtuple_error;
16874  CYTHON_FALLTHROUGH;
16875  case 1:
16876  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_s2)) != 0)) kw_args--;
16877  else {
16878  __Pyx_RaiseArgtupleInvalid("calculateScalarScalarProduct", 1, 3, 3, 1); __PYX_ERR(0, 3631, __pyx_L3_error)
16879  }
16880  CYTHON_FALLTHROUGH;
16881  case 2:
16882  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sResult)) != 0)) kw_args--;
16883  else {
16884  __Pyx_RaiseArgtupleInvalid("calculateScalarScalarProduct", 1, 3, 3, 2); __PYX_ERR(0, 3631, __pyx_L3_error)
16885  }
16886  }
16887  if (unlikely(kw_args > 0)) {
16888  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateScalarScalarProduct") < 0)) __PYX_ERR(0, 3631, __pyx_L3_error)
16889  }
16890  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
16891  goto __pyx_L5_argtuple_error;
16892  } else {
16893  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16894  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16895  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
16896  }
16897  __pyx_v_s1 = ((PyArrayObject *)values[0]);
16898  __pyx_v_s2 = ((PyArrayObject *)values[1]);
16899  __pyx_v_sResult = ((PyArrayObject *)values[2]);
16900  }
16901  goto __pyx_L4_argument_unpacking_done;
16902  __pyx_L5_argtuple_error:;
16903  __Pyx_RaiseArgtupleInvalid("calculateScalarScalarProduct", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3631, __pyx_L3_error)
16904  __pyx_L3_error:;
16905  __Pyx_AddTraceback("cfemIntegrals.calculateScalarScalarProduct", __pyx_clineno, __pyx_lineno, __pyx_filename);
16906  __Pyx_RefNannyFinishContext();
16907  return NULL;
16908  __pyx_L4_argument_unpacking_done:;
16909  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_s1), __pyx_ptype_5numpy_ndarray, 1, "s1", 0))) __PYX_ERR(0, 3631, __pyx_L1_error)
16910  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_s2), __pyx_ptype_5numpy_ndarray, 1, "s2", 0))) __PYX_ERR(0, 3632, __pyx_L1_error)
16911  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sResult), __pyx_ptype_5numpy_ndarray, 1, "sResult", 0))) __PYX_ERR(0, 3633, __pyx_L1_error)
16912  __pyx_r = __pyx_pf_13cfemIntegrals_146calculateScalarScalarProduct(__pyx_self, __pyx_v_s1, __pyx_v_s2, __pyx_v_sResult);
16913 
16914  /* function exit code */
16915  goto __pyx_L0;
16916  __pyx_L1_error:;
16917  __pyx_r = NULL;
16918  __pyx_L0:;
16919  __Pyx_RefNannyFinishContext();
16920  return __pyx_r;
16921 }
16922 
16923 static PyObject *__pyx_pf_13cfemIntegrals_146calculateScalarScalarProduct(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_s1, PyArrayObject *__pyx_v_s2, PyArrayObject *__pyx_v_sResult) {
16924  int __pyx_v_nElements_global;
16925  int __pyx_v_nQuadraturePoints_element;
16926  PyObject *__pyx_r = NULL;
16927  __Pyx_RefNannyDeclarations
16928  __Pyx_RefNannySetupContext("calculateScalarScalarProduct", 0);
16929 
16930  /* "cfemIntegrals.pyx":3634
16931  * np.ndarray s2,
16932  * np.ndarray sResult):
16933  * cdef int nElements_global = s1.shape[0] # <<<<<<<<<<<<<<
16934  * cdef int nQuadraturePoints_element = s1.shape[1]
16935  * ccalculateScalarScalarProduct(nElements_global,
16936  */
16937  __pyx_v_nElements_global = (__pyx_v_s1->dimensions[0]);
16938 
16939  /* "cfemIntegrals.pyx":3635
16940  * np.ndarray sResult):
16941  * cdef int nElements_global = s1.shape[0]
16942  * cdef int nQuadraturePoints_element = s1.shape[1] # <<<<<<<<<<<<<<
16943  * ccalculateScalarScalarProduct(nElements_global,
16944  * nQuadraturePoints_element,
16945  */
16946  __pyx_v_nQuadraturePoints_element = (__pyx_v_s1->dimensions[1]);
16947 
16948  /* "cfemIntegrals.pyx":3636
16949  * cdef int nElements_global = s1.shape[0]
16950  * cdef int nQuadraturePoints_element = s1.shape[1]
16951  * ccalculateScalarScalarProduct(nElements_global, # <<<<<<<<<<<<<<
16952  * nQuadraturePoints_element,
16953  * <double*>s1.data,
16954  */
16955  calculateScalarScalarProduct(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, ((double *)__pyx_v_s1->data), ((double *)__pyx_v_s2->data), ((double *)__pyx_v_sResult->data));
16956 
16957  /* "cfemIntegrals.pyx":3631
16958  * <double*> grad_w_dV.data,
16959  * <double*> jacobian_weak_residual.data)
16960  * def calculateScalarScalarProduct(np.ndarray s1, # <<<<<<<<<<<<<<
16961  * np.ndarray s2,
16962  * np.ndarray sResult):
16963  */
16964 
16965  /* function exit code */
16966  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
16967  __Pyx_XGIVEREF(__pyx_r);
16968  __Pyx_RefNannyFinishContext();
16969  return __pyx_r;
16970 }
16971 
16972 /* "cfemIntegrals.pyx":3641
16973  * <double*>s2.data,
16974  * <double*>sResult.data)
16975  * def calculateVectorScalarProduct(np.ndarray v, # <<<<<<<<<<<<<<
16976  * np.ndarray s,
16977  * np.ndarray vResult):
16978  */
16979 
16980 /* Python wrapper */
16981 static PyObject *__pyx_pw_13cfemIntegrals_149calculateVectorScalarProduct(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16982 static PyMethodDef __pyx_mdef_13cfemIntegrals_149calculateVectorScalarProduct = {"calculateVectorScalarProduct", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_149calculateVectorScalarProduct, METH_VARARGS|METH_KEYWORDS, 0};
16983 static PyObject *__pyx_pw_13cfemIntegrals_149calculateVectorScalarProduct(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16984  PyArrayObject *__pyx_v_v = 0;
16985  PyArrayObject *__pyx_v_s = 0;
16986  PyArrayObject *__pyx_v_vResult = 0;
16987  int __pyx_lineno = 0;
16988  const char *__pyx_filename = NULL;
16989  int __pyx_clineno = 0;
16990  PyObject *__pyx_r = 0;
16991  __Pyx_RefNannyDeclarations
16992  __Pyx_RefNannySetupContext("calculateVectorScalarProduct (wrapper)", 0);
16993  {
16994  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_v,&__pyx_n_s_s,&__pyx_n_s_vResult,0};
16995  PyObject* values[3] = {0,0,0};
16996  if (unlikely(__pyx_kwds)) {
16997  Py_ssize_t kw_args;
16998  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16999  switch (pos_args) {
17000  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
17001  CYTHON_FALLTHROUGH;
17002  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17003  CYTHON_FALLTHROUGH;
17004  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17005  CYTHON_FALLTHROUGH;
17006  case 0: break;
17007  default: goto __pyx_L5_argtuple_error;
17008  }
17009  kw_args = PyDict_Size(__pyx_kwds);
17010  switch (pos_args) {
17011  case 0:
17012  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
17013  else goto __pyx_L5_argtuple_error;
17014  CYTHON_FALLTHROUGH;
17015  case 1:
17016  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_s)) != 0)) kw_args--;
17017  else {
17018  __Pyx_RaiseArgtupleInvalid("calculateVectorScalarProduct", 1, 3, 3, 1); __PYX_ERR(0, 3641, __pyx_L3_error)
17019  }
17020  CYTHON_FALLTHROUGH;
17021  case 2:
17022  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vResult)) != 0)) kw_args--;
17023  else {
17024  __Pyx_RaiseArgtupleInvalid("calculateVectorScalarProduct", 1, 3, 3, 2); __PYX_ERR(0, 3641, __pyx_L3_error)
17025  }
17026  }
17027  if (unlikely(kw_args > 0)) {
17028  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateVectorScalarProduct") < 0)) __PYX_ERR(0, 3641, __pyx_L3_error)
17029  }
17030  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
17031  goto __pyx_L5_argtuple_error;
17032  } else {
17033  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17034  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17035  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
17036  }
17037  __pyx_v_v = ((PyArrayObject *)values[0]);
17038  __pyx_v_s = ((PyArrayObject *)values[1]);
17039  __pyx_v_vResult = ((PyArrayObject *)values[2]);
17040  }
17041  goto __pyx_L4_argument_unpacking_done;
17042  __pyx_L5_argtuple_error:;
17043  __Pyx_RaiseArgtupleInvalid("calculateVectorScalarProduct", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3641, __pyx_L3_error)
17044  __pyx_L3_error:;
17045  __Pyx_AddTraceback("cfemIntegrals.calculateVectorScalarProduct", __pyx_clineno, __pyx_lineno, __pyx_filename);
17046  __Pyx_RefNannyFinishContext();
17047  return NULL;
17048  __pyx_L4_argument_unpacking_done:;
17049  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), __pyx_ptype_5numpy_ndarray, 1, "v", 0))) __PYX_ERR(0, 3641, __pyx_L1_error)
17050  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_s), __pyx_ptype_5numpy_ndarray, 1, "s", 0))) __PYX_ERR(0, 3642, __pyx_L1_error)
17051  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vResult), __pyx_ptype_5numpy_ndarray, 1, "vResult", 0))) __PYX_ERR(0, 3643, __pyx_L1_error)
17052  __pyx_r = __pyx_pf_13cfemIntegrals_148calculateVectorScalarProduct(__pyx_self, __pyx_v_v, __pyx_v_s, __pyx_v_vResult);
17053 
17054  /* function exit code */
17055  goto __pyx_L0;
17056  __pyx_L1_error:;
17057  __pyx_r = NULL;
17058  __pyx_L0:;
17059  __Pyx_RefNannyFinishContext();
17060  return __pyx_r;
17061 }
17062 
17063 static PyObject *__pyx_pf_13cfemIntegrals_148calculateVectorScalarProduct(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_s, PyArrayObject *__pyx_v_vResult) {
17064  int __pyx_v_nElements_global;
17065  int __pyx_v_nQuadraturePoints_element;
17066  int __pyx_v_nSpace;
17067  PyObject *__pyx_r = NULL;
17068  __Pyx_RefNannyDeclarations
17069  __Pyx_RefNannySetupContext("calculateVectorScalarProduct", 0);
17070 
17071  /* "cfemIntegrals.pyx":3644
17072  * np.ndarray s,
17073  * np.ndarray vResult):
17074  * cdef int nElements_global = v.shape[0] # <<<<<<<<<<<<<<
17075  * cdef int nQuadraturePoints_element = v.shape[1]
17076  * cdef int nSpace = v.shape[2]
17077  */
17078  __pyx_v_nElements_global = (__pyx_v_v->dimensions[0]);
17079 
17080  /* "cfemIntegrals.pyx":3645
17081  * np.ndarray vResult):
17082  * cdef int nElements_global = v.shape[0]
17083  * cdef int nQuadraturePoints_element = v.shape[1] # <<<<<<<<<<<<<<
17084  * cdef int nSpace = v.shape[2]
17085  * ccalculateVectorScalarProduct(nElements_global,
17086  */
17087  __pyx_v_nQuadraturePoints_element = (__pyx_v_v->dimensions[1]);
17088 
17089  /* "cfemIntegrals.pyx":3646
17090  * cdef int nElements_global = v.shape[0]
17091  * cdef int nQuadraturePoints_element = v.shape[1]
17092  * cdef int nSpace = v.shape[2] # <<<<<<<<<<<<<<
17093  * ccalculateVectorScalarProduct(nElements_global,
17094  * nQuadraturePoints_element,
17095  */
17096  __pyx_v_nSpace = (__pyx_v_v->dimensions[2]);
17097 
17098  /* "cfemIntegrals.pyx":3647
17099  * cdef int nQuadraturePoints_element = v.shape[1]
17100  * cdef int nSpace = v.shape[2]
17101  * ccalculateVectorScalarProduct(nElements_global, # <<<<<<<<<<<<<<
17102  * nQuadraturePoints_element,
17103  * nSpace,
17104  */
17105  calculateVectorScalarProduct(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nSpace, ((double *)__pyx_v_v->data), ((double *)__pyx_v_s->data), ((double *)__pyx_v_vResult->data));
17106 
17107  /* "cfemIntegrals.pyx":3641
17108  * <double*>s2.data,
17109  * <double*>sResult.data)
17110  * def calculateVectorScalarProduct(np.ndarray v, # <<<<<<<<<<<<<<
17111  * np.ndarray s,
17112  * np.ndarray vResult):
17113  */
17114 
17115  /* function exit code */
17116  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
17117  __Pyx_XGIVEREF(__pyx_r);
17118  __Pyx_RefNannyFinishContext();
17119  return __pyx_r;
17120 }
17121 
17122 /* "cfemIntegrals.pyx":3653
17123  * <double*>s.data,
17124  * <double*>vResult.data)
17125  * def calculateTensorScalarProduct(np.ndarray t, # <<<<<<<<<<<<<<
17126  * np.ndarray s,
17127  * np.ndarray tResult):
17128  */
17129 
17130 /* Python wrapper */
17131 static PyObject *__pyx_pw_13cfemIntegrals_151calculateTensorScalarProduct(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17132 static PyMethodDef __pyx_mdef_13cfemIntegrals_151calculateTensorScalarProduct = {"calculateTensorScalarProduct", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_151calculateTensorScalarProduct, METH_VARARGS|METH_KEYWORDS, 0};
17133 static PyObject *__pyx_pw_13cfemIntegrals_151calculateTensorScalarProduct(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17134  PyArrayObject *__pyx_v_t = 0;
17135  PyArrayObject *__pyx_v_s = 0;
17136  PyArrayObject *__pyx_v_tResult = 0;
17137  int __pyx_lineno = 0;
17138  const char *__pyx_filename = NULL;
17139  int __pyx_clineno = 0;
17140  PyObject *__pyx_r = 0;
17141  __Pyx_RefNannyDeclarations
17142  __Pyx_RefNannySetupContext("calculateTensorScalarProduct (wrapper)", 0);
17143  {
17144  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_t,&__pyx_n_s_s,&__pyx_n_s_tResult,0};
17145  PyObject* values[3] = {0,0,0};
17146  if (unlikely(__pyx_kwds)) {
17147  Py_ssize_t kw_args;
17148  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17149  switch (pos_args) {
17150  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
17151  CYTHON_FALLTHROUGH;
17152  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17153  CYTHON_FALLTHROUGH;
17154  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17155  CYTHON_FALLTHROUGH;
17156  case 0: break;
17157  default: goto __pyx_L5_argtuple_error;
17158  }
17159  kw_args = PyDict_Size(__pyx_kwds);
17160  switch (pos_args) {
17161  case 0:
17162  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
17163  else goto __pyx_L5_argtuple_error;
17164  CYTHON_FALLTHROUGH;
17165  case 1:
17166  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_s)) != 0)) kw_args--;
17167  else {
17168  __Pyx_RaiseArgtupleInvalid("calculateTensorScalarProduct", 1, 3, 3, 1); __PYX_ERR(0, 3653, __pyx_L3_error)
17169  }
17170  CYTHON_FALLTHROUGH;
17171  case 2:
17172  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tResult)) != 0)) kw_args--;
17173  else {
17174  __Pyx_RaiseArgtupleInvalid("calculateTensorScalarProduct", 1, 3, 3, 2); __PYX_ERR(0, 3653, __pyx_L3_error)
17175  }
17176  }
17177  if (unlikely(kw_args > 0)) {
17178  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateTensorScalarProduct") < 0)) __PYX_ERR(0, 3653, __pyx_L3_error)
17179  }
17180  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
17181  goto __pyx_L5_argtuple_error;
17182  } else {
17183  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17184  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17185  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
17186  }
17187  __pyx_v_t = ((PyArrayObject *)values[0]);
17188  __pyx_v_s = ((PyArrayObject *)values[1]);
17189  __pyx_v_tResult = ((PyArrayObject *)values[2]);
17190  }
17191  goto __pyx_L4_argument_unpacking_done;
17192  __pyx_L5_argtuple_error:;
17193  __Pyx_RaiseArgtupleInvalid("calculateTensorScalarProduct", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3653, __pyx_L3_error)
17194  __pyx_L3_error:;
17195  __Pyx_AddTraceback("cfemIntegrals.calculateTensorScalarProduct", __pyx_clineno, __pyx_lineno, __pyx_filename);
17196  __Pyx_RefNannyFinishContext();
17197  return NULL;
17198  __pyx_L4_argument_unpacking_done:;
17199  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_t), __pyx_ptype_5numpy_ndarray, 1, "t", 0))) __PYX_ERR(0, 3653, __pyx_L1_error)
17200  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_s), __pyx_ptype_5numpy_ndarray, 1, "s", 0))) __PYX_ERR(0, 3654, __pyx_L1_error)
17201  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tResult), __pyx_ptype_5numpy_ndarray, 1, "tResult", 0))) __PYX_ERR(0, 3655, __pyx_L1_error)
17202  __pyx_r = __pyx_pf_13cfemIntegrals_150calculateTensorScalarProduct(__pyx_self, __pyx_v_t, __pyx_v_s, __pyx_v_tResult);
17203 
17204  /* function exit code */
17205  goto __pyx_L0;
17206  __pyx_L1_error:;
17207  __pyx_r = NULL;
17208  __pyx_L0:;
17209  __Pyx_RefNannyFinishContext();
17210  return __pyx_r;
17211 }
17212 
17213 static PyObject *__pyx_pf_13cfemIntegrals_150calculateTensorScalarProduct(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_t, PyArrayObject *__pyx_v_s, PyArrayObject *__pyx_v_tResult) {
17214  int __pyx_v_nElements_global;
17215  int __pyx_v_nQuadraturePoints_element;
17216  int __pyx_v_nSpace;
17217  PyObject *__pyx_r = NULL;
17218  __Pyx_RefNannyDeclarations
17219  __Pyx_RefNannySetupContext("calculateTensorScalarProduct", 0);
17220 
17221  /* "cfemIntegrals.pyx":3656
17222  * np.ndarray s,
17223  * np.ndarray tResult):
17224  * cdef int nElements_global = t.shape[0] # <<<<<<<<<<<<<<
17225  * cdef int nQuadraturePoints_element = t.shape[1]
17226  * cdef int nSpace = t.shape[2]
17227  */
17228  __pyx_v_nElements_global = (__pyx_v_t->dimensions[0]);
17229 
17230  /* "cfemIntegrals.pyx":3657
17231  * np.ndarray tResult):
17232  * cdef int nElements_global = t.shape[0]
17233  * cdef int nQuadraturePoints_element = t.shape[1] # <<<<<<<<<<<<<<
17234  * cdef int nSpace = t.shape[2]
17235  * ccalculateTensorScalarProduct(nElements_global,
17236  */
17237  __pyx_v_nQuadraturePoints_element = (__pyx_v_t->dimensions[1]);
17238 
17239  /* "cfemIntegrals.pyx":3658
17240  * cdef int nElements_global = t.shape[0]
17241  * cdef int nQuadraturePoints_element = t.shape[1]
17242  * cdef int nSpace = t.shape[2] # <<<<<<<<<<<<<<
17243  * ccalculateTensorScalarProduct(nElements_global,
17244  * nQuadraturePoints_element,
17245  */
17246  __pyx_v_nSpace = (__pyx_v_t->dimensions[2]);
17247 
17248  /* "cfemIntegrals.pyx":3659
17249  * cdef int nQuadraturePoints_element = t.shape[1]
17250  * cdef int nSpace = t.shape[2]
17251  * ccalculateTensorScalarProduct(nElements_global, # <<<<<<<<<<<<<<
17252  * nQuadraturePoints_element,
17253  * nSpace,
17254  */
17255  calculateTensorScalarProduct(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nSpace, ((double *)__pyx_v_t->data), ((double *)__pyx_v_s->data), ((double *)__pyx_v_tResult->data));
17256 
17257  /* "cfemIntegrals.pyx":3653
17258  * <double*>s.data,
17259  * <double*>vResult.data)
17260  * def calculateTensorScalarProduct(np.ndarray t, # <<<<<<<<<<<<<<
17261  * np.ndarray s,
17262  * np.ndarray tResult):
17263  */
17264 
17265  /* function exit code */
17266  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
17267  __Pyx_XGIVEREF(__pyx_r);
17268  __Pyx_RefNannyFinishContext();
17269  return __pyx_r;
17270 }
17271 
17272 /* "cfemIntegrals.pyx":3665
17273  * <double*>s.data,
17274  * <double*>tResult.data)
17275  * def updateInteriorElementBoundaryFlux(np.ndarray interiorElementBoundaries, # <<<<<<<<<<<<<<
17276  * np.ndarray elementBoundaryElements,
17277  * np.ndarray elementBoundaryLocalElementBoundaries,
17278  */
17279 
17280 /* Python wrapper */
17281 static PyObject *__pyx_pw_13cfemIntegrals_153updateInteriorElementBoundaryFlux(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17282 static PyMethodDef __pyx_mdef_13cfemIntegrals_153updateInteriorElementBoundaryFlux = {"updateInteriorElementBoundaryFlux", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_153updateInteriorElementBoundaryFlux, METH_VARARGS|METH_KEYWORDS, 0};
17283 static PyObject *__pyx_pw_13cfemIntegrals_153updateInteriorElementBoundaryFlux(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17284  PyArrayObject *__pyx_v_interiorElementBoundaries = 0;
17285  PyArrayObject *__pyx_v_elementBoundaryElements = 0;
17286  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries = 0;
17287  PyArrayObject *__pyx_v_flux = 0;
17288  PyArrayObject *__pyx_v_w_dS = 0;
17289  PyArrayObject *__pyx_v_residual = 0;
17290  int __pyx_lineno = 0;
17291  const char *__pyx_filename = NULL;
17292  int __pyx_clineno = 0;
17293  PyObject *__pyx_r = 0;
17294  __Pyx_RefNannyDeclarations
17295  __Pyx_RefNannySetupContext("updateInteriorElementBoundaryFlux (wrapper)", 0);
17296  {
17297  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_interiorElementBoundaries,&__pyx_n_s_elementBoundaryElements,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_flux,&__pyx_n_s_w_dS,&__pyx_n_s_residual,0};
17298  PyObject* values[6] = {0,0,0,0,0,0};
17299  if (unlikely(__pyx_kwds)) {
17300  Py_ssize_t kw_args;
17301  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17302  switch (pos_args) {
17303  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
17304  CYTHON_FALLTHROUGH;
17305  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
17306  CYTHON_FALLTHROUGH;
17307  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
17308  CYTHON_FALLTHROUGH;
17309  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
17310  CYTHON_FALLTHROUGH;
17311  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17312  CYTHON_FALLTHROUGH;
17313  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17314  CYTHON_FALLTHROUGH;
17315  case 0: break;
17316  default: goto __pyx_L5_argtuple_error;
17317  }
17318  kw_args = PyDict_Size(__pyx_kwds);
17319  switch (pos_args) {
17320  case 0:
17321  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_interiorElementBoundaries)) != 0)) kw_args--;
17322  else goto __pyx_L5_argtuple_error;
17323  CYTHON_FALLTHROUGH;
17324  case 1:
17325  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElements)) != 0)) kw_args--;
17326  else {
17327  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundaryFlux", 1, 6, 6, 1); __PYX_ERR(0, 3665, __pyx_L3_error)
17328  }
17329  CYTHON_FALLTHROUGH;
17330  case 2:
17331  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
17332  else {
17333  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundaryFlux", 1, 6, 6, 2); __PYX_ERR(0, 3665, __pyx_L3_error)
17334  }
17335  CYTHON_FALLTHROUGH;
17336  case 3:
17337  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flux)) != 0)) kw_args--;
17338  else {
17339  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundaryFlux", 1, 6, 6, 3); __PYX_ERR(0, 3665, __pyx_L3_error)
17340  }
17341  CYTHON_FALLTHROUGH;
17342  case 4:
17343  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_w_dS)) != 0)) kw_args--;
17344  else {
17345  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundaryFlux", 1, 6, 6, 4); __PYX_ERR(0, 3665, __pyx_L3_error)
17346  }
17347  CYTHON_FALLTHROUGH;
17348  case 5:
17349  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_residual)) != 0)) kw_args--;
17350  else {
17351  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundaryFlux", 1, 6, 6, 5); __PYX_ERR(0, 3665, __pyx_L3_error)
17352  }
17353  }
17354  if (unlikely(kw_args > 0)) {
17355  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateInteriorElementBoundaryFlux") < 0)) __PYX_ERR(0, 3665, __pyx_L3_error)
17356  }
17357  } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
17358  goto __pyx_L5_argtuple_error;
17359  } else {
17360  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17361  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17362  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
17363  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
17364  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
17365  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
17366  }
17367  __pyx_v_interiorElementBoundaries = ((PyArrayObject *)values[0]);
17368  __pyx_v_elementBoundaryElements = ((PyArrayObject *)values[1]);
17369  __pyx_v_elementBoundaryLocalElementBoundaries = ((PyArrayObject *)values[2]);
17370  __pyx_v_flux = ((PyArrayObject *)values[3]);
17371  __pyx_v_w_dS = ((PyArrayObject *)values[4]);
17372  __pyx_v_residual = ((PyArrayObject *)values[5]);
17373  }
17374  goto __pyx_L4_argument_unpacking_done;
17375  __pyx_L5_argtuple_error:;
17376  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundaryFlux", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3665, __pyx_L3_error)
17377  __pyx_L3_error:;
17378  __Pyx_AddTraceback("cfemIntegrals.updateInteriorElementBoundaryFlux", __pyx_clineno, __pyx_lineno, __pyx_filename);
17379  __Pyx_RefNannyFinishContext();
17380  return NULL;
17381  __pyx_L4_argument_unpacking_done:;
17382  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_interiorElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "interiorElementBoundaries", 0))) __PYX_ERR(0, 3665, __pyx_L1_error)
17383  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElements), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElements", 0))) __PYX_ERR(0, 3666, __pyx_L1_error)
17384  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundaries", 0))) __PYX_ERR(0, 3667, __pyx_L1_error)
17385  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_flux), __pyx_ptype_5numpy_ndarray, 1, "flux", 0))) __PYX_ERR(0, 3668, __pyx_L1_error)
17386  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w_dS), __pyx_ptype_5numpy_ndarray, 1, "w_dS", 0))) __PYX_ERR(0, 3669, __pyx_L1_error)
17387  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_residual), __pyx_ptype_5numpy_ndarray, 1, "residual", 0))) __PYX_ERR(0, 3670, __pyx_L1_error)
17388  __pyx_r = __pyx_pf_13cfemIntegrals_152updateInteriorElementBoundaryFlux(__pyx_self, __pyx_v_interiorElementBoundaries, __pyx_v_elementBoundaryElements, __pyx_v_elementBoundaryLocalElementBoundaries, __pyx_v_flux, __pyx_v_w_dS, __pyx_v_residual);
17389 
17390  /* function exit code */
17391  goto __pyx_L0;
17392  __pyx_L1_error:;
17393  __pyx_r = NULL;
17394  __pyx_L0:;
17395  __Pyx_RefNannyFinishContext();
17396  return __pyx_r;
17397 }
17398 
17399 static PyObject *__pyx_pf_13cfemIntegrals_152updateInteriorElementBoundaryFlux(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_interiorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_flux, PyArrayObject *__pyx_v_w_dS, PyArrayObject *__pyx_v_residual) {
17400  int __pyx_v_nInteriorElementBoundaries_global;
17401  int __pyx_v_nElementBoundaries_element;
17402  int __pyx_v_nQuadraturePoints_elementBoundary;
17403  int __pyx_v_nDOF_test_element;
17404  PyObject *__pyx_r = NULL;
17405  __Pyx_RefNannyDeclarations
17406  __Pyx_RefNannySetupContext("updateInteriorElementBoundaryFlux", 0);
17407 
17408  /* "cfemIntegrals.pyx":3671
17409  * np.ndarray w_dS,
17410  * np.ndarray residual):
17411  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0] # <<<<<<<<<<<<<<
17412  * cdef int nElementBoundaries_element = w_dS.shape[1]
17413  * cdef int nQuadraturePoints_elementBoundary = w_dS.shape[2]
17414  */
17415  __pyx_v_nInteriorElementBoundaries_global = (__pyx_v_interiorElementBoundaries->dimensions[0]);
17416 
17417  /* "cfemIntegrals.pyx":3672
17418  * np.ndarray residual):
17419  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0]
17420  * cdef int nElementBoundaries_element = w_dS.shape[1] # <<<<<<<<<<<<<<
17421  * cdef int nQuadraturePoints_elementBoundary = w_dS.shape[2]
17422  * cdef int nDOF_test_element = w_dS.shape[3]
17423  */
17424  __pyx_v_nElementBoundaries_element = (__pyx_v_w_dS->dimensions[1]);
17425 
17426  /* "cfemIntegrals.pyx":3673
17427  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0]
17428  * cdef int nElementBoundaries_element = w_dS.shape[1]
17429  * cdef int nQuadraturePoints_elementBoundary = w_dS.shape[2] # <<<<<<<<<<<<<<
17430  * cdef int nDOF_test_element = w_dS.shape[3]
17431  * cupdateInteriorElementBoundaryFlux(nInteriorElementBoundaries_global,
17432  */
17433  __pyx_v_nQuadraturePoints_elementBoundary = (__pyx_v_w_dS->dimensions[2]);
17434 
17435  /* "cfemIntegrals.pyx":3674
17436  * cdef int nElementBoundaries_element = w_dS.shape[1]
17437  * cdef int nQuadraturePoints_elementBoundary = w_dS.shape[2]
17438  * cdef int nDOF_test_element = w_dS.shape[3] # <<<<<<<<<<<<<<
17439  * cupdateInteriorElementBoundaryFlux(nInteriorElementBoundaries_global,
17440  * nElementBoundaries_element,
17441  */
17442  __pyx_v_nDOF_test_element = (__pyx_v_w_dS->dimensions[3]);
17443 
17444  /* "cfemIntegrals.pyx":3675
17445  * cdef int nQuadraturePoints_elementBoundary = w_dS.shape[2]
17446  * cdef int nDOF_test_element = w_dS.shape[3]
17447  * cupdateInteriorElementBoundaryFlux(nInteriorElementBoundaries_global, # <<<<<<<<<<<<<<
17448  * nElementBoundaries_element,
17449  * nQuadraturePoints_elementBoundary,
17450  */
17451  updateInteriorElementBoundaryFlux(__pyx_v_nInteriorElementBoundaries_global, __pyx_v_nElementBoundaries_element, __pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nDOF_test_element, ((int *)__pyx_v_interiorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), ((double *)__pyx_v_flux->data), ((double *)__pyx_v_w_dS->data), ((double *)__pyx_v_residual->data));
17452 
17453  /* "cfemIntegrals.pyx":3665
17454  * <double*>s.data,
17455  * <double*>tResult.data)
17456  * def updateInteriorElementBoundaryFlux(np.ndarray interiorElementBoundaries, # <<<<<<<<<<<<<<
17457  * np.ndarray elementBoundaryElements,
17458  * np.ndarray elementBoundaryLocalElementBoundaries,
17459  */
17460 
17461  /* function exit code */
17462  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
17463  __Pyx_XGIVEREF(__pyx_r);
17464  __Pyx_RefNannyFinishContext();
17465  return __pyx_r;
17466 }
17467 
17468 /* "cfemIntegrals.pyx":3685
17469  * <double*>w_dS.data,
17470  * <double*>residual.data)
17471  * def updateExteriorElementBoundaryFlux(np.ndarray exteriorElementBoundaries, # <<<<<<<<<<<<<<
17472  * np.ndarray elementBoundaryElements,
17473  * np.ndarray elementBoundaryLocalElementBoundaries,
17474  */
17475 
17476 /* Python wrapper */
17477 static PyObject *__pyx_pw_13cfemIntegrals_155updateExteriorElementBoundaryFlux(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17478 static PyMethodDef __pyx_mdef_13cfemIntegrals_155updateExteriorElementBoundaryFlux = {"updateExteriorElementBoundaryFlux", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_155updateExteriorElementBoundaryFlux, METH_VARARGS|METH_KEYWORDS, 0};
17479 static PyObject *__pyx_pw_13cfemIntegrals_155updateExteriorElementBoundaryFlux(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17480  PyArrayObject *__pyx_v_exteriorElementBoundaries = 0;
17481  PyArrayObject *__pyx_v_elementBoundaryElements = 0;
17482  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries = 0;
17483  PyArrayObject *__pyx_v_flux = 0;
17484  PyArrayObject *__pyx_v_w_dS = 0;
17485  PyArrayObject *__pyx_v_residual = 0;
17486  int __pyx_lineno = 0;
17487  const char *__pyx_filename = NULL;
17488  int __pyx_clineno = 0;
17489  PyObject *__pyx_r = 0;
17490  __Pyx_RefNannyDeclarations
17491  __Pyx_RefNannySetupContext("updateExteriorElementBoundaryFlux (wrapper)", 0);
17492  {
17493  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exteriorElementBoundaries,&__pyx_n_s_elementBoundaryElements,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_flux,&__pyx_n_s_w_dS,&__pyx_n_s_residual,0};
17494  PyObject* values[6] = {0,0,0,0,0,0};
17495  if (unlikely(__pyx_kwds)) {
17496  Py_ssize_t kw_args;
17497  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17498  switch (pos_args) {
17499  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
17500  CYTHON_FALLTHROUGH;
17501  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
17502  CYTHON_FALLTHROUGH;
17503  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
17504  CYTHON_FALLTHROUGH;
17505  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
17506  CYTHON_FALLTHROUGH;
17507  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17508  CYTHON_FALLTHROUGH;
17509  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17510  CYTHON_FALLTHROUGH;
17511  case 0: break;
17512  default: goto __pyx_L5_argtuple_error;
17513  }
17514  kw_args = PyDict_Size(__pyx_kwds);
17515  switch (pos_args) {
17516  case 0:
17517  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exteriorElementBoundaries)) != 0)) kw_args--;
17518  else goto __pyx_L5_argtuple_error;
17519  CYTHON_FALLTHROUGH;
17520  case 1:
17521  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElements)) != 0)) kw_args--;
17522  else {
17523  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundaryFlux", 1, 6, 6, 1); __PYX_ERR(0, 3685, __pyx_L3_error)
17524  }
17525  CYTHON_FALLTHROUGH;
17526  case 2:
17527  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
17528  else {
17529  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundaryFlux", 1, 6, 6, 2); __PYX_ERR(0, 3685, __pyx_L3_error)
17530  }
17531  CYTHON_FALLTHROUGH;
17532  case 3:
17533  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flux)) != 0)) kw_args--;
17534  else {
17535  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundaryFlux", 1, 6, 6, 3); __PYX_ERR(0, 3685, __pyx_L3_error)
17536  }
17537  CYTHON_FALLTHROUGH;
17538  case 4:
17539  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_w_dS)) != 0)) kw_args--;
17540  else {
17541  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundaryFlux", 1, 6, 6, 4); __PYX_ERR(0, 3685, __pyx_L3_error)
17542  }
17543  CYTHON_FALLTHROUGH;
17544  case 5:
17545  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_residual)) != 0)) kw_args--;
17546  else {
17547  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundaryFlux", 1, 6, 6, 5); __PYX_ERR(0, 3685, __pyx_L3_error)
17548  }
17549  }
17550  if (unlikely(kw_args > 0)) {
17551  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateExteriorElementBoundaryFlux") < 0)) __PYX_ERR(0, 3685, __pyx_L3_error)
17552  }
17553  } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
17554  goto __pyx_L5_argtuple_error;
17555  } else {
17556  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17557  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17558  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
17559  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
17560  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
17561  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
17562  }
17563  __pyx_v_exteriorElementBoundaries = ((PyArrayObject *)values[0]);
17564  __pyx_v_elementBoundaryElements = ((PyArrayObject *)values[1]);
17565  __pyx_v_elementBoundaryLocalElementBoundaries = ((PyArrayObject *)values[2]);
17566  __pyx_v_flux = ((PyArrayObject *)values[3]);
17567  __pyx_v_w_dS = ((PyArrayObject *)values[4]);
17568  __pyx_v_residual = ((PyArrayObject *)values[5]);
17569  }
17570  goto __pyx_L4_argument_unpacking_done;
17571  __pyx_L5_argtuple_error:;
17572  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundaryFlux", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3685, __pyx_L3_error)
17573  __pyx_L3_error:;
17574  __Pyx_AddTraceback("cfemIntegrals.updateExteriorElementBoundaryFlux", __pyx_clineno, __pyx_lineno, __pyx_filename);
17575  __Pyx_RefNannyFinishContext();
17576  return NULL;
17577  __pyx_L4_argument_unpacking_done:;
17578  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exteriorElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "exteriorElementBoundaries", 0))) __PYX_ERR(0, 3685, __pyx_L1_error)
17579  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElements), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElements", 0))) __PYX_ERR(0, 3686, __pyx_L1_error)
17580  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundaries", 0))) __PYX_ERR(0, 3687, __pyx_L1_error)
17581  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_flux), __pyx_ptype_5numpy_ndarray, 1, "flux", 0))) __PYX_ERR(0, 3688, __pyx_L1_error)
17582  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w_dS), __pyx_ptype_5numpy_ndarray, 1, "w_dS", 0))) __PYX_ERR(0, 3689, __pyx_L1_error)
17583  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_residual), __pyx_ptype_5numpy_ndarray, 1, "residual", 0))) __PYX_ERR(0, 3690, __pyx_L1_error)
17584  __pyx_r = __pyx_pf_13cfemIntegrals_154updateExteriorElementBoundaryFlux(__pyx_self, __pyx_v_exteriorElementBoundaries, __pyx_v_elementBoundaryElements, __pyx_v_elementBoundaryLocalElementBoundaries, __pyx_v_flux, __pyx_v_w_dS, __pyx_v_residual);
17585 
17586  /* function exit code */
17587  goto __pyx_L0;
17588  __pyx_L1_error:;
17589  __pyx_r = NULL;
17590  __pyx_L0:;
17591  __Pyx_RefNannyFinishContext();
17592  return __pyx_r;
17593 }
17594 
17595 static PyObject *__pyx_pf_13cfemIntegrals_154updateExteriorElementBoundaryFlux(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_flux, PyArrayObject *__pyx_v_w_dS, PyArrayObject *__pyx_v_residual) {
17596  int __pyx_v_nd;
17597  PyObject *__pyx_r = NULL;
17598  __Pyx_RefNannyDeclarations
17599  int __pyx_t_1;
17600  int __pyx_t_2;
17601  __Pyx_RefNannySetupContext("updateExteriorElementBoundaryFlux", 0);
17602 
17603  /* "cfemIntegrals.pyx":3691
17604  * np.ndarray w_dS,
17605  * np.ndarray residual):
17606  * cdef int nd = w_dS.ndim # <<<<<<<<<<<<<<
17607  * if nd >= 4:
17608  * cupdateExteriorElementBoundaryFlux(exteriorElementBoundaries.shape[0],
17609  */
17610  __pyx_t_1 = __pyx_v_w_dS->nd;
17611  __pyx_v_nd = __pyx_t_1;
17612 
17613  /* "cfemIntegrals.pyx":3692
17614  * np.ndarray residual):
17615  * cdef int nd = w_dS.ndim
17616  * if nd >= 4: # <<<<<<<<<<<<<<
17617  * cupdateExteriorElementBoundaryFlux(exteriorElementBoundaries.shape[0],
17618  * w_dS.shape[1],
17619  */
17620  __pyx_t_2 = ((__pyx_v_nd >= 4) != 0);
17621  if (__pyx_t_2) {
17622 
17623  /* "cfemIntegrals.pyx":3693
17624  * cdef int nd = w_dS.ndim
17625  * if nd >= 4:
17626  * cupdateExteriorElementBoundaryFlux(exteriorElementBoundaries.shape[0], # <<<<<<<<<<<<<<
17627  * w_dS.shape[1],
17628  * w_dS.shape[2],
17629  */
17630  updateExteriorElementBoundaryFlux((__pyx_v_exteriorElementBoundaries->dimensions[0]), (__pyx_v_w_dS->dimensions[1]), (__pyx_v_w_dS->dimensions[2]), (__pyx_v_w_dS->dimensions[3]), ((int *)__pyx_v_exteriorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), ((double *)__pyx_v_flux->data), ((double *)__pyx_v_w_dS->data), ((double *)__pyx_v_residual->data));
17631 
17632  /* "cfemIntegrals.pyx":3692
17633  * np.ndarray residual):
17634  * cdef int nd = w_dS.ndim
17635  * if nd >= 4: # <<<<<<<<<<<<<<
17636  * cupdateExteriorElementBoundaryFlux(exteriorElementBoundaries.shape[0],
17637  * w_dS.shape[1],
17638  */
17639  goto __pyx_L3;
17640  }
17641 
17642  /* "cfemIntegrals.pyx":3704
17643  * <double*>residual.data)
17644  * else:
17645  * cupdateGlobalExteriorElementBoundaryFlux(exteriorElementBoundaries.shape[0], # <<<<<<<<<<<<<<
17646  * w_dS.shape[1],
17647  * w_dS.shape[2],
17648  */
17649  /*else*/ {
17650 
17651  /* "cfemIntegrals.pyx":3712
17652  * <double*> flux.data,
17653  * <double*> w_dS.data,
17654  * <double*> residual.data) # <<<<<<<<<<<<<<
17655  * def updateGlobalResidualFromElementResidual(int offset_r,
17656  * int stride_r,
17657  */
17658  updateGlobalExteriorElementBoundaryFlux((__pyx_v_exteriorElementBoundaries->dimensions[0]), (__pyx_v_w_dS->dimensions[1]), (__pyx_v_w_dS->dimensions[2]), ((int *)__pyx_v_exteriorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), ((double *)__pyx_v_flux->data), ((double *)__pyx_v_w_dS->data), ((double *)__pyx_v_residual->data));
17659  }
17660  __pyx_L3:;
17661 
17662  /* "cfemIntegrals.pyx":3685
17663  * <double*>w_dS.data,
17664  * <double*>residual.data)
17665  * def updateExteriorElementBoundaryFlux(np.ndarray exteriorElementBoundaries, # <<<<<<<<<<<<<<
17666  * np.ndarray elementBoundaryElements,
17667  * np.ndarray elementBoundaryLocalElementBoundaries,
17668  */
17669 
17670  /* function exit code */
17671  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
17672  __Pyx_XGIVEREF(__pyx_r);
17673  __Pyx_RefNannyFinishContext();
17674  return __pyx_r;
17675 }
17676 
17677 /* "cfemIntegrals.pyx":3713
17678  * <double*> w_dS.data,
17679  * <double*> residual.data)
17680  * def updateGlobalResidualFromElementResidual(int offset_r, # <<<<<<<<<<<<<<
17681  * int stride_r,
17682  * np.ndarray nFreeDOF_element_r,
17683  */
17684 
17685 /* Python wrapper */
17686 static PyObject *__pyx_pw_13cfemIntegrals_157updateGlobalResidualFromElementResidual(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17687 static PyMethodDef __pyx_mdef_13cfemIntegrals_157updateGlobalResidualFromElementResidual = {"updateGlobalResidualFromElementResidual", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_157updateGlobalResidualFromElementResidual, METH_VARARGS|METH_KEYWORDS, 0};
17688 static PyObject *__pyx_pw_13cfemIntegrals_157updateGlobalResidualFromElementResidual(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17689  int __pyx_v_offset_r;
17690  int __pyx_v_stride_r;
17691  PyArrayObject *__pyx_v_nFreeDOF_element_r = 0;
17692  PyArrayObject *__pyx_v_freeLocal_r = 0;
17693  PyArrayObject *__pyx_v_freeGlobal_r = 0;
17694  PyArrayObject *__pyx_v_elementResidual = 0;
17695  PyArrayObject *__pyx_v_globalResidual = 0;
17696  int __pyx_lineno = 0;
17697  const char *__pyx_filename = NULL;
17698  int __pyx_clineno = 0;
17699  PyObject *__pyx_r = 0;
17700  __Pyx_RefNannyDeclarations
17701  __Pyx_RefNannySetupContext("updateGlobalResidualFromElementResidual (wrapper)", 0);
17702  {
17703  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_offset_r,&__pyx_n_s_stride_r,&__pyx_n_s_nFreeDOF_element_r,&__pyx_n_s_freeLocal_r,&__pyx_n_s_freeGlobal_r,&__pyx_n_s_elementResidual,&__pyx_n_s_globalResidual,0};
17704  PyObject* values[7] = {0,0,0,0,0,0,0};
17705  if (unlikely(__pyx_kwds)) {
17706  Py_ssize_t kw_args;
17707  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17708  switch (pos_args) {
17709  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
17710  CYTHON_FALLTHROUGH;
17711  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
17712  CYTHON_FALLTHROUGH;
17713  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
17714  CYTHON_FALLTHROUGH;
17715  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
17716  CYTHON_FALLTHROUGH;
17717  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
17718  CYTHON_FALLTHROUGH;
17719  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17720  CYTHON_FALLTHROUGH;
17721  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17722  CYTHON_FALLTHROUGH;
17723  case 0: break;
17724  default: goto __pyx_L5_argtuple_error;
17725  }
17726  kw_args = PyDict_Size(__pyx_kwds);
17727  switch (pos_args) {
17728  case 0:
17729  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset_r)) != 0)) kw_args--;
17730  else goto __pyx_L5_argtuple_error;
17731  CYTHON_FALLTHROUGH;
17732  case 1:
17733  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stride_r)) != 0)) kw_args--;
17734  else {
17735  __Pyx_RaiseArgtupleInvalid("updateGlobalResidualFromElementResidual", 1, 7, 7, 1); __PYX_ERR(0, 3713, __pyx_L3_error)
17736  }
17737  CYTHON_FALLTHROUGH;
17738  case 2:
17739  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeDOF_element_r)) != 0)) kw_args--;
17740  else {
17741  __Pyx_RaiseArgtupleInvalid("updateGlobalResidualFromElementResidual", 1, 7, 7, 2); __PYX_ERR(0, 3713, __pyx_L3_error)
17742  }
17743  CYTHON_FALLTHROUGH;
17744  case 3:
17745  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeLocal_r)) != 0)) kw_args--;
17746  else {
17747  __Pyx_RaiseArgtupleInvalid("updateGlobalResidualFromElementResidual", 1, 7, 7, 3); __PYX_ERR(0, 3713, __pyx_L3_error)
17748  }
17749  CYTHON_FALLTHROUGH;
17750  case 4:
17751  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeGlobal_r)) != 0)) kw_args--;
17752  else {
17753  __Pyx_RaiseArgtupleInvalid("updateGlobalResidualFromElementResidual", 1, 7, 7, 4); __PYX_ERR(0, 3713, __pyx_L3_error)
17754  }
17755  CYTHON_FALLTHROUGH;
17756  case 5:
17757  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementResidual)) != 0)) kw_args--;
17758  else {
17759  __Pyx_RaiseArgtupleInvalid("updateGlobalResidualFromElementResidual", 1, 7, 7, 5); __PYX_ERR(0, 3713, __pyx_L3_error)
17760  }
17761  CYTHON_FALLTHROUGH;
17762  case 6:
17763  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_globalResidual)) != 0)) kw_args--;
17764  else {
17765  __Pyx_RaiseArgtupleInvalid("updateGlobalResidualFromElementResidual", 1, 7, 7, 6); __PYX_ERR(0, 3713, __pyx_L3_error)
17766  }
17767  }
17768  if (unlikely(kw_args > 0)) {
17769  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateGlobalResidualFromElementResidual") < 0)) __PYX_ERR(0, 3713, __pyx_L3_error)
17770  }
17771  } else if (PyTuple_GET_SIZE(__pyx_args) != 7) {
17772  goto __pyx_L5_argtuple_error;
17773  } else {
17774  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17775  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17776  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
17777  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
17778  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
17779  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
17780  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
17781  }
17782  __pyx_v_offset_r = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_offset_r == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3713, __pyx_L3_error)
17783  __pyx_v_stride_r = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_stride_r == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3714, __pyx_L3_error)
17784  __pyx_v_nFreeDOF_element_r = ((PyArrayObject *)values[2]);
17785  __pyx_v_freeLocal_r = ((PyArrayObject *)values[3]);
17786  __pyx_v_freeGlobal_r = ((PyArrayObject *)values[4]);
17787  __pyx_v_elementResidual = ((PyArrayObject *)values[5]);
17788  __pyx_v_globalResidual = ((PyArrayObject *)values[6]);
17789  }
17790  goto __pyx_L4_argument_unpacking_done;
17791  __pyx_L5_argtuple_error:;
17792  __Pyx_RaiseArgtupleInvalid("updateGlobalResidualFromElementResidual", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3713, __pyx_L3_error)
17793  __pyx_L3_error:;
17794  __Pyx_AddTraceback("cfemIntegrals.updateGlobalResidualFromElementResidual", __pyx_clineno, __pyx_lineno, __pyx_filename);
17795  __Pyx_RefNannyFinishContext();
17796  return NULL;
17797  __pyx_L4_argument_unpacking_done:;
17798  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nFreeDOF_element_r), __pyx_ptype_5numpy_ndarray, 1, "nFreeDOF_element_r", 0))) __PYX_ERR(0, 3715, __pyx_L1_error)
17799  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeLocal_r), __pyx_ptype_5numpy_ndarray, 1, "freeLocal_r", 0))) __PYX_ERR(0, 3716, __pyx_L1_error)
17800  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeGlobal_r), __pyx_ptype_5numpy_ndarray, 1, "freeGlobal_r", 0))) __PYX_ERR(0, 3717, __pyx_L1_error)
17801  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementResidual), __pyx_ptype_5numpy_ndarray, 1, "elementResidual", 0))) __PYX_ERR(0, 3718, __pyx_L1_error)
17802  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_globalResidual), __pyx_ptype_5numpy_ndarray, 1, "globalResidual", 0))) __PYX_ERR(0, 3719, __pyx_L1_error)
17803  __pyx_r = __pyx_pf_13cfemIntegrals_156updateGlobalResidualFromElementResidual(__pyx_self, __pyx_v_offset_r, __pyx_v_stride_r, __pyx_v_nFreeDOF_element_r, __pyx_v_freeLocal_r, __pyx_v_freeGlobal_r, __pyx_v_elementResidual, __pyx_v_globalResidual);
17804 
17805  /* function exit code */
17806  goto __pyx_L0;
17807  __pyx_L1_error:;
17808  __pyx_r = NULL;
17809  __pyx_L0:;
17810  __Pyx_RefNannyFinishContext();
17811  return __pyx_r;
17812 }
17813 
17814 static PyObject *__pyx_pf_13cfemIntegrals_156updateGlobalResidualFromElementResidual(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_offset_r, int __pyx_v_stride_r, PyArrayObject *__pyx_v_nFreeDOF_element_r, PyArrayObject *__pyx_v_freeLocal_r, PyArrayObject *__pyx_v_freeGlobal_r, PyArrayObject *__pyx_v_elementResidual, PyArrayObject *__pyx_v_globalResidual) {
17815  int __pyx_v_nElements_global;
17816  int __pyx_v_nDOF_test_element;
17817  PyObject *__pyx_r = NULL;
17818  __Pyx_RefNannyDeclarations
17819  __Pyx_RefNannySetupContext("updateGlobalResidualFromElementResidual", 0);
17820 
17821  /* "cfemIntegrals.pyx":3720
17822  * np.ndarray elementResidual,
17823  * np.ndarray globalResidual):
17824  * cdef int nElements_global = elementResidual.shape[0] # <<<<<<<<<<<<<<
17825  * cdef int nDOF_test_element = elementResidual.shape[1]
17826  * cupdateGlobalResidualFromElementResidual(nElements_global,
17827  */
17828  __pyx_v_nElements_global = (__pyx_v_elementResidual->dimensions[0]);
17829 
17830  /* "cfemIntegrals.pyx":3721
17831  * np.ndarray globalResidual):
17832  * cdef int nElements_global = elementResidual.shape[0]
17833  * cdef int nDOF_test_element = elementResidual.shape[1] # <<<<<<<<<<<<<<
17834  * cupdateGlobalResidualFromElementResidual(nElements_global,
17835  * nDOF_test_element,
17836  */
17837  __pyx_v_nDOF_test_element = (__pyx_v_elementResidual->dimensions[1]);
17838 
17839  /* "cfemIntegrals.pyx":3722
17840  * cdef int nElements_global = elementResidual.shape[0]
17841  * cdef int nDOF_test_element = elementResidual.shape[1]
17842  * cupdateGlobalResidualFromElementResidual(nElements_global, # <<<<<<<<<<<<<<
17843  * nDOF_test_element,
17844  * offset_r,
17845  */
17846  updateGlobalResidualFromElementResidual(__pyx_v_nElements_global, __pyx_v_nDOF_test_element, __pyx_v_offset_r, __pyx_v_stride_r, ((int *)__pyx_v_nFreeDOF_element_r->data), ((int *)__pyx_v_freeLocal_r->data), ((int *)__pyx_v_freeGlobal_r->data), ((double *)__pyx_v_elementResidual->data), ((double *)__pyx_v_globalResidual->data));
17847 
17848  /* "cfemIntegrals.pyx":3713
17849  * <double*> w_dS.data,
17850  * <double*> residual.data)
17851  * def updateGlobalResidualFromElementResidual(int offset_r, # <<<<<<<<<<<<<<
17852  * int stride_r,
17853  * np.ndarray nFreeDOF_element_r,
17854  */
17855 
17856  /* function exit code */
17857  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
17858  __Pyx_XGIVEREF(__pyx_r);
17859  __Pyx_RefNannyFinishContext();
17860  return __pyx_r;
17861 }
17862 
17863 /* "cfemIntegrals.pyx":3731
17864  * <double*>elementResidual.data,
17865  * <double*>globalResidual.data)
17866  * def updateGlobalJacobianFromElementJacobian_dense(int offset_r, # <<<<<<<<<<<<<<
17867  * int stride_r,
17868  * int offset_u,
17869  */
17870 
17871 /* Python wrapper */
17872 static PyObject *__pyx_pw_13cfemIntegrals_159updateGlobalJacobianFromElementJacobian_dense(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17873 static PyMethodDef __pyx_mdef_13cfemIntegrals_159updateGlobalJacobianFromElementJacobian_dense = {"updateGlobalJacobianFromElementJacobian_dense", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_159updateGlobalJacobianFromElementJacobian_dense, METH_VARARGS|METH_KEYWORDS, 0};
17874 static PyObject *__pyx_pw_13cfemIntegrals_159updateGlobalJacobianFromElementJacobian_dense(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17875  int __pyx_v_offset_r;
17876  int __pyx_v_stride_r;
17877  int __pyx_v_offset_u;
17878  int __pyx_v_stride_u;
17879  int __pyx_v_nFreeVDOF_global;
17880  PyArrayObject *__pyx_v_nFreeDOF_element_r = 0;
17881  PyArrayObject *__pyx_v_freeLocal_r = 0;
17882  PyArrayObject *__pyx_v_freeGlobal_r = 0;
17883  PyArrayObject *__pyx_v_nFreeDOF_element_u = 0;
17884  PyArrayObject *__pyx_v_freeLocal_u = 0;
17885  PyArrayObject *__pyx_v_freeGlobal_u = 0;
17886  PyArrayObject *__pyx_v_elementJacobian = 0;
17887  PyArrayObject *__pyx_v_globalJacobian = 0;
17888  int __pyx_lineno = 0;
17889  const char *__pyx_filename = NULL;
17890  int __pyx_clineno = 0;
17891  PyObject *__pyx_r = 0;
17892  __Pyx_RefNannyDeclarations
17893  __Pyx_RefNannySetupContext("updateGlobalJacobianFromElementJacobian_dense (wrapper)", 0);
17894  {
17895  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_offset_r,&__pyx_n_s_stride_r,&__pyx_n_s_offset_u,&__pyx_n_s_stride_u,&__pyx_n_s_nFreeVDOF_global,&__pyx_n_s_nFreeDOF_element_r,&__pyx_n_s_freeLocal_r,&__pyx_n_s_freeGlobal_r,&__pyx_n_s_nFreeDOF_element_u,&__pyx_n_s_freeLocal_u,&__pyx_n_s_freeGlobal_u,&__pyx_n_s_elementJacobian,&__pyx_n_s_globalJacobian,0};
17896  PyObject* values[13] = {0,0,0,0,0,0,0,0,0,0,0,0,0};
17897  if (unlikely(__pyx_kwds)) {
17898  Py_ssize_t kw_args;
17899  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17900  switch (pos_args) {
17901  case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
17902  CYTHON_FALLTHROUGH;
17903  case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
17904  CYTHON_FALLTHROUGH;
17905  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
17906  CYTHON_FALLTHROUGH;
17907  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
17908  CYTHON_FALLTHROUGH;
17909  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
17910  CYTHON_FALLTHROUGH;
17911  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
17912  CYTHON_FALLTHROUGH;
17913  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
17914  CYTHON_FALLTHROUGH;
17915  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
17916  CYTHON_FALLTHROUGH;
17917  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
17918  CYTHON_FALLTHROUGH;
17919  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
17920  CYTHON_FALLTHROUGH;
17921  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
17922  CYTHON_FALLTHROUGH;
17923  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17924  CYTHON_FALLTHROUGH;
17925  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17926  CYTHON_FALLTHROUGH;
17927  case 0: break;
17928  default: goto __pyx_L5_argtuple_error;
17929  }
17930  kw_args = PyDict_Size(__pyx_kwds);
17931  switch (pos_args) {
17932  case 0:
17933  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset_r)) != 0)) kw_args--;
17934  else goto __pyx_L5_argtuple_error;
17935  CYTHON_FALLTHROUGH;
17936  case 1:
17937  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stride_r)) != 0)) kw_args--;
17938  else {
17939  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromElementJacobian_dense", 1, 13, 13, 1); __PYX_ERR(0, 3731, __pyx_L3_error)
17940  }
17941  CYTHON_FALLTHROUGH;
17942  case 2:
17943  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset_u)) != 0)) kw_args--;
17944  else {
17945  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromElementJacobian_dense", 1, 13, 13, 2); __PYX_ERR(0, 3731, __pyx_L3_error)
17946  }
17947  CYTHON_FALLTHROUGH;
17948  case 3:
17949  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stride_u)) != 0)) kw_args--;
17950  else {
17951  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromElementJacobian_dense", 1, 13, 13, 3); __PYX_ERR(0, 3731, __pyx_L3_error)
17952  }
17953  CYTHON_FALLTHROUGH;
17954  case 4:
17955  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeVDOF_global)) != 0)) kw_args--;
17956  else {
17957  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromElementJacobian_dense", 1, 13, 13, 4); __PYX_ERR(0, 3731, __pyx_L3_error)
17958  }
17959  CYTHON_FALLTHROUGH;
17960  case 5:
17961  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeDOF_element_r)) != 0)) kw_args--;
17962  else {
17963  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromElementJacobian_dense", 1, 13, 13, 5); __PYX_ERR(0, 3731, __pyx_L3_error)
17964  }
17965  CYTHON_FALLTHROUGH;
17966  case 6:
17967  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeLocal_r)) != 0)) kw_args--;
17968  else {
17969  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromElementJacobian_dense", 1, 13, 13, 6); __PYX_ERR(0, 3731, __pyx_L3_error)
17970  }
17971  CYTHON_FALLTHROUGH;
17972  case 7:
17973  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeGlobal_r)) != 0)) kw_args--;
17974  else {
17975  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromElementJacobian_dense", 1, 13, 13, 7); __PYX_ERR(0, 3731, __pyx_L3_error)
17976  }
17977  CYTHON_FALLTHROUGH;
17978  case 8:
17979  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeDOF_element_u)) != 0)) kw_args--;
17980  else {
17981  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromElementJacobian_dense", 1, 13, 13, 8); __PYX_ERR(0, 3731, __pyx_L3_error)
17982  }
17983  CYTHON_FALLTHROUGH;
17984  case 9:
17985  if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeLocal_u)) != 0)) kw_args--;
17986  else {
17987  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromElementJacobian_dense", 1, 13, 13, 9); __PYX_ERR(0, 3731, __pyx_L3_error)
17988  }
17989  CYTHON_FALLTHROUGH;
17990  case 10:
17991  if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeGlobal_u)) != 0)) kw_args--;
17992  else {
17993  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromElementJacobian_dense", 1, 13, 13, 10); __PYX_ERR(0, 3731, __pyx_L3_error)
17994  }
17995  CYTHON_FALLTHROUGH;
17996  case 11:
17997  if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementJacobian)) != 0)) kw_args--;
17998  else {
17999  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromElementJacobian_dense", 1, 13, 13, 11); __PYX_ERR(0, 3731, __pyx_L3_error)
18000  }
18001  CYTHON_FALLTHROUGH;
18002  case 12:
18003  if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_globalJacobian)) != 0)) kw_args--;
18004  else {
18005  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromElementJacobian_dense", 1, 13, 13, 12); __PYX_ERR(0, 3731, __pyx_L3_error)
18006  }
18007  }
18008  if (unlikely(kw_args > 0)) {
18009  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateGlobalJacobianFromElementJacobian_dense") < 0)) __PYX_ERR(0, 3731, __pyx_L3_error)
18010  }
18011  } else if (PyTuple_GET_SIZE(__pyx_args) != 13) {
18012  goto __pyx_L5_argtuple_error;
18013  } else {
18014  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18015  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18016  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
18017  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
18018  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
18019  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
18020  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
18021  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
18022  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
18023  values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
18024  values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
18025  values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
18026  values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
18027  }
18028  __pyx_v_offset_r = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_offset_r == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3731, __pyx_L3_error)
18029  __pyx_v_stride_r = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_stride_r == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3732, __pyx_L3_error)
18030  __pyx_v_offset_u = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_offset_u == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3733, __pyx_L3_error)
18031  __pyx_v_stride_u = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_stride_u == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3734, __pyx_L3_error)
18032  __pyx_v_nFreeVDOF_global = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_nFreeVDOF_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3735, __pyx_L3_error)
18033  __pyx_v_nFreeDOF_element_r = ((PyArrayObject *)values[5]);
18034  __pyx_v_freeLocal_r = ((PyArrayObject *)values[6]);
18035  __pyx_v_freeGlobal_r = ((PyArrayObject *)values[7]);
18036  __pyx_v_nFreeDOF_element_u = ((PyArrayObject *)values[8]);
18037  __pyx_v_freeLocal_u = ((PyArrayObject *)values[9]);
18038  __pyx_v_freeGlobal_u = ((PyArrayObject *)values[10]);
18039  __pyx_v_elementJacobian = ((PyArrayObject *)values[11]);
18040  __pyx_v_globalJacobian = ((PyArrayObject *)values[12]);
18041  }
18042  goto __pyx_L4_argument_unpacking_done;
18043  __pyx_L5_argtuple_error:;
18044  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromElementJacobian_dense", 1, 13, 13, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3731, __pyx_L3_error)
18045  __pyx_L3_error:;
18046  __Pyx_AddTraceback("cfemIntegrals.updateGlobalJacobianFromElementJacobian_dense", __pyx_clineno, __pyx_lineno, __pyx_filename);
18047  __Pyx_RefNannyFinishContext();
18048  return NULL;
18049  __pyx_L4_argument_unpacking_done:;
18050  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nFreeDOF_element_r), __pyx_ptype_5numpy_ndarray, 1, "nFreeDOF_element_r", 0))) __PYX_ERR(0, 3736, __pyx_L1_error)
18051  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeLocal_r), __pyx_ptype_5numpy_ndarray, 1, "freeLocal_r", 0))) __PYX_ERR(0, 3737, __pyx_L1_error)
18052  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeGlobal_r), __pyx_ptype_5numpy_ndarray, 1, "freeGlobal_r", 0))) __PYX_ERR(0, 3738, __pyx_L1_error)
18053  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nFreeDOF_element_u), __pyx_ptype_5numpy_ndarray, 1, "nFreeDOF_element_u", 0))) __PYX_ERR(0, 3739, __pyx_L1_error)
18054  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeLocal_u), __pyx_ptype_5numpy_ndarray, 1, "freeLocal_u", 0))) __PYX_ERR(0, 3740, __pyx_L1_error)
18055  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeGlobal_u), __pyx_ptype_5numpy_ndarray, 1, "freeGlobal_u", 0))) __PYX_ERR(0, 3741, __pyx_L1_error)
18056  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementJacobian), __pyx_ptype_5numpy_ndarray, 1, "elementJacobian", 0))) __PYX_ERR(0, 3742, __pyx_L1_error)
18057  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_globalJacobian), __pyx_ptype_5numpy_ndarray, 1, "globalJacobian", 0))) __PYX_ERR(0, 3743, __pyx_L1_error)
18058  __pyx_r = __pyx_pf_13cfemIntegrals_158updateGlobalJacobianFromElementJacobian_dense(__pyx_self, __pyx_v_offset_r, __pyx_v_stride_r, __pyx_v_offset_u, __pyx_v_stride_u, __pyx_v_nFreeVDOF_global, __pyx_v_nFreeDOF_element_r, __pyx_v_freeLocal_r, __pyx_v_freeGlobal_r, __pyx_v_nFreeDOF_element_u, __pyx_v_freeLocal_u, __pyx_v_freeGlobal_u, __pyx_v_elementJacobian, __pyx_v_globalJacobian);
18059 
18060  /* function exit code */
18061  goto __pyx_L0;
18062  __pyx_L1_error:;
18063  __pyx_r = NULL;
18064  __pyx_L0:;
18065  __Pyx_RefNannyFinishContext();
18066  return __pyx_r;
18067 }
18068 
18069 static PyObject *__pyx_pf_13cfemIntegrals_158updateGlobalJacobianFromElementJacobian_dense(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_offset_r, int __pyx_v_stride_r, int __pyx_v_offset_u, int __pyx_v_stride_u, int __pyx_v_nFreeVDOF_global, PyArrayObject *__pyx_v_nFreeDOF_element_r, PyArrayObject *__pyx_v_freeLocal_r, PyArrayObject *__pyx_v_freeGlobal_r, PyArrayObject *__pyx_v_nFreeDOF_element_u, PyArrayObject *__pyx_v_freeLocal_u, PyArrayObject *__pyx_v_freeGlobal_u, PyArrayObject *__pyx_v_elementJacobian, PyArrayObject *__pyx_v_globalJacobian) {
18070  int __pyx_v_nElements_global;
18071  int __pyx_v_nDOF_test_element;
18072  int __pyx_v_nDOF_trial_element;
18073  PyObject *__pyx_r = NULL;
18074  __Pyx_RefNannyDeclarations
18075  __Pyx_RefNannySetupContext("updateGlobalJacobianFromElementJacobian_dense", 0);
18076 
18077  /* "cfemIntegrals.pyx":3744
18078  * np.ndarray elementJacobian,
18079  * np.ndarray globalJacobian):
18080  * cdef int nElements_global = elementJacobian.shape[0] # <<<<<<<<<<<<<<
18081  * cdef int nDOF_test_element = elementJacobian.shape[1]
18082  * cdef int nDOF_trial_element = elementJacobian.shape[2]
18083  */
18084  __pyx_v_nElements_global = (__pyx_v_elementJacobian->dimensions[0]);
18085 
18086  /* "cfemIntegrals.pyx":3745
18087  * np.ndarray globalJacobian):
18088  * cdef int nElements_global = elementJacobian.shape[0]
18089  * cdef int nDOF_test_element = elementJacobian.shape[1] # <<<<<<<<<<<<<<
18090  * cdef int nDOF_trial_element = elementJacobian.shape[2]
18091  * cupdateGlobalJacobianFromElementJacobian_dense(nElements_global,
18092  */
18093  __pyx_v_nDOF_test_element = (__pyx_v_elementJacobian->dimensions[1]);
18094 
18095  /* "cfemIntegrals.pyx":3746
18096  * cdef int nElements_global = elementJacobian.shape[0]
18097  * cdef int nDOF_test_element = elementJacobian.shape[1]
18098  * cdef int nDOF_trial_element = elementJacobian.shape[2] # <<<<<<<<<<<<<<
18099  * cupdateGlobalJacobianFromElementJacobian_dense(nElements_global,
18100  * nDOF_test_element,
18101  */
18102  __pyx_v_nDOF_trial_element = (__pyx_v_elementJacobian->dimensions[2]);
18103 
18104  /* "cfemIntegrals.pyx":3747
18105  * cdef int nDOF_test_element = elementJacobian.shape[1]
18106  * cdef int nDOF_trial_element = elementJacobian.shape[2]
18107  * cupdateGlobalJacobianFromElementJacobian_dense(nElements_global, # <<<<<<<<<<<<<<
18108  * nDOF_test_element,
18109  * nDOF_trial_element,
18110  */
18111  updateGlobalJacobianFromElementJacobian_dense(__pyx_v_nElements_global, __pyx_v_nDOF_test_element, __pyx_v_nDOF_trial_element, __pyx_v_offset_r, __pyx_v_stride_r, __pyx_v_offset_u, __pyx_v_stride_u, __pyx_v_nFreeVDOF_global, ((int *)__pyx_v_nFreeDOF_element_r->data), ((int *)__pyx_v_freeLocal_r->data), ((int *)__pyx_v_freeGlobal_r->data), ((int *)__pyx_v_nFreeDOF_element_u->data), ((int *)__pyx_v_freeLocal_u->data), ((int *)__pyx_v_freeGlobal_u->data), ((double *)__pyx_v_elementJacobian->data), ((double *)__pyx_v_globalJacobian->data));
18112 
18113  /* "cfemIntegrals.pyx":3731
18114  * <double*>elementResidual.data,
18115  * <double*>globalResidual.data)
18116  * def updateGlobalJacobianFromElementJacobian_dense(int offset_r, # <<<<<<<<<<<<<<
18117  * int stride_r,
18118  * int offset_u,
18119  */
18120 
18121  /* function exit code */
18122  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
18123  __Pyx_XGIVEREF(__pyx_r);
18124  __Pyx_RefNannyFinishContext();
18125  return __pyx_r;
18126 }
18127 
18128 /* "cfemIntegrals.pyx":3763
18129  * <double*>elementJacobian.data,
18130  * <double*>globalJacobian.data)
18131  * def updateGlobalJacobianFromElementJacobian_eb_dense(np.ndarray elementNeighbors, # <<<<<<<<<<<<<<
18132  * int offset_r,
18133  * int stride_r,
18134  */
18135 
18136 /* Python wrapper */
18137 static PyObject *__pyx_pw_13cfemIntegrals_161updateGlobalJacobianFromElementJacobian_eb_dense(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
18138 static PyMethodDef __pyx_mdef_13cfemIntegrals_161updateGlobalJacobianFromElementJacobian_eb_dense = {"updateGlobalJacobianFromElementJacobian_eb_dense", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_161updateGlobalJacobianFromElementJacobian_eb_dense, METH_VARARGS|METH_KEYWORDS, 0};
18139 static PyObject *__pyx_pw_13cfemIntegrals_161updateGlobalJacobianFromElementJacobian_eb_dense(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
18140  PyArrayObject *__pyx_v_elementNeighbors = 0;
18141  int __pyx_v_offset_r;
18142  int __pyx_v_stride_r;
18143  int __pyx_v_offset_u;
18144  int __pyx_v_stride_u;
18145  int __pyx_v_nFreeVDOF_global;
18146  PyArrayObject *__pyx_v_nFreeDOF_element_r = 0;
18147  PyArrayObject *__pyx_v_freeLocal_r = 0;
18148  PyArrayObject *__pyx_v_freeGlobal_r = 0;
18149  PyArrayObject *__pyx_v_nFreeDOF_element_u = 0;
18150  PyArrayObject *__pyx_v_freeLocal_u = 0;
18151  PyArrayObject *__pyx_v_freeGlobal_u = 0;
18152  PyArrayObject *__pyx_v_elementJacobian_eb = 0;
18153  PyArrayObject *__pyx_v_globalJacobian = 0;
18154  int __pyx_lineno = 0;
18155  const char *__pyx_filename = NULL;
18156  int __pyx_clineno = 0;
18157  PyObject *__pyx_r = 0;
18158  __Pyx_RefNannyDeclarations
18159  __Pyx_RefNannySetupContext("updateGlobalJacobianFromElementJacobian_eb_dense (wrapper)", 0);
18160  {
18161  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_elementNeighbors,&__pyx_n_s_offset_r,&__pyx_n_s_stride_r,&__pyx_n_s_offset_u,&__pyx_n_s_stride_u,&__pyx_n_s_nFreeVDOF_global,&__pyx_n_s_nFreeDOF_element_r,&__pyx_n_s_freeLocal_r,&__pyx_n_s_freeGlobal_r,&__pyx_n_s_nFreeDOF_element_u,&__pyx_n_s_freeLocal_u,&__pyx_n_s_freeGlobal_u,&__pyx_n_s_elementJacobian_eb,&__pyx_n_s_globalJacobian,0};
18162  PyObject* values[14] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0};
18163  if (unlikely(__pyx_kwds)) {
18164  Py_ssize_t kw_args;
18165  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
18166  switch (pos_args) {
18167  case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
18168  CYTHON_FALLTHROUGH;
18169  case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
18170  CYTHON_FALLTHROUGH;
18171  case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
18172  CYTHON_FALLTHROUGH;
18173  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
18174  CYTHON_FALLTHROUGH;
18175  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
18176  CYTHON_FALLTHROUGH;
18177  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
18178  CYTHON_FALLTHROUGH;
18179  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
18180  CYTHON_FALLTHROUGH;
18181  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
18182  CYTHON_FALLTHROUGH;
18183  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
18184  CYTHON_FALLTHROUGH;
18185  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
18186  CYTHON_FALLTHROUGH;
18187  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
18188  CYTHON_FALLTHROUGH;
18189  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
18190  CYTHON_FALLTHROUGH;
18191  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18192  CYTHON_FALLTHROUGH;
18193  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18194  CYTHON_FALLTHROUGH;
18195  case 0: break;
18196  default: goto __pyx_L5_argtuple_error;
18197  }
18198  kw_args = PyDict_Size(__pyx_kwds);
18199  switch (pos_args) {
18200  case 0:
18201  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementNeighbors)) != 0)) kw_args--;
18202  else goto __pyx_L5_argtuple_error;
18203  CYTHON_FALLTHROUGH;
18204  case 1:
18205  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset_r)) != 0)) kw_args--;
18206  else {
18207  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromElementJacobian_eb_dense", 1, 14, 14, 1); __PYX_ERR(0, 3763, __pyx_L3_error)
18208  }
18209  CYTHON_FALLTHROUGH;
18210  case 2:
18211  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stride_r)) != 0)) kw_args--;
18212  else {
18213  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromElementJacobian_eb_dense", 1, 14, 14, 2); __PYX_ERR(0, 3763, __pyx_L3_error)
18214  }
18215  CYTHON_FALLTHROUGH;
18216  case 3:
18217  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset_u)) != 0)) kw_args--;
18218  else {
18219  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromElementJacobian_eb_dense", 1, 14, 14, 3); __PYX_ERR(0, 3763, __pyx_L3_error)
18220  }
18221  CYTHON_FALLTHROUGH;
18222  case 4:
18223  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stride_u)) != 0)) kw_args--;
18224  else {
18225  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromElementJacobian_eb_dense", 1, 14, 14, 4); __PYX_ERR(0, 3763, __pyx_L3_error)
18226  }
18227  CYTHON_FALLTHROUGH;
18228  case 5:
18229  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeVDOF_global)) != 0)) kw_args--;
18230  else {
18231  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromElementJacobian_eb_dense", 1, 14, 14, 5); __PYX_ERR(0, 3763, __pyx_L3_error)
18232  }
18233  CYTHON_FALLTHROUGH;
18234  case 6:
18235  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeDOF_element_r)) != 0)) kw_args--;
18236  else {
18237  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromElementJacobian_eb_dense", 1, 14, 14, 6); __PYX_ERR(0, 3763, __pyx_L3_error)
18238  }
18239  CYTHON_FALLTHROUGH;
18240  case 7:
18241  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeLocal_r)) != 0)) kw_args--;
18242  else {
18243  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromElementJacobian_eb_dense", 1, 14, 14, 7); __PYX_ERR(0, 3763, __pyx_L3_error)
18244  }
18245  CYTHON_FALLTHROUGH;
18246  case 8:
18247  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeGlobal_r)) != 0)) kw_args--;
18248  else {
18249  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromElementJacobian_eb_dense", 1, 14, 14, 8); __PYX_ERR(0, 3763, __pyx_L3_error)
18250  }
18251  CYTHON_FALLTHROUGH;
18252  case 9:
18253  if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeDOF_element_u)) != 0)) kw_args--;
18254  else {
18255  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromElementJacobian_eb_dense", 1, 14, 14, 9); __PYX_ERR(0, 3763, __pyx_L3_error)
18256  }
18257  CYTHON_FALLTHROUGH;
18258  case 10:
18259  if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeLocal_u)) != 0)) kw_args--;
18260  else {
18261  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromElementJacobian_eb_dense", 1, 14, 14, 10); __PYX_ERR(0, 3763, __pyx_L3_error)
18262  }
18263  CYTHON_FALLTHROUGH;
18264  case 11:
18265  if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeGlobal_u)) != 0)) kw_args--;
18266  else {
18267  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromElementJacobian_eb_dense", 1, 14, 14, 11); __PYX_ERR(0, 3763, __pyx_L3_error)
18268  }
18269  CYTHON_FALLTHROUGH;
18270  case 12:
18271  if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementJacobian_eb)) != 0)) kw_args--;
18272  else {
18273  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromElementJacobian_eb_dense", 1, 14, 14, 12); __PYX_ERR(0, 3763, __pyx_L3_error)
18274  }
18275  CYTHON_FALLTHROUGH;
18276  case 13:
18277  if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_globalJacobian)) != 0)) kw_args--;
18278  else {
18279  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromElementJacobian_eb_dense", 1, 14, 14, 13); __PYX_ERR(0, 3763, __pyx_L3_error)
18280  }
18281  }
18282  if (unlikely(kw_args > 0)) {
18283  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateGlobalJacobianFromElementJacobian_eb_dense") < 0)) __PYX_ERR(0, 3763, __pyx_L3_error)
18284  }
18285  } else if (PyTuple_GET_SIZE(__pyx_args) != 14) {
18286  goto __pyx_L5_argtuple_error;
18287  } else {
18288  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18289  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18290  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
18291  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
18292  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
18293  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
18294  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
18295  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
18296  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
18297  values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
18298  values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
18299  values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
18300  values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
18301  values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
18302  }
18303  __pyx_v_elementNeighbors = ((PyArrayObject *)values[0]);
18304  __pyx_v_offset_r = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_offset_r == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3764, __pyx_L3_error)
18305  __pyx_v_stride_r = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_stride_r == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3765, __pyx_L3_error)
18306  __pyx_v_offset_u = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_offset_u == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3766, __pyx_L3_error)
18307  __pyx_v_stride_u = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_stride_u == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3767, __pyx_L3_error)
18308  __pyx_v_nFreeVDOF_global = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_nFreeVDOF_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3768, __pyx_L3_error)
18309  __pyx_v_nFreeDOF_element_r = ((PyArrayObject *)values[6]);
18310  __pyx_v_freeLocal_r = ((PyArrayObject *)values[7]);
18311  __pyx_v_freeGlobal_r = ((PyArrayObject *)values[8]);
18312  __pyx_v_nFreeDOF_element_u = ((PyArrayObject *)values[9]);
18313  __pyx_v_freeLocal_u = ((PyArrayObject *)values[10]);
18314  __pyx_v_freeGlobal_u = ((PyArrayObject *)values[11]);
18315  __pyx_v_elementJacobian_eb = ((PyArrayObject *)values[12]);
18316  __pyx_v_globalJacobian = ((PyArrayObject *)values[13]);
18317  }
18318  goto __pyx_L4_argument_unpacking_done;
18319  __pyx_L5_argtuple_error:;
18320  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromElementJacobian_eb_dense", 1, 14, 14, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3763, __pyx_L3_error)
18321  __pyx_L3_error:;
18322  __Pyx_AddTraceback("cfemIntegrals.updateGlobalJacobianFromElementJacobian_eb_dense", __pyx_clineno, __pyx_lineno, __pyx_filename);
18323  __Pyx_RefNannyFinishContext();
18324  return NULL;
18325  __pyx_L4_argument_unpacking_done:;
18326  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNeighbors), __pyx_ptype_5numpy_ndarray, 1, "elementNeighbors", 0))) __PYX_ERR(0, 3763, __pyx_L1_error)
18327  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nFreeDOF_element_r), __pyx_ptype_5numpy_ndarray, 1, "nFreeDOF_element_r", 0))) __PYX_ERR(0, 3769, __pyx_L1_error)
18328  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeLocal_r), __pyx_ptype_5numpy_ndarray, 1, "freeLocal_r", 0))) __PYX_ERR(0, 3770, __pyx_L1_error)
18329  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeGlobal_r), __pyx_ptype_5numpy_ndarray, 1, "freeGlobal_r", 0))) __PYX_ERR(0, 3771, __pyx_L1_error)
18330  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nFreeDOF_element_u), __pyx_ptype_5numpy_ndarray, 1, "nFreeDOF_element_u", 0))) __PYX_ERR(0, 3772, __pyx_L1_error)
18331  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeLocal_u), __pyx_ptype_5numpy_ndarray, 1, "freeLocal_u", 0))) __PYX_ERR(0, 3773, __pyx_L1_error)
18332  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeGlobal_u), __pyx_ptype_5numpy_ndarray, 1, "freeGlobal_u", 0))) __PYX_ERR(0, 3774, __pyx_L1_error)
18333  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementJacobian_eb), __pyx_ptype_5numpy_ndarray, 1, "elementJacobian_eb", 0))) __PYX_ERR(0, 3775, __pyx_L1_error)
18334  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_globalJacobian), __pyx_ptype_5numpy_ndarray, 1, "globalJacobian", 0))) __PYX_ERR(0, 3776, __pyx_L1_error)
18335  __pyx_r = __pyx_pf_13cfemIntegrals_160updateGlobalJacobianFromElementJacobian_eb_dense(__pyx_self, __pyx_v_elementNeighbors, __pyx_v_offset_r, __pyx_v_stride_r, __pyx_v_offset_u, __pyx_v_stride_u, __pyx_v_nFreeVDOF_global, __pyx_v_nFreeDOF_element_r, __pyx_v_freeLocal_r, __pyx_v_freeGlobal_r, __pyx_v_nFreeDOF_element_u, __pyx_v_freeLocal_u, __pyx_v_freeGlobal_u, __pyx_v_elementJacobian_eb, __pyx_v_globalJacobian);
18336 
18337  /* function exit code */
18338  goto __pyx_L0;
18339  __pyx_L1_error:;
18340  __pyx_r = NULL;
18341  __pyx_L0:;
18342  __Pyx_RefNannyFinishContext();
18343  return __pyx_r;
18344 }
18345 
18346 static PyObject *__pyx_pf_13cfemIntegrals_160updateGlobalJacobianFromElementJacobian_eb_dense(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementNeighbors, int __pyx_v_offset_r, int __pyx_v_stride_r, int __pyx_v_offset_u, int __pyx_v_stride_u, int __pyx_v_nFreeVDOF_global, PyArrayObject *__pyx_v_nFreeDOF_element_r, PyArrayObject *__pyx_v_freeLocal_r, PyArrayObject *__pyx_v_freeGlobal_r, PyArrayObject *__pyx_v_nFreeDOF_element_u, PyArrayObject *__pyx_v_freeLocal_u, PyArrayObject *__pyx_v_freeGlobal_u, PyArrayObject *__pyx_v_elementJacobian_eb, PyArrayObject *__pyx_v_globalJacobian) {
18347  int __pyx_v_nElements_global;
18348  int __pyx_v_nElementBoundaries_element;
18349  int __pyx_v_nDOF_test_element;
18350  int __pyx_v_nDOF_trial_element;
18351  PyObject *__pyx_r = NULL;
18352  __Pyx_RefNannyDeclarations
18353  __Pyx_RefNannySetupContext("updateGlobalJacobianFromElementJacobian_eb_dense", 0);
18354 
18355  /* "cfemIntegrals.pyx":3777
18356  * np.ndarray elementJacobian_eb,
18357  * np.ndarray globalJacobian):
18358  * cdef int nElements_global = elementJacobian_eb.shape[0] # <<<<<<<<<<<<<<
18359  * cdef int nElementBoundaries_element = elementJacobian_eb.shape[1]
18360  * cdef int nDOF_test_element = elementJacobian_eb.shape[2]
18361  */
18362  __pyx_v_nElements_global = (__pyx_v_elementJacobian_eb->dimensions[0]);
18363 
18364  /* "cfemIntegrals.pyx":3778
18365  * np.ndarray globalJacobian):
18366  * cdef int nElements_global = elementJacobian_eb.shape[0]
18367  * cdef int nElementBoundaries_element = elementJacobian_eb.shape[1] # <<<<<<<<<<<<<<
18368  * cdef int nDOF_test_element = elementJacobian_eb.shape[2]
18369  * cdef int nDOF_trial_element = elementJacobian_eb.shape[3]
18370  */
18371  __pyx_v_nElementBoundaries_element = (__pyx_v_elementJacobian_eb->dimensions[1]);
18372 
18373  /* "cfemIntegrals.pyx":3779
18374  * cdef int nElements_global = elementJacobian_eb.shape[0]
18375  * cdef int nElementBoundaries_element = elementJacobian_eb.shape[1]
18376  * cdef int nDOF_test_element = elementJacobian_eb.shape[2] # <<<<<<<<<<<<<<
18377  * cdef int nDOF_trial_element = elementJacobian_eb.shape[3]
18378  * cupdateGlobalJacobianFromElementJacobian_eb_dense(<int *>elementNeighbors.data,
18379  */
18380  __pyx_v_nDOF_test_element = (__pyx_v_elementJacobian_eb->dimensions[2]);
18381 
18382  /* "cfemIntegrals.pyx":3780
18383  * cdef int nElementBoundaries_element = elementJacobian_eb.shape[1]
18384  * cdef int nDOF_test_element = elementJacobian_eb.shape[2]
18385  * cdef int nDOF_trial_element = elementJacobian_eb.shape[3] # <<<<<<<<<<<<<<
18386  * cupdateGlobalJacobianFromElementJacobian_eb_dense(<int *>elementNeighbors.data,
18387  * nElements_global,
18388  */
18389  __pyx_v_nDOF_trial_element = (__pyx_v_elementJacobian_eb->dimensions[3]);
18390 
18391  /* "cfemIntegrals.pyx":3781
18392  * cdef int nDOF_test_element = elementJacobian_eb.shape[2]
18393  * cdef int nDOF_trial_element = elementJacobian_eb.shape[3]
18394  * cupdateGlobalJacobianFromElementJacobian_eb_dense(<int *>elementNeighbors.data, # <<<<<<<<<<<<<<
18395  * nElements_global,
18396  * nElementBoundaries_element,
18397  */
18398  updateGlobalJacobianFromElementJacobian_eb_dense(((int *)__pyx_v_elementNeighbors->data), __pyx_v_nElements_global, __pyx_v_nElementBoundaries_element, __pyx_v_nDOF_test_element, __pyx_v_nDOF_trial_element, __pyx_v_offset_r, __pyx_v_stride_r, __pyx_v_offset_u, __pyx_v_stride_u, __pyx_v_nFreeVDOF_global, ((int *)__pyx_v_nFreeDOF_element_r->data), ((int *)__pyx_v_freeLocal_r->data), ((int *)__pyx_v_freeGlobal_r->data), ((int *)__pyx_v_nFreeDOF_element_u->data), ((int *)__pyx_v_freeLocal_u->data), ((int *)__pyx_v_freeGlobal_u->data), ((double *)__pyx_v_elementJacobian_eb->data), ((double *)__pyx_v_globalJacobian->data));
18399 
18400  /* "cfemIntegrals.pyx":3763
18401  * <double*>elementJacobian.data,
18402  * <double*>globalJacobian.data)
18403  * def updateGlobalJacobianFromElementJacobian_eb_dense(np.ndarray elementNeighbors, # <<<<<<<<<<<<<<
18404  * int offset_r,
18405  * int stride_r,
18406  */
18407 
18408  /* function exit code */
18409  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
18410  __Pyx_XGIVEREF(__pyx_r);
18411  __Pyx_RefNannyFinishContext();
18412  return __pyx_r;
18413 }
18414 
18415 /* "cfemIntegrals.pyx":3799
18416  * <double*>elementJacobian_eb.data,
18417  * <double*>globalJacobian.data)
18418  * def updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_dense(int offset_r, # <<<<<<<<<<<<<<
18419  * int stride_r,
18420  * int offset_u,
18421  */
18422 
18423 /* Python wrapper */
18424 static PyObject *__pyx_pw_13cfemIntegrals_163updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_dense(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
18425 static PyMethodDef __pyx_mdef_13cfemIntegrals_163updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_dense = {"updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_dense", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_163updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_dense, METH_VARARGS|METH_KEYWORDS, 0};
18426 static PyObject *__pyx_pw_13cfemIntegrals_163updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_dense(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
18427  int __pyx_v_offset_r;
18428  int __pyx_v_stride_r;
18429  int __pyx_v_offset_u;
18430  int __pyx_v_stride_u;
18431  int __pyx_v_nFreeVDOF_global;
18432  PyArrayObject *__pyx_v_interiorElementBoundaries = 0;
18433  PyArrayObject *__pyx_v_elementBoundaryElements = 0;
18434  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries = 0;
18435  PyArrayObject *__pyx_v_nFreeDOF_element_r = 0;
18436  PyArrayObject *__pyx_v_freeLocal_r = 0;
18437  PyArrayObject *__pyx_v_freeGlobal_r = 0;
18438  PyArrayObject *__pyx_v_nFreeDOF_element_u = 0;
18439  PyArrayObject *__pyx_v_freeLocal_u = 0;
18440  PyArrayObject *__pyx_v_freeGlobal_u = 0;
18441  PyArrayObject *__pyx_v_elementBoundaryFluxJacobian = 0;
18442  PyArrayObject *__pyx_v_w_dS = 0;
18443  PyArrayObject *__pyx_v_jac = 0;
18444  int __pyx_lineno = 0;
18445  const char *__pyx_filename = NULL;
18446  int __pyx_clineno = 0;
18447  PyObject *__pyx_r = 0;
18448  __Pyx_RefNannyDeclarations
18449  __Pyx_RefNannySetupContext("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_dense (wrapper)", 0);
18450  {
18451  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_offset_r,&__pyx_n_s_stride_r,&__pyx_n_s_offset_u,&__pyx_n_s_stride_u,&__pyx_n_s_nFreeVDOF_global,&__pyx_n_s_interiorElementBoundaries,&__pyx_n_s_elementBoundaryElements,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_nFreeDOF_element_r,&__pyx_n_s_freeLocal_r,&__pyx_n_s_freeGlobal_r,&__pyx_n_s_nFreeDOF_element_u,&__pyx_n_s_freeLocal_u,&__pyx_n_s_freeGlobal_u,&__pyx_n_s_elementBoundaryFluxJacobian,&__pyx_n_s_w_dS,&__pyx_n_s_jac,0};
18452  PyObject* values[17] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
18453  if (unlikely(__pyx_kwds)) {
18454  Py_ssize_t kw_args;
18455  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
18456  switch (pos_args) {
18457  case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
18458  CYTHON_FALLTHROUGH;
18459  case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
18460  CYTHON_FALLTHROUGH;
18461  case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
18462  CYTHON_FALLTHROUGH;
18463  case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
18464  CYTHON_FALLTHROUGH;
18465  case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
18466  CYTHON_FALLTHROUGH;
18467  case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
18468  CYTHON_FALLTHROUGH;
18469  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
18470  CYTHON_FALLTHROUGH;
18471  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
18472  CYTHON_FALLTHROUGH;
18473  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
18474  CYTHON_FALLTHROUGH;
18475  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
18476  CYTHON_FALLTHROUGH;
18477  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
18478  CYTHON_FALLTHROUGH;
18479  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
18480  CYTHON_FALLTHROUGH;
18481  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
18482  CYTHON_FALLTHROUGH;
18483  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
18484  CYTHON_FALLTHROUGH;
18485  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
18486  CYTHON_FALLTHROUGH;
18487  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18488  CYTHON_FALLTHROUGH;
18489  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18490  CYTHON_FALLTHROUGH;
18491  case 0: break;
18492  default: goto __pyx_L5_argtuple_error;
18493  }
18494  kw_args = PyDict_Size(__pyx_kwds);
18495  switch (pos_args) {
18496  case 0:
18497  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset_r)) != 0)) kw_args--;
18498  else goto __pyx_L5_argtuple_error;
18499  CYTHON_FALLTHROUGH;
18500  case 1:
18501  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stride_r)) != 0)) kw_args--;
18502  else {
18503  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_dense", 1, 17, 17, 1); __PYX_ERR(0, 3799, __pyx_L3_error)
18504  }
18505  CYTHON_FALLTHROUGH;
18506  case 2:
18507  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset_u)) != 0)) kw_args--;
18508  else {
18509  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_dense", 1, 17, 17, 2); __PYX_ERR(0, 3799, __pyx_L3_error)
18510  }
18511  CYTHON_FALLTHROUGH;
18512  case 3:
18513  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stride_u)) != 0)) kw_args--;
18514  else {
18515  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_dense", 1, 17, 17, 3); __PYX_ERR(0, 3799, __pyx_L3_error)
18516  }
18517  CYTHON_FALLTHROUGH;
18518  case 4:
18519  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeVDOF_global)) != 0)) kw_args--;
18520  else {
18521  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_dense", 1, 17, 17, 4); __PYX_ERR(0, 3799, __pyx_L3_error)
18522  }
18523  CYTHON_FALLTHROUGH;
18524  case 5:
18525  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_interiorElementBoundaries)) != 0)) kw_args--;
18526  else {
18527  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_dense", 1, 17, 17, 5); __PYX_ERR(0, 3799, __pyx_L3_error)
18528  }
18529  CYTHON_FALLTHROUGH;
18530  case 6:
18531  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElements)) != 0)) kw_args--;
18532  else {
18533  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_dense", 1, 17, 17, 6); __PYX_ERR(0, 3799, __pyx_L3_error)
18534  }
18535  CYTHON_FALLTHROUGH;
18536  case 7:
18537  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
18538  else {
18539  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_dense", 1, 17, 17, 7); __PYX_ERR(0, 3799, __pyx_L3_error)
18540  }
18541  CYTHON_FALLTHROUGH;
18542  case 8:
18543  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeDOF_element_r)) != 0)) kw_args--;
18544  else {
18545  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_dense", 1, 17, 17, 8); __PYX_ERR(0, 3799, __pyx_L3_error)
18546  }
18547  CYTHON_FALLTHROUGH;
18548  case 9:
18549  if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeLocal_r)) != 0)) kw_args--;
18550  else {
18551  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_dense", 1, 17, 17, 9); __PYX_ERR(0, 3799, __pyx_L3_error)
18552  }
18553  CYTHON_FALLTHROUGH;
18554  case 10:
18555  if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeGlobal_r)) != 0)) kw_args--;
18556  else {
18557  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_dense", 1, 17, 17, 10); __PYX_ERR(0, 3799, __pyx_L3_error)
18558  }
18559  CYTHON_FALLTHROUGH;
18560  case 11:
18561  if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeDOF_element_u)) != 0)) kw_args--;
18562  else {
18563  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_dense", 1, 17, 17, 11); __PYX_ERR(0, 3799, __pyx_L3_error)
18564  }
18565  CYTHON_FALLTHROUGH;
18566  case 12:
18567  if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeLocal_u)) != 0)) kw_args--;
18568  else {
18569  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_dense", 1, 17, 17, 12); __PYX_ERR(0, 3799, __pyx_L3_error)
18570  }
18571  CYTHON_FALLTHROUGH;
18572  case 13:
18573  if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeGlobal_u)) != 0)) kw_args--;
18574  else {
18575  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_dense", 1, 17, 17, 13); __PYX_ERR(0, 3799, __pyx_L3_error)
18576  }
18577  CYTHON_FALLTHROUGH;
18578  case 14:
18579  if (likely((values[14] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryFluxJacobian)) != 0)) kw_args--;
18580  else {
18581  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_dense", 1, 17, 17, 14); __PYX_ERR(0, 3799, __pyx_L3_error)
18582  }
18583  CYTHON_FALLTHROUGH;
18584  case 15:
18585  if (likely((values[15] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_w_dS)) != 0)) kw_args--;
18586  else {
18587  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_dense", 1, 17, 17, 15); __PYX_ERR(0, 3799, __pyx_L3_error)
18588  }
18589  CYTHON_FALLTHROUGH;
18590  case 16:
18591  if (likely((values[16] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jac)) != 0)) kw_args--;
18592  else {
18593  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_dense", 1, 17, 17, 16); __PYX_ERR(0, 3799, __pyx_L3_error)
18594  }
18595  }
18596  if (unlikely(kw_args > 0)) {
18597  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_dense") < 0)) __PYX_ERR(0, 3799, __pyx_L3_error)
18598  }
18599  } else if (PyTuple_GET_SIZE(__pyx_args) != 17) {
18600  goto __pyx_L5_argtuple_error;
18601  } else {
18602  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18603  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18604  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
18605  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
18606  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
18607  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
18608  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
18609  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
18610  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
18611  values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
18612  values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
18613  values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
18614  values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
18615  values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
18616  values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
18617  values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
18618  values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
18619  }
18620  __pyx_v_offset_r = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_offset_r == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3799, __pyx_L3_error)
18621  __pyx_v_stride_r = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_stride_r == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3800, __pyx_L3_error)
18622  __pyx_v_offset_u = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_offset_u == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3801, __pyx_L3_error)
18623  __pyx_v_stride_u = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_stride_u == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3802, __pyx_L3_error)
18624  __pyx_v_nFreeVDOF_global = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_nFreeVDOF_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3803, __pyx_L3_error)
18625  __pyx_v_interiorElementBoundaries = ((PyArrayObject *)values[5]);
18626  __pyx_v_elementBoundaryElements = ((PyArrayObject *)values[6]);
18627  __pyx_v_elementBoundaryLocalElementBoundaries = ((PyArrayObject *)values[7]);
18628  __pyx_v_nFreeDOF_element_r = ((PyArrayObject *)values[8]);
18629  __pyx_v_freeLocal_r = ((PyArrayObject *)values[9]);
18630  __pyx_v_freeGlobal_r = ((PyArrayObject *)values[10]);
18631  __pyx_v_nFreeDOF_element_u = ((PyArrayObject *)values[11]);
18632  __pyx_v_freeLocal_u = ((PyArrayObject *)values[12]);
18633  __pyx_v_freeGlobal_u = ((PyArrayObject *)values[13]);
18634  __pyx_v_elementBoundaryFluxJacobian = ((PyArrayObject *)values[14]);
18635  __pyx_v_w_dS = ((PyArrayObject *)values[15]);
18636  __pyx_v_jac = ((PyArrayObject *)values[16]);
18637  }
18638  goto __pyx_L4_argument_unpacking_done;
18639  __pyx_L5_argtuple_error:;
18640  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_dense", 1, 17, 17, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3799, __pyx_L3_error)
18641  __pyx_L3_error:;
18642  __Pyx_AddTraceback("cfemIntegrals.updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_dense", __pyx_clineno, __pyx_lineno, __pyx_filename);
18643  __Pyx_RefNannyFinishContext();
18644  return NULL;
18645  __pyx_L4_argument_unpacking_done:;
18646  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_interiorElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "interiorElementBoundaries", 0))) __PYX_ERR(0, 3804, __pyx_L1_error)
18647  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElements), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElements", 0))) __PYX_ERR(0, 3805, __pyx_L1_error)
18648  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundaries", 0))) __PYX_ERR(0, 3806, __pyx_L1_error)
18649  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nFreeDOF_element_r), __pyx_ptype_5numpy_ndarray, 1, "nFreeDOF_element_r", 0))) __PYX_ERR(0, 3807, __pyx_L1_error)
18650  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeLocal_r), __pyx_ptype_5numpy_ndarray, 1, "freeLocal_r", 0))) __PYX_ERR(0, 3808, __pyx_L1_error)
18651  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeGlobal_r), __pyx_ptype_5numpy_ndarray, 1, "freeGlobal_r", 0))) __PYX_ERR(0, 3809, __pyx_L1_error)
18652  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nFreeDOF_element_u), __pyx_ptype_5numpy_ndarray, 1, "nFreeDOF_element_u", 0))) __PYX_ERR(0, 3810, __pyx_L1_error)
18653  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeLocal_u), __pyx_ptype_5numpy_ndarray, 1, "freeLocal_u", 0))) __PYX_ERR(0, 3811, __pyx_L1_error)
18654  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeGlobal_u), __pyx_ptype_5numpy_ndarray, 1, "freeGlobal_u", 0))) __PYX_ERR(0, 3812, __pyx_L1_error)
18655  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryFluxJacobian), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryFluxJacobian", 0))) __PYX_ERR(0, 3813, __pyx_L1_error)
18656  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w_dS), __pyx_ptype_5numpy_ndarray, 1, "w_dS", 0))) __PYX_ERR(0, 3814, __pyx_L1_error)
18657  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_jac), __pyx_ptype_5numpy_ndarray, 1, "jac", 0))) __PYX_ERR(0, 3815, __pyx_L1_error)
18658  __pyx_r = __pyx_pf_13cfemIntegrals_162updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_dense(__pyx_self, __pyx_v_offset_r, __pyx_v_stride_r, __pyx_v_offset_u, __pyx_v_stride_u, __pyx_v_nFreeVDOF_global, __pyx_v_interiorElementBoundaries, __pyx_v_elementBoundaryElements, __pyx_v_elementBoundaryLocalElementBoundaries, __pyx_v_nFreeDOF_element_r, __pyx_v_freeLocal_r, __pyx_v_freeGlobal_r, __pyx_v_nFreeDOF_element_u, __pyx_v_freeLocal_u, __pyx_v_freeGlobal_u, __pyx_v_elementBoundaryFluxJacobian, __pyx_v_w_dS, __pyx_v_jac);
18659 
18660  /* function exit code */
18661  goto __pyx_L0;
18662  __pyx_L1_error:;
18663  __pyx_r = NULL;
18664  __pyx_L0:;
18665  __Pyx_RefNannyFinishContext();
18666  return __pyx_r;
18667 }
18668 
18669 static PyObject *__pyx_pf_13cfemIntegrals_162updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_dense(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_offset_r, int __pyx_v_stride_r, int __pyx_v_offset_u, int __pyx_v_stride_u, int __pyx_v_nFreeVDOF_global, PyArrayObject *__pyx_v_interiorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_nFreeDOF_element_r, PyArrayObject *__pyx_v_freeLocal_r, PyArrayObject *__pyx_v_freeGlobal_r, PyArrayObject *__pyx_v_nFreeDOF_element_u, PyArrayObject *__pyx_v_freeLocal_u, PyArrayObject *__pyx_v_freeGlobal_u, PyArrayObject *__pyx_v_elementBoundaryFluxJacobian, PyArrayObject *__pyx_v_w_dS, PyArrayObject *__pyx_v_jac) {
18670  int __pyx_v_nInteriorElementBoundaries_global;
18671  int __pyx_v_nElementBoundaries_element;
18672  int __pyx_v_nQuadraturePoints_elementBoundary;
18673  int __pyx_v_nDOF_test_element;
18674  int __pyx_v_nDOF_trial_element;
18675  PyObject *__pyx_r = NULL;
18676  __Pyx_RefNannyDeclarations
18677  __Pyx_RefNannySetupContext("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_dense", 0);
18678 
18679  /* "cfemIntegrals.pyx":3816
18680  * np.ndarray w_dS,
18681  * np.ndarray jac):
18682  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0] # <<<<<<<<<<<<<<
18683  * cdef int nElementBoundaries_element = w_dS.shape[1]
18684  * cdef int nQuadraturePoints_elementBoundary = w_dS.shape[2]
18685  */
18686  __pyx_v_nInteriorElementBoundaries_global = (__pyx_v_interiorElementBoundaries->dimensions[0]);
18687 
18688  /* "cfemIntegrals.pyx":3817
18689  * np.ndarray jac):
18690  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0]
18691  * cdef int nElementBoundaries_element = w_dS.shape[1] # <<<<<<<<<<<<<<
18692  * cdef int nQuadraturePoints_elementBoundary = w_dS.shape[2]
18693  * cdef int nDOF_test_element = w_dS.shape[3]
18694  */
18695  __pyx_v_nElementBoundaries_element = (__pyx_v_w_dS->dimensions[1]);
18696 
18697  /* "cfemIntegrals.pyx":3818
18698  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0]
18699  * cdef int nElementBoundaries_element = w_dS.shape[1]
18700  * cdef int nQuadraturePoints_elementBoundary = w_dS.shape[2] # <<<<<<<<<<<<<<
18701  * cdef int nDOF_test_element = w_dS.shape[3]
18702  * cdef int nDOF_trial_element = elementBoundaryFluxJacobian.shape[3]
18703  */
18704  __pyx_v_nQuadraturePoints_elementBoundary = (__pyx_v_w_dS->dimensions[2]);
18705 
18706  /* "cfemIntegrals.pyx":3819
18707  * cdef int nElementBoundaries_element = w_dS.shape[1]
18708  * cdef int nQuadraturePoints_elementBoundary = w_dS.shape[2]
18709  * cdef int nDOF_test_element = w_dS.shape[3] # <<<<<<<<<<<<<<
18710  * cdef int nDOF_trial_element = elementBoundaryFluxJacobian.shape[3]
18711  * cupdateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_dense(nInteriorElementBoundaries_global,
18712  */
18713  __pyx_v_nDOF_test_element = (__pyx_v_w_dS->dimensions[3]);
18714 
18715  /* "cfemIntegrals.pyx":3820
18716  * cdef int nQuadraturePoints_elementBoundary = w_dS.shape[2]
18717  * cdef int nDOF_test_element = w_dS.shape[3]
18718  * cdef int nDOF_trial_element = elementBoundaryFluxJacobian.shape[3] # <<<<<<<<<<<<<<
18719  * cupdateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_dense(nInteriorElementBoundaries_global,
18720  * nElementBoundaries_element,
18721  */
18722  __pyx_v_nDOF_trial_element = (__pyx_v_elementBoundaryFluxJacobian->dimensions[3]);
18723 
18724  /* "cfemIntegrals.pyx":3821
18725  * cdef int nDOF_test_element = w_dS.shape[3]
18726  * cdef int nDOF_trial_element = elementBoundaryFluxJacobian.shape[3]
18727  * cupdateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_dense(nInteriorElementBoundaries_global, # <<<<<<<<<<<<<<
18728  * nElementBoundaries_element,
18729  * nQuadraturePoints_elementBoundary,
18730  */
18731  updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_dense(__pyx_v_nInteriorElementBoundaries_global, __pyx_v_nElementBoundaries_element, __pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nDOF_test_element, __pyx_v_nDOF_trial_element, __pyx_v_offset_r, __pyx_v_stride_r, __pyx_v_offset_u, __pyx_v_stride_u, __pyx_v_nFreeVDOF_global, ((int *)__pyx_v_interiorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), ((int *)__pyx_v_nFreeDOF_element_r->data), ((int *)__pyx_v_freeLocal_r->data), ((int *)__pyx_v_freeGlobal_r->data), ((int *)__pyx_v_nFreeDOF_element_u->data), ((int *)__pyx_v_freeLocal_u->data), ((int *)__pyx_v_freeGlobal_u->data), ((double *)__pyx_v_elementBoundaryFluxJacobian->data), ((double *)__pyx_v_w_dS->data), ((double *)__pyx_v_jac->data));
18732 
18733  /* "cfemIntegrals.pyx":3799
18734  * <double*>elementJacobian_eb.data,
18735  * <double*>globalJacobian.data)
18736  * def updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_dense(int offset_r, # <<<<<<<<<<<<<<
18737  * int stride_r,
18738  * int offset_u,
18739  */
18740 
18741  /* function exit code */
18742  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
18743  __Pyx_XGIVEREF(__pyx_r);
18744  __Pyx_RefNannyFinishContext();
18745  return __pyx_r;
18746 }
18747 
18748 /* "cfemIntegrals.pyx":3843
18749  * <double*>w_dS.data,
18750  * <double*>jac.data)
18751  * def updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_dense(np.ndarray elementNeighbors, # <<<<<<<<<<<<<<
18752  * int nElements_global,
18753  * int offset_r,
18754  */
18755 
18756 /* Python wrapper */
18757 static PyObject *__pyx_pw_13cfemIntegrals_165updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_dense(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
18758 static PyMethodDef __pyx_mdef_13cfemIntegrals_165updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_dense = {"updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_dense", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_165updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_dense, METH_VARARGS|METH_KEYWORDS, 0};
18759 static PyObject *__pyx_pw_13cfemIntegrals_165updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_dense(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
18760  PyArrayObject *__pyx_v_elementNeighbors = 0;
18761  int __pyx_v_nElements_global;
18762  int __pyx_v_offset_r;
18763  int __pyx_v_stride_r;
18764  int __pyx_v_offset_u;
18765  int __pyx_v_stride_u;
18766  int __pyx_v_nFreeVDOF_global;
18767  PyArrayObject *__pyx_v_interiorElementBoundaries = 0;
18768  PyArrayObject *__pyx_v_elementBoundaryElements = 0;
18769  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries = 0;
18770  PyArrayObject *__pyx_v_nFreeDOF_element_r = 0;
18771  PyArrayObject *__pyx_v_freeLocal_r = 0;
18772  PyArrayObject *__pyx_v_freeGlobal_r = 0;
18773  PyArrayObject *__pyx_v_nFreeDOF_element_u = 0;
18774  PyArrayObject *__pyx_v_freeLocal_u = 0;
18775  PyArrayObject *__pyx_v_freeGlobal_u = 0;
18776  PyArrayObject *__pyx_v_elementBoundaryFluxJacobian_eb = 0;
18777  PyArrayObject *__pyx_v_w_dS = 0;
18778  PyArrayObject *__pyx_v_jac = 0;
18779  int __pyx_lineno = 0;
18780  const char *__pyx_filename = NULL;
18781  int __pyx_clineno = 0;
18782  PyObject *__pyx_r = 0;
18783  __Pyx_RefNannyDeclarations
18784  __Pyx_RefNannySetupContext("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_dense (wrapper)", 0);
18785  {
18786  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_elementNeighbors,&__pyx_n_s_nElements_global,&__pyx_n_s_offset_r,&__pyx_n_s_stride_r,&__pyx_n_s_offset_u,&__pyx_n_s_stride_u,&__pyx_n_s_nFreeVDOF_global,&__pyx_n_s_interiorElementBoundaries,&__pyx_n_s_elementBoundaryElements,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_nFreeDOF_element_r,&__pyx_n_s_freeLocal_r,&__pyx_n_s_freeGlobal_r,&__pyx_n_s_nFreeDOF_element_u,&__pyx_n_s_freeLocal_u,&__pyx_n_s_freeGlobal_u,&__pyx_n_s_elementBoundaryFluxJacobian_eb,&__pyx_n_s_w_dS,&__pyx_n_s_jac,0};
18787  PyObject* values[19] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
18788  if (unlikely(__pyx_kwds)) {
18789  Py_ssize_t kw_args;
18790  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
18791  switch (pos_args) {
18792  case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
18793  CYTHON_FALLTHROUGH;
18794  case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
18795  CYTHON_FALLTHROUGH;
18796  case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
18797  CYTHON_FALLTHROUGH;
18798  case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
18799  CYTHON_FALLTHROUGH;
18800  case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
18801  CYTHON_FALLTHROUGH;
18802  case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
18803  CYTHON_FALLTHROUGH;
18804  case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
18805  CYTHON_FALLTHROUGH;
18806  case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
18807  CYTHON_FALLTHROUGH;
18808  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
18809  CYTHON_FALLTHROUGH;
18810  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
18811  CYTHON_FALLTHROUGH;
18812  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
18813  CYTHON_FALLTHROUGH;
18814  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
18815  CYTHON_FALLTHROUGH;
18816  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
18817  CYTHON_FALLTHROUGH;
18818  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
18819  CYTHON_FALLTHROUGH;
18820  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
18821  CYTHON_FALLTHROUGH;
18822  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
18823  CYTHON_FALLTHROUGH;
18824  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
18825  CYTHON_FALLTHROUGH;
18826  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18827  CYTHON_FALLTHROUGH;
18828  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18829  CYTHON_FALLTHROUGH;
18830  case 0: break;
18831  default: goto __pyx_L5_argtuple_error;
18832  }
18833  kw_args = PyDict_Size(__pyx_kwds);
18834  switch (pos_args) {
18835  case 0:
18836  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementNeighbors)) != 0)) kw_args--;
18837  else goto __pyx_L5_argtuple_error;
18838  CYTHON_FALLTHROUGH;
18839  case 1:
18840  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nElements_global)) != 0)) kw_args--;
18841  else {
18842  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_dense", 1, 19, 19, 1); __PYX_ERR(0, 3843, __pyx_L3_error)
18843  }
18844  CYTHON_FALLTHROUGH;
18845  case 2:
18846  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset_r)) != 0)) kw_args--;
18847  else {
18848  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_dense", 1, 19, 19, 2); __PYX_ERR(0, 3843, __pyx_L3_error)
18849  }
18850  CYTHON_FALLTHROUGH;
18851  case 3:
18852  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stride_r)) != 0)) kw_args--;
18853  else {
18854  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_dense", 1, 19, 19, 3); __PYX_ERR(0, 3843, __pyx_L3_error)
18855  }
18856  CYTHON_FALLTHROUGH;
18857  case 4:
18858  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset_u)) != 0)) kw_args--;
18859  else {
18860  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_dense", 1, 19, 19, 4); __PYX_ERR(0, 3843, __pyx_L3_error)
18861  }
18862  CYTHON_FALLTHROUGH;
18863  case 5:
18864  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stride_u)) != 0)) kw_args--;
18865  else {
18866  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_dense", 1, 19, 19, 5); __PYX_ERR(0, 3843, __pyx_L3_error)
18867  }
18868  CYTHON_FALLTHROUGH;
18869  case 6:
18870  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeVDOF_global)) != 0)) kw_args--;
18871  else {
18872  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_dense", 1, 19, 19, 6); __PYX_ERR(0, 3843, __pyx_L3_error)
18873  }
18874  CYTHON_FALLTHROUGH;
18875  case 7:
18876  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_interiorElementBoundaries)) != 0)) kw_args--;
18877  else {
18878  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_dense", 1, 19, 19, 7); __PYX_ERR(0, 3843, __pyx_L3_error)
18879  }
18880  CYTHON_FALLTHROUGH;
18881  case 8:
18882  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElements)) != 0)) kw_args--;
18883  else {
18884  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_dense", 1, 19, 19, 8); __PYX_ERR(0, 3843, __pyx_L3_error)
18885  }
18886  CYTHON_FALLTHROUGH;
18887  case 9:
18888  if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
18889  else {
18890  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_dense", 1, 19, 19, 9); __PYX_ERR(0, 3843, __pyx_L3_error)
18891  }
18892  CYTHON_FALLTHROUGH;
18893  case 10:
18894  if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeDOF_element_r)) != 0)) kw_args--;
18895  else {
18896  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_dense", 1, 19, 19, 10); __PYX_ERR(0, 3843, __pyx_L3_error)
18897  }
18898  CYTHON_FALLTHROUGH;
18899  case 11:
18900  if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeLocal_r)) != 0)) kw_args--;
18901  else {
18902  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_dense", 1, 19, 19, 11); __PYX_ERR(0, 3843, __pyx_L3_error)
18903  }
18904  CYTHON_FALLTHROUGH;
18905  case 12:
18906  if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeGlobal_r)) != 0)) kw_args--;
18907  else {
18908  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_dense", 1, 19, 19, 12); __PYX_ERR(0, 3843, __pyx_L3_error)
18909  }
18910  CYTHON_FALLTHROUGH;
18911  case 13:
18912  if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeDOF_element_u)) != 0)) kw_args--;
18913  else {
18914  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_dense", 1, 19, 19, 13); __PYX_ERR(0, 3843, __pyx_L3_error)
18915  }
18916  CYTHON_FALLTHROUGH;
18917  case 14:
18918  if (likely((values[14] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeLocal_u)) != 0)) kw_args--;
18919  else {
18920  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_dense", 1, 19, 19, 14); __PYX_ERR(0, 3843, __pyx_L3_error)
18921  }
18922  CYTHON_FALLTHROUGH;
18923  case 15:
18924  if (likely((values[15] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeGlobal_u)) != 0)) kw_args--;
18925  else {
18926  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_dense", 1, 19, 19, 15); __PYX_ERR(0, 3843, __pyx_L3_error)
18927  }
18928  CYTHON_FALLTHROUGH;
18929  case 16:
18930  if (likely((values[16] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryFluxJacobian_eb)) != 0)) kw_args--;
18931  else {
18932  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_dense", 1, 19, 19, 16); __PYX_ERR(0, 3843, __pyx_L3_error)
18933  }
18934  CYTHON_FALLTHROUGH;
18935  case 17:
18936  if (likely((values[17] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_w_dS)) != 0)) kw_args--;
18937  else {
18938  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_dense", 1, 19, 19, 17); __PYX_ERR(0, 3843, __pyx_L3_error)
18939  }
18940  CYTHON_FALLTHROUGH;
18941  case 18:
18942  if (likely((values[18] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jac)) != 0)) kw_args--;
18943  else {
18944  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_dense", 1, 19, 19, 18); __PYX_ERR(0, 3843, __pyx_L3_error)
18945  }
18946  }
18947  if (unlikely(kw_args > 0)) {
18948  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_dense") < 0)) __PYX_ERR(0, 3843, __pyx_L3_error)
18949  }
18950  } else if (PyTuple_GET_SIZE(__pyx_args) != 19) {
18951  goto __pyx_L5_argtuple_error;
18952  } else {
18953  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18954  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18955  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
18956  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
18957  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
18958  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
18959  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
18960  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
18961  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
18962  values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
18963  values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
18964  values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
18965  values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
18966  values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
18967  values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
18968  values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
18969  values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
18970  values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
18971  values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
18972  }
18973  __pyx_v_elementNeighbors = ((PyArrayObject *)values[0]);
18974  __pyx_v_nElements_global = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_nElements_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3844, __pyx_L3_error)
18975  __pyx_v_offset_r = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_offset_r == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3845, __pyx_L3_error)
18976  __pyx_v_stride_r = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_stride_r == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3846, __pyx_L3_error)
18977  __pyx_v_offset_u = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_offset_u == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3847, __pyx_L3_error)
18978  __pyx_v_stride_u = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_stride_u == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3848, __pyx_L3_error)
18979  __pyx_v_nFreeVDOF_global = __Pyx_PyInt_As_int(values[6]); if (unlikely((__pyx_v_nFreeVDOF_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3849, __pyx_L3_error)
18980  __pyx_v_interiorElementBoundaries = ((PyArrayObject *)values[7]);
18981  __pyx_v_elementBoundaryElements = ((PyArrayObject *)values[8]);
18982  __pyx_v_elementBoundaryLocalElementBoundaries = ((PyArrayObject *)values[9]);
18983  __pyx_v_nFreeDOF_element_r = ((PyArrayObject *)values[10]);
18984  __pyx_v_freeLocal_r = ((PyArrayObject *)values[11]);
18985  __pyx_v_freeGlobal_r = ((PyArrayObject *)values[12]);
18986  __pyx_v_nFreeDOF_element_u = ((PyArrayObject *)values[13]);
18987  __pyx_v_freeLocal_u = ((PyArrayObject *)values[14]);
18988  __pyx_v_freeGlobal_u = ((PyArrayObject *)values[15]);
18989  __pyx_v_elementBoundaryFluxJacobian_eb = ((PyArrayObject *)values[16]);
18990  __pyx_v_w_dS = ((PyArrayObject *)values[17]);
18991  __pyx_v_jac = ((PyArrayObject *)values[18]);
18992  }
18993  goto __pyx_L4_argument_unpacking_done;
18994  __pyx_L5_argtuple_error:;
18995  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_dense", 1, 19, 19, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3843, __pyx_L3_error)
18996  __pyx_L3_error:;
18997  __Pyx_AddTraceback("cfemIntegrals.updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_dense", __pyx_clineno, __pyx_lineno, __pyx_filename);
18998  __Pyx_RefNannyFinishContext();
18999  return NULL;
19000  __pyx_L4_argument_unpacking_done:;
19001  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNeighbors), __pyx_ptype_5numpy_ndarray, 1, "elementNeighbors", 0))) __PYX_ERR(0, 3843, __pyx_L1_error)
19002  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_interiorElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "interiorElementBoundaries", 0))) __PYX_ERR(0, 3850, __pyx_L1_error)
19003  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElements), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElements", 0))) __PYX_ERR(0, 3851, __pyx_L1_error)
19004  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundaries", 0))) __PYX_ERR(0, 3852, __pyx_L1_error)
19005  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nFreeDOF_element_r), __pyx_ptype_5numpy_ndarray, 1, "nFreeDOF_element_r", 0))) __PYX_ERR(0, 3853, __pyx_L1_error)
19006  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeLocal_r), __pyx_ptype_5numpy_ndarray, 1, "freeLocal_r", 0))) __PYX_ERR(0, 3854, __pyx_L1_error)
19007  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeGlobal_r), __pyx_ptype_5numpy_ndarray, 1, "freeGlobal_r", 0))) __PYX_ERR(0, 3855, __pyx_L1_error)
19008  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nFreeDOF_element_u), __pyx_ptype_5numpy_ndarray, 1, "nFreeDOF_element_u", 0))) __PYX_ERR(0, 3856, __pyx_L1_error)
19009  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeLocal_u), __pyx_ptype_5numpy_ndarray, 1, "freeLocal_u", 0))) __PYX_ERR(0, 3857, __pyx_L1_error)
19010  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeGlobal_u), __pyx_ptype_5numpy_ndarray, 1, "freeGlobal_u", 0))) __PYX_ERR(0, 3858, __pyx_L1_error)
19011  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryFluxJacobian_eb), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryFluxJacobian_eb", 0))) __PYX_ERR(0, 3859, __pyx_L1_error)
19012  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w_dS), __pyx_ptype_5numpy_ndarray, 1, "w_dS", 0))) __PYX_ERR(0, 3860, __pyx_L1_error)
19013  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_jac), __pyx_ptype_5numpy_ndarray, 1, "jac", 0))) __PYX_ERR(0, 3861, __pyx_L1_error)
19014  __pyx_r = __pyx_pf_13cfemIntegrals_164updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_dense(__pyx_self, __pyx_v_elementNeighbors, __pyx_v_nElements_global, __pyx_v_offset_r, __pyx_v_stride_r, __pyx_v_offset_u, __pyx_v_stride_u, __pyx_v_nFreeVDOF_global, __pyx_v_interiorElementBoundaries, __pyx_v_elementBoundaryElements, __pyx_v_elementBoundaryLocalElementBoundaries, __pyx_v_nFreeDOF_element_r, __pyx_v_freeLocal_r, __pyx_v_freeGlobal_r, __pyx_v_nFreeDOF_element_u, __pyx_v_freeLocal_u, __pyx_v_freeGlobal_u, __pyx_v_elementBoundaryFluxJacobian_eb, __pyx_v_w_dS, __pyx_v_jac);
19015 
19016  /* function exit code */
19017  goto __pyx_L0;
19018  __pyx_L1_error:;
19019  __pyx_r = NULL;
19020  __pyx_L0:;
19021  __Pyx_RefNannyFinishContext();
19022  return __pyx_r;
19023 }
19024 
19025 static PyObject *__pyx_pf_13cfemIntegrals_164updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_dense(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementNeighbors, int __pyx_v_nElements_global, int __pyx_v_offset_r, int __pyx_v_stride_r, int __pyx_v_offset_u, int __pyx_v_stride_u, int __pyx_v_nFreeVDOF_global, PyArrayObject *__pyx_v_interiorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_nFreeDOF_element_r, PyArrayObject *__pyx_v_freeLocal_r, PyArrayObject *__pyx_v_freeGlobal_r, PyArrayObject *__pyx_v_nFreeDOF_element_u, PyArrayObject *__pyx_v_freeLocal_u, PyArrayObject *__pyx_v_freeGlobal_u, PyArrayObject *__pyx_v_elementBoundaryFluxJacobian_eb, PyArrayObject *__pyx_v_w_dS, PyArrayObject *__pyx_v_jac) {
19026  int __pyx_v_nInteriorElementBoundaries_global;
19027  int __pyx_v_nElementBoundaries_element;
19028  int __pyx_v_nQuadraturePoints_elementBoundary;
19029  int __pyx_v_nDOF_test_element;
19030  int __pyx_v_nDOF_trial_element;
19031  PyObject *__pyx_r = NULL;
19032  __Pyx_RefNannyDeclarations
19033  __Pyx_RefNannySetupContext("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_dense", 0);
19034 
19035  /* "cfemIntegrals.pyx":3862
19036  * np.ndarray w_dS,
19037  * np.ndarray jac):
19038  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0] # <<<<<<<<<<<<<<
19039  * cdef int nElementBoundaries_element = w_dS.shape[1]
19040  * cdef int nQuadraturePoints_elementBoundary = w_dS.shape[2]
19041  */
19042  __pyx_v_nInteriorElementBoundaries_global = (__pyx_v_interiorElementBoundaries->dimensions[0]);
19043 
19044  /* "cfemIntegrals.pyx":3863
19045  * np.ndarray jac):
19046  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0]
19047  * cdef int nElementBoundaries_element = w_dS.shape[1] # <<<<<<<<<<<<<<
19048  * cdef int nQuadraturePoints_elementBoundary = w_dS.shape[2]
19049  * cdef int nDOF_test_element = w_dS.shape[3]
19050  */
19051  __pyx_v_nElementBoundaries_element = (__pyx_v_w_dS->dimensions[1]);
19052 
19053  /* "cfemIntegrals.pyx":3864
19054  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0]
19055  * cdef int nElementBoundaries_element = w_dS.shape[1]
19056  * cdef int nQuadraturePoints_elementBoundary = w_dS.shape[2] # <<<<<<<<<<<<<<
19057  * cdef int nDOF_test_element = w_dS.shape[3]
19058  * cdef int nDOF_trial_element = elementBoundaryFluxJacobian_eb.shape[4]
19059  */
19060  __pyx_v_nQuadraturePoints_elementBoundary = (__pyx_v_w_dS->dimensions[2]);
19061 
19062  /* "cfemIntegrals.pyx":3865
19063  * cdef int nElementBoundaries_element = w_dS.shape[1]
19064  * cdef int nQuadraturePoints_elementBoundary = w_dS.shape[2]
19065  * cdef int nDOF_test_element = w_dS.shape[3] # <<<<<<<<<<<<<<
19066  * cdef int nDOF_trial_element = elementBoundaryFluxJacobian_eb.shape[4]
19067  * cupdateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_dense(<int *>elementNeighbors.data,
19068  */
19069  __pyx_v_nDOF_test_element = (__pyx_v_w_dS->dimensions[3]);
19070 
19071  /* "cfemIntegrals.pyx":3866
19072  * cdef int nQuadraturePoints_elementBoundary = w_dS.shape[2]
19073  * cdef int nDOF_test_element = w_dS.shape[3]
19074  * cdef int nDOF_trial_element = elementBoundaryFluxJacobian_eb.shape[4] # <<<<<<<<<<<<<<
19075  * cupdateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_dense(<int *>elementNeighbors.data,
19076  * nElements_global,
19077  */
19078  __pyx_v_nDOF_trial_element = (__pyx_v_elementBoundaryFluxJacobian_eb->dimensions[4]);
19079 
19080  /* "cfemIntegrals.pyx":3867
19081  * cdef int nDOF_test_element = w_dS.shape[3]
19082  * cdef int nDOF_trial_element = elementBoundaryFluxJacobian_eb.shape[4]
19083  * cupdateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_dense(<int *>elementNeighbors.data, # <<<<<<<<<<<<<<
19084  * nElements_global,
19085  * nInteriorElementBoundaries_global,
19086  */
19087  updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_dense(((int *)__pyx_v_elementNeighbors->data), __pyx_v_nElements_global, __pyx_v_nInteriorElementBoundaries_global, __pyx_v_nElementBoundaries_element, __pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nDOF_test_element, __pyx_v_nDOF_trial_element, __pyx_v_offset_r, __pyx_v_stride_r, __pyx_v_offset_u, __pyx_v_stride_u, __pyx_v_nFreeVDOF_global, ((int *)__pyx_v_interiorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), ((int *)__pyx_v_nFreeDOF_element_r->data), ((int *)__pyx_v_freeLocal_r->data), ((int *)__pyx_v_freeGlobal_r->data), ((int *)__pyx_v_nFreeDOF_element_u->data), ((int *)__pyx_v_freeLocal_u->data), ((int *)__pyx_v_freeGlobal_u->data), ((double *)__pyx_v_elementBoundaryFluxJacobian_eb->data), ((double *)__pyx_v_w_dS->data), ((double *)__pyx_v_jac->data));
19088 
19089  /* "cfemIntegrals.pyx":3843
19090  * <double*>w_dS.data,
19091  * <double*>jac.data)
19092  * def updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_dense(np.ndarray elementNeighbors, # <<<<<<<<<<<<<<
19093  * int nElements_global,
19094  * int offset_r,
19095  */
19096 
19097  /* function exit code */
19098  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
19099  __Pyx_XGIVEREF(__pyx_r);
19100  __Pyx_RefNannyFinishContext();
19101  return __pyx_r;
19102 }
19103 
19104 /* "cfemIntegrals.pyx":3891
19105  * <double*>w_dS.data,
19106  * <double*>jac.data)
19107  * def updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_dense(int offset_r, # <<<<<<<<<<<<<<
19108  * int stride_r,
19109  * int offset_u,
19110  */
19111 
19112 /* Python wrapper */
19113 static PyObject *__pyx_pw_13cfemIntegrals_167updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_dense(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
19114 static PyMethodDef __pyx_mdef_13cfemIntegrals_167updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_dense = {"updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_dense", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_167updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_dense, METH_VARARGS|METH_KEYWORDS, 0};
19115 static PyObject *__pyx_pw_13cfemIntegrals_167updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_dense(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
19116  int __pyx_v_offset_r;
19117  int __pyx_v_stride_r;
19118  int __pyx_v_offset_u;
19119  int __pyx_v_stride_u;
19120  int __pyx_v_nFreeVDOF_global;
19121  PyArrayObject *__pyx_v_exteriorElementBoundaries = 0;
19122  PyArrayObject *__pyx_v_elementBoundaryElements = 0;
19123  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries = 0;
19124  PyArrayObject *__pyx_v_nFreeDOF_element_r = 0;
19125  PyArrayObject *__pyx_v_freeLocal_r = 0;
19126  PyArrayObject *__pyx_v_freeGlobal_r = 0;
19127  PyArrayObject *__pyx_v_nFreeDOF_element_u = 0;
19128  PyArrayObject *__pyx_v_freeLocal_u = 0;
19129  PyArrayObject *__pyx_v_freeGlobal_u = 0;
19130  PyArrayObject *__pyx_v_elementBoundaryFluxJacobian = 0;
19131  PyArrayObject *__pyx_v_w_dS = 0;
19132  PyArrayObject *__pyx_v_jac = 0;
19133  int __pyx_lineno = 0;
19134  const char *__pyx_filename = NULL;
19135  int __pyx_clineno = 0;
19136  PyObject *__pyx_r = 0;
19137  __Pyx_RefNannyDeclarations
19138  __Pyx_RefNannySetupContext("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_dense (wrapper)", 0);
19139  {
19140  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_offset_r,&__pyx_n_s_stride_r,&__pyx_n_s_offset_u,&__pyx_n_s_stride_u,&__pyx_n_s_nFreeVDOF_global,&__pyx_n_s_exteriorElementBoundaries,&__pyx_n_s_elementBoundaryElements,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_nFreeDOF_element_r,&__pyx_n_s_freeLocal_r,&__pyx_n_s_freeGlobal_r,&__pyx_n_s_nFreeDOF_element_u,&__pyx_n_s_freeLocal_u,&__pyx_n_s_freeGlobal_u,&__pyx_n_s_elementBoundaryFluxJacobian,&__pyx_n_s_w_dS,&__pyx_n_s_jac,0};
19141  PyObject* values[17] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
19142  if (unlikely(__pyx_kwds)) {
19143  Py_ssize_t kw_args;
19144  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
19145  switch (pos_args) {
19146  case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
19147  CYTHON_FALLTHROUGH;
19148  case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
19149  CYTHON_FALLTHROUGH;
19150  case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
19151  CYTHON_FALLTHROUGH;
19152  case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
19153  CYTHON_FALLTHROUGH;
19154  case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
19155  CYTHON_FALLTHROUGH;
19156  case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
19157  CYTHON_FALLTHROUGH;
19158  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
19159  CYTHON_FALLTHROUGH;
19160  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
19161  CYTHON_FALLTHROUGH;
19162  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
19163  CYTHON_FALLTHROUGH;
19164  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
19165  CYTHON_FALLTHROUGH;
19166  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
19167  CYTHON_FALLTHROUGH;
19168  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
19169  CYTHON_FALLTHROUGH;
19170  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
19171  CYTHON_FALLTHROUGH;
19172  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
19173  CYTHON_FALLTHROUGH;
19174  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
19175  CYTHON_FALLTHROUGH;
19176  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
19177  CYTHON_FALLTHROUGH;
19178  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
19179  CYTHON_FALLTHROUGH;
19180  case 0: break;
19181  default: goto __pyx_L5_argtuple_error;
19182  }
19183  kw_args = PyDict_Size(__pyx_kwds);
19184  switch (pos_args) {
19185  case 0:
19186  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset_r)) != 0)) kw_args--;
19187  else goto __pyx_L5_argtuple_error;
19188  CYTHON_FALLTHROUGH;
19189  case 1:
19190  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stride_r)) != 0)) kw_args--;
19191  else {
19192  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_dense", 1, 17, 17, 1); __PYX_ERR(0, 3891, __pyx_L3_error)
19193  }
19194  CYTHON_FALLTHROUGH;
19195  case 2:
19196  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset_u)) != 0)) kw_args--;
19197  else {
19198  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_dense", 1, 17, 17, 2); __PYX_ERR(0, 3891, __pyx_L3_error)
19199  }
19200  CYTHON_FALLTHROUGH;
19201  case 3:
19202  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stride_u)) != 0)) kw_args--;
19203  else {
19204  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_dense", 1, 17, 17, 3); __PYX_ERR(0, 3891, __pyx_L3_error)
19205  }
19206  CYTHON_FALLTHROUGH;
19207  case 4:
19208  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeVDOF_global)) != 0)) kw_args--;
19209  else {
19210  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_dense", 1, 17, 17, 4); __PYX_ERR(0, 3891, __pyx_L3_error)
19211  }
19212  CYTHON_FALLTHROUGH;
19213  case 5:
19214  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exteriorElementBoundaries)) != 0)) kw_args--;
19215  else {
19216  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_dense", 1, 17, 17, 5); __PYX_ERR(0, 3891, __pyx_L3_error)
19217  }
19218  CYTHON_FALLTHROUGH;
19219  case 6:
19220  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElements)) != 0)) kw_args--;
19221  else {
19222  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_dense", 1, 17, 17, 6); __PYX_ERR(0, 3891, __pyx_L3_error)
19223  }
19224  CYTHON_FALLTHROUGH;
19225  case 7:
19226  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
19227  else {
19228  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_dense", 1, 17, 17, 7); __PYX_ERR(0, 3891, __pyx_L3_error)
19229  }
19230  CYTHON_FALLTHROUGH;
19231  case 8:
19232  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeDOF_element_r)) != 0)) kw_args--;
19233  else {
19234  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_dense", 1, 17, 17, 8); __PYX_ERR(0, 3891, __pyx_L3_error)
19235  }
19236  CYTHON_FALLTHROUGH;
19237  case 9:
19238  if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeLocal_r)) != 0)) kw_args--;
19239  else {
19240  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_dense", 1, 17, 17, 9); __PYX_ERR(0, 3891, __pyx_L3_error)
19241  }
19242  CYTHON_FALLTHROUGH;
19243  case 10:
19244  if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeGlobal_r)) != 0)) kw_args--;
19245  else {
19246  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_dense", 1, 17, 17, 10); __PYX_ERR(0, 3891, __pyx_L3_error)
19247  }
19248  CYTHON_FALLTHROUGH;
19249  case 11:
19250  if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeDOF_element_u)) != 0)) kw_args--;
19251  else {
19252  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_dense", 1, 17, 17, 11); __PYX_ERR(0, 3891, __pyx_L3_error)
19253  }
19254  CYTHON_FALLTHROUGH;
19255  case 12:
19256  if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeLocal_u)) != 0)) kw_args--;
19257  else {
19258  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_dense", 1, 17, 17, 12); __PYX_ERR(0, 3891, __pyx_L3_error)
19259  }
19260  CYTHON_FALLTHROUGH;
19261  case 13:
19262  if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeGlobal_u)) != 0)) kw_args--;
19263  else {
19264  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_dense", 1, 17, 17, 13); __PYX_ERR(0, 3891, __pyx_L3_error)
19265  }
19266  CYTHON_FALLTHROUGH;
19267  case 14:
19268  if (likely((values[14] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryFluxJacobian)) != 0)) kw_args--;
19269  else {
19270  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_dense", 1, 17, 17, 14); __PYX_ERR(0, 3891, __pyx_L3_error)
19271  }
19272  CYTHON_FALLTHROUGH;
19273  case 15:
19274  if (likely((values[15] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_w_dS)) != 0)) kw_args--;
19275  else {
19276  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_dense", 1, 17, 17, 15); __PYX_ERR(0, 3891, __pyx_L3_error)
19277  }
19278  CYTHON_FALLTHROUGH;
19279  case 16:
19280  if (likely((values[16] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jac)) != 0)) kw_args--;
19281  else {
19282  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_dense", 1, 17, 17, 16); __PYX_ERR(0, 3891, __pyx_L3_error)
19283  }
19284  }
19285  if (unlikely(kw_args > 0)) {
19286  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_dense") < 0)) __PYX_ERR(0, 3891, __pyx_L3_error)
19287  }
19288  } else if (PyTuple_GET_SIZE(__pyx_args) != 17) {
19289  goto __pyx_L5_argtuple_error;
19290  } else {
19291  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
19292  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
19293  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
19294  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
19295  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
19296  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
19297  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
19298  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
19299  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
19300  values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
19301  values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
19302  values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
19303  values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
19304  values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
19305  values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
19306  values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
19307  values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
19308  }
19309  __pyx_v_offset_r = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_offset_r == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3891, __pyx_L3_error)
19310  __pyx_v_stride_r = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_stride_r == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3892, __pyx_L3_error)
19311  __pyx_v_offset_u = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_offset_u == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3893, __pyx_L3_error)
19312  __pyx_v_stride_u = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_stride_u == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3894, __pyx_L3_error)
19313  __pyx_v_nFreeVDOF_global = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_nFreeVDOF_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3895, __pyx_L3_error)
19314  __pyx_v_exteriorElementBoundaries = ((PyArrayObject *)values[5]);
19315  __pyx_v_elementBoundaryElements = ((PyArrayObject *)values[6]);
19316  __pyx_v_elementBoundaryLocalElementBoundaries = ((PyArrayObject *)values[7]);
19317  __pyx_v_nFreeDOF_element_r = ((PyArrayObject *)values[8]);
19318  __pyx_v_freeLocal_r = ((PyArrayObject *)values[9]);
19319  __pyx_v_freeGlobal_r = ((PyArrayObject *)values[10]);
19320  __pyx_v_nFreeDOF_element_u = ((PyArrayObject *)values[11]);
19321  __pyx_v_freeLocal_u = ((PyArrayObject *)values[12]);
19322  __pyx_v_freeGlobal_u = ((PyArrayObject *)values[13]);
19323  __pyx_v_elementBoundaryFluxJacobian = ((PyArrayObject *)values[14]);
19324  __pyx_v_w_dS = ((PyArrayObject *)values[15]);
19325  __pyx_v_jac = ((PyArrayObject *)values[16]);
19326  }
19327  goto __pyx_L4_argument_unpacking_done;
19328  __pyx_L5_argtuple_error:;
19329  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_dense", 1, 17, 17, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3891, __pyx_L3_error)
19330  __pyx_L3_error:;
19331  __Pyx_AddTraceback("cfemIntegrals.updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_dense", __pyx_clineno, __pyx_lineno, __pyx_filename);
19332  __Pyx_RefNannyFinishContext();
19333  return NULL;
19334  __pyx_L4_argument_unpacking_done:;
19335  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exteriorElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "exteriorElementBoundaries", 0))) __PYX_ERR(0, 3896, __pyx_L1_error)
19336  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElements), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElements", 0))) __PYX_ERR(0, 3897, __pyx_L1_error)
19337  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundaries", 0))) __PYX_ERR(0, 3898, __pyx_L1_error)
19338  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nFreeDOF_element_r), __pyx_ptype_5numpy_ndarray, 1, "nFreeDOF_element_r", 0))) __PYX_ERR(0, 3899, __pyx_L1_error)
19339  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeLocal_r), __pyx_ptype_5numpy_ndarray, 1, "freeLocal_r", 0))) __PYX_ERR(0, 3900, __pyx_L1_error)
19340  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeGlobal_r), __pyx_ptype_5numpy_ndarray, 1, "freeGlobal_r", 0))) __PYX_ERR(0, 3901, __pyx_L1_error)
19341  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nFreeDOF_element_u), __pyx_ptype_5numpy_ndarray, 1, "nFreeDOF_element_u", 0))) __PYX_ERR(0, 3902, __pyx_L1_error)
19342  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeLocal_u), __pyx_ptype_5numpy_ndarray, 1, "freeLocal_u", 0))) __PYX_ERR(0, 3903, __pyx_L1_error)
19343  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeGlobal_u), __pyx_ptype_5numpy_ndarray, 1, "freeGlobal_u", 0))) __PYX_ERR(0, 3904, __pyx_L1_error)
19344  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryFluxJacobian), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryFluxJacobian", 0))) __PYX_ERR(0, 3905, __pyx_L1_error)
19345  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w_dS), __pyx_ptype_5numpy_ndarray, 1, "w_dS", 0))) __PYX_ERR(0, 3906, __pyx_L1_error)
19346  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_jac), __pyx_ptype_5numpy_ndarray, 1, "jac", 0))) __PYX_ERR(0, 3907, __pyx_L1_error)
19347  __pyx_r = __pyx_pf_13cfemIntegrals_166updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_dense(__pyx_self, __pyx_v_offset_r, __pyx_v_stride_r, __pyx_v_offset_u, __pyx_v_stride_u, __pyx_v_nFreeVDOF_global, __pyx_v_exteriorElementBoundaries, __pyx_v_elementBoundaryElements, __pyx_v_elementBoundaryLocalElementBoundaries, __pyx_v_nFreeDOF_element_r, __pyx_v_freeLocal_r, __pyx_v_freeGlobal_r, __pyx_v_nFreeDOF_element_u, __pyx_v_freeLocal_u, __pyx_v_freeGlobal_u, __pyx_v_elementBoundaryFluxJacobian, __pyx_v_w_dS, __pyx_v_jac);
19348 
19349  /* function exit code */
19350  goto __pyx_L0;
19351  __pyx_L1_error:;
19352  __pyx_r = NULL;
19353  __pyx_L0:;
19354  __Pyx_RefNannyFinishContext();
19355  return __pyx_r;
19356 }
19357 
19358 static PyObject *__pyx_pf_13cfemIntegrals_166updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_dense(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_offset_r, int __pyx_v_stride_r, int __pyx_v_offset_u, int __pyx_v_stride_u, int __pyx_v_nFreeVDOF_global, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_nFreeDOF_element_r, PyArrayObject *__pyx_v_freeLocal_r, PyArrayObject *__pyx_v_freeGlobal_r, PyArrayObject *__pyx_v_nFreeDOF_element_u, PyArrayObject *__pyx_v_freeLocal_u, PyArrayObject *__pyx_v_freeGlobal_u, PyArrayObject *__pyx_v_elementBoundaryFluxJacobian, PyArrayObject *__pyx_v_w_dS, PyArrayObject *__pyx_v_jac) {
19359  int __pyx_v_nd;
19360  PyObject *__pyx_r = NULL;
19361  __Pyx_RefNannyDeclarations
19362  int __pyx_t_1;
19363  int __pyx_t_2;
19364  int __pyx_lineno = 0;
19365  const char *__pyx_filename = NULL;
19366  int __pyx_clineno = 0;
19367  __Pyx_RefNannySetupContext("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_dense", 0);
19368 
19369  /* "cfemIntegrals.pyx":3908
19370  * np.ndarray w_dS,
19371  * np.ndarray jac):
19372  * cdef int nd = w_dS.ndim # <<<<<<<<<<<<<<
19373  * if nd > 3:
19374  * assert elementBoundaryFluxJacobian.ndim == 4
19375  */
19376  __pyx_t_1 = __pyx_v_w_dS->nd;
19377  __pyx_v_nd = __pyx_t_1;
19378 
19379  /* "cfemIntegrals.pyx":3909
19380  * np.ndarray jac):
19381  * cdef int nd = w_dS.ndim
19382  * if nd > 3: # <<<<<<<<<<<<<<
19383  * assert elementBoundaryFluxJacobian.ndim == 4
19384  * cupdateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_dense(exteriorElementBoundaries.shape[0],
19385  */
19386  __pyx_t_2 = ((__pyx_v_nd > 3) != 0);
19387  if (__pyx_t_2) {
19388 
19389  /* "cfemIntegrals.pyx":3910
19390  * cdef int nd = w_dS.ndim
19391  * if nd > 3:
19392  * assert elementBoundaryFluxJacobian.ndim == 4 # <<<<<<<<<<<<<<
19393  * cupdateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_dense(exteriorElementBoundaries.shape[0],
19394  * w_dS.shape[1],
19395  */
19396  #ifndef CYTHON_WITHOUT_ASSERTIONS
19397  if (unlikely(!Py_OptimizeFlag)) {
19398  if (unlikely(!((__pyx_v_elementBoundaryFluxJacobian->nd == 4) != 0))) {
19399  PyErr_SetNone(PyExc_AssertionError);
19400  __PYX_ERR(0, 3910, __pyx_L1_error)
19401  }
19402  }
19403  #endif
19404 
19405  /* "cfemIntegrals.pyx":3911
19406  * if nd > 3:
19407  * assert elementBoundaryFluxJacobian.ndim == 4
19408  * cupdateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_dense(exteriorElementBoundaries.shape[0], # <<<<<<<<<<<<<<
19409  * w_dS.shape[1],
19410  * w_dS.shape[2],
19411  */
19412  updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_dense((__pyx_v_exteriorElementBoundaries->dimensions[0]), (__pyx_v_w_dS->dimensions[1]), (__pyx_v_w_dS->dimensions[2]), (__pyx_v_w_dS->dimensions[3]), (__pyx_v_elementBoundaryFluxJacobian->dimensions[3]), __pyx_v_offset_r, __pyx_v_stride_r, __pyx_v_offset_u, __pyx_v_stride_u, __pyx_v_nFreeVDOF_global, ((int *)__pyx_v_exteriorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), ((int *)__pyx_v_nFreeDOF_element_r->data), ((int *)__pyx_v_freeLocal_r->data), ((int *)__pyx_v_freeGlobal_r->data), ((int *)__pyx_v_nFreeDOF_element_u->data), ((int *)__pyx_v_freeLocal_u->data), ((int *)__pyx_v_freeGlobal_u->data), ((double *)__pyx_v_elementBoundaryFluxJacobian->data), ((double *)__pyx_v_w_dS->data), ((double *)__pyx_v_jac->data));
19413 
19414  /* "cfemIntegrals.pyx":3909
19415  * np.ndarray jac):
19416  * cdef int nd = w_dS.ndim
19417  * if nd > 3: # <<<<<<<<<<<<<<
19418  * assert elementBoundaryFluxJacobian.ndim == 4
19419  * cupdateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_dense(exteriorElementBoundaries.shape[0],
19420  */
19421  goto __pyx_L3;
19422  }
19423 
19424  /* "cfemIntegrals.pyx":3934
19425  * <double*>jac.data)
19426  * else:
19427  * assert elementBoundaryFluxJacobian.ndim == 3 # <<<<<<<<<<<<<<
19428  * cupdateGlobalJacobianFromGlobalExteriorElementBoundaryFluxJacobian_dense(exteriorElementBoundaries.shape[0],
19429  * w_dS.shape[1],
19430  */
19431  /*else*/ {
19432  #ifndef CYTHON_WITHOUT_ASSERTIONS
19433  if (unlikely(!Py_OptimizeFlag)) {
19434  if (unlikely(!((__pyx_v_elementBoundaryFluxJacobian->nd == 3) != 0))) {
19435  PyErr_SetNone(PyExc_AssertionError);
19436  __PYX_ERR(0, 3934, __pyx_L1_error)
19437  }
19438  }
19439  #endif
19440 
19441  /* "cfemIntegrals.pyx":3935
19442  * else:
19443  * assert elementBoundaryFluxJacobian.ndim == 3
19444  * cupdateGlobalJacobianFromGlobalExteriorElementBoundaryFluxJacobian_dense(exteriorElementBoundaries.shape[0], # <<<<<<<<<<<<<<
19445  * w_dS.shape[1],
19446  * w_dS.shape[2],
19447  */
19448  updateGlobalJacobianFromGlobalExteriorElementBoundaryFluxJacobian_dense((__pyx_v_exteriorElementBoundaries->dimensions[0]), (__pyx_v_w_dS->dimensions[1]), (__pyx_v_w_dS->dimensions[2]), (__pyx_v_elementBoundaryFluxJacobian->dimensions[2]), __pyx_v_offset_r, __pyx_v_stride_r, __pyx_v_offset_u, __pyx_v_stride_u, __pyx_v_nFreeVDOF_global, ((int *)__pyx_v_exteriorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), ((int *)__pyx_v_nFreeDOF_element_r->data), ((int *)__pyx_v_freeLocal_r->data), ((int *)__pyx_v_freeGlobal_r->data), ((int *)__pyx_v_nFreeDOF_element_u->data), ((int *)__pyx_v_freeLocal_u->data), ((int *)__pyx_v_freeGlobal_u->data), ((double *)__pyx_v_elementBoundaryFluxJacobian->data), ((double *)__pyx_v_w_dS->data), ((double *)__pyx_v_jac->data));
19449  }
19450  __pyx_L3:;
19451 
19452  /* "cfemIntegrals.pyx":3891
19453  * <double*>w_dS.data,
19454  * <double*>jac.data)
19455  * def updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_dense(int offset_r, # <<<<<<<<<<<<<<
19456  * int stride_r,
19457  * int offset_u,
19458  */
19459 
19460  /* function exit code */
19461  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
19462  goto __pyx_L0;
19463  __pyx_L1_error:;
19464  __Pyx_AddTraceback("cfemIntegrals.updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_dense", __pyx_clineno, __pyx_lineno, __pyx_filename);
19465  __pyx_r = NULL;
19466  __pyx_L0:;
19467  __Pyx_XGIVEREF(__pyx_r);
19468  __Pyx_RefNannyFinishContext();
19469  return __pyx_r;
19470 }
19471 
19472 /* "cfemIntegrals.pyx":3956
19473  * <double*> w_dS.data,
19474  * <double*> jac.data)
19475  * def updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_dense(np.ndarray elementNeighbors, # <<<<<<<<<<<<<<
19476  * int nElements_global,
19477  * int nExteriorElementBoundaries_global,
19478  */
19479 
19480 /* Python wrapper */
19481 static PyObject *__pyx_pw_13cfemIntegrals_169updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_dense(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
19482 static PyMethodDef __pyx_mdef_13cfemIntegrals_169updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_dense = {"updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_dense", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_169updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_dense, METH_VARARGS|METH_KEYWORDS, 0};
19483 static PyObject *__pyx_pw_13cfemIntegrals_169updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_dense(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
19484  PyArrayObject *__pyx_v_elementNeighbors = 0;
19485  int __pyx_v_nElements_global;
19486  CYTHON_UNUSED int __pyx_v_nExteriorElementBoundaries_global;
19487  CYTHON_UNUSED int __pyx_v_nElementBoundaries_element;
19488  CYTHON_UNUSED int __pyx_v_nQuadraturePoints_elementBoundary;
19489  CYTHON_UNUSED int __pyx_v_nDOF_test_element;
19490  CYTHON_UNUSED int __pyx_v_nDOF_trial_element;
19491  int __pyx_v_offset_r;
19492  int __pyx_v_stride_r;
19493  int __pyx_v_offset_u;
19494  int __pyx_v_stride_u;
19495  int __pyx_v_nFreeVDOF_global;
19496  PyArrayObject *__pyx_v_exteriorElementBoundaries = 0;
19497  PyArrayObject *__pyx_v_elementBoundaryElements = 0;
19498  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries = 0;
19499  PyArrayObject *__pyx_v_nFreeDOF_element_r = 0;
19500  PyArrayObject *__pyx_v_freeLocal_r = 0;
19501  PyArrayObject *__pyx_v_freeGlobal_r = 0;
19502  PyArrayObject *__pyx_v_nFreeDOF_element_u = 0;
19503  PyArrayObject *__pyx_v_freeLocal_u = 0;
19504  PyArrayObject *__pyx_v_freeGlobal_u = 0;
19505  PyArrayObject *__pyx_v_elementBoundaryFluxJacobian_eb = 0;
19506  PyArrayObject *__pyx_v_w_dS = 0;
19507  PyArrayObject *__pyx_v_jac = 0;
19508  int __pyx_lineno = 0;
19509  const char *__pyx_filename = NULL;
19510  int __pyx_clineno = 0;
19511  PyObject *__pyx_r = 0;
19512  __Pyx_RefNannyDeclarations
19513  __Pyx_RefNannySetupContext("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_dense (wrapper)", 0);
19514  {
19515  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_elementNeighbors,&__pyx_n_s_nElements_global,&__pyx_n_s_nExteriorElementBoundaries_globa,&__pyx_n_s_nElementBoundaries_element,&__pyx_n_s_nQuadraturePoints_elementBoundar,&__pyx_n_s_nDOF_test_element,&__pyx_n_s_nDOF_trial_element,&__pyx_n_s_offset_r,&__pyx_n_s_stride_r,&__pyx_n_s_offset_u,&__pyx_n_s_stride_u,&__pyx_n_s_nFreeVDOF_global,&__pyx_n_s_exteriorElementBoundaries,&__pyx_n_s_elementBoundaryElements,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_nFreeDOF_element_r,&__pyx_n_s_freeLocal_r,&__pyx_n_s_freeGlobal_r,&__pyx_n_s_nFreeDOF_element_u,&__pyx_n_s_freeLocal_u,&__pyx_n_s_freeGlobal_u,&__pyx_n_s_elementBoundaryFluxJacobian_eb,&__pyx_n_s_w_dS,&__pyx_n_s_jac,0};
19516  PyObject* values[24] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
19517  if (unlikely(__pyx_kwds)) {
19518  Py_ssize_t kw_args;
19519  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
19520  switch (pos_args) {
19521  case 24: values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
19522  CYTHON_FALLTHROUGH;
19523  case 23: values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
19524  CYTHON_FALLTHROUGH;
19525  case 22: values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
19526  CYTHON_FALLTHROUGH;
19527  case 21: values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
19528  CYTHON_FALLTHROUGH;
19529  case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
19530  CYTHON_FALLTHROUGH;
19531  case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
19532  CYTHON_FALLTHROUGH;
19533  case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
19534  CYTHON_FALLTHROUGH;
19535  case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
19536  CYTHON_FALLTHROUGH;
19537  case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
19538  CYTHON_FALLTHROUGH;
19539  case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
19540  CYTHON_FALLTHROUGH;
19541  case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
19542  CYTHON_FALLTHROUGH;
19543  case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
19544  CYTHON_FALLTHROUGH;
19545  case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
19546  CYTHON_FALLTHROUGH;
19547  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
19548  CYTHON_FALLTHROUGH;
19549  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
19550  CYTHON_FALLTHROUGH;
19551  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
19552  CYTHON_FALLTHROUGH;
19553  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
19554  CYTHON_FALLTHROUGH;
19555  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
19556  CYTHON_FALLTHROUGH;
19557  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
19558  CYTHON_FALLTHROUGH;
19559  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
19560  CYTHON_FALLTHROUGH;
19561  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
19562  CYTHON_FALLTHROUGH;
19563  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
19564  CYTHON_FALLTHROUGH;
19565  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
19566  CYTHON_FALLTHROUGH;
19567  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
19568  CYTHON_FALLTHROUGH;
19569  case 0: break;
19570  default: goto __pyx_L5_argtuple_error;
19571  }
19572  kw_args = PyDict_Size(__pyx_kwds);
19573  switch (pos_args) {
19574  case 0:
19575  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementNeighbors)) != 0)) kw_args--;
19576  else goto __pyx_L5_argtuple_error;
19577  CYTHON_FALLTHROUGH;
19578  case 1:
19579  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nElements_global)) != 0)) kw_args--;
19580  else {
19581  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_dense", 1, 24, 24, 1); __PYX_ERR(0, 3956, __pyx_L3_error)
19582  }
19583  CYTHON_FALLTHROUGH;
19584  case 2:
19585  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nExteriorElementBoundaries_globa)) != 0)) kw_args--;
19586  else {
19587  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_dense", 1, 24, 24, 2); __PYX_ERR(0, 3956, __pyx_L3_error)
19588  }
19589  CYTHON_FALLTHROUGH;
19590  case 3:
19591  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nElementBoundaries_element)) != 0)) kw_args--;
19592  else {
19593  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_dense", 1, 24, 24, 3); __PYX_ERR(0, 3956, __pyx_L3_error)
19594  }
19595  CYTHON_FALLTHROUGH;
19596  case 4:
19597  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nQuadraturePoints_elementBoundar)) != 0)) kw_args--;
19598  else {
19599  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_dense", 1, 24, 24, 4); __PYX_ERR(0, 3956, __pyx_L3_error)
19600  }
19601  CYTHON_FALLTHROUGH;
19602  case 5:
19603  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nDOF_test_element)) != 0)) kw_args--;
19604  else {
19605  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_dense", 1, 24, 24, 5); __PYX_ERR(0, 3956, __pyx_L3_error)
19606  }
19607  CYTHON_FALLTHROUGH;
19608  case 6:
19609  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nDOF_trial_element)) != 0)) kw_args--;
19610  else {
19611  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_dense", 1, 24, 24, 6); __PYX_ERR(0, 3956, __pyx_L3_error)
19612  }
19613  CYTHON_FALLTHROUGH;
19614  case 7:
19615  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset_r)) != 0)) kw_args--;
19616  else {
19617  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_dense", 1, 24, 24, 7); __PYX_ERR(0, 3956, __pyx_L3_error)
19618  }
19619  CYTHON_FALLTHROUGH;
19620  case 8:
19621  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stride_r)) != 0)) kw_args--;
19622  else {
19623  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_dense", 1, 24, 24, 8); __PYX_ERR(0, 3956, __pyx_L3_error)
19624  }
19625  CYTHON_FALLTHROUGH;
19626  case 9:
19627  if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset_u)) != 0)) kw_args--;
19628  else {
19629  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_dense", 1, 24, 24, 9); __PYX_ERR(0, 3956, __pyx_L3_error)
19630  }
19631  CYTHON_FALLTHROUGH;
19632  case 10:
19633  if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stride_u)) != 0)) kw_args--;
19634  else {
19635  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_dense", 1, 24, 24, 10); __PYX_ERR(0, 3956, __pyx_L3_error)
19636  }
19637  CYTHON_FALLTHROUGH;
19638  case 11:
19639  if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeVDOF_global)) != 0)) kw_args--;
19640  else {
19641  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_dense", 1, 24, 24, 11); __PYX_ERR(0, 3956, __pyx_L3_error)
19642  }
19643  CYTHON_FALLTHROUGH;
19644  case 12:
19645  if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exteriorElementBoundaries)) != 0)) kw_args--;
19646  else {
19647  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_dense", 1, 24, 24, 12); __PYX_ERR(0, 3956, __pyx_L3_error)
19648  }
19649  CYTHON_FALLTHROUGH;
19650  case 13:
19651  if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElements)) != 0)) kw_args--;
19652  else {
19653  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_dense", 1, 24, 24, 13); __PYX_ERR(0, 3956, __pyx_L3_error)
19654  }
19655  CYTHON_FALLTHROUGH;
19656  case 14:
19657  if (likely((values[14] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
19658  else {
19659  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_dense", 1, 24, 24, 14); __PYX_ERR(0, 3956, __pyx_L3_error)
19660  }
19661  CYTHON_FALLTHROUGH;
19662  case 15:
19663  if (likely((values[15] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeDOF_element_r)) != 0)) kw_args--;
19664  else {
19665  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_dense", 1, 24, 24, 15); __PYX_ERR(0, 3956, __pyx_L3_error)
19666  }
19667  CYTHON_FALLTHROUGH;
19668  case 16:
19669  if (likely((values[16] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeLocal_r)) != 0)) kw_args--;
19670  else {
19671  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_dense", 1, 24, 24, 16); __PYX_ERR(0, 3956, __pyx_L3_error)
19672  }
19673  CYTHON_FALLTHROUGH;
19674  case 17:
19675  if (likely((values[17] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeGlobal_r)) != 0)) kw_args--;
19676  else {
19677  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_dense", 1, 24, 24, 17); __PYX_ERR(0, 3956, __pyx_L3_error)
19678  }
19679  CYTHON_FALLTHROUGH;
19680  case 18:
19681  if (likely((values[18] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeDOF_element_u)) != 0)) kw_args--;
19682  else {
19683  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_dense", 1, 24, 24, 18); __PYX_ERR(0, 3956, __pyx_L3_error)
19684  }
19685  CYTHON_FALLTHROUGH;
19686  case 19:
19687  if (likely((values[19] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeLocal_u)) != 0)) kw_args--;
19688  else {
19689  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_dense", 1, 24, 24, 19); __PYX_ERR(0, 3956, __pyx_L3_error)
19690  }
19691  CYTHON_FALLTHROUGH;
19692  case 20:
19693  if (likely((values[20] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeGlobal_u)) != 0)) kw_args--;
19694  else {
19695  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_dense", 1, 24, 24, 20); __PYX_ERR(0, 3956, __pyx_L3_error)
19696  }
19697  CYTHON_FALLTHROUGH;
19698  case 21:
19699  if (likely((values[21] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryFluxJacobian_eb)) != 0)) kw_args--;
19700  else {
19701  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_dense", 1, 24, 24, 21); __PYX_ERR(0, 3956, __pyx_L3_error)
19702  }
19703  CYTHON_FALLTHROUGH;
19704  case 22:
19705  if (likely((values[22] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_w_dS)) != 0)) kw_args--;
19706  else {
19707  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_dense", 1, 24, 24, 22); __PYX_ERR(0, 3956, __pyx_L3_error)
19708  }
19709  CYTHON_FALLTHROUGH;
19710  case 23:
19711  if (likely((values[23] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jac)) != 0)) kw_args--;
19712  else {
19713  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_dense", 1, 24, 24, 23); __PYX_ERR(0, 3956, __pyx_L3_error)
19714  }
19715  }
19716  if (unlikely(kw_args > 0)) {
19717  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_dense") < 0)) __PYX_ERR(0, 3956, __pyx_L3_error)
19718  }
19719  } else if (PyTuple_GET_SIZE(__pyx_args) != 24) {
19720  goto __pyx_L5_argtuple_error;
19721  } else {
19722  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
19723  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
19724  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
19725  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
19726  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
19727  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
19728  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
19729  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
19730  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
19731  values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
19732  values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
19733  values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
19734  values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
19735  values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
19736  values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
19737  values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
19738  values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
19739  values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
19740  values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
19741  values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
19742  values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
19743  values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
19744  values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
19745  values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
19746  }
19747  __pyx_v_elementNeighbors = ((PyArrayObject *)values[0]);
19748  __pyx_v_nElements_global = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_nElements_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3957, __pyx_L3_error)
19749  __pyx_v_nExteriorElementBoundaries_global = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_nExteriorElementBoundaries_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3958, __pyx_L3_error)
19750  __pyx_v_nElementBoundaries_element = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_nElementBoundaries_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3959, __pyx_L3_error)
19751  __pyx_v_nQuadraturePoints_elementBoundary = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_nQuadraturePoints_elementBoundary == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3960, __pyx_L3_error)
19752  __pyx_v_nDOF_test_element = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_nDOF_test_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3961, __pyx_L3_error)
19753  __pyx_v_nDOF_trial_element = __Pyx_PyInt_As_int(values[6]); if (unlikely((__pyx_v_nDOF_trial_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3962, __pyx_L3_error)
19754  __pyx_v_offset_r = __Pyx_PyInt_As_int(values[7]); if (unlikely((__pyx_v_offset_r == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3963, __pyx_L3_error)
19755  __pyx_v_stride_r = __Pyx_PyInt_As_int(values[8]); if (unlikely((__pyx_v_stride_r == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3964, __pyx_L3_error)
19756  __pyx_v_offset_u = __Pyx_PyInt_As_int(values[9]); if (unlikely((__pyx_v_offset_u == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3965, __pyx_L3_error)
19757  __pyx_v_stride_u = __Pyx_PyInt_As_int(values[10]); if (unlikely((__pyx_v_stride_u == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3966, __pyx_L3_error)
19758  __pyx_v_nFreeVDOF_global = __Pyx_PyInt_As_int(values[11]); if (unlikely((__pyx_v_nFreeVDOF_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3967, __pyx_L3_error)
19759  __pyx_v_exteriorElementBoundaries = ((PyArrayObject *)values[12]);
19760  __pyx_v_elementBoundaryElements = ((PyArrayObject *)values[13]);
19761  __pyx_v_elementBoundaryLocalElementBoundaries = ((PyArrayObject *)values[14]);
19762  __pyx_v_nFreeDOF_element_r = ((PyArrayObject *)values[15]);
19763  __pyx_v_freeLocal_r = ((PyArrayObject *)values[16]);
19764  __pyx_v_freeGlobal_r = ((PyArrayObject *)values[17]);
19765  __pyx_v_nFreeDOF_element_u = ((PyArrayObject *)values[18]);
19766  __pyx_v_freeLocal_u = ((PyArrayObject *)values[19]);
19767  __pyx_v_freeGlobal_u = ((PyArrayObject *)values[20]);
19768  __pyx_v_elementBoundaryFluxJacobian_eb = ((PyArrayObject *)values[21]);
19769  __pyx_v_w_dS = ((PyArrayObject *)values[22]);
19770  __pyx_v_jac = ((PyArrayObject *)values[23]);
19771  }
19772  goto __pyx_L4_argument_unpacking_done;
19773  __pyx_L5_argtuple_error:;
19774  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_dense", 1, 24, 24, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3956, __pyx_L3_error)
19775  __pyx_L3_error:;
19776  __Pyx_AddTraceback("cfemIntegrals.updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_dense", __pyx_clineno, __pyx_lineno, __pyx_filename);
19777  __Pyx_RefNannyFinishContext();
19778  return NULL;
19779  __pyx_L4_argument_unpacking_done:;
19780  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNeighbors), __pyx_ptype_5numpy_ndarray, 1, "elementNeighbors", 0))) __PYX_ERR(0, 3956, __pyx_L1_error)
19781  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exteriorElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "exteriorElementBoundaries", 0))) __PYX_ERR(0, 3968, __pyx_L1_error)
19782  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElements), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElements", 0))) __PYX_ERR(0, 3969, __pyx_L1_error)
19783  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundaries", 0))) __PYX_ERR(0, 3970, __pyx_L1_error)
19784  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nFreeDOF_element_r), __pyx_ptype_5numpy_ndarray, 1, "nFreeDOF_element_r", 0))) __PYX_ERR(0, 3971, __pyx_L1_error)
19785  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeLocal_r), __pyx_ptype_5numpy_ndarray, 1, "freeLocal_r", 0))) __PYX_ERR(0, 3972, __pyx_L1_error)
19786  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeGlobal_r), __pyx_ptype_5numpy_ndarray, 1, "freeGlobal_r", 0))) __PYX_ERR(0, 3973, __pyx_L1_error)
19787  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nFreeDOF_element_u), __pyx_ptype_5numpy_ndarray, 1, "nFreeDOF_element_u", 0))) __PYX_ERR(0, 3974, __pyx_L1_error)
19788  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeLocal_u), __pyx_ptype_5numpy_ndarray, 1, "freeLocal_u", 0))) __PYX_ERR(0, 3975, __pyx_L1_error)
19789  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeGlobal_u), __pyx_ptype_5numpy_ndarray, 1, "freeGlobal_u", 0))) __PYX_ERR(0, 3976, __pyx_L1_error)
19790  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryFluxJacobian_eb), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryFluxJacobian_eb", 0))) __PYX_ERR(0, 3977, __pyx_L1_error)
19791  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w_dS), __pyx_ptype_5numpy_ndarray, 1, "w_dS", 0))) __PYX_ERR(0, 3978, __pyx_L1_error)
19792  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_jac), __pyx_ptype_5numpy_ndarray, 1, "jac", 0))) __PYX_ERR(0, 3979, __pyx_L1_error)
19793  __pyx_r = __pyx_pf_13cfemIntegrals_168updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_dense(__pyx_self, __pyx_v_elementNeighbors, __pyx_v_nElements_global, __pyx_v_nExteriorElementBoundaries_global, __pyx_v_nElementBoundaries_element, __pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nDOF_test_element, __pyx_v_nDOF_trial_element, __pyx_v_offset_r, __pyx_v_stride_r, __pyx_v_offset_u, __pyx_v_stride_u, __pyx_v_nFreeVDOF_global, __pyx_v_exteriorElementBoundaries, __pyx_v_elementBoundaryElements, __pyx_v_elementBoundaryLocalElementBoundaries, __pyx_v_nFreeDOF_element_r, __pyx_v_freeLocal_r, __pyx_v_freeGlobal_r, __pyx_v_nFreeDOF_element_u, __pyx_v_freeLocal_u, __pyx_v_freeGlobal_u, __pyx_v_elementBoundaryFluxJacobian_eb, __pyx_v_w_dS, __pyx_v_jac);
19794 
19795  /* function exit code */
19796  goto __pyx_L0;
19797  __pyx_L1_error:;
19798  __pyx_r = NULL;
19799  __pyx_L0:;
19800  __Pyx_RefNannyFinishContext();
19801  return __pyx_r;
19802 }
19803 
19804 static PyObject *__pyx_pf_13cfemIntegrals_168updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_dense(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementNeighbors, int __pyx_v_nElements_global, CYTHON_UNUSED int __pyx_v_nExteriorElementBoundaries_global, CYTHON_UNUSED int __pyx_v_nElementBoundaries_element, CYTHON_UNUSED int __pyx_v_nQuadraturePoints_elementBoundary, CYTHON_UNUSED int __pyx_v_nDOF_test_element, CYTHON_UNUSED int __pyx_v_nDOF_trial_element, int __pyx_v_offset_r, int __pyx_v_stride_r, int __pyx_v_offset_u, int __pyx_v_stride_u, int __pyx_v_nFreeVDOF_global, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_nFreeDOF_element_r, PyArrayObject *__pyx_v_freeLocal_r, PyArrayObject *__pyx_v_freeGlobal_r, PyArrayObject *__pyx_v_nFreeDOF_element_u, PyArrayObject *__pyx_v_freeLocal_u, PyArrayObject *__pyx_v_freeGlobal_u, PyArrayObject *__pyx_v_elementBoundaryFluxJacobian_eb, PyArrayObject *__pyx_v_w_dS, PyArrayObject *__pyx_v_jac) {
19805  PyObject *__pyx_r = NULL;
19806  __Pyx_RefNannyDeclarations
19807  int __pyx_t_1;
19808  __Pyx_RefNannySetupContext("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_dense", 0);
19809 
19810  /* "cfemIntegrals.pyx":3980
19811  * np.ndarray w_dS,
19812  * np.ndarray jac):
19813  * if w_dS.ndim > 3: # <<<<<<<<<<<<<<
19814  * cupdateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_dense(<int *>elementNeighbors.data,
19815  * nElements_global,
19816  */
19817  __pyx_t_1 = ((__pyx_v_w_dS->nd > 3) != 0);
19818  if (__pyx_t_1) {
19819 
19820  /* "cfemIntegrals.pyx":3981
19821  * np.ndarray jac):
19822  * if w_dS.ndim > 3:
19823  * cupdateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_dense(<int *>elementNeighbors.data, # <<<<<<<<<<<<<<
19824  * nElements_global,
19825  * exteriorElementBoundaries.shape[0],
19826  */
19827  updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_dense(((int *)__pyx_v_elementNeighbors->data), __pyx_v_nElements_global, (__pyx_v_exteriorElementBoundaries->dimensions[0]), (__pyx_v_w_dS->dimensions[1]), (__pyx_v_w_dS->dimensions[2]), (__pyx_v_w_dS->dimensions[3]), (__pyx_v_elementBoundaryFluxJacobian_eb->dimensions[4]), __pyx_v_offset_r, __pyx_v_stride_r, __pyx_v_offset_u, __pyx_v_stride_u, __pyx_v_nFreeVDOF_global, ((int *)__pyx_v_exteriorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), ((int *)__pyx_v_nFreeDOF_element_r->data), ((int *)__pyx_v_freeLocal_r->data), ((int *)__pyx_v_freeGlobal_r->data), ((int *)__pyx_v_nFreeDOF_element_u->data), ((int *)__pyx_v_freeLocal_u->data), ((int *)__pyx_v_freeGlobal_u->data), ((double *)__pyx_v_elementBoundaryFluxJacobian_eb->data), ((double *)__pyx_v_w_dS->data), ((double *)__pyx_v_jac->data));
19828 
19829  /* "cfemIntegrals.pyx":3980
19830  * np.ndarray w_dS,
19831  * np.ndarray jac):
19832  * if w_dS.ndim > 3: # <<<<<<<<<<<<<<
19833  * cupdateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_dense(<int *>elementNeighbors.data,
19834  * nElements_global,
19835  */
19836  goto __pyx_L3;
19837  }
19838 
19839  /* "cfemIntegrals.pyx":4006
19840  * <double*>jac.data)
19841  * else:
19842  * cupdateGlobalJacobianFromGlobalExteriorElementBoundaryFluxJacobian_eb_dense(<int*> elementNeighbors.data, # <<<<<<<<<<<<<<
19843  * nElements_global,
19844  * exteriorElementBoundaries.shape[0],
19845  */
19846  /*else*/ {
19847 
19848  /* "cfemIntegrals.pyx":4029
19849  * <double*> elementBoundaryFluxJacobian_eb.data,
19850  * <double*> w_dS.data,
19851  * <double*> jac.data) # <<<<<<<<<<<<<<
19852  * def updateGlobalJacobianFromElementJacobian_CSR(np.ndarray nFreeDOF_element_r,
19853  * np.ndarray freeLocal_r,
19854  */
19855  updateGlobalJacobianFromGlobalExteriorElementBoundaryFluxJacobian_eb_dense(((int *)__pyx_v_elementNeighbors->data), __pyx_v_nElements_global, (__pyx_v_exteriorElementBoundaries->dimensions[0]), (__pyx_v_elementBoundaryFluxJacobian_eb->dimensions[2]), (__pyx_v_w_dS->dimensions[1]), (__pyx_v_w_dS->dimensions[2]), (__pyx_v_elementBoundaryFluxJacobian_eb->dimensions[4]), __pyx_v_offset_r, __pyx_v_stride_r, __pyx_v_offset_u, __pyx_v_stride_u, __pyx_v_nFreeVDOF_global, ((int *)__pyx_v_exteriorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), ((int *)__pyx_v_nFreeDOF_element_r->data), ((int *)__pyx_v_freeLocal_r->data), ((int *)__pyx_v_freeGlobal_r->data), ((int *)__pyx_v_nFreeDOF_element_u->data), ((int *)__pyx_v_freeLocal_u->data), ((int *)__pyx_v_freeGlobal_u->data), ((double *)__pyx_v_elementBoundaryFluxJacobian_eb->data), ((double *)__pyx_v_w_dS->data), ((double *)__pyx_v_jac->data));
19856  }
19857  __pyx_L3:;
19858 
19859  /* "cfemIntegrals.pyx":3956
19860  * <double*> w_dS.data,
19861  * <double*> jac.data)
19862  * def updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_dense(np.ndarray elementNeighbors, # <<<<<<<<<<<<<<
19863  * int nElements_global,
19864  * int nExteriorElementBoundaries_global,
19865  */
19866 
19867  /* function exit code */
19868  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
19869  __Pyx_XGIVEREF(__pyx_r);
19870  __Pyx_RefNannyFinishContext();
19871  return __pyx_r;
19872 }
19873 
19874 /* "cfemIntegrals.pyx":4030
19875  * <double*> w_dS.data,
19876  * <double*> jac.data)
19877  * def updateGlobalJacobianFromElementJacobian_CSR(np.ndarray nFreeDOF_element_r, # <<<<<<<<<<<<<<
19878  * np.ndarray freeLocal_r,
19879  * np.ndarray nFreeDOF_element_u,
19880  */
19881 
19882 /* Python wrapper */
19883 static PyObject *__pyx_pw_13cfemIntegrals_171updateGlobalJacobianFromElementJacobian_CSR(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
19884 static PyMethodDef __pyx_mdef_13cfemIntegrals_171updateGlobalJacobianFromElementJacobian_CSR = {"updateGlobalJacobianFromElementJacobian_CSR", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_171updateGlobalJacobianFromElementJacobian_CSR, METH_VARARGS|METH_KEYWORDS, 0};
19885 static PyObject *__pyx_pw_13cfemIntegrals_171updateGlobalJacobianFromElementJacobian_CSR(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
19886  PyArrayObject *__pyx_v_nFreeDOF_element_r = 0;
19887  PyArrayObject *__pyx_v_freeLocal_r = 0;
19888  PyArrayObject *__pyx_v_nFreeDOF_element_u = 0;
19889  PyArrayObject *__pyx_v_freeLocal_u = 0;
19890  PyArrayObject *__pyx_v_csrRowIndeces_ru = 0;
19891  PyArrayObject *__pyx_v_csrColumnOffsets_ru = 0;
19892  PyArrayObject *__pyx_v_elementJacobian = 0;
19893  PyObject *__pyx_v_globalJacobian = 0;
19894  int __pyx_lineno = 0;
19895  const char *__pyx_filename = NULL;
19896  int __pyx_clineno = 0;
19897  PyObject *__pyx_r = 0;
19898  __Pyx_RefNannyDeclarations
19899  __Pyx_RefNannySetupContext("updateGlobalJacobianFromElementJacobian_CSR (wrapper)", 0);
19900  {
19901  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nFreeDOF_element_r,&__pyx_n_s_freeLocal_r,&__pyx_n_s_nFreeDOF_element_u,&__pyx_n_s_freeLocal_u,&__pyx_n_s_csrRowIndeces_ru,&__pyx_n_s_csrColumnOffsets_ru,&__pyx_n_s_elementJacobian,&__pyx_n_s_globalJacobian,0};
19902  PyObject* values[8] = {0,0,0,0,0,0,0,0};
19903  if (unlikely(__pyx_kwds)) {
19904  Py_ssize_t kw_args;
19905  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
19906  switch (pos_args) {
19907  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
19908  CYTHON_FALLTHROUGH;
19909  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
19910  CYTHON_FALLTHROUGH;
19911  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
19912  CYTHON_FALLTHROUGH;
19913  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
19914  CYTHON_FALLTHROUGH;
19915  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
19916  CYTHON_FALLTHROUGH;
19917  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
19918  CYTHON_FALLTHROUGH;
19919  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
19920  CYTHON_FALLTHROUGH;
19921  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
19922  CYTHON_FALLTHROUGH;
19923  case 0: break;
19924  default: goto __pyx_L5_argtuple_error;
19925  }
19926  kw_args = PyDict_Size(__pyx_kwds);
19927  switch (pos_args) {
19928  case 0:
19929  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeDOF_element_r)) != 0)) kw_args--;
19930  else goto __pyx_L5_argtuple_error;
19931  CYTHON_FALLTHROUGH;
19932  case 1:
19933  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeLocal_r)) != 0)) kw_args--;
19934  else {
19935  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromElementJacobian_CSR", 1, 8, 8, 1); __PYX_ERR(0, 4030, __pyx_L3_error)
19936  }
19937  CYTHON_FALLTHROUGH;
19938  case 2:
19939  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeDOF_element_u)) != 0)) kw_args--;
19940  else {
19941  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromElementJacobian_CSR", 1, 8, 8, 2); __PYX_ERR(0, 4030, __pyx_L3_error)
19942  }
19943  CYTHON_FALLTHROUGH;
19944  case 3:
19945  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeLocal_u)) != 0)) kw_args--;
19946  else {
19947  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromElementJacobian_CSR", 1, 8, 8, 3); __PYX_ERR(0, 4030, __pyx_L3_error)
19948  }
19949  CYTHON_FALLTHROUGH;
19950  case 4:
19951  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_csrRowIndeces_ru)) != 0)) kw_args--;
19952  else {
19953  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromElementJacobian_CSR", 1, 8, 8, 4); __PYX_ERR(0, 4030, __pyx_L3_error)
19954  }
19955  CYTHON_FALLTHROUGH;
19956  case 5:
19957  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_csrColumnOffsets_ru)) != 0)) kw_args--;
19958  else {
19959  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromElementJacobian_CSR", 1, 8, 8, 5); __PYX_ERR(0, 4030, __pyx_L3_error)
19960  }
19961  CYTHON_FALLTHROUGH;
19962  case 6:
19963  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementJacobian)) != 0)) kw_args--;
19964  else {
19965  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromElementJacobian_CSR", 1, 8, 8, 6); __PYX_ERR(0, 4030, __pyx_L3_error)
19966  }
19967  CYTHON_FALLTHROUGH;
19968  case 7:
19969  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_globalJacobian)) != 0)) kw_args--;
19970  else {
19971  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromElementJacobian_CSR", 1, 8, 8, 7); __PYX_ERR(0, 4030, __pyx_L3_error)
19972  }
19973  }
19974  if (unlikely(kw_args > 0)) {
19975  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateGlobalJacobianFromElementJacobian_CSR") < 0)) __PYX_ERR(0, 4030, __pyx_L3_error)
19976  }
19977  } else if (PyTuple_GET_SIZE(__pyx_args) != 8) {
19978  goto __pyx_L5_argtuple_error;
19979  } else {
19980  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
19981  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
19982  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
19983  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
19984  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
19985  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
19986  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
19987  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
19988  }
19989  __pyx_v_nFreeDOF_element_r = ((PyArrayObject *)values[0]);
19990  __pyx_v_freeLocal_r = ((PyArrayObject *)values[1]);
19991  __pyx_v_nFreeDOF_element_u = ((PyArrayObject *)values[2]);
19992  __pyx_v_freeLocal_u = ((PyArrayObject *)values[3]);
19993  __pyx_v_csrRowIndeces_ru = ((PyArrayObject *)values[4]);
19994  __pyx_v_csrColumnOffsets_ru = ((PyArrayObject *)values[5]);
19995  __pyx_v_elementJacobian = ((PyArrayObject *)values[6]);
19996  __pyx_v_globalJacobian = values[7];
19997  }
19998  goto __pyx_L4_argument_unpacking_done;
19999  __pyx_L5_argtuple_error:;
20000  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromElementJacobian_CSR", 1, 8, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4030, __pyx_L3_error)
20001  __pyx_L3_error:;
20002  __Pyx_AddTraceback("cfemIntegrals.updateGlobalJacobianFromElementJacobian_CSR", __pyx_clineno, __pyx_lineno, __pyx_filename);
20003  __Pyx_RefNannyFinishContext();
20004  return NULL;
20005  __pyx_L4_argument_unpacking_done:;
20006  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nFreeDOF_element_r), __pyx_ptype_5numpy_ndarray, 1, "nFreeDOF_element_r", 0))) __PYX_ERR(0, 4030, __pyx_L1_error)
20007  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeLocal_r), __pyx_ptype_5numpy_ndarray, 1, "freeLocal_r", 0))) __PYX_ERR(0, 4031, __pyx_L1_error)
20008  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nFreeDOF_element_u), __pyx_ptype_5numpy_ndarray, 1, "nFreeDOF_element_u", 0))) __PYX_ERR(0, 4032, __pyx_L1_error)
20009  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeLocal_u), __pyx_ptype_5numpy_ndarray, 1, "freeLocal_u", 0))) __PYX_ERR(0, 4033, __pyx_L1_error)
20010  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_csrRowIndeces_ru), __pyx_ptype_5numpy_ndarray, 1, "csrRowIndeces_ru", 0))) __PYX_ERR(0, 4034, __pyx_L1_error)
20011  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_csrColumnOffsets_ru), __pyx_ptype_5numpy_ndarray, 1, "csrColumnOffsets_ru", 0))) __PYX_ERR(0, 4035, __pyx_L1_error)
20012  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementJacobian), __pyx_ptype_5numpy_ndarray, 1, "elementJacobian", 0))) __PYX_ERR(0, 4036, __pyx_L1_error)
20013  __pyx_r = __pyx_pf_13cfemIntegrals_170updateGlobalJacobianFromElementJacobian_CSR(__pyx_self, __pyx_v_nFreeDOF_element_r, __pyx_v_freeLocal_r, __pyx_v_nFreeDOF_element_u, __pyx_v_freeLocal_u, __pyx_v_csrRowIndeces_ru, __pyx_v_csrColumnOffsets_ru, __pyx_v_elementJacobian, __pyx_v_globalJacobian);
20014 
20015  /* function exit code */
20016  goto __pyx_L0;
20017  __pyx_L1_error:;
20018  __pyx_r = NULL;
20019  __pyx_L0:;
20020  __Pyx_RefNannyFinishContext();
20021  return __pyx_r;
20022 }
20023 
20024 static PyObject *__pyx_pf_13cfemIntegrals_170updateGlobalJacobianFromElementJacobian_CSR(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_nFreeDOF_element_r, PyArrayObject *__pyx_v_freeLocal_r, PyArrayObject *__pyx_v_nFreeDOF_element_u, PyArrayObject *__pyx_v_freeLocal_u, PyArrayObject *__pyx_v_csrRowIndeces_ru, PyArrayObject *__pyx_v_csrColumnOffsets_ru, PyArrayObject *__pyx_v_elementJacobian, PyObject *__pyx_v_globalJacobian) {
20025  CYTHON_UNUSED PyArrayObject *__pyx_v_rowptr = 0;
20026  CYTHON_UNUSED PyArrayObject *__pyx_v_colind = 0;
20027  PyArrayObject *__pyx_v_globalJacobian_array = 0;
20028  int __pyx_v_nElements_global;
20029  int __pyx_v_nDOF_test_element;
20030  int __pyx_v_nDOF_trial_element;
20031  PyObject *__pyx_r = NULL;
20032  __Pyx_RefNannyDeclarations
20033  PyObject *__pyx_t_1 = NULL;
20034  PyObject *__pyx_t_2 = NULL;
20035  PyObject *__pyx_t_3 = NULL;
20036  PyObject *__pyx_t_4 = NULL;
20037  PyObject *__pyx_t_5 = NULL;
20038  PyObject *(*__pyx_t_6)(PyObject *);
20039  int __pyx_lineno = 0;
20040  const char *__pyx_filename = NULL;
20041  int __pyx_clineno = 0;
20042  __Pyx_RefNannySetupContext("updateGlobalJacobianFromElementJacobian_CSR", 0);
20043 
20044  /* "cfemIntegrals.pyx":4039
20045  * globalJacobian):
20046  * cdef np.ndarray rowptr, colind, globalJacobian_array
20047  * (rowptr,colind,globalJacobian_array) = globalJacobian.getCSRrepresentation() # <<<<<<<<<<<<<<
20048  * cdef int nElements_global = elementJacobian.shape[0]
20049  * cdef int nDOF_test_element = elementJacobian.shape[1]
20050  */
20051  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_globalJacobian, __pyx_n_s_getCSRrepresentation); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4039, __pyx_L1_error)
20052  __Pyx_GOTREF(__pyx_t_2);
20053  __pyx_t_3 = NULL;
20054  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
20055  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
20056  if (likely(__pyx_t_3)) {
20057  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
20058  __Pyx_INCREF(__pyx_t_3);
20059  __Pyx_INCREF(function);
20060  __Pyx_DECREF_SET(__pyx_t_2, function);
20061  }
20062  }
20063  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
20064  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
20065  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4039, __pyx_L1_error)
20066  __Pyx_GOTREF(__pyx_t_1);
20067  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20068  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
20069  PyObject* sequence = __pyx_t_1;
20070  Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
20071  if (unlikely(size != 3)) {
20072  if (size > 3) __Pyx_RaiseTooManyValuesError(3);
20073  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
20074  __PYX_ERR(0, 4039, __pyx_L1_error)
20075  }
20076  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
20077  if (likely(PyTuple_CheckExact(sequence))) {
20078  __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
20079  __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1);
20080  __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2);
20081  } else {
20082  __pyx_t_2 = PyList_GET_ITEM(sequence, 0);
20083  __pyx_t_3 = PyList_GET_ITEM(sequence, 1);
20084  __pyx_t_4 = PyList_GET_ITEM(sequence, 2);
20085  }
20086  __Pyx_INCREF(__pyx_t_2);
20087  __Pyx_INCREF(__pyx_t_3);
20088  __Pyx_INCREF(__pyx_t_4);
20089  #else
20090  __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4039, __pyx_L1_error)
20091  __Pyx_GOTREF(__pyx_t_2);
20092  __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4039, __pyx_L1_error)
20093  __Pyx_GOTREF(__pyx_t_3);
20094  __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4039, __pyx_L1_error)
20095  __Pyx_GOTREF(__pyx_t_4);
20096  #endif
20097  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20098  } else {
20099  Py_ssize_t index = -1;
20100  __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4039, __pyx_L1_error)
20101  __Pyx_GOTREF(__pyx_t_5);
20102  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20103  __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext;
20104  index = 0; __pyx_t_2 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
20105  __Pyx_GOTREF(__pyx_t_2);
20106  index = 1; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
20107  __Pyx_GOTREF(__pyx_t_3);
20108  index = 2; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed;
20109  __Pyx_GOTREF(__pyx_t_4);
20110  if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 3) < 0) __PYX_ERR(0, 4039, __pyx_L1_error)
20111  __pyx_t_6 = NULL;
20112  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
20113  goto __pyx_L4_unpacking_done;
20114  __pyx_L3_unpacking_failed:;
20115  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
20116  __pyx_t_6 = NULL;
20117  if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
20118  __PYX_ERR(0, 4039, __pyx_L1_error)
20119  __pyx_L4_unpacking_done:;
20120  }
20121  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4039, __pyx_L1_error)
20122  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4039, __pyx_L1_error)
20123  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4039, __pyx_L1_error)
20124  __pyx_v_rowptr = ((PyArrayObject *)__pyx_t_2);
20125  __pyx_t_2 = 0;
20126  __pyx_v_colind = ((PyArrayObject *)__pyx_t_3);
20127  __pyx_t_3 = 0;
20128  __pyx_v_globalJacobian_array = ((PyArrayObject *)__pyx_t_4);
20129  __pyx_t_4 = 0;
20130 
20131  /* "cfemIntegrals.pyx":4040
20132  * cdef np.ndarray rowptr, colind, globalJacobian_array
20133  * (rowptr,colind,globalJacobian_array) = globalJacobian.getCSRrepresentation()
20134  * cdef int nElements_global = elementJacobian.shape[0] # <<<<<<<<<<<<<<
20135  * cdef int nDOF_test_element = elementJacobian.shape[1]
20136  * cdef int nDOF_trial_element = elementJacobian.shape[2]
20137  */
20138  __pyx_v_nElements_global = (__pyx_v_elementJacobian->dimensions[0]);
20139 
20140  /* "cfemIntegrals.pyx":4041
20141  * (rowptr,colind,globalJacobian_array) = globalJacobian.getCSRrepresentation()
20142  * cdef int nElements_global = elementJacobian.shape[0]
20143  * cdef int nDOF_test_element = elementJacobian.shape[1] # <<<<<<<<<<<<<<
20144  * cdef int nDOF_trial_element = elementJacobian.shape[2]
20145  * cupdateGlobalJacobianFromElementJacobian_CSR(nElements_global,
20146  */
20147  __pyx_v_nDOF_test_element = (__pyx_v_elementJacobian->dimensions[1]);
20148 
20149  /* "cfemIntegrals.pyx":4042
20150  * cdef int nElements_global = elementJacobian.shape[0]
20151  * cdef int nDOF_test_element = elementJacobian.shape[1]
20152  * cdef int nDOF_trial_element = elementJacobian.shape[2] # <<<<<<<<<<<<<<
20153  * cupdateGlobalJacobianFromElementJacobian_CSR(nElements_global,
20154  * nDOF_test_element,
20155  */
20156  __pyx_v_nDOF_trial_element = (__pyx_v_elementJacobian->dimensions[2]);
20157 
20158  /* "cfemIntegrals.pyx":4043
20159  * cdef int nDOF_test_element = elementJacobian.shape[1]
20160  * cdef int nDOF_trial_element = elementJacobian.shape[2]
20161  * cupdateGlobalJacobianFromElementJacobian_CSR(nElements_global, # <<<<<<<<<<<<<<
20162  * nDOF_test_element,
20163  * nDOF_trial_element,
20164  */
20165  updateGlobalJacobianFromElementJacobian_CSR(__pyx_v_nElements_global, __pyx_v_nDOF_test_element, __pyx_v_nDOF_trial_element, ((int *)__pyx_v_nFreeDOF_element_r->data), ((int *)__pyx_v_freeLocal_r->data), ((int *)__pyx_v_nFreeDOF_element_u->data), ((int *)__pyx_v_freeLocal_u->data), ((int *)__pyx_v_csrRowIndeces_ru->data), ((int *)__pyx_v_csrColumnOffsets_ru->data), ((double *)__pyx_v_elementJacobian->data), ((double *)__pyx_v_globalJacobian_array->data));
20166 
20167  /* "cfemIntegrals.pyx":4030
20168  * <double*> w_dS.data,
20169  * <double*> jac.data)
20170  * def updateGlobalJacobianFromElementJacobian_CSR(np.ndarray nFreeDOF_element_r, # <<<<<<<<<<<<<<
20171  * np.ndarray freeLocal_r,
20172  * np.ndarray nFreeDOF_element_u,
20173  */
20174 
20175  /* function exit code */
20176  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
20177  goto __pyx_L0;
20178  __pyx_L1_error:;
20179  __Pyx_XDECREF(__pyx_t_1);
20180  __Pyx_XDECREF(__pyx_t_2);
20181  __Pyx_XDECREF(__pyx_t_3);
20182  __Pyx_XDECREF(__pyx_t_4);
20183  __Pyx_XDECREF(__pyx_t_5);
20184  __Pyx_AddTraceback("cfemIntegrals.updateGlobalJacobianFromElementJacobian_CSR", __pyx_clineno, __pyx_lineno, __pyx_filename);
20185  __pyx_r = NULL;
20186  __pyx_L0:;
20187  __Pyx_XDECREF((PyObject *)__pyx_v_rowptr);
20188  __Pyx_XDECREF((PyObject *)__pyx_v_colind);
20189  __Pyx_XDECREF((PyObject *)__pyx_v_globalJacobian_array);
20190  __Pyx_XGIVEREF(__pyx_r);
20191  __Pyx_RefNannyFinishContext();
20192  return __pyx_r;
20193 }
20194 
20195 /* "cfemIntegrals.pyx":4054
20196  * <double*>elementJacobian.data,
20197  * <double*>globalJacobian_array.data)
20198  * def updateGlobalJacobianFromElementJacobian_eb_CSR(np.ndarray elementNeighbors, # <<<<<<<<<<<<<<
20199  * np.ndarray nFreeDOF_element_r,
20200  * np.ndarray freeLocal_r,
20201  */
20202 
20203 /* Python wrapper */
20204 static PyObject *__pyx_pw_13cfemIntegrals_173updateGlobalJacobianFromElementJacobian_eb_CSR(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
20205 static PyMethodDef __pyx_mdef_13cfemIntegrals_173updateGlobalJacobianFromElementJacobian_eb_CSR = {"updateGlobalJacobianFromElementJacobian_eb_CSR", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_173updateGlobalJacobianFromElementJacobian_eb_CSR, METH_VARARGS|METH_KEYWORDS, 0};
20206 static PyObject *__pyx_pw_13cfemIntegrals_173updateGlobalJacobianFromElementJacobian_eb_CSR(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
20207  PyArrayObject *__pyx_v_elementNeighbors = 0;
20208  PyArrayObject *__pyx_v_nFreeDOF_element_r = 0;
20209  PyArrayObject *__pyx_v_freeLocal_r = 0;
20210  PyArrayObject *__pyx_v_nFreeDOF_element_u = 0;
20211  PyArrayObject *__pyx_v_freeLocal_u = 0;
20212  PyArrayObject *__pyx_v_csrRowIndeces_ru = 0;
20213  PyArrayObject *__pyx_v_csrColumnOffsets_eb_ru = 0;
20214  PyArrayObject *__pyx_v_elementJacobian_eb = 0;
20215  PyObject *__pyx_v_globalJacobian = 0;
20216  int __pyx_lineno = 0;
20217  const char *__pyx_filename = NULL;
20218  int __pyx_clineno = 0;
20219  PyObject *__pyx_r = 0;
20220  __Pyx_RefNannyDeclarations
20221  __Pyx_RefNannySetupContext("updateGlobalJacobianFromElementJacobian_eb_CSR (wrapper)", 0);
20222  {
20223  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_elementNeighbors,&__pyx_n_s_nFreeDOF_element_r,&__pyx_n_s_freeLocal_r,&__pyx_n_s_nFreeDOF_element_u,&__pyx_n_s_freeLocal_u,&__pyx_n_s_csrRowIndeces_ru,&__pyx_n_s_csrColumnOffsets_eb_ru,&__pyx_n_s_elementJacobian_eb,&__pyx_n_s_globalJacobian,0};
20224  PyObject* values[9] = {0,0,0,0,0,0,0,0,0};
20225  if (unlikely(__pyx_kwds)) {
20226  Py_ssize_t kw_args;
20227  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
20228  switch (pos_args) {
20229  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
20230  CYTHON_FALLTHROUGH;
20231  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
20232  CYTHON_FALLTHROUGH;
20233  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
20234  CYTHON_FALLTHROUGH;
20235  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
20236  CYTHON_FALLTHROUGH;
20237  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
20238  CYTHON_FALLTHROUGH;
20239  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
20240  CYTHON_FALLTHROUGH;
20241  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
20242  CYTHON_FALLTHROUGH;
20243  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
20244  CYTHON_FALLTHROUGH;
20245  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
20246  CYTHON_FALLTHROUGH;
20247  case 0: break;
20248  default: goto __pyx_L5_argtuple_error;
20249  }
20250  kw_args = PyDict_Size(__pyx_kwds);
20251  switch (pos_args) {
20252  case 0:
20253  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementNeighbors)) != 0)) kw_args--;
20254  else goto __pyx_L5_argtuple_error;
20255  CYTHON_FALLTHROUGH;
20256  case 1:
20257  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeDOF_element_r)) != 0)) kw_args--;
20258  else {
20259  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromElementJacobian_eb_CSR", 1, 9, 9, 1); __PYX_ERR(0, 4054, __pyx_L3_error)
20260  }
20261  CYTHON_FALLTHROUGH;
20262  case 2:
20263  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeLocal_r)) != 0)) kw_args--;
20264  else {
20265  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromElementJacobian_eb_CSR", 1, 9, 9, 2); __PYX_ERR(0, 4054, __pyx_L3_error)
20266  }
20267  CYTHON_FALLTHROUGH;
20268  case 3:
20269  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeDOF_element_u)) != 0)) kw_args--;
20270  else {
20271  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromElementJacobian_eb_CSR", 1, 9, 9, 3); __PYX_ERR(0, 4054, __pyx_L3_error)
20272  }
20273  CYTHON_FALLTHROUGH;
20274  case 4:
20275  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeLocal_u)) != 0)) kw_args--;
20276  else {
20277  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromElementJacobian_eb_CSR", 1, 9, 9, 4); __PYX_ERR(0, 4054, __pyx_L3_error)
20278  }
20279  CYTHON_FALLTHROUGH;
20280  case 5:
20281  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_csrRowIndeces_ru)) != 0)) kw_args--;
20282  else {
20283  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromElementJacobian_eb_CSR", 1, 9, 9, 5); __PYX_ERR(0, 4054, __pyx_L3_error)
20284  }
20285  CYTHON_FALLTHROUGH;
20286  case 6:
20287  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_csrColumnOffsets_eb_ru)) != 0)) kw_args--;
20288  else {
20289  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromElementJacobian_eb_CSR", 1, 9, 9, 6); __PYX_ERR(0, 4054, __pyx_L3_error)
20290  }
20291  CYTHON_FALLTHROUGH;
20292  case 7:
20293  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementJacobian_eb)) != 0)) kw_args--;
20294  else {
20295  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromElementJacobian_eb_CSR", 1, 9, 9, 7); __PYX_ERR(0, 4054, __pyx_L3_error)
20296  }
20297  CYTHON_FALLTHROUGH;
20298  case 8:
20299  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_globalJacobian)) != 0)) kw_args--;
20300  else {
20301  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromElementJacobian_eb_CSR", 1, 9, 9, 8); __PYX_ERR(0, 4054, __pyx_L3_error)
20302  }
20303  }
20304  if (unlikely(kw_args > 0)) {
20305  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateGlobalJacobianFromElementJacobian_eb_CSR") < 0)) __PYX_ERR(0, 4054, __pyx_L3_error)
20306  }
20307  } else if (PyTuple_GET_SIZE(__pyx_args) != 9) {
20308  goto __pyx_L5_argtuple_error;
20309  } else {
20310  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
20311  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
20312  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
20313  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
20314  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
20315  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
20316  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
20317  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
20318  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
20319  }
20320  __pyx_v_elementNeighbors = ((PyArrayObject *)values[0]);
20321  __pyx_v_nFreeDOF_element_r = ((PyArrayObject *)values[1]);
20322  __pyx_v_freeLocal_r = ((PyArrayObject *)values[2]);
20323  __pyx_v_nFreeDOF_element_u = ((PyArrayObject *)values[3]);
20324  __pyx_v_freeLocal_u = ((PyArrayObject *)values[4]);
20325  __pyx_v_csrRowIndeces_ru = ((PyArrayObject *)values[5]);
20326  __pyx_v_csrColumnOffsets_eb_ru = ((PyArrayObject *)values[6]);
20327  __pyx_v_elementJacobian_eb = ((PyArrayObject *)values[7]);
20328  __pyx_v_globalJacobian = values[8];
20329  }
20330  goto __pyx_L4_argument_unpacking_done;
20331  __pyx_L5_argtuple_error:;
20332  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromElementJacobian_eb_CSR", 1, 9, 9, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4054, __pyx_L3_error)
20333  __pyx_L3_error:;
20334  __Pyx_AddTraceback("cfemIntegrals.updateGlobalJacobianFromElementJacobian_eb_CSR", __pyx_clineno, __pyx_lineno, __pyx_filename);
20335  __Pyx_RefNannyFinishContext();
20336  return NULL;
20337  __pyx_L4_argument_unpacking_done:;
20338  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNeighbors), __pyx_ptype_5numpy_ndarray, 1, "elementNeighbors", 0))) __PYX_ERR(0, 4054, __pyx_L1_error)
20339  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nFreeDOF_element_r), __pyx_ptype_5numpy_ndarray, 1, "nFreeDOF_element_r", 0))) __PYX_ERR(0, 4055, __pyx_L1_error)
20340  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeLocal_r), __pyx_ptype_5numpy_ndarray, 1, "freeLocal_r", 0))) __PYX_ERR(0, 4056, __pyx_L1_error)
20341  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nFreeDOF_element_u), __pyx_ptype_5numpy_ndarray, 1, "nFreeDOF_element_u", 0))) __PYX_ERR(0, 4057, __pyx_L1_error)
20342  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeLocal_u), __pyx_ptype_5numpy_ndarray, 1, "freeLocal_u", 0))) __PYX_ERR(0, 4058, __pyx_L1_error)
20343  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_csrRowIndeces_ru), __pyx_ptype_5numpy_ndarray, 1, "csrRowIndeces_ru", 0))) __PYX_ERR(0, 4059, __pyx_L1_error)
20344  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_csrColumnOffsets_eb_ru), __pyx_ptype_5numpy_ndarray, 1, "csrColumnOffsets_eb_ru", 0))) __PYX_ERR(0, 4060, __pyx_L1_error)
20345  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementJacobian_eb), __pyx_ptype_5numpy_ndarray, 1, "elementJacobian_eb", 0))) __PYX_ERR(0, 4061, __pyx_L1_error)
20346  __pyx_r = __pyx_pf_13cfemIntegrals_172updateGlobalJacobianFromElementJacobian_eb_CSR(__pyx_self, __pyx_v_elementNeighbors, __pyx_v_nFreeDOF_element_r, __pyx_v_freeLocal_r, __pyx_v_nFreeDOF_element_u, __pyx_v_freeLocal_u, __pyx_v_csrRowIndeces_ru, __pyx_v_csrColumnOffsets_eb_ru, __pyx_v_elementJacobian_eb, __pyx_v_globalJacobian);
20347 
20348  /* function exit code */
20349  goto __pyx_L0;
20350  __pyx_L1_error:;
20351  __pyx_r = NULL;
20352  __pyx_L0:;
20353  __Pyx_RefNannyFinishContext();
20354  return __pyx_r;
20355 }
20356 
20357 static PyObject *__pyx_pf_13cfemIntegrals_172updateGlobalJacobianFromElementJacobian_eb_CSR(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementNeighbors, PyArrayObject *__pyx_v_nFreeDOF_element_r, PyArrayObject *__pyx_v_freeLocal_r, PyArrayObject *__pyx_v_nFreeDOF_element_u, PyArrayObject *__pyx_v_freeLocal_u, PyArrayObject *__pyx_v_csrRowIndeces_ru, PyArrayObject *__pyx_v_csrColumnOffsets_eb_ru, PyArrayObject *__pyx_v_elementJacobian_eb, PyObject *__pyx_v_globalJacobian) {
20358  CYTHON_UNUSED PyArrayObject *__pyx_v_rowptr = 0;
20359  CYTHON_UNUSED PyArrayObject *__pyx_v_colind = 0;
20360  PyArrayObject *__pyx_v_globalJacobian_array = 0;
20361  int __pyx_v_nElements_global;
20362  int __pyx_v_nElementBoundaries_element;
20363  int __pyx_v_nDOF_test_element;
20364  int __pyx_v_nDOF_trial_element;
20365  PyObject *__pyx_r = NULL;
20366  __Pyx_RefNannyDeclarations
20367  PyObject *__pyx_t_1 = NULL;
20368  PyObject *__pyx_t_2 = NULL;
20369  PyObject *__pyx_t_3 = NULL;
20370  PyObject *__pyx_t_4 = NULL;
20371  PyObject *__pyx_t_5 = NULL;
20372  PyObject *(*__pyx_t_6)(PyObject *);
20373  int __pyx_lineno = 0;
20374  const char *__pyx_filename = NULL;
20375  int __pyx_clineno = 0;
20376  __Pyx_RefNannySetupContext("updateGlobalJacobianFromElementJacobian_eb_CSR", 0);
20377 
20378  /* "cfemIntegrals.pyx":4064
20379  * globalJacobian):
20380  * cdef np.ndarray rowptr, colind, globalJacobian_array
20381  * (rowptr,colind,globalJacobian_array) = globalJacobian.getCSRrepresentation() # <<<<<<<<<<<<<<
20382  * cdef int nElements_global = elementJacobian_eb.shape[0]
20383  * cdef int nElementBoundaries_element = elementJacobian_eb.shape[1]
20384  */
20385  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_globalJacobian, __pyx_n_s_getCSRrepresentation); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4064, __pyx_L1_error)
20386  __Pyx_GOTREF(__pyx_t_2);
20387  __pyx_t_3 = NULL;
20388  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
20389  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
20390  if (likely(__pyx_t_3)) {
20391  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
20392  __Pyx_INCREF(__pyx_t_3);
20393  __Pyx_INCREF(function);
20394  __Pyx_DECREF_SET(__pyx_t_2, function);
20395  }
20396  }
20397  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
20398  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
20399  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4064, __pyx_L1_error)
20400  __Pyx_GOTREF(__pyx_t_1);
20401  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20402  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
20403  PyObject* sequence = __pyx_t_1;
20404  Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
20405  if (unlikely(size != 3)) {
20406  if (size > 3) __Pyx_RaiseTooManyValuesError(3);
20407  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
20408  __PYX_ERR(0, 4064, __pyx_L1_error)
20409  }
20410  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
20411  if (likely(PyTuple_CheckExact(sequence))) {
20412  __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
20413  __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1);
20414  __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2);
20415  } else {
20416  __pyx_t_2 = PyList_GET_ITEM(sequence, 0);
20417  __pyx_t_3 = PyList_GET_ITEM(sequence, 1);
20418  __pyx_t_4 = PyList_GET_ITEM(sequence, 2);
20419  }
20420  __Pyx_INCREF(__pyx_t_2);
20421  __Pyx_INCREF(__pyx_t_3);
20422  __Pyx_INCREF(__pyx_t_4);
20423  #else
20424  __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4064, __pyx_L1_error)
20425  __Pyx_GOTREF(__pyx_t_2);
20426  __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4064, __pyx_L1_error)
20427  __Pyx_GOTREF(__pyx_t_3);
20428  __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4064, __pyx_L1_error)
20429  __Pyx_GOTREF(__pyx_t_4);
20430  #endif
20431  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20432  } else {
20433  Py_ssize_t index = -1;
20434  __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4064, __pyx_L1_error)
20435  __Pyx_GOTREF(__pyx_t_5);
20436  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20437  __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext;
20438  index = 0; __pyx_t_2 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
20439  __Pyx_GOTREF(__pyx_t_2);
20440  index = 1; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
20441  __Pyx_GOTREF(__pyx_t_3);
20442  index = 2; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed;
20443  __Pyx_GOTREF(__pyx_t_4);
20444  if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 3) < 0) __PYX_ERR(0, 4064, __pyx_L1_error)
20445  __pyx_t_6 = NULL;
20446  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
20447  goto __pyx_L4_unpacking_done;
20448  __pyx_L3_unpacking_failed:;
20449  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
20450  __pyx_t_6 = NULL;
20451  if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
20452  __PYX_ERR(0, 4064, __pyx_L1_error)
20453  __pyx_L4_unpacking_done:;
20454  }
20455  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4064, __pyx_L1_error)
20456  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4064, __pyx_L1_error)
20457  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4064, __pyx_L1_error)
20458  __pyx_v_rowptr = ((PyArrayObject *)__pyx_t_2);
20459  __pyx_t_2 = 0;
20460  __pyx_v_colind = ((PyArrayObject *)__pyx_t_3);
20461  __pyx_t_3 = 0;
20462  __pyx_v_globalJacobian_array = ((PyArrayObject *)__pyx_t_4);
20463  __pyx_t_4 = 0;
20464 
20465  /* "cfemIntegrals.pyx":4065
20466  * cdef np.ndarray rowptr, colind, globalJacobian_array
20467  * (rowptr,colind,globalJacobian_array) = globalJacobian.getCSRrepresentation()
20468  * cdef int nElements_global = elementJacobian_eb.shape[0] # <<<<<<<<<<<<<<
20469  * cdef int nElementBoundaries_element = elementJacobian_eb.shape[1]
20470  * cdef int nDOF_test_element = elementJacobian_eb.shape[2]
20471  */
20472  __pyx_v_nElements_global = (__pyx_v_elementJacobian_eb->dimensions[0]);
20473 
20474  /* "cfemIntegrals.pyx":4066
20475  * (rowptr,colind,globalJacobian_array) = globalJacobian.getCSRrepresentation()
20476  * cdef int nElements_global = elementJacobian_eb.shape[0]
20477  * cdef int nElementBoundaries_element = elementJacobian_eb.shape[1] # <<<<<<<<<<<<<<
20478  * cdef int nDOF_test_element = elementJacobian_eb.shape[2]
20479  * cdef int nDOF_trial_element = elementJacobian_eb.shape[3]
20480  */
20481  __pyx_v_nElementBoundaries_element = (__pyx_v_elementJacobian_eb->dimensions[1]);
20482 
20483  /* "cfemIntegrals.pyx":4067
20484  * cdef int nElements_global = elementJacobian_eb.shape[0]
20485  * cdef int nElementBoundaries_element = elementJacobian_eb.shape[1]
20486  * cdef int nDOF_test_element = elementJacobian_eb.shape[2] # <<<<<<<<<<<<<<
20487  * cdef int nDOF_trial_element = elementJacobian_eb.shape[3]
20488  * cupdateGlobalJacobianFromElementJacobian_eb_CSR(<int *>elementNeighbors.data,
20489  */
20490  __pyx_v_nDOF_test_element = (__pyx_v_elementJacobian_eb->dimensions[2]);
20491 
20492  /* "cfemIntegrals.pyx":4068
20493  * cdef int nElementBoundaries_element = elementJacobian_eb.shape[1]
20494  * cdef int nDOF_test_element = elementJacobian_eb.shape[2]
20495  * cdef int nDOF_trial_element = elementJacobian_eb.shape[3] # <<<<<<<<<<<<<<
20496  * cupdateGlobalJacobianFromElementJacobian_eb_CSR(<int *>elementNeighbors.data,
20497  * nElements_global,
20498  */
20499  __pyx_v_nDOF_trial_element = (__pyx_v_elementJacobian_eb->dimensions[3]);
20500 
20501  /* "cfemIntegrals.pyx":4069
20502  * cdef int nDOF_test_element = elementJacobian_eb.shape[2]
20503  * cdef int nDOF_trial_element = elementJacobian_eb.shape[3]
20504  * cupdateGlobalJacobianFromElementJacobian_eb_CSR(<int *>elementNeighbors.data, # <<<<<<<<<<<<<<
20505  * nElements_global,
20506  * nElementBoundaries_element,
20507  */
20508  updateGlobalJacobianFromElementJacobian_eb_CSR(((int *)__pyx_v_elementNeighbors->data), __pyx_v_nElements_global, __pyx_v_nElementBoundaries_element, __pyx_v_nDOF_test_element, __pyx_v_nDOF_trial_element, ((int *)__pyx_v_nFreeDOF_element_r->data), ((int *)__pyx_v_freeLocal_r->data), ((int *)__pyx_v_nFreeDOF_element_u->data), ((int *)__pyx_v_freeLocal_u->data), ((int *)__pyx_v_csrRowIndeces_ru->data), ((int *)__pyx_v_csrColumnOffsets_eb_ru->data), ((double *)__pyx_v_elementJacobian_eb->data), ((double *)__pyx_v_globalJacobian_array->data));
20509 
20510  /* "cfemIntegrals.pyx":4054
20511  * <double*>elementJacobian.data,
20512  * <double*>globalJacobian_array.data)
20513  * def updateGlobalJacobianFromElementJacobian_eb_CSR(np.ndarray elementNeighbors, # <<<<<<<<<<<<<<
20514  * np.ndarray nFreeDOF_element_r,
20515  * np.ndarray freeLocal_r,
20516  */
20517 
20518  /* function exit code */
20519  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
20520  goto __pyx_L0;
20521  __pyx_L1_error:;
20522  __Pyx_XDECREF(__pyx_t_1);
20523  __Pyx_XDECREF(__pyx_t_2);
20524  __Pyx_XDECREF(__pyx_t_3);
20525  __Pyx_XDECREF(__pyx_t_4);
20526  __Pyx_XDECREF(__pyx_t_5);
20527  __Pyx_AddTraceback("cfemIntegrals.updateGlobalJacobianFromElementJacobian_eb_CSR", __pyx_clineno, __pyx_lineno, __pyx_filename);
20528  __pyx_r = NULL;
20529  __pyx_L0:;
20530  __Pyx_XDECREF((PyObject *)__pyx_v_rowptr);
20531  __Pyx_XDECREF((PyObject *)__pyx_v_colind);
20532  __Pyx_XDECREF((PyObject *)__pyx_v_globalJacobian_array);
20533  __Pyx_XGIVEREF(__pyx_r);
20534  __Pyx_RefNannyFinishContext();
20535  return __pyx_r;
20536 }
20537 
20538 /* "cfemIntegrals.pyx":4082
20539  * <double*>elementJacobian_eb.data,
20540  * <double*>globalJacobian_array.data)
20541  * def updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_CSR(np.ndarray interiorElementBoundaries, # <<<<<<<<<<<<<<
20542  * np.ndarray elementBoundaryElements,
20543  * np.ndarray elementBoundaryLocalElementBoundaries,
20544  */
20545 
20546 /* Python wrapper */
20547 static PyObject *__pyx_pw_13cfemIntegrals_175updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_CSR(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
20548 static PyMethodDef __pyx_mdef_13cfemIntegrals_175updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_CSR = {"updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_CSR", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_175updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_CSR, METH_VARARGS|METH_KEYWORDS, 0};
20549 static PyObject *__pyx_pw_13cfemIntegrals_175updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_CSR(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
20550  PyArrayObject *__pyx_v_interiorElementBoundaries = 0;
20551  PyArrayObject *__pyx_v_elementBoundaryElements = 0;
20552  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries = 0;
20553  PyArrayObject *__pyx_v_nFreeDOF_element_r = 0;
20554  PyArrayObject *__pyx_v_freeLocal_r = 0;
20555  PyArrayObject *__pyx_v_nFreeDOF_element_u = 0;
20556  PyArrayObject *__pyx_v_freeLocal_u = 0;
20557  PyArrayObject *__pyx_v_csrRowIndeces_ru = 0;
20558  PyArrayObject *__pyx_v_csrColumnOffsets_eb_ru = 0;
20559  PyArrayObject *__pyx_v_elementBoundaryFluxJacobian = 0;
20560  PyArrayObject *__pyx_v_w_dS = 0;
20561  PyObject *__pyx_v_jac = 0;
20562  int __pyx_lineno = 0;
20563  const char *__pyx_filename = NULL;
20564  int __pyx_clineno = 0;
20565  PyObject *__pyx_r = 0;
20566  __Pyx_RefNannyDeclarations
20567  __Pyx_RefNannySetupContext("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_CSR (wrapper)", 0);
20568  {
20569  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_interiorElementBoundaries,&__pyx_n_s_elementBoundaryElements,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_nFreeDOF_element_r,&__pyx_n_s_freeLocal_r,&__pyx_n_s_nFreeDOF_element_u,&__pyx_n_s_freeLocal_u,&__pyx_n_s_csrRowIndeces_ru,&__pyx_n_s_csrColumnOffsets_eb_ru,&__pyx_n_s_elementBoundaryFluxJacobian,&__pyx_n_s_w_dS,&__pyx_n_s_jac,0};
20570  PyObject* values[12] = {0,0,0,0,0,0,0,0,0,0,0,0};
20571  if (unlikely(__pyx_kwds)) {
20572  Py_ssize_t kw_args;
20573  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
20574  switch (pos_args) {
20575  case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
20576  CYTHON_FALLTHROUGH;
20577  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
20578  CYTHON_FALLTHROUGH;
20579  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
20580  CYTHON_FALLTHROUGH;
20581  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
20582  CYTHON_FALLTHROUGH;
20583  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
20584  CYTHON_FALLTHROUGH;
20585  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
20586  CYTHON_FALLTHROUGH;
20587  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
20588  CYTHON_FALLTHROUGH;
20589  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
20590  CYTHON_FALLTHROUGH;
20591  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
20592  CYTHON_FALLTHROUGH;
20593  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
20594  CYTHON_FALLTHROUGH;
20595  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
20596  CYTHON_FALLTHROUGH;
20597  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
20598  CYTHON_FALLTHROUGH;
20599  case 0: break;
20600  default: goto __pyx_L5_argtuple_error;
20601  }
20602  kw_args = PyDict_Size(__pyx_kwds);
20603  switch (pos_args) {
20604  case 0:
20605  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_interiorElementBoundaries)) != 0)) kw_args--;
20606  else goto __pyx_L5_argtuple_error;
20607  CYTHON_FALLTHROUGH;
20608  case 1:
20609  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElements)) != 0)) kw_args--;
20610  else {
20611  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_CSR", 1, 12, 12, 1); __PYX_ERR(0, 4082, __pyx_L3_error)
20612  }
20613  CYTHON_FALLTHROUGH;
20614  case 2:
20615  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
20616  else {
20617  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_CSR", 1, 12, 12, 2); __PYX_ERR(0, 4082, __pyx_L3_error)
20618  }
20619  CYTHON_FALLTHROUGH;
20620  case 3:
20621  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeDOF_element_r)) != 0)) kw_args--;
20622  else {
20623  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_CSR", 1, 12, 12, 3); __PYX_ERR(0, 4082, __pyx_L3_error)
20624  }
20625  CYTHON_FALLTHROUGH;
20626  case 4:
20627  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeLocal_r)) != 0)) kw_args--;
20628  else {
20629  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_CSR", 1, 12, 12, 4); __PYX_ERR(0, 4082, __pyx_L3_error)
20630  }
20631  CYTHON_FALLTHROUGH;
20632  case 5:
20633  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeDOF_element_u)) != 0)) kw_args--;
20634  else {
20635  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_CSR", 1, 12, 12, 5); __PYX_ERR(0, 4082, __pyx_L3_error)
20636  }
20637  CYTHON_FALLTHROUGH;
20638  case 6:
20639  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeLocal_u)) != 0)) kw_args--;
20640  else {
20641  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_CSR", 1, 12, 12, 6); __PYX_ERR(0, 4082, __pyx_L3_error)
20642  }
20643  CYTHON_FALLTHROUGH;
20644  case 7:
20645  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_csrRowIndeces_ru)) != 0)) kw_args--;
20646  else {
20647  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_CSR", 1, 12, 12, 7); __PYX_ERR(0, 4082, __pyx_L3_error)
20648  }
20649  CYTHON_FALLTHROUGH;
20650  case 8:
20651  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_csrColumnOffsets_eb_ru)) != 0)) kw_args--;
20652  else {
20653  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_CSR", 1, 12, 12, 8); __PYX_ERR(0, 4082, __pyx_L3_error)
20654  }
20655  CYTHON_FALLTHROUGH;
20656  case 9:
20657  if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryFluxJacobian)) != 0)) kw_args--;
20658  else {
20659  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_CSR", 1, 12, 12, 9); __PYX_ERR(0, 4082, __pyx_L3_error)
20660  }
20661  CYTHON_FALLTHROUGH;
20662  case 10:
20663  if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_w_dS)) != 0)) kw_args--;
20664  else {
20665  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_CSR", 1, 12, 12, 10); __PYX_ERR(0, 4082, __pyx_L3_error)
20666  }
20667  CYTHON_FALLTHROUGH;
20668  case 11:
20669  if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jac)) != 0)) kw_args--;
20670  else {
20671  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_CSR", 1, 12, 12, 11); __PYX_ERR(0, 4082, __pyx_L3_error)
20672  }
20673  }
20674  if (unlikely(kw_args > 0)) {
20675  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_CSR") < 0)) __PYX_ERR(0, 4082, __pyx_L3_error)
20676  }
20677  } else if (PyTuple_GET_SIZE(__pyx_args) != 12) {
20678  goto __pyx_L5_argtuple_error;
20679  } else {
20680  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
20681  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
20682  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
20683  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
20684  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
20685  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
20686  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
20687  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
20688  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
20689  values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
20690  values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
20691  values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
20692  }
20693  __pyx_v_interiorElementBoundaries = ((PyArrayObject *)values[0]);
20694  __pyx_v_elementBoundaryElements = ((PyArrayObject *)values[1]);
20695  __pyx_v_elementBoundaryLocalElementBoundaries = ((PyArrayObject *)values[2]);
20696  __pyx_v_nFreeDOF_element_r = ((PyArrayObject *)values[3]);
20697  __pyx_v_freeLocal_r = ((PyArrayObject *)values[4]);
20698  __pyx_v_nFreeDOF_element_u = ((PyArrayObject *)values[5]);
20699  __pyx_v_freeLocal_u = ((PyArrayObject *)values[6]);
20700  __pyx_v_csrRowIndeces_ru = ((PyArrayObject *)values[7]);
20701  __pyx_v_csrColumnOffsets_eb_ru = ((PyArrayObject *)values[8]);
20702  __pyx_v_elementBoundaryFluxJacobian = ((PyArrayObject *)values[9]);
20703  __pyx_v_w_dS = ((PyArrayObject *)values[10]);
20704  __pyx_v_jac = values[11];
20705  }
20706  goto __pyx_L4_argument_unpacking_done;
20707  __pyx_L5_argtuple_error:;
20708  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_CSR", 1, 12, 12, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4082, __pyx_L3_error)
20709  __pyx_L3_error:;
20710  __Pyx_AddTraceback("cfemIntegrals.updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_CSR", __pyx_clineno, __pyx_lineno, __pyx_filename);
20711  __Pyx_RefNannyFinishContext();
20712  return NULL;
20713  __pyx_L4_argument_unpacking_done:;
20714  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_interiorElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "interiorElementBoundaries", 0))) __PYX_ERR(0, 4082, __pyx_L1_error)
20715  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElements), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElements", 0))) __PYX_ERR(0, 4083, __pyx_L1_error)
20716  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundaries", 0))) __PYX_ERR(0, 4084, __pyx_L1_error)
20717  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nFreeDOF_element_r), __pyx_ptype_5numpy_ndarray, 1, "nFreeDOF_element_r", 0))) __PYX_ERR(0, 4085, __pyx_L1_error)
20718  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeLocal_r), __pyx_ptype_5numpy_ndarray, 1, "freeLocal_r", 0))) __PYX_ERR(0, 4086, __pyx_L1_error)
20719  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nFreeDOF_element_u), __pyx_ptype_5numpy_ndarray, 1, "nFreeDOF_element_u", 0))) __PYX_ERR(0, 4087, __pyx_L1_error)
20720  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeLocal_u), __pyx_ptype_5numpy_ndarray, 1, "freeLocal_u", 0))) __PYX_ERR(0, 4088, __pyx_L1_error)
20721  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_csrRowIndeces_ru), __pyx_ptype_5numpy_ndarray, 1, "csrRowIndeces_ru", 0))) __PYX_ERR(0, 4089, __pyx_L1_error)
20722  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_csrColumnOffsets_eb_ru), __pyx_ptype_5numpy_ndarray, 1, "csrColumnOffsets_eb_ru", 0))) __PYX_ERR(0, 4090, __pyx_L1_error)
20723  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryFluxJacobian), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryFluxJacobian", 0))) __PYX_ERR(0, 4091, __pyx_L1_error)
20724  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w_dS), __pyx_ptype_5numpy_ndarray, 1, "w_dS", 0))) __PYX_ERR(0, 4092, __pyx_L1_error)
20725  __pyx_r = __pyx_pf_13cfemIntegrals_174updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_CSR(__pyx_self, __pyx_v_interiorElementBoundaries, __pyx_v_elementBoundaryElements, __pyx_v_elementBoundaryLocalElementBoundaries, __pyx_v_nFreeDOF_element_r, __pyx_v_freeLocal_r, __pyx_v_nFreeDOF_element_u, __pyx_v_freeLocal_u, __pyx_v_csrRowIndeces_ru, __pyx_v_csrColumnOffsets_eb_ru, __pyx_v_elementBoundaryFluxJacobian, __pyx_v_w_dS, __pyx_v_jac);
20726 
20727  /* function exit code */
20728  goto __pyx_L0;
20729  __pyx_L1_error:;
20730  __pyx_r = NULL;
20731  __pyx_L0:;
20732  __Pyx_RefNannyFinishContext();
20733  return __pyx_r;
20734 }
20735 
20736 static PyObject *__pyx_pf_13cfemIntegrals_174updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_CSR(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_interiorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_nFreeDOF_element_r, PyArrayObject *__pyx_v_freeLocal_r, PyArrayObject *__pyx_v_nFreeDOF_element_u, PyArrayObject *__pyx_v_freeLocal_u, PyArrayObject *__pyx_v_csrRowIndeces_ru, PyArrayObject *__pyx_v_csrColumnOffsets_eb_ru, PyArrayObject *__pyx_v_elementBoundaryFluxJacobian, PyArrayObject *__pyx_v_w_dS, PyObject *__pyx_v_jac) {
20737  CYTHON_UNUSED PyArrayObject *__pyx_v_rowptr = 0;
20738  CYTHON_UNUSED PyArrayObject *__pyx_v_colind = 0;
20739  PyArrayObject *__pyx_v_jac_array = 0;
20740  int __pyx_v_nInteriorElementBoundaries_global;
20741  int __pyx_v_nElementBoundaries_element;
20742  int __pyx_v_nQuadraturePoints_elementBoundary;
20743  int __pyx_v_nDOF_test_element;
20744  int __pyx_v_nDOF_trial_element;
20745  PyObject *__pyx_r = NULL;
20746  __Pyx_RefNannyDeclarations
20747  PyObject *__pyx_t_1 = NULL;
20748  PyObject *__pyx_t_2 = NULL;
20749  PyObject *__pyx_t_3 = NULL;
20750  PyObject *__pyx_t_4 = NULL;
20751  PyObject *__pyx_t_5 = NULL;
20752  PyObject *(*__pyx_t_6)(PyObject *);
20753  int __pyx_lineno = 0;
20754  const char *__pyx_filename = NULL;
20755  int __pyx_clineno = 0;
20756  __Pyx_RefNannySetupContext("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_CSR", 0);
20757 
20758  /* "cfemIntegrals.pyx":4095
20759  * jac):
20760  * cdef np.ndarray rowptr, colind, jac_array
20761  * (rowptr,colind,jac_array) = jac.getCSRrepresentation() # <<<<<<<<<<<<<<
20762  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0]
20763  * cdef int nElementBoundaries_element = w_dS.shape[1]
20764  */
20765  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_jac, __pyx_n_s_getCSRrepresentation); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4095, __pyx_L1_error)
20766  __Pyx_GOTREF(__pyx_t_2);
20767  __pyx_t_3 = NULL;
20768  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
20769  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
20770  if (likely(__pyx_t_3)) {
20771  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
20772  __Pyx_INCREF(__pyx_t_3);
20773  __Pyx_INCREF(function);
20774  __Pyx_DECREF_SET(__pyx_t_2, function);
20775  }
20776  }
20777  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
20778  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
20779  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4095, __pyx_L1_error)
20780  __Pyx_GOTREF(__pyx_t_1);
20781  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20782  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
20783  PyObject* sequence = __pyx_t_1;
20784  Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
20785  if (unlikely(size != 3)) {
20786  if (size > 3) __Pyx_RaiseTooManyValuesError(3);
20787  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
20788  __PYX_ERR(0, 4095, __pyx_L1_error)
20789  }
20790  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
20791  if (likely(PyTuple_CheckExact(sequence))) {
20792  __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
20793  __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1);
20794  __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2);
20795  } else {
20796  __pyx_t_2 = PyList_GET_ITEM(sequence, 0);
20797  __pyx_t_3 = PyList_GET_ITEM(sequence, 1);
20798  __pyx_t_4 = PyList_GET_ITEM(sequence, 2);
20799  }
20800  __Pyx_INCREF(__pyx_t_2);
20801  __Pyx_INCREF(__pyx_t_3);
20802  __Pyx_INCREF(__pyx_t_4);
20803  #else
20804  __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4095, __pyx_L1_error)
20805  __Pyx_GOTREF(__pyx_t_2);
20806  __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4095, __pyx_L1_error)
20807  __Pyx_GOTREF(__pyx_t_3);
20808  __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4095, __pyx_L1_error)
20809  __Pyx_GOTREF(__pyx_t_4);
20810  #endif
20811  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20812  } else {
20813  Py_ssize_t index = -1;
20814  __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4095, __pyx_L1_error)
20815  __Pyx_GOTREF(__pyx_t_5);
20816  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20817  __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext;
20818  index = 0; __pyx_t_2 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
20819  __Pyx_GOTREF(__pyx_t_2);
20820  index = 1; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
20821  __Pyx_GOTREF(__pyx_t_3);
20822  index = 2; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed;
20823  __Pyx_GOTREF(__pyx_t_4);
20824  if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 3) < 0) __PYX_ERR(0, 4095, __pyx_L1_error)
20825  __pyx_t_6 = NULL;
20826  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
20827  goto __pyx_L4_unpacking_done;
20828  __pyx_L3_unpacking_failed:;
20829  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
20830  __pyx_t_6 = NULL;
20831  if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
20832  __PYX_ERR(0, 4095, __pyx_L1_error)
20833  __pyx_L4_unpacking_done:;
20834  }
20835  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4095, __pyx_L1_error)
20836  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4095, __pyx_L1_error)
20837  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4095, __pyx_L1_error)
20838  __pyx_v_rowptr = ((PyArrayObject *)__pyx_t_2);
20839  __pyx_t_2 = 0;
20840  __pyx_v_colind = ((PyArrayObject *)__pyx_t_3);
20841  __pyx_t_3 = 0;
20842  __pyx_v_jac_array = ((PyArrayObject *)__pyx_t_4);
20843  __pyx_t_4 = 0;
20844 
20845  /* "cfemIntegrals.pyx":4096
20846  * cdef np.ndarray rowptr, colind, jac_array
20847  * (rowptr,colind,jac_array) = jac.getCSRrepresentation()
20848  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0] # <<<<<<<<<<<<<<
20849  * cdef int nElementBoundaries_element = w_dS.shape[1]
20850  * cdef int nQuadraturePoints_elementBoundary = w_dS.shape[2]
20851  */
20852  __pyx_v_nInteriorElementBoundaries_global = (__pyx_v_interiorElementBoundaries->dimensions[0]);
20853 
20854  /* "cfemIntegrals.pyx":4097
20855  * (rowptr,colind,jac_array) = jac.getCSRrepresentation()
20856  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0]
20857  * cdef int nElementBoundaries_element = w_dS.shape[1] # <<<<<<<<<<<<<<
20858  * cdef int nQuadraturePoints_elementBoundary = w_dS.shape[2]
20859  * cdef int nDOF_test_element = w_dS.shape[3]
20860  */
20861  __pyx_v_nElementBoundaries_element = (__pyx_v_w_dS->dimensions[1]);
20862 
20863  /* "cfemIntegrals.pyx":4098
20864  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0]
20865  * cdef int nElementBoundaries_element = w_dS.shape[1]
20866  * cdef int nQuadraturePoints_elementBoundary = w_dS.shape[2] # <<<<<<<<<<<<<<
20867  * cdef int nDOF_test_element = w_dS.shape[3]
20868  * cdef int nDOF_trial_element = elementBoundaryFluxJacobian.shape[3]
20869  */
20870  __pyx_v_nQuadraturePoints_elementBoundary = (__pyx_v_w_dS->dimensions[2]);
20871 
20872  /* "cfemIntegrals.pyx":4099
20873  * cdef int nElementBoundaries_element = w_dS.shape[1]
20874  * cdef int nQuadraturePoints_elementBoundary = w_dS.shape[2]
20875  * cdef int nDOF_test_element = w_dS.shape[3] # <<<<<<<<<<<<<<
20876  * cdef int nDOF_trial_element = elementBoundaryFluxJacobian.shape[3]
20877  * cupdateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_CSR(nInteriorElementBoundaries_global,
20878  */
20879  __pyx_v_nDOF_test_element = (__pyx_v_w_dS->dimensions[3]);
20880 
20881  /* "cfemIntegrals.pyx":4100
20882  * cdef int nQuadraturePoints_elementBoundary = w_dS.shape[2]
20883  * cdef int nDOF_test_element = w_dS.shape[3]
20884  * cdef int nDOF_trial_element = elementBoundaryFluxJacobian.shape[3] # <<<<<<<<<<<<<<
20885  * cupdateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_CSR(nInteriorElementBoundaries_global,
20886  * nElementBoundaries_element,
20887  */
20888  __pyx_v_nDOF_trial_element = (__pyx_v_elementBoundaryFluxJacobian->dimensions[3]);
20889 
20890  /* "cfemIntegrals.pyx":4101
20891  * cdef int nDOF_test_element = w_dS.shape[3]
20892  * cdef int nDOF_trial_element = elementBoundaryFluxJacobian.shape[3]
20893  * cupdateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_CSR(nInteriorElementBoundaries_global, # <<<<<<<<<<<<<<
20894  * nElementBoundaries_element,
20895  * nQuadraturePoints_elementBoundary,
20896  */
20897  updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_CSR(__pyx_v_nInteriorElementBoundaries_global, __pyx_v_nElementBoundaries_element, __pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nDOF_test_element, __pyx_v_nDOF_trial_element, ((int *)__pyx_v_interiorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), ((int *)__pyx_v_nFreeDOF_element_r->data), ((int *)__pyx_v_freeLocal_r->data), ((int *)__pyx_v_nFreeDOF_element_u->data), ((int *)__pyx_v_freeLocal_u->data), ((int *)__pyx_v_csrRowIndeces_ru->data), ((int *)__pyx_v_csrColumnOffsets_eb_ru->data), ((double *)__pyx_v_elementBoundaryFluxJacobian->data), ((double *)__pyx_v_w_dS->data), ((double *)__pyx_v_jac_array->data));
20898 
20899  /* "cfemIntegrals.pyx":4082
20900  * <double*>elementJacobian_eb.data,
20901  * <double*>globalJacobian_array.data)
20902  * def updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_CSR(np.ndarray interiorElementBoundaries, # <<<<<<<<<<<<<<
20903  * np.ndarray elementBoundaryElements,
20904  * np.ndarray elementBoundaryLocalElementBoundaries,
20905  */
20906 
20907  /* function exit code */
20908  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
20909  goto __pyx_L0;
20910  __pyx_L1_error:;
20911  __Pyx_XDECREF(__pyx_t_1);
20912  __Pyx_XDECREF(__pyx_t_2);
20913  __Pyx_XDECREF(__pyx_t_3);
20914  __Pyx_XDECREF(__pyx_t_4);
20915  __Pyx_XDECREF(__pyx_t_5);
20916  __Pyx_AddTraceback("cfemIntegrals.updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_CSR", __pyx_clineno, __pyx_lineno, __pyx_filename);
20917  __pyx_r = NULL;
20918  __pyx_L0:;
20919  __Pyx_XDECREF((PyObject *)__pyx_v_rowptr);
20920  __Pyx_XDECREF((PyObject *)__pyx_v_colind);
20921  __Pyx_XDECREF((PyObject *)__pyx_v_jac_array);
20922  __Pyx_XGIVEREF(__pyx_r);
20923  __Pyx_RefNannyFinishContext();
20924  return __pyx_r;
20925 }
20926 
20927 /* "cfemIntegrals.pyx":4118
20928  * <double*>w_dS.data,
20929  * <double*>jac_array.data)
20930  * def updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_CSR(np.ndarray exteriorElementBoundaries, # <<<<<<<<<<<<<<
20931  * np.ndarray elementBoundaryElements,
20932  * np.ndarray elementBoundaryLocalElementBoundaries,
20933  */
20934 
20935 /* Python wrapper */
20936 static PyObject *__pyx_pw_13cfemIntegrals_177updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_CSR(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
20937 static PyMethodDef __pyx_mdef_13cfemIntegrals_177updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_CSR = {"updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_CSR", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_177updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_CSR, METH_VARARGS|METH_KEYWORDS, 0};
20938 static PyObject *__pyx_pw_13cfemIntegrals_177updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_CSR(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
20939  PyArrayObject *__pyx_v_exteriorElementBoundaries = 0;
20940  PyArrayObject *__pyx_v_elementBoundaryElements = 0;
20941  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries = 0;
20942  PyArrayObject *__pyx_v_nFreeDOF_element_r = 0;
20943  PyArrayObject *__pyx_v_freeLocal_r = 0;
20944  PyArrayObject *__pyx_v_nFreeDOF_element_u = 0;
20945  PyArrayObject *__pyx_v_freeLocal_u = 0;
20946  PyArrayObject *__pyx_v_csrRowIndeces_ru = 0;
20947  PyArrayObject *__pyx_v_csrColumnOffsets_eb_ru = 0;
20948  PyArrayObject *__pyx_v_elementBoundaryFluxJacobian = 0;
20949  PyArrayObject *__pyx_v_w_dS = 0;
20950  PyObject *__pyx_v_jac = 0;
20951  int __pyx_lineno = 0;
20952  const char *__pyx_filename = NULL;
20953  int __pyx_clineno = 0;
20954  PyObject *__pyx_r = 0;
20955  __Pyx_RefNannyDeclarations
20956  __Pyx_RefNannySetupContext("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_CSR (wrapper)", 0);
20957  {
20958  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exteriorElementBoundaries,&__pyx_n_s_elementBoundaryElements,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_nFreeDOF_element_r,&__pyx_n_s_freeLocal_r,&__pyx_n_s_nFreeDOF_element_u,&__pyx_n_s_freeLocal_u,&__pyx_n_s_csrRowIndeces_ru,&__pyx_n_s_csrColumnOffsets_eb_ru,&__pyx_n_s_elementBoundaryFluxJacobian,&__pyx_n_s_w_dS,&__pyx_n_s_jac,0};
20959  PyObject* values[12] = {0,0,0,0,0,0,0,0,0,0,0,0};
20960  if (unlikely(__pyx_kwds)) {
20961  Py_ssize_t kw_args;
20962  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
20963  switch (pos_args) {
20964  case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
20965  CYTHON_FALLTHROUGH;
20966  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
20967  CYTHON_FALLTHROUGH;
20968  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
20969  CYTHON_FALLTHROUGH;
20970  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
20971  CYTHON_FALLTHROUGH;
20972  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
20973  CYTHON_FALLTHROUGH;
20974  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
20975  CYTHON_FALLTHROUGH;
20976  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
20977  CYTHON_FALLTHROUGH;
20978  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
20979  CYTHON_FALLTHROUGH;
20980  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
20981  CYTHON_FALLTHROUGH;
20982  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
20983  CYTHON_FALLTHROUGH;
20984  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
20985  CYTHON_FALLTHROUGH;
20986  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
20987  CYTHON_FALLTHROUGH;
20988  case 0: break;
20989  default: goto __pyx_L5_argtuple_error;
20990  }
20991  kw_args = PyDict_Size(__pyx_kwds);
20992  switch (pos_args) {
20993  case 0:
20994  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exteriorElementBoundaries)) != 0)) kw_args--;
20995  else goto __pyx_L5_argtuple_error;
20996  CYTHON_FALLTHROUGH;
20997  case 1:
20998  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElements)) != 0)) kw_args--;
20999  else {
21000  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_CSR", 1, 12, 12, 1); __PYX_ERR(0, 4118, __pyx_L3_error)
21001  }
21002  CYTHON_FALLTHROUGH;
21003  case 2:
21004  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
21005  else {
21006  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_CSR", 1, 12, 12, 2); __PYX_ERR(0, 4118, __pyx_L3_error)
21007  }
21008  CYTHON_FALLTHROUGH;
21009  case 3:
21010  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeDOF_element_r)) != 0)) kw_args--;
21011  else {
21012  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_CSR", 1, 12, 12, 3); __PYX_ERR(0, 4118, __pyx_L3_error)
21013  }
21014  CYTHON_FALLTHROUGH;
21015  case 4:
21016  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeLocal_r)) != 0)) kw_args--;
21017  else {
21018  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_CSR", 1, 12, 12, 4); __PYX_ERR(0, 4118, __pyx_L3_error)
21019  }
21020  CYTHON_FALLTHROUGH;
21021  case 5:
21022  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeDOF_element_u)) != 0)) kw_args--;
21023  else {
21024  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_CSR", 1, 12, 12, 5); __PYX_ERR(0, 4118, __pyx_L3_error)
21025  }
21026  CYTHON_FALLTHROUGH;
21027  case 6:
21028  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeLocal_u)) != 0)) kw_args--;
21029  else {
21030  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_CSR", 1, 12, 12, 6); __PYX_ERR(0, 4118, __pyx_L3_error)
21031  }
21032  CYTHON_FALLTHROUGH;
21033  case 7:
21034  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_csrRowIndeces_ru)) != 0)) kw_args--;
21035  else {
21036  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_CSR", 1, 12, 12, 7); __PYX_ERR(0, 4118, __pyx_L3_error)
21037  }
21038  CYTHON_FALLTHROUGH;
21039  case 8:
21040  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_csrColumnOffsets_eb_ru)) != 0)) kw_args--;
21041  else {
21042  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_CSR", 1, 12, 12, 8); __PYX_ERR(0, 4118, __pyx_L3_error)
21043  }
21044  CYTHON_FALLTHROUGH;
21045  case 9:
21046  if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryFluxJacobian)) != 0)) kw_args--;
21047  else {
21048  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_CSR", 1, 12, 12, 9); __PYX_ERR(0, 4118, __pyx_L3_error)
21049  }
21050  CYTHON_FALLTHROUGH;
21051  case 10:
21052  if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_w_dS)) != 0)) kw_args--;
21053  else {
21054  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_CSR", 1, 12, 12, 10); __PYX_ERR(0, 4118, __pyx_L3_error)
21055  }
21056  CYTHON_FALLTHROUGH;
21057  case 11:
21058  if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jac)) != 0)) kw_args--;
21059  else {
21060  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_CSR", 1, 12, 12, 11); __PYX_ERR(0, 4118, __pyx_L3_error)
21061  }
21062  }
21063  if (unlikely(kw_args > 0)) {
21064  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_CSR") < 0)) __PYX_ERR(0, 4118, __pyx_L3_error)
21065  }
21066  } else if (PyTuple_GET_SIZE(__pyx_args) != 12) {
21067  goto __pyx_L5_argtuple_error;
21068  } else {
21069  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
21070  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
21071  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
21072  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
21073  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
21074  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
21075  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
21076  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
21077  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
21078  values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
21079  values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
21080  values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
21081  }
21082  __pyx_v_exteriorElementBoundaries = ((PyArrayObject *)values[0]);
21083  __pyx_v_elementBoundaryElements = ((PyArrayObject *)values[1]);
21084  __pyx_v_elementBoundaryLocalElementBoundaries = ((PyArrayObject *)values[2]);
21085  __pyx_v_nFreeDOF_element_r = ((PyArrayObject *)values[3]);
21086  __pyx_v_freeLocal_r = ((PyArrayObject *)values[4]);
21087  __pyx_v_nFreeDOF_element_u = ((PyArrayObject *)values[5]);
21088  __pyx_v_freeLocal_u = ((PyArrayObject *)values[6]);
21089  __pyx_v_csrRowIndeces_ru = ((PyArrayObject *)values[7]);
21090  __pyx_v_csrColumnOffsets_eb_ru = ((PyArrayObject *)values[8]);
21091  __pyx_v_elementBoundaryFluxJacobian = ((PyArrayObject *)values[9]);
21092  __pyx_v_w_dS = ((PyArrayObject *)values[10]);
21093  __pyx_v_jac = values[11];
21094  }
21095  goto __pyx_L4_argument_unpacking_done;
21096  __pyx_L5_argtuple_error:;
21097  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_CSR", 1, 12, 12, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4118, __pyx_L3_error)
21098  __pyx_L3_error:;
21099  __Pyx_AddTraceback("cfemIntegrals.updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_CSR", __pyx_clineno, __pyx_lineno, __pyx_filename);
21100  __Pyx_RefNannyFinishContext();
21101  return NULL;
21102  __pyx_L4_argument_unpacking_done:;
21103  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exteriorElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "exteriorElementBoundaries", 0))) __PYX_ERR(0, 4118, __pyx_L1_error)
21104  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElements), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElements", 0))) __PYX_ERR(0, 4119, __pyx_L1_error)
21105  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundaries", 0))) __PYX_ERR(0, 4120, __pyx_L1_error)
21106  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nFreeDOF_element_r), __pyx_ptype_5numpy_ndarray, 1, "nFreeDOF_element_r", 0))) __PYX_ERR(0, 4121, __pyx_L1_error)
21107  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeLocal_r), __pyx_ptype_5numpy_ndarray, 1, "freeLocal_r", 0))) __PYX_ERR(0, 4122, __pyx_L1_error)
21108  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nFreeDOF_element_u), __pyx_ptype_5numpy_ndarray, 1, "nFreeDOF_element_u", 0))) __PYX_ERR(0, 4123, __pyx_L1_error)
21109  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeLocal_u), __pyx_ptype_5numpy_ndarray, 1, "freeLocal_u", 0))) __PYX_ERR(0, 4124, __pyx_L1_error)
21110  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_csrRowIndeces_ru), __pyx_ptype_5numpy_ndarray, 1, "csrRowIndeces_ru", 0))) __PYX_ERR(0, 4125, __pyx_L1_error)
21111  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_csrColumnOffsets_eb_ru), __pyx_ptype_5numpy_ndarray, 1, "csrColumnOffsets_eb_ru", 0))) __PYX_ERR(0, 4126, __pyx_L1_error)
21112  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryFluxJacobian), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryFluxJacobian", 0))) __PYX_ERR(0, 4127, __pyx_L1_error)
21113  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w_dS), __pyx_ptype_5numpy_ndarray, 1, "w_dS", 0))) __PYX_ERR(0, 4128, __pyx_L1_error)
21114  __pyx_r = __pyx_pf_13cfemIntegrals_176updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_CSR(__pyx_self, __pyx_v_exteriorElementBoundaries, __pyx_v_elementBoundaryElements, __pyx_v_elementBoundaryLocalElementBoundaries, __pyx_v_nFreeDOF_element_r, __pyx_v_freeLocal_r, __pyx_v_nFreeDOF_element_u, __pyx_v_freeLocal_u, __pyx_v_csrRowIndeces_ru, __pyx_v_csrColumnOffsets_eb_ru, __pyx_v_elementBoundaryFluxJacobian, __pyx_v_w_dS, __pyx_v_jac);
21115 
21116  /* function exit code */
21117  goto __pyx_L0;
21118  __pyx_L1_error:;
21119  __pyx_r = NULL;
21120  __pyx_L0:;
21121  __Pyx_RefNannyFinishContext();
21122  return __pyx_r;
21123 }
21124 
21125 static PyObject *__pyx_pf_13cfemIntegrals_176updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_CSR(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_nFreeDOF_element_r, PyArrayObject *__pyx_v_freeLocal_r, PyArrayObject *__pyx_v_nFreeDOF_element_u, PyArrayObject *__pyx_v_freeLocal_u, PyArrayObject *__pyx_v_csrRowIndeces_ru, PyArrayObject *__pyx_v_csrColumnOffsets_eb_ru, PyArrayObject *__pyx_v_elementBoundaryFluxJacobian, PyArrayObject *__pyx_v_w_dS, PyObject *__pyx_v_jac) {
21126  CYTHON_UNUSED PyArrayObject *__pyx_v_rowptr = 0;
21127  CYTHON_UNUSED PyArrayObject *__pyx_v_colind = 0;
21128  PyArrayObject *__pyx_v_jac_array = 0;
21129  int __pyx_v_nd;
21130  PyObject *__pyx_r = NULL;
21131  __Pyx_RefNannyDeclarations
21132  PyObject *__pyx_t_1 = NULL;
21133  PyObject *__pyx_t_2 = NULL;
21134  PyObject *__pyx_t_3 = NULL;
21135  PyObject *__pyx_t_4 = NULL;
21136  PyObject *__pyx_t_5 = NULL;
21137  PyObject *(*__pyx_t_6)(PyObject *);
21138  int __pyx_t_7;
21139  int __pyx_t_8;
21140  int __pyx_lineno = 0;
21141  const char *__pyx_filename = NULL;
21142  int __pyx_clineno = 0;
21143  __Pyx_RefNannySetupContext("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_CSR", 0);
21144 
21145  /* "cfemIntegrals.pyx":4131
21146  * jac):
21147  * cdef np.ndarray rowptr, colind, jac_array
21148  * (rowptr,colind,jac_array) = jac.getCSRrepresentation() # <<<<<<<<<<<<<<
21149  * cdef int nd = w_dS.ndim
21150  * if nd > 3:
21151  */
21152  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_jac, __pyx_n_s_getCSRrepresentation); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4131, __pyx_L1_error)
21153  __Pyx_GOTREF(__pyx_t_2);
21154  __pyx_t_3 = NULL;
21155  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
21156  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
21157  if (likely(__pyx_t_3)) {
21158  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
21159  __Pyx_INCREF(__pyx_t_3);
21160  __Pyx_INCREF(function);
21161  __Pyx_DECREF_SET(__pyx_t_2, function);
21162  }
21163  }
21164  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
21165  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
21166  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4131, __pyx_L1_error)
21167  __Pyx_GOTREF(__pyx_t_1);
21168  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21169  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
21170  PyObject* sequence = __pyx_t_1;
21171  Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
21172  if (unlikely(size != 3)) {
21173  if (size > 3) __Pyx_RaiseTooManyValuesError(3);
21174  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
21175  __PYX_ERR(0, 4131, __pyx_L1_error)
21176  }
21177  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
21178  if (likely(PyTuple_CheckExact(sequence))) {
21179  __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
21180  __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1);
21181  __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2);
21182  } else {
21183  __pyx_t_2 = PyList_GET_ITEM(sequence, 0);
21184  __pyx_t_3 = PyList_GET_ITEM(sequence, 1);
21185  __pyx_t_4 = PyList_GET_ITEM(sequence, 2);
21186  }
21187  __Pyx_INCREF(__pyx_t_2);
21188  __Pyx_INCREF(__pyx_t_3);
21189  __Pyx_INCREF(__pyx_t_4);
21190  #else
21191  __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4131, __pyx_L1_error)
21192  __Pyx_GOTREF(__pyx_t_2);
21193  __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4131, __pyx_L1_error)
21194  __Pyx_GOTREF(__pyx_t_3);
21195  __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4131, __pyx_L1_error)
21196  __Pyx_GOTREF(__pyx_t_4);
21197  #endif
21198  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21199  } else {
21200  Py_ssize_t index = -1;
21201  __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4131, __pyx_L1_error)
21202  __Pyx_GOTREF(__pyx_t_5);
21203  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21204  __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext;
21205  index = 0; __pyx_t_2 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
21206  __Pyx_GOTREF(__pyx_t_2);
21207  index = 1; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
21208  __Pyx_GOTREF(__pyx_t_3);
21209  index = 2; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed;
21210  __Pyx_GOTREF(__pyx_t_4);
21211  if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 3) < 0) __PYX_ERR(0, 4131, __pyx_L1_error)
21212  __pyx_t_6 = NULL;
21213  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21214  goto __pyx_L4_unpacking_done;
21215  __pyx_L3_unpacking_failed:;
21216  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21217  __pyx_t_6 = NULL;
21218  if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
21219  __PYX_ERR(0, 4131, __pyx_L1_error)
21220  __pyx_L4_unpacking_done:;
21221  }
21222  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4131, __pyx_L1_error)
21223  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4131, __pyx_L1_error)
21224  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4131, __pyx_L1_error)
21225  __pyx_v_rowptr = ((PyArrayObject *)__pyx_t_2);
21226  __pyx_t_2 = 0;
21227  __pyx_v_colind = ((PyArrayObject *)__pyx_t_3);
21228  __pyx_t_3 = 0;
21229  __pyx_v_jac_array = ((PyArrayObject *)__pyx_t_4);
21230  __pyx_t_4 = 0;
21231 
21232  /* "cfemIntegrals.pyx":4132
21233  * cdef np.ndarray rowptr, colind, jac_array
21234  * (rowptr,colind,jac_array) = jac.getCSRrepresentation()
21235  * cdef int nd = w_dS.ndim # <<<<<<<<<<<<<<
21236  * if nd > 3:
21237  * assert elementBoundaryFluxJacobian.ndim == 4
21238  */
21239  __pyx_t_7 = __pyx_v_w_dS->nd;
21240  __pyx_v_nd = __pyx_t_7;
21241 
21242  /* "cfemIntegrals.pyx":4133
21243  * (rowptr,colind,jac_array) = jac.getCSRrepresentation()
21244  * cdef int nd = w_dS.ndim
21245  * if nd > 3: # <<<<<<<<<<<<<<
21246  * assert elementBoundaryFluxJacobian.ndim == 4
21247  * cupdateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_CSR(exteriorElementBoundaries.shape[0],
21248  */
21249  __pyx_t_8 = ((__pyx_v_nd > 3) != 0);
21250  if (__pyx_t_8) {
21251 
21252  /* "cfemIntegrals.pyx":4134
21253  * cdef int nd = w_dS.ndim
21254  * if nd > 3:
21255  * assert elementBoundaryFluxJacobian.ndim == 4 # <<<<<<<<<<<<<<
21256  * cupdateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_CSR(exteriorElementBoundaries.shape[0],
21257  * w_dS.shape[1],
21258  */
21259  #ifndef CYTHON_WITHOUT_ASSERTIONS
21260  if (unlikely(!Py_OptimizeFlag)) {
21261  if (unlikely(!((__pyx_v_elementBoundaryFluxJacobian->nd == 4) != 0))) {
21262  PyErr_SetNone(PyExc_AssertionError);
21263  __PYX_ERR(0, 4134, __pyx_L1_error)
21264  }
21265  }
21266  #endif
21267 
21268  /* "cfemIntegrals.pyx":4135
21269  * if nd > 3:
21270  * assert elementBoundaryFluxJacobian.ndim == 4
21271  * cupdateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_CSR(exteriorElementBoundaries.shape[0], # <<<<<<<<<<<<<<
21272  * w_dS.shape[1],
21273  * w_dS.shape[2],
21274  */
21275  updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_CSR((__pyx_v_exteriorElementBoundaries->dimensions[0]), (__pyx_v_w_dS->dimensions[1]), (__pyx_v_w_dS->dimensions[2]), (__pyx_v_w_dS->dimensions[3]), (__pyx_v_elementBoundaryFluxJacobian->dimensions[3]), ((int *)__pyx_v_exteriorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), ((int *)__pyx_v_nFreeDOF_element_r->data), ((int *)__pyx_v_freeLocal_r->data), ((int *)__pyx_v_nFreeDOF_element_u->data), ((int *)__pyx_v_freeLocal_u->data), ((int *)__pyx_v_csrRowIndeces_ru->data), ((int *)__pyx_v_csrColumnOffsets_eb_ru->data), ((double *)__pyx_v_elementBoundaryFluxJacobian->data), ((double *)__pyx_v_w_dS->data), ((double *)__pyx_v_jac_array->data));
21276 
21277  /* "cfemIntegrals.pyx":4133
21278  * (rowptr,colind,jac_array) = jac.getCSRrepresentation()
21279  * cdef int nd = w_dS.ndim
21280  * if nd > 3: # <<<<<<<<<<<<<<
21281  * assert elementBoundaryFluxJacobian.ndim == 4
21282  * cupdateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_CSR(exteriorElementBoundaries.shape[0],
21283  */
21284  goto __pyx_L5;
21285  }
21286 
21287  /* "cfemIntegrals.pyx":4153
21288  * <double*>jac_array.data)
21289  * else:
21290  * assert elementBoundaryFluxJacobian.ndim == 3 # <<<<<<<<<<<<<<
21291  * cupdateGlobalJacobianFromGlobalExteriorElementBoundaryFluxJacobian_CSR(exteriorElementBoundaries.shape[0],
21292  * w_dS.shape[1],
21293  */
21294  /*else*/ {
21295  #ifndef CYTHON_WITHOUT_ASSERTIONS
21296  if (unlikely(!Py_OptimizeFlag)) {
21297  if (unlikely(!((__pyx_v_elementBoundaryFluxJacobian->nd == 3) != 0))) {
21298  PyErr_SetNone(PyExc_AssertionError);
21299  __PYX_ERR(0, 4153, __pyx_L1_error)
21300  }
21301  }
21302  #endif
21303 
21304  /* "cfemIntegrals.pyx":4154
21305  * else:
21306  * assert elementBoundaryFluxJacobian.ndim == 3
21307  * cupdateGlobalJacobianFromGlobalExteriorElementBoundaryFluxJacobian_CSR(exteriorElementBoundaries.shape[0], # <<<<<<<<<<<<<<
21308  * w_dS.shape[1],
21309  * w_dS.shape[2],
21310  */
21311  updateGlobalJacobianFromGlobalExteriorElementBoundaryFluxJacobian_CSR((__pyx_v_exteriorElementBoundaries->dimensions[0]), (__pyx_v_w_dS->dimensions[1]), (__pyx_v_w_dS->dimensions[2]), (__pyx_v_elementBoundaryFluxJacobian->dimensions[2]), ((int *)__pyx_v_exteriorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), ((int *)__pyx_v_nFreeDOF_element_r->data), ((int *)__pyx_v_freeLocal_r->data), ((int *)__pyx_v_nFreeDOF_element_u->data), ((int *)__pyx_v_freeLocal_u->data), ((int *)__pyx_v_csrRowIndeces_ru->data), ((int *)__pyx_v_csrColumnOffsets_eb_ru->data), ((double *)__pyx_v_elementBoundaryFluxJacobian->data), ((double *)__pyx_v_w_dS->data), ((double *)__pyx_v_jac_array->data));
21312  }
21313  __pyx_L5:;
21314 
21315  /* "cfemIntegrals.pyx":4118
21316  * <double*>w_dS.data,
21317  * <double*>jac_array.data)
21318  * def updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_CSR(np.ndarray exteriorElementBoundaries, # <<<<<<<<<<<<<<
21319  * np.ndarray elementBoundaryElements,
21320  * np.ndarray elementBoundaryLocalElementBoundaries,
21321  */
21322 
21323  /* function exit code */
21324  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
21325  goto __pyx_L0;
21326  __pyx_L1_error:;
21327  __Pyx_XDECREF(__pyx_t_1);
21328  __Pyx_XDECREF(__pyx_t_2);
21329  __Pyx_XDECREF(__pyx_t_3);
21330  __Pyx_XDECREF(__pyx_t_4);
21331  __Pyx_XDECREF(__pyx_t_5);
21332  __Pyx_AddTraceback("cfemIntegrals.updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_CSR", __pyx_clineno, __pyx_lineno, __pyx_filename);
21333  __pyx_r = NULL;
21334  __pyx_L0:;
21335  __Pyx_XDECREF((PyObject *)__pyx_v_rowptr);
21336  __Pyx_XDECREF((PyObject *)__pyx_v_colind);
21337  __Pyx_XDECREF((PyObject *)__pyx_v_jac_array);
21338  __Pyx_XGIVEREF(__pyx_r);
21339  __Pyx_RefNannyFinishContext();
21340  return __pyx_r;
21341 }
21342 
21343 /* "cfemIntegrals.pyx":4170
21344  * <double*> w_dS.data,
21345  * <double*> jac_array.data)
21346  * def updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_CSR(np.ndarray elementNeighbors, # <<<<<<<<<<<<<<
21347  * np.ndarray interiorElementBoundaries,
21348  * np.ndarray elementBoundaryElements,
21349  */
21350 
21351 /* Python wrapper */
21352 static PyObject *__pyx_pw_13cfemIntegrals_179updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_CSR(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
21353 static PyMethodDef __pyx_mdef_13cfemIntegrals_179updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_CSR = {"updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_CSR", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_179updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_CSR, METH_VARARGS|METH_KEYWORDS, 0};
21354 static PyObject *__pyx_pw_13cfemIntegrals_179updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_CSR(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
21355  PyArrayObject *__pyx_v_elementNeighbors = 0;
21356  PyArrayObject *__pyx_v_interiorElementBoundaries = 0;
21357  PyArrayObject *__pyx_v_elementBoundaryElements = 0;
21358  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries = 0;
21359  PyArrayObject *__pyx_v_nFreeDOF_element_r = 0;
21360  PyArrayObject *__pyx_v_freeLocal_r = 0;
21361  PyArrayObject *__pyx_v_nFreeDOF_element_u = 0;
21362  PyArrayObject *__pyx_v_freeLocal_u = 0;
21363  PyArrayObject *__pyx_v_csrRowIndeces_ru = 0;
21364  PyArrayObject *__pyx_v_csrColumnOffsets_eb_eNebN_ru = 0;
21365  PyArrayObject *__pyx_v_elementBoundaryFluxJacobian_eb = 0;
21366  PyArrayObject *__pyx_v_w_dS = 0;
21367  PyObject *__pyx_v_jac = 0;
21368  int __pyx_lineno = 0;
21369  const char *__pyx_filename = NULL;
21370  int __pyx_clineno = 0;
21371  PyObject *__pyx_r = 0;
21372  __Pyx_RefNannyDeclarations
21373  __Pyx_RefNannySetupContext("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_CSR (wrapper)", 0);
21374  {
21375  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_elementNeighbors,&__pyx_n_s_interiorElementBoundaries,&__pyx_n_s_elementBoundaryElements,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_nFreeDOF_element_r,&__pyx_n_s_freeLocal_r,&__pyx_n_s_nFreeDOF_element_u,&__pyx_n_s_freeLocal_u,&__pyx_n_s_csrRowIndeces_ru,&__pyx_n_s_csrColumnOffsets_eb_eNebN_ru,&__pyx_n_s_elementBoundaryFluxJacobian_eb,&__pyx_n_s_w_dS,&__pyx_n_s_jac,0};
21376  PyObject* values[13] = {0,0,0,0,0,0,0,0,0,0,0,0,0};
21377  if (unlikely(__pyx_kwds)) {
21378  Py_ssize_t kw_args;
21379  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
21380  switch (pos_args) {
21381  case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
21382  CYTHON_FALLTHROUGH;
21383  case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
21384  CYTHON_FALLTHROUGH;
21385  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
21386  CYTHON_FALLTHROUGH;
21387  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
21388  CYTHON_FALLTHROUGH;
21389  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
21390  CYTHON_FALLTHROUGH;
21391  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
21392  CYTHON_FALLTHROUGH;
21393  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
21394  CYTHON_FALLTHROUGH;
21395  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
21396  CYTHON_FALLTHROUGH;
21397  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
21398  CYTHON_FALLTHROUGH;
21399  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
21400  CYTHON_FALLTHROUGH;
21401  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
21402  CYTHON_FALLTHROUGH;
21403  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
21404  CYTHON_FALLTHROUGH;
21405  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
21406  CYTHON_FALLTHROUGH;
21407  case 0: break;
21408  default: goto __pyx_L5_argtuple_error;
21409  }
21410  kw_args = PyDict_Size(__pyx_kwds);
21411  switch (pos_args) {
21412  case 0:
21413  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementNeighbors)) != 0)) kw_args--;
21414  else goto __pyx_L5_argtuple_error;
21415  CYTHON_FALLTHROUGH;
21416  case 1:
21417  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_interiorElementBoundaries)) != 0)) kw_args--;
21418  else {
21419  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_CSR", 1, 13, 13, 1); __PYX_ERR(0, 4170, __pyx_L3_error)
21420  }
21421  CYTHON_FALLTHROUGH;
21422  case 2:
21423  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElements)) != 0)) kw_args--;
21424  else {
21425  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_CSR", 1, 13, 13, 2); __PYX_ERR(0, 4170, __pyx_L3_error)
21426  }
21427  CYTHON_FALLTHROUGH;
21428  case 3:
21429  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
21430  else {
21431  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_CSR", 1, 13, 13, 3); __PYX_ERR(0, 4170, __pyx_L3_error)
21432  }
21433  CYTHON_FALLTHROUGH;
21434  case 4:
21435  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeDOF_element_r)) != 0)) kw_args--;
21436  else {
21437  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_CSR", 1, 13, 13, 4); __PYX_ERR(0, 4170, __pyx_L3_error)
21438  }
21439  CYTHON_FALLTHROUGH;
21440  case 5:
21441  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeLocal_r)) != 0)) kw_args--;
21442  else {
21443  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_CSR", 1, 13, 13, 5); __PYX_ERR(0, 4170, __pyx_L3_error)
21444  }
21445  CYTHON_FALLTHROUGH;
21446  case 6:
21447  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeDOF_element_u)) != 0)) kw_args--;
21448  else {
21449  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_CSR", 1, 13, 13, 6); __PYX_ERR(0, 4170, __pyx_L3_error)
21450  }
21451  CYTHON_FALLTHROUGH;
21452  case 7:
21453  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeLocal_u)) != 0)) kw_args--;
21454  else {
21455  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_CSR", 1, 13, 13, 7); __PYX_ERR(0, 4170, __pyx_L3_error)
21456  }
21457  CYTHON_FALLTHROUGH;
21458  case 8:
21459  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_csrRowIndeces_ru)) != 0)) kw_args--;
21460  else {
21461  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_CSR", 1, 13, 13, 8); __PYX_ERR(0, 4170, __pyx_L3_error)
21462  }
21463  CYTHON_FALLTHROUGH;
21464  case 9:
21465  if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_csrColumnOffsets_eb_eNebN_ru)) != 0)) kw_args--;
21466  else {
21467  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_CSR", 1, 13, 13, 9); __PYX_ERR(0, 4170, __pyx_L3_error)
21468  }
21469  CYTHON_FALLTHROUGH;
21470  case 10:
21471  if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryFluxJacobian_eb)) != 0)) kw_args--;
21472  else {
21473  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_CSR", 1, 13, 13, 10); __PYX_ERR(0, 4170, __pyx_L3_error)
21474  }
21475  CYTHON_FALLTHROUGH;
21476  case 11:
21477  if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_w_dS)) != 0)) kw_args--;
21478  else {
21479  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_CSR", 1, 13, 13, 11); __PYX_ERR(0, 4170, __pyx_L3_error)
21480  }
21481  CYTHON_FALLTHROUGH;
21482  case 12:
21483  if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jac)) != 0)) kw_args--;
21484  else {
21485  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_CSR", 1, 13, 13, 12); __PYX_ERR(0, 4170, __pyx_L3_error)
21486  }
21487  }
21488  if (unlikely(kw_args > 0)) {
21489  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_CSR") < 0)) __PYX_ERR(0, 4170, __pyx_L3_error)
21490  }
21491  } else if (PyTuple_GET_SIZE(__pyx_args) != 13) {
21492  goto __pyx_L5_argtuple_error;
21493  } else {
21494  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
21495  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
21496  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
21497  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
21498  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
21499  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
21500  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
21501  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
21502  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
21503  values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
21504  values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
21505  values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
21506  values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
21507  }
21508  __pyx_v_elementNeighbors = ((PyArrayObject *)values[0]);
21509  __pyx_v_interiorElementBoundaries = ((PyArrayObject *)values[1]);
21510  __pyx_v_elementBoundaryElements = ((PyArrayObject *)values[2]);
21511  __pyx_v_elementBoundaryLocalElementBoundaries = ((PyArrayObject *)values[3]);
21512  __pyx_v_nFreeDOF_element_r = ((PyArrayObject *)values[4]);
21513  __pyx_v_freeLocal_r = ((PyArrayObject *)values[5]);
21514  __pyx_v_nFreeDOF_element_u = ((PyArrayObject *)values[6]);
21515  __pyx_v_freeLocal_u = ((PyArrayObject *)values[7]);
21516  __pyx_v_csrRowIndeces_ru = ((PyArrayObject *)values[8]);
21517  __pyx_v_csrColumnOffsets_eb_eNebN_ru = ((PyArrayObject *)values[9]);
21518  __pyx_v_elementBoundaryFluxJacobian_eb = ((PyArrayObject *)values[10]);
21519  __pyx_v_w_dS = ((PyArrayObject *)values[11]);
21520  __pyx_v_jac = values[12];
21521  }
21522  goto __pyx_L4_argument_unpacking_done;
21523  __pyx_L5_argtuple_error:;
21524  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_CSR", 1, 13, 13, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4170, __pyx_L3_error)
21525  __pyx_L3_error:;
21526  __Pyx_AddTraceback("cfemIntegrals.updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_CSR", __pyx_clineno, __pyx_lineno, __pyx_filename);
21527  __Pyx_RefNannyFinishContext();
21528  return NULL;
21529  __pyx_L4_argument_unpacking_done:;
21530  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNeighbors), __pyx_ptype_5numpy_ndarray, 1, "elementNeighbors", 0))) __PYX_ERR(0, 4170, __pyx_L1_error)
21531  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_interiorElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "interiorElementBoundaries", 0))) __PYX_ERR(0, 4171, __pyx_L1_error)
21532  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElements), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElements", 0))) __PYX_ERR(0, 4172, __pyx_L1_error)
21533  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundaries", 0))) __PYX_ERR(0, 4173, __pyx_L1_error)
21534  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nFreeDOF_element_r), __pyx_ptype_5numpy_ndarray, 1, "nFreeDOF_element_r", 0))) __PYX_ERR(0, 4174, __pyx_L1_error)
21535  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeLocal_r), __pyx_ptype_5numpy_ndarray, 1, "freeLocal_r", 0))) __PYX_ERR(0, 4175, __pyx_L1_error)
21536  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nFreeDOF_element_u), __pyx_ptype_5numpy_ndarray, 1, "nFreeDOF_element_u", 0))) __PYX_ERR(0, 4176, __pyx_L1_error)
21537  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeLocal_u), __pyx_ptype_5numpy_ndarray, 1, "freeLocal_u", 0))) __PYX_ERR(0, 4177, __pyx_L1_error)
21538  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_csrRowIndeces_ru), __pyx_ptype_5numpy_ndarray, 1, "csrRowIndeces_ru", 0))) __PYX_ERR(0, 4178, __pyx_L1_error)
21539  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_csrColumnOffsets_eb_eNebN_ru), __pyx_ptype_5numpy_ndarray, 1, "csrColumnOffsets_eb_eNebN_ru", 0))) __PYX_ERR(0, 4179, __pyx_L1_error)
21540  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryFluxJacobian_eb), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryFluxJacobian_eb", 0))) __PYX_ERR(0, 4180, __pyx_L1_error)
21541  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w_dS), __pyx_ptype_5numpy_ndarray, 1, "w_dS", 0))) __PYX_ERR(0, 4181, __pyx_L1_error)
21542  __pyx_r = __pyx_pf_13cfemIntegrals_178updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_CSR(__pyx_self, __pyx_v_elementNeighbors, __pyx_v_interiorElementBoundaries, __pyx_v_elementBoundaryElements, __pyx_v_elementBoundaryLocalElementBoundaries, __pyx_v_nFreeDOF_element_r, __pyx_v_freeLocal_r, __pyx_v_nFreeDOF_element_u, __pyx_v_freeLocal_u, __pyx_v_csrRowIndeces_ru, __pyx_v_csrColumnOffsets_eb_eNebN_ru, __pyx_v_elementBoundaryFluxJacobian_eb, __pyx_v_w_dS, __pyx_v_jac);
21543 
21544  /* function exit code */
21545  goto __pyx_L0;
21546  __pyx_L1_error:;
21547  __pyx_r = NULL;
21548  __pyx_L0:;
21549  __Pyx_RefNannyFinishContext();
21550  return __pyx_r;
21551 }
21552 
21553 static PyObject *__pyx_pf_13cfemIntegrals_178updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_CSR(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementNeighbors, PyArrayObject *__pyx_v_interiorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_nFreeDOF_element_r, PyArrayObject *__pyx_v_freeLocal_r, PyArrayObject *__pyx_v_nFreeDOF_element_u, PyArrayObject *__pyx_v_freeLocal_u, PyArrayObject *__pyx_v_csrRowIndeces_ru, PyArrayObject *__pyx_v_csrColumnOffsets_eb_eNebN_ru, PyArrayObject *__pyx_v_elementBoundaryFluxJacobian_eb, PyArrayObject *__pyx_v_w_dS, PyObject *__pyx_v_jac) {
21554  CYTHON_UNUSED PyArrayObject *__pyx_v_rowptr = 0;
21555  CYTHON_UNUSED PyArrayObject *__pyx_v_colind = 0;
21556  PyArrayObject *__pyx_v_jac_array = 0;
21557  int __pyx_v_nInteriorElementBoundaries_global;
21558  int __pyx_v_nElementBoundaries_element;
21559  int __pyx_v_nQuadraturePoints_elementBoundary;
21560  int __pyx_v_nDOF_test_element;
21561  int __pyx_v_nDOF_trial_element;
21562  PyObject *__pyx_r = NULL;
21563  __Pyx_RefNannyDeclarations
21564  PyObject *__pyx_t_1 = NULL;
21565  PyObject *__pyx_t_2 = NULL;
21566  PyObject *__pyx_t_3 = NULL;
21567  PyObject *__pyx_t_4 = NULL;
21568  PyObject *__pyx_t_5 = NULL;
21569  PyObject *(*__pyx_t_6)(PyObject *);
21570  int __pyx_lineno = 0;
21571  const char *__pyx_filename = NULL;
21572  int __pyx_clineno = 0;
21573  __Pyx_RefNannySetupContext("updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_CSR", 0);
21574 
21575  /* "cfemIntegrals.pyx":4184
21576  * jac):
21577  * cdef np.ndarray rowptr, colind, jac_array
21578  * (rowptr,colind,jac_array) = jac.getCSRrepresentation() # <<<<<<<<<<<<<<
21579  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0]
21580  * cdef int nElementBoundaries_element = w_dS.shape[1]
21581  */
21582  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_jac, __pyx_n_s_getCSRrepresentation); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4184, __pyx_L1_error)
21583  __Pyx_GOTREF(__pyx_t_2);
21584  __pyx_t_3 = NULL;
21585  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
21586  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
21587  if (likely(__pyx_t_3)) {
21588  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
21589  __Pyx_INCREF(__pyx_t_3);
21590  __Pyx_INCREF(function);
21591  __Pyx_DECREF_SET(__pyx_t_2, function);
21592  }
21593  }
21594  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
21595  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
21596  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4184, __pyx_L1_error)
21597  __Pyx_GOTREF(__pyx_t_1);
21598  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21599  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
21600  PyObject* sequence = __pyx_t_1;
21601  Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
21602  if (unlikely(size != 3)) {
21603  if (size > 3) __Pyx_RaiseTooManyValuesError(3);
21604  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
21605  __PYX_ERR(0, 4184, __pyx_L1_error)
21606  }
21607  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
21608  if (likely(PyTuple_CheckExact(sequence))) {
21609  __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
21610  __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1);
21611  __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2);
21612  } else {
21613  __pyx_t_2 = PyList_GET_ITEM(sequence, 0);
21614  __pyx_t_3 = PyList_GET_ITEM(sequence, 1);
21615  __pyx_t_4 = PyList_GET_ITEM(sequence, 2);
21616  }
21617  __Pyx_INCREF(__pyx_t_2);
21618  __Pyx_INCREF(__pyx_t_3);
21619  __Pyx_INCREF(__pyx_t_4);
21620  #else
21621  __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4184, __pyx_L1_error)
21622  __Pyx_GOTREF(__pyx_t_2);
21623  __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4184, __pyx_L1_error)
21624  __Pyx_GOTREF(__pyx_t_3);
21625  __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4184, __pyx_L1_error)
21626  __Pyx_GOTREF(__pyx_t_4);
21627  #endif
21628  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21629  } else {
21630  Py_ssize_t index = -1;
21631  __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4184, __pyx_L1_error)
21632  __Pyx_GOTREF(__pyx_t_5);
21633  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21634  __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext;
21635  index = 0; __pyx_t_2 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
21636  __Pyx_GOTREF(__pyx_t_2);
21637  index = 1; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
21638  __Pyx_GOTREF(__pyx_t_3);
21639  index = 2; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed;
21640  __Pyx_GOTREF(__pyx_t_4);
21641  if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 3) < 0) __PYX_ERR(0, 4184, __pyx_L1_error)
21642  __pyx_t_6 = NULL;
21643  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21644  goto __pyx_L4_unpacking_done;
21645  __pyx_L3_unpacking_failed:;
21646  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21647  __pyx_t_6 = NULL;
21648  if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
21649  __PYX_ERR(0, 4184, __pyx_L1_error)
21650  __pyx_L4_unpacking_done:;
21651  }
21652  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4184, __pyx_L1_error)
21653  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4184, __pyx_L1_error)
21654  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4184, __pyx_L1_error)
21655  __pyx_v_rowptr = ((PyArrayObject *)__pyx_t_2);
21656  __pyx_t_2 = 0;
21657  __pyx_v_colind = ((PyArrayObject *)__pyx_t_3);
21658  __pyx_t_3 = 0;
21659  __pyx_v_jac_array = ((PyArrayObject *)__pyx_t_4);
21660  __pyx_t_4 = 0;
21661 
21662  /* "cfemIntegrals.pyx":4185
21663  * cdef np.ndarray rowptr, colind, jac_array
21664  * (rowptr,colind,jac_array) = jac.getCSRrepresentation()
21665  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0] # <<<<<<<<<<<<<<
21666  * cdef int nElementBoundaries_element = w_dS.shape[1]
21667  * cdef int nQuadraturePoints_elementBoundary = w_dS.shape[2]
21668  */
21669  __pyx_v_nInteriorElementBoundaries_global = (__pyx_v_interiorElementBoundaries->dimensions[0]);
21670 
21671  /* "cfemIntegrals.pyx":4186
21672  * (rowptr,colind,jac_array) = jac.getCSRrepresentation()
21673  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0]
21674  * cdef int nElementBoundaries_element = w_dS.shape[1] # <<<<<<<<<<<<<<
21675  * cdef int nQuadraturePoints_elementBoundary = w_dS.shape[2]
21676  * cdef int nDOF_test_element = w_dS.shape[3]
21677  */
21678  __pyx_v_nElementBoundaries_element = (__pyx_v_w_dS->dimensions[1]);
21679 
21680  /* "cfemIntegrals.pyx":4187
21681  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0]
21682  * cdef int nElementBoundaries_element = w_dS.shape[1]
21683  * cdef int nQuadraturePoints_elementBoundary = w_dS.shape[2] # <<<<<<<<<<<<<<
21684  * cdef int nDOF_test_element = w_dS.shape[3]
21685  * cdef int nDOF_trial_element = elementBoundaryFluxJacobian_eb.shape[4]
21686  */
21687  __pyx_v_nQuadraturePoints_elementBoundary = (__pyx_v_w_dS->dimensions[2]);
21688 
21689  /* "cfemIntegrals.pyx":4188
21690  * cdef int nElementBoundaries_element = w_dS.shape[1]
21691  * cdef int nQuadraturePoints_elementBoundary = w_dS.shape[2]
21692  * cdef int nDOF_test_element = w_dS.shape[3] # <<<<<<<<<<<<<<
21693  * cdef int nDOF_trial_element = elementBoundaryFluxJacobian_eb.shape[4]
21694  * cupdateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_CSR(<int *>elementNeighbors.data,
21695  */
21696  __pyx_v_nDOF_test_element = (__pyx_v_w_dS->dimensions[3]);
21697 
21698  /* "cfemIntegrals.pyx":4189
21699  * cdef int nQuadraturePoints_elementBoundary = w_dS.shape[2]
21700  * cdef int nDOF_test_element = w_dS.shape[3]
21701  * cdef int nDOF_trial_element = elementBoundaryFluxJacobian_eb.shape[4] # <<<<<<<<<<<<<<
21702  * cupdateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_CSR(<int *>elementNeighbors.data,
21703  * nInteriorElementBoundaries_global,
21704  */
21705  __pyx_v_nDOF_trial_element = (__pyx_v_elementBoundaryFluxJacobian_eb->dimensions[4]);
21706 
21707  /* "cfemIntegrals.pyx":4190
21708  * cdef int nDOF_test_element = w_dS.shape[3]
21709  * cdef int nDOF_trial_element = elementBoundaryFluxJacobian_eb.shape[4]
21710  * cupdateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_CSR(<int *>elementNeighbors.data, # <<<<<<<<<<<<<<
21711  * nInteriorElementBoundaries_global,
21712  * nElementBoundaries_element,
21713  */
21714  updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_CSR(((int *)__pyx_v_elementNeighbors->data), __pyx_v_nInteriorElementBoundaries_global, __pyx_v_nElementBoundaries_element, __pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nDOF_test_element, __pyx_v_nDOF_trial_element, ((int *)__pyx_v_interiorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), ((int *)__pyx_v_nFreeDOF_element_r->data), ((int *)__pyx_v_freeLocal_r->data), ((int *)__pyx_v_nFreeDOF_element_u->data), ((int *)__pyx_v_freeLocal_u->data), ((int *)__pyx_v_csrRowIndeces_ru->data), ((int *)__pyx_v_csrColumnOffsets_eb_eNebN_ru->data), ((double *)__pyx_v_elementBoundaryFluxJacobian_eb->data), ((double *)__pyx_v_w_dS->data), ((double *)__pyx_v_jac_array->data));
21715 
21716  /* "cfemIntegrals.pyx":4170
21717  * <double*> w_dS.data,
21718  * <double*> jac_array.data)
21719  * def updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_CSR(np.ndarray elementNeighbors, # <<<<<<<<<<<<<<
21720  * np.ndarray interiorElementBoundaries,
21721  * np.ndarray elementBoundaryElements,
21722  */
21723 
21724  /* function exit code */
21725  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
21726  goto __pyx_L0;
21727  __pyx_L1_error:;
21728  __Pyx_XDECREF(__pyx_t_1);
21729  __Pyx_XDECREF(__pyx_t_2);
21730  __Pyx_XDECREF(__pyx_t_3);
21731  __Pyx_XDECREF(__pyx_t_4);
21732  __Pyx_XDECREF(__pyx_t_5);
21733  __Pyx_AddTraceback("cfemIntegrals.updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_CSR", __pyx_clineno, __pyx_lineno, __pyx_filename);
21734  __pyx_r = NULL;
21735  __pyx_L0:;
21736  __Pyx_XDECREF((PyObject *)__pyx_v_rowptr);
21737  __Pyx_XDECREF((PyObject *)__pyx_v_colind);
21738  __Pyx_XDECREF((PyObject *)__pyx_v_jac_array);
21739  __Pyx_XGIVEREF(__pyx_r);
21740  __Pyx_RefNannyFinishContext();
21741  return __pyx_r;
21742 }
21743 
21744 /* "cfemIntegrals.pyx":4208
21745  * <double*>w_dS.data,
21746  * <double*>jac_array.data)
21747  * def updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_CSR(np.ndarray elementNeighbors, # <<<<<<<<<<<<<<
21748  * np.ndarray exteriorElementBoundaries,
21749  * np.ndarray elementBoundaryElements,
21750  */
21751 
21752 /* Python wrapper */
21753 static PyObject *__pyx_pw_13cfemIntegrals_181updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_CSR(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
21754 static PyMethodDef __pyx_mdef_13cfemIntegrals_181updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_CSR = {"updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_CSR", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_181updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_CSR, METH_VARARGS|METH_KEYWORDS, 0};
21755 static PyObject *__pyx_pw_13cfemIntegrals_181updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_CSR(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
21756  PyArrayObject *__pyx_v_elementNeighbors = 0;
21757  PyArrayObject *__pyx_v_exteriorElementBoundaries = 0;
21758  PyArrayObject *__pyx_v_elementBoundaryElements = 0;
21759  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries = 0;
21760  PyArrayObject *__pyx_v_nFreeDOF_element_r = 0;
21761  PyArrayObject *__pyx_v_freeLocal_r = 0;
21762  PyArrayObject *__pyx_v_nFreeDOF_element_u = 0;
21763  PyArrayObject *__pyx_v_freeLocal_u = 0;
21764  PyArrayObject *__pyx_v_csrRowIndeces_ru = 0;
21765  PyArrayObject *__pyx_v_csrColumnOffsets_eb_eNebN_ru = 0;
21766  PyArrayObject *__pyx_v_elementBoundaryFluxJacobian_eb = 0;
21767  PyArrayObject *__pyx_v_w_dS = 0;
21768  PyObject *__pyx_v_jac = 0;
21769  int __pyx_lineno = 0;
21770  const char *__pyx_filename = NULL;
21771  int __pyx_clineno = 0;
21772  PyObject *__pyx_r = 0;
21773  __Pyx_RefNannyDeclarations
21774  __Pyx_RefNannySetupContext("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_CSR (wrapper)", 0);
21775  {
21776  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_elementNeighbors,&__pyx_n_s_exteriorElementBoundaries,&__pyx_n_s_elementBoundaryElements,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_nFreeDOF_element_r,&__pyx_n_s_freeLocal_r,&__pyx_n_s_nFreeDOF_element_u,&__pyx_n_s_freeLocal_u,&__pyx_n_s_csrRowIndeces_ru,&__pyx_n_s_csrColumnOffsets_eb_eNebN_ru,&__pyx_n_s_elementBoundaryFluxJacobian_eb,&__pyx_n_s_w_dS,&__pyx_n_s_jac,0};
21777  PyObject* values[13] = {0,0,0,0,0,0,0,0,0,0,0,0,0};
21778  if (unlikely(__pyx_kwds)) {
21779  Py_ssize_t kw_args;
21780  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
21781  switch (pos_args) {
21782  case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
21783  CYTHON_FALLTHROUGH;
21784  case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
21785  CYTHON_FALLTHROUGH;
21786  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
21787  CYTHON_FALLTHROUGH;
21788  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
21789  CYTHON_FALLTHROUGH;
21790  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
21791  CYTHON_FALLTHROUGH;
21792  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
21793  CYTHON_FALLTHROUGH;
21794  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
21795  CYTHON_FALLTHROUGH;
21796  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
21797  CYTHON_FALLTHROUGH;
21798  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
21799  CYTHON_FALLTHROUGH;
21800  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
21801  CYTHON_FALLTHROUGH;
21802  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
21803  CYTHON_FALLTHROUGH;
21804  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
21805  CYTHON_FALLTHROUGH;
21806  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
21807  CYTHON_FALLTHROUGH;
21808  case 0: break;
21809  default: goto __pyx_L5_argtuple_error;
21810  }
21811  kw_args = PyDict_Size(__pyx_kwds);
21812  switch (pos_args) {
21813  case 0:
21814  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementNeighbors)) != 0)) kw_args--;
21815  else goto __pyx_L5_argtuple_error;
21816  CYTHON_FALLTHROUGH;
21817  case 1:
21818  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exteriorElementBoundaries)) != 0)) kw_args--;
21819  else {
21820  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_CSR", 1, 13, 13, 1); __PYX_ERR(0, 4208, __pyx_L3_error)
21821  }
21822  CYTHON_FALLTHROUGH;
21823  case 2:
21824  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElements)) != 0)) kw_args--;
21825  else {
21826  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_CSR", 1, 13, 13, 2); __PYX_ERR(0, 4208, __pyx_L3_error)
21827  }
21828  CYTHON_FALLTHROUGH;
21829  case 3:
21830  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
21831  else {
21832  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_CSR", 1, 13, 13, 3); __PYX_ERR(0, 4208, __pyx_L3_error)
21833  }
21834  CYTHON_FALLTHROUGH;
21835  case 4:
21836  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeDOF_element_r)) != 0)) kw_args--;
21837  else {
21838  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_CSR", 1, 13, 13, 4); __PYX_ERR(0, 4208, __pyx_L3_error)
21839  }
21840  CYTHON_FALLTHROUGH;
21841  case 5:
21842  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeLocal_r)) != 0)) kw_args--;
21843  else {
21844  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_CSR", 1, 13, 13, 5); __PYX_ERR(0, 4208, __pyx_L3_error)
21845  }
21846  CYTHON_FALLTHROUGH;
21847  case 6:
21848  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeDOF_element_u)) != 0)) kw_args--;
21849  else {
21850  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_CSR", 1, 13, 13, 6); __PYX_ERR(0, 4208, __pyx_L3_error)
21851  }
21852  CYTHON_FALLTHROUGH;
21853  case 7:
21854  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeLocal_u)) != 0)) kw_args--;
21855  else {
21856  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_CSR", 1, 13, 13, 7); __PYX_ERR(0, 4208, __pyx_L3_error)
21857  }
21858  CYTHON_FALLTHROUGH;
21859  case 8:
21860  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_csrRowIndeces_ru)) != 0)) kw_args--;
21861  else {
21862  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_CSR", 1, 13, 13, 8); __PYX_ERR(0, 4208, __pyx_L3_error)
21863  }
21864  CYTHON_FALLTHROUGH;
21865  case 9:
21866  if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_csrColumnOffsets_eb_eNebN_ru)) != 0)) kw_args--;
21867  else {
21868  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_CSR", 1, 13, 13, 9); __PYX_ERR(0, 4208, __pyx_L3_error)
21869  }
21870  CYTHON_FALLTHROUGH;
21871  case 10:
21872  if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryFluxJacobian_eb)) != 0)) kw_args--;
21873  else {
21874  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_CSR", 1, 13, 13, 10); __PYX_ERR(0, 4208, __pyx_L3_error)
21875  }
21876  CYTHON_FALLTHROUGH;
21877  case 11:
21878  if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_w_dS)) != 0)) kw_args--;
21879  else {
21880  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_CSR", 1, 13, 13, 11); __PYX_ERR(0, 4208, __pyx_L3_error)
21881  }
21882  CYTHON_FALLTHROUGH;
21883  case 12:
21884  if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jac)) != 0)) kw_args--;
21885  else {
21886  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_CSR", 1, 13, 13, 12); __PYX_ERR(0, 4208, __pyx_L3_error)
21887  }
21888  }
21889  if (unlikely(kw_args > 0)) {
21890  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_CSR") < 0)) __PYX_ERR(0, 4208, __pyx_L3_error)
21891  }
21892  } else if (PyTuple_GET_SIZE(__pyx_args) != 13) {
21893  goto __pyx_L5_argtuple_error;
21894  } else {
21895  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
21896  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
21897  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
21898  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
21899  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
21900  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
21901  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
21902  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
21903  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
21904  values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
21905  values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
21906  values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
21907  values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
21908  }
21909  __pyx_v_elementNeighbors = ((PyArrayObject *)values[0]);
21910  __pyx_v_exteriorElementBoundaries = ((PyArrayObject *)values[1]);
21911  __pyx_v_elementBoundaryElements = ((PyArrayObject *)values[2]);
21912  __pyx_v_elementBoundaryLocalElementBoundaries = ((PyArrayObject *)values[3]);
21913  __pyx_v_nFreeDOF_element_r = ((PyArrayObject *)values[4]);
21914  __pyx_v_freeLocal_r = ((PyArrayObject *)values[5]);
21915  __pyx_v_nFreeDOF_element_u = ((PyArrayObject *)values[6]);
21916  __pyx_v_freeLocal_u = ((PyArrayObject *)values[7]);
21917  __pyx_v_csrRowIndeces_ru = ((PyArrayObject *)values[8]);
21918  __pyx_v_csrColumnOffsets_eb_eNebN_ru = ((PyArrayObject *)values[9]);
21919  __pyx_v_elementBoundaryFluxJacobian_eb = ((PyArrayObject *)values[10]);
21920  __pyx_v_w_dS = ((PyArrayObject *)values[11]);
21921  __pyx_v_jac = values[12];
21922  }
21923  goto __pyx_L4_argument_unpacking_done;
21924  __pyx_L5_argtuple_error:;
21925  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_CSR", 1, 13, 13, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4208, __pyx_L3_error)
21926  __pyx_L3_error:;
21927  __Pyx_AddTraceback("cfemIntegrals.updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_CSR", __pyx_clineno, __pyx_lineno, __pyx_filename);
21928  __Pyx_RefNannyFinishContext();
21929  return NULL;
21930  __pyx_L4_argument_unpacking_done:;
21931  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNeighbors), __pyx_ptype_5numpy_ndarray, 1, "elementNeighbors", 0))) __PYX_ERR(0, 4208, __pyx_L1_error)
21932  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exteriorElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "exteriorElementBoundaries", 0))) __PYX_ERR(0, 4209, __pyx_L1_error)
21933  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElements), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElements", 0))) __PYX_ERR(0, 4210, __pyx_L1_error)
21934  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundaries", 0))) __PYX_ERR(0, 4211, __pyx_L1_error)
21935  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nFreeDOF_element_r), __pyx_ptype_5numpy_ndarray, 1, "nFreeDOF_element_r", 0))) __PYX_ERR(0, 4212, __pyx_L1_error)
21936  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeLocal_r), __pyx_ptype_5numpy_ndarray, 1, "freeLocal_r", 0))) __PYX_ERR(0, 4213, __pyx_L1_error)
21937  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nFreeDOF_element_u), __pyx_ptype_5numpy_ndarray, 1, "nFreeDOF_element_u", 0))) __PYX_ERR(0, 4214, __pyx_L1_error)
21938  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeLocal_u), __pyx_ptype_5numpy_ndarray, 1, "freeLocal_u", 0))) __PYX_ERR(0, 4215, __pyx_L1_error)
21939  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_csrRowIndeces_ru), __pyx_ptype_5numpy_ndarray, 1, "csrRowIndeces_ru", 0))) __PYX_ERR(0, 4216, __pyx_L1_error)
21940  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_csrColumnOffsets_eb_eNebN_ru), __pyx_ptype_5numpy_ndarray, 1, "csrColumnOffsets_eb_eNebN_ru", 0))) __PYX_ERR(0, 4217, __pyx_L1_error)
21941  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryFluxJacobian_eb), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryFluxJacobian_eb", 0))) __PYX_ERR(0, 4218, __pyx_L1_error)
21942  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w_dS), __pyx_ptype_5numpy_ndarray, 1, "w_dS", 0))) __PYX_ERR(0, 4219, __pyx_L1_error)
21943  __pyx_r = __pyx_pf_13cfemIntegrals_180updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_CSR(__pyx_self, __pyx_v_elementNeighbors, __pyx_v_exteriorElementBoundaries, __pyx_v_elementBoundaryElements, __pyx_v_elementBoundaryLocalElementBoundaries, __pyx_v_nFreeDOF_element_r, __pyx_v_freeLocal_r, __pyx_v_nFreeDOF_element_u, __pyx_v_freeLocal_u, __pyx_v_csrRowIndeces_ru, __pyx_v_csrColumnOffsets_eb_eNebN_ru, __pyx_v_elementBoundaryFluxJacobian_eb, __pyx_v_w_dS, __pyx_v_jac);
21944 
21945  /* function exit code */
21946  goto __pyx_L0;
21947  __pyx_L1_error:;
21948  __pyx_r = NULL;
21949  __pyx_L0:;
21950  __Pyx_RefNannyFinishContext();
21951  return __pyx_r;
21952 }
21953 
21954 static PyObject *__pyx_pf_13cfemIntegrals_180updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_CSR(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementNeighbors, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_nFreeDOF_element_r, PyArrayObject *__pyx_v_freeLocal_r, PyArrayObject *__pyx_v_nFreeDOF_element_u, PyArrayObject *__pyx_v_freeLocal_u, PyArrayObject *__pyx_v_csrRowIndeces_ru, PyArrayObject *__pyx_v_csrColumnOffsets_eb_eNebN_ru, PyArrayObject *__pyx_v_elementBoundaryFluxJacobian_eb, PyArrayObject *__pyx_v_w_dS, PyObject *__pyx_v_jac) {
21955  CYTHON_UNUSED PyArrayObject *__pyx_v_rowptr = 0;
21956  CYTHON_UNUSED PyArrayObject *__pyx_v_colind = 0;
21957  PyArrayObject *__pyx_v_jac_array = 0;
21958  PyObject *__pyx_r = NULL;
21959  __Pyx_RefNannyDeclarations
21960  PyObject *__pyx_t_1 = NULL;
21961  PyObject *__pyx_t_2 = NULL;
21962  PyObject *__pyx_t_3 = NULL;
21963  PyObject *__pyx_t_4 = NULL;
21964  PyObject *__pyx_t_5 = NULL;
21965  PyObject *(*__pyx_t_6)(PyObject *);
21966  int __pyx_t_7;
21967  int __pyx_lineno = 0;
21968  const char *__pyx_filename = NULL;
21969  int __pyx_clineno = 0;
21970  __Pyx_RefNannySetupContext("updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_CSR", 0);
21971 
21972  /* "cfemIntegrals.pyx":4222
21973  * jac):
21974  * cdef np.ndarray rowptr, colind, jac_array
21975  * (rowptr,colind,jac_array) = jac.getCSRrepresentation() # <<<<<<<<<<<<<<
21976  * if w_dS.ndim > 3:
21977  * cupdateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_CSR(<int *>elementNeighbors.data,
21978  */
21979  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_jac, __pyx_n_s_getCSRrepresentation); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4222, __pyx_L1_error)
21980  __Pyx_GOTREF(__pyx_t_2);
21981  __pyx_t_3 = NULL;
21982  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
21983  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
21984  if (likely(__pyx_t_3)) {
21985  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
21986  __Pyx_INCREF(__pyx_t_3);
21987  __Pyx_INCREF(function);
21988  __Pyx_DECREF_SET(__pyx_t_2, function);
21989  }
21990  }
21991  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
21992  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
21993  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4222, __pyx_L1_error)
21994  __Pyx_GOTREF(__pyx_t_1);
21995  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21996  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
21997  PyObject* sequence = __pyx_t_1;
21998  Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
21999  if (unlikely(size != 3)) {
22000  if (size > 3) __Pyx_RaiseTooManyValuesError(3);
22001  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
22002  __PYX_ERR(0, 4222, __pyx_L1_error)
22003  }
22004  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
22005  if (likely(PyTuple_CheckExact(sequence))) {
22006  __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
22007  __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1);
22008  __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2);
22009  } else {
22010  __pyx_t_2 = PyList_GET_ITEM(sequence, 0);
22011  __pyx_t_3 = PyList_GET_ITEM(sequence, 1);
22012  __pyx_t_4 = PyList_GET_ITEM(sequence, 2);
22013  }
22014  __Pyx_INCREF(__pyx_t_2);
22015  __Pyx_INCREF(__pyx_t_3);
22016  __Pyx_INCREF(__pyx_t_4);
22017  #else
22018  __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4222, __pyx_L1_error)
22019  __Pyx_GOTREF(__pyx_t_2);
22020  __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4222, __pyx_L1_error)
22021  __Pyx_GOTREF(__pyx_t_3);
22022  __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4222, __pyx_L1_error)
22023  __Pyx_GOTREF(__pyx_t_4);
22024  #endif
22025  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22026  } else {
22027  Py_ssize_t index = -1;
22028  __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4222, __pyx_L1_error)
22029  __Pyx_GOTREF(__pyx_t_5);
22030  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22031  __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext;
22032  index = 0; __pyx_t_2 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
22033  __Pyx_GOTREF(__pyx_t_2);
22034  index = 1; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
22035  __Pyx_GOTREF(__pyx_t_3);
22036  index = 2; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed;
22037  __Pyx_GOTREF(__pyx_t_4);
22038  if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 3) < 0) __PYX_ERR(0, 4222, __pyx_L1_error)
22039  __pyx_t_6 = NULL;
22040  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
22041  goto __pyx_L4_unpacking_done;
22042  __pyx_L3_unpacking_failed:;
22043  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
22044  __pyx_t_6 = NULL;
22045  if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
22046  __PYX_ERR(0, 4222, __pyx_L1_error)
22047  __pyx_L4_unpacking_done:;
22048  }
22049  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4222, __pyx_L1_error)
22050  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4222, __pyx_L1_error)
22051  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4222, __pyx_L1_error)
22052  __pyx_v_rowptr = ((PyArrayObject *)__pyx_t_2);
22053  __pyx_t_2 = 0;
22054  __pyx_v_colind = ((PyArrayObject *)__pyx_t_3);
22055  __pyx_t_3 = 0;
22056  __pyx_v_jac_array = ((PyArrayObject *)__pyx_t_4);
22057  __pyx_t_4 = 0;
22058 
22059  /* "cfemIntegrals.pyx":4223
22060  * cdef np.ndarray rowptr, colind, jac_array
22061  * (rowptr,colind,jac_array) = jac.getCSRrepresentation()
22062  * if w_dS.ndim > 3: # <<<<<<<<<<<<<<
22063  * cupdateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_CSR(<int *>elementNeighbors.data,
22064  * exteriorElementBoundaries.shape[0],
22065  */
22066  __pyx_t_7 = ((__pyx_v_w_dS->nd > 3) != 0);
22067  if (__pyx_t_7) {
22068 
22069  /* "cfemIntegrals.pyx":4224
22070  * (rowptr,colind,jac_array) = jac.getCSRrepresentation()
22071  * if w_dS.ndim > 3:
22072  * cupdateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_CSR(<int *>elementNeighbors.data, # <<<<<<<<<<<<<<
22073  * exteriorElementBoundaries.shape[0],
22074  * w_dS.shape[1],
22075  */
22076  updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_CSR(((int *)__pyx_v_elementNeighbors->data), (__pyx_v_exteriorElementBoundaries->dimensions[0]), (__pyx_v_w_dS->dimensions[1]), (__pyx_v_w_dS->dimensions[2]), (__pyx_v_w_dS->dimensions[3]), (__pyx_v_elementBoundaryFluxJacobian_eb->dimensions[4]), ((int *)__pyx_v_exteriorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), ((int *)__pyx_v_nFreeDOF_element_r->data), ((int *)__pyx_v_freeLocal_r->data), ((int *)__pyx_v_nFreeDOF_element_u->data), ((int *)__pyx_v_freeLocal_u->data), ((int *)__pyx_v_csrRowIndeces_ru->data), ((int *)__pyx_v_csrColumnOffsets_eb_eNebN_ru->data), ((double *)__pyx_v_elementBoundaryFluxJacobian_eb->data), ((double *)__pyx_v_w_dS->data), ((double *)__pyx_v_jac_array->data));
22077 
22078  /* "cfemIntegrals.pyx":4223
22079  * cdef np.ndarray rowptr, colind, jac_array
22080  * (rowptr,colind,jac_array) = jac.getCSRrepresentation()
22081  * if w_dS.ndim > 3: # <<<<<<<<<<<<<<
22082  * cupdateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_CSR(<int *>elementNeighbors.data,
22083  * exteriorElementBoundaries.shape[0],
22084  */
22085  goto __pyx_L5;
22086  }
22087 
22088  /* "cfemIntegrals.pyx":4243
22089  * <double*>jac_array.data)
22090  * else:
22091  * cupdateGlobalJacobianFromGlobalExteriorElementBoundaryFluxJacobian_eb_CSR(<int*> elementNeighbors.data, # <<<<<<<<<<<<<<
22092  * exteriorElementBoundaries.shape[0],
22093  * elementBoundaryFluxJacobian_eb.shape[2],
22094  */
22095  /*else*/ {
22096 
22097  /* "cfemIntegrals.pyx":4260
22098  * <double*> elementBoundaryFluxJacobian_eb.data,
22099  * <double*> w_dS.data,
22100  * <double*> jac_array.data) # <<<<<<<<<<<<<<
22101  * def calculateWeightedShape(np.ndarray dVR,
22102  * np.ndarray abs_det_jac,
22103  */
22104  updateGlobalJacobianFromGlobalExteriorElementBoundaryFluxJacobian_eb_CSR(((int *)__pyx_v_elementNeighbors->data), (__pyx_v_exteriorElementBoundaries->dimensions[0]), (__pyx_v_elementBoundaryFluxJacobian_eb->dimensions[2]), (__pyx_v_w_dS->dimensions[1]), (__pyx_v_w_dS->dimensions[2]), (__pyx_v_elementBoundaryFluxJacobian_eb->dimensions[4]), ((int *)__pyx_v_exteriorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), ((int *)__pyx_v_nFreeDOF_element_r->data), ((int *)__pyx_v_freeLocal_r->data), ((int *)__pyx_v_nFreeDOF_element_u->data), ((int *)__pyx_v_freeLocal_u->data), ((int *)__pyx_v_csrRowIndeces_ru->data), ((int *)__pyx_v_csrColumnOffsets_eb_eNebN_ru->data), ((double *)__pyx_v_elementBoundaryFluxJacobian_eb->data), ((double *)__pyx_v_w_dS->data), ((double *)__pyx_v_jac_array->data));
22105  }
22106  __pyx_L5:;
22107 
22108  /* "cfemIntegrals.pyx":4208
22109  * <double*>w_dS.data,
22110  * <double*>jac_array.data)
22111  * def updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_CSR(np.ndarray elementNeighbors, # <<<<<<<<<<<<<<
22112  * np.ndarray exteriorElementBoundaries,
22113  * np.ndarray elementBoundaryElements,
22114  */
22115 
22116  /* function exit code */
22117  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
22118  goto __pyx_L0;
22119  __pyx_L1_error:;
22120  __Pyx_XDECREF(__pyx_t_1);
22121  __Pyx_XDECREF(__pyx_t_2);
22122  __Pyx_XDECREF(__pyx_t_3);
22123  __Pyx_XDECREF(__pyx_t_4);
22124  __Pyx_XDECREF(__pyx_t_5);
22125  __Pyx_AddTraceback("cfemIntegrals.updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_CSR", __pyx_clineno, __pyx_lineno, __pyx_filename);
22126  __pyx_r = NULL;
22127  __pyx_L0:;
22128  __Pyx_XDECREF((PyObject *)__pyx_v_rowptr);
22129  __Pyx_XDECREF((PyObject *)__pyx_v_colind);
22130  __Pyx_XDECREF((PyObject *)__pyx_v_jac_array);
22131  __Pyx_XGIVEREF(__pyx_r);
22132  __Pyx_RefNannyFinishContext();
22133  return __pyx_r;
22134 }
22135 
22136 /* "cfemIntegrals.pyx":4261
22137  * <double*> w_dS.data,
22138  * <double*> jac_array.data)
22139  * def calculateWeightedShape(np.ndarray dVR, # <<<<<<<<<<<<<<
22140  * np.ndarray abs_det_jac,
22141  * np.ndarray w,
22142  */
22143 
22144 /* Python wrapper */
22145 static PyObject *__pyx_pw_13cfemIntegrals_183calculateWeightedShape(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
22146 static PyMethodDef __pyx_mdef_13cfemIntegrals_183calculateWeightedShape = {"calculateWeightedShape", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_183calculateWeightedShape, METH_VARARGS|METH_KEYWORDS, 0};
22147 static PyObject *__pyx_pw_13cfemIntegrals_183calculateWeightedShape(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
22148  PyArrayObject *__pyx_v_dVR = 0;
22149  PyArrayObject *__pyx_v_abs_det_jac = 0;
22150  PyArrayObject *__pyx_v_w = 0;
22151  PyArrayObject *__pyx_v_w_dV = 0;
22152  int __pyx_lineno = 0;
22153  const char *__pyx_filename = NULL;
22154  int __pyx_clineno = 0;
22155  PyObject *__pyx_r = 0;
22156  __Pyx_RefNannyDeclarations
22157  __Pyx_RefNannySetupContext("calculateWeightedShape (wrapper)", 0);
22158  {
22159  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dVR,&__pyx_n_s_abs_det_jac,&__pyx_n_s_w,&__pyx_n_s_w_dV,0};
22160  PyObject* values[4] = {0,0,0,0};
22161  if (unlikely(__pyx_kwds)) {
22162  Py_ssize_t kw_args;
22163  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
22164  switch (pos_args) {
22165  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
22166  CYTHON_FALLTHROUGH;
22167  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
22168  CYTHON_FALLTHROUGH;
22169  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
22170  CYTHON_FALLTHROUGH;
22171  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
22172  CYTHON_FALLTHROUGH;
22173  case 0: break;
22174  default: goto __pyx_L5_argtuple_error;
22175  }
22176  kw_args = PyDict_Size(__pyx_kwds);
22177  switch (pos_args) {
22178  case 0:
22179  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dVR)) != 0)) kw_args--;
22180  else goto __pyx_L5_argtuple_error;
22181  CYTHON_FALLTHROUGH;
22182  case 1:
22183  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_abs_det_jac)) != 0)) kw_args--;
22184  else {
22185  __Pyx_RaiseArgtupleInvalid("calculateWeightedShape", 1, 4, 4, 1); __PYX_ERR(0, 4261, __pyx_L3_error)
22186  }
22187  CYTHON_FALLTHROUGH;
22188  case 2:
22189  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_w)) != 0)) kw_args--;
22190  else {
22191  __Pyx_RaiseArgtupleInvalid("calculateWeightedShape", 1, 4, 4, 2); __PYX_ERR(0, 4261, __pyx_L3_error)
22192  }
22193  CYTHON_FALLTHROUGH;
22194  case 3:
22195  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_w_dV)) != 0)) kw_args--;
22196  else {
22197  __Pyx_RaiseArgtupleInvalid("calculateWeightedShape", 1, 4, 4, 3); __PYX_ERR(0, 4261, __pyx_L3_error)
22198  }
22199  }
22200  if (unlikely(kw_args > 0)) {
22201  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateWeightedShape") < 0)) __PYX_ERR(0, 4261, __pyx_L3_error)
22202  }
22203  } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
22204  goto __pyx_L5_argtuple_error;
22205  } else {
22206  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
22207  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
22208  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
22209  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
22210  }
22211  __pyx_v_dVR = ((PyArrayObject *)values[0]);
22212  __pyx_v_abs_det_jac = ((PyArrayObject *)values[1]);
22213  __pyx_v_w = ((PyArrayObject *)values[2]);
22214  __pyx_v_w_dV = ((PyArrayObject *)values[3]);
22215  }
22216  goto __pyx_L4_argument_unpacking_done;
22217  __pyx_L5_argtuple_error:;
22218  __Pyx_RaiseArgtupleInvalid("calculateWeightedShape", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4261, __pyx_L3_error)
22219  __pyx_L3_error:;
22220  __Pyx_AddTraceback("cfemIntegrals.calculateWeightedShape", __pyx_clineno, __pyx_lineno, __pyx_filename);
22221  __Pyx_RefNannyFinishContext();
22222  return NULL;
22223  __pyx_L4_argument_unpacking_done:;
22224  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dVR), __pyx_ptype_5numpy_ndarray, 1, "dVR", 0))) __PYX_ERR(0, 4261, __pyx_L1_error)
22225  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_abs_det_jac), __pyx_ptype_5numpy_ndarray, 1, "abs_det_jac", 0))) __PYX_ERR(0, 4262, __pyx_L1_error)
22226  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w), __pyx_ptype_5numpy_ndarray, 1, "w", 0))) __PYX_ERR(0, 4263, __pyx_L1_error)
22227  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w_dV), __pyx_ptype_5numpy_ndarray, 1, "w_dV", 0))) __PYX_ERR(0, 4264, __pyx_L1_error)
22228  __pyx_r = __pyx_pf_13cfemIntegrals_182calculateWeightedShape(__pyx_self, __pyx_v_dVR, __pyx_v_abs_det_jac, __pyx_v_w, __pyx_v_w_dV);
22229 
22230  /* function exit code */
22231  goto __pyx_L0;
22232  __pyx_L1_error:;
22233  __pyx_r = NULL;
22234  __pyx_L0:;
22235  __Pyx_RefNannyFinishContext();
22236  return __pyx_r;
22237 }
22238 
22239 static PyObject *__pyx_pf_13cfemIntegrals_182calculateWeightedShape(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dVR, PyArrayObject *__pyx_v_abs_det_jac, PyArrayObject *__pyx_v_w, PyArrayObject *__pyx_v_w_dV) {
22240  int __pyx_v_nElements_global;
22241  int __pyx_v_nQuadraturePoints_element;
22242  int __pyx_v_nDOF_test_element;
22243  PyObject *__pyx_r = NULL;
22244  __Pyx_RefNannyDeclarations
22245  __Pyx_RefNannySetupContext("calculateWeightedShape", 0);
22246 
22247  /* "cfemIntegrals.pyx":4265
22248  * np.ndarray w,
22249  * np.ndarray w_dV):
22250  * cdef int nElements_global = w_dV.shape[0] # <<<<<<<<<<<<<<
22251  * cdef int nQuadraturePoints_element = w_dV.shape[1]
22252  * cdef int nDOF_test_element = w_dV.shape[2]
22253  */
22254  __pyx_v_nElements_global = (__pyx_v_w_dV->dimensions[0]);
22255 
22256  /* "cfemIntegrals.pyx":4266
22257  * np.ndarray w_dV):
22258  * cdef int nElements_global = w_dV.shape[0]
22259  * cdef int nQuadraturePoints_element = w_dV.shape[1] # <<<<<<<<<<<<<<
22260  * cdef int nDOF_test_element = w_dV.shape[2]
22261  * ccalculateWeightedShape(nElements_global,
22262  */
22263  __pyx_v_nQuadraturePoints_element = (__pyx_v_w_dV->dimensions[1]);
22264 
22265  /* "cfemIntegrals.pyx":4267
22266  * cdef int nElements_global = w_dV.shape[0]
22267  * cdef int nQuadraturePoints_element = w_dV.shape[1]
22268  * cdef int nDOF_test_element = w_dV.shape[2] # <<<<<<<<<<<<<<
22269  * ccalculateWeightedShape(nElements_global,
22270  * nQuadraturePoints_element,
22271  */
22272  __pyx_v_nDOF_test_element = (__pyx_v_w_dV->dimensions[2]);
22273 
22274  /* "cfemIntegrals.pyx":4268
22275  * cdef int nQuadraturePoints_element = w_dV.shape[1]
22276  * cdef int nDOF_test_element = w_dV.shape[2]
22277  * ccalculateWeightedShape(nElements_global, # <<<<<<<<<<<<<<
22278  * nQuadraturePoints_element,
22279  * nDOF_test_element,
22280  */
22281  calculateWeightedShape(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_test_element, ((double *)__pyx_v_dVR->data), ((double *)__pyx_v_abs_det_jac->data), ((double *)__pyx_v_w->data), ((double *)__pyx_v_w_dV->data));
22282 
22283  /* "cfemIntegrals.pyx":4261
22284  * <double*> w_dS.data,
22285  * <double*> jac_array.data)
22286  * def calculateWeightedShape(np.ndarray dVR, # <<<<<<<<<<<<<<
22287  * np.ndarray abs_det_jac,
22288  * np.ndarray w,
22289  */
22290 
22291  /* function exit code */
22292  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
22293  __Pyx_XGIVEREF(__pyx_r);
22294  __Pyx_RefNannyFinishContext();
22295  return __pyx_r;
22296 }
22297 
22298 /* "cfemIntegrals.pyx":4275
22299  * <double*>w.data,
22300  * <double*>w_dV.data)
22301  * def calculateWeightedShapeGradients(np.ndarray dVR, # <<<<<<<<<<<<<<
22302  * np.ndarray abs_det_jac,
22303  * np.ndarray grad_w,
22304  */
22305 
22306 /* Python wrapper */
22307 static PyObject *__pyx_pw_13cfemIntegrals_185calculateWeightedShapeGradients(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
22308 static PyMethodDef __pyx_mdef_13cfemIntegrals_185calculateWeightedShapeGradients = {"calculateWeightedShapeGradients", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_185calculateWeightedShapeGradients, METH_VARARGS|METH_KEYWORDS, 0};
22309 static PyObject *__pyx_pw_13cfemIntegrals_185calculateWeightedShapeGradients(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
22310  PyArrayObject *__pyx_v_dVR = 0;
22311  PyArrayObject *__pyx_v_abs_det_jac = 0;
22312  PyArrayObject *__pyx_v_grad_w = 0;
22313  PyArrayObject *__pyx_v_grad_w_dV = 0;
22314  int __pyx_lineno = 0;
22315  const char *__pyx_filename = NULL;
22316  int __pyx_clineno = 0;
22317  PyObject *__pyx_r = 0;
22318  __Pyx_RefNannyDeclarations
22319  __Pyx_RefNannySetupContext("calculateWeightedShapeGradients (wrapper)", 0);
22320  {
22321  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dVR,&__pyx_n_s_abs_det_jac,&__pyx_n_s_grad_w,&__pyx_n_s_grad_w_dV,0};
22322  PyObject* values[4] = {0,0,0,0};
22323  if (unlikely(__pyx_kwds)) {
22324  Py_ssize_t kw_args;
22325  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
22326  switch (pos_args) {
22327  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
22328  CYTHON_FALLTHROUGH;
22329  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
22330  CYTHON_FALLTHROUGH;
22331  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
22332  CYTHON_FALLTHROUGH;
22333  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
22334  CYTHON_FALLTHROUGH;
22335  case 0: break;
22336  default: goto __pyx_L5_argtuple_error;
22337  }
22338  kw_args = PyDict_Size(__pyx_kwds);
22339  switch (pos_args) {
22340  case 0:
22341  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dVR)) != 0)) kw_args--;
22342  else goto __pyx_L5_argtuple_error;
22343  CYTHON_FALLTHROUGH;
22344  case 1:
22345  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_abs_det_jac)) != 0)) kw_args--;
22346  else {
22347  __Pyx_RaiseArgtupleInvalid("calculateWeightedShapeGradients", 1, 4, 4, 1); __PYX_ERR(0, 4275, __pyx_L3_error)
22348  }
22349  CYTHON_FALLTHROUGH;
22350  case 2:
22351  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_w)) != 0)) kw_args--;
22352  else {
22353  __Pyx_RaiseArgtupleInvalid("calculateWeightedShapeGradients", 1, 4, 4, 2); __PYX_ERR(0, 4275, __pyx_L3_error)
22354  }
22355  CYTHON_FALLTHROUGH;
22356  case 3:
22357  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_w_dV)) != 0)) kw_args--;
22358  else {
22359  __Pyx_RaiseArgtupleInvalid("calculateWeightedShapeGradients", 1, 4, 4, 3); __PYX_ERR(0, 4275, __pyx_L3_error)
22360  }
22361  }
22362  if (unlikely(kw_args > 0)) {
22363  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateWeightedShapeGradients") < 0)) __PYX_ERR(0, 4275, __pyx_L3_error)
22364  }
22365  } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
22366  goto __pyx_L5_argtuple_error;
22367  } else {
22368  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
22369  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
22370  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
22371  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
22372  }
22373  __pyx_v_dVR = ((PyArrayObject *)values[0]);
22374  __pyx_v_abs_det_jac = ((PyArrayObject *)values[1]);
22375  __pyx_v_grad_w = ((PyArrayObject *)values[2]);
22376  __pyx_v_grad_w_dV = ((PyArrayObject *)values[3]);
22377  }
22378  goto __pyx_L4_argument_unpacking_done;
22379  __pyx_L5_argtuple_error:;
22380  __Pyx_RaiseArgtupleInvalid("calculateWeightedShapeGradients", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4275, __pyx_L3_error)
22381  __pyx_L3_error:;
22382  __Pyx_AddTraceback("cfemIntegrals.calculateWeightedShapeGradients", __pyx_clineno, __pyx_lineno, __pyx_filename);
22383  __Pyx_RefNannyFinishContext();
22384  return NULL;
22385  __pyx_L4_argument_unpacking_done:;
22386  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dVR), __pyx_ptype_5numpy_ndarray, 1, "dVR", 0))) __PYX_ERR(0, 4275, __pyx_L1_error)
22387  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_abs_det_jac), __pyx_ptype_5numpy_ndarray, 1, "abs_det_jac", 0))) __PYX_ERR(0, 4276, __pyx_L1_error)
22388  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_w), __pyx_ptype_5numpy_ndarray, 1, "grad_w", 0))) __PYX_ERR(0, 4277, __pyx_L1_error)
22389  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_w_dV), __pyx_ptype_5numpy_ndarray, 1, "grad_w_dV", 0))) __PYX_ERR(0, 4278, __pyx_L1_error)
22390  __pyx_r = __pyx_pf_13cfemIntegrals_184calculateWeightedShapeGradients(__pyx_self, __pyx_v_dVR, __pyx_v_abs_det_jac, __pyx_v_grad_w, __pyx_v_grad_w_dV);
22391 
22392  /* function exit code */
22393  goto __pyx_L0;
22394  __pyx_L1_error:;
22395  __pyx_r = NULL;
22396  __pyx_L0:;
22397  __Pyx_RefNannyFinishContext();
22398  return __pyx_r;
22399 }
22400 
22401 static PyObject *__pyx_pf_13cfemIntegrals_184calculateWeightedShapeGradients(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dVR, PyArrayObject *__pyx_v_abs_det_jac, PyArrayObject *__pyx_v_grad_w, PyArrayObject *__pyx_v_grad_w_dV) {
22402  int __pyx_v_nElements_global;
22403  int __pyx_v_nQuadraturePoints_element;
22404  int __pyx_v_nDOF_test_element;
22405  int __pyx_v_nSpace;
22406  PyObject *__pyx_r = NULL;
22407  __Pyx_RefNannyDeclarations
22408  __Pyx_RefNannySetupContext("calculateWeightedShapeGradients", 0);
22409 
22410  /* "cfemIntegrals.pyx":4279
22411  * np.ndarray grad_w,
22412  * np.ndarray grad_w_dV):
22413  * cdef int nElements_global = grad_w_dV.shape[0] # <<<<<<<<<<<<<<
22414  * cdef int nQuadraturePoints_element = grad_w_dV.shape[1]
22415  * cdef int nDOF_test_element = grad_w_dV.shape[2]
22416  */
22417  __pyx_v_nElements_global = (__pyx_v_grad_w_dV->dimensions[0]);
22418 
22419  /* "cfemIntegrals.pyx":4280
22420  * np.ndarray grad_w_dV):
22421  * cdef int nElements_global = grad_w_dV.shape[0]
22422  * cdef int nQuadraturePoints_element = grad_w_dV.shape[1] # <<<<<<<<<<<<<<
22423  * cdef int nDOF_test_element = grad_w_dV.shape[2]
22424  * cdef int nSpace = grad_w_dV.shape[3]
22425  */
22426  __pyx_v_nQuadraturePoints_element = (__pyx_v_grad_w_dV->dimensions[1]);
22427 
22428  /* "cfemIntegrals.pyx":4281
22429  * cdef int nElements_global = grad_w_dV.shape[0]
22430  * cdef int nQuadraturePoints_element = grad_w_dV.shape[1]
22431  * cdef int nDOF_test_element = grad_w_dV.shape[2] # <<<<<<<<<<<<<<
22432  * cdef int nSpace = grad_w_dV.shape[3]
22433  * ccalculateWeightedShapeGradients(nElements_global,
22434  */
22435  __pyx_v_nDOF_test_element = (__pyx_v_grad_w_dV->dimensions[2]);
22436 
22437  /* "cfemIntegrals.pyx":4282
22438  * cdef int nQuadraturePoints_element = grad_w_dV.shape[1]
22439  * cdef int nDOF_test_element = grad_w_dV.shape[2]
22440  * cdef int nSpace = grad_w_dV.shape[3] # <<<<<<<<<<<<<<
22441  * ccalculateWeightedShapeGradients(nElements_global,
22442  * nQuadraturePoints_element,
22443  */
22444  __pyx_v_nSpace = (__pyx_v_grad_w_dV->dimensions[3]);
22445 
22446  /* "cfemIntegrals.pyx":4283
22447  * cdef int nDOF_test_element = grad_w_dV.shape[2]
22448  * cdef int nSpace = grad_w_dV.shape[3]
22449  * ccalculateWeightedShapeGradients(nElements_global, # <<<<<<<<<<<<<<
22450  * nQuadraturePoints_element,
22451  * nDOF_test_element,
22452  */
22453  calculateWeightedShapeGradients(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_test_element, __pyx_v_nSpace, ((double *)__pyx_v_dVR->data), ((double *)__pyx_v_abs_det_jac->data), ((double *)__pyx_v_grad_w->data), ((double *)__pyx_v_grad_w_dV->data));
22454 
22455  /* "cfemIntegrals.pyx":4275
22456  * <double*>w.data,
22457  * <double*>w_dV.data)
22458  * def calculateWeightedShapeGradients(np.ndarray dVR, # <<<<<<<<<<<<<<
22459  * np.ndarray abs_det_jac,
22460  * np.ndarray grad_w,
22461  */
22462 
22463  /* function exit code */
22464  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
22465  __Pyx_XGIVEREF(__pyx_r);
22466  __Pyx_RefNannyFinishContext();
22467  return __pyx_r;
22468 }
22469 
22470 /* "cfemIntegrals.pyx":4291
22471  * <double*>grad_w.data,
22472  * <double*>grad_w_dV.data)
22473  * def calculateShape_X_weightedShape(np.ndarray v, # <<<<<<<<<<<<<<
22474  * np.ndarray w_dV,
22475  * np.ndarray v_X_w_dV):
22476  */
22477 
22478 /* Python wrapper */
22479 static PyObject *__pyx_pw_13cfemIntegrals_187calculateShape_X_weightedShape(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
22480 static PyMethodDef __pyx_mdef_13cfemIntegrals_187calculateShape_X_weightedShape = {"calculateShape_X_weightedShape", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_187calculateShape_X_weightedShape, METH_VARARGS|METH_KEYWORDS, 0};
22481 static PyObject *__pyx_pw_13cfemIntegrals_187calculateShape_X_weightedShape(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
22482  PyArrayObject *__pyx_v_v = 0;
22483  PyArrayObject *__pyx_v_w_dV = 0;
22484  PyArrayObject *__pyx_v_v_X_w_dV = 0;
22485  int __pyx_lineno = 0;
22486  const char *__pyx_filename = NULL;
22487  int __pyx_clineno = 0;
22488  PyObject *__pyx_r = 0;
22489  __Pyx_RefNannyDeclarations
22490  __Pyx_RefNannySetupContext("calculateShape_X_weightedShape (wrapper)", 0);
22491  {
22492  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_v,&__pyx_n_s_w_dV,&__pyx_n_s_v_X_w_dV,0};
22493  PyObject* values[3] = {0,0,0};
22494  if (unlikely(__pyx_kwds)) {
22495  Py_ssize_t kw_args;
22496  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
22497  switch (pos_args) {
22498  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
22499  CYTHON_FALLTHROUGH;
22500  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
22501  CYTHON_FALLTHROUGH;
22502  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
22503  CYTHON_FALLTHROUGH;
22504  case 0: break;
22505  default: goto __pyx_L5_argtuple_error;
22506  }
22507  kw_args = PyDict_Size(__pyx_kwds);
22508  switch (pos_args) {
22509  case 0:
22510  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
22511  else goto __pyx_L5_argtuple_error;
22512  CYTHON_FALLTHROUGH;
22513  case 1:
22514  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_w_dV)) != 0)) kw_args--;
22515  else {
22516  __Pyx_RaiseArgtupleInvalid("calculateShape_X_weightedShape", 1, 3, 3, 1); __PYX_ERR(0, 4291, __pyx_L3_error)
22517  }
22518  CYTHON_FALLTHROUGH;
22519  case 2:
22520  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v_X_w_dV)) != 0)) kw_args--;
22521  else {
22522  __Pyx_RaiseArgtupleInvalid("calculateShape_X_weightedShape", 1, 3, 3, 2); __PYX_ERR(0, 4291, __pyx_L3_error)
22523  }
22524  }
22525  if (unlikely(kw_args > 0)) {
22526  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateShape_X_weightedShape") < 0)) __PYX_ERR(0, 4291, __pyx_L3_error)
22527  }
22528  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
22529  goto __pyx_L5_argtuple_error;
22530  } else {
22531  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
22532  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
22533  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
22534  }
22535  __pyx_v_v = ((PyArrayObject *)values[0]);
22536  __pyx_v_w_dV = ((PyArrayObject *)values[1]);
22537  __pyx_v_v_X_w_dV = ((PyArrayObject *)values[2]);
22538  }
22539  goto __pyx_L4_argument_unpacking_done;
22540  __pyx_L5_argtuple_error:;
22541  __Pyx_RaiseArgtupleInvalid("calculateShape_X_weightedShape", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4291, __pyx_L3_error)
22542  __pyx_L3_error:;
22543  __Pyx_AddTraceback("cfemIntegrals.calculateShape_X_weightedShape", __pyx_clineno, __pyx_lineno, __pyx_filename);
22544  __Pyx_RefNannyFinishContext();
22545  return NULL;
22546  __pyx_L4_argument_unpacking_done:;
22547  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), __pyx_ptype_5numpy_ndarray, 1, "v", 0))) __PYX_ERR(0, 4291, __pyx_L1_error)
22548  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w_dV), __pyx_ptype_5numpy_ndarray, 1, "w_dV", 0))) __PYX_ERR(0, 4292, __pyx_L1_error)
22549  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v_X_w_dV), __pyx_ptype_5numpy_ndarray, 1, "v_X_w_dV", 0))) __PYX_ERR(0, 4293, __pyx_L1_error)
22550  __pyx_r = __pyx_pf_13cfemIntegrals_186calculateShape_X_weightedShape(__pyx_self, __pyx_v_v, __pyx_v_w_dV, __pyx_v_v_X_w_dV);
22551 
22552  /* function exit code */
22553  goto __pyx_L0;
22554  __pyx_L1_error:;
22555  __pyx_r = NULL;
22556  __pyx_L0:;
22557  __Pyx_RefNannyFinishContext();
22558  return __pyx_r;
22559 }
22560 
22561 static PyObject *__pyx_pf_13cfemIntegrals_186calculateShape_X_weightedShape(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_w_dV, PyArrayObject *__pyx_v_v_X_w_dV) {
22562  int __pyx_v_nElements_global;
22563  int __pyx_v_nQuadraturePoints_element;
22564  int __pyx_v_nDOF_trial_element;
22565  int __pyx_v_nDOF_test_element;
22566  PyObject *__pyx_r = NULL;
22567  __Pyx_RefNannyDeclarations
22568  __Pyx_RefNannySetupContext("calculateShape_X_weightedShape", 0);
22569 
22570  /* "cfemIntegrals.pyx":4294
22571  * np.ndarray w_dV,
22572  * np.ndarray v_X_w_dV):
22573  * cdef int nElements_global = v_X_w_dV.shape[0] # <<<<<<<<<<<<<<
22574  * cdef int nQuadraturePoints_element = v_X_w_dV.shape[1]
22575  * cdef int nDOF_trial_element = v_X_w_dV.shape[2]
22576  */
22577  __pyx_v_nElements_global = (__pyx_v_v_X_w_dV->dimensions[0]);
22578 
22579  /* "cfemIntegrals.pyx":4295
22580  * np.ndarray v_X_w_dV):
22581  * cdef int nElements_global = v_X_w_dV.shape[0]
22582  * cdef int nQuadraturePoints_element = v_X_w_dV.shape[1] # <<<<<<<<<<<<<<
22583  * cdef int nDOF_trial_element = v_X_w_dV.shape[2]
22584  * cdef int nDOF_test_element = v_X_w_dV.shape[3]
22585  */
22586  __pyx_v_nQuadraturePoints_element = (__pyx_v_v_X_w_dV->dimensions[1]);
22587 
22588  /* "cfemIntegrals.pyx":4296
22589  * cdef int nElements_global = v_X_w_dV.shape[0]
22590  * cdef int nQuadraturePoints_element = v_X_w_dV.shape[1]
22591  * cdef int nDOF_trial_element = v_X_w_dV.shape[2] # <<<<<<<<<<<<<<
22592  * cdef int nDOF_test_element = v_X_w_dV.shape[3]
22593  * ccalculateShape_X_weightedShape(nElements_global,
22594  */
22595  __pyx_v_nDOF_trial_element = (__pyx_v_v_X_w_dV->dimensions[2]);
22596 
22597  /* "cfemIntegrals.pyx":4297
22598  * cdef int nQuadraturePoints_element = v_X_w_dV.shape[1]
22599  * cdef int nDOF_trial_element = v_X_w_dV.shape[2]
22600  * cdef int nDOF_test_element = v_X_w_dV.shape[3] # <<<<<<<<<<<<<<
22601  * ccalculateShape_X_weightedShape(nElements_global,
22602  * nQuadraturePoints_element,
22603  */
22604  __pyx_v_nDOF_test_element = (__pyx_v_v_X_w_dV->dimensions[3]);
22605 
22606  /* "cfemIntegrals.pyx":4298
22607  * cdef int nDOF_trial_element = v_X_w_dV.shape[2]
22608  * cdef int nDOF_test_element = v_X_w_dV.shape[3]
22609  * ccalculateShape_X_weightedShape(nElements_global, # <<<<<<<<<<<<<<
22610  * nQuadraturePoints_element,
22611  * nDOF_trial_element,
22612  */
22613  calculateShape_X_weightedShape(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_trial_element, __pyx_v_nDOF_test_element, ((double *)__pyx_v_v->data), ((double *)__pyx_v_w_dV->data), ((double *)__pyx_v_v_X_w_dV->data));
22614 
22615  /* "cfemIntegrals.pyx":4291
22616  * <double*>grad_w.data,
22617  * <double*>grad_w_dV.data)
22618  * def calculateShape_X_weightedShape(np.ndarray v, # <<<<<<<<<<<<<<
22619  * np.ndarray w_dV,
22620  * np.ndarray v_X_w_dV):
22621  */
22622 
22623  /* function exit code */
22624  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
22625  __Pyx_XGIVEREF(__pyx_r);
22626  __Pyx_RefNannyFinishContext();
22627  return __pyx_r;
22628 }
22629 
22630 /* "cfemIntegrals.pyx":4305
22631  * <double*>w_dV.data,
22632  * <double*>v_X_w_dV.data)
22633  * def calculateShape_X_weightedGradShape(np.ndarray v, # <<<<<<<<<<<<<<
22634  * np.ndarray grad_w_dV,
22635  * np.ndarray v_X_grad_w_dV):
22636  */
22637 
22638 /* Python wrapper */
22639 static PyObject *__pyx_pw_13cfemIntegrals_189calculateShape_X_weightedGradShape(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
22640 static PyMethodDef __pyx_mdef_13cfemIntegrals_189calculateShape_X_weightedGradShape = {"calculateShape_X_weightedGradShape", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_189calculateShape_X_weightedGradShape, METH_VARARGS|METH_KEYWORDS, 0};
22641 static PyObject *__pyx_pw_13cfemIntegrals_189calculateShape_X_weightedGradShape(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
22642  PyArrayObject *__pyx_v_v = 0;
22643  PyArrayObject *__pyx_v_grad_w_dV = 0;
22644  PyArrayObject *__pyx_v_v_X_grad_w_dV = 0;
22645  int __pyx_lineno = 0;
22646  const char *__pyx_filename = NULL;
22647  int __pyx_clineno = 0;
22648  PyObject *__pyx_r = 0;
22649  __Pyx_RefNannyDeclarations
22650  __Pyx_RefNannySetupContext("calculateShape_X_weightedGradShape (wrapper)", 0);
22651  {
22652  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_v,&__pyx_n_s_grad_w_dV,&__pyx_n_s_v_X_grad_w_dV,0};
22653  PyObject* values[3] = {0,0,0};
22654  if (unlikely(__pyx_kwds)) {
22655  Py_ssize_t kw_args;
22656  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
22657  switch (pos_args) {
22658  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
22659  CYTHON_FALLTHROUGH;
22660  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
22661  CYTHON_FALLTHROUGH;
22662  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
22663  CYTHON_FALLTHROUGH;
22664  case 0: break;
22665  default: goto __pyx_L5_argtuple_error;
22666  }
22667  kw_args = PyDict_Size(__pyx_kwds);
22668  switch (pos_args) {
22669  case 0:
22670  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
22671  else goto __pyx_L5_argtuple_error;
22672  CYTHON_FALLTHROUGH;
22673  case 1:
22674  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_w_dV)) != 0)) kw_args--;
22675  else {
22676  __Pyx_RaiseArgtupleInvalid("calculateShape_X_weightedGradShape", 1, 3, 3, 1); __PYX_ERR(0, 4305, __pyx_L3_error)
22677  }
22678  CYTHON_FALLTHROUGH;
22679  case 2:
22680  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v_X_grad_w_dV)) != 0)) kw_args--;
22681  else {
22682  __Pyx_RaiseArgtupleInvalid("calculateShape_X_weightedGradShape", 1, 3, 3, 2); __PYX_ERR(0, 4305, __pyx_L3_error)
22683  }
22684  }
22685  if (unlikely(kw_args > 0)) {
22686  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateShape_X_weightedGradShape") < 0)) __PYX_ERR(0, 4305, __pyx_L3_error)
22687  }
22688  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
22689  goto __pyx_L5_argtuple_error;
22690  } else {
22691  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
22692  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
22693  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
22694  }
22695  __pyx_v_v = ((PyArrayObject *)values[0]);
22696  __pyx_v_grad_w_dV = ((PyArrayObject *)values[1]);
22697  __pyx_v_v_X_grad_w_dV = ((PyArrayObject *)values[2]);
22698  }
22699  goto __pyx_L4_argument_unpacking_done;
22700  __pyx_L5_argtuple_error:;
22701  __Pyx_RaiseArgtupleInvalid("calculateShape_X_weightedGradShape", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4305, __pyx_L3_error)
22702  __pyx_L3_error:;
22703  __Pyx_AddTraceback("cfemIntegrals.calculateShape_X_weightedGradShape", __pyx_clineno, __pyx_lineno, __pyx_filename);
22704  __Pyx_RefNannyFinishContext();
22705  return NULL;
22706  __pyx_L4_argument_unpacking_done:;
22707  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), __pyx_ptype_5numpy_ndarray, 1, "v", 0))) __PYX_ERR(0, 4305, __pyx_L1_error)
22708  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_w_dV), __pyx_ptype_5numpy_ndarray, 1, "grad_w_dV", 0))) __PYX_ERR(0, 4306, __pyx_L1_error)
22709  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v_X_grad_w_dV), __pyx_ptype_5numpy_ndarray, 1, "v_X_grad_w_dV", 0))) __PYX_ERR(0, 4307, __pyx_L1_error)
22710  __pyx_r = __pyx_pf_13cfemIntegrals_188calculateShape_X_weightedGradShape(__pyx_self, __pyx_v_v, __pyx_v_grad_w_dV, __pyx_v_v_X_grad_w_dV);
22711 
22712  /* function exit code */
22713  goto __pyx_L0;
22714  __pyx_L1_error:;
22715  __pyx_r = NULL;
22716  __pyx_L0:;
22717  __Pyx_RefNannyFinishContext();
22718  return __pyx_r;
22719 }
22720 
22721 static PyObject *__pyx_pf_13cfemIntegrals_188calculateShape_X_weightedGradShape(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_grad_w_dV, PyArrayObject *__pyx_v_v_X_grad_w_dV) {
22722  int __pyx_v_nElements_global;
22723  int __pyx_v_nQuadraturePoints_element;
22724  int __pyx_v_nDOF_trial_element;
22725  int __pyx_v_nDOF_test_element;
22726  int __pyx_v_nSpace;
22727  PyObject *__pyx_r = NULL;
22728  __Pyx_RefNannyDeclarations
22729  __Pyx_RefNannySetupContext("calculateShape_X_weightedGradShape", 0);
22730 
22731  /* "cfemIntegrals.pyx":4308
22732  * np.ndarray grad_w_dV,
22733  * np.ndarray v_X_grad_w_dV):
22734  * cdef int nElements_global = v_X_grad_w_dV.shape[0] # <<<<<<<<<<<<<<
22735  * cdef int nQuadraturePoints_element = v_X_grad_w_dV.shape[1]
22736  * cdef int nDOF_trial_element = v_X_grad_w_dV.shape[2]
22737  */
22738  __pyx_v_nElements_global = (__pyx_v_v_X_grad_w_dV->dimensions[0]);
22739 
22740  /* "cfemIntegrals.pyx":4309
22741  * np.ndarray v_X_grad_w_dV):
22742  * cdef int nElements_global = v_X_grad_w_dV.shape[0]
22743  * cdef int nQuadraturePoints_element = v_X_grad_w_dV.shape[1] # <<<<<<<<<<<<<<
22744  * cdef int nDOF_trial_element = v_X_grad_w_dV.shape[2]
22745  * cdef int nDOF_test_element = v_X_grad_w_dV.shape[3]
22746  */
22747  __pyx_v_nQuadraturePoints_element = (__pyx_v_v_X_grad_w_dV->dimensions[1]);
22748 
22749  /* "cfemIntegrals.pyx":4310
22750  * cdef int nElements_global = v_X_grad_w_dV.shape[0]
22751  * cdef int nQuadraturePoints_element = v_X_grad_w_dV.shape[1]
22752  * cdef int nDOF_trial_element = v_X_grad_w_dV.shape[2] # <<<<<<<<<<<<<<
22753  * cdef int nDOF_test_element = v_X_grad_w_dV.shape[3]
22754  * cdef int nSpace = v_X_grad_w_dV.shape[4]
22755  */
22756  __pyx_v_nDOF_trial_element = (__pyx_v_v_X_grad_w_dV->dimensions[2]);
22757 
22758  /* "cfemIntegrals.pyx":4311
22759  * cdef int nQuadraturePoints_element = v_X_grad_w_dV.shape[1]
22760  * cdef int nDOF_trial_element = v_X_grad_w_dV.shape[2]
22761  * cdef int nDOF_test_element = v_X_grad_w_dV.shape[3] # <<<<<<<<<<<<<<
22762  * cdef int nSpace = v_X_grad_w_dV.shape[4]
22763  * ccalculateShape_X_weightedGradShape(nElements_global,
22764  */
22765  __pyx_v_nDOF_test_element = (__pyx_v_v_X_grad_w_dV->dimensions[3]);
22766 
22767  /* "cfemIntegrals.pyx":4312
22768  * cdef int nDOF_trial_element = v_X_grad_w_dV.shape[2]
22769  * cdef int nDOF_test_element = v_X_grad_w_dV.shape[3]
22770  * cdef int nSpace = v_X_grad_w_dV.shape[4] # <<<<<<<<<<<<<<
22771  * ccalculateShape_X_weightedGradShape(nElements_global,
22772  * nQuadraturePoints_element,
22773  */
22774  __pyx_v_nSpace = (__pyx_v_v_X_grad_w_dV->dimensions[4]);
22775 
22776  /* "cfemIntegrals.pyx":4313
22777  * cdef int nDOF_test_element = v_X_grad_w_dV.shape[3]
22778  * cdef int nSpace = v_X_grad_w_dV.shape[4]
22779  * ccalculateShape_X_weightedGradShape(nElements_global, # <<<<<<<<<<<<<<
22780  * nQuadraturePoints_element,
22781  * nDOF_trial_element,
22782  */
22783  calculateShape_X_weightedGradShape(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_trial_element, __pyx_v_nDOF_test_element, __pyx_v_nSpace, ((double *)__pyx_v_v->data), ((double *)__pyx_v_grad_w_dV->data), ((double *)__pyx_v_v_X_grad_w_dV->data));
22784 
22785  /* "cfemIntegrals.pyx":4305
22786  * <double*>w_dV.data,
22787  * <double*>v_X_w_dV.data)
22788  * def calculateShape_X_weightedGradShape(np.ndarray v, # <<<<<<<<<<<<<<
22789  * np.ndarray grad_w_dV,
22790  * np.ndarray v_X_grad_w_dV):
22791  */
22792 
22793  /* function exit code */
22794  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
22795  __Pyx_XGIVEREF(__pyx_r);
22796  __Pyx_RefNannyFinishContext();
22797  return __pyx_r;
22798 }
22799 
22800 /* "cfemIntegrals.pyx":4321
22801  * <double*>grad_w_dV.data,
22802  * <double*>v_X_grad_w_dV.data)
22803  * def calculateGradShape_X_weightedShape(np.ndarray grad_v, # <<<<<<<<<<<<<<
22804  * np.ndarray w_dV,
22805  * np.ndarray grad_v_X_w_dV):
22806  */
22807 
22808 /* Python wrapper */
22809 static PyObject *__pyx_pw_13cfemIntegrals_191calculateGradShape_X_weightedShape(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
22810 static PyMethodDef __pyx_mdef_13cfemIntegrals_191calculateGradShape_X_weightedShape = {"calculateGradShape_X_weightedShape", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_191calculateGradShape_X_weightedShape, METH_VARARGS|METH_KEYWORDS, 0};
22811 static PyObject *__pyx_pw_13cfemIntegrals_191calculateGradShape_X_weightedShape(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
22812  PyArrayObject *__pyx_v_grad_v = 0;
22813  PyArrayObject *__pyx_v_w_dV = 0;
22814  PyArrayObject *__pyx_v_grad_v_X_w_dV = 0;
22815  int __pyx_lineno = 0;
22816  const char *__pyx_filename = NULL;
22817  int __pyx_clineno = 0;
22818  PyObject *__pyx_r = 0;
22819  __Pyx_RefNannyDeclarations
22820  __Pyx_RefNannySetupContext("calculateGradShape_X_weightedShape (wrapper)", 0);
22821  {
22822  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_grad_v,&__pyx_n_s_w_dV,&__pyx_n_s_grad_v_X_w_dV,0};
22823  PyObject* values[3] = {0,0,0};
22824  if (unlikely(__pyx_kwds)) {
22825  Py_ssize_t kw_args;
22826  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
22827  switch (pos_args) {
22828  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
22829  CYTHON_FALLTHROUGH;
22830  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
22831  CYTHON_FALLTHROUGH;
22832  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
22833  CYTHON_FALLTHROUGH;
22834  case 0: break;
22835  default: goto __pyx_L5_argtuple_error;
22836  }
22837  kw_args = PyDict_Size(__pyx_kwds);
22838  switch (pos_args) {
22839  case 0:
22840  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_v)) != 0)) kw_args--;
22841  else goto __pyx_L5_argtuple_error;
22842  CYTHON_FALLTHROUGH;
22843  case 1:
22844  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_w_dV)) != 0)) kw_args--;
22845  else {
22846  __Pyx_RaiseArgtupleInvalid("calculateGradShape_X_weightedShape", 1, 3, 3, 1); __PYX_ERR(0, 4321, __pyx_L3_error)
22847  }
22848  CYTHON_FALLTHROUGH;
22849  case 2:
22850  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_v_X_w_dV)) != 0)) kw_args--;
22851  else {
22852  __Pyx_RaiseArgtupleInvalid("calculateGradShape_X_weightedShape", 1, 3, 3, 2); __PYX_ERR(0, 4321, __pyx_L3_error)
22853  }
22854  }
22855  if (unlikely(kw_args > 0)) {
22856  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateGradShape_X_weightedShape") < 0)) __PYX_ERR(0, 4321, __pyx_L3_error)
22857  }
22858  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
22859  goto __pyx_L5_argtuple_error;
22860  } else {
22861  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
22862  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
22863  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
22864  }
22865  __pyx_v_grad_v = ((PyArrayObject *)values[0]);
22866  __pyx_v_w_dV = ((PyArrayObject *)values[1]);
22867  __pyx_v_grad_v_X_w_dV = ((PyArrayObject *)values[2]);
22868  }
22869  goto __pyx_L4_argument_unpacking_done;
22870  __pyx_L5_argtuple_error:;
22871  __Pyx_RaiseArgtupleInvalid("calculateGradShape_X_weightedShape", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4321, __pyx_L3_error)
22872  __pyx_L3_error:;
22873  __Pyx_AddTraceback("cfemIntegrals.calculateGradShape_X_weightedShape", __pyx_clineno, __pyx_lineno, __pyx_filename);
22874  __Pyx_RefNannyFinishContext();
22875  return NULL;
22876  __pyx_L4_argument_unpacking_done:;
22877  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_v), __pyx_ptype_5numpy_ndarray, 1, "grad_v", 0))) __PYX_ERR(0, 4321, __pyx_L1_error)
22878  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w_dV), __pyx_ptype_5numpy_ndarray, 1, "w_dV", 0))) __PYX_ERR(0, 4322, __pyx_L1_error)
22879  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_v_X_w_dV), __pyx_ptype_5numpy_ndarray, 1, "grad_v_X_w_dV", 0))) __PYX_ERR(0, 4323, __pyx_L1_error)
22880  __pyx_r = __pyx_pf_13cfemIntegrals_190calculateGradShape_X_weightedShape(__pyx_self, __pyx_v_grad_v, __pyx_v_w_dV, __pyx_v_grad_v_X_w_dV);
22881 
22882  /* function exit code */
22883  goto __pyx_L0;
22884  __pyx_L1_error:;
22885  __pyx_r = NULL;
22886  __pyx_L0:;
22887  __Pyx_RefNannyFinishContext();
22888  return __pyx_r;
22889 }
22890 
22891 static PyObject *__pyx_pf_13cfemIntegrals_190calculateGradShape_X_weightedShape(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_grad_v, PyArrayObject *__pyx_v_w_dV, PyArrayObject *__pyx_v_grad_v_X_w_dV) {
22892  int __pyx_v_nElements_global;
22893  int __pyx_v_nQuadraturePoints_element;
22894  int __pyx_v_nDOF_trial_element;
22895  int __pyx_v_nDOF_test_element;
22896  int __pyx_v_nSpace;
22897  PyObject *__pyx_r = NULL;
22898  __Pyx_RefNannyDeclarations
22899  __Pyx_RefNannySetupContext("calculateGradShape_X_weightedShape", 0);
22900 
22901  /* "cfemIntegrals.pyx":4324
22902  * np.ndarray w_dV,
22903  * np.ndarray grad_v_X_w_dV):
22904  * cdef int nElements_global = grad_v_X_w_dV.shape[0] # <<<<<<<<<<<<<<
22905  * cdef int nQuadraturePoints_element = grad_v_X_w_dV.shape[1]
22906  * cdef int nDOF_trial_element = grad_v_X_w_dV.shape[2]
22907  */
22908  __pyx_v_nElements_global = (__pyx_v_grad_v_X_w_dV->dimensions[0]);
22909 
22910  /* "cfemIntegrals.pyx":4325
22911  * np.ndarray grad_v_X_w_dV):
22912  * cdef int nElements_global = grad_v_X_w_dV.shape[0]
22913  * cdef int nQuadraturePoints_element = grad_v_X_w_dV.shape[1] # <<<<<<<<<<<<<<
22914  * cdef int nDOF_trial_element = grad_v_X_w_dV.shape[2]
22915  * cdef int nDOF_test_element = grad_v_X_w_dV.shape[3]
22916  */
22917  __pyx_v_nQuadraturePoints_element = (__pyx_v_grad_v_X_w_dV->dimensions[1]);
22918 
22919  /* "cfemIntegrals.pyx":4326
22920  * cdef int nElements_global = grad_v_X_w_dV.shape[0]
22921  * cdef int nQuadraturePoints_element = grad_v_X_w_dV.shape[1]
22922  * cdef int nDOF_trial_element = grad_v_X_w_dV.shape[2] # <<<<<<<<<<<<<<
22923  * cdef int nDOF_test_element = grad_v_X_w_dV.shape[3]
22924  * cdef int nSpace = grad_v_X_w_dV.shape[4]
22925  */
22926  __pyx_v_nDOF_trial_element = (__pyx_v_grad_v_X_w_dV->dimensions[2]);
22927 
22928  /* "cfemIntegrals.pyx":4327
22929  * cdef int nQuadraturePoints_element = grad_v_X_w_dV.shape[1]
22930  * cdef int nDOF_trial_element = grad_v_X_w_dV.shape[2]
22931  * cdef int nDOF_test_element = grad_v_X_w_dV.shape[3] # <<<<<<<<<<<<<<
22932  * cdef int nSpace = grad_v_X_w_dV.shape[4]
22933  * ccalculateGradShape_X_weightedShape(nElements_global,
22934  */
22935  __pyx_v_nDOF_test_element = (__pyx_v_grad_v_X_w_dV->dimensions[3]);
22936 
22937  /* "cfemIntegrals.pyx":4328
22938  * cdef int nDOF_trial_element = grad_v_X_w_dV.shape[2]
22939  * cdef int nDOF_test_element = grad_v_X_w_dV.shape[3]
22940  * cdef int nSpace = grad_v_X_w_dV.shape[4] # <<<<<<<<<<<<<<
22941  * ccalculateGradShape_X_weightedShape(nElements_global,
22942  * nQuadraturePoints_element,
22943  */
22944  __pyx_v_nSpace = (__pyx_v_grad_v_X_w_dV->dimensions[4]);
22945 
22946  /* "cfemIntegrals.pyx":4329
22947  * cdef int nDOF_test_element = grad_v_X_w_dV.shape[3]
22948  * cdef int nSpace = grad_v_X_w_dV.shape[4]
22949  * ccalculateGradShape_X_weightedShape(nElements_global, # <<<<<<<<<<<<<<
22950  * nQuadraturePoints_element,
22951  * nDOF_trial_element,
22952  */
22953  calculateGradShape_X_weightedShape(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_trial_element, __pyx_v_nDOF_test_element, __pyx_v_nSpace, ((double *)__pyx_v_grad_v->data), ((double *)__pyx_v_w_dV->data), ((double *)__pyx_v_grad_v_X_w_dV->data));
22954 
22955  /* "cfemIntegrals.pyx":4321
22956  * <double*>grad_w_dV.data,
22957  * <double*>v_X_grad_w_dV.data)
22958  * def calculateGradShape_X_weightedShape(np.ndarray grad_v, # <<<<<<<<<<<<<<
22959  * np.ndarray w_dV,
22960  * np.ndarray grad_v_X_w_dV):
22961  */
22962 
22963  /* function exit code */
22964  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
22965  __Pyx_XGIVEREF(__pyx_r);
22966  __Pyx_RefNannyFinishContext();
22967  return __pyx_r;
22968 }
22969 
22970 /* "cfemIntegrals.pyx":4337
22971  * <double*>w_dV.data,
22972  * <double*>grad_v_X_w_dV.data)
22973  * def calculateGradShape_X_weightedGradShape(np.ndarray grad_v, # <<<<<<<<<<<<<<
22974  * np.ndarray grad_w_dV,
22975  * np.ndarray grad_v_X_grad_w_dV):
22976  */
22977 
22978 /* Python wrapper */
22979 static PyObject *__pyx_pw_13cfemIntegrals_193calculateGradShape_X_weightedGradShape(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
22980 static PyMethodDef __pyx_mdef_13cfemIntegrals_193calculateGradShape_X_weightedGradShape = {"calculateGradShape_X_weightedGradShape", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_193calculateGradShape_X_weightedGradShape, METH_VARARGS|METH_KEYWORDS, 0};
22981 static PyObject *__pyx_pw_13cfemIntegrals_193calculateGradShape_X_weightedGradShape(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
22982  PyArrayObject *__pyx_v_grad_v = 0;
22983  PyArrayObject *__pyx_v_grad_w_dV = 0;
22984  PyArrayObject *__pyx_v_grad_v_X_grad_w_dV = 0;
22985  int __pyx_lineno = 0;
22986  const char *__pyx_filename = NULL;
22987  int __pyx_clineno = 0;
22988  PyObject *__pyx_r = 0;
22989  __Pyx_RefNannyDeclarations
22990  __Pyx_RefNannySetupContext("calculateGradShape_X_weightedGradShape (wrapper)", 0);
22991  {
22992  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_grad_v,&__pyx_n_s_grad_w_dV,&__pyx_n_s_grad_v_X_grad_w_dV,0};
22993  PyObject* values[3] = {0,0,0};
22994  if (unlikely(__pyx_kwds)) {
22995  Py_ssize_t kw_args;
22996  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
22997  switch (pos_args) {
22998  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
22999  CYTHON_FALLTHROUGH;
23000  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
23001  CYTHON_FALLTHROUGH;
23002  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
23003  CYTHON_FALLTHROUGH;
23004  case 0: break;
23005  default: goto __pyx_L5_argtuple_error;
23006  }
23007  kw_args = PyDict_Size(__pyx_kwds);
23008  switch (pos_args) {
23009  case 0:
23010  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_v)) != 0)) kw_args--;
23011  else goto __pyx_L5_argtuple_error;
23012  CYTHON_FALLTHROUGH;
23013  case 1:
23014  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_w_dV)) != 0)) kw_args--;
23015  else {
23016  __Pyx_RaiseArgtupleInvalid("calculateGradShape_X_weightedGradShape", 1, 3, 3, 1); __PYX_ERR(0, 4337, __pyx_L3_error)
23017  }
23018  CYTHON_FALLTHROUGH;
23019  case 2:
23020  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_v_X_grad_w_dV)) != 0)) kw_args--;
23021  else {
23022  __Pyx_RaiseArgtupleInvalid("calculateGradShape_X_weightedGradShape", 1, 3, 3, 2); __PYX_ERR(0, 4337, __pyx_L3_error)
23023  }
23024  }
23025  if (unlikely(kw_args > 0)) {
23026  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateGradShape_X_weightedGradShape") < 0)) __PYX_ERR(0, 4337, __pyx_L3_error)
23027  }
23028  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
23029  goto __pyx_L5_argtuple_error;
23030  } else {
23031  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
23032  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
23033  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
23034  }
23035  __pyx_v_grad_v = ((PyArrayObject *)values[0]);
23036  __pyx_v_grad_w_dV = ((PyArrayObject *)values[1]);
23037  __pyx_v_grad_v_X_grad_w_dV = ((PyArrayObject *)values[2]);
23038  }
23039  goto __pyx_L4_argument_unpacking_done;
23040  __pyx_L5_argtuple_error:;
23041  __Pyx_RaiseArgtupleInvalid("calculateGradShape_X_weightedGradShape", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4337, __pyx_L3_error)
23042  __pyx_L3_error:;
23043  __Pyx_AddTraceback("cfemIntegrals.calculateGradShape_X_weightedGradShape", __pyx_clineno, __pyx_lineno, __pyx_filename);
23044  __Pyx_RefNannyFinishContext();
23045  return NULL;
23046  __pyx_L4_argument_unpacking_done:;
23047  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_v), __pyx_ptype_5numpy_ndarray, 1, "grad_v", 0))) __PYX_ERR(0, 4337, __pyx_L1_error)
23048  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_w_dV), __pyx_ptype_5numpy_ndarray, 1, "grad_w_dV", 0))) __PYX_ERR(0, 4338, __pyx_L1_error)
23049  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_v_X_grad_w_dV), __pyx_ptype_5numpy_ndarray, 1, "grad_v_X_grad_w_dV", 0))) __PYX_ERR(0, 4339, __pyx_L1_error)
23050  __pyx_r = __pyx_pf_13cfemIntegrals_192calculateGradShape_X_weightedGradShape(__pyx_self, __pyx_v_grad_v, __pyx_v_grad_w_dV, __pyx_v_grad_v_X_grad_w_dV);
23051 
23052  /* function exit code */
23053  goto __pyx_L0;
23054  __pyx_L1_error:;
23055  __pyx_r = NULL;
23056  __pyx_L0:;
23057  __Pyx_RefNannyFinishContext();
23058  return __pyx_r;
23059 }
23060 
23061 static PyObject *__pyx_pf_13cfemIntegrals_192calculateGradShape_X_weightedGradShape(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_grad_v, PyArrayObject *__pyx_v_grad_w_dV, PyArrayObject *__pyx_v_grad_v_X_grad_w_dV) {
23062  int __pyx_v_nElements_global;
23063  int __pyx_v_nQuadraturePoints_element;
23064  int __pyx_v_nDOF_trial_element;
23065  int __pyx_v_nDOF_test_element;
23066  int __pyx_v_nSpace;
23067  PyObject *__pyx_r = NULL;
23068  __Pyx_RefNannyDeclarations
23069  __Pyx_RefNannySetupContext("calculateGradShape_X_weightedGradShape", 0);
23070 
23071  /* "cfemIntegrals.pyx":4340
23072  * np.ndarray grad_w_dV,
23073  * np.ndarray grad_v_X_grad_w_dV):
23074  * cdef int nElements_global = grad_v_X_grad_w_dV.shape[0] # <<<<<<<<<<<<<<
23075  * cdef int nQuadraturePoints_element = grad_v_X_grad_w_dV.shape[1]
23076  * cdef int nDOF_trial_element = grad_v_X_grad_w_dV.shape[2]
23077  */
23078  __pyx_v_nElements_global = (__pyx_v_grad_v_X_grad_w_dV->dimensions[0]);
23079 
23080  /* "cfemIntegrals.pyx":4341
23081  * np.ndarray grad_v_X_grad_w_dV):
23082  * cdef int nElements_global = grad_v_X_grad_w_dV.shape[0]
23083  * cdef int nQuadraturePoints_element = grad_v_X_grad_w_dV.shape[1] # <<<<<<<<<<<<<<
23084  * cdef int nDOF_trial_element = grad_v_X_grad_w_dV.shape[2]
23085  * cdef int nDOF_test_element = grad_v_X_grad_w_dV.shape[3]
23086  */
23087  __pyx_v_nQuadraturePoints_element = (__pyx_v_grad_v_X_grad_w_dV->dimensions[1]);
23088 
23089  /* "cfemIntegrals.pyx":4342
23090  * cdef int nElements_global = grad_v_X_grad_w_dV.shape[0]
23091  * cdef int nQuadraturePoints_element = grad_v_X_grad_w_dV.shape[1]
23092  * cdef int nDOF_trial_element = grad_v_X_grad_w_dV.shape[2] # <<<<<<<<<<<<<<
23093  * cdef int nDOF_test_element = grad_v_X_grad_w_dV.shape[3]
23094  * cdef int nSpace = grad_v_X_grad_w_dV.shape[4]
23095  */
23096  __pyx_v_nDOF_trial_element = (__pyx_v_grad_v_X_grad_w_dV->dimensions[2]);
23097 
23098  /* "cfemIntegrals.pyx":4343
23099  * cdef int nQuadraturePoints_element = grad_v_X_grad_w_dV.shape[1]
23100  * cdef int nDOF_trial_element = grad_v_X_grad_w_dV.shape[2]
23101  * cdef int nDOF_test_element = grad_v_X_grad_w_dV.shape[3] # <<<<<<<<<<<<<<
23102  * cdef int nSpace = grad_v_X_grad_w_dV.shape[4]
23103  * ccalculateGradShape_X_weightedGradShape(nElements_global,
23104  */
23105  __pyx_v_nDOF_test_element = (__pyx_v_grad_v_X_grad_w_dV->dimensions[3]);
23106 
23107  /* "cfemIntegrals.pyx":4344
23108  * cdef int nDOF_trial_element = grad_v_X_grad_w_dV.shape[2]
23109  * cdef int nDOF_test_element = grad_v_X_grad_w_dV.shape[3]
23110  * cdef int nSpace = grad_v_X_grad_w_dV.shape[4] # <<<<<<<<<<<<<<
23111  * ccalculateGradShape_X_weightedGradShape(nElements_global,
23112  * nQuadraturePoints_element,
23113  */
23114  __pyx_v_nSpace = (__pyx_v_grad_v_X_grad_w_dV->dimensions[4]);
23115 
23116  /* "cfemIntegrals.pyx":4345
23117  * cdef int nDOF_test_element = grad_v_X_grad_w_dV.shape[3]
23118  * cdef int nSpace = grad_v_X_grad_w_dV.shape[4]
23119  * ccalculateGradShape_X_weightedGradShape(nElements_global, # <<<<<<<<<<<<<<
23120  * nQuadraturePoints_element,
23121  * nDOF_trial_element,
23122  */
23123  calculateGradShape_X_weightedGradShape(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_trial_element, __pyx_v_nDOF_test_element, __pyx_v_nSpace, ((double *)__pyx_v_grad_v->data), ((double *)__pyx_v_grad_w_dV->data), ((double *)__pyx_v_grad_v_X_grad_w_dV->data));
23124 
23125  /* "cfemIntegrals.pyx":4337
23126  * <double*>w_dV.data,
23127  * <double*>grad_v_X_w_dV.data)
23128  * def calculateGradShape_X_weightedGradShape(np.ndarray grad_v, # <<<<<<<<<<<<<<
23129  * np.ndarray grad_w_dV,
23130  * np.ndarray grad_v_X_grad_w_dV):
23131  */
23132 
23133  /* function exit code */
23134  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
23135  __Pyx_XGIVEREF(__pyx_r);
23136  __Pyx_RefNannyFinishContext();
23137  return __pyx_r;
23138 }
23139 
23140 /* "cfemIntegrals.pyx":4353
23141  * <double*>grad_w_dV.data,
23142  * <double*>grad_v_X_grad_w_dV.data)
23143  * def calculateWeightedShapeTrace(np.ndarray dSR, # <<<<<<<<<<<<<<
23144  * np.ndarray sqrt_det_g,
23145  * np.ndarray w,
23146  */
23147 
23148 /* Python wrapper */
23149 static PyObject *__pyx_pw_13cfemIntegrals_195calculateWeightedShapeTrace(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
23150 static PyMethodDef __pyx_mdef_13cfemIntegrals_195calculateWeightedShapeTrace = {"calculateWeightedShapeTrace", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_195calculateWeightedShapeTrace, METH_VARARGS|METH_KEYWORDS, 0};
23151 static PyObject *__pyx_pw_13cfemIntegrals_195calculateWeightedShapeTrace(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
23152  PyArrayObject *__pyx_v_dSR = 0;
23153  PyArrayObject *__pyx_v_sqrt_det_g = 0;
23154  PyArrayObject *__pyx_v_w = 0;
23155  PyArrayObject *__pyx_v_w_dS = 0;
23156  int __pyx_lineno = 0;
23157  const char *__pyx_filename = NULL;
23158  int __pyx_clineno = 0;
23159  PyObject *__pyx_r = 0;
23160  __Pyx_RefNannyDeclarations
23161  __Pyx_RefNannySetupContext("calculateWeightedShapeTrace (wrapper)", 0);
23162  {
23163  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dSR,&__pyx_n_s_sqrt_det_g,&__pyx_n_s_w,&__pyx_n_s_w_dS,0};
23164  PyObject* values[4] = {0,0,0,0};
23165  if (unlikely(__pyx_kwds)) {
23166  Py_ssize_t kw_args;
23167  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
23168  switch (pos_args) {
23169  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
23170  CYTHON_FALLTHROUGH;
23171  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
23172  CYTHON_FALLTHROUGH;
23173  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
23174  CYTHON_FALLTHROUGH;
23175  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
23176  CYTHON_FALLTHROUGH;
23177  case 0: break;
23178  default: goto __pyx_L5_argtuple_error;
23179  }
23180  kw_args = PyDict_Size(__pyx_kwds);
23181  switch (pos_args) {
23182  case 0:
23183  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dSR)) != 0)) kw_args--;
23184  else goto __pyx_L5_argtuple_error;
23185  CYTHON_FALLTHROUGH;
23186  case 1:
23187  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sqrt_det_g)) != 0)) kw_args--;
23188  else {
23189  __Pyx_RaiseArgtupleInvalid("calculateWeightedShapeTrace", 1, 4, 4, 1); __PYX_ERR(0, 4353, __pyx_L3_error)
23190  }
23191  CYTHON_FALLTHROUGH;
23192  case 2:
23193  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_w)) != 0)) kw_args--;
23194  else {
23195  __Pyx_RaiseArgtupleInvalid("calculateWeightedShapeTrace", 1, 4, 4, 2); __PYX_ERR(0, 4353, __pyx_L3_error)
23196  }
23197  CYTHON_FALLTHROUGH;
23198  case 3:
23199  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_w_dS)) != 0)) kw_args--;
23200  else {
23201  __Pyx_RaiseArgtupleInvalid("calculateWeightedShapeTrace", 1, 4, 4, 3); __PYX_ERR(0, 4353, __pyx_L3_error)
23202  }
23203  }
23204  if (unlikely(kw_args > 0)) {
23205  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateWeightedShapeTrace") < 0)) __PYX_ERR(0, 4353, __pyx_L3_error)
23206  }
23207  } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
23208  goto __pyx_L5_argtuple_error;
23209  } else {
23210  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
23211  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
23212  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
23213  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
23214  }
23215  __pyx_v_dSR = ((PyArrayObject *)values[0]);
23216  __pyx_v_sqrt_det_g = ((PyArrayObject *)values[1]);
23217  __pyx_v_w = ((PyArrayObject *)values[2]);
23218  __pyx_v_w_dS = ((PyArrayObject *)values[3]);
23219  }
23220  goto __pyx_L4_argument_unpacking_done;
23221  __pyx_L5_argtuple_error:;
23222  __Pyx_RaiseArgtupleInvalid("calculateWeightedShapeTrace", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4353, __pyx_L3_error)
23223  __pyx_L3_error:;
23224  __Pyx_AddTraceback("cfemIntegrals.calculateWeightedShapeTrace", __pyx_clineno, __pyx_lineno, __pyx_filename);
23225  __Pyx_RefNannyFinishContext();
23226  return NULL;
23227  __pyx_L4_argument_unpacking_done:;
23228  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dSR), __pyx_ptype_5numpy_ndarray, 1, "dSR", 0))) __PYX_ERR(0, 4353, __pyx_L1_error)
23229  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sqrt_det_g), __pyx_ptype_5numpy_ndarray, 1, "sqrt_det_g", 0))) __PYX_ERR(0, 4354, __pyx_L1_error)
23230  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w), __pyx_ptype_5numpy_ndarray, 1, "w", 0))) __PYX_ERR(0, 4355, __pyx_L1_error)
23231  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w_dS), __pyx_ptype_5numpy_ndarray, 1, "w_dS", 0))) __PYX_ERR(0, 4356, __pyx_L1_error)
23232  __pyx_r = __pyx_pf_13cfemIntegrals_194calculateWeightedShapeTrace(__pyx_self, __pyx_v_dSR, __pyx_v_sqrt_det_g, __pyx_v_w, __pyx_v_w_dS);
23233 
23234  /* function exit code */
23235  goto __pyx_L0;
23236  __pyx_L1_error:;
23237  __pyx_r = NULL;
23238  __pyx_L0:;
23239  __Pyx_RefNannyFinishContext();
23240  return __pyx_r;
23241 }
23242 
23243 static PyObject *__pyx_pf_13cfemIntegrals_194calculateWeightedShapeTrace(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dSR, PyArrayObject *__pyx_v_sqrt_det_g, PyArrayObject *__pyx_v_w, PyArrayObject *__pyx_v_w_dS) {
23244  int __pyx_v_nElements_global;
23245  int __pyx_v_nElementBoundaries_element;
23246  int __pyx_v_nElementBoundaryQuadraturePoints_elementBoundary;
23247  int __pyx_v_nDOF_test_element;
23248  PyObject *__pyx_r = NULL;
23249  __Pyx_RefNannyDeclarations
23250  __Pyx_RefNannySetupContext("calculateWeightedShapeTrace", 0);
23251 
23252  /* "cfemIntegrals.pyx":4357
23253  * np.ndarray w,
23254  * np.ndarray w_dS):
23255  * cdef int nElements_global = w_dS.shape[0] # <<<<<<<<<<<<<<
23256  * cdef int nElementBoundaries_element = w_dS.shape[1]
23257  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = w_dS.shape[2]
23258  */
23259  __pyx_v_nElements_global = (__pyx_v_w_dS->dimensions[0]);
23260 
23261  /* "cfemIntegrals.pyx":4358
23262  * np.ndarray w_dS):
23263  * cdef int nElements_global = w_dS.shape[0]
23264  * cdef int nElementBoundaries_element = w_dS.shape[1] # <<<<<<<<<<<<<<
23265  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = w_dS.shape[2]
23266  * cdef int nDOF_test_element = w_dS.shape[3]
23267  */
23268  __pyx_v_nElementBoundaries_element = (__pyx_v_w_dS->dimensions[1]);
23269 
23270  /* "cfemIntegrals.pyx":4359
23271  * cdef int nElements_global = w_dS.shape[0]
23272  * cdef int nElementBoundaries_element = w_dS.shape[1]
23273  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = w_dS.shape[2] # <<<<<<<<<<<<<<
23274  * cdef int nDOF_test_element = w_dS.shape[3]
23275  * ccalculateWeightedShapeTrace(nElements_global,
23276  */
23277  __pyx_v_nElementBoundaryQuadraturePoints_elementBoundary = (__pyx_v_w_dS->dimensions[2]);
23278 
23279  /* "cfemIntegrals.pyx":4360
23280  * cdef int nElementBoundaries_element = w_dS.shape[1]
23281  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = w_dS.shape[2]
23282  * cdef int nDOF_test_element = w_dS.shape[3] # <<<<<<<<<<<<<<
23283  * ccalculateWeightedShapeTrace(nElements_global,
23284  * nElementBoundaries_element,
23285  */
23286  __pyx_v_nDOF_test_element = (__pyx_v_w_dS->dimensions[3]);
23287 
23288  /* "cfemIntegrals.pyx":4361
23289  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = w_dS.shape[2]
23290  * cdef int nDOF_test_element = w_dS.shape[3]
23291  * ccalculateWeightedShapeTrace(nElements_global, # <<<<<<<<<<<<<<
23292  * nElementBoundaries_element,
23293  * nElementBoundaryQuadraturePoints_elementBoundary,
23294  */
23295  calculateWeightedShapeTrace(__pyx_v_nElements_global, __pyx_v_nElementBoundaries_element, __pyx_v_nElementBoundaryQuadraturePoints_elementBoundary, __pyx_v_nDOF_test_element, ((double *)__pyx_v_dSR->data), ((double *)__pyx_v_sqrt_det_g->data), ((double *)__pyx_v_w->data), ((double *)__pyx_v_w_dS->data));
23296 
23297  /* "cfemIntegrals.pyx":4353
23298  * <double*>grad_w_dV.data,
23299  * <double*>grad_v_X_grad_w_dV.data)
23300  * def calculateWeightedShapeTrace(np.ndarray dSR, # <<<<<<<<<<<<<<
23301  * np.ndarray sqrt_det_g,
23302  * np.ndarray w,
23303  */
23304 
23305  /* function exit code */
23306  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
23307  __Pyx_XGIVEREF(__pyx_r);
23308  __Pyx_RefNannyFinishContext();
23309  return __pyx_r;
23310 }
23311 
23312 /* "cfemIntegrals.pyx":4369
23313  * <double*>w.data,
23314  * <double*>w_dS.data)
23315  * def calculateShape_X_weightedShapeTrace(np.ndarray v, # <<<<<<<<<<<<<<
23316  * np.ndarray w_dS,
23317  * np.ndarray v_X_w_dS):
23318  */
23319 
23320 /* Python wrapper */
23321 static PyObject *__pyx_pw_13cfemIntegrals_197calculateShape_X_weightedShapeTrace(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
23322 static PyMethodDef __pyx_mdef_13cfemIntegrals_197calculateShape_X_weightedShapeTrace = {"calculateShape_X_weightedShapeTrace", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_197calculateShape_X_weightedShapeTrace, METH_VARARGS|METH_KEYWORDS, 0};
23323 static PyObject *__pyx_pw_13cfemIntegrals_197calculateShape_X_weightedShapeTrace(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
23324  PyArrayObject *__pyx_v_v = 0;
23325  PyArrayObject *__pyx_v_w_dS = 0;
23326  PyArrayObject *__pyx_v_v_X_w_dS = 0;
23327  int __pyx_lineno = 0;
23328  const char *__pyx_filename = NULL;
23329  int __pyx_clineno = 0;
23330  PyObject *__pyx_r = 0;
23331  __Pyx_RefNannyDeclarations
23332  __Pyx_RefNannySetupContext("calculateShape_X_weightedShapeTrace (wrapper)", 0);
23333  {
23334  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_v,&__pyx_n_s_w_dS,&__pyx_n_s_v_X_w_dS,0};
23335  PyObject* values[3] = {0,0,0};
23336  if (unlikely(__pyx_kwds)) {
23337  Py_ssize_t kw_args;
23338  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
23339  switch (pos_args) {
23340  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
23341  CYTHON_FALLTHROUGH;
23342  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
23343  CYTHON_FALLTHROUGH;
23344  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
23345  CYTHON_FALLTHROUGH;
23346  case 0: break;
23347  default: goto __pyx_L5_argtuple_error;
23348  }
23349  kw_args = PyDict_Size(__pyx_kwds);
23350  switch (pos_args) {
23351  case 0:
23352  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
23353  else goto __pyx_L5_argtuple_error;
23354  CYTHON_FALLTHROUGH;
23355  case 1:
23356  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_w_dS)) != 0)) kw_args--;
23357  else {
23358  __Pyx_RaiseArgtupleInvalid("calculateShape_X_weightedShapeTrace", 1, 3, 3, 1); __PYX_ERR(0, 4369, __pyx_L3_error)
23359  }
23360  CYTHON_FALLTHROUGH;
23361  case 2:
23362  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v_X_w_dS)) != 0)) kw_args--;
23363  else {
23364  __Pyx_RaiseArgtupleInvalid("calculateShape_X_weightedShapeTrace", 1, 3, 3, 2); __PYX_ERR(0, 4369, __pyx_L3_error)
23365  }
23366  }
23367  if (unlikely(kw_args > 0)) {
23368  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateShape_X_weightedShapeTrace") < 0)) __PYX_ERR(0, 4369, __pyx_L3_error)
23369  }
23370  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
23371  goto __pyx_L5_argtuple_error;
23372  } else {
23373  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
23374  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
23375  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
23376  }
23377  __pyx_v_v = ((PyArrayObject *)values[0]);
23378  __pyx_v_w_dS = ((PyArrayObject *)values[1]);
23379  __pyx_v_v_X_w_dS = ((PyArrayObject *)values[2]);
23380  }
23381  goto __pyx_L4_argument_unpacking_done;
23382  __pyx_L5_argtuple_error:;
23383  __Pyx_RaiseArgtupleInvalid("calculateShape_X_weightedShapeTrace", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4369, __pyx_L3_error)
23384  __pyx_L3_error:;
23385  __Pyx_AddTraceback("cfemIntegrals.calculateShape_X_weightedShapeTrace", __pyx_clineno, __pyx_lineno, __pyx_filename);
23386  __Pyx_RefNannyFinishContext();
23387  return NULL;
23388  __pyx_L4_argument_unpacking_done:;
23389  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), __pyx_ptype_5numpy_ndarray, 1, "v", 0))) __PYX_ERR(0, 4369, __pyx_L1_error)
23390  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w_dS), __pyx_ptype_5numpy_ndarray, 1, "w_dS", 0))) __PYX_ERR(0, 4370, __pyx_L1_error)
23391  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v_X_w_dS), __pyx_ptype_5numpy_ndarray, 1, "v_X_w_dS", 0))) __PYX_ERR(0, 4371, __pyx_L1_error)
23392  __pyx_r = __pyx_pf_13cfemIntegrals_196calculateShape_X_weightedShapeTrace(__pyx_self, __pyx_v_v, __pyx_v_w_dS, __pyx_v_v_X_w_dS);
23393 
23394  /* function exit code */
23395  goto __pyx_L0;
23396  __pyx_L1_error:;
23397  __pyx_r = NULL;
23398  __pyx_L0:;
23399  __Pyx_RefNannyFinishContext();
23400  return __pyx_r;
23401 }
23402 
23403 static PyObject *__pyx_pf_13cfemIntegrals_196calculateShape_X_weightedShapeTrace(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_w_dS, PyArrayObject *__pyx_v_v_X_w_dS) {
23404  int __pyx_v_nElements_global;
23405  int __pyx_v_nElementBoundaries_element;
23406  int __pyx_v_nElementBoundaryQuadraturePoints_elementBoundary;
23407  int __pyx_v_nDOF_trial_element;
23408  int __pyx_v_nDOF_test_element;
23409  PyObject *__pyx_r = NULL;
23410  __Pyx_RefNannyDeclarations
23411  __Pyx_RefNannySetupContext("calculateShape_X_weightedShapeTrace", 0);
23412 
23413  /* "cfemIntegrals.pyx":4372
23414  * np.ndarray w_dS,
23415  * np.ndarray v_X_w_dS):
23416  * cdef int nElements_global = v_X_w_dS.shape[0] # <<<<<<<<<<<<<<
23417  * cdef int nElementBoundaries_element = v_X_w_dS.shape[1]
23418  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = v_X_w_dS.shape[2]
23419  */
23420  __pyx_v_nElements_global = (__pyx_v_v_X_w_dS->dimensions[0]);
23421 
23422  /* "cfemIntegrals.pyx":4373
23423  * np.ndarray v_X_w_dS):
23424  * cdef int nElements_global = v_X_w_dS.shape[0]
23425  * cdef int nElementBoundaries_element = v_X_w_dS.shape[1] # <<<<<<<<<<<<<<
23426  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = v_X_w_dS.shape[2]
23427  * cdef int nDOF_trial_element = v_X_w_dS.shape[3]
23428  */
23429  __pyx_v_nElementBoundaries_element = (__pyx_v_v_X_w_dS->dimensions[1]);
23430 
23431  /* "cfemIntegrals.pyx":4374
23432  * cdef int nElements_global = v_X_w_dS.shape[0]
23433  * cdef int nElementBoundaries_element = v_X_w_dS.shape[1]
23434  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = v_X_w_dS.shape[2] # <<<<<<<<<<<<<<
23435  * cdef int nDOF_trial_element = v_X_w_dS.shape[3]
23436  * cdef int nDOF_test_element = v_X_w_dS.shape[4]
23437  */
23438  __pyx_v_nElementBoundaryQuadraturePoints_elementBoundary = (__pyx_v_v_X_w_dS->dimensions[2]);
23439 
23440  /* "cfemIntegrals.pyx":4375
23441  * cdef int nElementBoundaries_element = v_X_w_dS.shape[1]
23442  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = v_X_w_dS.shape[2]
23443  * cdef int nDOF_trial_element = v_X_w_dS.shape[3] # <<<<<<<<<<<<<<
23444  * cdef int nDOF_test_element = v_X_w_dS.shape[4]
23445  * ccalculateShape_X_weightedShapeTrace(nElements_global,
23446  */
23447  __pyx_v_nDOF_trial_element = (__pyx_v_v_X_w_dS->dimensions[3]);
23448 
23449  /* "cfemIntegrals.pyx":4376
23450  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = v_X_w_dS.shape[2]
23451  * cdef int nDOF_trial_element = v_X_w_dS.shape[3]
23452  * cdef int nDOF_test_element = v_X_w_dS.shape[4] # <<<<<<<<<<<<<<
23453  * ccalculateShape_X_weightedShapeTrace(nElements_global,
23454  * nElementBoundaries_element,
23455  */
23456  __pyx_v_nDOF_test_element = (__pyx_v_v_X_w_dS->dimensions[4]);
23457 
23458  /* "cfemIntegrals.pyx":4377
23459  * cdef int nDOF_trial_element = v_X_w_dS.shape[3]
23460  * cdef int nDOF_test_element = v_X_w_dS.shape[4]
23461  * ccalculateShape_X_weightedShapeTrace(nElements_global, # <<<<<<<<<<<<<<
23462  * nElementBoundaries_element,
23463  * nElementBoundaryQuadraturePoints_elementBoundary,
23464  */
23465  calculateShape_X_weightedShapeTrace(__pyx_v_nElements_global, __pyx_v_nElementBoundaries_element, __pyx_v_nElementBoundaryQuadraturePoints_elementBoundary, __pyx_v_nDOF_trial_element, __pyx_v_nDOF_test_element, ((double *)__pyx_v_v->data), ((double *)__pyx_v_w_dS->data), ((double *)__pyx_v_v_X_w_dS->data));
23466 
23467  /* "cfemIntegrals.pyx":4369
23468  * <double*>w.data,
23469  * <double*>w_dS.data)
23470  * def calculateShape_X_weightedShapeTrace(np.ndarray v, # <<<<<<<<<<<<<<
23471  * np.ndarray w_dS,
23472  * np.ndarray v_X_w_dS):
23473  */
23474 
23475  /* function exit code */
23476  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
23477  __Pyx_XGIVEREF(__pyx_r);
23478  __Pyx_RefNannyFinishContext();
23479  return __pyx_r;
23480 }
23481 
23482 /* "cfemIntegrals.pyx":4385
23483  * <double*>w_dS.data,
23484  * <double*>v_X_w_dS.data)
23485  * def calculateGradShape_X_weightedShapeTrace(np.ndarray grad_v, # <<<<<<<<<<<<<<
23486  * np.ndarray w_dS,
23487  * np.ndarray grad_v_X_w_dS):
23488  */
23489 
23490 /* Python wrapper */
23491 static PyObject *__pyx_pw_13cfemIntegrals_199calculateGradShape_X_weightedShapeTrace(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
23492 static PyMethodDef __pyx_mdef_13cfemIntegrals_199calculateGradShape_X_weightedShapeTrace = {"calculateGradShape_X_weightedShapeTrace", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_199calculateGradShape_X_weightedShapeTrace, METH_VARARGS|METH_KEYWORDS, 0};
23493 static PyObject *__pyx_pw_13cfemIntegrals_199calculateGradShape_X_weightedShapeTrace(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
23494  PyArrayObject *__pyx_v_grad_v = 0;
23495  PyArrayObject *__pyx_v_w_dS = 0;
23496  PyArrayObject *__pyx_v_grad_v_X_w_dS = 0;
23497  int __pyx_lineno = 0;
23498  const char *__pyx_filename = NULL;
23499  int __pyx_clineno = 0;
23500  PyObject *__pyx_r = 0;
23501  __Pyx_RefNannyDeclarations
23502  __Pyx_RefNannySetupContext("calculateGradShape_X_weightedShapeTrace (wrapper)", 0);
23503  {
23504  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_grad_v,&__pyx_n_s_w_dS,&__pyx_n_s_grad_v_X_w_dS,0};
23505  PyObject* values[3] = {0,0,0};
23506  if (unlikely(__pyx_kwds)) {
23507  Py_ssize_t kw_args;
23508  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
23509  switch (pos_args) {
23510  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
23511  CYTHON_FALLTHROUGH;
23512  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
23513  CYTHON_FALLTHROUGH;
23514  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
23515  CYTHON_FALLTHROUGH;
23516  case 0: break;
23517  default: goto __pyx_L5_argtuple_error;
23518  }
23519  kw_args = PyDict_Size(__pyx_kwds);
23520  switch (pos_args) {
23521  case 0:
23522  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_v)) != 0)) kw_args--;
23523  else goto __pyx_L5_argtuple_error;
23524  CYTHON_FALLTHROUGH;
23525  case 1:
23526  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_w_dS)) != 0)) kw_args--;
23527  else {
23528  __Pyx_RaiseArgtupleInvalid("calculateGradShape_X_weightedShapeTrace", 1, 3, 3, 1); __PYX_ERR(0, 4385, __pyx_L3_error)
23529  }
23530  CYTHON_FALLTHROUGH;
23531  case 2:
23532  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_v_X_w_dS)) != 0)) kw_args--;
23533  else {
23534  __Pyx_RaiseArgtupleInvalid("calculateGradShape_X_weightedShapeTrace", 1, 3, 3, 2); __PYX_ERR(0, 4385, __pyx_L3_error)
23535  }
23536  }
23537  if (unlikely(kw_args > 0)) {
23538  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateGradShape_X_weightedShapeTrace") < 0)) __PYX_ERR(0, 4385, __pyx_L3_error)
23539  }
23540  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
23541  goto __pyx_L5_argtuple_error;
23542  } else {
23543  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
23544  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
23545  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
23546  }
23547  __pyx_v_grad_v = ((PyArrayObject *)values[0]);
23548  __pyx_v_w_dS = ((PyArrayObject *)values[1]);
23549  __pyx_v_grad_v_X_w_dS = ((PyArrayObject *)values[2]);
23550  }
23551  goto __pyx_L4_argument_unpacking_done;
23552  __pyx_L5_argtuple_error:;
23553  __Pyx_RaiseArgtupleInvalid("calculateGradShape_X_weightedShapeTrace", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4385, __pyx_L3_error)
23554  __pyx_L3_error:;
23555  __Pyx_AddTraceback("cfemIntegrals.calculateGradShape_X_weightedShapeTrace", __pyx_clineno, __pyx_lineno, __pyx_filename);
23556  __Pyx_RefNannyFinishContext();
23557  return NULL;
23558  __pyx_L4_argument_unpacking_done:;
23559  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_v), __pyx_ptype_5numpy_ndarray, 1, "grad_v", 0))) __PYX_ERR(0, 4385, __pyx_L1_error)
23560  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w_dS), __pyx_ptype_5numpy_ndarray, 1, "w_dS", 0))) __PYX_ERR(0, 4386, __pyx_L1_error)
23561  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_v_X_w_dS), __pyx_ptype_5numpy_ndarray, 1, "grad_v_X_w_dS", 0))) __PYX_ERR(0, 4387, __pyx_L1_error)
23562  __pyx_r = __pyx_pf_13cfemIntegrals_198calculateGradShape_X_weightedShapeTrace(__pyx_self, __pyx_v_grad_v, __pyx_v_w_dS, __pyx_v_grad_v_X_w_dS);
23563 
23564  /* function exit code */
23565  goto __pyx_L0;
23566  __pyx_L1_error:;
23567  __pyx_r = NULL;
23568  __pyx_L0:;
23569  __Pyx_RefNannyFinishContext();
23570  return __pyx_r;
23571 }
23572 
23573 static PyObject *__pyx_pf_13cfemIntegrals_198calculateGradShape_X_weightedShapeTrace(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_grad_v, PyArrayObject *__pyx_v_w_dS, PyArrayObject *__pyx_v_grad_v_X_w_dS) {
23574  int __pyx_v_nElements_global;
23575  int __pyx_v_nElementBoundaries_element;
23576  int __pyx_v_nElementBoundaryQuadraturePoints_elementBoundary;
23577  int __pyx_v_nDOF_trial_element;
23578  int __pyx_v_nDOF_test_element;
23579  int __pyx_v_nSpace;
23580  PyObject *__pyx_r = NULL;
23581  __Pyx_RefNannyDeclarations
23582  __Pyx_RefNannySetupContext("calculateGradShape_X_weightedShapeTrace", 0);
23583 
23584  /* "cfemIntegrals.pyx":4388
23585  * np.ndarray w_dS,
23586  * np.ndarray grad_v_X_w_dS):
23587  * cdef int nElements_global = grad_v_X_w_dS.shape[0] # <<<<<<<<<<<<<<
23588  * cdef int nElementBoundaries_element = grad_v_X_w_dS.shape[1]
23589  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = grad_v_X_w_dS.shape[2]
23590  */
23591  __pyx_v_nElements_global = (__pyx_v_grad_v_X_w_dS->dimensions[0]);
23592 
23593  /* "cfemIntegrals.pyx":4389
23594  * np.ndarray grad_v_X_w_dS):
23595  * cdef int nElements_global = grad_v_X_w_dS.shape[0]
23596  * cdef int nElementBoundaries_element = grad_v_X_w_dS.shape[1] # <<<<<<<<<<<<<<
23597  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = grad_v_X_w_dS.shape[2]
23598  * cdef int nDOF_trial_element = grad_v_X_w_dS.shape[3]
23599  */
23600  __pyx_v_nElementBoundaries_element = (__pyx_v_grad_v_X_w_dS->dimensions[1]);
23601 
23602  /* "cfemIntegrals.pyx":4390
23603  * cdef int nElements_global = grad_v_X_w_dS.shape[0]
23604  * cdef int nElementBoundaries_element = grad_v_X_w_dS.shape[1]
23605  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = grad_v_X_w_dS.shape[2] # <<<<<<<<<<<<<<
23606  * cdef int nDOF_trial_element = grad_v_X_w_dS.shape[3]
23607  * cdef int nDOF_test_element = grad_v_X_w_dS.shape[4]
23608  */
23609  __pyx_v_nElementBoundaryQuadraturePoints_elementBoundary = (__pyx_v_grad_v_X_w_dS->dimensions[2]);
23610 
23611  /* "cfemIntegrals.pyx":4391
23612  * cdef int nElementBoundaries_element = grad_v_X_w_dS.shape[1]
23613  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = grad_v_X_w_dS.shape[2]
23614  * cdef int nDOF_trial_element = grad_v_X_w_dS.shape[3] # <<<<<<<<<<<<<<
23615  * cdef int nDOF_test_element = grad_v_X_w_dS.shape[4]
23616  * cdef int nSpace = grad_v_X_w_dS.shape[5]
23617  */
23618  __pyx_v_nDOF_trial_element = (__pyx_v_grad_v_X_w_dS->dimensions[3]);
23619 
23620  /* "cfemIntegrals.pyx":4392
23621  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = grad_v_X_w_dS.shape[2]
23622  * cdef int nDOF_trial_element = grad_v_X_w_dS.shape[3]
23623  * cdef int nDOF_test_element = grad_v_X_w_dS.shape[4] # <<<<<<<<<<<<<<
23624  * cdef int nSpace = grad_v_X_w_dS.shape[5]
23625  * ccalculateGradShape_X_weightedShapeTrace(nElements_global,
23626  */
23627  __pyx_v_nDOF_test_element = (__pyx_v_grad_v_X_w_dS->dimensions[4]);
23628 
23629  /* "cfemIntegrals.pyx":4393
23630  * cdef int nDOF_trial_element = grad_v_X_w_dS.shape[3]
23631  * cdef int nDOF_test_element = grad_v_X_w_dS.shape[4]
23632  * cdef int nSpace = grad_v_X_w_dS.shape[5] # <<<<<<<<<<<<<<
23633  * ccalculateGradShape_X_weightedShapeTrace(nElements_global,
23634  * nElementBoundaries_element,
23635  */
23636  __pyx_v_nSpace = (__pyx_v_grad_v_X_w_dS->dimensions[5]);
23637 
23638  /* "cfemIntegrals.pyx":4394
23639  * cdef int nDOF_test_element = grad_v_X_w_dS.shape[4]
23640  * cdef int nSpace = grad_v_X_w_dS.shape[5]
23641  * ccalculateGradShape_X_weightedShapeTrace(nElements_global, # <<<<<<<<<<<<<<
23642  * nElementBoundaries_element,
23643  * nElementBoundaryQuadraturePoints_elementBoundary,
23644  */
23645  calculateGradShape_X_weightedShapeTrace(__pyx_v_nElements_global, __pyx_v_nElementBoundaries_element, __pyx_v_nElementBoundaryQuadraturePoints_elementBoundary, __pyx_v_nDOF_trial_element, __pyx_v_nDOF_test_element, __pyx_v_nSpace, ((double *)__pyx_v_grad_v->data), ((double *)__pyx_v_w_dS->data), ((double *)__pyx_v_grad_v_X_w_dS->data));
23646 
23647  /* "cfemIntegrals.pyx":4385
23648  * <double*>w_dS.data,
23649  * <double*>v_X_w_dS.data)
23650  * def calculateGradShape_X_weightedShapeTrace(np.ndarray grad_v, # <<<<<<<<<<<<<<
23651  * np.ndarray w_dS,
23652  * np.ndarray grad_v_X_w_dS):
23653  */
23654 
23655  /* function exit code */
23656  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
23657  __Pyx_XGIVEREF(__pyx_r);
23658  __Pyx_RefNannyFinishContext();
23659  return __pyx_r;
23660 }
23661 
23662 /* "cfemIntegrals.pyx":4403
23663  * <double*>w_dS.data,
23664  * <double*>grad_v_X_w_dS.data)
23665  * def calculateIntegrationWeights(np.ndarray abs_det_J, # <<<<<<<<<<<<<<
23666  * np.ndarray referenceWeights,
23667  * np.ndarray weights):
23668  */
23669 
23670 /* Python wrapper */
23671 static PyObject *__pyx_pw_13cfemIntegrals_201calculateIntegrationWeights(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
23672 static PyMethodDef __pyx_mdef_13cfemIntegrals_201calculateIntegrationWeights = {"calculateIntegrationWeights", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_201calculateIntegrationWeights, METH_VARARGS|METH_KEYWORDS, 0};
23673 static PyObject *__pyx_pw_13cfemIntegrals_201calculateIntegrationWeights(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
23674  PyArrayObject *__pyx_v_abs_det_J = 0;
23675  PyArrayObject *__pyx_v_referenceWeights = 0;
23676  PyArrayObject *__pyx_v_weights = 0;
23677  int __pyx_lineno = 0;
23678  const char *__pyx_filename = NULL;
23679  int __pyx_clineno = 0;
23680  PyObject *__pyx_r = 0;
23681  __Pyx_RefNannyDeclarations
23682  __Pyx_RefNannySetupContext("calculateIntegrationWeights (wrapper)", 0);
23683  {
23684  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_abs_det_J,&__pyx_n_s_referenceWeights,&__pyx_n_s_weights,0};
23685  PyObject* values[3] = {0,0,0};
23686  if (unlikely(__pyx_kwds)) {
23687  Py_ssize_t kw_args;
23688  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
23689  switch (pos_args) {
23690  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
23691  CYTHON_FALLTHROUGH;
23692  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
23693  CYTHON_FALLTHROUGH;
23694  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
23695  CYTHON_FALLTHROUGH;
23696  case 0: break;
23697  default: goto __pyx_L5_argtuple_error;
23698  }
23699  kw_args = PyDict_Size(__pyx_kwds);
23700  switch (pos_args) {
23701  case 0:
23702  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_abs_det_J)) != 0)) kw_args--;
23703  else goto __pyx_L5_argtuple_error;
23704  CYTHON_FALLTHROUGH;
23705  case 1:
23706  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_referenceWeights)) != 0)) kw_args--;
23707  else {
23708  __Pyx_RaiseArgtupleInvalid("calculateIntegrationWeights", 1, 3, 3, 1); __PYX_ERR(0, 4403, __pyx_L3_error)
23709  }
23710  CYTHON_FALLTHROUGH;
23711  case 2:
23712  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weights)) != 0)) kw_args--;
23713  else {
23714  __Pyx_RaiseArgtupleInvalid("calculateIntegrationWeights", 1, 3, 3, 2); __PYX_ERR(0, 4403, __pyx_L3_error)
23715  }
23716  }
23717  if (unlikely(kw_args > 0)) {
23718  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateIntegrationWeights") < 0)) __PYX_ERR(0, 4403, __pyx_L3_error)
23719  }
23720  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
23721  goto __pyx_L5_argtuple_error;
23722  } else {
23723  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
23724  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
23725  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
23726  }
23727  __pyx_v_abs_det_J = ((PyArrayObject *)values[0]);
23728  __pyx_v_referenceWeights = ((PyArrayObject *)values[1]);
23729  __pyx_v_weights = ((PyArrayObject *)values[2]);
23730  }
23731  goto __pyx_L4_argument_unpacking_done;
23732  __pyx_L5_argtuple_error:;
23733  __Pyx_RaiseArgtupleInvalid("calculateIntegrationWeights", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4403, __pyx_L3_error)
23734  __pyx_L3_error:;
23735  __Pyx_AddTraceback("cfemIntegrals.calculateIntegrationWeights", __pyx_clineno, __pyx_lineno, __pyx_filename);
23736  __Pyx_RefNannyFinishContext();
23737  return NULL;
23738  __pyx_L4_argument_unpacking_done:;
23739  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_abs_det_J), __pyx_ptype_5numpy_ndarray, 1, "abs_det_J", 0))) __PYX_ERR(0, 4403, __pyx_L1_error)
23740  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_referenceWeights), __pyx_ptype_5numpy_ndarray, 1, "referenceWeights", 0))) __PYX_ERR(0, 4404, __pyx_L1_error)
23741  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_weights), __pyx_ptype_5numpy_ndarray, 1, "weights", 0))) __PYX_ERR(0, 4405, __pyx_L1_error)
23742  __pyx_r = __pyx_pf_13cfemIntegrals_200calculateIntegrationWeights(__pyx_self, __pyx_v_abs_det_J, __pyx_v_referenceWeights, __pyx_v_weights);
23743 
23744  /* function exit code */
23745  goto __pyx_L0;
23746  __pyx_L1_error:;
23747  __pyx_r = NULL;
23748  __pyx_L0:;
23749  __Pyx_RefNannyFinishContext();
23750  return __pyx_r;
23751 }
23752 
23753 static PyObject *__pyx_pf_13cfemIntegrals_200calculateIntegrationWeights(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_abs_det_J, PyArrayObject *__pyx_v_referenceWeights, PyArrayObject *__pyx_v_weights) {
23754  int __pyx_v_nElements_global;
23755  int __pyx_v_nQuadraturePoints_element;
23756  PyObject *__pyx_r = NULL;
23757  __Pyx_RefNannyDeclarations
23758  __Pyx_RefNannySetupContext("calculateIntegrationWeights", 0);
23759 
23760  /* "cfemIntegrals.pyx":4406
23761  * np.ndarray referenceWeights,
23762  * np.ndarray weights):
23763  * cdef int nElements_global = abs_det_J.shape[0] # <<<<<<<<<<<<<<
23764  * cdef int nQuadraturePoints_element = abs_det_J.shape[1]
23765  * ccalculateIntegrationWeights(nElements_global,
23766  */
23767  __pyx_v_nElements_global = (__pyx_v_abs_det_J->dimensions[0]);
23768 
23769  /* "cfemIntegrals.pyx":4407
23770  * np.ndarray weights):
23771  * cdef int nElements_global = abs_det_J.shape[0]
23772  * cdef int nQuadraturePoints_element = abs_det_J.shape[1] # <<<<<<<<<<<<<<
23773  * ccalculateIntegrationWeights(nElements_global,
23774  * nQuadraturePoints_element,
23775  */
23776  __pyx_v_nQuadraturePoints_element = (__pyx_v_abs_det_J->dimensions[1]);
23777 
23778  /* "cfemIntegrals.pyx":4408
23779  * cdef int nElements_global = abs_det_J.shape[0]
23780  * cdef int nQuadraturePoints_element = abs_det_J.shape[1]
23781  * ccalculateIntegrationWeights(nElements_global, # <<<<<<<<<<<<<<
23782  * nQuadraturePoints_element,
23783  * <double*>abs_det_J.data,
23784  */
23785  calculateIntegrationWeights(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, ((double *)__pyx_v_abs_det_J->data), ((double *)__pyx_v_referenceWeights->data), ((double *)__pyx_v_weights->data));
23786 
23787  /* "cfemIntegrals.pyx":4403
23788  * <double*>w_dS.data,
23789  * <double*>grad_v_X_w_dS.data)
23790  * def calculateIntegrationWeights(np.ndarray abs_det_J, # <<<<<<<<<<<<<<
23791  * np.ndarray referenceWeights,
23792  * np.ndarray weights):
23793  */
23794 
23795  /* function exit code */
23796  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
23797  __Pyx_XGIVEREF(__pyx_r);
23798  __Pyx_RefNannyFinishContext();
23799  return __pyx_r;
23800 }
23801 
23802 /* "cfemIntegrals.pyx":4413
23803  * <double*>referenceWeights.data,
23804  * <double*>weights.data)
23805  * def calculateElementBoundaryIntegrationWeights(np.ndarray sqrt_det_g, # <<<<<<<<<<<<<<
23806  * np.ndarray referenceWeights,
23807  * np.ndarray weights):
23808  */
23809 
23810 /* Python wrapper */
23811 static PyObject *__pyx_pw_13cfemIntegrals_203calculateElementBoundaryIntegrationWeights(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
23812 static PyMethodDef __pyx_mdef_13cfemIntegrals_203calculateElementBoundaryIntegrationWeights = {"calculateElementBoundaryIntegrationWeights", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_203calculateElementBoundaryIntegrationWeights, METH_VARARGS|METH_KEYWORDS, 0};
23813 static PyObject *__pyx_pw_13cfemIntegrals_203calculateElementBoundaryIntegrationWeights(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
23814  PyArrayObject *__pyx_v_sqrt_det_g = 0;
23815  PyArrayObject *__pyx_v_referenceWeights = 0;
23816  PyArrayObject *__pyx_v_weights = 0;
23817  int __pyx_lineno = 0;
23818  const char *__pyx_filename = NULL;
23819  int __pyx_clineno = 0;
23820  PyObject *__pyx_r = 0;
23821  __Pyx_RefNannyDeclarations
23822  __Pyx_RefNannySetupContext("calculateElementBoundaryIntegrationWeights (wrapper)", 0);
23823  {
23824  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sqrt_det_g,&__pyx_n_s_referenceWeights,&__pyx_n_s_weights,0};
23825  PyObject* values[3] = {0,0,0};
23826  if (unlikely(__pyx_kwds)) {
23827  Py_ssize_t kw_args;
23828  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
23829  switch (pos_args) {
23830  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
23831  CYTHON_FALLTHROUGH;
23832  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
23833  CYTHON_FALLTHROUGH;
23834  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
23835  CYTHON_FALLTHROUGH;
23836  case 0: break;
23837  default: goto __pyx_L5_argtuple_error;
23838  }
23839  kw_args = PyDict_Size(__pyx_kwds);
23840  switch (pos_args) {
23841  case 0:
23842  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sqrt_det_g)) != 0)) kw_args--;
23843  else goto __pyx_L5_argtuple_error;
23844  CYTHON_FALLTHROUGH;
23845  case 1:
23846  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_referenceWeights)) != 0)) kw_args--;
23847  else {
23848  __Pyx_RaiseArgtupleInvalid("calculateElementBoundaryIntegrationWeights", 1, 3, 3, 1); __PYX_ERR(0, 4413, __pyx_L3_error)
23849  }
23850  CYTHON_FALLTHROUGH;
23851  case 2:
23852  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weights)) != 0)) kw_args--;
23853  else {
23854  __Pyx_RaiseArgtupleInvalid("calculateElementBoundaryIntegrationWeights", 1, 3, 3, 2); __PYX_ERR(0, 4413, __pyx_L3_error)
23855  }
23856  }
23857  if (unlikely(kw_args > 0)) {
23858  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateElementBoundaryIntegrationWeights") < 0)) __PYX_ERR(0, 4413, __pyx_L3_error)
23859  }
23860  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
23861  goto __pyx_L5_argtuple_error;
23862  } else {
23863  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
23864  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
23865  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
23866  }
23867  __pyx_v_sqrt_det_g = ((PyArrayObject *)values[0]);
23868  __pyx_v_referenceWeights = ((PyArrayObject *)values[1]);
23869  __pyx_v_weights = ((PyArrayObject *)values[2]);
23870  }
23871  goto __pyx_L4_argument_unpacking_done;
23872  __pyx_L5_argtuple_error:;
23873  __Pyx_RaiseArgtupleInvalid("calculateElementBoundaryIntegrationWeights", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4413, __pyx_L3_error)
23874  __pyx_L3_error:;
23875  __Pyx_AddTraceback("cfemIntegrals.calculateElementBoundaryIntegrationWeights", __pyx_clineno, __pyx_lineno, __pyx_filename);
23876  __Pyx_RefNannyFinishContext();
23877  return NULL;
23878  __pyx_L4_argument_unpacking_done:;
23879  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sqrt_det_g), __pyx_ptype_5numpy_ndarray, 1, "sqrt_det_g", 0))) __PYX_ERR(0, 4413, __pyx_L1_error)
23880  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_referenceWeights), __pyx_ptype_5numpy_ndarray, 1, "referenceWeights", 0))) __PYX_ERR(0, 4414, __pyx_L1_error)
23881  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_weights), __pyx_ptype_5numpy_ndarray, 1, "weights", 0))) __PYX_ERR(0, 4415, __pyx_L1_error)
23882  __pyx_r = __pyx_pf_13cfemIntegrals_202calculateElementBoundaryIntegrationWeights(__pyx_self, __pyx_v_sqrt_det_g, __pyx_v_referenceWeights, __pyx_v_weights);
23883 
23884  /* function exit code */
23885  goto __pyx_L0;
23886  __pyx_L1_error:;
23887  __pyx_r = NULL;
23888  __pyx_L0:;
23889  __Pyx_RefNannyFinishContext();
23890  return __pyx_r;
23891 }
23892 
23893 static PyObject *__pyx_pf_13cfemIntegrals_202calculateElementBoundaryIntegrationWeights(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_sqrt_det_g, PyArrayObject *__pyx_v_referenceWeights, PyArrayObject *__pyx_v_weights) {
23894  int __pyx_v_nElements_global;
23895  int __pyx_v_nElementBoundaries_element;
23896  int __pyx_v_nQuadraturePoints_elementBoundary;
23897  PyObject *__pyx_r = NULL;
23898  __Pyx_RefNannyDeclarations
23899  __Pyx_RefNannySetupContext("calculateElementBoundaryIntegrationWeights", 0);
23900 
23901  /* "cfemIntegrals.pyx":4416
23902  * np.ndarray referenceWeights,
23903  * np.ndarray weights):
23904  * cdef int nElements_global = sqrt_det_g.shape[0] # <<<<<<<<<<<<<<
23905  * cdef int nElementBoundaries_element = sqrt_det_g.shape[1]
23906  * cdef int nQuadraturePoints_elementBoundary = sqrt_det_g.shape[2]
23907  */
23908  __pyx_v_nElements_global = (__pyx_v_sqrt_det_g->dimensions[0]);
23909 
23910  /* "cfemIntegrals.pyx":4417
23911  * np.ndarray weights):
23912  * cdef int nElements_global = sqrt_det_g.shape[0]
23913  * cdef int nElementBoundaries_element = sqrt_det_g.shape[1] # <<<<<<<<<<<<<<
23914  * cdef int nQuadraturePoints_elementBoundary = sqrt_det_g.shape[2]
23915  * ccalculateElementBoundaryIntegrationWeights(nElements_global,
23916  */
23917  __pyx_v_nElementBoundaries_element = (__pyx_v_sqrt_det_g->dimensions[1]);
23918 
23919  /* "cfemIntegrals.pyx":4418
23920  * cdef int nElements_global = sqrt_det_g.shape[0]
23921  * cdef int nElementBoundaries_element = sqrt_det_g.shape[1]
23922  * cdef int nQuadraturePoints_elementBoundary = sqrt_det_g.shape[2] # <<<<<<<<<<<<<<
23923  * ccalculateElementBoundaryIntegrationWeights(nElements_global,
23924  * nElementBoundaries_element,
23925  */
23926  __pyx_v_nQuadraturePoints_elementBoundary = (__pyx_v_sqrt_det_g->dimensions[2]);
23927 
23928  /* "cfemIntegrals.pyx":4419
23929  * cdef int nElementBoundaries_element = sqrt_det_g.shape[1]
23930  * cdef int nQuadraturePoints_elementBoundary = sqrt_det_g.shape[2]
23931  * ccalculateElementBoundaryIntegrationWeights(nElements_global, # <<<<<<<<<<<<<<
23932  * nElementBoundaries_element,
23933  * nQuadraturePoints_elementBoundary,
23934  */
23935  calculateElementBoundaryIntegrationWeights(__pyx_v_nElements_global, __pyx_v_nElementBoundaries_element, __pyx_v_nQuadraturePoints_elementBoundary, ((double *)__pyx_v_sqrt_det_g->data), ((double *)__pyx_v_referenceWeights->data), ((double *)__pyx_v_weights->data));
23936 
23937  /* "cfemIntegrals.pyx":4413
23938  * <double*>referenceWeights.data,
23939  * <double*>weights.data)
23940  * def calculateElementBoundaryIntegrationWeights(np.ndarray sqrt_det_g, # <<<<<<<<<<<<<<
23941  * np.ndarray referenceWeights,
23942  * np.ndarray weights):
23943  */
23944 
23945  /* function exit code */
23946  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
23947  __Pyx_XGIVEREF(__pyx_r);
23948  __Pyx_RefNannyFinishContext();
23949  return __pyx_r;
23950 }
23951 
23952 /* "cfemIntegrals.pyx":4425
23953  * <double*>referenceWeights.data,
23954  * <double*>weights.data)
23955  * def calculateFiniteElementFunctionValues(np.ndarray l2g, # <<<<<<<<<<<<<<
23956  * np.ndarray dof,
23957  * np.ndarray v,
23958  */
23959 
23960 /* Python wrapper */
23961 static PyObject *__pyx_pw_13cfemIntegrals_205calculateFiniteElementFunctionValues(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
23962 static PyMethodDef __pyx_mdef_13cfemIntegrals_205calculateFiniteElementFunctionValues = {"calculateFiniteElementFunctionValues", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_205calculateFiniteElementFunctionValues, METH_VARARGS|METH_KEYWORDS, 0};
23963 static PyObject *__pyx_pw_13cfemIntegrals_205calculateFiniteElementFunctionValues(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
23964  PyArrayObject *__pyx_v_l2g = 0;
23965  PyArrayObject *__pyx_v_dof = 0;
23966  PyArrayObject *__pyx_v_v = 0;
23967  PyArrayObject *__pyx_v_u = 0;
23968  int __pyx_lineno = 0;
23969  const char *__pyx_filename = NULL;
23970  int __pyx_clineno = 0;
23971  PyObject *__pyx_r = 0;
23972  __Pyx_RefNannyDeclarations
23973  __Pyx_RefNannySetupContext("calculateFiniteElementFunctionValues (wrapper)", 0);
23974  {
23975  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_l2g,&__pyx_n_s_dof,&__pyx_n_s_v,&__pyx_n_s_u,0};
23976  PyObject* values[4] = {0,0,0,0};
23977  if (unlikely(__pyx_kwds)) {
23978  Py_ssize_t kw_args;
23979  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
23980  switch (pos_args) {
23981  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
23982  CYTHON_FALLTHROUGH;
23983  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
23984  CYTHON_FALLTHROUGH;
23985  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
23986  CYTHON_FALLTHROUGH;
23987  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
23988  CYTHON_FALLTHROUGH;
23989  case 0: break;
23990  default: goto __pyx_L5_argtuple_error;
23991  }
23992  kw_args = PyDict_Size(__pyx_kwds);
23993  switch (pos_args) {
23994  case 0:
23995  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_l2g)) != 0)) kw_args--;
23996  else goto __pyx_L5_argtuple_error;
23997  CYTHON_FALLTHROUGH;
23998  case 1:
23999  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dof)) != 0)) kw_args--;
24000  else {
24001  __Pyx_RaiseArgtupleInvalid("calculateFiniteElementFunctionValues", 1, 4, 4, 1); __PYX_ERR(0, 4425, __pyx_L3_error)
24002  }
24003  CYTHON_FALLTHROUGH;
24004  case 2:
24005  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
24006  else {
24007  __Pyx_RaiseArgtupleInvalid("calculateFiniteElementFunctionValues", 1, 4, 4, 2); __PYX_ERR(0, 4425, __pyx_L3_error)
24008  }
24009  CYTHON_FALLTHROUGH;
24010  case 3:
24011  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u)) != 0)) kw_args--;
24012  else {
24013  __Pyx_RaiseArgtupleInvalid("calculateFiniteElementFunctionValues", 1, 4, 4, 3); __PYX_ERR(0, 4425, __pyx_L3_error)
24014  }
24015  }
24016  if (unlikely(kw_args > 0)) {
24017  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateFiniteElementFunctionValues") < 0)) __PYX_ERR(0, 4425, __pyx_L3_error)
24018  }
24019  } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
24020  goto __pyx_L5_argtuple_error;
24021  } else {
24022  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
24023  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
24024  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
24025  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
24026  }
24027  __pyx_v_l2g = ((PyArrayObject *)values[0]);
24028  __pyx_v_dof = ((PyArrayObject *)values[1]);
24029  __pyx_v_v = ((PyArrayObject *)values[2]);
24030  __pyx_v_u = ((PyArrayObject *)values[3]);
24031  }
24032  goto __pyx_L4_argument_unpacking_done;
24033  __pyx_L5_argtuple_error:;
24034  __Pyx_RaiseArgtupleInvalid("calculateFiniteElementFunctionValues", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4425, __pyx_L3_error)
24035  __pyx_L3_error:;
24036  __Pyx_AddTraceback("cfemIntegrals.calculateFiniteElementFunctionValues", __pyx_clineno, __pyx_lineno, __pyx_filename);
24037  __Pyx_RefNannyFinishContext();
24038  return NULL;
24039  __pyx_L4_argument_unpacking_done:;
24040  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_l2g), __pyx_ptype_5numpy_ndarray, 1, "l2g", 0))) __PYX_ERR(0, 4425, __pyx_L1_error)
24041  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dof), __pyx_ptype_5numpy_ndarray, 1, "dof", 0))) __PYX_ERR(0, 4426, __pyx_L1_error)
24042  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), __pyx_ptype_5numpy_ndarray, 1, "v", 0))) __PYX_ERR(0, 4427, __pyx_L1_error)
24043  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u), __pyx_ptype_5numpy_ndarray, 1, "u", 0))) __PYX_ERR(0, 4428, __pyx_L1_error)
24044  __pyx_r = __pyx_pf_13cfemIntegrals_204calculateFiniteElementFunctionValues(__pyx_self, __pyx_v_l2g, __pyx_v_dof, __pyx_v_v, __pyx_v_u);
24045 
24046  /* function exit code */
24047  goto __pyx_L0;
24048  __pyx_L1_error:;
24049  __pyx_r = NULL;
24050  __pyx_L0:;
24051  __Pyx_RefNannyFinishContext();
24052  return __pyx_r;
24053 }
24054 
24055 static PyObject *__pyx_pf_13cfemIntegrals_204calculateFiniteElementFunctionValues(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_dof, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_u) {
24056  int __pyx_v_nElements_global;
24057  int __pyx_v_nQuadraturePoints_element;
24058  int __pyx_v_nDOF_trial_element;
24059  int __pyx_v_nd;
24060  int __pyx_v_nComponents;
24061  PyObject *__pyx_r = NULL;
24062  __Pyx_RefNannyDeclarations
24063  int __pyx_t_1;
24064  int __pyx_t_2;
24065  __Pyx_RefNannySetupContext("calculateFiniteElementFunctionValues", 0);
24066 
24067  /* "cfemIntegrals.pyx":4429
24068  * np.ndarray v,
24069  * np.ndarray u):
24070  * cdef int nElements_global = v.shape[0] # <<<<<<<<<<<<<<
24071  * cdef int nQuadraturePoints_element = v.shape[1]
24072  * cdef int nDOF_trial_element = v.shape[2]
24073  */
24074  __pyx_v_nElements_global = (__pyx_v_v->dimensions[0]);
24075 
24076  /* "cfemIntegrals.pyx":4430
24077  * np.ndarray u):
24078  * cdef int nElements_global = v.shape[0]
24079  * cdef int nQuadraturePoints_element = v.shape[1] # <<<<<<<<<<<<<<
24080  * cdef int nDOF_trial_element = v.shape[2]
24081  * cdef int nd = u.ndim
24082  */
24083  __pyx_v_nQuadraturePoints_element = (__pyx_v_v->dimensions[1]);
24084 
24085  /* "cfemIntegrals.pyx":4431
24086  * cdef int nElements_global = v.shape[0]
24087  * cdef int nQuadraturePoints_element = v.shape[1]
24088  * cdef int nDOF_trial_element = v.shape[2] # <<<<<<<<<<<<<<
24089  * cdef int nd = u.ndim
24090  * cdef int nComponents = 1
24091  */
24092  __pyx_v_nDOF_trial_element = (__pyx_v_v->dimensions[2]);
24093 
24094  /* "cfemIntegrals.pyx":4432
24095  * cdef int nQuadraturePoints_element = v.shape[1]
24096  * cdef int nDOF_trial_element = v.shape[2]
24097  * cdef int nd = u.ndim # <<<<<<<<<<<<<<
24098  * cdef int nComponents = 1
24099  * if nd == 3:
24100  */
24101  __pyx_t_1 = __pyx_v_u->nd;
24102  __pyx_v_nd = __pyx_t_1;
24103 
24104  /* "cfemIntegrals.pyx":4433
24105  * cdef int nDOF_trial_element = v.shape[2]
24106  * cdef int nd = u.ndim
24107  * cdef int nComponents = 1 # <<<<<<<<<<<<<<
24108  * if nd == 3:
24109  * nComponents = u.shape[2]
24110  */
24111  __pyx_v_nComponents = 1;
24112 
24113  /* "cfemIntegrals.pyx":4434
24114  * cdef int nd = u.ndim
24115  * cdef int nComponents = 1
24116  * if nd == 3: # <<<<<<<<<<<<<<
24117  * nComponents = u.shape[2]
24118  * else:
24119  */
24120  __pyx_t_2 = ((__pyx_v_nd == 3) != 0);
24121  if (__pyx_t_2) {
24122 
24123  /* "cfemIntegrals.pyx":4435
24124  * cdef int nComponents = 1
24125  * if nd == 3:
24126  * nComponents = u.shape[2] # <<<<<<<<<<<<<<
24127  * else:
24128  * nComponents = 1
24129  */
24130  __pyx_v_nComponents = (__pyx_v_u->dimensions[2]);
24131 
24132  /* "cfemIntegrals.pyx":4434
24133  * cdef int nd = u.ndim
24134  * cdef int nComponents = 1
24135  * if nd == 3: # <<<<<<<<<<<<<<
24136  * nComponents = u.shape[2]
24137  * else:
24138  */
24139  goto __pyx_L3;
24140  }
24141 
24142  /* "cfemIntegrals.pyx":4437
24143  * nComponents = u.shape[2]
24144  * else:
24145  * nComponents = 1 # <<<<<<<<<<<<<<
24146  * ccalculateFiniteElementFunctionValues(nElements_global,
24147  * nQuadraturePoints_element,
24148  */
24149  /*else*/ {
24150  __pyx_v_nComponents = 1;
24151  }
24152  __pyx_L3:;
24153 
24154  /* "cfemIntegrals.pyx":4438
24155  * else:
24156  * nComponents = 1
24157  * ccalculateFiniteElementFunctionValues(nElements_global, # <<<<<<<<<<<<<<
24158  * nQuadraturePoints_element,
24159  * nDOF_trial_element,
24160  */
24161  calculateFiniteElementFunctionValues(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_trial_element, __pyx_v_nComponents, ((int *)__pyx_v_l2g->data), ((double *)__pyx_v_dof->data), ((double *)__pyx_v_v->data), ((double *)__pyx_v_u->data));
24162 
24163  /* "cfemIntegrals.pyx":4425
24164  * <double*>referenceWeights.data,
24165  * <double*>weights.data)
24166  * def calculateFiniteElementFunctionValues(np.ndarray l2g, # <<<<<<<<<<<<<<
24167  * np.ndarray dof,
24168  * np.ndarray v,
24169  */
24170 
24171  /* function exit code */
24172  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
24173  __Pyx_XGIVEREF(__pyx_r);
24174  __Pyx_RefNannyFinishContext();
24175  return __pyx_r;
24176 }
24177 
24178 /* "cfemIntegrals.pyx":4446
24179  * <double*>v.data,
24180  * <double*>u.data)
24181  * def calculateFiniteElementFunctionGradientValues(np.ndarray l2g, # <<<<<<<<<<<<<<
24182  * np.ndarray dof,
24183  * np.ndarray grad_v,
24184  */
24185 
24186 /* Python wrapper */
24187 static PyObject *__pyx_pw_13cfemIntegrals_207calculateFiniteElementFunctionGradientValues(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
24188 static PyMethodDef __pyx_mdef_13cfemIntegrals_207calculateFiniteElementFunctionGradientValues = {"calculateFiniteElementFunctionGradientValues", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_207calculateFiniteElementFunctionGradientValues, METH_VARARGS|METH_KEYWORDS, 0};
24189 static PyObject *__pyx_pw_13cfemIntegrals_207calculateFiniteElementFunctionGradientValues(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
24190  PyArrayObject *__pyx_v_l2g = 0;
24191  PyArrayObject *__pyx_v_dof = 0;
24192  PyArrayObject *__pyx_v_grad_v = 0;
24193  PyArrayObject *__pyx_v_grad_u = 0;
24194  int __pyx_lineno = 0;
24195  const char *__pyx_filename = NULL;
24196  int __pyx_clineno = 0;
24197  PyObject *__pyx_r = 0;
24198  __Pyx_RefNannyDeclarations
24199  __Pyx_RefNannySetupContext("calculateFiniteElementFunctionGradientValues (wrapper)", 0);
24200  {
24201  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_l2g,&__pyx_n_s_dof,&__pyx_n_s_grad_v,&__pyx_n_s_grad_u,0};
24202  PyObject* values[4] = {0,0,0,0};
24203  if (unlikely(__pyx_kwds)) {
24204  Py_ssize_t kw_args;
24205  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
24206  switch (pos_args) {
24207  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
24208  CYTHON_FALLTHROUGH;
24209  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
24210  CYTHON_FALLTHROUGH;
24211  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
24212  CYTHON_FALLTHROUGH;
24213  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
24214  CYTHON_FALLTHROUGH;
24215  case 0: break;
24216  default: goto __pyx_L5_argtuple_error;
24217  }
24218  kw_args = PyDict_Size(__pyx_kwds);
24219  switch (pos_args) {
24220  case 0:
24221  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_l2g)) != 0)) kw_args--;
24222  else goto __pyx_L5_argtuple_error;
24223  CYTHON_FALLTHROUGH;
24224  case 1:
24225  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dof)) != 0)) kw_args--;
24226  else {
24227  __Pyx_RaiseArgtupleInvalid("calculateFiniteElementFunctionGradientValues", 1, 4, 4, 1); __PYX_ERR(0, 4446, __pyx_L3_error)
24228  }
24229  CYTHON_FALLTHROUGH;
24230  case 2:
24231  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_v)) != 0)) kw_args--;
24232  else {
24233  __Pyx_RaiseArgtupleInvalid("calculateFiniteElementFunctionGradientValues", 1, 4, 4, 2); __PYX_ERR(0, 4446, __pyx_L3_error)
24234  }
24235  CYTHON_FALLTHROUGH;
24236  case 3:
24237  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_u)) != 0)) kw_args--;
24238  else {
24239  __Pyx_RaiseArgtupleInvalid("calculateFiniteElementFunctionGradientValues", 1, 4, 4, 3); __PYX_ERR(0, 4446, __pyx_L3_error)
24240  }
24241  }
24242  if (unlikely(kw_args > 0)) {
24243  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateFiniteElementFunctionGradientValues") < 0)) __PYX_ERR(0, 4446, __pyx_L3_error)
24244  }
24245  } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
24246  goto __pyx_L5_argtuple_error;
24247  } else {
24248  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
24249  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
24250  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
24251  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
24252  }
24253  __pyx_v_l2g = ((PyArrayObject *)values[0]);
24254  __pyx_v_dof = ((PyArrayObject *)values[1]);
24255  __pyx_v_grad_v = ((PyArrayObject *)values[2]);
24256  __pyx_v_grad_u = ((PyArrayObject *)values[3]);
24257  }
24258  goto __pyx_L4_argument_unpacking_done;
24259  __pyx_L5_argtuple_error:;
24260  __Pyx_RaiseArgtupleInvalid("calculateFiniteElementFunctionGradientValues", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4446, __pyx_L3_error)
24261  __pyx_L3_error:;
24262  __Pyx_AddTraceback("cfemIntegrals.calculateFiniteElementFunctionGradientValues", __pyx_clineno, __pyx_lineno, __pyx_filename);
24263  __Pyx_RefNannyFinishContext();
24264  return NULL;
24265  __pyx_L4_argument_unpacking_done:;
24266  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_l2g), __pyx_ptype_5numpy_ndarray, 1, "l2g", 0))) __PYX_ERR(0, 4446, __pyx_L1_error)
24267  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dof), __pyx_ptype_5numpy_ndarray, 1, "dof", 0))) __PYX_ERR(0, 4447, __pyx_L1_error)
24268  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_v), __pyx_ptype_5numpy_ndarray, 1, "grad_v", 0))) __PYX_ERR(0, 4448, __pyx_L1_error)
24269  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_u), __pyx_ptype_5numpy_ndarray, 1, "grad_u", 0))) __PYX_ERR(0, 4449, __pyx_L1_error)
24270  __pyx_r = __pyx_pf_13cfemIntegrals_206calculateFiniteElementFunctionGradientValues(__pyx_self, __pyx_v_l2g, __pyx_v_dof, __pyx_v_grad_v, __pyx_v_grad_u);
24271 
24272  /* function exit code */
24273  goto __pyx_L0;
24274  __pyx_L1_error:;
24275  __pyx_r = NULL;
24276  __pyx_L0:;
24277  __Pyx_RefNannyFinishContext();
24278  return __pyx_r;
24279 }
24280 
24281 static PyObject *__pyx_pf_13cfemIntegrals_206calculateFiniteElementFunctionGradientValues(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_dof, PyArrayObject *__pyx_v_grad_v, PyArrayObject *__pyx_v_grad_u) {
24282  int __pyx_v_nElements_global;
24283  int __pyx_v_nQuadraturePoints_element;
24284  int __pyx_v_nDOF_trial_element;
24285  int __pyx_v_nd;
24286  int __pyx_v_nComponents;
24287  npy_intp __pyx_v_nSpace;
24288  PyObject *__pyx_r = NULL;
24289  __Pyx_RefNannyDeclarations
24290  int __pyx_t_1;
24291  int __pyx_t_2;
24292  __Pyx_RefNannySetupContext("calculateFiniteElementFunctionGradientValues", 0);
24293 
24294  /* "cfemIntegrals.pyx":4450
24295  * np.ndarray grad_v,
24296  * np.ndarray grad_u):
24297  * cdef int nElements_global = grad_v.shape[0] # <<<<<<<<<<<<<<
24298  * cdef int nQuadraturePoints_element = grad_v.shape[1]
24299  * cdef int nDOF_trial_element = grad_v.shape[2]
24300  */
24301  __pyx_v_nElements_global = (__pyx_v_grad_v->dimensions[0]);
24302 
24303  /* "cfemIntegrals.pyx":4451
24304  * np.ndarray grad_u):
24305  * cdef int nElements_global = grad_v.shape[0]
24306  * cdef int nQuadraturePoints_element = grad_v.shape[1] # <<<<<<<<<<<<<<
24307  * cdef int nDOF_trial_element = grad_v.shape[2]
24308  * cdef int nd = grad_u.ndim
24309  */
24310  __pyx_v_nQuadraturePoints_element = (__pyx_v_grad_v->dimensions[1]);
24311 
24312  /* "cfemIntegrals.pyx":4452
24313  * cdef int nElements_global = grad_v.shape[0]
24314  * cdef int nQuadraturePoints_element = grad_v.shape[1]
24315  * cdef int nDOF_trial_element = grad_v.shape[2] # <<<<<<<<<<<<<<
24316  * cdef int nd = grad_u.ndim
24317  * cdef int nComponents = 1
24318  */
24319  __pyx_v_nDOF_trial_element = (__pyx_v_grad_v->dimensions[2]);
24320 
24321  /* "cfemIntegrals.pyx":4453
24322  * cdef int nQuadraturePoints_element = grad_v.shape[1]
24323  * cdef int nDOF_trial_element = grad_v.shape[2]
24324  * cdef int nd = grad_u.ndim # <<<<<<<<<<<<<<
24325  * cdef int nComponents = 1
24326  * if nd == 4:
24327  */
24328  __pyx_t_1 = __pyx_v_grad_u->nd;
24329  __pyx_v_nd = __pyx_t_1;
24330 
24331  /* "cfemIntegrals.pyx":4454
24332  * cdef int nDOF_trial_element = grad_v.shape[2]
24333  * cdef int nd = grad_u.ndim
24334  * cdef int nComponents = 1 # <<<<<<<<<<<<<<
24335  * if nd == 4:
24336  * nComponents = grad_u.shape[2]
24337  */
24338  __pyx_v_nComponents = 1;
24339 
24340  /* "cfemIntegrals.pyx":4455
24341  * cdef int nd = grad_u.ndim
24342  * cdef int nComponents = 1
24343  * if nd == 4: # <<<<<<<<<<<<<<
24344  * nComponents = grad_u.shape[2]
24345  * nSpace = grad_u.shape[3]
24346  */
24347  __pyx_t_2 = ((__pyx_v_nd == 4) != 0);
24348  if (__pyx_t_2) {
24349 
24350  /* "cfemIntegrals.pyx":4456
24351  * cdef int nComponents = 1
24352  * if nd == 4:
24353  * nComponents = grad_u.shape[2] # <<<<<<<<<<<<<<
24354  * nSpace = grad_u.shape[3]
24355  * else:
24356  */
24357  __pyx_v_nComponents = (__pyx_v_grad_u->dimensions[2]);
24358 
24359  /* "cfemIntegrals.pyx":4457
24360  * if nd == 4:
24361  * nComponents = grad_u.shape[2]
24362  * nSpace = grad_u.shape[3] # <<<<<<<<<<<<<<
24363  * else:
24364  * nComponents = 1
24365  */
24366  __pyx_v_nSpace = (__pyx_v_grad_u->dimensions[3]);
24367 
24368  /* "cfemIntegrals.pyx":4455
24369  * cdef int nd = grad_u.ndim
24370  * cdef int nComponents = 1
24371  * if nd == 4: # <<<<<<<<<<<<<<
24372  * nComponents = grad_u.shape[2]
24373  * nSpace = grad_u.shape[3]
24374  */
24375  goto __pyx_L3;
24376  }
24377 
24378  /* "cfemIntegrals.pyx":4459
24379  * nSpace = grad_u.shape[3]
24380  * else:
24381  * nComponents = 1 # <<<<<<<<<<<<<<
24382  * nSpace = grad_u.shape[2]
24383  * ccalculateFiniteElementFunctionGradientValues(nElements_global,
24384  */
24385  /*else*/ {
24386  __pyx_v_nComponents = 1;
24387 
24388  /* "cfemIntegrals.pyx":4460
24389  * else:
24390  * nComponents = 1
24391  * nSpace = grad_u.shape[2] # <<<<<<<<<<<<<<
24392  * ccalculateFiniteElementFunctionGradientValues(nElements_global,
24393  * nQuadraturePoints_element,
24394  */
24395  __pyx_v_nSpace = (__pyx_v_grad_u->dimensions[2]);
24396  }
24397  __pyx_L3:;
24398 
24399  /* "cfemIntegrals.pyx":4461
24400  * nComponents = 1
24401  * nSpace = grad_u.shape[2]
24402  * ccalculateFiniteElementFunctionGradientValues(nElements_global, # <<<<<<<<<<<<<<
24403  * nQuadraturePoints_element,
24404  * nDOF_trial_element,
24405  */
24406  calculateFiniteElementFunctionGradientValues(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_trial_element, __pyx_v_nComponents, __pyx_v_nSpace, ((int *)__pyx_v_l2g->data), ((double *)__pyx_v_dof->data), ((double *)__pyx_v_grad_v->data), ((double *)__pyx_v_grad_u->data));
24407 
24408  /* "cfemIntegrals.pyx":4446
24409  * <double*>v.data,
24410  * <double*>u.data)
24411  * def calculateFiniteElementFunctionGradientValues(np.ndarray l2g, # <<<<<<<<<<<<<<
24412  * np.ndarray dof,
24413  * np.ndarray grad_v,
24414  */
24415 
24416  /* function exit code */
24417  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
24418  __Pyx_XGIVEREF(__pyx_r);
24419  __Pyx_RefNannyFinishContext();
24420  return __pyx_r;
24421 }
24422 
24423 /* "cfemIntegrals.pyx":4470
24424  * <double*>grad_v.data,
24425  * <double*>grad_u.data)
24426  * def calculateFiniteElementFunctionGradientTensorValues(np.ndarray l2g, # <<<<<<<<<<<<<<
24427  * np.ndarray dof,
24428  * np.ndarray grad_v_X_grad_w_dV,
24429  */
24430 
24431 /* Python wrapper */
24432 static PyObject *__pyx_pw_13cfemIntegrals_209calculateFiniteElementFunctionGradientTensorValues(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
24433 static PyMethodDef __pyx_mdef_13cfemIntegrals_209calculateFiniteElementFunctionGradientTensorValues = {"calculateFiniteElementFunctionGradientTensorValues", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_209calculateFiniteElementFunctionGradientTensorValues, METH_VARARGS|METH_KEYWORDS, 0};
24434 static PyObject *__pyx_pw_13cfemIntegrals_209calculateFiniteElementFunctionGradientTensorValues(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
24435  PyArrayObject *__pyx_v_l2g = 0;
24436  PyArrayObject *__pyx_v_dof = 0;
24437  PyArrayObject *__pyx_v_grad_v_X_grad_w_dV = 0;
24438  PyArrayObject *__pyx_v_grad_u_X_grad_w_dV = 0;
24439  int __pyx_lineno = 0;
24440  const char *__pyx_filename = NULL;
24441  int __pyx_clineno = 0;
24442  PyObject *__pyx_r = 0;
24443  __Pyx_RefNannyDeclarations
24444  __Pyx_RefNannySetupContext("calculateFiniteElementFunctionGradientTensorValues (wrapper)", 0);
24445  {
24446  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_l2g,&__pyx_n_s_dof,&__pyx_n_s_grad_v_X_grad_w_dV,&__pyx_n_s_grad_u_X_grad_w_dV,0};
24447  PyObject* values[4] = {0,0,0,0};
24448  if (unlikely(__pyx_kwds)) {
24449  Py_ssize_t kw_args;
24450  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
24451  switch (pos_args) {
24452  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
24453  CYTHON_FALLTHROUGH;
24454  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
24455  CYTHON_FALLTHROUGH;
24456  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
24457  CYTHON_FALLTHROUGH;
24458  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
24459  CYTHON_FALLTHROUGH;
24460  case 0: break;
24461  default: goto __pyx_L5_argtuple_error;
24462  }
24463  kw_args = PyDict_Size(__pyx_kwds);
24464  switch (pos_args) {
24465  case 0:
24466  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_l2g)) != 0)) kw_args--;
24467  else goto __pyx_L5_argtuple_error;
24468  CYTHON_FALLTHROUGH;
24469  case 1:
24470  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dof)) != 0)) kw_args--;
24471  else {
24472  __Pyx_RaiseArgtupleInvalid("calculateFiniteElementFunctionGradientTensorValues", 1, 4, 4, 1); __PYX_ERR(0, 4470, __pyx_L3_error)
24473  }
24474  CYTHON_FALLTHROUGH;
24475  case 2:
24476  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_v_X_grad_w_dV)) != 0)) kw_args--;
24477  else {
24478  __Pyx_RaiseArgtupleInvalid("calculateFiniteElementFunctionGradientTensorValues", 1, 4, 4, 2); __PYX_ERR(0, 4470, __pyx_L3_error)
24479  }
24480  CYTHON_FALLTHROUGH;
24481  case 3:
24482  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_u_X_grad_w_dV)) != 0)) kw_args--;
24483  else {
24484  __Pyx_RaiseArgtupleInvalid("calculateFiniteElementFunctionGradientTensorValues", 1, 4, 4, 3); __PYX_ERR(0, 4470, __pyx_L3_error)
24485  }
24486  }
24487  if (unlikely(kw_args > 0)) {
24488  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateFiniteElementFunctionGradientTensorValues") < 0)) __PYX_ERR(0, 4470, __pyx_L3_error)
24489  }
24490  } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
24491  goto __pyx_L5_argtuple_error;
24492  } else {
24493  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
24494  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
24495  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
24496  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
24497  }
24498  __pyx_v_l2g = ((PyArrayObject *)values[0]);
24499  __pyx_v_dof = ((PyArrayObject *)values[1]);
24500  __pyx_v_grad_v_X_grad_w_dV = ((PyArrayObject *)values[2]);
24501  __pyx_v_grad_u_X_grad_w_dV = ((PyArrayObject *)values[3]);
24502  }
24503  goto __pyx_L4_argument_unpacking_done;
24504  __pyx_L5_argtuple_error:;
24505  __Pyx_RaiseArgtupleInvalid("calculateFiniteElementFunctionGradientTensorValues", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4470, __pyx_L3_error)
24506  __pyx_L3_error:;
24507  __Pyx_AddTraceback("cfemIntegrals.calculateFiniteElementFunctionGradientTensorValues", __pyx_clineno, __pyx_lineno, __pyx_filename);
24508  __Pyx_RefNannyFinishContext();
24509  return NULL;
24510  __pyx_L4_argument_unpacking_done:;
24511  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_l2g), __pyx_ptype_5numpy_ndarray, 1, "l2g", 0))) __PYX_ERR(0, 4470, __pyx_L1_error)
24512  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dof), __pyx_ptype_5numpy_ndarray, 1, "dof", 0))) __PYX_ERR(0, 4471, __pyx_L1_error)
24513  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_v_X_grad_w_dV), __pyx_ptype_5numpy_ndarray, 1, "grad_v_X_grad_w_dV", 0))) __PYX_ERR(0, 4472, __pyx_L1_error)
24514  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_u_X_grad_w_dV), __pyx_ptype_5numpy_ndarray, 1, "grad_u_X_grad_w_dV", 0))) __PYX_ERR(0, 4473, __pyx_L1_error)
24515  __pyx_r = __pyx_pf_13cfemIntegrals_208calculateFiniteElementFunctionGradientTensorValues(__pyx_self, __pyx_v_l2g, __pyx_v_dof, __pyx_v_grad_v_X_grad_w_dV, __pyx_v_grad_u_X_grad_w_dV);
24516 
24517  /* function exit code */
24518  goto __pyx_L0;
24519  __pyx_L1_error:;
24520  __pyx_r = NULL;
24521  __pyx_L0:;
24522  __Pyx_RefNannyFinishContext();
24523  return __pyx_r;
24524 }
24525 
24526 static PyObject *__pyx_pf_13cfemIntegrals_208calculateFiniteElementFunctionGradientTensorValues(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_dof, PyArrayObject *__pyx_v_grad_v_X_grad_w_dV, PyArrayObject *__pyx_v_grad_u_X_grad_w_dV) {
24527  int __pyx_v_nElements_global;
24528  int __pyx_v_nQuadraturePoints_element;
24529  int __pyx_v_nDOF_trial_element;
24530  int __pyx_v_nDOF_test_element;
24531  int __pyx_v_nComponents;
24532  int __pyx_v_nSpace;
24533  PyObject *__pyx_r = NULL;
24534  __Pyx_RefNannyDeclarations
24535  int __pyx_t_1;
24536  __Pyx_RefNannySetupContext("calculateFiniteElementFunctionGradientTensorValues", 0);
24537 
24538  /* "cfemIntegrals.pyx":4474
24539  * np.ndarray grad_v_X_grad_w_dV,
24540  * np.ndarray grad_u_X_grad_w_dV):
24541  * cdef int nElements_global = grad_v_X_grad_w_dV.shape[0] # <<<<<<<<<<<<<<
24542  * cdef int nQuadraturePoints_element = grad_v_X_grad_w_dV.shape[1]
24543  * cdef int nDOF_trial_element = grad_v_X_grad_w_dV.shape[2]
24544  */
24545  __pyx_v_nElements_global = (__pyx_v_grad_v_X_grad_w_dV->dimensions[0]);
24546 
24547  /* "cfemIntegrals.pyx":4475
24548  * np.ndarray grad_u_X_grad_w_dV):
24549  * cdef int nElements_global = grad_v_X_grad_w_dV.shape[0]
24550  * cdef int nQuadraturePoints_element = grad_v_X_grad_w_dV.shape[1] # <<<<<<<<<<<<<<
24551  * cdef int nDOF_trial_element = grad_v_X_grad_w_dV.shape[2]
24552  * cdef int nDOF_test_element = grad_v_X_grad_w_dV.shape[3]
24553  */
24554  __pyx_v_nQuadraturePoints_element = (__pyx_v_grad_v_X_grad_w_dV->dimensions[1]);
24555 
24556  /* "cfemIntegrals.pyx":4476
24557  * cdef int nElements_global = grad_v_X_grad_w_dV.shape[0]
24558  * cdef int nQuadraturePoints_element = grad_v_X_grad_w_dV.shape[1]
24559  * cdef int nDOF_trial_element = grad_v_X_grad_w_dV.shape[2] # <<<<<<<<<<<<<<
24560  * cdef int nDOF_test_element = grad_v_X_grad_w_dV.shape[3]
24561  * cdef int nComponents = 1
24562  */
24563  __pyx_v_nDOF_trial_element = (__pyx_v_grad_v_X_grad_w_dV->dimensions[2]);
24564 
24565  /* "cfemIntegrals.pyx":4477
24566  * cdef int nQuadraturePoints_element = grad_v_X_grad_w_dV.shape[1]
24567  * cdef int nDOF_trial_element = grad_v_X_grad_w_dV.shape[2]
24568  * cdef int nDOF_test_element = grad_v_X_grad_w_dV.shape[3] # <<<<<<<<<<<<<<
24569  * cdef int nComponents = 1
24570  * cdef int nSpace = 1
24571  */
24572  __pyx_v_nDOF_test_element = (__pyx_v_grad_v_X_grad_w_dV->dimensions[3]);
24573 
24574  /* "cfemIntegrals.pyx":4478
24575  * cdef int nDOF_trial_element = grad_v_X_grad_w_dV.shape[2]
24576  * cdef int nDOF_test_element = grad_v_X_grad_w_dV.shape[3]
24577  * cdef int nComponents = 1 # <<<<<<<<<<<<<<
24578  * cdef int nSpace = 1
24579  * if grad_u_X_grad_w_dV.ndim == 6:
24580  */
24581  __pyx_v_nComponents = 1;
24582 
24583  /* "cfemIntegrals.pyx":4479
24584  * cdef int nDOF_test_element = grad_v_X_grad_w_dV.shape[3]
24585  * cdef int nComponents = 1
24586  * cdef int nSpace = 1 # <<<<<<<<<<<<<<
24587  * if grad_u_X_grad_w_dV.ndim == 6:
24588  * nComponents = grad_u_X_grad_w_dV.shape[3]
24589  */
24590  __pyx_v_nSpace = 1;
24591 
24592  /* "cfemIntegrals.pyx":4480
24593  * cdef int nComponents = 1
24594  * cdef int nSpace = 1
24595  * if grad_u_X_grad_w_dV.ndim == 6: # <<<<<<<<<<<<<<
24596  * nComponents = grad_u_X_grad_w_dV.shape[3]
24597  * nSpace = grad_u_X_grad_w_dV.shape[4]
24598  */
24599  __pyx_t_1 = ((__pyx_v_grad_u_X_grad_w_dV->nd == 6) != 0);
24600  if (__pyx_t_1) {
24601 
24602  /* "cfemIntegrals.pyx":4481
24603  * cdef int nSpace = 1
24604  * if grad_u_X_grad_w_dV.ndim == 6:
24605  * nComponents = grad_u_X_grad_w_dV.shape[3] # <<<<<<<<<<<<<<
24606  * nSpace = grad_u_X_grad_w_dV.shape[4]
24607  * else:
24608  */
24609  __pyx_v_nComponents = (__pyx_v_grad_u_X_grad_w_dV->dimensions[3]);
24610 
24611  /* "cfemIntegrals.pyx":4482
24612  * if grad_u_X_grad_w_dV.ndim == 6:
24613  * nComponents = grad_u_X_grad_w_dV.shape[3]
24614  * nSpace = grad_u_X_grad_w_dV.shape[4] # <<<<<<<<<<<<<<
24615  * else:
24616  * nComponents = 1
24617  */
24618  __pyx_v_nSpace = (__pyx_v_grad_u_X_grad_w_dV->dimensions[4]);
24619 
24620  /* "cfemIntegrals.pyx":4480
24621  * cdef int nComponents = 1
24622  * cdef int nSpace = 1
24623  * if grad_u_X_grad_w_dV.ndim == 6: # <<<<<<<<<<<<<<
24624  * nComponents = grad_u_X_grad_w_dV.shape[3]
24625  * nSpace = grad_u_X_grad_w_dV.shape[4]
24626  */
24627  goto __pyx_L3;
24628  }
24629 
24630  /* "cfemIntegrals.pyx":4484
24631  * nSpace = grad_u_X_grad_w_dV.shape[4]
24632  * else:
24633  * nComponents = 1 # <<<<<<<<<<<<<<
24634  * nSpace = grad_u_X_grad_w_dV.shape[3]
24635  * ccalculateFiniteElementFunctionGradientTensorValues(nElements_global,
24636  */
24637  /*else*/ {
24638  __pyx_v_nComponents = 1;
24639 
24640  /* "cfemIntegrals.pyx":4485
24641  * else:
24642  * nComponents = 1
24643  * nSpace = grad_u_X_grad_w_dV.shape[3] # <<<<<<<<<<<<<<
24644  * ccalculateFiniteElementFunctionGradientTensorValues(nElements_global,
24645  * nQuadraturePoints_element,
24646  */
24647  __pyx_v_nSpace = (__pyx_v_grad_u_X_grad_w_dV->dimensions[3]);
24648  }
24649  __pyx_L3:;
24650 
24651  /* "cfemIntegrals.pyx":4486
24652  * nComponents = 1
24653  * nSpace = grad_u_X_grad_w_dV.shape[3]
24654  * ccalculateFiniteElementFunctionGradientTensorValues(nElements_global, # <<<<<<<<<<<<<<
24655  * nQuadraturePoints_element,
24656  * nDOF_trial_element,
24657  */
24658  calculateFiniteElementFunctionGradientTensorValues(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_trial_element, __pyx_v_nDOF_test_element, __pyx_v_nComponents, __pyx_v_nSpace, ((int *)__pyx_v_l2g->data), ((double *)__pyx_v_dof->data), ((double *)__pyx_v_grad_v_X_grad_w_dV->data), ((double *)__pyx_v_grad_u_X_grad_w_dV->data));
24659 
24660  /* "cfemIntegrals.pyx":4470
24661  * <double*>grad_v.data,
24662  * <double*>grad_u.data)
24663  * def calculateFiniteElementFunctionGradientTensorValues(np.ndarray l2g, # <<<<<<<<<<<<<<
24664  * np.ndarray dof,
24665  * np.ndarray grad_v_X_grad_w_dV,
24666  */
24667 
24668  /* function exit code */
24669  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
24670  __Pyx_XGIVEREF(__pyx_r);
24671  __Pyx_RefNannyFinishContext();
24672  return __pyx_r;
24673 }
24674 
24675 /* "cfemIntegrals.pyx":4496
24676  * <double*>grad_v_X_grad_w_dV.data,
24677  * <double*>grad_u_X_grad_w_dV.data)
24678  * def calculateFiniteElementFunctionValuesTrace(np.ndarray l2g, # <<<<<<<<<<<<<<
24679  * np.ndarray dof,
24680  * np.ndarray v,
24681  */
24682 
24683 /* Python wrapper */
24684 static PyObject *__pyx_pw_13cfemIntegrals_211calculateFiniteElementFunctionValuesTrace(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
24685 static PyMethodDef __pyx_mdef_13cfemIntegrals_211calculateFiniteElementFunctionValuesTrace = {"calculateFiniteElementFunctionValuesTrace", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_211calculateFiniteElementFunctionValuesTrace, METH_VARARGS|METH_KEYWORDS, 0};
24686 static PyObject *__pyx_pw_13cfemIntegrals_211calculateFiniteElementFunctionValuesTrace(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
24687  PyArrayObject *__pyx_v_l2g = 0;
24688  PyArrayObject *__pyx_v_dof = 0;
24689  PyArrayObject *__pyx_v_v = 0;
24690  PyArrayObject *__pyx_v_u = 0;
24691  int __pyx_lineno = 0;
24692  const char *__pyx_filename = NULL;
24693  int __pyx_clineno = 0;
24694  PyObject *__pyx_r = 0;
24695  __Pyx_RefNannyDeclarations
24696  __Pyx_RefNannySetupContext("calculateFiniteElementFunctionValuesTrace (wrapper)", 0);
24697  {
24698  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_l2g,&__pyx_n_s_dof,&__pyx_n_s_v,&__pyx_n_s_u,0};
24699  PyObject* values[4] = {0,0,0,0};
24700  if (unlikely(__pyx_kwds)) {
24701  Py_ssize_t kw_args;
24702  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
24703  switch (pos_args) {
24704  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
24705  CYTHON_FALLTHROUGH;
24706  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
24707  CYTHON_FALLTHROUGH;
24708  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
24709  CYTHON_FALLTHROUGH;
24710  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
24711  CYTHON_FALLTHROUGH;
24712  case 0: break;
24713  default: goto __pyx_L5_argtuple_error;
24714  }
24715  kw_args = PyDict_Size(__pyx_kwds);
24716  switch (pos_args) {
24717  case 0:
24718  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_l2g)) != 0)) kw_args--;
24719  else goto __pyx_L5_argtuple_error;
24720  CYTHON_FALLTHROUGH;
24721  case 1:
24722  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dof)) != 0)) kw_args--;
24723  else {
24724  __Pyx_RaiseArgtupleInvalid("calculateFiniteElementFunctionValuesTrace", 1, 4, 4, 1); __PYX_ERR(0, 4496, __pyx_L3_error)
24725  }
24726  CYTHON_FALLTHROUGH;
24727  case 2:
24728  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
24729  else {
24730  __Pyx_RaiseArgtupleInvalid("calculateFiniteElementFunctionValuesTrace", 1, 4, 4, 2); __PYX_ERR(0, 4496, __pyx_L3_error)
24731  }
24732  CYTHON_FALLTHROUGH;
24733  case 3:
24734  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u)) != 0)) kw_args--;
24735  else {
24736  __Pyx_RaiseArgtupleInvalid("calculateFiniteElementFunctionValuesTrace", 1, 4, 4, 3); __PYX_ERR(0, 4496, __pyx_L3_error)
24737  }
24738  }
24739  if (unlikely(kw_args > 0)) {
24740  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateFiniteElementFunctionValuesTrace") < 0)) __PYX_ERR(0, 4496, __pyx_L3_error)
24741  }
24742  } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
24743  goto __pyx_L5_argtuple_error;
24744  } else {
24745  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
24746  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
24747  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
24748  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
24749  }
24750  __pyx_v_l2g = ((PyArrayObject *)values[0]);
24751  __pyx_v_dof = ((PyArrayObject *)values[1]);
24752  __pyx_v_v = ((PyArrayObject *)values[2]);
24753  __pyx_v_u = ((PyArrayObject *)values[3]);
24754  }
24755  goto __pyx_L4_argument_unpacking_done;
24756  __pyx_L5_argtuple_error:;
24757  __Pyx_RaiseArgtupleInvalid("calculateFiniteElementFunctionValuesTrace", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4496, __pyx_L3_error)
24758  __pyx_L3_error:;
24759  __Pyx_AddTraceback("cfemIntegrals.calculateFiniteElementFunctionValuesTrace", __pyx_clineno, __pyx_lineno, __pyx_filename);
24760  __Pyx_RefNannyFinishContext();
24761  return NULL;
24762  __pyx_L4_argument_unpacking_done:;
24763  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_l2g), __pyx_ptype_5numpy_ndarray, 1, "l2g", 0))) __PYX_ERR(0, 4496, __pyx_L1_error)
24764  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dof), __pyx_ptype_5numpy_ndarray, 1, "dof", 0))) __PYX_ERR(0, 4497, __pyx_L1_error)
24765  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), __pyx_ptype_5numpy_ndarray, 1, "v", 0))) __PYX_ERR(0, 4498, __pyx_L1_error)
24766  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u), __pyx_ptype_5numpy_ndarray, 1, "u", 0))) __PYX_ERR(0, 4499, __pyx_L1_error)
24767  __pyx_r = __pyx_pf_13cfemIntegrals_210calculateFiniteElementFunctionValuesTrace(__pyx_self, __pyx_v_l2g, __pyx_v_dof, __pyx_v_v, __pyx_v_u);
24768 
24769  /* function exit code */
24770  goto __pyx_L0;
24771  __pyx_L1_error:;
24772  __pyx_r = NULL;
24773  __pyx_L0:;
24774  __Pyx_RefNannyFinishContext();
24775  return __pyx_r;
24776 }
24777 
24778 static PyObject *__pyx_pf_13cfemIntegrals_210calculateFiniteElementFunctionValuesTrace(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_dof, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_u) {
24779  int __pyx_v_nElements_global;
24780  int __pyx_v_nElementBoundaries_element;
24781  int __pyx_v_nQuadraturePoints_elementBoundary;
24782  int __pyx_v_nDOF_trial_element;
24783  int __pyx_v_nComponents;
24784  int __pyx_v_nd;
24785  PyObject *__pyx_r = NULL;
24786  __Pyx_RefNannyDeclarations
24787  int __pyx_t_1;
24788  int __pyx_t_2;
24789  __Pyx_RefNannySetupContext("calculateFiniteElementFunctionValuesTrace", 0);
24790 
24791  /* "cfemIntegrals.pyx":4500
24792  * np.ndarray v,
24793  * np.ndarray u):
24794  * cdef int nElements_global = v.shape[0] # <<<<<<<<<<<<<<
24795  * cdef int nElementBoundaries_element = v.shape[1]
24796  * cdef int nQuadraturePoints_elementBoundary = v.shape[2]
24797  */
24798  __pyx_v_nElements_global = (__pyx_v_v->dimensions[0]);
24799 
24800  /* "cfemIntegrals.pyx":4501
24801  * np.ndarray u):
24802  * cdef int nElements_global = v.shape[0]
24803  * cdef int nElementBoundaries_element = v.shape[1] # <<<<<<<<<<<<<<
24804  * cdef int nQuadraturePoints_elementBoundary = v.shape[2]
24805  * cdef int nDOF_trial_element = v.shape[3]
24806  */
24807  __pyx_v_nElementBoundaries_element = (__pyx_v_v->dimensions[1]);
24808 
24809  /* "cfemIntegrals.pyx":4502
24810  * cdef int nElements_global = v.shape[0]
24811  * cdef int nElementBoundaries_element = v.shape[1]
24812  * cdef int nQuadraturePoints_elementBoundary = v.shape[2] # <<<<<<<<<<<<<<
24813  * cdef int nDOF_trial_element = v.shape[3]
24814  * cdef int nComponents = 1
24815  */
24816  __pyx_v_nQuadraturePoints_elementBoundary = (__pyx_v_v->dimensions[2]);
24817 
24818  /* "cfemIntegrals.pyx":4503
24819  * cdef int nElementBoundaries_element = v.shape[1]
24820  * cdef int nQuadraturePoints_elementBoundary = v.shape[2]
24821  * cdef int nDOF_trial_element = v.shape[3] # <<<<<<<<<<<<<<
24822  * cdef int nComponents = 1
24823  * cdef int nd = u.ndim
24824  */
24825  __pyx_v_nDOF_trial_element = (__pyx_v_v->dimensions[3]);
24826 
24827  /* "cfemIntegrals.pyx":4504
24828  * cdef int nQuadraturePoints_elementBoundary = v.shape[2]
24829  * cdef int nDOF_trial_element = v.shape[3]
24830  * cdef int nComponents = 1 # <<<<<<<<<<<<<<
24831  * cdef int nd = u.ndim
24832  * if nd == 4:
24833  */
24834  __pyx_v_nComponents = 1;
24835 
24836  /* "cfemIntegrals.pyx":4505
24837  * cdef int nDOF_trial_element = v.shape[3]
24838  * cdef int nComponents = 1
24839  * cdef int nd = u.ndim # <<<<<<<<<<<<<<
24840  * if nd == 4:
24841  * nComponents = u.shape[3]
24842  */
24843  __pyx_t_1 = __pyx_v_u->nd;
24844  __pyx_v_nd = __pyx_t_1;
24845 
24846  /* "cfemIntegrals.pyx":4506
24847  * cdef int nComponents = 1
24848  * cdef int nd = u.ndim
24849  * if nd == 4: # <<<<<<<<<<<<<<
24850  * nComponents = u.shape[3]
24851  * else:
24852  */
24853  __pyx_t_2 = ((__pyx_v_nd == 4) != 0);
24854  if (__pyx_t_2) {
24855 
24856  /* "cfemIntegrals.pyx":4507
24857  * cdef int nd = u.ndim
24858  * if nd == 4:
24859  * nComponents = u.shape[3] # <<<<<<<<<<<<<<
24860  * else:
24861  * nComponents = 1
24862  */
24863  __pyx_v_nComponents = (__pyx_v_u->dimensions[3]);
24864 
24865  /* "cfemIntegrals.pyx":4506
24866  * cdef int nComponents = 1
24867  * cdef int nd = u.ndim
24868  * if nd == 4: # <<<<<<<<<<<<<<
24869  * nComponents = u.shape[3]
24870  * else:
24871  */
24872  goto __pyx_L3;
24873  }
24874 
24875  /* "cfemIntegrals.pyx":4509
24876  * nComponents = u.shape[3]
24877  * else:
24878  * nComponents = 1 # <<<<<<<<<<<<<<
24879  * ccalculateFiniteElementFunctionValuesTrace(nElements_global,
24880  * nElementBoundaries_element,
24881  */
24882  /*else*/ {
24883  __pyx_v_nComponents = 1;
24884  }
24885  __pyx_L3:;
24886 
24887  /* "cfemIntegrals.pyx":4510
24888  * else:
24889  * nComponents = 1
24890  * ccalculateFiniteElementFunctionValuesTrace(nElements_global, # <<<<<<<<<<<<<<
24891  * nElementBoundaries_element,
24892  * nQuadraturePoints_elementBoundary,
24893  */
24894  calculateFiniteElementFunctionValuesTrace(__pyx_v_nElements_global, __pyx_v_nElementBoundaries_element, __pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nDOF_trial_element, __pyx_v_nComponents, ((int *)__pyx_v_l2g->data), ((double *)__pyx_v_dof->data), ((double *)__pyx_v_v->data), ((double *)__pyx_v_u->data));
24895 
24896  /* "cfemIntegrals.pyx":4496
24897  * <double*>grad_v_X_grad_w_dV.data,
24898  * <double*>grad_u_X_grad_w_dV.data)
24899  * def calculateFiniteElementFunctionValuesTrace(np.ndarray l2g, # <<<<<<<<<<<<<<
24900  * np.ndarray dof,
24901  * np.ndarray v,
24902  */
24903 
24904  /* function exit code */
24905  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
24906  __Pyx_XGIVEREF(__pyx_r);
24907  __Pyx_RefNannyFinishContext();
24908  return __pyx_r;
24909 }
24910 
24911 /* "cfemIntegrals.pyx":4519
24912  * <double*>v.data,
24913  * <double*>u.data)
24914  * def calculateFiniteElementFunctionGradientValuesTrace(np.ndarray l2g, # <<<<<<<<<<<<<<
24915  * np.ndarray dof,
24916  * np.ndarray grad_v,
24917  */
24918 
24919 /* Python wrapper */
24920 static PyObject *__pyx_pw_13cfemIntegrals_213calculateFiniteElementFunctionGradientValuesTrace(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
24921 static PyMethodDef __pyx_mdef_13cfemIntegrals_213calculateFiniteElementFunctionGradientValuesTrace = {"calculateFiniteElementFunctionGradientValuesTrace", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_213calculateFiniteElementFunctionGradientValuesTrace, METH_VARARGS|METH_KEYWORDS, 0};
24922 static PyObject *__pyx_pw_13cfemIntegrals_213calculateFiniteElementFunctionGradientValuesTrace(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
24923  PyArrayObject *__pyx_v_l2g = 0;
24924  PyArrayObject *__pyx_v_dof = 0;
24925  PyArrayObject *__pyx_v_grad_v = 0;
24926  PyArrayObject *__pyx_v_grad_u = 0;
24927  int __pyx_lineno = 0;
24928  const char *__pyx_filename = NULL;
24929  int __pyx_clineno = 0;
24930  PyObject *__pyx_r = 0;
24931  __Pyx_RefNannyDeclarations
24932  __Pyx_RefNannySetupContext("calculateFiniteElementFunctionGradientValuesTrace (wrapper)", 0);
24933  {
24934  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_l2g,&__pyx_n_s_dof,&__pyx_n_s_grad_v,&__pyx_n_s_grad_u,0};
24935  PyObject* values[4] = {0,0,0,0};
24936  if (unlikely(__pyx_kwds)) {
24937  Py_ssize_t kw_args;
24938  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
24939  switch (pos_args) {
24940  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
24941  CYTHON_FALLTHROUGH;
24942  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
24943  CYTHON_FALLTHROUGH;
24944  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
24945  CYTHON_FALLTHROUGH;
24946  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
24947  CYTHON_FALLTHROUGH;
24948  case 0: break;
24949  default: goto __pyx_L5_argtuple_error;
24950  }
24951  kw_args = PyDict_Size(__pyx_kwds);
24952  switch (pos_args) {
24953  case 0:
24954  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_l2g)) != 0)) kw_args--;
24955  else goto __pyx_L5_argtuple_error;
24956  CYTHON_FALLTHROUGH;
24957  case 1:
24958  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dof)) != 0)) kw_args--;
24959  else {
24960  __Pyx_RaiseArgtupleInvalid("calculateFiniteElementFunctionGradientValuesTrace", 1, 4, 4, 1); __PYX_ERR(0, 4519, __pyx_L3_error)
24961  }
24962  CYTHON_FALLTHROUGH;
24963  case 2:
24964  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_v)) != 0)) kw_args--;
24965  else {
24966  __Pyx_RaiseArgtupleInvalid("calculateFiniteElementFunctionGradientValuesTrace", 1, 4, 4, 2); __PYX_ERR(0, 4519, __pyx_L3_error)
24967  }
24968  CYTHON_FALLTHROUGH;
24969  case 3:
24970  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_u)) != 0)) kw_args--;
24971  else {
24972  __Pyx_RaiseArgtupleInvalid("calculateFiniteElementFunctionGradientValuesTrace", 1, 4, 4, 3); __PYX_ERR(0, 4519, __pyx_L3_error)
24973  }
24974  }
24975  if (unlikely(kw_args > 0)) {
24976  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateFiniteElementFunctionGradientValuesTrace") < 0)) __PYX_ERR(0, 4519, __pyx_L3_error)
24977  }
24978  } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
24979  goto __pyx_L5_argtuple_error;
24980  } else {
24981  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
24982  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
24983  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
24984  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
24985  }
24986  __pyx_v_l2g = ((PyArrayObject *)values[0]);
24987  __pyx_v_dof = ((PyArrayObject *)values[1]);
24988  __pyx_v_grad_v = ((PyArrayObject *)values[2]);
24989  __pyx_v_grad_u = ((PyArrayObject *)values[3]);
24990  }
24991  goto __pyx_L4_argument_unpacking_done;
24992  __pyx_L5_argtuple_error:;
24993  __Pyx_RaiseArgtupleInvalid("calculateFiniteElementFunctionGradientValuesTrace", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4519, __pyx_L3_error)
24994  __pyx_L3_error:;
24995  __Pyx_AddTraceback("cfemIntegrals.calculateFiniteElementFunctionGradientValuesTrace", __pyx_clineno, __pyx_lineno, __pyx_filename);
24996  __Pyx_RefNannyFinishContext();
24997  return NULL;
24998  __pyx_L4_argument_unpacking_done:;
24999  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_l2g), __pyx_ptype_5numpy_ndarray, 1, "l2g", 0))) __PYX_ERR(0, 4519, __pyx_L1_error)
25000  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dof), __pyx_ptype_5numpy_ndarray, 1, "dof", 0))) __PYX_ERR(0, 4520, __pyx_L1_error)
25001  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_v), __pyx_ptype_5numpy_ndarray, 1, "grad_v", 0))) __PYX_ERR(0, 4521, __pyx_L1_error)
25002  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_u), __pyx_ptype_5numpy_ndarray, 1, "grad_u", 0))) __PYX_ERR(0, 4522, __pyx_L1_error)
25003  __pyx_r = __pyx_pf_13cfemIntegrals_212calculateFiniteElementFunctionGradientValuesTrace(__pyx_self, __pyx_v_l2g, __pyx_v_dof, __pyx_v_grad_v, __pyx_v_grad_u);
25004 
25005  /* function exit code */
25006  goto __pyx_L0;
25007  __pyx_L1_error:;
25008  __pyx_r = NULL;
25009  __pyx_L0:;
25010  __Pyx_RefNannyFinishContext();
25011  return __pyx_r;
25012 }
25013 
25014 static PyObject *__pyx_pf_13cfemIntegrals_212calculateFiniteElementFunctionGradientValuesTrace(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_dof, PyArrayObject *__pyx_v_grad_v, PyArrayObject *__pyx_v_grad_u) {
25015  int __pyx_v_nElements_global;
25016  int __pyx_v_nElementBoundaries_element;
25017  int __pyx_v_nQuadraturePoints_elementBoundary;
25018  int __pyx_v_nDOF_trial_element;
25019  int __pyx_v_nComponents;
25020  int __pyx_v_nSpace;
25021  int __pyx_v_nd;
25022  PyObject *__pyx_r = NULL;
25023  __Pyx_RefNannyDeclarations
25024  int __pyx_t_1;
25025  int __pyx_t_2;
25026  __Pyx_RefNannySetupContext("calculateFiniteElementFunctionGradientValuesTrace", 0);
25027 
25028  /* "cfemIntegrals.pyx":4523
25029  * np.ndarray grad_v,
25030  * np.ndarray grad_u):
25031  * cdef int nElements_global = grad_v.shape[0] # <<<<<<<<<<<<<<
25032  * cdef int nElementBoundaries_element = grad_v.shape[1]
25033  * cdef int nQuadraturePoints_elementBoundary = grad_v.shape[2]
25034  */
25035  __pyx_v_nElements_global = (__pyx_v_grad_v->dimensions[0]);
25036 
25037  /* "cfemIntegrals.pyx":4524
25038  * np.ndarray grad_u):
25039  * cdef int nElements_global = grad_v.shape[0]
25040  * cdef int nElementBoundaries_element = grad_v.shape[1] # <<<<<<<<<<<<<<
25041  * cdef int nQuadraturePoints_elementBoundary = grad_v.shape[2]
25042  * cdef int nDOF_trial_element = grad_v.shape[3]
25043  */
25044  __pyx_v_nElementBoundaries_element = (__pyx_v_grad_v->dimensions[1]);
25045 
25046  /* "cfemIntegrals.pyx":4525
25047  * cdef int nElements_global = grad_v.shape[0]
25048  * cdef int nElementBoundaries_element = grad_v.shape[1]
25049  * cdef int nQuadraturePoints_elementBoundary = grad_v.shape[2] # <<<<<<<<<<<<<<
25050  * cdef int nDOF_trial_element = grad_v.shape[3]
25051  * cdef int nComponents =1
25052  */
25053  __pyx_v_nQuadraturePoints_elementBoundary = (__pyx_v_grad_v->dimensions[2]);
25054 
25055  /* "cfemIntegrals.pyx":4526
25056  * cdef int nElementBoundaries_element = grad_v.shape[1]
25057  * cdef int nQuadraturePoints_elementBoundary = grad_v.shape[2]
25058  * cdef int nDOF_trial_element = grad_v.shape[3] # <<<<<<<<<<<<<<
25059  * cdef int nComponents =1
25060  * cdef int nSpace = 1
25061  */
25062  __pyx_v_nDOF_trial_element = (__pyx_v_grad_v->dimensions[3]);
25063 
25064  /* "cfemIntegrals.pyx":4527
25065  * cdef int nQuadraturePoints_elementBoundary = grad_v.shape[2]
25066  * cdef int nDOF_trial_element = grad_v.shape[3]
25067  * cdef int nComponents =1 # <<<<<<<<<<<<<<
25068  * cdef int nSpace = 1
25069  * cdef int nd = grad_u.ndim
25070  */
25071  __pyx_v_nComponents = 1;
25072 
25073  /* "cfemIntegrals.pyx":4528
25074  * cdef int nDOF_trial_element = grad_v.shape[3]
25075  * cdef int nComponents =1
25076  * cdef int nSpace = 1 # <<<<<<<<<<<<<<
25077  * cdef int nd = grad_u.ndim
25078  * if nd == 5:
25079  */
25080  __pyx_v_nSpace = 1;
25081 
25082  /* "cfemIntegrals.pyx":4529
25083  * cdef int nComponents =1
25084  * cdef int nSpace = 1
25085  * cdef int nd = grad_u.ndim # <<<<<<<<<<<<<<
25086  * if nd == 5:
25087  * nComponents = grad_u.shape[3]
25088  */
25089  __pyx_t_1 = __pyx_v_grad_u->nd;
25090  __pyx_v_nd = __pyx_t_1;
25091 
25092  /* "cfemIntegrals.pyx":4530
25093  * cdef int nSpace = 1
25094  * cdef int nd = grad_u.ndim
25095  * if nd == 5: # <<<<<<<<<<<<<<
25096  * nComponents = grad_u.shape[3]
25097  * nSpace = grad_u.shape[4]
25098  */
25099  __pyx_t_2 = ((__pyx_v_nd == 5) != 0);
25100  if (__pyx_t_2) {
25101 
25102  /* "cfemIntegrals.pyx":4531
25103  * cdef int nd = grad_u.ndim
25104  * if nd == 5:
25105  * nComponents = grad_u.shape[3] # <<<<<<<<<<<<<<
25106  * nSpace = grad_u.shape[4]
25107  * else:
25108  */
25109  __pyx_v_nComponents = (__pyx_v_grad_u->dimensions[3]);
25110 
25111  /* "cfemIntegrals.pyx":4532
25112  * if nd == 5:
25113  * nComponents = grad_u.shape[3]
25114  * nSpace = grad_u.shape[4] # <<<<<<<<<<<<<<
25115  * else:
25116  * nComponents = 1
25117  */
25118  __pyx_v_nSpace = (__pyx_v_grad_u->dimensions[4]);
25119 
25120  /* "cfemIntegrals.pyx":4530
25121  * cdef int nSpace = 1
25122  * cdef int nd = grad_u.ndim
25123  * if nd == 5: # <<<<<<<<<<<<<<
25124  * nComponents = grad_u.shape[3]
25125  * nSpace = grad_u.shape[4]
25126  */
25127  goto __pyx_L3;
25128  }
25129 
25130  /* "cfemIntegrals.pyx":4534
25131  * nSpace = grad_u.shape[4]
25132  * else:
25133  * nComponents = 1 # <<<<<<<<<<<<<<
25134  * nSpace = grad_u.shape[3]
25135  * ccalculateFiniteElementFunctionGradientValuesTrace(nElements_global,
25136  */
25137  /*else*/ {
25138  __pyx_v_nComponents = 1;
25139 
25140  /* "cfemIntegrals.pyx":4535
25141  * else:
25142  * nComponents = 1
25143  * nSpace = grad_u.shape[3] # <<<<<<<<<<<<<<
25144  * ccalculateFiniteElementFunctionGradientValuesTrace(nElements_global,
25145  * nElementBoundaries_element,
25146  */
25147  __pyx_v_nSpace = (__pyx_v_grad_u->dimensions[3]);
25148  }
25149  __pyx_L3:;
25150 
25151  /* "cfemIntegrals.pyx":4536
25152  * nComponents = 1
25153  * nSpace = grad_u.shape[3]
25154  * ccalculateFiniteElementFunctionGradientValuesTrace(nElements_global, # <<<<<<<<<<<<<<
25155  * nElementBoundaries_element,
25156  * nQuadraturePoints_elementBoundary,
25157  */
25158  calculateFiniteElementFunctionGradientValuesTrace(__pyx_v_nElements_global, __pyx_v_nElementBoundaries_element, __pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nDOF_trial_element, __pyx_v_nComponents, __pyx_v_nSpace, ((int *)__pyx_v_l2g->data), ((double *)__pyx_v_dof->data), ((double *)__pyx_v_grad_v->data), ((double *)__pyx_v_grad_u->data));
25159 
25160  /* "cfemIntegrals.pyx":4519
25161  * <double*>v.data,
25162  * <double*>u.data)
25163  * def calculateFiniteElementFunctionGradientValuesTrace(np.ndarray l2g, # <<<<<<<<<<<<<<
25164  * np.ndarray dof,
25165  * np.ndarray grad_v,
25166  */
25167 
25168  /* function exit code */
25169  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
25170  __Pyx_XGIVEREF(__pyx_r);
25171  __Pyx_RefNannyFinishContext();
25172  return __pyx_r;
25173 }
25174 
25175 /* "cfemIntegrals.pyx":4546
25176  * <double*>grad_v.data,
25177  * <double*>grad_u.data)
25178  * def calculateFlowVelocity(np.ndarray f, # <<<<<<<<<<<<<<
25179  * np.ndarray a,
25180  * np.ndarray grad_phi,
25181  */
25182 
25183 /* Python wrapper */
25184 static PyObject *__pyx_pw_13cfemIntegrals_215calculateFlowVelocity(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
25185 static PyMethodDef __pyx_mdef_13cfemIntegrals_215calculateFlowVelocity = {"calculateFlowVelocity", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_215calculateFlowVelocity, METH_VARARGS|METH_KEYWORDS, 0};
25186 static PyObject *__pyx_pw_13cfemIntegrals_215calculateFlowVelocity(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
25187  PyArrayObject *__pyx_v_f = 0;
25188  PyArrayObject *__pyx_v_a = 0;
25189  PyArrayObject *__pyx_v_grad_phi = 0;
25190  PyArrayObject *__pyx_v_v = 0;
25191  int __pyx_lineno = 0;
25192  const char *__pyx_filename = NULL;
25193  int __pyx_clineno = 0;
25194  PyObject *__pyx_r = 0;
25195  __Pyx_RefNannyDeclarations
25196  __Pyx_RefNannySetupContext("calculateFlowVelocity (wrapper)", 0);
25197  {
25198  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_f,&__pyx_n_s_a,&__pyx_n_s_grad_phi,&__pyx_n_s_v,0};
25199  PyObject* values[4] = {0,0,0,0};
25200  if (unlikely(__pyx_kwds)) {
25201  Py_ssize_t kw_args;
25202  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
25203  switch (pos_args) {
25204  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
25205  CYTHON_FALLTHROUGH;
25206  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
25207  CYTHON_FALLTHROUGH;
25208  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
25209  CYTHON_FALLTHROUGH;
25210  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
25211  CYTHON_FALLTHROUGH;
25212  case 0: break;
25213  default: goto __pyx_L5_argtuple_error;
25214  }
25215  kw_args = PyDict_Size(__pyx_kwds);
25216  switch (pos_args) {
25217  case 0:
25218  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_f)) != 0)) kw_args--;
25219  else goto __pyx_L5_argtuple_error;
25220  CYTHON_FALLTHROUGH;
25221  case 1:
25222  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
25223  else {
25224  __Pyx_RaiseArgtupleInvalid("calculateFlowVelocity", 1, 4, 4, 1); __PYX_ERR(0, 4546, __pyx_L3_error)
25225  }
25226  CYTHON_FALLTHROUGH;
25227  case 2:
25228  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_phi)) != 0)) kw_args--;
25229  else {
25230  __Pyx_RaiseArgtupleInvalid("calculateFlowVelocity", 1, 4, 4, 2); __PYX_ERR(0, 4546, __pyx_L3_error)
25231  }
25232  CYTHON_FALLTHROUGH;
25233  case 3:
25234  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
25235  else {
25236  __Pyx_RaiseArgtupleInvalid("calculateFlowVelocity", 1, 4, 4, 3); __PYX_ERR(0, 4546, __pyx_L3_error)
25237  }
25238  }
25239  if (unlikely(kw_args > 0)) {
25240  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateFlowVelocity") < 0)) __PYX_ERR(0, 4546, __pyx_L3_error)
25241  }
25242  } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
25243  goto __pyx_L5_argtuple_error;
25244  } else {
25245  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
25246  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
25247  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
25248  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
25249  }
25250  __pyx_v_f = ((PyArrayObject *)values[0]);
25251  __pyx_v_a = ((PyArrayObject *)values[1]);
25252  __pyx_v_grad_phi = ((PyArrayObject *)values[2]);
25253  __pyx_v_v = ((PyArrayObject *)values[3]);
25254  }
25255  goto __pyx_L4_argument_unpacking_done;
25256  __pyx_L5_argtuple_error:;
25257  __Pyx_RaiseArgtupleInvalid("calculateFlowVelocity", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4546, __pyx_L3_error)
25258  __pyx_L3_error:;
25259  __Pyx_AddTraceback("cfemIntegrals.calculateFlowVelocity", __pyx_clineno, __pyx_lineno, __pyx_filename);
25260  __Pyx_RefNannyFinishContext();
25261  return NULL;
25262  __pyx_L4_argument_unpacking_done:;
25263  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_f), __pyx_ptype_5numpy_ndarray, 1, "f", 0))) __PYX_ERR(0, 4546, __pyx_L1_error)
25264  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1, "a", 0))) __PYX_ERR(0, 4547, __pyx_L1_error)
25265  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_phi), __pyx_ptype_5numpy_ndarray, 1, "grad_phi", 0))) __PYX_ERR(0, 4548, __pyx_L1_error)
25266  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), __pyx_ptype_5numpy_ndarray, 1, "v", 0))) __PYX_ERR(0, 4549, __pyx_L1_error)
25267  __pyx_r = __pyx_pf_13cfemIntegrals_214calculateFlowVelocity(__pyx_self, __pyx_v_f, __pyx_v_a, __pyx_v_grad_phi, __pyx_v_v);
25268 
25269  /* function exit code */
25270  goto __pyx_L0;
25271  __pyx_L1_error:;
25272  __pyx_r = NULL;
25273  __pyx_L0:;
25274  __Pyx_RefNannyFinishContext();
25275  return __pyx_r;
25276 }
25277 
25278 static PyObject *__pyx_pf_13cfemIntegrals_214calculateFlowVelocity(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_f, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_grad_phi, PyArrayObject *__pyx_v_v) {
25279  int __pyx_v_nElements_global;
25280  int __pyx_v_nQuadraturePoints_element;
25281  int __pyx_v_nSpace;
25282  PyObject *__pyx_r = NULL;
25283  __Pyx_RefNannyDeclarations
25284  __Pyx_RefNannySetupContext("calculateFlowVelocity", 0);
25285 
25286  /* "cfemIntegrals.pyx":4550
25287  * np.ndarray grad_phi,
25288  * np.ndarray v):
25289  * cdef int nElements_global = f.shape[0] # <<<<<<<<<<<<<<
25290  * cdef int nQuadraturePoints_element = f.shape[1]
25291  * cdef int nSpace = f.shape[2]
25292  */
25293  __pyx_v_nElements_global = (__pyx_v_f->dimensions[0]);
25294 
25295  /* "cfemIntegrals.pyx":4551
25296  * np.ndarray v):
25297  * cdef int nElements_global = f.shape[0]
25298  * cdef int nQuadraturePoints_element = f.shape[1] # <<<<<<<<<<<<<<
25299  * cdef int nSpace = f.shape[2]
25300  * ccalculateFlowVelocity(nElements_global,
25301  */
25302  __pyx_v_nQuadraturePoints_element = (__pyx_v_f->dimensions[1]);
25303 
25304  /* "cfemIntegrals.pyx":4552
25305  * cdef int nElements_global = f.shape[0]
25306  * cdef int nQuadraturePoints_element = f.shape[1]
25307  * cdef int nSpace = f.shape[2] # <<<<<<<<<<<<<<
25308  * ccalculateFlowVelocity(nElements_global,
25309  * nQuadraturePoints_element,
25310  */
25311  __pyx_v_nSpace = (__pyx_v_f->dimensions[2]);
25312 
25313  /* "cfemIntegrals.pyx":4553
25314  * cdef int nQuadraturePoints_element = f.shape[1]
25315  * cdef int nSpace = f.shape[2]
25316  * ccalculateFlowVelocity(nElements_global, # <<<<<<<<<<<<<<
25317  * nQuadraturePoints_element,
25318  * nSpace,
25319  */
25320  calculateFlowVelocity(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nSpace, ((double *)__pyx_v_f->data), ((double *)__pyx_v_a->data), ((double *)__pyx_v_grad_phi->data), ((double *)__pyx_v_v->data));
25321 
25322  /* "cfemIntegrals.pyx":4546
25323  * <double*>grad_v.data,
25324  * <double*>grad_u.data)
25325  * def calculateFlowVelocity(np.ndarray f, # <<<<<<<<<<<<<<
25326  * np.ndarray a,
25327  * np.ndarray grad_phi,
25328  */
25329 
25330  /* function exit code */
25331  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
25332  __Pyx_XGIVEREF(__pyx_r);
25333  __Pyx_RefNannyFinishContext();
25334  return __pyx_r;
25335 }
25336 
25337 /* "cfemIntegrals.pyx":4560
25338  * <double*>grad_phi.data,
25339  * <double*>v.data)
25340  * def updateAddJacobian_CSR(int jacIndex, # <<<<<<<<<<<<<<
25341  * double val,
25342  * jac):
25343  */
25344 
25345 /* Python wrapper */
25346 static PyObject *__pyx_pw_13cfemIntegrals_217updateAddJacobian_CSR(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
25347 static PyMethodDef __pyx_mdef_13cfemIntegrals_217updateAddJacobian_CSR = {"updateAddJacobian_CSR", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_217updateAddJacobian_CSR, METH_VARARGS|METH_KEYWORDS, 0};
25348 static PyObject *__pyx_pw_13cfemIntegrals_217updateAddJacobian_CSR(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
25349  int __pyx_v_jacIndex;
25350  double __pyx_v_val;
25351  PyObject *__pyx_v_jac = 0;
25352  int __pyx_lineno = 0;
25353  const char *__pyx_filename = NULL;
25354  int __pyx_clineno = 0;
25355  PyObject *__pyx_r = 0;
25356  __Pyx_RefNannyDeclarations
25357  __Pyx_RefNannySetupContext("updateAddJacobian_CSR (wrapper)", 0);
25358  {
25359  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_jacIndex,&__pyx_n_s_val,&__pyx_n_s_jac,0};
25360  PyObject* values[3] = {0,0,0};
25361  if (unlikely(__pyx_kwds)) {
25362  Py_ssize_t kw_args;
25363  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
25364  switch (pos_args) {
25365  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
25366  CYTHON_FALLTHROUGH;
25367  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
25368  CYTHON_FALLTHROUGH;
25369  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
25370  CYTHON_FALLTHROUGH;
25371  case 0: break;
25372  default: goto __pyx_L5_argtuple_error;
25373  }
25374  kw_args = PyDict_Size(__pyx_kwds);
25375  switch (pos_args) {
25376  case 0:
25377  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jacIndex)) != 0)) kw_args--;
25378  else goto __pyx_L5_argtuple_error;
25379  CYTHON_FALLTHROUGH;
25380  case 1:
25381  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_val)) != 0)) kw_args--;
25382  else {
25383  __Pyx_RaiseArgtupleInvalid("updateAddJacobian_CSR", 1, 3, 3, 1); __PYX_ERR(0, 4560, __pyx_L3_error)
25384  }
25385  CYTHON_FALLTHROUGH;
25386  case 2:
25387  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jac)) != 0)) kw_args--;
25388  else {
25389  __Pyx_RaiseArgtupleInvalid("updateAddJacobian_CSR", 1, 3, 3, 2); __PYX_ERR(0, 4560, __pyx_L3_error)
25390  }
25391  }
25392  if (unlikely(kw_args > 0)) {
25393  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateAddJacobian_CSR") < 0)) __PYX_ERR(0, 4560, __pyx_L3_error)
25394  }
25395  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
25396  goto __pyx_L5_argtuple_error;
25397  } else {
25398  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
25399  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
25400  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
25401  }
25402  __pyx_v_jacIndex = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_jacIndex == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4560, __pyx_L3_error)
25403  __pyx_v_val = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_val == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 4561, __pyx_L3_error)
25404  __pyx_v_jac = values[2];
25405  }
25406  goto __pyx_L4_argument_unpacking_done;
25407  __pyx_L5_argtuple_error:;
25408  __Pyx_RaiseArgtupleInvalid("updateAddJacobian_CSR", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4560, __pyx_L3_error)
25409  __pyx_L3_error:;
25410  __Pyx_AddTraceback("cfemIntegrals.updateAddJacobian_CSR", __pyx_clineno, __pyx_lineno, __pyx_filename);
25411  __Pyx_RefNannyFinishContext();
25412  return NULL;
25413  __pyx_L4_argument_unpacking_done:;
25414  __pyx_r = __pyx_pf_13cfemIntegrals_216updateAddJacobian_CSR(__pyx_self, __pyx_v_jacIndex, __pyx_v_val, __pyx_v_jac);
25415 
25416  /* function exit code */
25417  __Pyx_RefNannyFinishContext();
25418  return __pyx_r;
25419 }
25420 
25421 static PyObject *__pyx_pf_13cfemIntegrals_216updateAddJacobian_CSR(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_jacIndex, double __pyx_v_val, PyObject *__pyx_v_jac) {
25422  CYTHON_UNUSED PyArrayObject *__pyx_v_rowptr = 0;
25423  CYTHON_UNUSED PyArrayObject *__pyx_v_colind = 0;
25424  PyArrayObject *__pyx_v_jac_array = 0;
25425  PyObject *__pyx_r = NULL;
25426  __Pyx_RefNannyDeclarations
25427  PyObject *__pyx_t_1 = NULL;
25428  PyObject *__pyx_t_2 = NULL;
25429  PyObject *__pyx_t_3 = NULL;
25430  PyObject *__pyx_t_4 = NULL;
25431  PyObject *__pyx_t_5 = NULL;
25432  PyObject *(*__pyx_t_6)(PyObject *);
25433  int __pyx_lineno = 0;
25434  const char *__pyx_filename = NULL;
25435  int __pyx_clineno = 0;
25436  __Pyx_RefNannySetupContext("updateAddJacobian_CSR", 0);
25437 
25438  /* "cfemIntegrals.pyx":4564
25439  * jac):
25440  * cdef np.ndarray rowptr, colind, jac_array
25441  * (rowptr,colind,jac_array) = jac.getCSRrepresentation() # <<<<<<<<<<<<<<
25442  * cupdateAddJacobian_CSR(jacIndex,
25443  * val,
25444  */
25445  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_jac, __pyx_n_s_getCSRrepresentation); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4564, __pyx_L1_error)
25446  __Pyx_GOTREF(__pyx_t_2);
25447  __pyx_t_3 = NULL;
25448  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
25449  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
25450  if (likely(__pyx_t_3)) {
25451  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
25452  __Pyx_INCREF(__pyx_t_3);
25453  __Pyx_INCREF(function);
25454  __Pyx_DECREF_SET(__pyx_t_2, function);
25455  }
25456  }
25457  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
25458  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
25459  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4564, __pyx_L1_error)
25460  __Pyx_GOTREF(__pyx_t_1);
25461  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25462  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
25463  PyObject* sequence = __pyx_t_1;
25464  Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
25465  if (unlikely(size != 3)) {
25466  if (size > 3) __Pyx_RaiseTooManyValuesError(3);
25467  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
25468  __PYX_ERR(0, 4564, __pyx_L1_error)
25469  }
25470  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
25471  if (likely(PyTuple_CheckExact(sequence))) {
25472  __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
25473  __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1);
25474  __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2);
25475  } else {
25476  __pyx_t_2 = PyList_GET_ITEM(sequence, 0);
25477  __pyx_t_3 = PyList_GET_ITEM(sequence, 1);
25478  __pyx_t_4 = PyList_GET_ITEM(sequence, 2);
25479  }
25480  __Pyx_INCREF(__pyx_t_2);
25481  __Pyx_INCREF(__pyx_t_3);
25482  __Pyx_INCREF(__pyx_t_4);
25483  #else
25484  __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4564, __pyx_L1_error)
25485  __Pyx_GOTREF(__pyx_t_2);
25486  __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4564, __pyx_L1_error)
25487  __Pyx_GOTREF(__pyx_t_3);
25488  __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4564, __pyx_L1_error)
25489  __Pyx_GOTREF(__pyx_t_4);
25490  #endif
25491  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25492  } else {
25493  Py_ssize_t index = -1;
25494  __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4564, __pyx_L1_error)
25495  __Pyx_GOTREF(__pyx_t_5);
25496  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25497  __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext;
25498  index = 0; __pyx_t_2 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
25499  __Pyx_GOTREF(__pyx_t_2);
25500  index = 1; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
25501  __Pyx_GOTREF(__pyx_t_3);
25502  index = 2; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed;
25503  __Pyx_GOTREF(__pyx_t_4);
25504  if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 3) < 0) __PYX_ERR(0, 4564, __pyx_L1_error)
25505  __pyx_t_6 = NULL;
25506  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
25507  goto __pyx_L4_unpacking_done;
25508  __pyx_L3_unpacking_failed:;
25509  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
25510  __pyx_t_6 = NULL;
25511  if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
25512  __PYX_ERR(0, 4564, __pyx_L1_error)
25513  __pyx_L4_unpacking_done:;
25514  }
25515  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4564, __pyx_L1_error)
25516  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4564, __pyx_L1_error)
25517  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4564, __pyx_L1_error)
25518  __pyx_v_rowptr = ((PyArrayObject *)__pyx_t_2);
25519  __pyx_t_2 = 0;
25520  __pyx_v_colind = ((PyArrayObject *)__pyx_t_3);
25521  __pyx_t_3 = 0;
25522  __pyx_v_jac_array = ((PyArrayObject *)__pyx_t_4);
25523  __pyx_t_4 = 0;
25524 
25525  /* "cfemIntegrals.pyx":4565
25526  * cdef np.ndarray rowptr, colind, jac_array
25527  * (rowptr,colind,jac_array) = jac.getCSRrepresentation()
25528  * cupdateAddJacobian_CSR(jacIndex, # <<<<<<<<<<<<<<
25529  * val,
25530  * <double*>jac_array.data)
25531  */
25532  updateAddJacobian_CSR(__pyx_v_jacIndex, __pyx_v_val, ((double *)__pyx_v_jac_array->data));
25533 
25534  /* "cfemIntegrals.pyx":4560
25535  * <double*>grad_phi.data,
25536  * <double*>v.data)
25537  * def updateAddJacobian_CSR(int jacIndex, # <<<<<<<<<<<<<<
25538  * double val,
25539  * jac):
25540  */
25541 
25542  /* function exit code */
25543  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
25544  goto __pyx_L0;
25545  __pyx_L1_error:;
25546  __Pyx_XDECREF(__pyx_t_1);
25547  __Pyx_XDECREF(__pyx_t_2);
25548  __Pyx_XDECREF(__pyx_t_3);
25549  __Pyx_XDECREF(__pyx_t_4);
25550  __Pyx_XDECREF(__pyx_t_5);
25551  __Pyx_AddTraceback("cfemIntegrals.updateAddJacobian_CSR", __pyx_clineno, __pyx_lineno, __pyx_filename);
25552  __pyx_r = NULL;
25553  __pyx_L0:;
25554  __Pyx_XDECREF((PyObject *)__pyx_v_rowptr);
25555  __Pyx_XDECREF((PyObject *)__pyx_v_colind);
25556  __Pyx_XDECREF((PyObject *)__pyx_v_jac_array);
25557  __Pyx_XGIVEREF(__pyx_r);
25558  __Pyx_RefNannyFinishContext();
25559  return __pyx_r;
25560 }
25561 
25562 /* "cfemIntegrals.pyx":4568
25563  * val,
25564  * <double*>jac_array.data)
25565  * def zeroJacobian_CSR(int nNonzeros, # <<<<<<<<<<<<<<
25566  * jac):
25567  * cdef np.ndarray rowptr, colind, jac_array
25568  */
25569 
25570 /* Python wrapper */
25571 static PyObject *__pyx_pw_13cfemIntegrals_219zeroJacobian_CSR(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
25572 static PyMethodDef __pyx_mdef_13cfemIntegrals_219zeroJacobian_CSR = {"zeroJacobian_CSR", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_219zeroJacobian_CSR, METH_VARARGS|METH_KEYWORDS, 0};
25573 static PyObject *__pyx_pw_13cfemIntegrals_219zeroJacobian_CSR(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
25574  int __pyx_v_nNonzeros;
25575  PyObject *__pyx_v_jac = 0;
25576  int __pyx_lineno = 0;
25577  const char *__pyx_filename = NULL;
25578  int __pyx_clineno = 0;
25579  PyObject *__pyx_r = 0;
25580  __Pyx_RefNannyDeclarations
25581  __Pyx_RefNannySetupContext("zeroJacobian_CSR (wrapper)", 0);
25582  {
25583  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nNonzeros,&__pyx_n_s_jac,0};
25584  PyObject* values[2] = {0,0};
25585  if (unlikely(__pyx_kwds)) {
25586  Py_ssize_t kw_args;
25587  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
25588  switch (pos_args) {
25589  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
25590  CYTHON_FALLTHROUGH;
25591  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
25592  CYTHON_FALLTHROUGH;
25593  case 0: break;
25594  default: goto __pyx_L5_argtuple_error;
25595  }
25596  kw_args = PyDict_Size(__pyx_kwds);
25597  switch (pos_args) {
25598  case 0:
25599  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nNonzeros)) != 0)) kw_args--;
25600  else goto __pyx_L5_argtuple_error;
25601  CYTHON_FALLTHROUGH;
25602  case 1:
25603  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jac)) != 0)) kw_args--;
25604  else {
25605  __Pyx_RaiseArgtupleInvalid("zeroJacobian_CSR", 1, 2, 2, 1); __PYX_ERR(0, 4568, __pyx_L3_error)
25606  }
25607  }
25608  if (unlikely(kw_args > 0)) {
25609  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "zeroJacobian_CSR") < 0)) __PYX_ERR(0, 4568, __pyx_L3_error)
25610  }
25611  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
25612  goto __pyx_L5_argtuple_error;
25613  } else {
25614  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
25615  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
25616  }
25617  __pyx_v_nNonzeros = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_nNonzeros == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4568, __pyx_L3_error)
25618  __pyx_v_jac = values[1];
25619  }
25620  goto __pyx_L4_argument_unpacking_done;
25621  __pyx_L5_argtuple_error:;
25622  __Pyx_RaiseArgtupleInvalid("zeroJacobian_CSR", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4568, __pyx_L3_error)
25623  __pyx_L3_error:;
25624  __Pyx_AddTraceback("cfemIntegrals.zeroJacobian_CSR", __pyx_clineno, __pyx_lineno, __pyx_filename);
25625  __Pyx_RefNannyFinishContext();
25626  return NULL;
25627  __pyx_L4_argument_unpacking_done:;
25628  __pyx_r = __pyx_pf_13cfemIntegrals_218zeroJacobian_CSR(__pyx_self, __pyx_v_nNonzeros, __pyx_v_jac);
25629 
25630  /* function exit code */
25631  __Pyx_RefNannyFinishContext();
25632  return __pyx_r;
25633 }
25634 
25635 static PyObject *__pyx_pf_13cfemIntegrals_218zeroJacobian_CSR(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nNonzeros, PyObject *__pyx_v_jac) {
25636  CYTHON_UNUSED PyArrayObject *__pyx_v_rowptr = 0;
25637  CYTHON_UNUSED PyArrayObject *__pyx_v_colind = 0;
25638  PyArrayObject *__pyx_v_jac_array = 0;
25639  PyObject *__pyx_r = NULL;
25640  __Pyx_RefNannyDeclarations
25641  PyObject *__pyx_t_1 = NULL;
25642  PyObject *__pyx_t_2 = NULL;
25643  PyObject *__pyx_t_3 = NULL;
25644  PyObject *__pyx_t_4 = NULL;
25645  PyObject *__pyx_t_5 = NULL;
25646  PyObject *(*__pyx_t_6)(PyObject *);
25647  int __pyx_lineno = 0;
25648  const char *__pyx_filename = NULL;
25649  int __pyx_clineno = 0;
25650  __Pyx_RefNannySetupContext("zeroJacobian_CSR", 0);
25651 
25652  /* "cfemIntegrals.pyx":4571
25653  * jac):
25654  * cdef np.ndarray rowptr, colind, jac_array
25655  * (rowptr,colind,jac_array) = jac.getCSRrepresentation() # <<<<<<<<<<<<<<
25656  * czeroJacobian_CSR(nNonzeros,
25657  * <double*>jac_array.data)
25658  */
25659  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_jac, __pyx_n_s_getCSRrepresentation); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4571, __pyx_L1_error)
25660  __Pyx_GOTREF(__pyx_t_2);
25661  __pyx_t_3 = NULL;
25662  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
25663  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
25664  if (likely(__pyx_t_3)) {
25665  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
25666  __Pyx_INCREF(__pyx_t_3);
25667  __Pyx_INCREF(function);
25668  __Pyx_DECREF_SET(__pyx_t_2, function);
25669  }
25670  }
25671  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
25672  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
25673  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4571, __pyx_L1_error)
25674  __Pyx_GOTREF(__pyx_t_1);
25675  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25676  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
25677  PyObject* sequence = __pyx_t_1;
25678  Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
25679  if (unlikely(size != 3)) {
25680  if (size > 3) __Pyx_RaiseTooManyValuesError(3);
25681  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
25682  __PYX_ERR(0, 4571, __pyx_L1_error)
25683  }
25684  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
25685  if (likely(PyTuple_CheckExact(sequence))) {
25686  __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
25687  __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1);
25688  __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2);
25689  } else {
25690  __pyx_t_2 = PyList_GET_ITEM(sequence, 0);
25691  __pyx_t_3 = PyList_GET_ITEM(sequence, 1);
25692  __pyx_t_4 = PyList_GET_ITEM(sequence, 2);
25693  }
25694  __Pyx_INCREF(__pyx_t_2);
25695  __Pyx_INCREF(__pyx_t_3);
25696  __Pyx_INCREF(__pyx_t_4);
25697  #else
25698  __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4571, __pyx_L1_error)
25699  __Pyx_GOTREF(__pyx_t_2);
25700  __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4571, __pyx_L1_error)
25701  __Pyx_GOTREF(__pyx_t_3);
25702  __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4571, __pyx_L1_error)
25703  __Pyx_GOTREF(__pyx_t_4);
25704  #endif
25705  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25706  } else {
25707  Py_ssize_t index = -1;
25708  __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4571, __pyx_L1_error)
25709  __Pyx_GOTREF(__pyx_t_5);
25710  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25711  __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext;
25712  index = 0; __pyx_t_2 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
25713  __Pyx_GOTREF(__pyx_t_2);
25714  index = 1; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
25715  __Pyx_GOTREF(__pyx_t_3);
25716  index = 2; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed;
25717  __Pyx_GOTREF(__pyx_t_4);
25718  if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 3) < 0) __PYX_ERR(0, 4571, __pyx_L1_error)
25719  __pyx_t_6 = NULL;
25720  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
25721  goto __pyx_L4_unpacking_done;
25722  __pyx_L3_unpacking_failed:;
25723  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
25724  __pyx_t_6 = NULL;
25725  if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
25726  __PYX_ERR(0, 4571, __pyx_L1_error)
25727  __pyx_L4_unpacking_done:;
25728  }
25729  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4571, __pyx_L1_error)
25730  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4571, __pyx_L1_error)
25731  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4571, __pyx_L1_error)
25732  __pyx_v_rowptr = ((PyArrayObject *)__pyx_t_2);
25733  __pyx_t_2 = 0;
25734  __pyx_v_colind = ((PyArrayObject *)__pyx_t_3);
25735  __pyx_t_3 = 0;
25736  __pyx_v_jac_array = ((PyArrayObject *)__pyx_t_4);
25737  __pyx_t_4 = 0;
25738 
25739  /* "cfemIntegrals.pyx":4572
25740  * cdef np.ndarray rowptr, colind, jac_array
25741  * (rowptr,colind,jac_array) = jac.getCSRrepresentation()
25742  * czeroJacobian_CSR(nNonzeros, # <<<<<<<<<<<<<<
25743  * <double*>jac_array.data)
25744  * def calculateInteriorElementBoundaryVelocities(int nInteriorElementBoundaries_global,
25745  */
25746  zeroJacobian_CSR(__pyx_v_nNonzeros, ((double *)__pyx_v_jac_array->data));
25747 
25748  /* "cfemIntegrals.pyx":4568
25749  * val,
25750  * <double*>jac_array.data)
25751  * def zeroJacobian_CSR(int nNonzeros, # <<<<<<<<<<<<<<
25752  * jac):
25753  * cdef np.ndarray rowptr, colind, jac_array
25754  */
25755 
25756  /* function exit code */
25757  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
25758  goto __pyx_L0;
25759  __pyx_L1_error:;
25760  __Pyx_XDECREF(__pyx_t_1);
25761  __Pyx_XDECREF(__pyx_t_2);
25762  __Pyx_XDECREF(__pyx_t_3);
25763  __Pyx_XDECREF(__pyx_t_4);
25764  __Pyx_XDECREF(__pyx_t_5);
25765  __Pyx_AddTraceback("cfemIntegrals.zeroJacobian_CSR", __pyx_clineno, __pyx_lineno, __pyx_filename);
25766  __pyx_r = NULL;
25767  __pyx_L0:;
25768  __Pyx_XDECREF((PyObject *)__pyx_v_rowptr);
25769  __Pyx_XDECREF((PyObject *)__pyx_v_colind);
25770  __Pyx_XDECREF((PyObject *)__pyx_v_jac_array);
25771  __Pyx_XGIVEREF(__pyx_r);
25772  __Pyx_RefNannyFinishContext();
25773  return __pyx_r;
25774 }
25775 
25776 /* "cfemIntegrals.pyx":4574
25777  * czeroJacobian_CSR(nNonzeros,
25778  * <double*>jac_array.data)
25779  * def calculateInteriorElementBoundaryVelocities(int nInteriorElementBoundaries_global, # <<<<<<<<<<<<<<
25780  * int nElementBoundaries_element,
25781  * int nQuadraturePoints_elementBoundary,
25782  */
25783 
25784 /* Python wrapper */
25785 static PyObject *__pyx_pw_13cfemIntegrals_221calculateInteriorElementBoundaryVelocities(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
25786 static PyMethodDef __pyx_mdef_13cfemIntegrals_221calculateInteriorElementBoundaryVelocities = {"calculateInteriorElementBoundaryVelocities", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_221calculateInteriorElementBoundaryVelocities, METH_VARARGS|METH_KEYWORDS, 0};
25787 static PyObject *__pyx_pw_13cfemIntegrals_221calculateInteriorElementBoundaryVelocities(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
25788  int __pyx_v_nInteriorElementBoundaries_global;
25789  int __pyx_v_nElementBoundaries_element;
25790  int __pyx_v_nQuadraturePoints_elementBoundary;
25791  int __pyx_v_nSpace;
25792  PyArrayObject *__pyx_v_interiorElementBoundaries = 0;
25793  PyArrayObject *__pyx_v_elementBoundaryElements = 0;
25794  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries = 0;
25795  PyArrayObject *__pyx_v_m = 0;
25796  PyArrayObject *__pyx_v_a = 0;
25797  PyArrayObject *__pyx_v_grad_phi = 0;
25798  PyArrayObject *__pyx_v_f = 0;
25799  PyArrayObject *__pyx_v_vAverage = 0;
25800  PyArrayObject *__pyx_v_vJump = 0;
25801  PyArrayObject *__pyx_v_mAverage = 0;
25802  PyArrayObject *__pyx_v_mJump = 0;
25803  int __pyx_lineno = 0;
25804  const char *__pyx_filename = NULL;
25805  int __pyx_clineno = 0;
25806  PyObject *__pyx_r = 0;
25807  __Pyx_RefNannyDeclarations
25808  __Pyx_RefNannySetupContext("calculateInteriorElementBoundaryVelocities (wrapper)", 0);
25809  {
25810  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nInteriorElementBoundaries_globa,&__pyx_n_s_nElementBoundaries_element,&__pyx_n_s_nQuadraturePoints_elementBoundar,&__pyx_n_s_nSpace,&__pyx_n_s_interiorElementBoundaries,&__pyx_n_s_elementBoundaryElements,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_m,&__pyx_n_s_a,&__pyx_n_s_grad_phi,&__pyx_n_s_f,&__pyx_n_s_vAverage,&__pyx_n_s_vJump,&__pyx_n_s_mAverage,&__pyx_n_s_mJump,0};
25811  PyObject* values[15] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
25812  if (unlikely(__pyx_kwds)) {
25813  Py_ssize_t kw_args;
25814  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
25815  switch (pos_args) {
25816  case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
25817  CYTHON_FALLTHROUGH;
25818  case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
25819  CYTHON_FALLTHROUGH;
25820  case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
25821  CYTHON_FALLTHROUGH;
25822  case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
25823  CYTHON_FALLTHROUGH;
25824  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
25825  CYTHON_FALLTHROUGH;
25826  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
25827  CYTHON_FALLTHROUGH;
25828  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
25829  CYTHON_FALLTHROUGH;
25830  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
25831  CYTHON_FALLTHROUGH;
25832  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
25833  CYTHON_FALLTHROUGH;
25834  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
25835  CYTHON_FALLTHROUGH;
25836  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
25837  CYTHON_FALLTHROUGH;
25838  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
25839  CYTHON_FALLTHROUGH;
25840  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
25841  CYTHON_FALLTHROUGH;
25842  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
25843  CYTHON_FALLTHROUGH;
25844  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
25845  CYTHON_FALLTHROUGH;
25846  case 0: break;
25847  default: goto __pyx_L5_argtuple_error;
25848  }
25849  kw_args = PyDict_Size(__pyx_kwds);
25850  switch (pos_args) {
25851  case 0:
25852  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nInteriorElementBoundaries_globa)) != 0)) kw_args--;
25853  else goto __pyx_L5_argtuple_error;
25854  CYTHON_FALLTHROUGH;
25855  case 1:
25856  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nElementBoundaries_element)) != 0)) kw_args--;
25857  else {
25858  __Pyx_RaiseArgtupleInvalid("calculateInteriorElementBoundaryVelocities", 1, 15, 15, 1); __PYX_ERR(0, 4574, __pyx_L3_error)
25859  }
25860  CYTHON_FALLTHROUGH;
25861  case 2:
25862  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nQuadraturePoints_elementBoundar)) != 0)) kw_args--;
25863  else {
25864  __Pyx_RaiseArgtupleInvalid("calculateInteriorElementBoundaryVelocities", 1, 15, 15, 2); __PYX_ERR(0, 4574, __pyx_L3_error)
25865  }
25866  CYTHON_FALLTHROUGH;
25867  case 3:
25868  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nSpace)) != 0)) kw_args--;
25869  else {
25870  __Pyx_RaiseArgtupleInvalid("calculateInteriorElementBoundaryVelocities", 1, 15, 15, 3); __PYX_ERR(0, 4574, __pyx_L3_error)
25871  }
25872  CYTHON_FALLTHROUGH;
25873  case 4:
25874  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_interiorElementBoundaries)) != 0)) kw_args--;
25875  else {
25876  __Pyx_RaiseArgtupleInvalid("calculateInteriorElementBoundaryVelocities", 1, 15, 15, 4); __PYX_ERR(0, 4574, __pyx_L3_error)
25877  }
25878  CYTHON_FALLTHROUGH;
25879  case 5:
25880  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElements)) != 0)) kw_args--;
25881  else {
25882  __Pyx_RaiseArgtupleInvalid("calculateInteriorElementBoundaryVelocities", 1, 15, 15, 5); __PYX_ERR(0, 4574, __pyx_L3_error)
25883  }
25884  CYTHON_FALLTHROUGH;
25885  case 6:
25886  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
25887  else {
25888  __Pyx_RaiseArgtupleInvalid("calculateInteriorElementBoundaryVelocities", 1, 15, 15, 6); __PYX_ERR(0, 4574, __pyx_L3_error)
25889  }
25890  CYTHON_FALLTHROUGH;
25891  case 7:
25892  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
25893  else {
25894  __Pyx_RaiseArgtupleInvalid("calculateInteriorElementBoundaryVelocities", 1, 15, 15, 7); __PYX_ERR(0, 4574, __pyx_L3_error)
25895  }
25896  CYTHON_FALLTHROUGH;
25897  case 8:
25898  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
25899  else {
25900  __Pyx_RaiseArgtupleInvalid("calculateInteriorElementBoundaryVelocities", 1, 15, 15, 8); __PYX_ERR(0, 4574, __pyx_L3_error)
25901  }
25902  CYTHON_FALLTHROUGH;
25903  case 9:
25904  if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_phi)) != 0)) kw_args--;
25905  else {
25906  __Pyx_RaiseArgtupleInvalid("calculateInteriorElementBoundaryVelocities", 1, 15, 15, 9); __PYX_ERR(0, 4574, __pyx_L3_error)
25907  }
25908  CYTHON_FALLTHROUGH;
25909  case 10:
25910  if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_f)) != 0)) kw_args--;
25911  else {
25912  __Pyx_RaiseArgtupleInvalid("calculateInteriorElementBoundaryVelocities", 1, 15, 15, 10); __PYX_ERR(0, 4574, __pyx_L3_error)
25913  }
25914  CYTHON_FALLTHROUGH;
25915  case 11:
25916  if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vAverage)) != 0)) kw_args--;
25917  else {
25918  __Pyx_RaiseArgtupleInvalid("calculateInteriorElementBoundaryVelocities", 1, 15, 15, 11); __PYX_ERR(0, 4574, __pyx_L3_error)
25919  }
25920  CYTHON_FALLTHROUGH;
25921  case 12:
25922  if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vJump)) != 0)) kw_args--;
25923  else {
25924  __Pyx_RaiseArgtupleInvalid("calculateInteriorElementBoundaryVelocities", 1, 15, 15, 12); __PYX_ERR(0, 4574, __pyx_L3_error)
25925  }
25926  CYTHON_FALLTHROUGH;
25927  case 13:
25928  if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mAverage)) != 0)) kw_args--;
25929  else {
25930  __Pyx_RaiseArgtupleInvalid("calculateInteriorElementBoundaryVelocities", 1, 15, 15, 13); __PYX_ERR(0, 4574, __pyx_L3_error)
25931  }
25932  CYTHON_FALLTHROUGH;
25933  case 14:
25934  if (likely((values[14] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mJump)) != 0)) kw_args--;
25935  else {
25936  __Pyx_RaiseArgtupleInvalid("calculateInteriorElementBoundaryVelocities", 1, 15, 15, 14); __PYX_ERR(0, 4574, __pyx_L3_error)
25937  }
25938  }
25939  if (unlikely(kw_args > 0)) {
25940  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateInteriorElementBoundaryVelocities") < 0)) __PYX_ERR(0, 4574, __pyx_L3_error)
25941  }
25942  } else if (PyTuple_GET_SIZE(__pyx_args) != 15) {
25943  goto __pyx_L5_argtuple_error;
25944  } else {
25945  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
25946  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
25947  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
25948  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
25949  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
25950  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
25951  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
25952  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
25953  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
25954  values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
25955  values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
25956  values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
25957  values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
25958  values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
25959  values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
25960  }
25961  __pyx_v_nInteriorElementBoundaries_global = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_nInteriorElementBoundaries_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4574, __pyx_L3_error)
25962  __pyx_v_nElementBoundaries_element = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_nElementBoundaries_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4575, __pyx_L3_error)
25963  __pyx_v_nQuadraturePoints_elementBoundary = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_nQuadraturePoints_elementBoundary == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4576, __pyx_L3_error)
25964  __pyx_v_nSpace = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_nSpace == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4577, __pyx_L3_error)
25965  __pyx_v_interiorElementBoundaries = ((PyArrayObject *)values[4]);
25966  __pyx_v_elementBoundaryElements = ((PyArrayObject *)values[5]);
25967  __pyx_v_elementBoundaryLocalElementBoundaries = ((PyArrayObject *)values[6]);
25968  __pyx_v_m = ((PyArrayObject *)values[7]);
25969  __pyx_v_a = ((PyArrayObject *)values[8]);
25970  __pyx_v_grad_phi = ((PyArrayObject *)values[9]);
25971  __pyx_v_f = ((PyArrayObject *)values[10]);
25972  __pyx_v_vAverage = ((PyArrayObject *)values[11]);
25973  __pyx_v_vJump = ((PyArrayObject *)values[12]);
25974  __pyx_v_mAverage = ((PyArrayObject *)values[13]);
25975  __pyx_v_mJump = ((PyArrayObject *)values[14]);
25976  }
25977  goto __pyx_L4_argument_unpacking_done;
25978  __pyx_L5_argtuple_error:;
25979  __Pyx_RaiseArgtupleInvalid("calculateInteriorElementBoundaryVelocities", 1, 15, 15, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4574, __pyx_L3_error)
25980  __pyx_L3_error:;
25981  __Pyx_AddTraceback("cfemIntegrals.calculateInteriorElementBoundaryVelocities", __pyx_clineno, __pyx_lineno, __pyx_filename);
25982  __Pyx_RefNannyFinishContext();
25983  return NULL;
25984  __pyx_L4_argument_unpacking_done:;
25985  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_interiorElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "interiorElementBoundaries", 0))) __PYX_ERR(0, 4578, __pyx_L1_error)
25986  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElements), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElements", 0))) __PYX_ERR(0, 4579, __pyx_L1_error)
25987  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundaries", 0))) __PYX_ERR(0, 4580, __pyx_L1_error)
25988  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_m), __pyx_ptype_5numpy_ndarray, 1, "m", 0))) __PYX_ERR(0, 4581, __pyx_L1_error)
25989  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1, "a", 0))) __PYX_ERR(0, 4582, __pyx_L1_error)
25990  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_phi), __pyx_ptype_5numpy_ndarray, 1, "grad_phi", 0))) __PYX_ERR(0, 4583, __pyx_L1_error)
25991  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_f), __pyx_ptype_5numpy_ndarray, 1, "f", 0))) __PYX_ERR(0, 4584, __pyx_L1_error)
25992  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vAverage), __pyx_ptype_5numpy_ndarray, 1, "vAverage", 0))) __PYX_ERR(0, 4585, __pyx_L1_error)
25993  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vJump), __pyx_ptype_5numpy_ndarray, 1, "vJump", 0))) __PYX_ERR(0, 4586, __pyx_L1_error)
25994  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mAverage), __pyx_ptype_5numpy_ndarray, 1, "mAverage", 0))) __PYX_ERR(0, 4587, __pyx_L1_error)
25995  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mJump), __pyx_ptype_5numpy_ndarray, 1, "mJump", 0))) __PYX_ERR(0, 4588, __pyx_L1_error)
25996  __pyx_r = __pyx_pf_13cfemIntegrals_220calculateInteriorElementBoundaryVelocities(__pyx_self, __pyx_v_nInteriorElementBoundaries_global, __pyx_v_nElementBoundaries_element, __pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nSpace, __pyx_v_interiorElementBoundaries, __pyx_v_elementBoundaryElements, __pyx_v_elementBoundaryLocalElementBoundaries, __pyx_v_m, __pyx_v_a, __pyx_v_grad_phi, __pyx_v_f, __pyx_v_vAverage, __pyx_v_vJump, __pyx_v_mAverage, __pyx_v_mJump);
25997 
25998  /* function exit code */
25999  goto __pyx_L0;
26000  __pyx_L1_error:;
26001  __pyx_r = NULL;
26002  __pyx_L0:;
26003  __Pyx_RefNannyFinishContext();
26004  return __pyx_r;
26005 }
26006 
26007 static PyObject *__pyx_pf_13cfemIntegrals_220calculateInteriorElementBoundaryVelocities(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nInteriorElementBoundaries_global, int __pyx_v_nElementBoundaries_element, int __pyx_v_nQuadraturePoints_elementBoundary, int __pyx_v_nSpace, PyArrayObject *__pyx_v_interiorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_m, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_grad_phi, PyArrayObject *__pyx_v_f, PyArrayObject *__pyx_v_vAverage, PyArrayObject *__pyx_v_vJump, PyArrayObject *__pyx_v_mAverage, PyArrayObject *__pyx_v_mJump) {
26008  PyObject *__pyx_r = NULL;
26009  __Pyx_RefNannyDeclarations
26010  __Pyx_RefNannySetupContext("calculateInteriorElementBoundaryVelocities", 0);
26011 
26012  /* "cfemIntegrals.pyx":4589
26013  * np.ndarray mAverage,
26014  * np.ndarray mJump):
26015  * ccalculateInteriorElementBoundaryVelocities(nInteriorElementBoundaries_global, # <<<<<<<<<<<<<<
26016  * nElementBoundaries_element,
26017  * nQuadraturePoints_elementBoundary,
26018  */
26019  calculateInteriorElementBoundaryVelocities(__pyx_v_nInteriorElementBoundaries_global, __pyx_v_nElementBoundaries_element, __pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nSpace, ((int *)__pyx_v_interiorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), ((double *)__pyx_v_m->data), ((double *)__pyx_v_a->data), ((double *)__pyx_v_grad_phi->data), ((double *)__pyx_v_f->data), ((double *)__pyx_v_vAverage->data), ((double *)__pyx_v_vJump->data), ((double *)__pyx_v_mAverage->data), ((double *)__pyx_v_mJump->data));
26020 
26021  /* "cfemIntegrals.pyx":4574
26022  * czeroJacobian_CSR(nNonzeros,
26023  * <double*>jac_array.data)
26024  * def calculateInteriorElementBoundaryVelocities(int nInteriorElementBoundaries_global, # <<<<<<<<<<<<<<
26025  * int nElementBoundaries_element,
26026  * int nQuadraturePoints_elementBoundary,
26027  */
26028 
26029  /* function exit code */
26030  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
26031  __Pyx_XGIVEREF(__pyx_r);
26032  __Pyx_RefNannyFinishContext();
26033  return __pyx_r;
26034 }
26035 
26036 /* "cfemIntegrals.pyx":4604
26037  * <double*>mAverage.data,
26038  * <double*>mJump.data)
26039  * def calculateExteriorElementBoundaryVelocities(int nExteriorElementBoundaries_global, # <<<<<<<<<<<<<<
26040  * int nElementBoundaries_element,
26041  * int nQuadraturePoints_elementBoundary,
26042  */
26043 
26044 /* Python wrapper */
26045 static PyObject *__pyx_pw_13cfemIntegrals_223calculateExteriorElementBoundaryVelocities(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
26046 static PyMethodDef __pyx_mdef_13cfemIntegrals_223calculateExteriorElementBoundaryVelocities = {"calculateExteriorElementBoundaryVelocities", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_223calculateExteriorElementBoundaryVelocities, METH_VARARGS|METH_KEYWORDS, 0};
26047 static PyObject *__pyx_pw_13cfemIntegrals_223calculateExteriorElementBoundaryVelocities(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
26048  int __pyx_v_nExteriorElementBoundaries_global;
26049  int __pyx_v_nElementBoundaries_element;
26050  int __pyx_v_nQuadraturePoints_elementBoundary;
26051  int __pyx_v_nSpace;
26052  PyArrayObject *__pyx_v_exteriorElementBoundaries = 0;
26053  PyArrayObject *__pyx_v_elementBoundaryElements = 0;
26054  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries = 0;
26055  PyArrayObject *__pyx_v_m = 0;
26056  PyArrayObject *__pyx_v_a = 0;
26057  PyArrayObject *__pyx_v_grad_phi = 0;
26058  PyArrayObject *__pyx_v_f = 0;
26059  PyArrayObject *__pyx_v_vAverage = 0;
26060  PyArrayObject *__pyx_v_vJump = 0;
26061  PyArrayObject *__pyx_v_mAverage = 0;
26062  PyArrayObject *__pyx_v_mJump = 0;
26063  int __pyx_lineno = 0;
26064  const char *__pyx_filename = NULL;
26065  int __pyx_clineno = 0;
26066  PyObject *__pyx_r = 0;
26067  __Pyx_RefNannyDeclarations
26068  __Pyx_RefNannySetupContext("calculateExteriorElementBoundaryVelocities (wrapper)", 0);
26069  {
26070  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nExteriorElementBoundaries_globa,&__pyx_n_s_nElementBoundaries_element,&__pyx_n_s_nQuadraturePoints_elementBoundar,&__pyx_n_s_nSpace,&__pyx_n_s_exteriorElementBoundaries,&__pyx_n_s_elementBoundaryElements,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_m,&__pyx_n_s_a,&__pyx_n_s_grad_phi,&__pyx_n_s_f,&__pyx_n_s_vAverage,&__pyx_n_s_vJump,&__pyx_n_s_mAverage,&__pyx_n_s_mJump,0};
26071  PyObject* values[15] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
26072  if (unlikely(__pyx_kwds)) {
26073  Py_ssize_t kw_args;
26074  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
26075  switch (pos_args) {
26076  case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
26077  CYTHON_FALLTHROUGH;
26078  case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
26079  CYTHON_FALLTHROUGH;
26080  case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
26081  CYTHON_FALLTHROUGH;
26082  case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
26083  CYTHON_FALLTHROUGH;
26084  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
26085  CYTHON_FALLTHROUGH;
26086  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
26087  CYTHON_FALLTHROUGH;
26088  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
26089  CYTHON_FALLTHROUGH;
26090  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
26091  CYTHON_FALLTHROUGH;
26092  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
26093  CYTHON_FALLTHROUGH;
26094  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
26095  CYTHON_FALLTHROUGH;
26096  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
26097  CYTHON_FALLTHROUGH;
26098  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
26099  CYTHON_FALLTHROUGH;
26100  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
26101  CYTHON_FALLTHROUGH;
26102  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
26103  CYTHON_FALLTHROUGH;
26104  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
26105  CYTHON_FALLTHROUGH;
26106  case 0: break;
26107  default: goto __pyx_L5_argtuple_error;
26108  }
26109  kw_args = PyDict_Size(__pyx_kwds);
26110  switch (pos_args) {
26111  case 0:
26112  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nExteriorElementBoundaries_globa)) != 0)) kw_args--;
26113  else goto __pyx_L5_argtuple_error;
26114  CYTHON_FALLTHROUGH;
26115  case 1:
26116  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nElementBoundaries_element)) != 0)) kw_args--;
26117  else {
26118  __Pyx_RaiseArgtupleInvalid("calculateExteriorElementBoundaryVelocities", 1, 15, 15, 1); __PYX_ERR(0, 4604, __pyx_L3_error)
26119  }
26120  CYTHON_FALLTHROUGH;
26121  case 2:
26122  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nQuadraturePoints_elementBoundar)) != 0)) kw_args--;
26123  else {
26124  __Pyx_RaiseArgtupleInvalid("calculateExteriorElementBoundaryVelocities", 1, 15, 15, 2); __PYX_ERR(0, 4604, __pyx_L3_error)
26125  }
26126  CYTHON_FALLTHROUGH;
26127  case 3:
26128  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nSpace)) != 0)) kw_args--;
26129  else {
26130  __Pyx_RaiseArgtupleInvalid("calculateExteriorElementBoundaryVelocities", 1, 15, 15, 3); __PYX_ERR(0, 4604, __pyx_L3_error)
26131  }
26132  CYTHON_FALLTHROUGH;
26133  case 4:
26134  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exteriorElementBoundaries)) != 0)) kw_args--;
26135  else {
26136  __Pyx_RaiseArgtupleInvalid("calculateExteriorElementBoundaryVelocities", 1, 15, 15, 4); __PYX_ERR(0, 4604, __pyx_L3_error)
26137  }
26138  CYTHON_FALLTHROUGH;
26139  case 5:
26140  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElements)) != 0)) kw_args--;
26141  else {
26142  __Pyx_RaiseArgtupleInvalid("calculateExteriorElementBoundaryVelocities", 1, 15, 15, 5); __PYX_ERR(0, 4604, __pyx_L3_error)
26143  }
26144  CYTHON_FALLTHROUGH;
26145  case 6:
26146  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
26147  else {
26148  __Pyx_RaiseArgtupleInvalid("calculateExteriorElementBoundaryVelocities", 1, 15, 15, 6); __PYX_ERR(0, 4604, __pyx_L3_error)
26149  }
26150  CYTHON_FALLTHROUGH;
26151  case 7:
26152  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
26153  else {
26154  __Pyx_RaiseArgtupleInvalid("calculateExteriorElementBoundaryVelocities", 1, 15, 15, 7); __PYX_ERR(0, 4604, __pyx_L3_error)
26155  }
26156  CYTHON_FALLTHROUGH;
26157  case 8:
26158  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
26159  else {
26160  __Pyx_RaiseArgtupleInvalid("calculateExteriorElementBoundaryVelocities", 1, 15, 15, 8); __PYX_ERR(0, 4604, __pyx_L3_error)
26161  }
26162  CYTHON_FALLTHROUGH;
26163  case 9:
26164  if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_phi)) != 0)) kw_args--;
26165  else {
26166  __Pyx_RaiseArgtupleInvalid("calculateExteriorElementBoundaryVelocities", 1, 15, 15, 9); __PYX_ERR(0, 4604, __pyx_L3_error)
26167  }
26168  CYTHON_FALLTHROUGH;
26169  case 10:
26170  if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_f)) != 0)) kw_args--;
26171  else {
26172  __Pyx_RaiseArgtupleInvalid("calculateExteriorElementBoundaryVelocities", 1, 15, 15, 10); __PYX_ERR(0, 4604, __pyx_L3_error)
26173  }
26174  CYTHON_FALLTHROUGH;
26175  case 11:
26176  if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vAverage)) != 0)) kw_args--;
26177  else {
26178  __Pyx_RaiseArgtupleInvalid("calculateExteriorElementBoundaryVelocities", 1, 15, 15, 11); __PYX_ERR(0, 4604, __pyx_L3_error)
26179  }
26180  CYTHON_FALLTHROUGH;
26181  case 12:
26182  if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vJump)) != 0)) kw_args--;
26183  else {
26184  __Pyx_RaiseArgtupleInvalid("calculateExteriorElementBoundaryVelocities", 1, 15, 15, 12); __PYX_ERR(0, 4604, __pyx_L3_error)
26185  }
26186  CYTHON_FALLTHROUGH;
26187  case 13:
26188  if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mAverage)) != 0)) kw_args--;
26189  else {
26190  __Pyx_RaiseArgtupleInvalid("calculateExteriorElementBoundaryVelocities", 1, 15, 15, 13); __PYX_ERR(0, 4604, __pyx_L3_error)
26191  }
26192  CYTHON_FALLTHROUGH;
26193  case 14:
26194  if (likely((values[14] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mJump)) != 0)) kw_args--;
26195  else {
26196  __Pyx_RaiseArgtupleInvalid("calculateExteriorElementBoundaryVelocities", 1, 15, 15, 14); __PYX_ERR(0, 4604, __pyx_L3_error)
26197  }
26198  }
26199  if (unlikely(kw_args > 0)) {
26200  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateExteriorElementBoundaryVelocities") < 0)) __PYX_ERR(0, 4604, __pyx_L3_error)
26201  }
26202  } else if (PyTuple_GET_SIZE(__pyx_args) != 15) {
26203  goto __pyx_L5_argtuple_error;
26204  } else {
26205  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
26206  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
26207  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
26208  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
26209  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
26210  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
26211  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
26212  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
26213  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
26214  values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
26215  values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
26216  values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
26217  values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
26218  values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
26219  values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
26220  }
26221  __pyx_v_nExteriorElementBoundaries_global = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_nExteriorElementBoundaries_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4604, __pyx_L3_error)
26222  __pyx_v_nElementBoundaries_element = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_nElementBoundaries_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4605, __pyx_L3_error)
26223  __pyx_v_nQuadraturePoints_elementBoundary = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_nQuadraturePoints_elementBoundary == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4606, __pyx_L3_error)
26224  __pyx_v_nSpace = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_nSpace == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4607, __pyx_L3_error)
26225  __pyx_v_exteriorElementBoundaries = ((PyArrayObject *)values[4]);
26226  __pyx_v_elementBoundaryElements = ((PyArrayObject *)values[5]);
26227  __pyx_v_elementBoundaryLocalElementBoundaries = ((PyArrayObject *)values[6]);
26228  __pyx_v_m = ((PyArrayObject *)values[7]);
26229  __pyx_v_a = ((PyArrayObject *)values[8]);
26230  __pyx_v_grad_phi = ((PyArrayObject *)values[9]);
26231  __pyx_v_f = ((PyArrayObject *)values[10]);
26232  __pyx_v_vAverage = ((PyArrayObject *)values[11]);
26233  __pyx_v_vJump = ((PyArrayObject *)values[12]);
26234  __pyx_v_mAverage = ((PyArrayObject *)values[13]);
26235  __pyx_v_mJump = ((PyArrayObject *)values[14]);
26236  }
26237  goto __pyx_L4_argument_unpacking_done;
26238  __pyx_L5_argtuple_error:;
26239  __Pyx_RaiseArgtupleInvalid("calculateExteriorElementBoundaryVelocities", 1, 15, 15, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4604, __pyx_L3_error)
26240  __pyx_L3_error:;
26241  __Pyx_AddTraceback("cfemIntegrals.calculateExteriorElementBoundaryVelocities", __pyx_clineno, __pyx_lineno, __pyx_filename);
26242  __Pyx_RefNannyFinishContext();
26243  return NULL;
26244  __pyx_L4_argument_unpacking_done:;
26245  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exteriorElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "exteriorElementBoundaries", 0))) __PYX_ERR(0, 4608, __pyx_L1_error)
26246  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElements), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElements", 0))) __PYX_ERR(0, 4609, __pyx_L1_error)
26247  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundaries", 0))) __PYX_ERR(0, 4610, __pyx_L1_error)
26248  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_m), __pyx_ptype_5numpy_ndarray, 1, "m", 0))) __PYX_ERR(0, 4611, __pyx_L1_error)
26249  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1, "a", 0))) __PYX_ERR(0, 4612, __pyx_L1_error)
26250  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_phi), __pyx_ptype_5numpy_ndarray, 1, "grad_phi", 0))) __PYX_ERR(0, 4613, __pyx_L1_error)
26251  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_f), __pyx_ptype_5numpy_ndarray, 1, "f", 0))) __PYX_ERR(0, 4614, __pyx_L1_error)
26252  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vAverage), __pyx_ptype_5numpy_ndarray, 1, "vAverage", 0))) __PYX_ERR(0, 4615, __pyx_L1_error)
26253  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vJump), __pyx_ptype_5numpy_ndarray, 1, "vJump", 0))) __PYX_ERR(0, 4616, __pyx_L1_error)
26254  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mAverage), __pyx_ptype_5numpy_ndarray, 1, "mAverage", 0))) __PYX_ERR(0, 4617, __pyx_L1_error)
26255  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mJump), __pyx_ptype_5numpy_ndarray, 1, "mJump", 0))) __PYX_ERR(0, 4618, __pyx_L1_error)
26256  __pyx_r = __pyx_pf_13cfemIntegrals_222calculateExteriorElementBoundaryVelocities(__pyx_self, __pyx_v_nExteriorElementBoundaries_global, __pyx_v_nElementBoundaries_element, __pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nSpace, __pyx_v_exteriorElementBoundaries, __pyx_v_elementBoundaryElements, __pyx_v_elementBoundaryLocalElementBoundaries, __pyx_v_m, __pyx_v_a, __pyx_v_grad_phi, __pyx_v_f, __pyx_v_vAverage, __pyx_v_vJump, __pyx_v_mAverage, __pyx_v_mJump);
26257 
26258  /* function exit code */
26259  goto __pyx_L0;
26260  __pyx_L1_error:;
26261  __pyx_r = NULL;
26262  __pyx_L0:;
26263  __Pyx_RefNannyFinishContext();
26264  return __pyx_r;
26265 }
26266 
26267 static PyObject *__pyx_pf_13cfemIntegrals_222calculateExteriorElementBoundaryVelocities(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nExteriorElementBoundaries_global, int __pyx_v_nElementBoundaries_element, int __pyx_v_nQuadraturePoints_elementBoundary, int __pyx_v_nSpace, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_m, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_grad_phi, PyArrayObject *__pyx_v_f, PyArrayObject *__pyx_v_vAverage, PyArrayObject *__pyx_v_vJump, PyArrayObject *__pyx_v_mAverage, PyArrayObject *__pyx_v_mJump) {
26268  PyObject *__pyx_r = NULL;
26269  __Pyx_RefNannyDeclarations
26270  __Pyx_RefNannySetupContext("calculateExteriorElementBoundaryVelocities", 0);
26271 
26272  /* "cfemIntegrals.pyx":4619
26273  * np.ndarray mAverage,
26274  * np.ndarray mJump):
26275  * ccalculateExteriorElementBoundaryVelocities(nExteriorElementBoundaries_global, # <<<<<<<<<<<<<<
26276  * nElementBoundaries_element,
26277  * nQuadraturePoints_elementBoundary,
26278  */
26279  calculateExteriorElementBoundaryVelocities(__pyx_v_nExteriorElementBoundaries_global, __pyx_v_nElementBoundaries_element, __pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nSpace, ((int *)__pyx_v_exteriorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), ((double *)__pyx_v_m->data), ((double *)__pyx_v_a->data), ((double *)__pyx_v_grad_phi->data), ((double *)__pyx_v_f->data), ((double *)__pyx_v_vAverage->data), ((double *)__pyx_v_vJump->data), ((double *)__pyx_v_mAverage->data), ((double *)__pyx_v_mJump->data));
26280 
26281  /* "cfemIntegrals.pyx":4604
26282  * <double*>mAverage.data,
26283  * <double*>mJump.data)
26284  * def calculateExteriorElementBoundaryVelocities(int nExteriorElementBoundaries_global, # <<<<<<<<<<<<<<
26285  * int nElementBoundaries_element,
26286  * int nQuadraturePoints_elementBoundary,
26287  */
26288 
26289  /* function exit code */
26290  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
26291  __Pyx_XGIVEREF(__pyx_r);
26292  __Pyx_RefNannyFinishContext();
26293  return __pyx_r;
26294 }
26295 
26296 /* "cfemIntegrals.pyx":4634
26297  * <double*>mAverage.data,
26298  * <double*>mJump.data)
26299  * def calculateConservationResidualPWL(int nElements_global, # <<<<<<<<<<<<<<
26300  * int nInteriorElementBoundaries_global,
26301  * int nExteriorElementBoundaries_global,
26302  */
26303 
26304 /* Python wrapper */
26305 static PyObject *__pyx_pw_13cfemIntegrals_225calculateConservationResidualPWL(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
26306 static PyMethodDef __pyx_mdef_13cfemIntegrals_225calculateConservationResidualPWL = {"calculateConservationResidualPWL", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_225calculateConservationResidualPWL, METH_VARARGS|METH_KEYWORDS, 0};
26307 static PyObject *__pyx_pw_13cfemIntegrals_225calculateConservationResidualPWL(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
26308  int __pyx_v_nElements_global;
26309  int __pyx_v_nInteriorElementBoundaries_global;
26310  int __pyx_v_nExteriorElementBoundaries_global;
26311  int __pyx_v_nElementBoundaries_element;
26312  int __pyx_v_nQuadraturePoints_elementBoundary;
26313  int __pyx_v_nNodes_element;
26314  int __pyx_v_nSpace;
26315  PyArrayObject *__pyx_v_interiorElementBoundaries = 0;
26316  PyArrayObject *__pyx_v_exteriorElementBoundaries = 0;
26317  PyArrayObject *__pyx_v_elementBoundaryElements = 0;
26318  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries = 0;
26319  PyArrayObject *__pyx_v_elementNodes = 0;
26320  PyArrayObject *__pyx_v_nodeStarElements = 0;
26321  PyArrayObject *__pyx_v_nodeStarElementNeighbors = 0;
26322  PyArrayObject *__pyx_v_nodeStarOffsets = 0;
26323  PyArrayObject *__pyx_v_nElements_node = 0;
26324  PyArrayObject *__pyx_v_elementResidual = 0;
26325  PyArrayObject *__pyx_v_vAverage = 0;
26326  PyArrayObject *__pyx_v_starU = 0;
26327  PyArrayObject *__pyx_v_dX = 0;
26328  PyArrayObject *__pyx_v_w = 0;
26329  PyArrayObject *__pyx_v_normal = 0;
26330  PyArrayObject *__pyx_v_conservationResidual = 0;
26331  PyArrayObject *__pyx_v_starR = 0;
26332  PyArrayObject *__pyx_v_vConservative = 0;
26333  PyArrayObject *__pyx_v_vConservative_element = 0;
26334  int __pyx_lineno = 0;
26335  const char *__pyx_filename = NULL;
26336  int __pyx_clineno = 0;
26337  PyObject *__pyx_r = 0;
26338  __Pyx_RefNannyDeclarations
26339  __Pyx_RefNannySetupContext("calculateConservationResidualPWL (wrapper)", 0);
26340  {
26341  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nElements_global,&__pyx_n_s_nInteriorElementBoundaries_globa,&__pyx_n_s_nExteriorElementBoundaries_globa,&__pyx_n_s_nElementBoundaries_element,&__pyx_n_s_nQuadraturePoints_elementBoundar,&__pyx_n_s_nNodes_element,&__pyx_n_s_nSpace,&__pyx_n_s_interiorElementBoundaries,&__pyx_n_s_exteriorElementBoundaries,&__pyx_n_s_elementBoundaryElements,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_elementNodes,&__pyx_n_s_nodeStarElements,&__pyx_n_s_nodeStarElementNeighbors,&__pyx_n_s_nodeStarOffsets,&__pyx_n_s_nElements_node,&__pyx_n_s_elementResidual,&__pyx_n_s_vAverage,&__pyx_n_s_starU,&__pyx_n_s_dX,&__pyx_n_s_w,&__pyx_n_s_normal,&__pyx_n_s_conservationResidual,&__pyx_n_s_starR,&__pyx_n_s_vConservative,&__pyx_n_s_vConservative_element,0};
26342  PyObject* values[26] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
26343  if (unlikely(__pyx_kwds)) {
26344  Py_ssize_t kw_args;
26345  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
26346  switch (pos_args) {
26347  case 26: values[25] = PyTuple_GET_ITEM(__pyx_args, 25);
26348  CYTHON_FALLTHROUGH;
26349  case 25: values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
26350  CYTHON_FALLTHROUGH;
26351  case 24: values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
26352  CYTHON_FALLTHROUGH;
26353  case 23: values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
26354  CYTHON_FALLTHROUGH;
26355  case 22: values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
26356  CYTHON_FALLTHROUGH;
26357  case 21: values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
26358  CYTHON_FALLTHROUGH;
26359  case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
26360  CYTHON_FALLTHROUGH;
26361  case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
26362  CYTHON_FALLTHROUGH;
26363  case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
26364  CYTHON_FALLTHROUGH;
26365  case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
26366  CYTHON_FALLTHROUGH;
26367  case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
26368  CYTHON_FALLTHROUGH;
26369  case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
26370  CYTHON_FALLTHROUGH;
26371  case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
26372  CYTHON_FALLTHROUGH;
26373  case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
26374  CYTHON_FALLTHROUGH;
26375  case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
26376  CYTHON_FALLTHROUGH;
26377  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
26378  CYTHON_FALLTHROUGH;
26379  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
26380  CYTHON_FALLTHROUGH;
26381  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
26382  CYTHON_FALLTHROUGH;
26383  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
26384  CYTHON_FALLTHROUGH;
26385  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
26386  CYTHON_FALLTHROUGH;
26387  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
26388  CYTHON_FALLTHROUGH;
26389  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
26390  CYTHON_FALLTHROUGH;
26391  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
26392  CYTHON_FALLTHROUGH;
26393  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
26394  CYTHON_FALLTHROUGH;
26395  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
26396  CYTHON_FALLTHROUGH;
26397  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
26398  CYTHON_FALLTHROUGH;
26399  case 0: break;
26400  default: goto __pyx_L5_argtuple_error;
26401  }
26402  kw_args = PyDict_Size(__pyx_kwds);
26403  switch (pos_args) {
26404  case 0:
26405  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nElements_global)) != 0)) kw_args--;
26406  else goto __pyx_L5_argtuple_error;
26407  CYTHON_FALLTHROUGH;
26408  case 1:
26409  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nInteriorElementBoundaries_globa)) != 0)) kw_args--;
26410  else {
26411  __Pyx_RaiseArgtupleInvalid("calculateConservationResidualPWL", 1, 26, 26, 1); __PYX_ERR(0, 4634, __pyx_L3_error)
26412  }
26413  CYTHON_FALLTHROUGH;
26414  case 2:
26415  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nExteriorElementBoundaries_globa)) != 0)) kw_args--;
26416  else {
26417  __Pyx_RaiseArgtupleInvalid("calculateConservationResidualPWL", 1, 26, 26, 2); __PYX_ERR(0, 4634, __pyx_L3_error)
26418  }
26419  CYTHON_FALLTHROUGH;
26420  case 3:
26421  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nElementBoundaries_element)) != 0)) kw_args--;
26422  else {
26423  __Pyx_RaiseArgtupleInvalid("calculateConservationResidualPWL", 1, 26, 26, 3); __PYX_ERR(0, 4634, __pyx_L3_error)
26424  }
26425  CYTHON_FALLTHROUGH;
26426  case 4:
26427  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nQuadraturePoints_elementBoundar)) != 0)) kw_args--;
26428  else {
26429  __Pyx_RaiseArgtupleInvalid("calculateConservationResidualPWL", 1, 26, 26, 4); __PYX_ERR(0, 4634, __pyx_L3_error)
26430  }
26431  CYTHON_FALLTHROUGH;
26432  case 5:
26433  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nNodes_element)) != 0)) kw_args--;
26434  else {
26435  __Pyx_RaiseArgtupleInvalid("calculateConservationResidualPWL", 1, 26, 26, 5); __PYX_ERR(0, 4634, __pyx_L3_error)
26436  }
26437  CYTHON_FALLTHROUGH;
26438  case 6:
26439  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nSpace)) != 0)) kw_args--;
26440  else {
26441  __Pyx_RaiseArgtupleInvalid("calculateConservationResidualPWL", 1, 26, 26, 6); __PYX_ERR(0, 4634, __pyx_L3_error)
26442  }
26443  CYTHON_FALLTHROUGH;
26444  case 7:
26445  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_interiorElementBoundaries)) != 0)) kw_args--;
26446  else {
26447  __Pyx_RaiseArgtupleInvalid("calculateConservationResidualPWL", 1, 26, 26, 7); __PYX_ERR(0, 4634, __pyx_L3_error)
26448  }
26449  CYTHON_FALLTHROUGH;
26450  case 8:
26451  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exteriorElementBoundaries)) != 0)) kw_args--;
26452  else {
26453  __Pyx_RaiseArgtupleInvalid("calculateConservationResidualPWL", 1, 26, 26, 8); __PYX_ERR(0, 4634, __pyx_L3_error)
26454  }
26455  CYTHON_FALLTHROUGH;
26456  case 9:
26457  if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElements)) != 0)) kw_args--;
26458  else {
26459  __Pyx_RaiseArgtupleInvalid("calculateConservationResidualPWL", 1, 26, 26, 9); __PYX_ERR(0, 4634, __pyx_L3_error)
26460  }
26461  CYTHON_FALLTHROUGH;
26462  case 10:
26463  if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
26464  else {
26465  __Pyx_RaiseArgtupleInvalid("calculateConservationResidualPWL", 1, 26, 26, 10); __PYX_ERR(0, 4634, __pyx_L3_error)
26466  }
26467  CYTHON_FALLTHROUGH;
26468  case 11:
26469  if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementNodes)) != 0)) kw_args--;
26470  else {
26471  __Pyx_RaiseArgtupleInvalid("calculateConservationResidualPWL", 1, 26, 26, 11); __PYX_ERR(0, 4634, __pyx_L3_error)
26472  }
26473  CYTHON_FALLTHROUGH;
26474  case 12:
26475  if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodeStarElements)) != 0)) kw_args--;
26476  else {
26477  __Pyx_RaiseArgtupleInvalid("calculateConservationResidualPWL", 1, 26, 26, 12); __PYX_ERR(0, 4634, __pyx_L3_error)
26478  }
26479  CYTHON_FALLTHROUGH;
26480  case 13:
26481  if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodeStarElementNeighbors)) != 0)) kw_args--;
26482  else {
26483  __Pyx_RaiseArgtupleInvalid("calculateConservationResidualPWL", 1, 26, 26, 13); __PYX_ERR(0, 4634, __pyx_L3_error)
26484  }
26485  CYTHON_FALLTHROUGH;
26486  case 14:
26487  if (likely((values[14] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodeStarOffsets)) != 0)) kw_args--;
26488  else {
26489  __Pyx_RaiseArgtupleInvalid("calculateConservationResidualPWL", 1, 26, 26, 14); __PYX_ERR(0, 4634, __pyx_L3_error)
26490  }
26491  CYTHON_FALLTHROUGH;
26492  case 15:
26493  if (likely((values[15] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nElements_node)) != 0)) kw_args--;
26494  else {
26495  __Pyx_RaiseArgtupleInvalid("calculateConservationResidualPWL", 1, 26, 26, 15); __PYX_ERR(0, 4634, __pyx_L3_error)
26496  }
26497  CYTHON_FALLTHROUGH;
26498  case 16:
26499  if (likely((values[16] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementResidual)) != 0)) kw_args--;
26500  else {
26501  __Pyx_RaiseArgtupleInvalid("calculateConservationResidualPWL", 1, 26, 26, 16); __PYX_ERR(0, 4634, __pyx_L3_error)
26502  }
26503  CYTHON_FALLTHROUGH;
26504  case 17:
26505  if (likely((values[17] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vAverage)) != 0)) kw_args--;
26506  else {
26507  __Pyx_RaiseArgtupleInvalid("calculateConservationResidualPWL", 1, 26, 26, 17); __PYX_ERR(0, 4634, __pyx_L3_error)
26508  }
26509  CYTHON_FALLTHROUGH;
26510  case 18:
26511  if (likely((values[18] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_starU)) != 0)) kw_args--;
26512  else {
26513  __Pyx_RaiseArgtupleInvalid("calculateConservationResidualPWL", 1, 26, 26, 18); __PYX_ERR(0, 4634, __pyx_L3_error)
26514  }
26515  CYTHON_FALLTHROUGH;
26516  case 19:
26517  if (likely((values[19] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dX)) != 0)) kw_args--;
26518  else {
26519  __Pyx_RaiseArgtupleInvalid("calculateConservationResidualPWL", 1, 26, 26, 19); __PYX_ERR(0, 4634, __pyx_L3_error)
26520  }
26521  CYTHON_FALLTHROUGH;
26522  case 20:
26523  if (likely((values[20] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_w)) != 0)) kw_args--;
26524  else {
26525  __Pyx_RaiseArgtupleInvalid("calculateConservationResidualPWL", 1, 26, 26, 20); __PYX_ERR(0, 4634, __pyx_L3_error)
26526  }
26527  CYTHON_FALLTHROUGH;
26528  case 21:
26529  if (likely((values[21] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_normal)) != 0)) kw_args--;
26530  else {
26531  __Pyx_RaiseArgtupleInvalid("calculateConservationResidualPWL", 1, 26, 26, 21); __PYX_ERR(0, 4634, __pyx_L3_error)
26532  }
26533  CYTHON_FALLTHROUGH;
26534  case 22:
26535  if (likely((values[22] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_conservationResidual)) != 0)) kw_args--;
26536  else {
26537  __Pyx_RaiseArgtupleInvalid("calculateConservationResidualPWL", 1, 26, 26, 22); __PYX_ERR(0, 4634, __pyx_L3_error)
26538  }
26539  CYTHON_FALLTHROUGH;
26540  case 23:
26541  if (likely((values[23] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_starR)) != 0)) kw_args--;
26542  else {
26543  __Pyx_RaiseArgtupleInvalid("calculateConservationResidualPWL", 1, 26, 26, 23); __PYX_ERR(0, 4634, __pyx_L3_error)
26544  }
26545  CYTHON_FALLTHROUGH;
26546  case 24:
26547  if (likely((values[24] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vConservative)) != 0)) kw_args--;
26548  else {
26549  __Pyx_RaiseArgtupleInvalid("calculateConservationResidualPWL", 1, 26, 26, 24); __PYX_ERR(0, 4634, __pyx_L3_error)
26550  }
26551  CYTHON_FALLTHROUGH;
26552  case 25:
26553  if (likely((values[25] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vConservative_element)) != 0)) kw_args--;
26554  else {
26555  __Pyx_RaiseArgtupleInvalid("calculateConservationResidualPWL", 1, 26, 26, 25); __PYX_ERR(0, 4634, __pyx_L3_error)
26556  }
26557  }
26558  if (unlikely(kw_args > 0)) {
26559  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateConservationResidualPWL") < 0)) __PYX_ERR(0, 4634, __pyx_L3_error)
26560  }
26561  } else if (PyTuple_GET_SIZE(__pyx_args) != 26) {
26562  goto __pyx_L5_argtuple_error;
26563  } else {
26564  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
26565  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
26566  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
26567  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
26568  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
26569  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
26570  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
26571  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
26572  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
26573  values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
26574  values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
26575  values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
26576  values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
26577  values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
26578  values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
26579  values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
26580  values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
26581  values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
26582  values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
26583  values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
26584  values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
26585  values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
26586  values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
26587  values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
26588  values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
26589  values[25] = PyTuple_GET_ITEM(__pyx_args, 25);
26590  }
26591  __pyx_v_nElements_global = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_nElements_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4634, __pyx_L3_error)
26592  __pyx_v_nInteriorElementBoundaries_global = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_nInteriorElementBoundaries_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4635, __pyx_L3_error)
26593  __pyx_v_nExteriorElementBoundaries_global = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_nExteriorElementBoundaries_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4636, __pyx_L3_error)
26594  __pyx_v_nElementBoundaries_element = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_nElementBoundaries_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4637, __pyx_L3_error)
26595  __pyx_v_nQuadraturePoints_elementBoundary = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_nQuadraturePoints_elementBoundary == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4638, __pyx_L3_error)
26596  __pyx_v_nNodes_element = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_nNodes_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4639, __pyx_L3_error)
26597  __pyx_v_nSpace = __Pyx_PyInt_As_int(values[6]); if (unlikely((__pyx_v_nSpace == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4640, __pyx_L3_error)
26598  __pyx_v_interiorElementBoundaries = ((PyArrayObject *)values[7]);
26599  __pyx_v_exteriorElementBoundaries = ((PyArrayObject *)values[8]);
26600  __pyx_v_elementBoundaryElements = ((PyArrayObject *)values[9]);
26601  __pyx_v_elementBoundaryLocalElementBoundaries = ((PyArrayObject *)values[10]);
26602  __pyx_v_elementNodes = ((PyArrayObject *)values[11]);
26603  __pyx_v_nodeStarElements = ((PyArrayObject *)values[12]);
26604  __pyx_v_nodeStarElementNeighbors = ((PyArrayObject *)values[13]);
26605  __pyx_v_nodeStarOffsets = ((PyArrayObject *)values[14]);
26606  __pyx_v_nElements_node = ((PyArrayObject *)values[15]);
26607  __pyx_v_elementResidual = ((PyArrayObject *)values[16]);
26608  __pyx_v_vAverage = ((PyArrayObject *)values[17]);
26609  __pyx_v_starU = ((PyArrayObject *)values[18]);
26610  __pyx_v_dX = ((PyArrayObject *)values[19]);
26611  __pyx_v_w = ((PyArrayObject *)values[20]);
26612  __pyx_v_normal = ((PyArrayObject *)values[21]);
26613  __pyx_v_conservationResidual = ((PyArrayObject *)values[22]);
26614  __pyx_v_starR = ((PyArrayObject *)values[23]);
26615  __pyx_v_vConservative = ((PyArrayObject *)values[24]);
26616  __pyx_v_vConservative_element = ((PyArrayObject *)values[25]);
26617  }
26618  goto __pyx_L4_argument_unpacking_done;
26619  __pyx_L5_argtuple_error:;
26620  __Pyx_RaiseArgtupleInvalid("calculateConservationResidualPWL", 1, 26, 26, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4634, __pyx_L3_error)
26621  __pyx_L3_error:;
26622  __Pyx_AddTraceback("cfemIntegrals.calculateConservationResidualPWL", __pyx_clineno, __pyx_lineno, __pyx_filename);
26623  __Pyx_RefNannyFinishContext();
26624  return NULL;
26625  __pyx_L4_argument_unpacking_done:;
26626  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_interiorElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "interiorElementBoundaries", 0))) __PYX_ERR(0, 4641, __pyx_L1_error)
26627  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exteriorElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "exteriorElementBoundaries", 0))) __PYX_ERR(0, 4642, __pyx_L1_error)
26628  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElements), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElements", 0))) __PYX_ERR(0, 4643, __pyx_L1_error)
26629  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundaries", 0))) __PYX_ERR(0, 4644, __pyx_L1_error)
26630  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNodes), __pyx_ptype_5numpy_ndarray, 1, "elementNodes", 0))) __PYX_ERR(0, 4645, __pyx_L1_error)
26631  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodeStarElements), __pyx_ptype_5numpy_ndarray, 1, "nodeStarElements", 0))) __PYX_ERR(0, 4646, __pyx_L1_error)
26632  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodeStarElementNeighbors), __pyx_ptype_5numpy_ndarray, 1, "nodeStarElementNeighbors", 0))) __PYX_ERR(0, 4647, __pyx_L1_error)
26633  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodeStarOffsets), __pyx_ptype_5numpy_ndarray, 1, "nodeStarOffsets", 0))) __PYX_ERR(0, 4648, __pyx_L1_error)
26634  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nElements_node), __pyx_ptype_5numpy_ndarray, 1, "nElements_node", 0))) __PYX_ERR(0, 4649, __pyx_L1_error)
26635  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementResidual), __pyx_ptype_5numpy_ndarray, 1, "elementResidual", 0))) __PYX_ERR(0, 4650, __pyx_L1_error)
26636  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vAverage), __pyx_ptype_5numpy_ndarray, 1, "vAverage", 0))) __PYX_ERR(0, 4651, __pyx_L1_error)
26637  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_starU), __pyx_ptype_5numpy_ndarray, 1, "starU", 0))) __PYX_ERR(0, 4652, __pyx_L1_error)
26638  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dX), __pyx_ptype_5numpy_ndarray, 1, "dX", 0))) __PYX_ERR(0, 4653, __pyx_L1_error)
26639  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w), __pyx_ptype_5numpy_ndarray, 1, "w", 0))) __PYX_ERR(0, 4654, __pyx_L1_error)
26640  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_normal), __pyx_ptype_5numpy_ndarray, 1, "normal", 0))) __PYX_ERR(0, 4655, __pyx_L1_error)
26641  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_conservationResidual), __pyx_ptype_5numpy_ndarray, 1, "conservationResidual", 0))) __PYX_ERR(0, 4656, __pyx_L1_error)
26642  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_starR), __pyx_ptype_5numpy_ndarray, 1, "starR", 0))) __PYX_ERR(0, 4657, __pyx_L1_error)
26643  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vConservative), __pyx_ptype_5numpy_ndarray, 1, "vConservative", 0))) __PYX_ERR(0, 4658, __pyx_L1_error)
26644  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vConservative_element), __pyx_ptype_5numpy_ndarray, 1, "vConservative_element", 0))) __PYX_ERR(0, 4659, __pyx_L1_error)
26645  __pyx_r = __pyx_pf_13cfemIntegrals_224calculateConservationResidualPWL(__pyx_self, __pyx_v_nElements_global, __pyx_v_nInteriorElementBoundaries_global, __pyx_v_nExteriorElementBoundaries_global, __pyx_v_nElementBoundaries_element, __pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nNodes_element, __pyx_v_nSpace, __pyx_v_interiorElementBoundaries, __pyx_v_exteriorElementBoundaries, __pyx_v_elementBoundaryElements, __pyx_v_elementBoundaryLocalElementBoundaries, __pyx_v_elementNodes, __pyx_v_nodeStarElements, __pyx_v_nodeStarElementNeighbors, __pyx_v_nodeStarOffsets, __pyx_v_nElements_node, __pyx_v_elementResidual, __pyx_v_vAverage, __pyx_v_starU, __pyx_v_dX, __pyx_v_w, __pyx_v_normal, __pyx_v_conservationResidual, __pyx_v_starR, __pyx_v_vConservative, __pyx_v_vConservative_element);
26646 
26647  /* function exit code */
26648  goto __pyx_L0;
26649  __pyx_L1_error:;
26650  __pyx_r = NULL;
26651  __pyx_L0:;
26652  __Pyx_RefNannyFinishContext();
26653  return __pyx_r;
26654 }
26655 
26656 static PyObject *__pyx_pf_13cfemIntegrals_224calculateConservationResidualPWL(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nElements_global, int __pyx_v_nInteriorElementBoundaries_global, int __pyx_v_nExteriorElementBoundaries_global, int __pyx_v_nElementBoundaries_element, int __pyx_v_nQuadraturePoints_elementBoundary, int __pyx_v_nNodes_element, int __pyx_v_nSpace, PyArrayObject *__pyx_v_interiorElementBoundaries, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_elementNodes, PyArrayObject *__pyx_v_nodeStarElements, PyArrayObject *__pyx_v_nodeStarElementNeighbors, PyArrayObject *__pyx_v_nodeStarOffsets, PyArrayObject *__pyx_v_nElements_node, PyArrayObject *__pyx_v_elementResidual, PyArrayObject *__pyx_v_vAverage, PyArrayObject *__pyx_v_starU, PyArrayObject *__pyx_v_dX, PyArrayObject *__pyx_v_w, PyArrayObject *__pyx_v_normal, PyArrayObject *__pyx_v_conservationResidual, PyArrayObject *__pyx_v_starR, PyArrayObject *__pyx_v_vConservative, PyArrayObject *__pyx_v_vConservative_element) {
26657  PyObject *__pyx_r = NULL;
26658  __Pyx_RefNannyDeclarations
26659  __Pyx_RefNannySetupContext("calculateConservationResidualPWL", 0);
26660 
26661  /* "cfemIntegrals.pyx":4660
26662  * np.ndarray vConservative,
26663  * np.ndarray vConservative_element):
26664  * ccalculateConservationResidualPWL(nElements_global, # <<<<<<<<<<<<<<
26665  * nInteriorElementBoundaries_global,
26666  * nExteriorElementBoundaries_global,
26667  */
26668  calculateConservationResidualPWL(__pyx_v_nElements_global, __pyx_v_nInteriorElementBoundaries_global, __pyx_v_nExteriorElementBoundaries_global, __pyx_v_nElementBoundaries_element, __pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nNodes_element, __pyx_v_nSpace, ((int *)__pyx_v_interiorElementBoundaries->data), ((int *)__pyx_v_exteriorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), ((int *)__pyx_v_elementNodes->data), ((int *)__pyx_v_nodeStarElements->data), ((int *)__pyx_v_nodeStarElementNeighbors->data), ((int *)__pyx_v_nodeStarOffsets->data), ((int *)__pyx_v_nElements_node->data), ((double *)__pyx_v_elementResidual->data), ((double *)__pyx_v_vAverage->data), ((double *)__pyx_v_starU->data), ((double *)__pyx_v_dX->data), ((double *)__pyx_v_w->data), ((double *)__pyx_v_normal->data), ((double *)__pyx_v_conservationResidual->data), ((double *)__pyx_v_starR->data), ((double *)__pyx_v_vConservative->data), ((double *)__pyx_v_vConservative_element->data));
26669 
26670  /* "cfemIntegrals.pyx":4634
26671  * <double*>mAverage.data,
26672  * <double*>mJump.data)
26673  * def calculateConservationResidualPWL(int nElements_global, # <<<<<<<<<<<<<<
26674  * int nInteriorElementBoundaries_global,
26675  * int nExteriorElementBoundaries_global,
26676  */
26677 
26678  /* function exit code */
26679  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
26680  __Pyx_XGIVEREF(__pyx_r);
26681  __Pyx_RefNannyFinishContext();
26682  return __pyx_r;
26683 }
26684 
26685 /* "cfemIntegrals.pyx":4686
26686  * <double*>vConservative.data,
26687  * <double*>vConservative_element.data)
26688  * def calculateConservationJacobianPWL(int nNodes_global, # <<<<<<<<<<<<<<
26689  * int nNodes_internal,
26690  * int nElements_global,
26691  */
26692 
26693 /* Python wrapper */
26694 static PyObject *__pyx_pw_13cfemIntegrals_227calculateConservationJacobianPWL(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
26695 static PyMethodDef __pyx_mdef_13cfemIntegrals_227calculateConservationJacobianPWL = {"calculateConservationJacobianPWL", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_227calculateConservationJacobianPWL, METH_VARARGS|METH_KEYWORDS, 0};
26696 static PyObject *__pyx_pw_13cfemIntegrals_227calculateConservationJacobianPWL(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
26697  int __pyx_v_nNodes_global;
26698  int __pyx_v_nNodes_internal;
26699  int __pyx_v_nElements_global;
26700  int __pyx_v_nInteriorElementBoundaries_global;
26701  int __pyx_v_nExteriorElementBoundaries_global;
26702  int __pyx_v_nElementBoundaries_element;
26703  int __pyx_v_nQuadraturePoints_elementBoundary;
26704  int __pyx_v_nNodes_element;
26705  int __pyx_v_nSpace;
26706  PyArrayObject *__pyx_v_interiorElementBoundaries = 0;
26707  PyArrayObject *__pyx_v_exteriorElementBoundaries = 0;
26708  PyArrayObject *__pyx_v_elementBoundaryElements = 0;
26709  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries = 0;
26710  PyArrayObject *__pyx_v_elementNodes = 0;
26711  PyArrayObject *__pyx_v_nodeStarElements = 0;
26712  PyArrayObject *__pyx_v_nodeStarElementNeighbors = 0;
26713  PyArrayObject *__pyx_v_nodeStarOffsets = 0;
26714  PyArrayObject *__pyx_v_nodeStarJacobianOffsets = 0;
26715  PyArrayObject *__pyx_v_nElements_node = 0;
26716  PyArrayObject *__pyx_v_internalNodes = 0;
26717  PyArrayObject *__pyx_v_w = 0;
26718  PyArrayObject *__pyx_v_normal = 0;
26719  PyArrayObject *__pyx_v_starJacobian = 0;
26720  int __pyx_lineno = 0;
26721  const char *__pyx_filename = NULL;
26722  int __pyx_clineno = 0;
26723  PyObject *__pyx_r = 0;
26724  __Pyx_RefNannyDeclarations
26725  __Pyx_RefNannySetupContext("calculateConservationJacobianPWL (wrapper)", 0);
26726  {
26727  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nNodes_global,&__pyx_n_s_nNodes_internal,&__pyx_n_s_nElements_global,&__pyx_n_s_nInteriorElementBoundaries_globa,&__pyx_n_s_nExteriorElementBoundaries_globa,&__pyx_n_s_nElementBoundaries_element,&__pyx_n_s_nQuadraturePoints_elementBoundar,&__pyx_n_s_nNodes_element,&__pyx_n_s_nSpace,&__pyx_n_s_interiorElementBoundaries,&__pyx_n_s_exteriorElementBoundaries,&__pyx_n_s_elementBoundaryElements,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_elementNodes,&__pyx_n_s_nodeStarElements,&__pyx_n_s_nodeStarElementNeighbors,&__pyx_n_s_nodeStarOffsets,&__pyx_n_s_nodeStarJacobianOffsets,&__pyx_n_s_nElements_node,&__pyx_n_s_internalNodes,&__pyx_n_s_w,&__pyx_n_s_normal,&__pyx_n_s_starJacobian,0};
26728  PyObject* values[23] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
26729  if (unlikely(__pyx_kwds)) {
26730  Py_ssize_t kw_args;
26731  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
26732  switch (pos_args) {
26733  case 23: values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
26734  CYTHON_FALLTHROUGH;
26735  case 22: values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
26736  CYTHON_FALLTHROUGH;
26737  case 21: values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
26738  CYTHON_FALLTHROUGH;
26739  case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
26740  CYTHON_FALLTHROUGH;
26741  case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
26742  CYTHON_FALLTHROUGH;
26743  case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
26744  CYTHON_FALLTHROUGH;
26745  case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
26746  CYTHON_FALLTHROUGH;
26747  case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
26748  CYTHON_FALLTHROUGH;
26749  case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
26750  CYTHON_FALLTHROUGH;
26751  case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
26752  CYTHON_FALLTHROUGH;
26753  case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
26754  CYTHON_FALLTHROUGH;
26755  case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
26756  CYTHON_FALLTHROUGH;
26757  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
26758  CYTHON_FALLTHROUGH;
26759  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
26760  CYTHON_FALLTHROUGH;
26761  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
26762  CYTHON_FALLTHROUGH;
26763  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
26764  CYTHON_FALLTHROUGH;
26765  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
26766  CYTHON_FALLTHROUGH;
26767  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
26768  CYTHON_FALLTHROUGH;
26769  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
26770  CYTHON_FALLTHROUGH;
26771  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
26772  CYTHON_FALLTHROUGH;
26773  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
26774  CYTHON_FALLTHROUGH;
26775  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
26776  CYTHON_FALLTHROUGH;
26777  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
26778  CYTHON_FALLTHROUGH;
26779  case 0: break;
26780  default: goto __pyx_L5_argtuple_error;
26781  }
26782  kw_args = PyDict_Size(__pyx_kwds);
26783  switch (pos_args) {
26784  case 0:
26785  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nNodes_global)) != 0)) kw_args--;
26786  else goto __pyx_L5_argtuple_error;
26787  CYTHON_FALLTHROUGH;
26788  case 1:
26789  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nNodes_internal)) != 0)) kw_args--;
26790  else {
26791  __Pyx_RaiseArgtupleInvalid("calculateConservationJacobianPWL", 1, 23, 23, 1); __PYX_ERR(0, 4686, __pyx_L3_error)
26792  }
26793  CYTHON_FALLTHROUGH;
26794  case 2:
26795  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nElements_global)) != 0)) kw_args--;
26796  else {
26797  __Pyx_RaiseArgtupleInvalid("calculateConservationJacobianPWL", 1, 23, 23, 2); __PYX_ERR(0, 4686, __pyx_L3_error)
26798  }
26799  CYTHON_FALLTHROUGH;
26800  case 3:
26801  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nInteriorElementBoundaries_globa)) != 0)) kw_args--;
26802  else {
26803  __Pyx_RaiseArgtupleInvalid("calculateConservationJacobianPWL", 1, 23, 23, 3); __PYX_ERR(0, 4686, __pyx_L3_error)
26804  }
26805  CYTHON_FALLTHROUGH;
26806  case 4:
26807  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nExteriorElementBoundaries_globa)) != 0)) kw_args--;
26808  else {
26809  __Pyx_RaiseArgtupleInvalid("calculateConservationJacobianPWL", 1, 23, 23, 4); __PYX_ERR(0, 4686, __pyx_L3_error)
26810  }
26811  CYTHON_FALLTHROUGH;
26812  case 5:
26813  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nElementBoundaries_element)) != 0)) kw_args--;
26814  else {
26815  __Pyx_RaiseArgtupleInvalid("calculateConservationJacobianPWL", 1, 23, 23, 5); __PYX_ERR(0, 4686, __pyx_L3_error)
26816  }
26817  CYTHON_FALLTHROUGH;
26818  case 6:
26819  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nQuadraturePoints_elementBoundar)) != 0)) kw_args--;
26820  else {
26821  __Pyx_RaiseArgtupleInvalid("calculateConservationJacobianPWL", 1, 23, 23, 6); __PYX_ERR(0, 4686, __pyx_L3_error)
26822  }
26823  CYTHON_FALLTHROUGH;
26824  case 7:
26825  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nNodes_element)) != 0)) kw_args--;
26826  else {
26827  __Pyx_RaiseArgtupleInvalid("calculateConservationJacobianPWL", 1, 23, 23, 7); __PYX_ERR(0, 4686, __pyx_L3_error)
26828  }
26829  CYTHON_FALLTHROUGH;
26830  case 8:
26831  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nSpace)) != 0)) kw_args--;
26832  else {
26833  __Pyx_RaiseArgtupleInvalid("calculateConservationJacobianPWL", 1, 23, 23, 8); __PYX_ERR(0, 4686, __pyx_L3_error)
26834  }
26835  CYTHON_FALLTHROUGH;
26836  case 9:
26837  if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_interiorElementBoundaries)) != 0)) kw_args--;
26838  else {
26839  __Pyx_RaiseArgtupleInvalid("calculateConservationJacobianPWL", 1, 23, 23, 9); __PYX_ERR(0, 4686, __pyx_L3_error)
26840  }
26841  CYTHON_FALLTHROUGH;
26842  case 10:
26843  if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exteriorElementBoundaries)) != 0)) kw_args--;
26844  else {
26845  __Pyx_RaiseArgtupleInvalid("calculateConservationJacobianPWL", 1, 23, 23, 10); __PYX_ERR(0, 4686, __pyx_L3_error)
26846  }
26847  CYTHON_FALLTHROUGH;
26848  case 11:
26849  if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElements)) != 0)) kw_args--;
26850  else {
26851  __Pyx_RaiseArgtupleInvalid("calculateConservationJacobianPWL", 1, 23, 23, 11); __PYX_ERR(0, 4686, __pyx_L3_error)
26852  }
26853  CYTHON_FALLTHROUGH;
26854  case 12:
26855  if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
26856  else {
26857  __Pyx_RaiseArgtupleInvalid("calculateConservationJacobianPWL", 1, 23, 23, 12); __PYX_ERR(0, 4686, __pyx_L3_error)
26858  }
26859  CYTHON_FALLTHROUGH;
26860  case 13:
26861  if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementNodes)) != 0)) kw_args--;
26862  else {
26863  __Pyx_RaiseArgtupleInvalid("calculateConservationJacobianPWL", 1, 23, 23, 13); __PYX_ERR(0, 4686, __pyx_L3_error)
26864  }
26865  CYTHON_FALLTHROUGH;
26866  case 14:
26867  if (likely((values[14] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodeStarElements)) != 0)) kw_args--;
26868  else {
26869  __Pyx_RaiseArgtupleInvalid("calculateConservationJacobianPWL", 1, 23, 23, 14); __PYX_ERR(0, 4686, __pyx_L3_error)
26870  }
26871  CYTHON_FALLTHROUGH;
26872  case 15:
26873  if (likely((values[15] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodeStarElementNeighbors)) != 0)) kw_args--;
26874  else {
26875  __Pyx_RaiseArgtupleInvalid("calculateConservationJacobianPWL", 1, 23, 23, 15); __PYX_ERR(0, 4686, __pyx_L3_error)
26876  }
26877  CYTHON_FALLTHROUGH;
26878  case 16:
26879  if (likely((values[16] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodeStarOffsets)) != 0)) kw_args--;
26880  else {
26881  __Pyx_RaiseArgtupleInvalid("calculateConservationJacobianPWL", 1, 23, 23, 16); __PYX_ERR(0, 4686, __pyx_L3_error)
26882  }
26883  CYTHON_FALLTHROUGH;
26884  case 17:
26885  if (likely((values[17] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodeStarJacobianOffsets)) != 0)) kw_args--;
26886  else {
26887  __Pyx_RaiseArgtupleInvalid("calculateConservationJacobianPWL", 1, 23, 23, 17); __PYX_ERR(0, 4686, __pyx_L3_error)
26888  }
26889  CYTHON_FALLTHROUGH;
26890  case 18:
26891  if (likely((values[18] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nElements_node)) != 0)) kw_args--;
26892  else {
26893  __Pyx_RaiseArgtupleInvalid("calculateConservationJacobianPWL", 1, 23, 23, 18); __PYX_ERR(0, 4686, __pyx_L3_error)
26894  }
26895  CYTHON_FALLTHROUGH;
26896  case 19:
26897  if (likely((values[19] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_internalNodes)) != 0)) kw_args--;
26898  else {
26899  __Pyx_RaiseArgtupleInvalid("calculateConservationJacobianPWL", 1, 23, 23, 19); __PYX_ERR(0, 4686, __pyx_L3_error)
26900  }
26901  CYTHON_FALLTHROUGH;
26902  case 20:
26903  if (likely((values[20] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_w)) != 0)) kw_args--;
26904  else {
26905  __Pyx_RaiseArgtupleInvalid("calculateConservationJacobianPWL", 1, 23, 23, 20); __PYX_ERR(0, 4686, __pyx_L3_error)
26906  }
26907  CYTHON_FALLTHROUGH;
26908  case 21:
26909  if (likely((values[21] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_normal)) != 0)) kw_args--;
26910  else {
26911  __Pyx_RaiseArgtupleInvalid("calculateConservationJacobianPWL", 1, 23, 23, 21); __PYX_ERR(0, 4686, __pyx_L3_error)
26912  }
26913  CYTHON_FALLTHROUGH;
26914  case 22:
26915  if (likely((values[22] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_starJacobian)) != 0)) kw_args--;
26916  else {
26917  __Pyx_RaiseArgtupleInvalid("calculateConservationJacobianPWL", 1, 23, 23, 22); __PYX_ERR(0, 4686, __pyx_L3_error)
26918  }
26919  }
26920  if (unlikely(kw_args > 0)) {
26921  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateConservationJacobianPWL") < 0)) __PYX_ERR(0, 4686, __pyx_L3_error)
26922  }
26923  } else if (PyTuple_GET_SIZE(__pyx_args) != 23) {
26924  goto __pyx_L5_argtuple_error;
26925  } else {
26926  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
26927  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
26928  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
26929  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
26930  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
26931  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
26932  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
26933  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
26934  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
26935  values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
26936  values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
26937  values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
26938  values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
26939  values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
26940  values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
26941  values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
26942  values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
26943  values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
26944  values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
26945  values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
26946  values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
26947  values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
26948  values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
26949  }
26950  __pyx_v_nNodes_global = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_nNodes_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4686, __pyx_L3_error)
26951  __pyx_v_nNodes_internal = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_nNodes_internal == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4687, __pyx_L3_error)
26952  __pyx_v_nElements_global = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_nElements_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4688, __pyx_L3_error)
26953  __pyx_v_nInteriorElementBoundaries_global = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_nInteriorElementBoundaries_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4689, __pyx_L3_error)
26954  __pyx_v_nExteriorElementBoundaries_global = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_nExteriorElementBoundaries_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4690, __pyx_L3_error)
26955  __pyx_v_nElementBoundaries_element = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_nElementBoundaries_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4691, __pyx_L3_error)
26956  __pyx_v_nQuadraturePoints_elementBoundary = __Pyx_PyInt_As_int(values[6]); if (unlikely((__pyx_v_nQuadraturePoints_elementBoundary == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4692, __pyx_L3_error)
26957  __pyx_v_nNodes_element = __Pyx_PyInt_As_int(values[7]); if (unlikely((__pyx_v_nNodes_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4693, __pyx_L3_error)
26958  __pyx_v_nSpace = __Pyx_PyInt_As_int(values[8]); if (unlikely((__pyx_v_nSpace == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4694, __pyx_L3_error)
26959  __pyx_v_interiorElementBoundaries = ((PyArrayObject *)values[9]);
26960  __pyx_v_exteriorElementBoundaries = ((PyArrayObject *)values[10]);
26961  __pyx_v_elementBoundaryElements = ((PyArrayObject *)values[11]);
26962  __pyx_v_elementBoundaryLocalElementBoundaries = ((PyArrayObject *)values[12]);
26963  __pyx_v_elementNodes = ((PyArrayObject *)values[13]);
26964  __pyx_v_nodeStarElements = ((PyArrayObject *)values[14]);
26965  __pyx_v_nodeStarElementNeighbors = ((PyArrayObject *)values[15]);
26966  __pyx_v_nodeStarOffsets = ((PyArrayObject *)values[16]);
26967  __pyx_v_nodeStarJacobianOffsets = ((PyArrayObject *)values[17]);
26968  __pyx_v_nElements_node = ((PyArrayObject *)values[18]);
26969  __pyx_v_internalNodes = ((PyArrayObject *)values[19]);
26970  __pyx_v_w = ((PyArrayObject *)values[20]);
26971  __pyx_v_normal = ((PyArrayObject *)values[21]);
26972  __pyx_v_starJacobian = ((PyArrayObject *)values[22]);
26973  }
26974  goto __pyx_L4_argument_unpacking_done;
26975  __pyx_L5_argtuple_error:;
26976  __Pyx_RaiseArgtupleInvalid("calculateConservationJacobianPWL", 1, 23, 23, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4686, __pyx_L3_error)
26977  __pyx_L3_error:;
26978  __Pyx_AddTraceback("cfemIntegrals.calculateConservationJacobianPWL", __pyx_clineno, __pyx_lineno, __pyx_filename);
26979  __Pyx_RefNannyFinishContext();
26980  return NULL;
26981  __pyx_L4_argument_unpacking_done:;
26982  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_interiorElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "interiorElementBoundaries", 0))) __PYX_ERR(0, 4695, __pyx_L1_error)
26983  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exteriorElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "exteriorElementBoundaries", 0))) __PYX_ERR(0, 4696, __pyx_L1_error)
26984  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElements), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElements", 0))) __PYX_ERR(0, 4697, __pyx_L1_error)
26985  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundaries", 0))) __PYX_ERR(0, 4698, __pyx_L1_error)
26986  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNodes), __pyx_ptype_5numpy_ndarray, 1, "elementNodes", 0))) __PYX_ERR(0, 4699, __pyx_L1_error)
26987  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodeStarElements), __pyx_ptype_5numpy_ndarray, 1, "nodeStarElements", 0))) __PYX_ERR(0, 4700, __pyx_L1_error)
26988  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodeStarElementNeighbors), __pyx_ptype_5numpy_ndarray, 1, "nodeStarElementNeighbors", 0))) __PYX_ERR(0, 4701, __pyx_L1_error)
26989  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodeStarOffsets), __pyx_ptype_5numpy_ndarray, 1, "nodeStarOffsets", 0))) __PYX_ERR(0, 4702, __pyx_L1_error)
26990  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodeStarJacobianOffsets), __pyx_ptype_5numpy_ndarray, 1, "nodeStarJacobianOffsets", 0))) __PYX_ERR(0, 4703, __pyx_L1_error)
26991  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nElements_node), __pyx_ptype_5numpy_ndarray, 1, "nElements_node", 0))) __PYX_ERR(0, 4704, __pyx_L1_error)
26992  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_internalNodes), __pyx_ptype_5numpy_ndarray, 1, "internalNodes", 0))) __PYX_ERR(0, 4705, __pyx_L1_error)
26993  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w), __pyx_ptype_5numpy_ndarray, 1, "w", 0))) __PYX_ERR(0, 4706, __pyx_L1_error)
26994  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_normal), __pyx_ptype_5numpy_ndarray, 1, "normal", 0))) __PYX_ERR(0, 4707, __pyx_L1_error)
26995  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_starJacobian), __pyx_ptype_5numpy_ndarray, 1, "starJacobian", 0))) __PYX_ERR(0, 4708, __pyx_L1_error)
26996  __pyx_r = __pyx_pf_13cfemIntegrals_226calculateConservationJacobianPWL(__pyx_self, __pyx_v_nNodes_global, __pyx_v_nNodes_internal, __pyx_v_nElements_global, __pyx_v_nInteriorElementBoundaries_global, __pyx_v_nExteriorElementBoundaries_global, __pyx_v_nElementBoundaries_element, __pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nNodes_element, __pyx_v_nSpace, __pyx_v_interiorElementBoundaries, __pyx_v_exteriorElementBoundaries, __pyx_v_elementBoundaryElements, __pyx_v_elementBoundaryLocalElementBoundaries, __pyx_v_elementNodes, __pyx_v_nodeStarElements, __pyx_v_nodeStarElementNeighbors, __pyx_v_nodeStarOffsets, __pyx_v_nodeStarJacobianOffsets, __pyx_v_nElements_node, __pyx_v_internalNodes, __pyx_v_w, __pyx_v_normal, __pyx_v_starJacobian);
26997 
26998  /* function exit code */
26999  goto __pyx_L0;
27000  __pyx_L1_error:;
27001  __pyx_r = NULL;
27002  __pyx_L0:;
27003  __Pyx_RefNannyFinishContext();
27004  return __pyx_r;
27005 }
27006 
27007 static PyObject *__pyx_pf_13cfemIntegrals_226calculateConservationJacobianPWL(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nNodes_global, int __pyx_v_nNodes_internal, int __pyx_v_nElements_global, int __pyx_v_nInteriorElementBoundaries_global, int __pyx_v_nExteriorElementBoundaries_global, int __pyx_v_nElementBoundaries_element, int __pyx_v_nQuadraturePoints_elementBoundary, int __pyx_v_nNodes_element, int __pyx_v_nSpace, PyArrayObject *__pyx_v_interiorElementBoundaries, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_elementNodes, PyArrayObject *__pyx_v_nodeStarElements, PyArrayObject *__pyx_v_nodeStarElementNeighbors, PyArrayObject *__pyx_v_nodeStarOffsets, PyArrayObject *__pyx_v_nodeStarJacobianOffsets, PyArrayObject *__pyx_v_nElements_node, PyArrayObject *__pyx_v_internalNodes, PyArrayObject *__pyx_v_w, PyArrayObject *__pyx_v_normal, PyArrayObject *__pyx_v_starJacobian) {
27008  PyObject *__pyx_r = NULL;
27009  __Pyx_RefNannyDeclarations
27010  __Pyx_RefNannySetupContext("calculateConservationJacobianPWL", 0);
27011 
27012  /* "cfemIntegrals.pyx":4709
27013  * np.ndarray normal,
27014  * np.ndarray starJacobian):
27015  * ccalculateConservationJacobianPWL(nNodes_global, # <<<<<<<<<<<<<<
27016  * nNodes_internal,
27017  * nElements_global,
27018  */
27019  calculateConservationJacobianPWL(__pyx_v_nNodes_global, __pyx_v_nNodes_internal, __pyx_v_nElements_global, __pyx_v_nInteriorElementBoundaries_global, __pyx_v_nExteriorElementBoundaries_global, __pyx_v_nElementBoundaries_element, __pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nNodes_element, __pyx_v_nSpace, ((int *)__pyx_v_interiorElementBoundaries->data), ((int *)__pyx_v_exteriorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), ((int *)__pyx_v_elementNodes->data), ((int *)__pyx_v_nodeStarElements->data), ((int *)__pyx_v_nodeStarElementNeighbors->data), ((int *)__pyx_v_nodeStarOffsets->data), ((int *)__pyx_v_nodeStarJacobianOffsets->data), ((int *)__pyx_v_nElements_node->data), ((int *)__pyx_v_internalNodes->data), ((double *)__pyx_v_w->data), ((double *)__pyx_v_normal->data), ((double *)__pyx_v_starJacobian->data));
27020 
27021  /* "cfemIntegrals.pyx":4686
27022  * <double*>vConservative.data,
27023  * <double*>vConservative_element.data)
27024  * def calculateConservationJacobianPWL(int nNodes_global, # <<<<<<<<<<<<<<
27025  * int nNodes_internal,
27026  * int nElements_global,
27027  */
27028 
27029  /* function exit code */
27030  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
27031  __Pyx_XGIVEREF(__pyx_r);
27032  __Pyx_RefNannyFinishContext();
27033  return __pyx_r;
27034 }
27035 
27036 /* "cfemIntegrals.pyx":4732
27037  * <double*>normal.data,
27038  * <double*>starJacobian.data)
27039  * def calculateConservationFluxPWL(int nNodes_global, # <<<<<<<<<<<<<<
27040  * int nNodes_internal,
27041  * np.ndarray nElements_node,
27042  */
27043 
27044 /* Python wrapper */
27045 static PyObject *__pyx_pw_13cfemIntegrals_229calculateConservationFluxPWL(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
27046 static PyMethodDef __pyx_mdef_13cfemIntegrals_229calculateConservationFluxPWL = {"calculateConservationFluxPWL", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_229calculateConservationFluxPWL, METH_VARARGS|METH_KEYWORDS, 0};
27047 static PyObject *__pyx_pw_13cfemIntegrals_229calculateConservationFluxPWL(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
27048  int __pyx_v_nNodes_global;
27049  int __pyx_v_nNodes_internal;
27050  PyArrayObject *__pyx_v_nElements_node = 0;
27051  PyArrayObject *__pyx_v_nodeStarOffsets = 0;
27052  PyArrayObject *__pyx_v_nodeStarJacobianOffsets = 0;
27053  PyArrayObject *__pyx_v_internalNodes = 0;
27054  PyArrayObject *__pyx_v_starR = 0;
27055  PyArrayObject *__pyx_v_starJ = 0;
27056  PyArrayObject *__pyx_v_starU = 0;
27057  int __pyx_lineno = 0;
27058  const char *__pyx_filename = NULL;
27059  int __pyx_clineno = 0;
27060  PyObject *__pyx_r = 0;
27061  __Pyx_RefNannyDeclarations
27062  __Pyx_RefNannySetupContext("calculateConservationFluxPWL (wrapper)", 0);
27063  {
27064  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nNodes_global,&__pyx_n_s_nNodes_internal,&__pyx_n_s_nElements_node,&__pyx_n_s_nodeStarOffsets,&__pyx_n_s_nodeStarJacobianOffsets,&__pyx_n_s_internalNodes,&__pyx_n_s_starR,&__pyx_n_s_starJ,&__pyx_n_s_starU,0};
27065  PyObject* values[9] = {0,0,0,0,0,0,0,0,0};
27066  if (unlikely(__pyx_kwds)) {
27067  Py_ssize_t kw_args;
27068  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
27069  switch (pos_args) {
27070  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
27071  CYTHON_FALLTHROUGH;
27072  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
27073  CYTHON_FALLTHROUGH;
27074  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
27075  CYTHON_FALLTHROUGH;
27076  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
27077  CYTHON_FALLTHROUGH;
27078  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
27079  CYTHON_FALLTHROUGH;
27080  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
27081  CYTHON_FALLTHROUGH;
27082  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
27083  CYTHON_FALLTHROUGH;
27084  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
27085  CYTHON_FALLTHROUGH;
27086  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
27087  CYTHON_FALLTHROUGH;
27088  case 0: break;
27089  default: goto __pyx_L5_argtuple_error;
27090  }
27091  kw_args = PyDict_Size(__pyx_kwds);
27092  switch (pos_args) {
27093  case 0:
27094  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nNodes_global)) != 0)) kw_args--;
27095  else goto __pyx_L5_argtuple_error;
27096  CYTHON_FALLTHROUGH;
27097  case 1:
27098  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nNodes_internal)) != 0)) kw_args--;
27099  else {
27100  __Pyx_RaiseArgtupleInvalid("calculateConservationFluxPWL", 1, 9, 9, 1); __PYX_ERR(0, 4732, __pyx_L3_error)
27101  }
27102  CYTHON_FALLTHROUGH;
27103  case 2:
27104  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nElements_node)) != 0)) kw_args--;
27105  else {
27106  __Pyx_RaiseArgtupleInvalid("calculateConservationFluxPWL", 1, 9, 9, 2); __PYX_ERR(0, 4732, __pyx_L3_error)
27107  }
27108  CYTHON_FALLTHROUGH;
27109  case 3:
27110  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodeStarOffsets)) != 0)) kw_args--;
27111  else {
27112  __Pyx_RaiseArgtupleInvalid("calculateConservationFluxPWL", 1, 9, 9, 3); __PYX_ERR(0, 4732, __pyx_L3_error)
27113  }
27114  CYTHON_FALLTHROUGH;
27115  case 4:
27116  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodeStarJacobianOffsets)) != 0)) kw_args--;
27117  else {
27118  __Pyx_RaiseArgtupleInvalid("calculateConservationFluxPWL", 1, 9, 9, 4); __PYX_ERR(0, 4732, __pyx_L3_error)
27119  }
27120  CYTHON_FALLTHROUGH;
27121  case 5:
27122  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_internalNodes)) != 0)) kw_args--;
27123  else {
27124  __Pyx_RaiseArgtupleInvalid("calculateConservationFluxPWL", 1, 9, 9, 5); __PYX_ERR(0, 4732, __pyx_L3_error)
27125  }
27126  CYTHON_FALLTHROUGH;
27127  case 6:
27128  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_starR)) != 0)) kw_args--;
27129  else {
27130  __Pyx_RaiseArgtupleInvalid("calculateConservationFluxPWL", 1, 9, 9, 6); __PYX_ERR(0, 4732, __pyx_L3_error)
27131  }
27132  CYTHON_FALLTHROUGH;
27133  case 7:
27134  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_starJ)) != 0)) kw_args--;
27135  else {
27136  __Pyx_RaiseArgtupleInvalid("calculateConservationFluxPWL", 1, 9, 9, 7); __PYX_ERR(0, 4732, __pyx_L3_error)
27137  }
27138  CYTHON_FALLTHROUGH;
27139  case 8:
27140  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_starU)) != 0)) kw_args--;
27141  else {
27142  __Pyx_RaiseArgtupleInvalid("calculateConservationFluxPWL", 1, 9, 9, 8); __PYX_ERR(0, 4732, __pyx_L3_error)
27143  }
27144  }
27145  if (unlikely(kw_args > 0)) {
27146  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateConservationFluxPWL") < 0)) __PYX_ERR(0, 4732, __pyx_L3_error)
27147  }
27148  } else if (PyTuple_GET_SIZE(__pyx_args) != 9) {
27149  goto __pyx_L5_argtuple_error;
27150  } else {
27151  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
27152  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
27153  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
27154  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
27155  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
27156  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
27157  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
27158  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
27159  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
27160  }
27161  __pyx_v_nNodes_global = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_nNodes_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4732, __pyx_L3_error)
27162  __pyx_v_nNodes_internal = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_nNodes_internal == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4733, __pyx_L3_error)
27163  __pyx_v_nElements_node = ((PyArrayObject *)values[2]);
27164  __pyx_v_nodeStarOffsets = ((PyArrayObject *)values[3]);
27165  __pyx_v_nodeStarJacobianOffsets = ((PyArrayObject *)values[4]);
27166  __pyx_v_internalNodes = ((PyArrayObject *)values[5]);
27167  __pyx_v_starR = ((PyArrayObject *)values[6]);
27168  __pyx_v_starJ = ((PyArrayObject *)values[7]);
27169  __pyx_v_starU = ((PyArrayObject *)values[8]);
27170  }
27171  goto __pyx_L4_argument_unpacking_done;
27172  __pyx_L5_argtuple_error:;
27173  __Pyx_RaiseArgtupleInvalid("calculateConservationFluxPWL", 1, 9, 9, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4732, __pyx_L3_error)
27174  __pyx_L3_error:;
27175  __Pyx_AddTraceback("cfemIntegrals.calculateConservationFluxPWL", __pyx_clineno, __pyx_lineno, __pyx_filename);
27176  __Pyx_RefNannyFinishContext();
27177  return NULL;
27178  __pyx_L4_argument_unpacking_done:;
27179  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nElements_node), __pyx_ptype_5numpy_ndarray, 1, "nElements_node", 0))) __PYX_ERR(0, 4734, __pyx_L1_error)
27180  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodeStarOffsets), __pyx_ptype_5numpy_ndarray, 1, "nodeStarOffsets", 0))) __PYX_ERR(0, 4735, __pyx_L1_error)
27181  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodeStarJacobianOffsets), __pyx_ptype_5numpy_ndarray, 1, "nodeStarJacobianOffsets", 0))) __PYX_ERR(0, 4736, __pyx_L1_error)
27182  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_internalNodes), __pyx_ptype_5numpy_ndarray, 1, "internalNodes", 0))) __PYX_ERR(0, 4737, __pyx_L1_error)
27183  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_starR), __pyx_ptype_5numpy_ndarray, 1, "starR", 0))) __PYX_ERR(0, 4738, __pyx_L1_error)
27184  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_starJ), __pyx_ptype_5numpy_ndarray, 1, "starJ", 0))) __PYX_ERR(0, 4739, __pyx_L1_error)
27185  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_starU), __pyx_ptype_5numpy_ndarray, 1, "starU", 0))) __PYX_ERR(0, 4740, __pyx_L1_error)
27186  __pyx_r = __pyx_pf_13cfemIntegrals_228calculateConservationFluxPWL(__pyx_self, __pyx_v_nNodes_global, __pyx_v_nNodes_internal, __pyx_v_nElements_node, __pyx_v_nodeStarOffsets, __pyx_v_nodeStarJacobianOffsets, __pyx_v_internalNodes, __pyx_v_starR, __pyx_v_starJ, __pyx_v_starU);
27187 
27188  /* function exit code */
27189  goto __pyx_L0;
27190  __pyx_L1_error:;
27191  __pyx_r = NULL;
27192  __pyx_L0:;
27193  __Pyx_RefNannyFinishContext();
27194  return __pyx_r;
27195 }
27196 
27197 static PyObject *__pyx_pf_13cfemIntegrals_228calculateConservationFluxPWL(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nNodes_global, int __pyx_v_nNodes_internal, PyArrayObject *__pyx_v_nElements_node, PyArrayObject *__pyx_v_nodeStarOffsets, PyArrayObject *__pyx_v_nodeStarJacobianOffsets, PyArrayObject *__pyx_v_internalNodes, PyArrayObject *__pyx_v_starR, PyArrayObject *__pyx_v_starJ, PyArrayObject *__pyx_v_starU) {
27198  PyObject *__pyx_r = NULL;
27199  __Pyx_RefNannyDeclarations
27200  __Pyx_RefNannySetupContext("calculateConservationFluxPWL", 0);
27201 
27202  /* "cfemIntegrals.pyx":4741
27203  * np.ndarray starJ,
27204  * np.ndarray starU):
27205  * ccalculateConservationFluxPWL(nNodes_global, # <<<<<<<<<<<<<<
27206  * nNodes_internal,
27207  * <int *>nElements_node.data,
27208  */
27209  calculateConservationFluxPWL(__pyx_v_nNodes_global, __pyx_v_nNodes_internal, ((int *)__pyx_v_nElements_node->data), ((int *)__pyx_v_nodeStarOffsets->data), ((int *)__pyx_v_nodeStarJacobianOffsets->data), ((int *)__pyx_v_internalNodes->data), ((double *)__pyx_v_starR->data), ((double *)__pyx_v_starJ->data), ((double *)__pyx_v_starU->data));
27210 
27211  /* "cfemIntegrals.pyx":4732
27212  * <double*>normal.data,
27213  * <double*>starJacobian.data)
27214  * def calculateConservationFluxPWL(int nNodes_global, # <<<<<<<<<<<<<<
27215  * int nNodes_internal,
27216  * np.ndarray nElements_node,
27217  */
27218 
27219  /* function exit code */
27220  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
27221  __Pyx_XGIVEREF(__pyx_r);
27222  __Pyx_RefNannyFinishContext();
27223  return __pyx_r;
27224 }
27225 
27226 /* "cfemIntegrals.pyx":4750
27227  * <double*>starJ.data,
27228  * <double*>starU.data)
27229  * def setExteriorGlobalElementBoundaryVelocityValues(int updateFluxValues, # <<<<<<<<<<<<<<
27230  * int nExteriorElementBoundaries_global,
27231  * int nQuadraturePoints_elementBoundary,
27232  */
27233 
27234 /* Python wrapper */
27235 static PyObject *__pyx_pw_13cfemIntegrals_231setExteriorGlobalElementBoundaryVelocityValues(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
27236 static PyMethodDef __pyx_mdef_13cfemIntegrals_231setExteriorGlobalElementBoundaryVelocityValues = {"setExteriorGlobalElementBoundaryVelocityValues", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_231setExteriorGlobalElementBoundaryVelocityValues, METH_VARARGS|METH_KEYWORDS, 0};
27237 static PyObject *__pyx_pw_13cfemIntegrals_231setExteriorGlobalElementBoundaryVelocityValues(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
27238  int __pyx_v_updateFluxValues;
27239  int __pyx_v_nExteriorElementBoundaries_global;
27240  int __pyx_v_nQuadraturePoints_elementBoundary;
27241  int __pyx_v_nSpace;
27242  PyArrayObject *__pyx_v_exteriorElementBoundaries = 0;
27243  PyArrayObject *__pyx_v_elementBoundaryElements = 0;
27244  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries = 0;
27245  PyArrayObject *__pyx_v_n = 0;
27246  PyArrayObject *__pyx_v_vn_in = 0;
27247  PyArrayObject *__pyx_v_v_out = 0;
27248  int __pyx_lineno = 0;
27249  const char *__pyx_filename = NULL;
27250  int __pyx_clineno = 0;
27251  PyObject *__pyx_r = 0;
27252  __Pyx_RefNannyDeclarations
27253  __Pyx_RefNannySetupContext("setExteriorGlobalElementBoundaryVelocityValues (wrapper)", 0);
27254  {
27255  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_updateFluxValues,&__pyx_n_s_nExteriorElementBoundaries_globa,&__pyx_n_s_nQuadraturePoints_elementBoundar,&__pyx_n_s_nSpace,&__pyx_n_s_exteriorElementBoundaries,&__pyx_n_s_elementBoundaryElements,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_n,&__pyx_n_s_vn_in,&__pyx_n_s_v_out,0};
27256  PyObject* values[10] = {0,0,0,0,0,0,0,0,0,0};
27257  if (unlikely(__pyx_kwds)) {
27258  Py_ssize_t kw_args;
27259  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
27260  switch (pos_args) {
27261  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
27262  CYTHON_FALLTHROUGH;
27263  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
27264  CYTHON_FALLTHROUGH;
27265  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
27266  CYTHON_FALLTHROUGH;
27267  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
27268  CYTHON_FALLTHROUGH;
27269  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
27270  CYTHON_FALLTHROUGH;
27271  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
27272  CYTHON_FALLTHROUGH;
27273  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
27274  CYTHON_FALLTHROUGH;
27275  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
27276  CYTHON_FALLTHROUGH;
27277  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
27278  CYTHON_FALLTHROUGH;
27279  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
27280  CYTHON_FALLTHROUGH;
27281  case 0: break;
27282  default: goto __pyx_L5_argtuple_error;
27283  }
27284  kw_args = PyDict_Size(__pyx_kwds);
27285  switch (pos_args) {
27286  case 0:
27287  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_updateFluxValues)) != 0)) kw_args--;
27288  else goto __pyx_L5_argtuple_error;
27289  CYTHON_FALLTHROUGH;
27290  case 1:
27291  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nExteriorElementBoundaries_globa)) != 0)) kw_args--;
27292  else {
27293  __Pyx_RaiseArgtupleInvalid("setExteriorGlobalElementBoundaryVelocityValues", 1, 10, 10, 1); __PYX_ERR(0, 4750, __pyx_L3_error)
27294  }
27295  CYTHON_FALLTHROUGH;
27296  case 2:
27297  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nQuadraturePoints_elementBoundar)) != 0)) kw_args--;
27298  else {
27299  __Pyx_RaiseArgtupleInvalid("setExteriorGlobalElementBoundaryVelocityValues", 1, 10, 10, 2); __PYX_ERR(0, 4750, __pyx_L3_error)
27300  }
27301  CYTHON_FALLTHROUGH;
27302  case 3:
27303  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nSpace)) != 0)) kw_args--;
27304  else {
27305  __Pyx_RaiseArgtupleInvalid("setExteriorGlobalElementBoundaryVelocityValues", 1, 10, 10, 3); __PYX_ERR(0, 4750, __pyx_L3_error)
27306  }
27307  CYTHON_FALLTHROUGH;
27308  case 4:
27309  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exteriorElementBoundaries)) != 0)) kw_args--;
27310  else {
27311  __Pyx_RaiseArgtupleInvalid("setExteriorGlobalElementBoundaryVelocityValues", 1, 10, 10, 4); __PYX_ERR(0, 4750, __pyx_L3_error)
27312  }
27313  CYTHON_FALLTHROUGH;
27314  case 5:
27315  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElements)) != 0)) kw_args--;
27316  else {
27317  __Pyx_RaiseArgtupleInvalid("setExteriorGlobalElementBoundaryVelocityValues", 1, 10, 10, 5); __PYX_ERR(0, 4750, __pyx_L3_error)
27318  }
27319  CYTHON_FALLTHROUGH;
27320  case 6:
27321  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
27322  else {
27323  __Pyx_RaiseArgtupleInvalid("setExteriorGlobalElementBoundaryVelocityValues", 1, 10, 10, 6); __PYX_ERR(0, 4750, __pyx_L3_error)
27324  }
27325  CYTHON_FALLTHROUGH;
27326  case 7:
27327  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n)) != 0)) kw_args--;
27328  else {
27329  __Pyx_RaiseArgtupleInvalid("setExteriorGlobalElementBoundaryVelocityValues", 1, 10, 10, 7); __PYX_ERR(0, 4750, __pyx_L3_error)
27330  }
27331  CYTHON_FALLTHROUGH;
27332  case 8:
27333  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vn_in)) != 0)) kw_args--;
27334  else {
27335  __Pyx_RaiseArgtupleInvalid("setExteriorGlobalElementBoundaryVelocityValues", 1, 10, 10, 8); __PYX_ERR(0, 4750, __pyx_L3_error)
27336  }
27337  CYTHON_FALLTHROUGH;
27338  case 9:
27339  if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v_out)) != 0)) kw_args--;
27340  else {
27341  __Pyx_RaiseArgtupleInvalid("setExteriorGlobalElementBoundaryVelocityValues", 1, 10, 10, 9); __PYX_ERR(0, 4750, __pyx_L3_error)
27342  }
27343  }
27344  if (unlikely(kw_args > 0)) {
27345  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setExteriorGlobalElementBoundaryVelocityValues") < 0)) __PYX_ERR(0, 4750, __pyx_L3_error)
27346  }
27347  } else if (PyTuple_GET_SIZE(__pyx_args) != 10) {
27348  goto __pyx_L5_argtuple_error;
27349  } else {
27350  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
27351  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
27352  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
27353  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
27354  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
27355  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
27356  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
27357  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
27358  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
27359  values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
27360  }
27361  __pyx_v_updateFluxValues = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_updateFluxValues == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4750, __pyx_L3_error)
27362  __pyx_v_nExteriorElementBoundaries_global = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_nExteriorElementBoundaries_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4751, __pyx_L3_error)
27363  __pyx_v_nQuadraturePoints_elementBoundary = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_nQuadraturePoints_elementBoundary == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4752, __pyx_L3_error)
27364  __pyx_v_nSpace = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_nSpace == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4753, __pyx_L3_error)
27365  __pyx_v_exteriorElementBoundaries = ((PyArrayObject *)values[4]);
27366  __pyx_v_elementBoundaryElements = ((PyArrayObject *)values[5]);
27367  __pyx_v_elementBoundaryLocalElementBoundaries = ((PyArrayObject *)values[6]);
27368  __pyx_v_n = ((PyArrayObject *)values[7]);
27369  __pyx_v_vn_in = ((PyArrayObject *)values[8]);
27370  __pyx_v_v_out = ((PyArrayObject *)values[9]);
27371  }
27372  goto __pyx_L4_argument_unpacking_done;
27373  __pyx_L5_argtuple_error:;
27374  __Pyx_RaiseArgtupleInvalid("setExteriorGlobalElementBoundaryVelocityValues", 1, 10, 10, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4750, __pyx_L3_error)
27375  __pyx_L3_error:;
27376  __Pyx_AddTraceback("cfemIntegrals.setExteriorGlobalElementBoundaryVelocityValues", __pyx_clineno, __pyx_lineno, __pyx_filename);
27377  __Pyx_RefNannyFinishContext();
27378  return NULL;
27379  __pyx_L4_argument_unpacking_done:;
27380  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exteriorElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "exteriorElementBoundaries", 0))) __PYX_ERR(0, 4754, __pyx_L1_error)
27381  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElements), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElements", 0))) __PYX_ERR(0, 4755, __pyx_L1_error)
27382  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundaries", 0))) __PYX_ERR(0, 4756, __pyx_L1_error)
27383  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_n), __pyx_ptype_5numpy_ndarray, 1, "n", 0))) __PYX_ERR(0, 4757, __pyx_L1_error)
27384  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vn_in), __pyx_ptype_5numpy_ndarray, 1, "vn_in", 0))) __PYX_ERR(0, 4758, __pyx_L1_error)
27385  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v_out), __pyx_ptype_5numpy_ndarray, 1, "v_out", 0))) __PYX_ERR(0, 4759, __pyx_L1_error)
27386  __pyx_r = __pyx_pf_13cfemIntegrals_230setExteriorGlobalElementBoundaryVelocityValues(__pyx_self, __pyx_v_updateFluxValues, __pyx_v_nExteriorElementBoundaries_global, __pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nSpace, __pyx_v_exteriorElementBoundaries, __pyx_v_elementBoundaryElements, __pyx_v_elementBoundaryLocalElementBoundaries, __pyx_v_n, __pyx_v_vn_in, __pyx_v_v_out);
27387 
27388  /* function exit code */
27389  goto __pyx_L0;
27390  __pyx_L1_error:;
27391  __pyx_r = NULL;
27392  __pyx_L0:;
27393  __Pyx_RefNannyFinishContext();
27394  return __pyx_r;
27395 }
27396 
27397 static PyObject *__pyx_pf_13cfemIntegrals_230setExteriorGlobalElementBoundaryVelocityValues(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_updateFluxValues, int __pyx_v_nExteriorElementBoundaries_global, int __pyx_v_nQuadraturePoints_elementBoundary, int __pyx_v_nSpace, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_n, PyArrayObject *__pyx_v_vn_in, PyArrayObject *__pyx_v_v_out) {
27398  PyObject *__pyx_r = NULL;
27399  __Pyx_RefNannyDeclarations
27400  __Pyx_RefNannySetupContext("setExteriorGlobalElementBoundaryVelocityValues", 0);
27401 
27402  /* "cfemIntegrals.pyx":4760
27403  * np.ndarray vn_in,
27404  * np.ndarray v_out):
27405  * csetExteriorGlobalElementBoundaryVelocityValues(updateFluxValues, # <<<<<<<<<<<<<<
27406  * nExteriorElementBoundaries_global,
27407  * nQuadraturePoints_elementBoundary,
27408  */
27409  setExteriorGlobalElementBoundaryVelocityValues(__pyx_v_updateFluxValues, __pyx_v_nExteriorElementBoundaries_global, __pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nSpace, ((int *)__pyx_v_exteriorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), ((double *)__pyx_v_n->data), ((double *)__pyx_v_vn_in->data), ((double *)__pyx_v_v_out->data));
27410 
27411  /* "cfemIntegrals.pyx":4750
27412  * <double*>starJ.data,
27413  * <double*>starU.data)
27414  * def setExteriorGlobalElementBoundaryVelocityValues(int updateFluxValues, # <<<<<<<<<<<<<<
27415  * int nExteriorElementBoundaries_global,
27416  * int nQuadraturePoints_elementBoundary,
27417  */
27418 
27419  /* function exit code */
27420  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
27421  __Pyx_XGIVEREF(__pyx_r);
27422  __Pyx_RefNannyFinishContext();
27423  return __pyx_r;
27424 }
27425 
27426 /* "cfemIntegrals.pyx":4770
27427  * <double*>vn_in.data,
27428  * <double*>v_out.data)
27429  * def calculateDimensionlessNumbersADR(int nElements_global, # <<<<<<<<<<<<<<
27430  * int nQuadraturePoints_element,
27431  * int nSpace,
27432  */
27433 
27434 /* Python wrapper */
27435 static PyObject *__pyx_pw_13cfemIntegrals_233calculateDimensionlessNumbersADR(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
27436 static PyMethodDef __pyx_mdef_13cfemIntegrals_233calculateDimensionlessNumbersADR = {"calculateDimensionlessNumbersADR", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_233calculateDimensionlessNumbersADR, METH_VARARGS|METH_KEYWORDS, 0};
27437 static PyObject *__pyx_pw_13cfemIntegrals_233calculateDimensionlessNumbersADR(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
27438  int __pyx_v_nElements_global;
27439  int __pyx_v_nQuadraturePoints_element;
27440  int __pyx_v_nSpace;
27441  PyArrayObject *__pyx_v_elementDiameter = 0;
27442  PyArrayObject *__pyx_v_df = 0;
27443  PyArrayObject *__pyx_v_a = 0;
27444  PyArrayObject *__pyx_v_dphi = 0;
27445  PyArrayObject *__pyx_v_dr = 0;
27446  PyArrayObject *__pyx_v_dmt = 0;
27447  PyArrayObject *__pyx_v_pe = 0;
27448  PyArrayObject *__pyx_v_cfl = 0;
27449  int __pyx_lineno = 0;
27450  const char *__pyx_filename = NULL;
27451  int __pyx_clineno = 0;
27452  PyObject *__pyx_r = 0;
27453  __Pyx_RefNannyDeclarations
27454  __Pyx_RefNannySetupContext("calculateDimensionlessNumbersADR (wrapper)", 0);
27455  {
27456  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nElements_global,&__pyx_n_s_nQuadraturePoints_element,&__pyx_n_s_nSpace,&__pyx_n_s_elementDiameter,&__pyx_n_s_df,&__pyx_n_s_a,&__pyx_n_s_dphi,&__pyx_n_s_dr,&__pyx_n_s_dmt,&__pyx_n_s_pe,&__pyx_n_s_cfl,0};
27457  PyObject* values[11] = {0,0,0,0,0,0,0,0,0,0,0};
27458  if (unlikely(__pyx_kwds)) {
27459  Py_ssize_t kw_args;
27460  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
27461  switch (pos_args) {
27462  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
27463  CYTHON_FALLTHROUGH;
27464  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
27465  CYTHON_FALLTHROUGH;
27466  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
27467  CYTHON_FALLTHROUGH;
27468  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
27469  CYTHON_FALLTHROUGH;
27470  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
27471  CYTHON_FALLTHROUGH;
27472  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
27473  CYTHON_FALLTHROUGH;
27474  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
27475  CYTHON_FALLTHROUGH;
27476  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
27477  CYTHON_FALLTHROUGH;
27478  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
27479  CYTHON_FALLTHROUGH;
27480  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
27481  CYTHON_FALLTHROUGH;
27482  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
27483  CYTHON_FALLTHROUGH;
27484  case 0: break;
27485  default: goto __pyx_L5_argtuple_error;
27486  }
27487  kw_args = PyDict_Size(__pyx_kwds);
27488  switch (pos_args) {
27489  case 0:
27490  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nElements_global)) != 0)) kw_args--;
27491  else goto __pyx_L5_argtuple_error;
27492  CYTHON_FALLTHROUGH;
27493  case 1:
27494  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nQuadraturePoints_element)) != 0)) kw_args--;
27495  else {
27496  __Pyx_RaiseArgtupleInvalid("calculateDimensionlessNumbersADR", 1, 11, 11, 1); __PYX_ERR(0, 4770, __pyx_L3_error)
27497  }
27498  CYTHON_FALLTHROUGH;
27499  case 2:
27500  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nSpace)) != 0)) kw_args--;
27501  else {
27502  __Pyx_RaiseArgtupleInvalid("calculateDimensionlessNumbersADR", 1, 11, 11, 2); __PYX_ERR(0, 4770, __pyx_L3_error)
27503  }
27504  CYTHON_FALLTHROUGH;
27505  case 3:
27506  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementDiameter)) != 0)) kw_args--;
27507  else {
27508  __Pyx_RaiseArgtupleInvalid("calculateDimensionlessNumbersADR", 1, 11, 11, 3); __PYX_ERR(0, 4770, __pyx_L3_error)
27509  }
27510  CYTHON_FALLTHROUGH;
27511  case 4:
27512  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_df)) != 0)) kw_args--;
27513  else {
27514  __Pyx_RaiseArgtupleInvalid("calculateDimensionlessNumbersADR", 1, 11, 11, 4); __PYX_ERR(0, 4770, __pyx_L3_error)
27515  }
27516  CYTHON_FALLTHROUGH;
27517  case 5:
27518  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
27519  else {
27520  __Pyx_RaiseArgtupleInvalid("calculateDimensionlessNumbersADR", 1, 11, 11, 5); __PYX_ERR(0, 4770, __pyx_L3_error)
27521  }
27522  CYTHON_FALLTHROUGH;
27523  case 6:
27524  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dphi)) != 0)) kw_args--;
27525  else {
27526  __Pyx_RaiseArgtupleInvalid("calculateDimensionlessNumbersADR", 1, 11, 11, 6); __PYX_ERR(0, 4770, __pyx_L3_error)
27527  }
27528  CYTHON_FALLTHROUGH;
27529  case 7:
27530  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dr)) != 0)) kw_args--;
27531  else {
27532  __Pyx_RaiseArgtupleInvalid("calculateDimensionlessNumbersADR", 1, 11, 11, 7); __PYX_ERR(0, 4770, __pyx_L3_error)
27533  }
27534  CYTHON_FALLTHROUGH;
27535  case 8:
27536  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dmt)) != 0)) kw_args--;
27537  else {
27538  __Pyx_RaiseArgtupleInvalid("calculateDimensionlessNumbersADR", 1, 11, 11, 8); __PYX_ERR(0, 4770, __pyx_L3_error)
27539  }
27540  CYTHON_FALLTHROUGH;
27541  case 9:
27542  if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pe)) != 0)) kw_args--;
27543  else {
27544  __Pyx_RaiseArgtupleInvalid("calculateDimensionlessNumbersADR", 1, 11, 11, 9); __PYX_ERR(0, 4770, __pyx_L3_error)
27545  }
27546  CYTHON_FALLTHROUGH;
27547  case 10:
27548  if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cfl)) != 0)) kw_args--;
27549  else {
27550  __Pyx_RaiseArgtupleInvalid("calculateDimensionlessNumbersADR", 1, 11, 11, 10); __PYX_ERR(0, 4770, __pyx_L3_error)
27551  }
27552  }
27553  if (unlikely(kw_args > 0)) {
27554  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateDimensionlessNumbersADR") < 0)) __PYX_ERR(0, 4770, __pyx_L3_error)
27555  }
27556  } else if (PyTuple_GET_SIZE(__pyx_args) != 11) {
27557  goto __pyx_L5_argtuple_error;
27558  } else {
27559  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
27560  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
27561  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
27562  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
27563  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
27564  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
27565  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
27566  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
27567  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
27568  values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
27569  values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
27570  }
27571  __pyx_v_nElements_global = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_nElements_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4770, __pyx_L3_error)
27572  __pyx_v_nQuadraturePoints_element = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_nQuadraturePoints_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4771, __pyx_L3_error)
27573  __pyx_v_nSpace = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_nSpace == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4772, __pyx_L3_error)
27574  __pyx_v_elementDiameter = ((PyArrayObject *)values[3]);
27575  __pyx_v_df = ((PyArrayObject *)values[4]);
27576  __pyx_v_a = ((PyArrayObject *)values[5]);
27577  __pyx_v_dphi = ((PyArrayObject *)values[6]);
27578  __pyx_v_dr = ((PyArrayObject *)values[7]);
27579  __pyx_v_dmt = ((PyArrayObject *)values[8]);
27580  __pyx_v_pe = ((PyArrayObject *)values[9]);
27581  __pyx_v_cfl = ((PyArrayObject *)values[10]);
27582  }
27583  goto __pyx_L4_argument_unpacking_done;
27584  __pyx_L5_argtuple_error:;
27585  __Pyx_RaiseArgtupleInvalid("calculateDimensionlessNumbersADR", 1, 11, 11, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4770, __pyx_L3_error)
27586  __pyx_L3_error:;
27587  __Pyx_AddTraceback("cfemIntegrals.calculateDimensionlessNumbersADR", __pyx_clineno, __pyx_lineno, __pyx_filename);
27588  __Pyx_RefNannyFinishContext();
27589  return NULL;
27590  __pyx_L4_argument_unpacking_done:;
27591  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementDiameter), __pyx_ptype_5numpy_ndarray, 1, "elementDiameter", 0))) __PYX_ERR(0, 4773, __pyx_L1_error)
27592  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_df), __pyx_ptype_5numpy_ndarray, 1, "df", 0))) __PYX_ERR(0, 4774, __pyx_L1_error)
27593  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1, "a", 0))) __PYX_ERR(0, 4775, __pyx_L1_error)
27594  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dphi), __pyx_ptype_5numpy_ndarray, 1, "dphi", 0))) __PYX_ERR(0, 4776, __pyx_L1_error)
27595  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dr), __pyx_ptype_5numpy_ndarray, 1, "dr", 0))) __PYX_ERR(0, 4777, __pyx_L1_error)
27596  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dmt), __pyx_ptype_5numpy_ndarray, 1, "dmt", 0))) __PYX_ERR(0, 4778, __pyx_L1_error)
27597  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pe), __pyx_ptype_5numpy_ndarray, 1, "pe", 0))) __PYX_ERR(0, 4779, __pyx_L1_error)
27598  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cfl), __pyx_ptype_5numpy_ndarray, 1, "cfl", 0))) __PYX_ERR(0, 4780, __pyx_L1_error)
27599  __pyx_r = __pyx_pf_13cfemIntegrals_232calculateDimensionlessNumbersADR(__pyx_self, __pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nSpace, __pyx_v_elementDiameter, __pyx_v_df, __pyx_v_a, __pyx_v_dphi, __pyx_v_dr, __pyx_v_dmt, __pyx_v_pe, __pyx_v_cfl);
27600 
27601  /* function exit code */
27602  goto __pyx_L0;
27603  __pyx_L1_error:;
27604  __pyx_r = NULL;
27605  __pyx_L0:;
27606  __Pyx_RefNannyFinishContext();
27607  return __pyx_r;
27608 }
27609 
27610 static PyObject *__pyx_pf_13cfemIntegrals_232calculateDimensionlessNumbersADR(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nElements_global, int __pyx_v_nQuadraturePoints_element, int __pyx_v_nSpace, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_df, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_dphi, PyArrayObject *__pyx_v_dr, PyArrayObject *__pyx_v_dmt, PyArrayObject *__pyx_v_pe, PyArrayObject *__pyx_v_cfl) {
27611  int __pyx_v_computeDiffusiveTimeStepLimit;
27612  PyObject *__pyx_r = NULL;
27613  __Pyx_RefNannyDeclarations
27614  __Pyx_RefNannySetupContext("calculateDimensionlessNumbersADR", 0);
27615 
27616  /* "cfemIntegrals.pyx":4781
27617  * np.ndarray pe,
27618  * np.ndarray cfl):
27619  * cdef int computeDiffusiveTimeStepLimit = 0 # <<<<<<<<<<<<<<
27620  * ccalculateDimensionlessNumbersADR(nElements_global,
27621  * nQuadraturePoints_element,
27622  */
27623  __pyx_v_computeDiffusiveTimeStepLimit = 0;
27624 
27625  /* "cfemIntegrals.pyx":4782
27626  * np.ndarray cfl):
27627  * cdef int computeDiffusiveTimeStepLimit = 0
27628  * ccalculateDimensionlessNumbersADR(nElements_global, # <<<<<<<<<<<<<<
27629  * nQuadraturePoints_element,
27630  * nSpace,
27631  */
27632  calculateDimensionlessNumbersADR(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nSpace, __pyx_v_computeDiffusiveTimeStepLimit, ((double *)__pyx_v_elementDiameter->data), ((double *)__pyx_v_df->data), ((double *)__pyx_v_a->data), ((double *)__pyx_v_dphi->data), ((double *)__pyx_v_dr->data), ((double *)__pyx_v_dmt->data), ((double *)__pyx_v_pe->data), ((double *)__pyx_v_cfl->data));
27633 
27634  /* "cfemIntegrals.pyx":4770
27635  * <double*>vn_in.data,
27636  * <double*>v_out.data)
27637  * def calculateDimensionlessNumbersADR(int nElements_global, # <<<<<<<<<<<<<<
27638  * int nQuadraturePoints_element,
27639  * int nSpace,
27640  */
27641 
27642  /* function exit code */
27643  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
27644  __Pyx_XGIVEREF(__pyx_r);
27645  __Pyx_RefNannyFinishContext();
27646  return __pyx_r;
27647 }
27648 
27649 /* "cfemIntegrals.pyx":4794
27650  * <double*>pe.data,
27651  * <double*>cfl.data)
27652  * def calculateDimensionlessNumbersADR_sd(int nElements_global, # <<<<<<<<<<<<<<
27653  * int nQuadraturePoints_element,
27654  * int nSpace,
27655  */
27656 
27657 /* Python wrapper */
27658 static PyObject *__pyx_pw_13cfemIntegrals_235calculateDimensionlessNumbersADR_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
27659 static PyMethodDef __pyx_mdef_13cfemIntegrals_235calculateDimensionlessNumbersADR_sd = {"calculateDimensionlessNumbersADR_sd", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_235calculateDimensionlessNumbersADR_sd, METH_VARARGS|METH_KEYWORDS, 0};
27660 static PyObject *__pyx_pw_13cfemIntegrals_235calculateDimensionlessNumbersADR_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
27661  int __pyx_v_nElements_global;
27662  int __pyx_v_nQuadraturePoints_element;
27663  int __pyx_v_nSpace;
27664  PyArrayObject *__pyx_v_rowptr = 0;
27665  PyArrayObject *__pyx_v_colind = 0;
27666  PyArrayObject *__pyx_v_elementDiameter = 0;
27667  PyArrayObject *__pyx_v_df = 0;
27668  PyArrayObject *__pyx_v_a = 0;
27669  PyArrayObject *__pyx_v_dphi = 0;
27670  PyArrayObject *__pyx_v_dr = 0;
27671  PyArrayObject *__pyx_v_dmt = 0;
27672  PyArrayObject *__pyx_v_pe = 0;
27673  PyArrayObject *__pyx_v_cfl = 0;
27674  int __pyx_lineno = 0;
27675  const char *__pyx_filename = NULL;
27676  int __pyx_clineno = 0;
27677  PyObject *__pyx_r = 0;
27678  __Pyx_RefNannyDeclarations
27679  __Pyx_RefNannySetupContext("calculateDimensionlessNumbersADR_sd (wrapper)", 0);
27680  {
27681  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nElements_global,&__pyx_n_s_nQuadraturePoints_element,&__pyx_n_s_nSpace,&__pyx_n_s_rowptr,&__pyx_n_s_colind,&__pyx_n_s_elementDiameter,&__pyx_n_s_df,&__pyx_n_s_a,&__pyx_n_s_dphi,&__pyx_n_s_dr,&__pyx_n_s_dmt,&__pyx_n_s_pe,&__pyx_n_s_cfl,0};
27682  PyObject* values[13] = {0,0,0,0,0,0,0,0,0,0,0,0,0};
27683  if (unlikely(__pyx_kwds)) {
27684  Py_ssize_t kw_args;
27685  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
27686  switch (pos_args) {
27687  case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
27688  CYTHON_FALLTHROUGH;
27689  case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
27690  CYTHON_FALLTHROUGH;
27691  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
27692  CYTHON_FALLTHROUGH;
27693  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
27694  CYTHON_FALLTHROUGH;
27695  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
27696  CYTHON_FALLTHROUGH;
27697  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
27698  CYTHON_FALLTHROUGH;
27699  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
27700  CYTHON_FALLTHROUGH;
27701  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
27702  CYTHON_FALLTHROUGH;
27703  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
27704  CYTHON_FALLTHROUGH;
27705  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
27706  CYTHON_FALLTHROUGH;
27707  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
27708  CYTHON_FALLTHROUGH;
27709  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
27710  CYTHON_FALLTHROUGH;
27711  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
27712  CYTHON_FALLTHROUGH;
27713  case 0: break;
27714  default: goto __pyx_L5_argtuple_error;
27715  }
27716  kw_args = PyDict_Size(__pyx_kwds);
27717  switch (pos_args) {
27718  case 0:
27719  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nElements_global)) != 0)) kw_args--;
27720  else goto __pyx_L5_argtuple_error;
27721  CYTHON_FALLTHROUGH;
27722  case 1:
27723  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nQuadraturePoints_element)) != 0)) kw_args--;
27724  else {
27725  __Pyx_RaiseArgtupleInvalid("calculateDimensionlessNumbersADR_sd", 1, 13, 13, 1); __PYX_ERR(0, 4794, __pyx_L3_error)
27726  }
27727  CYTHON_FALLTHROUGH;
27728  case 2:
27729  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nSpace)) != 0)) kw_args--;
27730  else {
27731  __Pyx_RaiseArgtupleInvalid("calculateDimensionlessNumbersADR_sd", 1, 13, 13, 2); __PYX_ERR(0, 4794, __pyx_L3_error)
27732  }
27733  CYTHON_FALLTHROUGH;
27734  case 3:
27735  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rowptr)) != 0)) kw_args--;
27736  else {
27737  __Pyx_RaiseArgtupleInvalid("calculateDimensionlessNumbersADR_sd", 1, 13, 13, 3); __PYX_ERR(0, 4794, __pyx_L3_error)
27738  }
27739  CYTHON_FALLTHROUGH;
27740  case 4:
27741  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_colind)) != 0)) kw_args--;
27742  else {
27743  __Pyx_RaiseArgtupleInvalid("calculateDimensionlessNumbersADR_sd", 1, 13, 13, 4); __PYX_ERR(0, 4794, __pyx_L3_error)
27744  }
27745  CYTHON_FALLTHROUGH;
27746  case 5:
27747  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementDiameter)) != 0)) kw_args--;
27748  else {
27749  __Pyx_RaiseArgtupleInvalid("calculateDimensionlessNumbersADR_sd", 1, 13, 13, 5); __PYX_ERR(0, 4794, __pyx_L3_error)
27750  }
27751  CYTHON_FALLTHROUGH;
27752  case 6:
27753  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_df)) != 0)) kw_args--;
27754  else {
27755  __Pyx_RaiseArgtupleInvalid("calculateDimensionlessNumbersADR_sd", 1, 13, 13, 6); __PYX_ERR(0, 4794, __pyx_L3_error)
27756  }
27757  CYTHON_FALLTHROUGH;
27758  case 7:
27759  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
27760  else {
27761  __Pyx_RaiseArgtupleInvalid("calculateDimensionlessNumbersADR_sd", 1, 13, 13, 7); __PYX_ERR(0, 4794, __pyx_L3_error)
27762  }
27763  CYTHON_FALLTHROUGH;
27764  case 8:
27765  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dphi)) != 0)) kw_args--;
27766  else {
27767  __Pyx_RaiseArgtupleInvalid("calculateDimensionlessNumbersADR_sd", 1, 13, 13, 8); __PYX_ERR(0, 4794, __pyx_L3_error)
27768  }
27769  CYTHON_FALLTHROUGH;
27770  case 9:
27771  if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dr)) != 0)) kw_args--;
27772  else {
27773  __Pyx_RaiseArgtupleInvalid("calculateDimensionlessNumbersADR_sd", 1, 13, 13, 9); __PYX_ERR(0, 4794, __pyx_L3_error)
27774  }
27775  CYTHON_FALLTHROUGH;
27776  case 10:
27777  if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dmt)) != 0)) kw_args--;
27778  else {
27779  __Pyx_RaiseArgtupleInvalid("calculateDimensionlessNumbersADR_sd", 1, 13, 13, 10); __PYX_ERR(0, 4794, __pyx_L3_error)
27780  }
27781  CYTHON_FALLTHROUGH;
27782  case 11:
27783  if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pe)) != 0)) kw_args--;
27784  else {
27785  __Pyx_RaiseArgtupleInvalid("calculateDimensionlessNumbersADR_sd", 1, 13, 13, 11); __PYX_ERR(0, 4794, __pyx_L3_error)
27786  }
27787  CYTHON_FALLTHROUGH;
27788  case 12:
27789  if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cfl)) != 0)) kw_args--;
27790  else {
27791  __Pyx_RaiseArgtupleInvalid("calculateDimensionlessNumbersADR_sd", 1, 13, 13, 12); __PYX_ERR(0, 4794, __pyx_L3_error)
27792  }
27793  }
27794  if (unlikely(kw_args > 0)) {
27795  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateDimensionlessNumbersADR_sd") < 0)) __PYX_ERR(0, 4794, __pyx_L3_error)
27796  }
27797  } else if (PyTuple_GET_SIZE(__pyx_args) != 13) {
27798  goto __pyx_L5_argtuple_error;
27799  } else {
27800  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
27801  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
27802  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
27803  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
27804  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
27805  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
27806  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
27807  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
27808  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
27809  values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
27810  values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
27811  values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
27812  values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
27813  }
27814  __pyx_v_nElements_global = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_nElements_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4794, __pyx_L3_error)
27815  __pyx_v_nQuadraturePoints_element = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_nQuadraturePoints_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4795, __pyx_L3_error)
27816  __pyx_v_nSpace = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_nSpace == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4796, __pyx_L3_error)
27817  __pyx_v_rowptr = ((PyArrayObject *)values[3]);
27818  __pyx_v_colind = ((PyArrayObject *)values[4]);
27819  __pyx_v_elementDiameter = ((PyArrayObject *)values[5]);
27820  __pyx_v_df = ((PyArrayObject *)values[6]);
27821  __pyx_v_a = ((PyArrayObject *)values[7]);
27822  __pyx_v_dphi = ((PyArrayObject *)values[8]);
27823  __pyx_v_dr = ((PyArrayObject *)values[9]);
27824  __pyx_v_dmt = ((PyArrayObject *)values[10]);
27825  __pyx_v_pe = ((PyArrayObject *)values[11]);
27826  __pyx_v_cfl = ((PyArrayObject *)values[12]);
27827  }
27828  goto __pyx_L4_argument_unpacking_done;
27829  __pyx_L5_argtuple_error:;
27830  __Pyx_RaiseArgtupleInvalid("calculateDimensionlessNumbersADR_sd", 1, 13, 13, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4794, __pyx_L3_error)
27831  __pyx_L3_error:;
27832  __Pyx_AddTraceback("cfemIntegrals.calculateDimensionlessNumbersADR_sd", __pyx_clineno, __pyx_lineno, __pyx_filename);
27833  __Pyx_RefNannyFinishContext();
27834  return NULL;
27835  __pyx_L4_argument_unpacking_done:;
27836  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rowptr), __pyx_ptype_5numpy_ndarray, 1, "rowptr", 0))) __PYX_ERR(0, 4797, __pyx_L1_error)
27837  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_colind), __pyx_ptype_5numpy_ndarray, 1, "colind", 0))) __PYX_ERR(0, 4798, __pyx_L1_error)
27838  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementDiameter), __pyx_ptype_5numpy_ndarray, 1, "elementDiameter", 0))) __PYX_ERR(0, 4799, __pyx_L1_error)
27839  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_df), __pyx_ptype_5numpy_ndarray, 1, "df", 0))) __PYX_ERR(0, 4800, __pyx_L1_error)
27840  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1, "a", 0))) __PYX_ERR(0, 4801, __pyx_L1_error)
27841  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dphi), __pyx_ptype_5numpy_ndarray, 1, "dphi", 0))) __PYX_ERR(0, 4802, __pyx_L1_error)
27842  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dr), __pyx_ptype_5numpy_ndarray, 1, "dr", 0))) __PYX_ERR(0, 4803, __pyx_L1_error)
27843  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dmt), __pyx_ptype_5numpy_ndarray, 1, "dmt", 0))) __PYX_ERR(0, 4804, __pyx_L1_error)
27844  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pe), __pyx_ptype_5numpy_ndarray, 1, "pe", 0))) __PYX_ERR(0, 4805, __pyx_L1_error)
27845  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cfl), __pyx_ptype_5numpy_ndarray, 1, "cfl", 0))) __PYX_ERR(0, 4806, __pyx_L1_error)
27846  __pyx_r = __pyx_pf_13cfemIntegrals_234calculateDimensionlessNumbersADR_sd(__pyx_self, __pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nSpace, __pyx_v_rowptr, __pyx_v_colind, __pyx_v_elementDiameter, __pyx_v_df, __pyx_v_a, __pyx_v_dphi, __pyx_v_dr, __pyx_v_dmt, __pyx_v_pe, __pyx_v_cfl);
27847 
27848  /* function exit code */
27849  goto __pyx_L0;
27850  __pyx_L1_error:;
27851  __pyx_r = NULL;
27852  __pyx_L0:;
27853  __Pyx_RefNannyFinishContext();
27854  return __pyx_r;
27855 }
27856 
27857 static PyObject *__pyx_pf_13cfemIntegrals_234calculateDimensionlessNumbersADR_sd(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nElements_global, int __pyx_v_nQuadraturePoints_element, int __pyx_v_nSpace, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_df, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_dphi, PyArrayObject *__pyx_v_dr, PyArrayObject *__pyx_v_dmt, PyArrayObject *__pyx_v_pe, PyArrayObject *__pyx_v_cfl) {
27858  int __pyx_v_computeDiffusiveTimeStepLimit;
27859  PyObject *__pyx_r = NULL;
27860  __Pyx_RefNannyDeclarations
27861  __Pyx_RefNannySetupContext("calculateDimensionlessNumbersADR_sd", 0);
27862 
27863  /* "cfemIntegrals.pyx":4807
27864  * np.ndarray pe,
27865  * np.ndarray cfl):
27866  * cdef int computeDiffusiveTimeStepLimit = 0 # <<<<<<<<<<<<<<
27867  * ccalculateDimensionlessNumbersADR_sd(nElements_global,
27868  * nQuadraturePoints_element,
27869  */
27870  __pyx_v_computeDiffusiveTimeStepLimit = 0;
27871 
27872  /* "cfemIntegrals.pyx":4808
27873  * np.ndarray cfl):
27874  * cdef int computeDiffusiveTimeStepLimit = 0
27875  * ccalculateDimensionlessNumbersADR_sd(nElements_global, # <<<<<<<<<<<<<<
27876  * nQuadraturePoints_element,
27877  * nSpace,
27878  */
27879  calculateDimensionlessNumbersADR_sd(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nSpace, __pyx_v_computeDiffusiveTimeStepLimit, ((int *)__pyx_v_rowptr->data), ((int *)__pyx_v_colind->data), ((double *)__pyx_v_elementDiameter->data), ((double *)__pyx_v_df->data), ((double *)__pyx_v_a->data), ((double *)__pyx_v_dphi->data), ((double *)__pyx_v_dr->data), ((double *)__pyx_v_dmt->data), ((double *)__pyx_v_pe->data), ((double *)__pyx_v_cfl->data));
27880 
27881  /* "cfemIntegrals.pyx":4794
27882  * <double*>pe.data,
27883  * <double*>cfl.data)
27884  * def calculateDimensionlessNumbersADR_sd(int nElements_global, # <<<<<<<<<<<<<<
27885  * int nQuadraturePoints_element,
27886  * int nSpace,
27887  */
27888 
27889  /* function exit code */
27890  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
27891  __Pyx_XGIVEREF(__pyx_r);
27892  __Pyx_RefNannyFinishContext();
27893  return __pyx_r;
27894 }
27895 
27896 /* "cfemIntegrals.pyx":4822
27897  * <double*> pe.data,
27898  * <double*> cfl.data)
27899  * def calculateCFLADR(np.ndarray elementDiameter, # <<<<<<<<<<<<<<
27900  * np.ndarray dm,
27901  * np.ndarray df,
27902  */
27903 
27904 /* Python wrapper */
27905 static PyObject *__pyx_pw_13cfemIntegrals_237calculateCFLADR(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
27906 static PyMethodDef __pyx_mdef_13cfemIntegrals_237calculateCFLADR = {"calculateCFLADR", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_237calculateCFLADR, METH_VARARGS|METH_KEYWORDS, 0};
27907 static PyObject *__pyx_pw_13cfemIntegrals_237calculateCFLADR(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
27908  PyArrayObject *__pyx_v_elementDiameter = 0;
27909  PyArrayObject *__pyx_v_dm = 0;
27910  PyArrayObject *__pyx_v_df = 0;
27911  PyArrayObject *__pyx_v_cfl = 0;
27912  int __pyx_lineno = 0;
27913  const char *__pyx_filename = NULL;
27914  int __pyx_clineno = 0;
27915  PyObject *__pyx_r = 0;
27916  __Pyx_RefNannyDeclarations
27917  __Pyx_RefNannySetupContext("calculateCFLADR (wrapper)", 0);
27918  {
27919  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_elementDiameter,&__pyx_n_s_dm,&__pyx_n_s_df,&__pyx_n_s_cfl,0};
27920  PyObject* values[4] = {0,0,0,0};
27921  if (unlikely(__pyx_kwds)) {
27922  Py_ssize_t kw_args;
27923  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
27924  switch (pos_args) {
27925  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
27926  CYTHON_FALLTHROUGH;
27927  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
27928  CYTHON_FALLTHROUGH;
27929  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
27930  CYTHON_FALLTHROUGH;
27931  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
27932  CYTHON_FALLTHROUGH;
27933  case 0: break;
27934  default: goto __pyx_L5_argtuple_error;
27935  }
27936  kw_args = PyDict_Size(__pyx_kwds);
27937  switch (pos_args) {
27938  case 0:
27939  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementDiameter)) != 0)) kw_args--;
27940  else goto __pyx_L5_argtuple_error;
27941  CYTHON_FALLTHROUGH;
27942  case 1:
27943  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dm)) != 0)) kw_args--;
27944  else {
27945  __Pyx_RaiseArgtupleInvalid("calculateCFLADR", 1, 4, 4, 1); __PYX_ERR(0, 4822, __pyx_L3_error)
27946  }
27947  CYTHON_FALLTHROUGH;
27948  case 2:
27949  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_df)) != 0)) kw_args--;
27950  else {
27951  __Pyx_RaiseArgtupleInvalid("calculateCFLADR", 1, 4, 4, 2); __PYX_ERR(0, 4822, __pyx_L3_error)
27952  }
27953  CYTHON_FALLTHROUGH;
27954  case 3:
27955  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cfl)) != 0)) kw_args--;
27956  else {
27957  __Pyx_RaiseArgtupleInvalid("calculateCFLADR", 1, 4, 4, 3); __PYX_ERR(0, 4822, __pyx_L3_error)
27958  }
27959  }
27960  if (unlikely(kw_args > 0)) {
27961  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateCFLADR") < 0)) __PYX_ERR(0, 4822, __pyx_L3_error)
27962  }
27963  } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
27964  goto __pyx_L5_argtuple_error;
27965  } else {
27966  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
27967  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
27968  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
27969  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
27970  }
27971  __pyx_v_elementDiameter = ((PyArrayObject *)values[0]);
27972  __pyx_v_dm = ((PyArrayObject *)values[1]);
27973  __pyx_v_df = ((PyArrayObject *)values[2]);
27974  __pyx_v_cfl = ((PyArrayObject *)values[3]);
27975  }
27976  goto __pyx_L4_argument_unpacking_done;
27977  __pyx_L5_argtuple_error:;
27978  __Pyx_RaiseArgtupleInvalid("calculateCFLADR", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4822, __pyx_L3_error)
27979  __pyx_L3_error:;
27980  __Pyx_AddTraceback("cfemIntegrals.calculateCFLADR", __pyx_clineno, __pyx_lineno, __pyx_filename);
27981  __Pyx_RefNannyFinishContext();
27982  return NULL;
27983  __pyx_L4_argument_unpacking_done:;
27984  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementDiameter), __pyx_ptype_5numpy_ndarray, 1, "elementDiameter", 0))) __PYX_ERR(0, 4822, __pyx_L1_error)
27985  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dm), __pyx_ptype_5numpy_ndarray, 1, "dm", 0))) __PYX_ERR(0, 4823, __pyx_L1_error)
27986  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_df), __pyx_ptype_5numpy_ndarray, 1, "df", 0))) __PYX_ERR(0, 4824, __pyx_L1_error)
27987  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cfl), __pyx_ptype_5numpy_ndarray, 1, "cfl", 0))) __PYX_ERR(0, 4825, __pyx_L1_error)
27988  __pyx_r = __pyx_pf_13cfemIntegrals_236calculateCFLADR(__pyx_self, __pyx_v_elementDiameter, __pyx_v_dm, __pyx_v_df, __pyx_v_cfl);
27989 
27990  /* function exit code */
27991  goto __pyx_L0;
27992  __pyx_L1_error:;
27993  __pyx_r = NULL;
27994  __pyx_L0:;
27995  __Pyx_RefNannyFinishContext();
27996  return __pyx_r;
27997 }
27998 
27999 static PyObject *__pyx_pf_13cfemIntegrals_236calculateCFLADR(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_dm, PyArrayObject *__pyx_v_df, PyArrayObject *__pyx_v_cfl) {
28000  int __pyx_v_nElements_global;
28001  int __pyx_v_nQuadraturePoints_element;
28002  int __pyx_v_nSpace;
28003  PyObject *__pyx_r = NULL;
28004  __Pyx_RefNannyDeclarations
28005  __Pyx_RefNannySetupContext("calculateCFLADR", 0);
28006 
28007  /* "cfemIntegrals.pyx":4826
28008  * np.ndarray df,
28009  * np.ndarray cfl):
28010  * cdef int nElements_global = df.shape[0] # <<<<<<<<<<<<<<
28011  * cdef int nQuadraturePoints_element = df.shape[1]
28012  * cdef int nSpace = df.shape[2]
28013  */
28014  __pyx_v_nElements_global = (__pyx_v_df->dimensions[0]);
28015 
28016  /* "cfemIntegrals.pyx":4827
28017  * np.ndarray cfl):
28018  * cdef int nElements_global = df.shape[0]
28019  * cdef int nQuadraturePoints_element = df.shape[1] # <<<<<<<<<<<<<<
28020  * cdef int nSpace = df.shape[2]
28021  * ccalculateCFLADR(nElements_global,
28022  */
28023  __pyx_v_nQuadraturePoints_element = (__pyx_v_df->dimensions[1]);
28024 
28025  /* "cfemIntegrals.pyx":4828
28026  * cdef int nElements_global = df.shape[0]
28027  * cdef int nQuadraturePoints_element = df.shape[1]
28028  * cdef int nSpace = df.shape[2] # <<<<<<<<<<<<<<
28029  * ccalculateCFLADR(nElements_global,
28030  * nQuadraturePoints_element,
28031  */
28032  __pyx_v_nSpace = (__pyx_v_df->dimensions[2]);
28033 
28034  /* "cfemIntegrals.pyx":4829
28035  * cdef int nQuadraturePoints_element = df.shape[1]
28036  * cdef int nSpace = df.shape[2]
28037  * ccalculateCFLADR(nElements_global, # <<<<<<<<<<<<<<
28038  * nQuadraturePoints_element,
28039  * nSpace,
28040  */
28041  calculateCFLADR(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nSpace, ((double *)__pyx_v_elementDiameter->data), ((double *)__pyx_v_dm->data), ((double *)__pyx_v_df->data), ((double *)__pyx_v_cfl->data));
28042 
28043  /* "cfemIntegrals.pyx":4822
28044  * <double*> pe.data,
28045  * <double*> cfl.data)
28046  * def calculateCFLADR(np.ndarray elementDiameter, # <<<<<<<<<<<<<<
28047  * np.ndarray dm,
28048  * np.ndarray df,
28049  */
28050 
28051  /* function exit code */
28052  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
28053  __Pyx_XGIVEREF(__pyx_r);
28054  __Pyx_RefNannyFinishContext();
28055  return __pyx_r;
28056 }
28057 
28058 /* "cfemIntegrals.pyx":4836
28059  * <double*>df.data,
28060  * <double*>cfl.data)
28061  * def updateInteriorElementBoundaryDiffusiveVelocity(np.ndarray interiorElementBoundaries, # <<<<<<<<<<<<<<
28062  * np.ndarray elementBoundaryElements,
28063  * np.ndarray elementBoundaryLocalElementBoundaries,
28064  */
28065 
28066 /* Python wrapper */
28067 static PyObject *__pyx_pw_13cfemIntegrals_239updateInteriorElementBoundaryDiffusiveVelocity(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
28068 static PyMethodDef __pyx_mdef_13cfemIntegrals_239updateInteriorElementBoundaryDiffusiveVelocity = {"updateInteriorElementBoundaryDiffusiveVelocity", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_239updateInteriorElementBoundaryDiffusiveVelocity, METH_VARARGS|METH_KEYWORDS, 0};
28069 static PyObject *__pyx_pw_13cfemIntegrals_239updateInteriorElementBoundaryDiffusiveVelocity(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
28070  PyArrayObject *__pyx_v_interiorElementBoundaries = 0;
28071  PyArrayObject *__pyx_v_elementBoundaryElements = 0;
28072  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries = 0;
28073  PyArrayObject *__pyx_v_a = 0;
28074  PyArrayObject *__pyx_v_grad_phi = 0;
28075  PyArrayObject *__pyx_v_velocity = 0;
28076  int __pyx_lineno = 0;
28077  const char *__pyx_filename = NULL;
28078  int __pyx_clineno = 0;
28079  PyObject *__pyx_r = 0;
28080  __Pyx_RefNannyDeclarations
28081  __Pyx_RefNannySetupContext("updateInteriorElementBoundaryDiffusiveVelocity (wrapper)", 0);
28082  {
28083  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_interiorElementBoundaries,&__pyx_n_s_elementBoundaryElements,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_a,&__pyx_n_s_grad_phi,&__pyx_n_s_velocity,0};
28084  PyObject* values[6] = {0,0,0,0,0,0};
28085  if (unlikely(__pyx_kwds)) {
28086  Py_ssize_t kw_args;
28087  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
28088  switch (pos_args) {
28089  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
28090  CYTHON_FALLTHROUGH;
28091  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
28092  CYTHON_FALLTHROUGH;
28093  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
28094  CYTHON_FALLTHROUGH;
28095  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
28096  CYTHON_FALLTHROUGH;
28097  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
28098  CYTHON_FALLTHROUGH;
28099  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
28100  CYTHON_FALLTHROUGH;
28101  case 0: break;
28102  default: goto __pyx_L5_argtuple_error;
28103  }
28104  kw_args = PyDict_Size(__pyx_kwds);
28105  switch (pos_args) {
28106  case 0:
28107  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_interiorElementBoundaries)) != 0)) kw_args--;
28108  else goto __pyx_L5_argtuple_error;
28109  CYTHON_FALLTHROUGH;
28110  case 1:
28111  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElements)) != 0)) kw_args--;
28112  else {
28113  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundaryDiffusiveVelocity", 1, 6, 6, 1); __PYX_ERR(0, 4836, __pyx_L3_error)
28114  }
28115  CYTHON_FALLTHROUGH;
28116  case 2:
28117  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
28118  else {
28119  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundaryDiffusiveVelocity", 1, 6, 6, 2); __PYX_ERR(0, 4836, __pyx_L3_error)
28120  }
28121  CYTHON_FALLTHROUGH;
28122  case 3:
28123  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
28124  else {
28125  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundaryDiffusiveVelocity", 1, 6, 6, 3); __PYX_ERR(0, 4836, __pyx_L3_error)
28126  }
28127  CYTHON_FALLTHROUGH;
28128  case 4:
28129  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_phi)) != 0)) kw_args--;
28130  else {
28131  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundaryDiffusiveVelocity", 1, 6, 6, 4); __PYX_ERR(0, 4836, __pyx_L3_error)
28132  }
28133  CYTHON_FALLTHROUGH;
28134  case 5:
28135  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_velocity)) != 0)) kw_args--;
28136  else {
28137  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundaryDiffusiveVelocity", 1, 6, 6, 5); __PYX_ERR(0, 4836, __pyx_L3_error)
28138  }
28139  }
28140  if (unlikely(kw_args > 0)) {
28141  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateInteriorElementBoundaryDiffusiveVelocity") < 0)) __PYX_ERR(0, 4836, __pyx_L3_error)
28142  }
28143  } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
28144  goto __pyx_L5_argtuple_error;
28145  } else {
28146  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
28147  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
28148  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
28149  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
28150  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
28151  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
28152  }
28153  __pyx_v_interiorElementBoundaries = ((PyArrayObject *)values[0]);
28154  __pyx_v_elementBoundaryElements = ((PyArrayObject *)values[1]);
28155  __pyx_v_elementBoundaryLocalElementBoundaries = ((PyArrayObject *)values[2]);
28156  __pyx_v_a = ((PyArrayObject *)values[3]);
28157  __pyx_v_grad_phi = ((PyArrayObject *)values[4]);
28158  __pyx_v_velocity = ((PyArrayObject *)values[5]);
28159  }
28160  goto __pyx_L4_argument_unpacking_done;
28161  __pyx_L5_argtuple_error:;
28162  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundaryDiffusiveVelocity", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4836, __pyx_L3_error)
28163  __pyx_L3_error:;
28164  __Pyx_AddTraceback("cfemIntegrals.updateInteriorElementBoundaryDiffusiveVelocity", __pyx_clineno, __pyx_lineno, __pyx_filename);
28165  __Pyx_RefNannyFinishContext();
28166  return NULL;
28167  __pyx_L4_argument_unpacking_done:;
28168  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_interiorElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "interiorElementBoundaries", 0))) __PYX_ERR(0, 4836, __pyx_L1_error)
28169  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElements), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElements", 0))) __PYX_ERR(0, 4837, __pyx_L1_error)
28170  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundaries", 0))) __PYX_ERR(0, 4838, __pyx_L1_error)
28171  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1, "a", 0))) __PYX_ERR(0, 4839, __pyx_L1_error)
28172  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_phi), __pyx_ptype_5numpy_ndarray, 1, "grad_phi", 0))) __PYX_ERR(0, 4840, __pyx_L1_error)
28173  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_velocity), __pyx_ptype_5numpy_ndarray, 1, "velocity", 0))) __PYX_ERR(0, 4841, __pyx_L1_error)
28174  __pyx_r = __pyx_pf_13cfemIntegrals_238updateInteriorElementBoundaryDiffusiveVelocity(__pyx_self, __pyx_v_interiorElementBoundaries, __pyx_v_elementBoundaryElements, __pyx_v_elementBoundaryLocalElementBoundaries, __pyx_v_a, __pyx_v_grad_phi, __pyx_v_velocity);
28175 
28176  /* function exit code */
28177  goto __pyx_L0;
28178  __pyx_L1_error:;
28179  __pyx_r = NULL;
28180  __pyx_L0:;
28181  __Pyx_RefNannyFinishContext();
28182  return __pyx_r;
28183 }
28184 
28185 static PyObject *__pyx_pf_13cfemIntegrals_238updateInteriorElementBoundaryDiffusiveVelocity(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_interiorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_grad_phi, PyArrayObject *__pyx_v_velocity) {
28186  int __pyx_v_nInteriorElementBoundaries_global;
28187  int __pyx_v_nElementBoundaries_element;
28188  int __pyx_v_nQuadraturePoints_elementBoundary;
28189  int __pyx_v_nSpace;
28190  PyObject *__pyx_r = NULL;
28191  __Pyx_RefNannyDeclarations
28192  __Pyx_RefNannySetupContext("updateInteriorElementBoundaryDiffusiveVelocity", 0);
28193 
28194  /* "cfemIntegrals.pyx":4842
28195  * np.ndarray grad_phi,
28196  * np.ndarray velocity):
28197  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0] # <<<<<<<<<<<<<<
28198  * cdef int nElementBoundaries_element = grad_phi.shape[1]
28199  * cdef int nQuadraturePoints_elementBoundary = grad_phi.shape[2]
28200  */
28201  __pyx_v_nInteriorElementBoundaries_global = (__pyx_v_interiorElementBoundaries->dimensions[0]);
28202 
28203  /* "cfemIntegrals.pyx":4843
28204  * np.ndarray velocity):
28205  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0]
28206  * cdef int nElementBoundaries_element = grad_phi.shape[1] # <<<<<<<<<<<<<<
28207  * cdef int nQuadraturePoints_elementBoundary = grad_phi.shape[2]
28208  * cdef int nSpace = grad_phi.shape[3]
28209  */
28210  __pyx_v_nElementBoundaries_element = (__pyx_v_grad_phi->dimensions[1]);
28211 
28212  /* "cfemIntegrals.pyx":4844
28213  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0]
28214  * cdef int nElementBoundaries_element = grad_phi.shape[1]
28215  * cdef int nQuadraturePoints_elementBoundary = grad_phi.shape[2] # <<<<<<<<<<<<<<
28216  * cdef int nSpace = grad_phi.shape[3]
28217  * cupdateInteriorElementBoundaryDiffusiveVelocity(nInteriorElementBoundaries_global,
28218  */
28219  __pyx_v_nQuadraturePoints_elementBoundary = (__pyx_v_grad_phi->dimensions[2]);
28220 
28221  /* "cfemIntegrals.pyx":4845
28222  * cdef int nElementBoundaries_element = grad_phi.shape[1]
28223  * cdef int nQuadraturePoints_elementBoundary = grad_phi.shape[2]
28224  * cdef int nSpace = grad_phi.shape[3] # <<<<<<<<<<<<<<
28225  * cupdateInteriorElementBoundaryDiffusiveVelocity(nInteriorElementBoundaries_global,
28226  * nElementBoundaries_element,
28227  */
28228  __pyx_v_nSpace = (__pyx_v_grad_phi->dimensions[3]);
28229 
28230  /* "cfemIntegrals.pyx":4846
28231  * cdef int nQuadraturePoints_elementBoundary = grad_phi.shape[2]
28232  * cdef int nSpace = grad_phi.shape[3]
28233  * cupdateInteriorElementBoundaryDiffusiveVelocity(nInteriorElementBoundaries_global, # <<<<<<<<<<<<<<
28234  * nElementBoundaries_element,
28235  * nQuadraturePoints_elementBoundary,
28236  */
28237  updateInteriorElementBoundaryDiffusiveVelocity(__pyx_v_nInteriorElementBoundaries_global, __pyx_v_nElementBoundaries_element, __pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nSpace, ((int *)__pyx_v_interiorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), ((double *)__pyx_v_a->data), ((double *)__pyx_v_grad_phi->data), ((double *)__pyx_v_velocity->data));
28238 
28239  /* "cfemIntegrals.pyx":4836
28240  * <double*>df.data,
28241  * <double*>cfl.data)
28242  * def updateInteriorElementBoundaryDiffusiveVelocity(np.ndarray interiorElementBoundaries, # <<<<<<<<<<<<<<
28243  * np.ndarray elementBoundaryElements,
28244  * np.ndarray elementBoundaryLocalElementBoundaries,
28245  */
28246 
28247  /* function exit code */
28248  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
28249  __Pyx_XGIVEREF(__pyx_r);
28250  __Pyx_RefNannyFinishContext();
28251  return __pyx_r;
28252 }
28253 
28254 /* "cfemIntegrals.pyx":4856
28255  * <double*>grad_phi.data,
28256  * <double*>velocity.data)
28257  * def updateInteriorElementBoundaryDiffusiveVelocity_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
28258  * np.ndarray colind,
28259  * np.ndarray interiorElementBoundaries,
28260  */
28261 
28262 /* Python wrapper */
28263 static PyObject *__pyx_pw_13cfemIntegrals_241updateInteriorElementBoundaryDiffusiveVelocity_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
28264 static PyMethodDef __pyx_mdef_13cfemIntegrals_241updateInteriorElementBoundaryDiffusiveVelocity_sd = {"updateInteriorElementBoundaryDiffusiveVelocity_sd", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_241updateInteriorElementBoundaryDiffusiveVelocity_sd, METH_VARARGS|METH_KEYWORDS, 0};
28265 static PyObject *__pyx_pw_13cfemIntegrals_241updateInteriorElementBoundaryDiffusiveVelocity_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
28266  PyArrayObject *__pyx_v_rowptr = 0;
28267  PyArrayObject *__pyx_v_colind = 0;
28268  PyArrayObject *__pyx_v_interiorElementBoundaries = 0;
28269  PyArrayObject *__pyx_v_elementBoundaryElements = 0;
28270  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries = 0;
28271  PyArrayObject *__pyx_v_a = 0;
28272  PyArrayObject *__pyx_v_grad_phi = 0;
28273  PyArrayObject *__pyx_v_velocity = 0;
28274  int __pyx_lineno = 0;
28275  const char *__pyx_filename = NULL;
28276  int __pyx_clineno = 0;
28277  PyObject *__pyx_r = 0;
28278  __Pyx_RefNannyDeclarations
28279  __Pyx_RefNannySetupContext("updateInteriorElementBoundaryDiffusiveVelocity_sd (wrapper)", 0);
28280  {
28281  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rowptr,&__pyx_n_s_colind,&__pyx_n_s_interiorElementBoundaries,&__pyx_n_s_elementBoundaryElements,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_a,&__pyx_n_s_grad_phi,&__pyx_n_s_velocity,0};
28282  PyObject* values[8] = {0,0,0,0,0,0,0,0};
28283  if (unlikely(__pyx_kwds)) {
28284  Py_ssize_t kw_args;
28285  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
28286  switch (pos_args) {
28287  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
28288  CYTHON_FALLTHROUGH;
28289  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
28290  CYTHON_FALLTHROUGH;
28291  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
28292  CYTHON_FALLTHROUGH;
28293  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
28294  CYTHON_FALLTHROUGH;
28295  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
28296  CYTHON_FALLTHROUGH;
28297  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
28298  CYTHON_FALLTHROUGH;
28299  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
28300  CYTHON_FALLTHROUGH;
28301  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
28302  CYTHON_FALLTHROUGH;
28303  case 0: break;
28304  default: goto __pyx_L5_argtuple_error;
28305  }
28306  kw_args = PyDict_Size(__pyx_kwds);
28307  switch (pos_args) {
28308  case 0:
28309  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rowptr)) != 0)) kw_args--;
28310  else goto __pyx_L5_argtuple_error;
28311  CYTHON_FALLTHROUGH;
28312  case 1:
28313  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_colind)) != 0)) kw_args--;
28314  else {
28315  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundaryDiffusiveVelocity_sd", 1, 8, 8, 1); __PYX_ERR(0, 4856, __pyx_L3_error)
28316  }
28317  CYTHON_FALLTHROUGH;
28318  case 2:
28319  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_interiorElementBoundaries)) != 0)) kw_args--;
28320  else {
28321  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundaryDiffusiveVelocity_sd", 1, 8, 8, 2); __PYX_ERR(0, 4856, __pyx_L3_error)
28322  }
28323  CYTHON_FALLTHROUGH;
28324  case 3:
28325  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElements)) != 0)) kw_args--;
28326  else {
28327  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundaryDiffusiveVelocity_sd", 1, 8, 8, 3); __PYX_ERR(0, 4856, __pyx_L3_error)
28328  }
28329  CYTHON_FALLTHROUGH;
28330  case 4:
28331  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
28332  else {
28333  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundaryDiffusiveVelocity_sd", 1, 8, 8, 4); __PYX_ERR(0, 4856, __pyx_L3_error)
28334  }
28335  CYTHON_FALLTHROUGH;
28336  case 5:
28337  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
28338  else {
28339  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundaryDiffusiveVelocity_sd", 1, 8, 8, 5); __PYX_ERR(0, 4856, __pyx_L3_error)
28340  }
28341  CYTHON_FALLTHROUGH;
28342  case 6:
28343  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_phi)) != 0)) kw_args--;
28344  else {
28345  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundaryDiffusiveVelocity_sd", 1, 8, 8, 6); __PYX_ERR(0, 4856, __pyx_L3_error)
28346  }
28347  CYTHON_FALLTHROUGH;
28348  case 7:
28349  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_velocity)) != 0)) kw_args--;
28350  else {
28351  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundaryDiffusiveVelocity_sd", 1, 8, 8, 7); __PYX_ERR(0, 4856, __pyx_L3_error)
28352  }
28353  }
28354  if (unlikely(kw_args > 0)) {
28355  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateInteriorElementBoundaryDiffusiveVelocity_sd") < 0)) __PYX_ERR(0, 4856, __pyx_L3_error)
28356  }
28357  } else if (PyTuple_GET_SIZE(__pyx_args) != 8) {
28358  goto __pyx_L5_argtuple_error;
28359  } else {
28360  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
28361  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
28362  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
28363  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
28364  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
28365  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
28366  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
28367  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
28368  }
28369  __pyx_v_rowptr = ((PyArrayObject *)values[0]);
28370  __pyx_v_colind = ((PyArrayObject *)values[1]);
28371  __pyx_v_interiorElementBoundaries = ((PyArrayObject *)values[2]);
28372  __pyx_v_elementBoundaryElements = ((PyArrayObject *)values[3]);
28373  __pyx_v_elementBoundaryLocalElementBoundaries = ((PyArrayObject *)values[4]);
28374  __pyx_v_a = ((PyArrayObject *)values[5]);
28375  __pyx_v_grad_phi = ((PyArrayObject *)values[6]);
28376  __pyx_v_velocity = ((PyArrayObject *)values[7]);
28377  }
28378  goto __pyx_L4_argument_unpacking_done;
28379  __pyx_L5_argtuple_error:;
28380  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundaryDiffusiveVelocity_sd", 1, 8, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4856, __pyx_L3_error)
28381  __pyx_L3_error:;
28382  __Pyx_AddTraceback("cfemIntegrals.updateInteriorElementBoundaryDiffusiveVelocity_sd", __pyx_clineno, __pyx_lineno, __pyx_filename);
28383  __Pyx_RefNannyFinishContext();
28384  return NULL;
28385  __pyx_L4_argument_unpacking_done:;
28386  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rowptr), __pyx_ptype_5numpy_ndarray, 1, "rowptr", 0))) __PYX_ERR(0, 4856, __pyx_L1_error)
28387  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_colind), __pyx_ptype_5numpy_ndarray, 1, "colind", 0))) __PYX_ERR(0, 4857, __pyx_L1_error)
28388  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_interiorElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "interiorElementBoundaries", 0))) __PYX_ERR(0, 4858, __pyx_L1_error)
28389  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElements), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElements", 0))) __PYX_ERR(0, 4859, __pyx_L1_error)
28390  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundaries", 0))) __PYX_ERR(0, 4860, __pyx_L1_error)
28391  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1, "a", 0))) __PYX_ERR(0, 4861, __pyx_L1_error)
28392  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_phi), __pyx_ptype_5numpy_ndarray, 1, "grad_phi", 0))) __PYX_ERR(0, 4862, __pyx_L1_error)
28393  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_velocity), __pyx_ptype_5numpy_ndarray, 1, "velocity", 0))) __PYX_ERR(0, 4863, __pyx_L1_error)
28394  __pyx_r = __pyx_pf_13cfemIntegrals_240updateInteriorElementBoundaryDiffusiveVelocity_sd(__pyx_self, __pyx_v_rowptr, __pyx_v_colind, __pyx_v_interiorElementBoundaries, __pyx_v_elementBoundaryElements, __pyx_v_elementBoundaryLocalElementBoundaries, __pyx_v_a, __pyx_v_grad_phi, __pyx_v_velocity);
28395 
28396  /* function exit code */
28397  goto __pyx_L0;
28398  __pyx_L1_error:;
28399  __pyx_r = NULL;
28400  __pyx_L0:;
28401  __Pyx_RefNannyFinishContext();
28402  return __pyx_r;
28403 }
28404 
28405 static PyObject *__pyx_pf_13cfemIntegrals_240updateInteriorElementBoundaryDiffusiveVelocity_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_interiorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_grad_phi, PyArrayObject *__pyx_v_velocity) {
28406  int __pyx_v_nInteriorElementBoundaries_global;
28407  int __pyx_v_nElementBoundaries_element;
28408  int __pyx_v_nQuadraturePoints_elementBoundary;
28409  int __pyx_v_nSpace;
28410  PyObject *__pyx_r = NULL;
28411  __Pyx_RefNannyDeclarations
28412  __Pyx_RefNannySetupContext("updateInteriorElementBoundaryDiffusiveVelocity_sd", 0);
28413 
28414  /* "cfemIntegrals.pyx":4864
28415  * np.ndarray grad_phi,
28416  * np.ndarray velocity):
28417  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0] # <<<<<<<<<<<<<<
28418  * cdef int nElementBoundaries_element = grad_phi.shape[1]
28419  * cdef int nQuadraturePoints_elementBoundary = grad_phi.shape[2]
28420  */
28421  __pyx_v_nInteriorElementBoundaries_global = (__pyx_v_interiorElementBoundaries->dimensions[0]);
28422 
28423  /* "cfemIntegrals.pyx":4865
28424  * np.ndarray velocity):
28425  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0]
28426  * cdef int nElementBoundaries_element = grad_phi.shape[1] # <<<<<<<<<<<<<<
28427  * cdef int nQuadraturePoints_elementBoundary = grad_phi.shape[2]
28428  * cdef int nSpace = grad_phi.shape[3]
28429  */
28430  __pyx_v_nElementBoundaries_element = (__pyx_v_grad_phi->dimensions[1]);
28431 
28432  /* "cfemIntegrals.pyx":4866
28433  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0]
28434  * cdef int nElementBoundaries_element = grad_phi.shape[1]
28435  * cdef int nQuadraturePoints_elementBoundary = grad_phi.shape[2] # <<<<<<<<<<<<<<
28436  * cdef int nSpace = grad_phi.shape[3]
28437  * cupdateInteriorElementBoundaryDiffusiveVelocity_sd(nInteriorElementBoundaries_global,
28438  */
28439  __pyx_v_nQuadraturePoints_elementBoundary = (__pyx_v_grad_phi->dimensions[2]);
28440 
28441  /* "cfemIntegrals.pyx":4867
28442  * cdef int nElementBoundaries_element = grad_phi.shape[1]
28443  * cdef int nQuadraturePoints_elementBoundary = grad_phi.shape[2]
28444  * cdef int nSpace = grad_phi.shape[3] # <<<<<<<<<<<<<<
28445  * cupdateInteriorElementBoundaryDiffusiveVelocity_sd(nInteriorElementBoundaries_global,
28446  * nElementBoundaries_element,
28447  */
28448  __pyx_v_nSpace = (__pyx_v_grad_phi->dimensions[3]);
28449 
28450  /* "cfemIntegrals.pyx":4868
28451  * cdef int nQuadraturePoints_elementBoundary = grad_phi.shape[2]
28452  * cdef int nSpace = grad_phi.shape[3]
28453  * cupdateInteriorElementBoundaryDiffusiveVelocity_sd(nInteriorElementBoundaries_global, # <<<<<<<<<<<<<<
28454  * nElementBoundaries_element,
28455  * nQuadraturePoints_elementBoundary,
28456  */
28457  updateInteriorElementBoundaryDiffusiveVelocity_sd(__pyx_v_nInteriorElementBoundaries_global, __pyx_v_nElementBoundaries_element, __pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nSpace, ((int *)__pyx_v_rowptr->data), ((int *)__pyx_v_colind->data), ((int *)__pyx_v_interiorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), ((double *)__pyx_v_a->data), ((double *)__pyx_v_grad_phi->data), ((double *)__pyx_v_velocity->data));
28458 
28459  /* "cfemIntegrals.pyx":4856
28460  * <double*>grad_phi.data,
28461  * <double*>velocity.data)
28462  * def updateInteriorElementBoundaryDiffusiveVelocity_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
28463  * np.ndarray colind,
28464  * np.ndarray interiorElementBoundaries,
28465  */
28466 
28467  /* function exit code */
28468  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
28469  __Pyx_XGIVEREF(__pyx_r);
28470  __Pyx_RefNannyFinishContext();
28471  return __pyx_r;
28472 }
28473 
28474 /* "cfemIntegrals.pyx":4880
28475  * <double*> grad_phi.data,
28476  * <double*> velocity.data)
28477  * def updateExteriorElementBoundaryDiffusiveVelocity(np.ndarray exteriorElementBoundaries, # <<<<<<<<<<<<<<
28478  * np.ndarray elementBoundaryElements,
28479  * np.ndarray elementBoundaryLocalElementBoundaries,
28480  */
28481 
28482 /* Python wrapper */
28483 static PyObject *__pyx_pw_13cfemIntegrals_243updateExteriorElementBoundaryDiffusiveVelocity(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
28484 static PyMethodDef __pyx_mdef_13cfemIntegrals_243updateExteriorElementBoundaryDiffusiveVelocity = {"updateExteriorElementBoundaryDiffusiveVelocity", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_243updateExteriorElementBoundaryDiffusiveVelocity, METH_VARARGS|METH_KEYWORDS, 0};
28485 static PyObject *__pyx_pw_13cfemIntegrals_243updateExteriorElementBoundaryDiffusiveVelocity(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
28486  PyArrayObject *__pyx_v_exteriorElementBoundaries = 0;
28487  PyArrayObject *__pyx_v_elementBoundaryElements = 0;
28488  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries = 0;
28489  PyArrayObject *__pyx_v_a = 0;
28490  PyArrayObject *__pyx_v_grad_phi = 0;
28491  PyArrayObject *__pyx_v_velocity = 0;
28492  int __pyx_lineno = 0;
28493  const char *__pyx_filename = NULL;
28494  int __pyx_clineno = 0;
28495  PyObject *__pyx_r = 0;
28496  __Pyx_RefNannyDeclarations
28497  __Pyx_RefNannySetupContext("updateExteriorElementBoundaryDiffusiveVelocity (wrapper)", 0);
28498  {
28499  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exteriorElementBoundaries,&__pyx_n_s_elementBoundaryElements,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_a,&__pyx_n_s_grad_phi,&__pyx_n_s_velocity,0};
28500  PyObject* values[6] = {0,0,0,0,0,0};
28501  if (unlikely(__pyx_kwds)) {
28502  Py_ssize_t kw_args;
28503  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
28504  switch (pos_args) {
28505  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
28506  CYTHON_FALLTHROUGH;
28507  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
28508  CYTHON_FALLTHROUGH;
28509  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
28510  CYTHON_FALLTHROUGH;
28511  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
28512  CYTHON_FALLTHROUGH;
28513  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
28514  CYTHON_FALLTHROUGH;
28515  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
28516  CYTHON_FALLTHROUGH;
28517  case 0: break;
28518  default: goto __pyx_L5_argtuple_error;
28519  }
28520  kw_args = PyDict_Size(__pyx_kwds);
28521  switch (pos_args) {
28522  case 0:
28523  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exteriorElementBoundaries)) != 0)) kw_args--;
28524  else goto __pyx_L5_argtuple_error;
28525  CYTHON_FALLTHROUGH;
28526  case 1:
28527  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElements)) != 0)) kw_args--;
28528  else {
28529  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundaryDiffusiveVelocity", 1, 6, 6, 1); __PYX_ERR(0, 4880, __pyx_L3_error)
28530  }
28531  CYTHON_FALLTHROUGH;
28532  case 2:
28533  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
28534  else {
28535  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundaryDiffusiveVelocity", 1, 6, 6, 2); __PYX_ERR(0, 4880, __pyx_L3_error)
28536  }
28537  CYTHON_FALLTHROUGH;
28538  case 3:
28539  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
28540  else {
28541  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundaryDiffusiveVelocity", 1, 6, 6, 3); __PYX_ERR(0, 4880, __pyx_L3_error)
28542  }
28543  CYTHON_FALLTHROUGH;
28544  case 4:
28545  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_phi)) != 0)) kw_args--;
28546  else {
28547  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundaryDiffusiveVelocity", 1, 6, 6, 4); __PYX_ERR(0, 4880, __pyx_L3_error)
28548  }
28549  CYTHON_FALLTHROUGH;
28550  case 5:
28551  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_velocity)) != 0)) kw_args--;
28552  else {
28553  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundaryDiffusiveVelocity", 1, 6, 6, 5); __PYX_ERR(0, 4880, __pyx_L3_error)
28554  }
28555  }
28556  if (unlikely(kw_args > 0)) {
28557  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateExteriorElementBoundaryDiffusiveVelocity") < 0)) __PYX_ERR(0, 4880, __pyx_L3_error)
28558  }
28559  } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
28560  goto __pyx_L5_argtuple_error;
28561  } else {
28562  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
28563  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
28564  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
28565  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
28566  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
28567  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
28568  }
28569  __pyx_v_exteriorElementBoundaries = ((PyArrayObject *)values[0]);
28570  __pyx_v_elementBoundaryElements = ((PyArrayObject *)values[1]);
28571  __pyx_v_elementBoundaryLocalElementBoundaries = ((PyArrayObject *)values[2]);
28572  __pyx_v_a = ((PyArrayObject *)values[3]);
28573  __pyx_v_grad_phi = ((PyArrayObject *)values[4]);
28574  __pyx_v_velocity = ((PyArrayObject *)values[5]);
28575  }
28576  goto __pyx_L4_argument_unpacking_done;
28577  __pyx_L5_argtuple_error:;
28578  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundaryDiffusiveVelocity", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4880, __pyx_L3_error)
28579  __pyx_L3_error:;
28580  __Pyx_AddTraceback("cfemIntegrals.updateExteriorElementBoundaryDiffusiveVelocity", __pyx_clineno, __pyx_lineno, __pyx_filename);
28581  __Pyx_RefNannyFinishContext();
28582  return NULL;
28583  __pyx_L4_argument_unpacking_done:;
28584  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exteriorElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "exteriorElementBoundaries", 0))) __PYX_ERR(0, 4880, __pyx_L1_error)
28585  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElements), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElements", 0))) __PYX_ERR(0, 4881, __pyx_L1_error)
28586  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundaries", 0))) __PYX_ERR(0, 4882, __pyx_L1_error)
28587  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1, "a", 0))) __PYX_ERR(0, 4883, __pyx_L1_error)
28588  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_phi), __pyx_ptype_5numpy_ndarray, 1, "grad_phi", 0))) __PYX_ERR(0, 4884, __pyx_L1_error)
28589  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_velocity), __pyx_ptype_5numpy_ndarray, 1, "velocity", 0))) __PYX_ERR(0, 4885, __pyx_L1_error)
28590  __pyx_r = __pyx_pf_13cfemIntegrals_242updateExteriorElementBoundaryDiffusiveVelocity(__pyx_self, __pyx_v_exteriorElementBoundaries, __pyx_v_elementBoundaryElements, __pyx_v_elementBoundaryLocalElementBoundaries, __pyx_v_a, __pyx_v_grad_phi, __pyx_v_velocity);
28591 
28592  /* function exit code */
28593  goto __pyx_L0;
28594  __pyx_L1_error:;
28595  __pyx_r = NULL;
28596  __pyx_L0:;
28597  __Pyx_RefNannyFinishContext();
28598  return __pyx_r;
28599 }
28600 
28601 static PyObject *__pyx_pf_13cfemIntegrals_242updateExteriorElementBoundaryDiffusiveVelocity(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_grad_phi, PyArrayObject *__pyx_v_velocity) {
28602  int __pyx_v_nd;
28603  PyObject *__pyx_r = NULL;
28604  __Pyx_RefNannyDeclarations
28605  int __pyx_t_1;
28606  int __pyx_t_2;
28607  int __pyx_lineno = 0;
28608  const char *__pyx_filename = NULL;
28609  int __pyx_clineno = 0;
28610  __Pyx_RefNannySetupContext("updateExteriorElementBoundaryDiffusiveVelocity", 0);
28611 
28612  /* "cfemIntegrals.pyx":4886
28613  * np.ndarray grad_phi,
28614  * np.ndarray velocity):
28615  * cdef int nd = grad_phi.ndim # <<<<<<<<<<<<<<
28616  * if nd > 3:
28617  * assert nd == velocity.ndim
28618  */
28619  __pyx_t_1 = __pyx_v_grad_phi->nd;
28620  __pyx_v_nd = __pyx_t_1;
28621 
28622  /* "cfemIntegrals.pyx":4887
28623  * np.ndarray velocity):
28624  * cdef int nd = grad_phi.ndim
28625  * if nd > 3: # <<<<<<<<<<<<<<
28626  * assert nd == velocity.ndim
28627  * cupdateExteriorElementBoundaryDiffusiveVelocity(exteriorElementBoundaries.shape[0],
28628  */
28629  __pyx_t_2 = ((__pyx_v_nd > 3) != 0);
28630  if (__pyx_t_2) {
28631 
28632  /* "cfemIntegrals.pyx":4888
28633  * cdef int nd = grad_phi.ndim
28634  * if nd > 3:
28635  * assert nd == velocity.ndim # <<<<<<<<<<<<<<
28636  * cupdateExteriorElementBoundaryDiffusiveVelocity(exteriorElementBoundaries.shape[0],
28637  * grad_phi.shape[1],
28638  */
28639  #ifndef CYTHON_WITHOUT_ASSERTIONS
28640  if (unlikely(!Py_OptimizeFlag)) {
28641  if (unlikely(!((__pyx_v_nd == __pyx_v_velocity->nd) != 0))) {
28642  PyErr_SetNone(PyExc_AssertionError);
28643  __PYX_ERR(0, 4888, __pyx_L1_error)
28644  }
28645  }
28646  #endif
28647 
28648  /* "cfemIntegrals.pyx":4889
28649  * if nd > 3:
28650  * assert nd == velocity.ndim
28651  * cupdateExteriorElementBoundaryDiffusiveVelocity(exteriorElementBoundaries.shape[0], # <<<<<<<<<<<<<<
28652  * grad_phi.shape[1],
28653  * grad_phi.shape[2],
28654  */
28655  updateExteriorElementBoundaryDiffusiveVelocity((__pyx_v_exteriorElementBoundaries->dimensions[0]), (__pyx_v_grad_phi->dimensions[1]), (__pyx_v_grad_phi->dimensions[2]), (__pyx_v_grad_phi->dimensions[3]), ((int *)__pyx_v_exteriorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), ((double *)__pyx_v_a->data), ((double *)__pyx_v_grad_phi->data), ((double *)__pyx_v_velocity->data));
28656 
28657  /* "cfemIntegrals.pyx":4887
28658  * np.ndarray velocity):
28659  * cdef int nd = grad_phi.ndim
28660  * if nd > 3: # <<<<<<<<<<<<<<
28661  * assert nd == velocity.ndim
28662  * cupdateExteriorElementBoundaryDiffusiveVelocity(exteriorElementBoundaries.shape[0],
28663  */
28664  goto __pyx_L3;
28665  }
28666 
28667  /* "cfemIntegrals.pyx":4900
28668  * <double*>velocity.data)
28669  * else:
28670  * assert nd == velocity.ndim # <<<<<<<<<<<<<<
28671  * cupdateGlobalExteriorElementBoundaryDiffusiveVelocity(exteriorElementBoundaries.shape[0],
28672  * grad_phi.shape[1],
28673  */
28674  /*else*/ {
28675  #ifndef CYTHON_WITHOUT_ASSERTIONS
28676  if (unlikely(!Py_OptimizeFlag)) {
28677  if (unlikely(!((__pyx_v_nd == __pyx_v_velocity->nd) != 0))) {
28678  PyErr_SetNone(PyExc_AssertionError);
28679  __PYX_ERR(0, 4900, __pyx_L1_error)
28680  }
28681  }
28682  #endif
28683 
28684  /* "cfemIntegrals.pyx":4901
28685  * else:
28686  * assert nd == velocity.ndim
28687  * cupdateGlobalExteriorElementBoundaryDiffusiveVelocity(exteriorElementBoundaries.shape[0], # <<<<<<<<<<<<<<
28688  * grad_phi.shape[1],
28689  * grad_phi.shape[2],
28690  */
28691  updateGlobalExteriorElementBoundaryDiffusiveVelocity((__pyx_v_exteriorElementBoundaries->dimensions[0]), (__pyx_v_grad_phi->dimensions[1]), (__pyx_v_grad_phi->dimensions[2]), ((int *)__pyx_v_exteriorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), ((double *)__pyx_v_a->data), ((double *)__pyx_v_grad_phi->data), ((double *)__pyx_v_velocity->data));
28692  }
28693  __pyx_L3:;
28694 
28695  /* "cfemIntegrals.pyx":4880
28696  * <double*> grad_phi.data,
28697  * <double*> velocity.data)
28698  * def updateExteriorElementBoundaryDiffusiveVelocity(np.ndarray exteriorElementBoundaries, # <<<<<<<<<<<<<<
28699  * np.ndarray elementBoundaryElements,
28700  * np.ndarray elementBoundaryLocalElementBoundaries,
28701  */
28702 
28703  /* function exit code */
28704  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
28705  goto __pyx_L0;
28706  __pyx_L1_error:;
28707  __Pyx_AddTraceback("cfemIntegrals.updateExteriorElementBoundaryDiffusiveVelocity", __pyx_clineno, __pyx_lineno, __pyx_filename);
28708  __pyx_r = NULL;
28709  __pyx_L0:;
28710  __Pyx_XGIVEREF(__pyx_r);
28711  __Pyx_RefNannyFinishContext();
28712  return __pyx_r;
28713 }
28714 
28715 /* "cfemIntegrals.pyx":4910
28716  * <double*> grad_phi.data,
28717  * <double*> velocity.data)
28718  * def updateExteriorElementBoundaryDiffusiveVelocity_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
28719  * np.ndarray colind,
28720  * np.ndarray exteriorElementBoundaries,
28721  */
28722 
28723 /* Python wrapper */
28724 static PyObject *__pyx_pw_13cfemIntegrals_245updateExteriorElementBoundaryDiffusiveVelocity_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
28725 static PyMethodDef __pyx_mdef_13cfemIntegrals_245updateExteriorElementBoundaryDiffusiveVelocity_sd = {"updateExteriorElementBoundaryDiffusiveVelocity_sd", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_245updateExteriorElementBoundaryDiffusiveVelocity_sd, METH_VARARGS|METH_KEYWORDS, 0};
28726 static PyObject *__pyx_pw_13cfemIntegrals_245updateExteriorElementBoundaryDiffusiveVelocity_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
28727  PyArrayObject *__pyx_v_rowptr = 0;
28728  PyArrayObject *__pyx_v_colind = 0;
28729  PyArrayObject *__pyx_v_exteriorElementBoundaries = 0;
28730  PyArrayObject *__pyx_v_elementBoundaryElements = 0;
28731  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries = 0;
28732  PyArrayObject *__pyx_v_a = 0;
28733  PyArrayObject *__pyx_v_grad_phi = 0;
28734  PyArrayObject *__pyx_v_velocity = 0;
28735  int __pyx_lineno = 0;
28736  const char *__pyx_filename = NULL;
28737  int __pyx_clineno = 0;
28738  PyObject *__pyx_r = 0;
28739  __Pyx_RefNannyDeclarations
28740  __Pyx_RefNannySetupContext("updateExteriorElementBoundaryDiffusiveVelocity_sd (wrapper)", 0);
28741  {
28742  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rowptr,&__pyx_n_s_colind,&__pyx_n_s_exteriorElementBoundaries,&__pyx_n_s_elementBoundaryElements,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_a,&__pyx_n_s_grad_phi,&__pyx_n_s_velocity,0};
28743  PyObject* values[8] = {0,0,0,0,0,0,0,0};
28744  if (unlikely(__pyx_kwds)) {
28745  Py_ssize_t kw_args;
28746  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
28747  switch (pos_args) {
28748  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
28749  CYTHON_FALLTHROUGH;
28750  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
28751  CYTHON_FALLTHROUGH;
28752  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
28753  CYTHON_FALLTHROUGH;
28754  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
28755  CYTHON_FALLTHROUGH;
28756  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
28757  CYTHON_FALLTHROUGH;
28758  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
28759  CYTHON_FALLTHROUGH;
28760  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
28761  CYTHON_FALLTHROUGH;
28762  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
28763  CYTHON_FALLTHROUGH;
28764  case 0: break;
28765  default: goto __pyx_L5_argtuple_error;
28766  }
28767  kw_args = PyDict_Size(__pyx_kwds);
28768  switch (pos_args) {
28769  case 0:
28770  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rowptr)) != 0)) kw_args--;
28771  else goto __pyx_L5_argtuple_error;
28772  CYTHON_FALLTHROUGH;
28773  case 1:
28774  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_colind)) != 0)) kw_args--;
28775  else {
28776  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundaryDiffusiveVelocity_sd", 1, 8, 8, 1); __PYX_ERR(0, 4910, __pyx_L3_error)
28777  }
28778  CYTHON_FALLTHROUGH;
28779  case 2:
28780  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exteriorElementBoundaries)) != 0)) kw_args--;
28781  else {
28782  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundaryDiffusiveVelocity_sd", 1, 8, 8, 2); __PYX_ERR(0, 4910, __pyx_L3_error)
28783  }
28784  CYTHON_FALLTHROUGH;
28785  case 3:
28786  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElements)) != 0)) kw_args--;
28787  else {
28788  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundaryDiffusiveVelocity_sd", 1, 8, 8, 3); __PYX_ERR(0, 4910, __pyx_L3_error)
28789  }
28790  CYTHON_FALLTHROUGH;
28791  case 4:
28792  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
28793  else {
28794  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundaryDiffusiveVelocity_sd", 1, 8, 8, 4); __PYX_ERR(0, 4910, __pyx_L3_error)
28795  }
28796  CYTHON_FALLTHROUGH;
28797  case 5:
28798  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
28799  else {
28800  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundaryDiffusiveVelocity_sd", 1, 8, 8, 5); __PYX_ERR(0, 4910, __pyx_L3_error)
28801  }
28802  CYTHON_FALLTHROUGH;
28803  case 6:
28804  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_phi)) != 0)) kw_args--;
28805  else {
28806  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundaryDiffusiveVelocity_sd", 1, 8, 8, 6); __PYX_ERR(0, 4910, __pyx_L3_error)
28807  }
28808  CYTHON_FALLTHROUGH;
28809  case 7:
28810  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_velocity)) != 0)) kw_args--;
28811  else {
28812  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundaryDiffusiveVelocity_sd", 1, 8, 8, 7); __PYX_ERR(0, 4910, __pyx_L3_error)
28813  }
28814  }
28815  if (unlikely(kw_args > 0)) {
28816  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateExteriorElementBoundaryDiffusiveVelocity_sd") < 0)) __PYX_ERR(0, 4910, __pyx_L3_error)
28817  }
28818  } else if (PyTuple_GET_SIZE(__pyx_args) != 8) {
28819  goto __pyx_L5_argtuple_error;
28820  } else {
28821  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
28822  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
28823  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
28824  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
28825  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
28826  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
28827  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
28828  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
28829  }
28830  __pyx_v_rowptr = ((PyArrayObject *)values[0]);
28831  __pyx_v_colind = ((PyArrayObject *)values[1]);
28832  __pyx_v_exteriorElementBoundaries = ((PyArrayObject *)values[2]);
28833  __pyx_v_elementBoundaryElements = ((PyArrayObject *)values[3]);
28834  __pyx_v_elementBoundaryLocalElementBoundaries = ((PyArrayObject *)values[4]);
28835  __pyx_v_a = ((PyArrayObject *)values[5]);
28836  __pyx_v_grad_phi = ((PyArrayObject *)values[6]);
28837  __pyx_v_velocity = ((PyArrayObject *)values[7]);
28838  }
28839  goto __pyx_L4_argument_unpacking_done;
28840  __pyx_L5_argtuple_error:;
28841  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundaryDiffusiveVelocity_sd", 1, 8, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4910, __pyx_L3_error)
28842  __pyx_L3_error:;
28843  __Pyx_AddTraceback("cfemIntegrals.updateExteriorElementBoundaryDiffusiveVelocity_sd", __pyx_clineno, __pyx_lineno, __pyx_filename);
28844  __Pyx_RefNannyFinishContext();
28845  return NULL;
28846  __pyx_L4_argument_unpacking_done:;
28847  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rowptr), __pyx_ptype_5numpy_ndarray, 1, "rowptr", 0))) __PYX_ERR(0, 4910, __pyx_L1_error)
28848  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_colind), __pyx_ptype_5numpy_ndarray, 1, "colind", 0))) __PYX_ERR(0, 4911, __pyx_L1_error)
28849  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exteriorElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "exteriorElementBoundaries", 0))) __PYX_ERR(0, 4912, __pyx_L1_error)
28850  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElements), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElements", 0))) __PYX_ERR(0, 4913, __pyx_L1_error)
28851  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundaries", 0))) __PYX_ERR(0, 4914, __pyx_L1_error)
28852  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1, "a", 0))) __PYX_ERR(0, 4915, __pyx_L1_error)
28853  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_phi), __pyx_ptype_5numpy_ndarray, 1, "grad_phi", 0))) __PYX_ERR(0, 4916, __pyx_L1_error)
28854  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_velocity), __pyx_ptype_5numpy_ndarray, 1, "velocity", 0))) __PYX_ERR(0, 4917, __pyx_L1_error)
28855  __pyx_r = __pyx_pf_13cfemIntegrals_244updateExteriorElementBoundaryDiffusiveVelocity_sd(__pyx_self, __pyx_v_rowptr, __pyx_v_colind, __pyx_v_exteriorElementBoundaries, __pyx_v_elementBoundaryElements, __pyx_v_elementBoundaryLocalElementBoundaries, __pyx_v_a, __pyx_v_grad_phi, __pyx_v_velocity);
28856 
28857  /* function exit code */
28858  goto __pyx_L0;
28859  __pyx_L1_error:;
28860  __pyx_r = NULL;
28861  __pyx_L0:;
28862  __Pyx_RefNannyFinishContext();
28863  return __pyx_r;
28864 }
28865 
28866 static PyObject *__pyx_pf_13cfemIntegrals_244updateExteriorElementBoundaryDiffusiveVelocity_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_grad_phi, PyArrayObject *__pyx_v_velocity) {
28867  int __pyx_v_nExteriorElementBoundaries_global;
28868  int __pyx_v_nElementBoundaries_element;
28869  int __pyx_v_nQuadraturePoints_elementBoundary;
28870  int __pyx_v_nSpace;
28871  PyObject *__pyx_r = NULL;
28872  __Pyx_RefNannyDeclarations
28873  __Pyx_RefNannySetupContext("updateExteriorElementBoundaryDiffusiveVelocity_sd", 0);
28874 
28875  /* "cfemIntegrals.pyx":4918
28876  * np.ndarray grad_phi,
28877  * np.ndarray velocity):
28878  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundaries.shape[0] # <<<<<<<<<<<<<<
28879  * cdef int nElementBoundaries_element = grad_phi.shape[1]
28880  * cdef int nQuadraturePoints_elementBoundary = grad_phi.shape[2]
28881  */
28882  __pyx_v_nExteriorElementBoundaries_global = (__pyx_v_exteriorElementBoundaries->dimensions[0]);
28883 
28884  /* "cfemIntegrals.pyx":4919
28885  * np.ndarray velocity):
28886  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundaries.shape[0]
28887  * cdef int nElementBoundaries_element = grad_phi.shape[1] # <<<<<<<<<<<<<<
28888  * cdef int nQuadraturePoints_elementBoundary = grad_phi.shape[2]
28889  * cdef int nSpace = grad_phi.shape[3]
28890  */
28891  __pyx_v_nElementBoundaries_element = (__pyx_v_grad_phi->dimensions[1]);
28892 
28893  /* "cfemIntegrals.pyx":4920
28894  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundaries.shape[0]
28895  * cdef int nElementBoundaries_element = grad_phi.shape[1]
28896  * cdef int nQuadraturePoints_elementBoundary = grad_phi.shape[2] # <<<<<<<<<<<<<<
28897  * cdef int nSpace = grad_phi.shape[3]
28898  * cupdateExteriorElementBoundaryDiffusiveVelocity_sd(nExteriorElementBoundaries_global,
28899  */
28900  __pyx_v_nQuadraturePoints_elementBoundary = (__pyx_v_grad_phi->dimensions[2]);
28901 
28902  /* "cfemIntegrals.pyx":4921
28903  * cdef int nElementBoundaries_element = grad_phi.shape[1]
28904  * cdef int nQuadraturePoints_elementBoundary = grad_phi.shape[2]
28905  * cdef int nSpace = grad_phi.shape[3] # <<<<<<<<<<<<<<
28906  * cupdateExteriorElementBoundaryDiffusiveVelocity_sd(nExteriorElementBoundaries_global,
28907  * nElementBoundaries_element,
28908  */
28909  __pyx_v_nSpace = (__pyx_v_grad_phi->dimensions[3]);
28910 
28911  /* "cfemIntegrals.pyx":4922
28912  * cdef int nQuadraturePoints_elementBoundary = grad_phi.shape[2]
28913  * cdef int nSpace = grad_phi.shape[3]
28914  * cupdateExteriorElementBoundaryDiffusiveVelocity_sd(nExteriorElementBoundaries_global, # <<<<<<<<<<<<<<
28915  * nElementBoundaries_element,
28916  * nQuadraturePoints_elementBoundary,
28917  */
28918  updateExteriorElementBoundaryDiffusiveVelocity_sd(__pyx_v_nExteriorElementBoundaries_global, __pyx_v_nElementBoundaries_element, __pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nSpace, ((int *)__pyx_v_rowptr->data), ((int *)__pyx_v_colind->data), ((int *)__pyx_v_exteriorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), ((double *)__pyx_v_a->data), ((double *)__pyx_v_grad_phi->data), ((double *)__pyx_v_velocity->data));
28919 
28920  /* "cfemIntegrals.pyx":4910
28921  * <double*> grad_phi.data,
28922  * <double*> velocity.data)
28923  * def updateExteriorElementBoundaryDiffusiveVelocity_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
28924  * np.ndarray colind,
28925  * np.ndarray exteriorElementBoundaries,
28926  */
28927 
28928  /* function exit code */
28929  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
28930  __Pyx_XGIVEREF(__pyx_r);
28931  __Pyx_RefNannyFinishContext();
28932  return __pyx_r;
28933 }
28934 
28935 /* "cfemIntegrals.pyx":4934
28936  * <double*> grad_phi.data,
28937  * <double*> velocity.data)
28938  * def updateInteriorElementBoundaryAdvectiveVelocity(np.ndarray interiorElementBoundaries, # <<<<<<<<<<<<<<
28939  * np.ndarray elementBoundaryElements,
28940  * np.ndarray elementBoundaryLocalElementBoundaries,
28941  */
28942 
28943 /* Python wrapper */
28944 static PyObject *__pyx_pw_13cfemIntegrals_247updateInteriorElementBoundaryAdvectiveVelocity(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
28945 static PyMethodDef __pyx_mdef_13cfemIntegrals_247updateInteriorElementBoundaryAdvectiveVelocity = {"updateInteriorElementBoundaryAdvectiveVelocity", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_247updateInteriorElementBoundaryAdvectiveVelocity, METH_VARARGS|METH_KEYWORDS, 0};
28946 static PyObject *__pyx_pw_13cfemIntegrals_247updateInteriorElementBoundaryAdvectiveVelocity(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
28947  PyArrayObject *__pyx_v_interiorElementBoundaries = 0;
28948  PyArrayObject *__pyx_v_elementBoundaryElements = 0;
28949  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries = 0;
28950  PyArrayObject *__pyx_v_f = 0;
28951  PyArrayObject *__pyx_v_velocity = 0;
28952  int __pyx_lineno = 0;
28953  const char *__pyx_filename = NULL;
28954  int __pyx_clineno = 0;
28955  PyObject *__pyx_r = 0;
28956  __Pyx_RefNannyDeclarations
28957  __Pyx_RefNannySetupContext("updateInteriorElementBoundaryAdvectiveVelocity (wrapper)", 0);
28958  {
28959  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_interiorElementBoundaries,&__pyx_n_s_elementBoundaryElements,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_f,&__pyx_n_s_velocity,0};
28960  PyObject* values[5] = {0,0,0,0,0};
28961  if (unlikely(__pyx_kwds)) {
28962  Py_ssize_t kw_args;
28963  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
28964  switch (pos_args) {
28965  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
28966  CYTHON_FALLTHROUGH;
28967  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
28968  CYTHON_FALLTHROUGH;
28969  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
28970  CYTHON_FALLTHROUGH;
28971  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
28972  CYTHON_FALLTHROUGH;
28973  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
28974  CYTHON_FALLTHROUGH;
28975  case 0: break;
28976  default: goto __pyx_L5_argtuple_error;
28977  }
28978  kw_args = PyDict_Size(__pyx_kwds);
28979  switch (pos_args) {
28980  case 0:
28981  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_interiorElementBoundaries)) != 0)) kw_args--;
28982  else goto __pyx_L5_argtuple_error;
28983  CYTHON_FALLTHROUGH;
28984  case 1:
28985  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElements)) != 0)) kw_args--;
28986  else {
28987  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundaryAdvectiveVelocity", 1, 5, 5, 1); __PYX_ERR(0, 4934, __pyx_L3_error)
28988  }
28989  CYTHON_FALLTHROUGH;
28990  case 2:
28991  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
28992  else {
28993  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundaryAdvectiveVelocity", 1, 5, 5, 2); __PYX_ERR(0, 4934, __pyx_L3_error)
28994  }
28995  CYTHON_FALLTHROUGH;
28996  case 3:
28997  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_f)) != 0)) kw_args--;
28998  else {
28999  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundaryAdvectiveVelocity", 1, 5, 5, 3); __PYX_ERR(0, 4934, __pyx_L3_error)
29000  }
29001  CYTHON_FALLTHROUGH;
29002  case 4:
29003  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_velocity)) != 0)) kw_args--;
29004  else {
29005  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundaryAdvectiveVelocity", 1, 5, 5, 4); __PYX_ERR(0, 4934, __pyx_L3_error)
29006  }
29007  }
29008  if (unlikely(kw_args > 0)) {
29009  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateInteriorElementBoundaryAdvectiveVelocity") < 0)) __PYX_ERR(0, 4934, __pyx_L3_error)
29010  }
29011  } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
29012  goto __pyx_L5_argtuple_error;
29013  } else {
29014  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
29015  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
29016  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
29017  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
29018  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
29019  }
29020  __pyx_v_interiorElementBoundaries = ((PyArrayObject *)values[0]);
29021  __pyx_v_elementBoundaryElements = ((PyArrayObject *)values[1]);
29022  __pyx_v_elementBoundaryLocalElementBoundaries = ((PyArrayObject *)values[2]);
29023  __pyx_v_f = ((PyArrayObject *)values[3]);
29024  __pyx_v_velocity = ((PyArrayObject *)values[4]);
29025  }
29026  goto __pyx_L4_argument_unpacking_done;
29027  __pyx_L5_argtuple_error:;
29028  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundaryAdvectiveVelocity", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4934, __pyx_L3_error)
29029  __pyx_L3_error:;
29030  __Pyx_AddTraceback("cfemIntegrals.updateInteriorElementBoundaryAdvectiveVelocity", __pyx_clineno, __pyx_lineno, __pyx_filename);
29031  __Pyx_RefNannyFinishContext();
29032  return NULL;
29033  __pyx_L4_argument_unpacking_done:;
29034  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_interiorElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "interiorElementBoundaries", 0))) __PYX_ERR(0, 4934, __pyx_L1_error)
29035  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElements), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElements", 0))) __PYX_ERR(0, 4935, __pyx_L1_error)
29036  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundaries", 0))) __PYX_ERR(0, 4936, __pyx_L1_error)
29037  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_f), __pyx_ptype_5numpy_ndarray, 1, "f", 0))) __PYX_ERR(0, 4937, __pyx_L1_error)
29038  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_velocity), __pyx_ptype_5numpy_ndarray, 1, "velocity", 0))) __PYX_ERR(0, 4938, __pyx_L1_error)
29039  __pyx_r = __pyx_pf_13cfemIntegrals_246updateInteriorElementBoundaryAdvectiveVelocity(__pyx_self, __pyx_v_interiorElementBoundaries, __pyx_v_elementBoundaryElements, __pyx_v_elementBoundaryLocalElementBoundaries, __pyx_v_f, __pyx_v_velocity);
29040 
29041  /* function exit code */
29042  goto __pyx_L0;
29043  __pyx_L1_error:;
29044  __pyx_r = NULL;
29045  __pyx_L0:;
29046  __Pyx_RefNannyFinishContext();
29047  return __pyx_r;
29048 }
29049 
29050 static PyObject *__pyx_pf_13cfemIntegrals_246updateInteriorElementBoundaryAdvectiveVelocity(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_interiorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_f, PyArrayObject *__pyx_v_velocity) {
29051  int __pyx_v_nInteriorElementBoundaries_global;
29052  int __pyx_v_nElementBoundaries_element;
29053  int __pyx_v_nQuadraturePoints_elementBoundary;
29054  int __pyx_v_nSpace;
29055  PyObject *__pyx_r = NULL;
29056  __Pyx_RefNannyDeclarations
29057  __Pyx_RefNannySetupContext("updateInteriorElementBoundaryAdvectiveVelocity", 0);
29058 
29059  /* "cfemIntegrals.pyx":4939
29060  * np.ndarray f,
29061  * np.ndarray velocity):
29062  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0] # <<<<<<<<<<<<<<
29063  * cdef int nElementBoundaries_element = f.shape[1]
29064  * cdef int nQuadraturePoints_elementBoundary = f.shape[2]
29065  */
29066  __pyx_v_nInteriorElementBoundaries_global = (__pyx_v_interiorElementBoundaries->dimensions[0]);
29067 
29068  /* "cfemIntegrals.pyx":4940
29069  * np.ndarray velocity):
29070  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0]
29071  * cdef int nElementBoundaries_element = f.shape[1] # <<<<<<<<<<<<<<
29072  * cdef int nQuadraturePoints_elementBoundary = f.shape[2]
29073  * cdef int nSpace = f.shape[3]
29074  */
29075  __pyx_v_nElementBoundaries_element = (__pyx_v_f->dimensions[1]);
29076 
29077  /* "cfemIntegrals.pyx":4941
29078  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0]
29079  * cdef int nElementBoundaries_element = f.shape[1]
29080  * cdef int nQuadraturePoints_elementBoundary = f.shape[2] # <<<<<<<<<<<<<<
29081  * cdef int nSpace = f.shape[3]
29082  * cupdateInteriorElementBoundaryAdvectiveVelocity(nInteriorElementBoundaries_global,
29083  */
29084  __pyx_v_nQuadraturePoints_elementBoundary = (__pyx_v_f->dimensions[2]);
29085 
29086  /* "cfemIntegrals.pyx":4942
29087  * cdef int nElementBoundaries_element = f.shape[1]
29088  * cdef int nQuadraturePoints_elementBoundary = f.shape[2]
29089  * cdef int nSpace = f.shape[3] # <<<<<<<<<<<<<<
29090  * cupdateInteriorElementBoundaryAdvectiveVelocity(nInteriorElementBoundaries_global,
29091  * nElementBoundaries_element,
29092  */
29093  __pyx_v_nSpace = (__pyx_v_f->dimensions[3]);
29094 
29095  /* "cfemIntegrals.pyx":4943
29096  * cdef int nQuadraturePoints_elementBoundary = f.shape[2]
29097  * cdef int nSpace = f.shape[3]
29098  * cupdateInteriorElementBoundaryAdvectiveVelocity(nInteriorElementBoundaries_global, # <<<<<<<<<<<<<<
29099  * nElementBoundaries_element,
29100  * nQuadraturePoints_elementBoundary,
29101  */
29102  updateInteriorElementBoundaryAdvectiveVelocity(__pyx_v_nInteriorElementBoundaries_global, __pyx_v_nElementBoundaries_element, __pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nSpace, ((int *)__pyx_v_interiorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), ((double *)__pyx_v_f->data), ((double *)__pyx_v_velocity->data));
29103 
29104  /* "cfemIntegrals.pyx":4934
29105  * <double*> grad_phi.data,
29106  * <double*> velocity.data)
29107  * def updateInteriorElementBoundaryAdvectiveVelocity(np.ndarray interiorElementBoundaries, # <<<<<<<<<<<<<<
29108  * np.ndarray elementBoundaryElements,
29109  * np.ndarray elementBoundaryLocalElementBoundaries,
29110  */
29111 
29112  /* function exit code */
29113  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
29114  __Pyx_XGIVEREF(__pyx_r);
29115  __Pyx_RefNannyFinishContext();
29116  return __pyx_r;
29117 }
29118 
29119 /* "cfemIntegrals.pyx":4952
29120  * <double*>f.data,
29121  * <double*>velocity.data)
29122  * def updateExteriorElementBoundaryAdvectiveVelocity(np.ndarray exteriorElementBoundaries, # <<<<<<<<<<<<<<
29123  * np.ndarray elementBoundaryElements,
29124  * np.ndarray elementBoundaryLocalElementBoundaries,
29125  */
29126 
29127 /* Python wrapper */
29128 static PyObject *__pyx_pw_13cfemIntegrals_249updateExteriorElementBoundaryAdvectiveVelocity(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
29129 static PyMethodDef __pyx_mdef_13cfemIntegrals_249updateExteriorElementBoundaryAdvectiveVelocity = {"updateExteriorElementBoundaryAdvectiveVelocity", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_249updateExteriorElementBoundaryAdvectiveVelocity, METH_VARARGS|METH_KEYWORDS, 0};
29130 static PyObject *__pyx_pw_13cfemIntegrals_249updateExteriorElementBoundaryAdvectiveVelocity(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
29131  PyArrayObject *__pyx_v_exteriorElementBoundaries = 0;
29132  PyArrayObject *__pyx_v_elementBoundaryElements = 0;
29133  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries = 0;
29134  PyArrayObject *__pyx_v_f = 0;
29135  PyArrayObject *__pyx_v_velocity = 0;
29136  int __pyx_lineno = 0;
29137  const char *__pyx_filename = NULL;
29138  int __pyx_clineno = 0;
29139  PyObject *__pyx_r = 0;
29140  __Pyx_RefNannyDeclarations
29141  __Pyx_RefNannySetupContext("updateExteriorElementBoundaryAdvectiveVelocity (wrapper)", 0);
29142  {
29143  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exteriorElementBoundaries,&__pyx_n_s_elementBoundaryElements,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_f,&__pyx_n_s_velocity,0};
29144  PyObject* values[5] = {0,0,0,0,0};
29145  if (unlikely(__pyx_kwds)) {
29146  Py_ssize_t kw_args;
29147  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
29148  switch (pos_args) {
29149  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
29150  CYTHON_FALLTHROUGH;
29151  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
29152  CYTHON_FALLTHROUGH;
29153  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
29154  CYTHON_FALLTHROUGH;
29155  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
29156  CYTHON_FALLTHROUGH;
29157  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
29158  CYTHON_FALLTHROUGH;
29159  case 0: break;
29160  default: goto __pyx_L5_argtuple_error;
29161  }
29162  kw_args = PyDict_Size(__pyx_kwds);
29163  switch (pos_args) {
29164  case 0:
29165  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exteriorElementBoundaries)) != 0)) kw_args--;
29166  else goto __pyx_L5_argtuple_error;
29167  CYTHON_FALLTHROUGH;
29168  case 1:
29169  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElements)) != 0)) kw_args--;
29170  else {
29171  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundaryAdvectiveVelocity", 1, 5, 5, 1); __PYX_ERR(0, 4952, __pyx_L3_error)
29172  }
29173  CYTHON_FALLTHROUGH;
29174  case 2:
29175  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
29176  else {
29177  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundaryAdvectiveVelocity", 1, 5, 5, 2); __PYX_ERR(0, 4952, __pyx_L3_error)
29178  }
29179  CYTHON_FALLTHROUGH;
29180  case 3:
29181  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_f)) != 0)) kw_args--;
29182  else {
29183  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundaryAdvectiveVelocity", 1, 5, 5, 3); __PYX_ERR(0, 4952, __pyx_L3_error)
29184  }
29185  CYTHON_FALLTHROUGH;
29186  case 4:
29187  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_velocity)) != 0)) kw_args--;
29188  else {
29189  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundaryAdvectiveVelocity", 1, 5, 5, 4); __PYX_ERR(0, 4952, __pyx_L3_error)
29190  }
29191  }
29192  if (unlikely(kw_args > 0)) {
29193  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateExteriorElementBoundaryAdvectiveVelocity") < 0)) __PYX_ERR(0, 4952, __pyx_L3_error)
29194  }
29195  } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
29196  goto __pyx_L5_argtuple_error;
29197  } else {
29198  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
29199  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
29200  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
29201  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
29202  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
29203  }
29204  __pyx_v_exteriorElementBoundaries = ((PyArrayObject *)values[0]);
29205  __pyx_v_elementBoundaryElements = ((PyArrayObject *)values[1]);
29206  __pyx_v_elementBoundaryLocalElementBoundaries = ((PyArrayObject *)values[2]);
29207  __pyx_v_f = ((PyArrayObject *)values[3]);
29208  __pyx_v_velocity = ((PyArrayObject *)values[4]);
29209  }
29210  goto __pyx_L4_argument_unpacking_done;
29211  __pyx_L5_argtuple_error:;
29212  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundaryAdvectiveVelocity", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4952, __pyx_L3_error)
29213  __pyx_L3_error:;
29214  __Pyx_AddTraceback("cfemIntegrals.updateExteriorElementBoundaryAdvectiveVelocity", __pyx_clineno, __pyx_lineno, __pyx_filename);
29215  __Pyx_RefNannyFinishContext();
29216  return NULL;
29217  __pyx_L4_argument_unpacking_done:;
29218  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exteriorElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "exteriorElementBoundaries", 0))) __PYX_ERR(0, 4952, __pyx_L1_error)
29219  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElements), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElements", 0))) __PYX_ERR(0, 4953, __pyx_L1_error)
29220  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundaries", 0))) __PYX_ERR(0, 4954, __pyx_L1_error)
29221  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_f), __pyx_ptype_5numpy_ndarray, 1, "f", 0))) __PYX_ERR(0, 4955, __pyx_L1_error)
29222  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_velocity), __pyx_ptype_5numpy_ndarray, 1, "velocity", 0))) __PYX_ERR(0, 4956, __pyx_L1_error)
29223  __pyx_r = __pyx_pf_13cfemIntegrals_248updateExteriorElementBoundaryAdvectiveVelocity(__pyx_self, __pyx_v_exteriorElementBoundaries, __pyx_v_elementBoundaryElements, __pyx_v_elementBoundaryLocalElementBoundaries, __pyx_v_f, __pyx_v_velocity);
29224 
29225  /* function exit code */
29226  goto __pyx_L0;
29227  __pyx_L1_error:;
29228  __pyx_r = NULL;
29229  __pyx_L0:;
29230  __Pyx_RefNannyFinishContext();
29231  return __pyx_r;
29232 }
29233 
29234 static PyObject *__pyx_pf_13cfemIntegrals_248updateExteriorElementBoundaryAdvectiveVelocity(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_f, PyArrayObject *__pyx_v_velocity) {
29235  int __pyx_v_nd;
29236  PyObject *__pyx_r = NULL;
29237  __Pyx_RefNannyDeclarations
29238  int __pyx_t_1;
29239  int __pyx_t_2;
29240  int __pyx_lineno = 0;
29241  const char *__pyx_filename = NULL;
29242  int __pyx_clineno = 0;
29243  __Pyx_RefNannySetupContext("updateExteriorElementBoundaryAdvectiveVelocity", 0);
29244 
29245  /* "cfemIntegrals.pyx":4957
29246  * np.ndarray f,
29247  * np.ndarray velocity):
29248  * cdef int nd = f.ndim # <<<<<<<<<<<<<<
29249  * if nd > 3:
29250  * assert nd == velocity.ndim
29251  */
29252  __pyx_t_1 = __pyx_v_f->nd;
29253  __pyx_v_nd = __pyx_t_1;
29254 
29255  /* "cfemIntegrals.pyx":4958
29256  * np.ndarray velocity):
29257  * cdef int nd = f.ndim
29258  * if nd > 3: # <<<<<<<<<<<<<<
29259  * assert nd == velocity.ndim
29260  * cupdateExteriorElementBoundaryAdvectiveVelocity(exteriorElementBoundaries.shape[0],
29261  */
29262  __pyx_t_2 = ((__pyx_v_nd > 3) != 0);
29263  if (__pyx_t_2) {
29264 
29265  /* "cfemIntegrals.pyx":4959
29266  * cdef int nd = f.ndim
29267  * if nd > 3:
29268  * assert nd == velocity.ndim # <<<<<<<<<<<<<<
29269  * cupdateExteriorElementBoundaryAdvectiveVelocity(exteriorElementBoundaries.shape[0],
29270  * f.shape[1],
29271  */
29272  #ifndef CYTHON_WITHOUT_ASSERTIONS
29273  if (unlikely(!Py_OptimizeFlag)) {
29274  if (unlikely(!((__pyx_v_nd == __pyx_v_velocity->nd) != 0))) {
29275  PyErr_SetNone(PyExc_AssertionError);
29276  __PYX_ERR(0, 4959, __pyx_L1_error)
29277  }
29278  }
29279  #endif
29280 
29281  /* "cfemIntegrals.pyx":4960
29282  * if nd > 3:
29283  * assert nd == velocity.ndim
29284  * cupdateExteriorElementBoundaryAdvectiveVelocity(exteriorElementBoundaries.shape[0], # <<<<<<<<<<<<<<
29285  * f.shape[1],
29286  * f.shape[2],
29287  */
29288  updateExteriorElementBoundaryAdvectiveVelocity((__pyx_v_exteriorElementBoundaries->dimensions[0]), (__pyx_v_f->dimensions[1]), (__pyx_v_f->dimensions[2]), (__pyx_v_f->dimensions[3]), ((int *)__pyx_v_exteriorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), ((double *)__pyx_v_f->data), ((double *)__pyx_v_velocity->data));
29289 
29290  /* "cfemIntegrals.pyx":4958
29291  * np.ndarray velocity):
29292  * cdef int nd = f.ndim
29293  * if nd > 3: # <<<<<<<<<<<<<<
29294  * assert nd == velocity.ndim
29295  * cupdateExteriorElementBoundaryAdvectiveVelocity(exteriorElementBoundaries.shape[0],
29296  */
29297  goto __pyx_L3;
29298  }
29299 
29300  /* "cfemIntegrals.pyx":4970
29301  * <double*>velocity.data)
29302  * else:
29303  * assert nd == velocity.ndim # <<<<<<<<<<<<<<
29304  * cupdateGlobalExteriorElementBoundaryAdvectiveVelocity(exteriorElementBoundaries.shape[0],
29305  * f.shape[1],
29306  */
29307  /*else*/ {
29308  #ifndef CYTHON_WITHOUT_ASSERTIONS
29309  if (unlikely(!Py_OptimizeFlag)) {
29310  if (unlikely(!((__pyx_v_nd == __pyx_v_velocity->nd) != 0))) {
29311  PyErr_SetNone(PyExc_AssertionError);
29312  __PYX_ERR(0, 4970, __pyx_L1_error)
29313  }
29314  }
29315  #endif
29316 
29317  /* "cfemIntegrals.pyx":4971
29318  * else:
29319  * assert nd == velocity.ndim
29320  * cupdateGlobalExteriorElementBoundaryAdvectiveVelocity(exteriorElementBoundaries.shape[0], # <<<<<<<<<<<<<<
29321  * f.shape[1],
29322  * f.shape[2],
29323  */
29324  updateGlobalExteriorElementBoundaryAdvectiveVelocity((__pyx_v_exteriorElementBoundaries->dimensions[0]), (__pyx_v_f->dimensions[1]), (__pyx_v_f->dimensions[2]), ((int *)__pyx_v_exteriorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), ((double *)__pyx_v_f->data), ((double *)__pyx_v_velocity->data));
29325  }
29326  __pyx_L3:;
29327 
29328  /* "cfemIntegrals.pyx":4952
29329  * <double*>f.data,
29330  * <double*>velocity.data)
29331  * def updateExteriorElementBoundaryAdvectiveVelocity(np.ndarray exteriorElementBoundaries, # <<<<<<<<<<<<<<
29332  * np.ndarray elementBoundaryElements,
29333  * np.ndarray elementBoundaryLocalElementBoundaries,
29334  */
29335 
29336  /* function exit code */
29337  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
29338  goto __pyx_L0;
29339  __pyx_L1_error:;
29340  __Pyx_AddTraceback("cfemIntegrals.updateExteriorElementBoundaryAdvectiveVelocity", __pyx_clineno, __pyx_lineno, __pyx_filename);
29341  __pyx_r = NULL;
29342  __pyx_L0:;
29343  __Pyx_XGIVEREF(__pyx_r);
29344  __Pyx_RefNannyFinishContext();
29345  return __pyx_r;
29346 }
29347 
29348 /* "cfemIntegrals.pyx":4979
29349  * <double*> f.data,
29350  * <double*> velocity.data)
29351  * def updateInteriorElementBoundaryShockCapturingVelocity(np.ndarray interiorElementBoundaries, # <<<<<<<<<<<<<<
29352  * np.ndarray elementBoundaryElements,
29353  * np.ndarray elementBoundaryLocalElementBoundaries,
29354  */
29355 
29356 /* Python wrapper */
29357 static PyObject *__pyx_pw_13cfemIntegrals_251updateInteriorElementBoundaryShockCapturingVelocity(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
29358 static PyMethodDef __pyx_mdef_13cfemIntegrals_251updateInteriorElementBoundaryShockCapturingVelocity = {"updateInteriorElementBoundaryShockCapturingVelocity", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_251updateInteriorElementBoundaryShockCapturingVelocity, METH_VARARGS|METH_KEYWORDS, 0};
29359 static PyObject *__pyx_pw_13cfemIntegrals_251updateInteriorElementBoundaryShockCapturingVelocity(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
29360  PyArrayObject *__pyx_v_interiorElementBoundaries = 0;
29361  PyArrayObject *__pyx_v_elementBoundaryElements = 0;
29362  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries = 0;
29363  PyArrayObject *__pyx_v_numDiff = 0;
29364  PyArrayObject *__pyx_v_grad_u = 0;
29365  PyArrayObject *__pyx_v_velocity = 0;
29366  int __pyx_lineno = 0;
29367  const char *__pyx_filename = NULL;
29368  int __pyx_clineno = 0;
29369  PyObject *__pyx_r = 0;
29370  __Pyx_RefNannyDeclarations
29371  __Pyx_RefNannySetupContext("updateInteriorElementBoundaryShockCapturingVelocity (wrapper)", 0);
29372  {
29373  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_interiorElementBoundaries,&__pyx_n_s_elementBoundaryElements,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_numDiff,&__pyx_n_s_grad_u,&__pyx_n_s_velocity,0};
29374  PyObject* values[6] = {0,0,0,0,0,0};
29375  if (unlikely(__pyx_kwds)) {
29376  Py_ssize_t kw_args;
29377  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
29378  switch (pos_args) {
29379  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
29380  CYTHON_FALLTHROUGH;
29381  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
29382  CYTHON_FALLTHROUGH;
29383  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
29384  CYTHON_FALLTHROUGH;
29385  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
29386  CYTHON_FALLTHROUGH;
29387  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
29388  CYTHON_FALLTHROUGH;
29389  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
29390  CYTHON_FALLTHROUGH;
29391  case 0: break;
29392  default: goto __pyx_L5_argtuple_error;
29393  }
29394  kw_args = PyDict_Size(__pyx_kwds);
29395  switch (pos_args) {
29396  case 0:
29397  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_interiorElementBoundaries)) != 0)) kw_args--;
29398  else goto __pyx_L5_argtuple_error;
29399  CYTHON_FALLTHROUGH;
29400  case 1:
29401  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElements)) != 0)) kw_args--;
29402  else {
29403  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundaryShockCapturingVelocity", 1, 6, 6, 1); __PYX_ERR(0, 4979, __pyx_L3_error)
29404  }
29405  CYTHON_FALLTHROUGH;
29406  case 2:
29407  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
29408  else {
29409  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundaryShockCapturingVelocity", 1, 6, 6, 2); __PYX_ERR(0, 4979, __pyx_L3_error)
29410  }
29411  CYTHON_FALLTHROUGH;
29412  case 3:
29413  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_numDiff)) != 0)) kw_args--;
29414  else {
29415  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundaryShockCapturingVelocity", 1, 6, 6, 3); __PYX_ERR(0, 4979, __pyx_L3_error)
29416  }
29417  CYTHON_FALLTHROUGH;
29418  case 4:
29419  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_u)) != 0)) kw_args--;
29420  else {
29421  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundaryShockCapturingVelocity", 1, 6, 6, 4); __PYX_ERR(0, 4979, __pyx_L3_error)
29422  }
29423  CYTHON_FALLTHROUGH;
29424  case 5:
29425  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_velocity)) != 0)) kw_args--;
29426  else {
29427  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundaryShockCapturingVelocity", 1, 6, 6, 5); __PYX_ERR(0, 4979, __pyx_L3_error)
29428  }
29429  }
29430  if (unlikely(kw_args > 0)) {
29431  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateInteriorElementBoundaryShockCapturingVelocity") < 0)) __PYX_ERR(0, 4979, __pyx_L3_error)
29432  }
29433  } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
29434  goto __pyx_L5_argtuple_error;
29435  } else {
29436  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
29437  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
29438  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
29439  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
29440  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
29441  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
29442  }
29443  __pyx_v_interiorElementBoundaries = ((PyArrayObject *)values[0]);
29444  __pyx_v_elementBoundaryElements = ((PyArrayObject *)values[1]);
29445  __pyx_v_elementBoundaryLocalElementBoundaries = ((PyArrayObject *)values[2]);
29446  __pyx_v_numDiff = ((PyArrayObject *)values[3]);
29447  __pyx_v_grad_u = ((PyArrayObject *)values[4]);
29448  __pyx_v_velocity = ((PyArrayObject *)values[5]);
29449  }
29450  goto __pyx_L4_argument_unpacking_done;
29451  __pyx_L5_argtuple_error:;
29452  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundaryShockCapturingVelocity", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4979, __pyx_L3_error)
29453  __pyx_L3_error:;
29454  __Pyx_AddTraceback("cfemIntegrals.updateInteriorElementBoundaryShockCapturingVelocity", __pyx_clineno, __pyx_lineno, __pyx_filename);
29455  __Pyx_RefNannyFinishContext();
29456  return NULL;
29457  __pyx_L4_argument_unpacking_done:;
29458  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_interiorElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "interiorElementBoundaries", 0))) __PYX_ERR(0, 4979, __pyx_L1_error)
29459  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElements), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElements", 0))) __PYX_ERR(0, 4980, __pyx_L1_error)
29460  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundaries", 0))) __PYX_ERR(0, 4981, __pyx_L1_error)
29461  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_numDiff), __pyx_ptype_5numpy_ndarray, 1, "numDiff", 0))) __PYX_ERR(0, 4982, __pyx_L1_error)
29462  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_u), __pyx_ptype_5numpy_ndarray, 1, "grad_u", 0))) __PYX_ERR(0, 4983, __pyx_L1_error)
29463  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_velocity), __pyx_ptype_5numpy_ndarray, 1, "velocity", 0))) __PYX_ERR(0, 4984, __pyx_L1_error)
29464  __pyx_r = __pyx_pf_13cfemIntegrals_250updateInteriorElementBoundaryShockCapturingVelocity(__pyx_self, __pyx_v_interiorElementBoundaries, __pyx_v_elementBoundaryElements, __pyx_v_elementBoundaryLocalElementBoundaries, __pyx_v_numDiff, __pyx_v_grad_u, __pyx_v_velocity);
29465 
29466  /* function exit code */
29467  goto __pyx_L0;
29468  __pyx_L1_error:;
29469  __pyx_r = NULL;
29470  __pyx_L0:;
29471  __Pyx_RefNannyFinishContext();
29472  return __pyx_r;
29473 }
29474 
29475 static PyObject *__pyx_pf_13cfemIntegrals_250updateInteriorElementBoundaryShockCapturingVelocity(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_interiorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_numDiff, PyArrayObject *__pyx_v_grad_u, PyArrayObject *__pyx_v_velocity) {
29476  int __pyx_v_nInteriorElementBoundaries_global;
29477  int __pyx_v_nElementBoundaries_element;
29478  int __pyx_v_nQuadraturePoints_elementBoundary;
29479  int __pyx_v_nQuadraturePoints_element;
29480  int __pyx_v_nSpace;
29481  PyObject *__pyx_r = NULL;
29482  __Pyx_RefNannyDeclarations
29483  __Pyx_RefNannySetupContext("updateInteriorElementBoundaryShockCapturingVelocity", 0);
29484 
29485  /* "cfemIntegrals.pyx":4985
29486  * np.ndarray grad_u,
29487  * np.ndarray velocity):
29488  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0] # <<<<<<<<<<<<<<
29489  * cdef int nElementBoundaries_element = grad_u.shape[1]
29490  * cdef int nQuadraturePoints_elementBoundary = grad_u.shape[2]
29491  */
29492  __pyx_v_nInteriorElementBoundaries_global = (__pyx_v_interiorElementBoundaries->dimensions[0]);
29493 
29494  /* "cfemIntegrals.pyx":4986
29495  * np.ndarray velocity):
29496  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0]
29497  * cdef int nElementBoundaries_element = grad_u.shape[1] # <<<<<<<<<<<<<<
29498  * cdef int nQuadraturePoints_elementBoundary = grad_u.shape[2]
29499  * cdef int nQuadraturePoints_element = numDiff.shape[1]
29500  */
29501  __pyx_v_nElementBoundaries_element = (__pyx_v_grad_u->dimensions[1]);
29502 
29503  /* "cfemIntegrals.pyx":4987
29504  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0]
29505  * cdef int nElementBoundaries_element = grad_u.shape[1]
29506  * cdef int nQuadraturePoints_elementBoundary = grad_u.shape[2] # <<<<<<<<<<<<<<
29507  * cdef int nQuadraturePoints_element = numDiff.shape[1]
29508  * cdef int nSpace = grad_u.shape[3]
29509  */
29510  __pyx_v_nQuadraturePoints_elementBoundary = (__pyx_v_grad_u->dimensions[2]);
29511 
29512  /* "cfemIntegrals.pyx":4988
29513  * cdef int nElementBoundaries_element = grad_u.shape[1]
29514  * cdef int nQuadraturePoints_elementBoundary = grad_u.shape[2]
29515  * cdef int nQuadraturePoints_element = numDiff.shape[1] # <<<<<<<<<<<<<<
29516  * cdef int nSpace = grad_u.shape[3]
29517  * cupdateInteriorElementBoundaryShockCapturingVelocity(nInteriorElementBoundaries_global,
29518  */
29519  __pyx_v_nQuadraturePoints_element = (__pyx_v_numDiff->dimensions[1]);
29520 
29521  /* "cfemIntegrals.pyx":4989
29522  * cdef int nQuadraturePoints_elementBoundary = grad_u.shape[2]
29523  * cdef int nQuadraturePoints_element = numDiff.shape[1]
29524  * cdef int nSpace = grad_u.shape[3] # <<<<<<<<<<<<<<
29525  * cupdateInteriorElementBoundaryShockCapturingVelocity(nInteriorElementBoundaries_global,
29526  * nElementBoundaries_element,
29527  */
29528  __pyx_v_nSpace = (__pyx_v_grad_u->dimensions[3]);
29529 
29530  /* "cfemIntegrals.pyx":4990
29531  * cdef int nQuadraturePoints_element = numDiff.shape[1]
29532  * cdef int nSpace = grad_u.shape[3]
29533  * cupdateInteriorElementBoundaryShockCapturingVelocity(nInteriorElementBoundaries_global, # <<<<<<<<<<<<<<
29534  * nElementBoundaries_element,
29535  * nQuadraturePoints_elementBoundary,
29536  */
29537  updateInteriorElementBoundaryShockCapturingVelocity(__pyx_v_nInteriorElementBoundaries_global, __pyx_v_nElementBoundaries_element, __pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nQuadraturePoints_element, __pyx_v_nSpace, ((int *)__pyx_v_interiorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), ((double *)__pyx_v_numDiff->data), ((double *)__pyx_v_grad_u->data), ((double *)__pyx_v_velocity->data));
29538 
29539  /* "cfemIntegrals.pyx":4979
29540  * <double*> f.data,
29541  * <double*> velocity.data)
29542  * def updateInteriorElementBoundaryShockCapturingVelocity(np.ndarray interiorElementBoundaries, # <<<<<<<<<<<<<<
29543  * np.ndarray elementBoundaryElements,
29544  * np.ndarray elementBoundaryLocalElementBoundaries,
29545  */
29546 
29547  /* function exit code */
29548  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
29549  __Pyx_XGIVEREF(__pyx_r);
29550  __Pyx_RefNannyFinishContext();
29551  return __pyx_r;
29552 }
29553 
29554 /* "cfemIntegrals.pyx":5001
29555  * <double*>grad_u.data,
29556  * <double*>velocity.data)
29557  * def updateExteriorElementBoundaryShockCapturingVelocity(np.ndarray exteriorElementBoundaries, # <<<<<<<<<<<<<<
29558  * np.ndarray elementBoundaryElements,
29559  * np.ndarray elementBoundaryLocalElementBoundaries,
29560  */
29561 
29562 /* Python wrapper */
29563 static PyObject *__pyx_pw_13cfemIntegrals_253updateExteriorElementBoundaryShockCapturingVelocity(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
29564 static PyMethodDef __pyx_mdef_13cfemIntegrals_253updateExteriorElementBoundaryShockCapturingVelocity = {"updateExteriorElementBoundaryShockCapturingVelocity", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_253updateExteriorElementBoundaryShockCapturingVelocity, METH_VARARGS|METH_KEYWORDS, 0};
29565 static PyObject *__pyx_pw_13cfemIntegrals_253updateExteriorElementBoundaryShockCapturingVelocity(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
29566  PyArrayObject *__pyx_v_exteriorElementBoundaries = 0;
29567  PyArrayObject *__pyx_v_elementBoundaryElements = 0;
29568  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries = 0;
29569  PyArrayObject *__pyx_v_numDiff = 0;
29570  PyArrayObject *__pyx_v_grad_u = 0;
29571  PyArrayObject *__pyx_v_velocity = 0;
29572  int __pyx_lineno = 0;
29573  const char *__pyx_filename = NULL;
29574  int __pyx_clineno = 0;
29575  PyObject *__pyx_r = 0;
29576  __Pyx_RefNannyDeclarations
29577  __Pyx_RefNannySetupContext("updateExteriorElementBoundaryShockCapturingVelocity (wrapper)", 0);
29578  {
29579  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exteriorElementBoundaries,&__pyx_n_s_elementBoundaryElements,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_numDiff,&__pyx_n_s_grad_u,&__pyx_n_s_velocity,0};
29580  PyObject* values[6] = {0,0,0,0,0,0};
29581  if (unlikely(__pyx_kwds)) {
29582  Py_ssize_t kw_args;
29583  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
29584  switch (pos_args) {
29585  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
29586  CYTHON_FALLTHROUGH;
29587  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
29588  CYTHON_FALLTHROUGH;
29589  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
29590  CYTHON_FALLTHROUGH;
29591  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
29592  CYTHON_FALLTHROUGH;
29593  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
29594  CYTHON_FALLTHROUGH;
29595  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
29596  CYTHON_FALLTHROUGH;
29597  case 0: break;
29598  default: goto __pyx_L5_argtuple_error;
29599  }
29600  kw_args = PyDict_Size(__pyx_kwds);
29601  switch (pos_args) {
29602  case 0:
29603  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exteriorElementBoundaries)) != 0)) kw_args--;
29604  else goto __pyx_L5_argtuple_error;
29605  CYTHON_FALLTHROUGH;
29606  case 1:
29607  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElements)) != 0)) kw_args--;
29608  else {
29609  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundaryShockCapturingVelocity", 1, 6, 6, 1); __PYX_ERR(0, 5001, __pyx_L3_error)
29610  }
29611  CYTHON_FALLTHROUGH;
29612  case 2:
29613  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
29614  else {
29615  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundaryShockCapturingVelocity", 1, 6, 6, 2); __PYX_ERR(0, 5001, __pyx_L3_error)
29616  }
29617  CYTHON_FALLTHROUGH;
29618  case 3:
29619  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_numDiff)) != 0)) kw_args--;
29620  else {
29621  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundaryShockCapturingVelocity", 1, 6, 6, 3); __PYX_ERR(0, 5001, __pyx_L3_error)
29622  }
29623  CYTHON_FALLTHROUGH;
29624  case 4:
29625  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_u)) != 0)) kw_args--;
29626  else {
29627  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundaryShockCapturingVelocity", 1, 6, 6, 4); __PYX_ERR(0, 5001, __pyx_L3_error)
29628  }
29629  CYTHON_FALLTHROUGH;
29630  case 5:
29631  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_velocity)) != 0)) kw_args--;
29632  else {
29633  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundaryShockCapturingVelocity", 1, 6, 6, 5); __PYX_ERR(0, 5001, __pyx_L3_error)
29634  }
29635  }
29636  if (unlikely(kw_args > 0)) {
29637  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateExteriorElementBoundaryShockCapturingVelocity") < 0)) __PYX_ERR(0, 5001, __pyx_L3_error)
29638  }
29639  } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
29640  goto __pyx_L5_argtuple_error;
29641  } else {
29642  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
29643  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
29644  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
29645  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
29646  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
29647  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
29648  }
29649  __pyx_v_exteriorElementBoundaries = ((PyArrayObject *)values[0]);
29650  __pyx_v_elementBoundaryElements = ((PyArrayObject *)values[1]);
29651  __pyx_v_elementBoundaryLocalElementBoundaries = ((PyArrayObject *)values[2]);
29652  __pyx_v_numDiff = ((PyArrayObject *)values[3]);
29653  __pyx_v_grad_u = ((PyArrayObject *)values[4]);
29654  __pyx_v_velocity = ((PyArrayObject *)values[5]);
29655  }
29656  goto __pyx_L4_argument_unpacking_done;
29657  __pyx_L5_argtuple_error:;
29658  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundaryShockCapturingVelocity", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5001, __pyx_L3_error)
29659  __pyx_L3_error:;
29660  __Pyx_AddTraceback("cfemIntegrals.updateExteriorElementBoundaryShockCapturingVelocity", __pyx_clineno, __pyx_lineno, __pyx_filename);
29661  __Pyx_RefNannyFinishContext();
29662  return NULL;
29663  __pyx_L4_argument_unpacking_done:;
29664  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exteriorElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "exteriorElementBoundaries", 0))) __PYX_ERR(0, 5001, __pyx_L1_error)
29665  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElements), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElements", 0))) __PYX_ERR(0, 5002, __pyx_L1_error)
29666  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundaries", 0))) __PYX_ERR(0, 5003, __pyx_L1_error)
29667  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_numDiff), __pyx_ptype_5numpy_ndarray, 1, "numDiff", 0))) __PYX_ERR(0, 5004, __pyx_L1_error)
29668  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_u), __pyx_ptype_5numpy_ndarray, 1, "grad_u", 0))) __PYX_ERR(0, 5005, __pyx_L1_error)
29669  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_velocity), __pyx_ptype_5numpy_ndarray, 1, "velocity", 0))) __PYX_ERR(0, 5006, __pyx_L1_error)
29670  __pyx_r = __pyx_pf_13cfemIntegrals_252updateExteriorElementBoundaryShockCapturingVelocity(__pyx_self, __pyx_v_exteriorElementBoundaries, __pyx_v_elementBoundaryElements, __pyx_v_elementBoundaryLocalElementBoundaries, __pyx_v_numDiff, __pyx_v_grad_u, __pyx_v_velocity);
29671 
29672  /* function exit code */
29673  goto __pyx_L0;
29674  __pyx_L1_error:;
29675  __pyx_r = NULL;
29676  __pyx_L0:;
29677  __Pyx_RefNannyFinishContext();
29678  return __pyx_r;
29679 }
29680 
29681 static PyObject *__pyx_pf_13cfemIntegrals_252updateExteriorElementBoundaryShockCapturingVelocity(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_numDiff, PyArrayObject *__pyx_v_grad_u, PyArrayObject *__pyx_v_velocity) {
29682  PyObject *__pyx_r = NULL;
29683  __Pyx_RefNannyDeclarations
29684  int __pyx_t_1;
29685  int __pyx_lineno = 0;
29686  const char *__pyx_filename = NULL;
29687  int __pyx_clineno = 0;
29688  __Pyx_RefNannySetupContext("updateExteriorElementBoundaryShockCapturingVelocity", 0);
29689 
29690  /* "cfemIntegrals.pyx":5007
29691  * np.ndarray grad_u,
29692  * np.ndarray velocity):
29693  * if grad_u.ndim > 3: # <<<<<<<<<<<<<<
29694  * assert numDiff.shape[0] == grad_u.shape[0]
29695  * cupdateExteriorElementBoundaryShockCapturingVelocity(exteriorElementBoundaries.shape[0],
29696  */
29697  __pyx_t_1 = ((__pyx_v_grad_u->nd > 3) != 0);
29698  if (__pyx_t_1) {
29699 
29700  /* "cfemIntegrals.pyx":5008
29701  * np.ndarray velocity):
29702  * if grad_u.ndim > 3:
29703  * assert numDiff.shape[0] == grad_u.shape[0] # <<<<<<<<<<<<<<
29704  * cupdateExteriorElementBoundaryShockCapturingVelocity(exteriorElementBoundaries.shape[0],
29705  * grad_u.shape[1],
29706  */
29707  #ifndef CYTHON_WITHOUT_ASSERTIONS
29708  if (unlikely(!Py_OptimizeFlag)) {
29709  if (unlikely(!(((__pyx_v_numDiff->dimensions[0]) == (__pyx_v_grad_u->dimensions[0])) != 0))) {
29710  PyErr_SetNone(PyExc_AssertionError);
29711  __PYX_ERR(0, 5008, __pyx_L1_error)
29712  }
29713  }
29714  #endif
29715 
29716  /* "cfemIntegrals.pyx":5009
29717  * if grad_u.ndim > 3:
29718  * assert numDiff.shape[0] == grad_u.shape[0]
29719  * cupdateExteriorElementBoundaryShockCapturingVelocity(exteriorElementBoundaries.shape[0], # <<<<<<<<<<<<<<
29720  * grad_u.shape[1],
29721  * grad_u.shape[2],
29722  */
29723  updateExteriorElementBoundaryShockCapturingVelocity((__pyx_v_exteriorElementBoundaries->dimensions[0]), (__pyx_v_grad_u->dimensions[1]), (__pyx_v_grad_u->dimensions[2]), (__pyx_v_numDiff->dimensions[1]), (__pyx_v_grad_u->dimensions[3]), ((int *)__pyx_v_exteriorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), ((double *)__pyx_v_numDiff->data), ((double *)__pyx_v_grad_u->data), ((double *)__pyx_v_velocity->data));
29724 
29725  /* "cfemIntegrals.pyx":5007
29726  * np.ndarray grad_u,
29727  * np.ndarray velocity):
29728  * if grad_u.ndim > 3: # <<<<<<<<<<<<<<
29729  * assert numDiff.shape[0] == grad_u.shape[0]
29730  * cupdateExteriorElementBoundaryShockCapturingVelocity(exteriorElementBoundaries.shape[0],
29731  */
29732  goto __pyx_L3;
29733  }
29734 
29735  /* "cfemIntegrals.pyx":5021
29736  * <double*>velocity.data)
29737  * else:
29738  * assert numDiff.shape[0] == grad_u.shape[0] # <<<<<<<<<<<<<<
29739  * cupdateGlobalExteriorElementBoundaryShockCapturingVelocity(exteriorElementBoundaries.shape[0],
29740  * grad_u.shape[1],
29741  */
29742  /*else*/ {
29743  #ifndef CYTHON_WITHOUT_ASSERTIONS
29744  if (unlikely(!Py_OptimizeFlag)) {
29745  if (unlikely(!(((__pyx_v_numDiff->dimensions[0]) == (__pyx_v_grad_u->dimensions[0])) != 0))) {
29746  PyErr_SetNone(PyExc_AssertionError);
29747  __PYX_ERR(0, 5021, __pyx_L1_error)
29748  }
29749  }
29750  #endif
29751 
29752  /* "cfemIntegrals.pyx":5022
29753  * else:
29754  * assert numDiff.shape[0] == grad_u.shape[0]
29755  * cupdateGlobalExteriorElementBoundaryShockCapturingVelocity(exteriorElementBoundaries.shape[0], # <<<<<<<<<<<<<<
29756  * grad_u.shape[1],
29757  * grad_u.shape[2],
29758  */
29759  updateGlobalExteriorElementBoundaryShockCapturingVelocity((__pyx_v_exteriorElementBoundaries->dimensions[0]), (__pyx_v_grad_u->dimensions[1]), (__pyx_v_grad_u->dimensions[2]), ((int *)__pyx_v_exteriorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), ((double *)__pyx_v_numDiff->data), ((double *)__pyx_v_grad_u->data), ((double *)__pyx_v_velocity->data));
29760  }
29761  __pyx_L3:;
29762 
29763  /* "cfemIntegrals.pyx":5001
29764  * <double*>grad_u.data,
29765  * <double*>velocity.data)
29766  * def updateExteriorElementBoundaryShockCapturingVelocity(np.ndarray exteriorElementBoundaries, # <<<<<<<<<<<<<<
29767  * np.ndarray elementBoundaryElements,
29768  * np.ndarray elementBoundaryLocalElementBoundaries,
29769  */
29770 
29771  /* function exit code */
29772  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
29773  goto __pyx_L0;
29774  __pyx_L1_error:;
29775  __Pyx_AddTraceback("cfemIntegrals.updateExteriorElementBoundaryShockCapturingVelocity", __pyx_clineno, __pyx_lineno, __pyx_filename);
29776  __pyx_r = NULL;
29777  __pyx_L0:;
29778  __Pyx_XGIVEREF(__pyx_r);
29779  __Pyx_RefNannyFinishContext();
29780  return __pyx_r;
29781 }
29782 
29783 /* "cfemIntegrals.pyx":5031
29784  * <double*> grad_u.data,
29785  * <double*> velocity.data)
29786  * def calculateInteriorElementBoundaryAverageVelocity(np.ndarray interiorElementBoundaries, # <<<<<<<<<<<<<<
29787  * np.ndarray elementBoundaryElements,
29788  * np.ndarray elementBoundaryLocalElementBoundaries,
29789  */
29790 
29791 /* Python wrapper */
29792 static PyObject *__pyx_pw_13cfemIntegrals_255calculateInteriorElementBoundaryAverageVelocity(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
29793 static PyMethodDef __pyx_mdef_13cfemIntegrals_255calculateInteriorElementBoundaryAverageVelocity = {"calculateInteriorElementBoundaryAverageVelocity", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_255calculateInteriorElementBoundaryAverageVelocity, METH_VARARGS|METH_KEYWORDS, 0};
29794 static PyObject *__pyx_pw_13cfemIntegrals_255calculateInteriorElementBoundaryAverageVelocity(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
29795  PyArrayObject *__pyx_v_interiorElementBoundaries = 0;
29796  PyArrayObject *__pyx_v_elementBoundaryElements = 0;
29797  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries = 0;
29798  PyArrayObject *__pyx_v_v = 0;
29799  PyArrayObject *__pyx_v_vAverage = 0;
29800  int __pyx_lineno = 0;
29801  const char *__pyx_filename = NULL;
29802  int __pyx_clineno = 0;
29803  PyObject *__pyx_r = 0;
29804  __Pyx_RefNannyDeclarations
29805  __Pyx_RefNannySetupContext("calculateInteriorElementBoundaryAverageVelocity (wrapper)", 0);
29806  {
29807  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_interiorElementBoundaries,&__pyx_n_s_elementBoundaryElements,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_v,&__pyx_n_s_vAverage,0};
29808  PyObject* values[5] = {0,0,0,0,0};
29809  if (unlikely(__pyx_kwds)) {
29810  Py_ssize_t kw_args;
29811  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
29812  switch (pos_args) {
29813  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
29814  CYTHON_FALLTHROUGH;
29815  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
29816  CYTHON_FALLTHROUGH;
29817  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
29818  CYTHON_FALLTHROUGH;
29819  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
29820  CYTHON_FALLTHROUGH;
29821  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
29822  CYTHON_FALLTHROUGH;
29823  case 0: break;
29824  default: goto __pyx_L5_argtuple_error;
29825  }
29826  kw_args = PyDict_Size(__pyx_kwds);
29827  switch (pos_args) {
29828  case 0:
29829  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_interiorElementBoundaries)) != 0)) kw_args--;
29830  else goto __pyx_L5_argtuple_error;
29831  CYTHON_FALLTHROUGH;
29832  case 1:
29833  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElements)) != 0)) kw_args--;
29834  else {
29835  __Pyx_RaiseArgtupleInvalid("calculateInteriorElementBoundaryAverageVelocity", 1, 5, 5, 1); __PYX_ERR(0, 5031, __pyx_L3_error)
29836  }
29837  CYTHON_FALLTHROUGH;
29838  case 2:
29839  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
29840  else {
29841  __Pyx_RaiseArgtupleInvalid("calculateInteriorElementBoundaryAverageVelocity", 1, 5, 5, 2); __PYX_ERR(0, 5031, __pyx_L3_error)
29842  }
29843  CYTHON_FALLTHROUGH;
29844  case 3:
29845  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
29846  else {
29847  __Pyx_RaiseArgtupleInvalid("calculateInteriorElementBoundaryAverageVelocity", 1, 5, 5, 3); __PYX_ERR(0, 5031, __pyx_L3_error)
29848  }
29849  CYTHON_FALLTHROUGH;
29850  case 4:
29851  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vAverage)) != 0)) kw_args--;
29852  else {
29853  __Pyx_RaiseArgtupleInvalid("calculateInteriorElementBoundaryAverageVelocity", 1, 5, 5, 4); __PYX_ERR(0, 5031, __pyx_L3_error)
29854  }
29855  }
29856  if (unlikely(kw_args > 0)) {
29857  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateInteriorElementBoundaryAverageVelocity") < 0)) __PYX_ERR(0, 5031, __pyx_L3_error)
29858  }
29859  } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
29860  goto __pyx_L5_argtuple_error;
29861  } else {
29862  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
29863  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
29864  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
29865  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
29866  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
29867  }
29868  __pyx_v_interiorElementBoundaries = ((PyArrayObject *)values[0]);
29869  __pyx_v_elementBoundaryElements = ((PyArrayObject *)values[1]);
29870  __pyx_v_elementBoundaryLocalElementBoundaries = ((PyArrayObject *)values[2]);
29871  __pyx_v_v = ((PyArrayObject *)values[3]);
29872  __pyx_v_vAverage = ((PyArrayObject *)values[4]);
29873  }
29874  goto __pyx_L4_argument_unpacking_done;
29875  __pyx_L5_argtuple_error:;
29876  __Pyx_RaiseArgtupleInvalid("calculateInteriorElementBoundaryAverageVelocity", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5031, __pyx_L3_error)
29877  __pyx_L3_error:;
29878  __Pyx_AddTraceback("cfemIntegrals.calculateInteriorElementBoundaryAverageVelocity", __pyx_clineno, __pyx_lineno, __pyx_filename);
29879  __Pyx_RefNannyFinishContext();
29880  return NULL;
29881  __pyx_L4_argument_unpacking_done:;
29882  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_interiorElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "interiorElementBoundaries", 0))) __PYX_ERR(0, 5031, __pyx_L1_error)
29883  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElements), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElements", 0))) __PYX_ERR(0, 5032, __pyx_L1_error)
29884  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundaries", 0))) __PYX_ERR(0, 5033, __pyx_L1_error)
29885  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), __pyx_ptype_5numpy_ndarray, 1, "v", 0))) __PYX_ERR(0, 5034, __pyx_L1_error)
29886  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vAverage), __pyx_ptype_5numpy_ndarray, 1, "vAverage", 0))) __PYX_ERR(0, 5035, __pyx_L1_error)
29887  __pyx_r = __pyx_pf_13cfemIntegrals_254calculateInteriorElementBoundaryAverageVelocity(__pyx_self, __pyx_v_interiorElementBoundaries, __pyx_v_elementBoundaryElements, __pyx_v_elementBoundaryLocalElementBoundaries, __pyx_v_v, __pyx_v_vAverage);
29888 
29889  /* function exit code */
29890  goto __pyx_L0;
29891  __pyx_L1_error:;
29892  __pyx_r = NULL;
29893  __pyx_L0:;
29894  __Pyx_RefNannyFinishContext();
29895  return __pyx_r;
29896 }
29897 
29898 static PyObject *__pyx_pf_13cfemIntegrals_254calculateInteriorElementBoundaryAverageVelocity(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_interiorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_vAverage) {
29899  int __pyx_v_nInteriorElementBoundaries_global;
29900  int __pyx_v_nElementBoundaries_element;
29901  int __pyx_v_nQuadraturePoints_elementBoundary;
29902  int __pyx_v_nSpace;
29903  PyObject *__pyx_r = NULL;
29904  __Pyx_RefNannyDeclarations
29905  __Pyx_RefNannySetupContext("calculateInteriorElementBoundaryAverageVelocity", 0);
29906 
29907  /* "cfemIntegrals.pyx":5036
29908  * np.ndarray v,
29909  * np.ndarray vAverage):
29910  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0] # <<<<<<<<<<<<<<
29911  * cdef int nElementBoundaries_element = v.shape[1]
29912  * cdef int nQuadraturePoints_elementBoundary = v.shape[2]
29913  */
29914  __pyx_v_nInteriorElementBoundaries_global = (__pyx_v_interiorElementBoundaries->dimensions[0]);
29915 
29916  /* "cfemIntegrals.pyx":5037
29917  * np.ndarray vAverage):
29918  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0]
29919  * cdef int nElementBoundaries_element = v.shape[1] # <<<<<<<<<<<<<<
29920  * cdef int nQuadraturePoints_elementBoundary = v.shape[2]
29921  * cdef int nSpace = v.shape[3]
29922  */
29923  __pyx_v_nElementBoundaries_element = (__pyx_v_v->dimensions[1]);
29924 
29925  /* "cfemIntegrals.pyx":5038
29926  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0]
29927  * cdef int nElementBoundaries_element = v.shape[1]
29928  * cdef int nQuadraturePoints_elementBoundary = v.shape[2] # <<<<<<<<<<<<<<
29929  * cdef int nSpace = v.shape[3]
29930  * ccalculateInteriorElementBoundaryAverageVelocity(nInteriorElementBoundaries_global,
29931  */
29932  __pyx_v_nQuadraturePoints_elementBoundary = (__pyx_v_v->dimensions[2]);
29933 
29934  /* "cfemIntegrals.pyx":5039
29935  * cdef int nElementBoundaries_element = v.shape[1]
29936  * cdef int nQuadraturePoints_elementBoundary = v.shape[2]
29937  * cdef int nSpace = v.shape[3] # <<<<<<<<<<<<<<
29938  * ccalculateInteriorElementBoundaryAverageVelocity(nInteriorElementBoundaries_global,
29939  * nElementBoundaries_element,
29940  */
29941  __pyx_v_nSpace = (__pyx_v_v->dimensions[3]);
29942 
29943  /* "cfemIntegrals.pyx":5040
29944  * cdef int nQuadraturePoints_elementBoundary = v.shape[2]
29945  * cdef int nSpace = v.shape[3]
29946  * ccalculateInteriorElementBoundaryAverageVelocity(nInteriorElementBoundaries_global, # <<<<<<<<<<<<<<
29947  * nElementBoundaries_element,
29948  * nQuadraturePoints_elementBoundary,
29949  */
29950  calculateInteriorElementBoundaryAverageVelocity(__pyx_v_nInteriorElementBoundaries_global, __pyx_v_nElementBoundaries_element, __pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nSpace, ((int *)__pyx_v_interiorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), ((double *)__pyx_v_v->data), ((double *)__pyx_v_vAverage->data));
29951 
29952  /* "cfemIntegrals.pyx":5031
29953  * <double*> grad_u.data,
29954  * <double*> velocity.data)
29955  * def calculateInteriorElementBoundaryAverageVelocity(np.ndarray interiorElementBoundaries, # <<<<<<<<<<<<<<
29956  * np.ndarray elementBoundaryElements,
29957  * np.ndarray elementBoundaryLocalElementBoundaries,
29958  */
29959 
29960  /* function exit code */
29961  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
29962  __Pyx_XGIVEREF(__pyx_r);
29963  __Pyx_RefNannyFinishContext();
29964  return __pyx_r;
29965 }
29966 
29967 /* "cfemIntegrals.pyx":5049
29968  * <double*>v.data,
29969  * <double*>vAverage.data)
29970  * def calculateExteriorElementBoundaryAverageVelocity(np.ndarray exteriorElementBoundaries, # <<<<<<<<<<<<<<
29971  * np.ndarray elementBoundaryElements,
29972  * np.ndarray elementBoundaryLocalElementBoundaries,
29973  */
29974 
29975 /* Python wrapper */
29976 static PyObject *__pyx_pw_13cfemIntegrals_257calculateExteriorElementBoundaryAverageVelocity(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
29977 static PyMethodDef __pyx_mdef_13cfemIntegrals_257calculateExteriorElementBoundaryAverageVelocity = {"calculateExteriorElementBoundaryAverageVelocity", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_257calculateExteriorElementBoundaryAverageVelocity, METH_VARARGS|METH_KEYWORDS, 0};
29978 static PyObject *__pyx_pw_13cfemIntegrals_257calculateExteriorElementBoundaryAverageVelocity(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
29979  PyArrayObject *__pyx_v_exteriorElementBoundaries = 0;
29980  PyArrayObject *__pyx_v_elementBoundaryElements = 0;
29981  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries = 0;
29982  PyArrayObject *__pyx_v_v = 0;
29983  PyArrayObject *__pyx_v_vAverage = 0;
29984  int __pyx_lineno = 0;
29985  const char *__pyx_filename = NULL;
29986  int __pyx_clineno = 0;
29987  PyObject *__pyx_r = 0;
29988  __Pyx_RefNannyDeclarations
29989  __Pyx_RefNannySetupContext("calculateExteriorElementBoundaryAverageVelocity (wrapper)", 0);
29990  {
29991  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exteriorElementBoundaries,&__pyx_n_s_elementBoundaryElements,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_v,&__pyx_n_s_vAverage,0};
29992  PyObject* values[5] = {0,0,0,0,0};
29993  if (unlikely(__pyx_kwds)) {
29994  Py_ssize_t kw_args;
29995  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
29996  switch (pos_args) {
29997  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
29998  CYTHON_FALLTHROUGH;
29999  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
30000  CYTHON_FALLTHROUGH;
30001  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
30002  CYTHON_FALLTHROUGH;
30003  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
30004  CYTHON_FALLTHROUGH;
30005  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
30006  CYTHON_FALLTHROUGH;
30007  case 0: break;
30008  default: goto __pyx_L5_argtuple_error;
30009  }
30010  kw_args = PyDict_Size(__pyx_kwds);
30011  switch (pos_args) {
30012  case 0:
30013  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exteriorElementBoundaries)) != 0)) kw_args--;
30014  else goto __pyx_L5_argtuple_error;
30015  CYTHON_FALLTHROUGH;
30016  case 1:
30017  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElements)) != 0)) kw_args--;
30018  else {
30019  __Pyx_RaiseArgtupleInvalid("calculateExteriorElementBoundaryAverageVelocity", 1, 5, 5, 1); __PYX_ERR(0, 5049, __pyx_L3_error)
30020  }
30021  CYTHON_FALLTHROUGH;
30022  case 2:
30023  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
30024  else {
30025  __Pyx_RaiseArgtupleInvalid("calculateExteriorElementBoundaryAverageVelocity", 1, 5, 5, 2); __PYX_ERR(0, 5049, __pyx_L3_error)
30026  }
30027  CYTHON_FALLTHROUGH;
30028  case 3:
30029  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
30030  else {
30031  __Pyx_RaiseArgtupleInvalid("calculateExteriorElementBoundaryAverageVelocity", 1, 5, 5, 3); __PYX_ERR(0, 5049, __pyx_L3_error)
30032  }
30033  CYTHON_FALLTHROUGH;
30034  case 4:
30035  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vAverage)) != 0)) kw_args--;
30036  else {
30037  __Pyx_RaiseArgtupleInvalid("calculateExteriorElementBoundaryAverageVelocity", 1, 5, 5, 4); __PYX_ERR(0, 5049, __pyx_L3_error)
30038  }
30039  }
30040  if (unlikely(kw_args > 0)) {
30041  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateExteriorElementBoundaryAverageVelocity") < 0)) __PYX_ERR(0, 5049, __pyx_L3_error)
30042  }
30043  } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
30044  goto __pyx_L5_argtuple_error;
30045  } else {
30046  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
30047  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
30048  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
30049  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
30050  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
30051  }
30052  __pyx_v_exteriorElementBoundaries = ((PyArrayObject *)values[0]);
30053  __pyx_v_elementBoundaryElements = ((PyArrayObject *)values[1]);
30054  __pyx_v_elementBoundaryLocalElementBoundaries = ((PyArrayObject *)values[2]);
30055  __pyx_v_v = ((PyArrayObject *)values[3]);
30056  __pyx_v_vAverage = ((PyArrayObject *)values[4]);
30057  }
30058  goto __pyx_L4_argument_unpacking_done;
30059  __pyx_L5_argtuple_error:;
30060  __Pyx_RaiseArgtupleInvalid("calculateExteriorElementBoundaryAverageVelocity", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5049, __pyx_L3_error)
30061  __pyx_L3_error:;
30062  __Pyx_AddTraceback("cfemIntegrals.calculateExteriorElementBoundaryAverageVelocity", __pyx_clineno, __pyx_lineno, __pyx_filename);
30063  __Pyx_RefNannyFinishContext();
30064  return NULL;
30065  __pyx_L4_argument_unpacking_done:;
30066  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exteriorElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "exteriorElementBoundaries", 0))) __PYX_ERR(0, 5049, __pyx_L1_error)
30067  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElements), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElements", 0))) __PYX_ERR(0, 5050, __pyx_L1_error)
30068  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundaries", 0))) __PYX_ERR(0, 5051, __pyx_L1_error)
30069  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), __pyx_ptype_5numpy_ndarray, 1, "v", 0))) __PYX_ERR(0, 5052, __pyx_L1_error)
30070  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vAverage), __pyx_ptype_5numpy_ndarray, 1, "vAverage", 0))) __PYX_ERR(0, 5053, __pyx_L1_error)
30071  __pyx_r = __pyx_pf_13cfemIntegrals_256calculateExteriorElementBoundaryAverageVelocity(__pyx_self, __pyx_v_exteriorElementBoundaries, __pyx_v_elementBoundaryElements, __pyx_v_elementBoundaryLocalElementBoundaries, __pyx_v_v, __pyx_v_vAverage);
30072 
30073  /* function exit code */
30074  goto __pyx_L0;
30075  __pyx_L1_error:;
30076  __pyx_r = NULL;
30077  __pyx_L0:;
30078  __Pyx_RefNannyFinishContext();
30079  return __pyx_r;
30080 }
30081 
30082 static PyObject *__pyx_pf_13cfemIntegrals_256calculateExteriorElementBoundaryAverageVelocity(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_vAverage) {
30083  int __pyx_v_nExteriorElementBoundaries_global;
30084  int __pyx_v_nElementBoundaries_element;
30085  int __pyx_v_nQuadraturePoints_elementBoundary;
30086  int __pyx_v_nSpace;
30087  PyObject *__pyx_r = NULL;
30088  __Pyx_RefNannyDeclarations
30089  __Pyx_RefNannySetupContext("calculateExteriorElementBoundaryAverageVelocity", 0);
30090 
30091  /* "cfemIntegrals.pyx":5054
30092  * np.ndarray v,
30093  * np.ndarray vAverage):
30094  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundaries.shape[0] # <<<<<<<<<<<<<<
30095  * cdef int nElementBoundaries_element = v.shape[1]
30096  * cdef int nQuadraturePoints_elementBoundary = v.shape[2]
30097  */
30098  __pyx_v_nExteriorElementBoundaries_global = (__pyx_v_exteriorElementBoundaries->dimensions[0]);
30099 
30100  /* "cfemIntegrals.pyx":5055
30101  * np.ndarray vAverage):
30102  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundaries.shape[0]
30103  * cdef int nElementBoundaries_element = v.shape[1] # <<<<<<<<<<<<<<
30104  * cdef int nQuadraturePoints_elementBoundary = v.shape[2]
30105  * cdef int nSpace = v.shape[3]
30106  */
30107  __pyx_v_nElementBoundaries_element = (__pyx_v_v->dimensions[1]);
30108 
30109  /* "cfemIntegrals.pyx":5056
30110  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundaries.shape[0]
30111  * cdef int nElementBoundaries_element = v.shape[1]
30112  * cdef int nQuadraturePoints_elementBoundary = v.shape[2] # <<<<<<<<<<<<<<
30113  * cdef int nSpace = v.shape[3]
30114  * ccalculateExteriorElementBoundaryAverageVelocity(nExteriorElementBoundaries_global,
30115  */
30116  __pyx_v_nQuadraturePoints_elementBoundary = (__pyx_v_v->dimensions[2]);
30117 
30118  /* "cfemIntegrals.pyx":5057
30119  * cdef int nElementBoundaries_element = v.shape[1]
30120  * cdef int nQuadraturePoints_elementBoundary = v.shape[2]
30121  * cdef int nSpace = v.shape[3] # <<<<<<<<<<<<<<
30122  * ccalculateExteriorElementBoundaryAverageVelocity(nExteriorElementBoundaries_global,
30123  * nElementBoundaries_element,
30124  */
30125  __pyx_v_nSpace = (__pyx_v_v->dimensions[3]);
30126 
30127  /* "cfemIntegrals.pyx":5058
30128  * cdef int nQuadraturePoints_elementBoundary = v.shape[2]
30129  * cdef int nSpace = v.shape[3]
30130  * ccalculateExteriorElementBoundaryAverageVelocity(nExteriorElementBoundaries_global, # <<<<<<<<<<<<<<
30131  * nElementBoundaries_element,
30132  * nQuadraturePoints_elementBoundary,
30133  */
30134  calculateExteriorElementBoundaryAverageVelocity(__pyx_v_nExteriorElementBoundaries_global, __pyx_v_nElementBoundaries_element, __pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nSpace, ((int *)__pyx_v_exteriorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), ((double *)__pyx_v_v->data), ((double *)__pyx_v_vAverage->data));
30135 
30136  /* "cfemIntegrals.pyx":5049
30137  * <double*>v.data,
30138  * <double*>vAverage.data)
30139  * def calculateExteriorElementBoundaryAverageVelocity(np.ndarray exteriorElementBoundaries, # <<<<<<<<<<<<<<
30140  * np.ndarray elementBoundaryElements,
30141  * np.ndarray elementBoundaryLocalElementBoundaries,
30142  */
30143 
30144  /* function exit code */
30145  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
30146  __Pyx_XGIVEREF(__pyx_r);
30147  __Pyx_RefNannyFinishContext();
30148  return __pyx_r;
30149 }
30150 
30151 /* "cfemIntegrals.pyx":5067
30152  * <double*>v.data,
30153  * <double*>vAverage.data)
30154  * def calculateConservationResidualDG(np.ndarray elementResidual, # <<<<<<<<<<<<<<
30155  * np.ndarray conservationResidual):
30156  * cdef int nElements_global = elementResidual.shape[0]
30157  */
30158 
30159 /* Python wrapper */
30160 static PyObject *__pyx_pw_13cfemIntegrals_259calculateConservationResidualDG(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
30161 static PyMethodDef __pyx_mdef_13cfemIntegrals_259calculateConservationResidualDG = {"calculateConservationResidualDG", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_259calculateConservationResidualDG, METH_VARARGS|METH_KEYWORDS, 0};
30162 static PyObject *__pyx_pw_13cfemIntegrals_259calculateConservationResidualDG(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
30163  PyArrayObject *__pyx_v_elementResidual = 0;
30164  PyArrayObject *__pyx_v_conservationResidual = 0;
30165  int __pyx_lineno = 0;
30166  const char *__pyx_filename = NULL;
30167  int __pyx_clineno = 0;
30168  PyObject *__pyx_r = 0;
30169  __Pyx_RefNannyDeclarations
30170  __Pyx_RefNannySetupContext("calculateConservationResidualDG (wrapper)", 0);
30171  {
30172  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_elementResidual,&__pyx_n_s_conservationResidual,0};
30173  PyObject* values[2] = {0,0};
30174  if (unlikely(__pyx_kwds)) {
30175  Py_ssize_t kw_args;
30176  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
30177  switch (pos_args) {
30178  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
30179  CYTHON_FALLTHROUGH;
30180  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
30181  CYTHON_FALLTHROUGH;
30182  case 0: break;
30183  default: goto __pyx_L5_argtuple_error;
30184  }
30185  kw_args = PyDict_Size(__pyx_kwds);
30186  switch (pos_args) {
30187  case 0:
30188  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementResidual)) != 0)) kw_args--;
30189  else goto __pyx_L5_argtuple_error;
30190  CYTHON_FALLTHROUGH;
30191  case 1:
30192  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_conservationResidual)) != 0)) kw_args--;
30193  else {
30194  __Pyx_RaiseArgtupleInvalid("calculateConservationResidualDG", 1, 2, 2, 1); __PYX_ERR(0, 5067, __pyx_L3_error)
30195  }
30196  }
30197  if (unlikely(kw_args > 0)) {
30198  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateConservationResidualDG") < 0)) __PYX_ERR(0, 5067, __pyx_L3_error)
30199  }
30200  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
30201  goto __pyx_L5_argtuple_error;
30202  } else {
30203  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
30204  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
30205  }
30206  __pyx_v_elementResidual = ((PyArrayObject *)values[0]);
30207  __pyx_v_conservationResidual = ((PyArrayObject *)values[1]);
30208  }
30209  goto __pyx_L4_argument_unpacking_done;
30210  __pyx_L5_argtuple_error:;
30211  __Pyx_RaiseArgtupleInvalid("calculateConservationResidualDG", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5067, __pyx_L3_error)
30212  __pyx_L3_error:;
30213  __Pyx_AddTraceback("cfemIntegrals.calculateConservationResidualDG", __pyx_clineno, __pyx_lineno, __pyx_filename);
30214  __Pyx_RefNannyFinishContext();
30215  return NULL;
30216  __pyx_L4_argument_unpacking_done:;
30217  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementResidual), __pyx_ptype_5numpy_ndarray, 1, "elementResidual", 0))) __PYX_ERR(0, 5067, __pyx_L1_error)
30218  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_conservationResidual), __pyx_ptype_5numpy_ndarray, 1, "conservationResidual", 0))) __PYX_ERR(0, 5068, __pyx_L1_error)
30219  __pyx_r = __pyx_pf_13cfemIntegrals_258calculateConservationResidualDG(__pyx_self, __pyx_v_elementResidual, __pyx_v_conservationResidual);
30220 
30221  /* function exit code */
30222  goto __pyx_L0;
30223  __pyx_L1_error:;
30224  __pyx_r = NULL;
30225  __pyx_L0:;
30226  __Pyx_RefNannyFinishContext();
30227  return __pyx_r;
30228 }
30229 
30230 static PyObject *__pyx_pf_13cfemIntegrals_258calculateConservationResidualDG(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementResidual, PyArrayObject *__pyx_v_conservationResidual) {
30231  int __pyx_v_nElements_global;
30232  int __pyx_v_nDOF_test_element;
30233  PyObject *__pyx_r = NULL;
30234  __Pyx_RefNannyDeclarations
30235  __Pyx_RefNannySetupContext("calculateConservationResidualDG", 0);
30236 
30237  /* "cfemIntegrals.pyx":5069
30238  * def calculateConservationResidualDG(np.ndarray elementResidual,
30239  * np.ndarray conservationResidual):
30240  * cdef int nElements_global = elementResidual.shape[0] # <<<<<<<<<<<<<<
30241  * cdef int nDOF_test_element = elementResidual.shape[1]
30242  * ccalculateConservationResidualDG(nElements_global,
30243  */
30244  __pyx_v_nElements_global = (__pyx_v_elementResidual->dimensions[0]);
30245 
30246  /* "cfemIntegrals.pyx":5070
30247  * np.ndarray conservationResidual):
30248  * cdef int nElements_global = elementResidual.shape[0]
30249  * cdef int nDOF_test_element = elementResidual.shape[1] # <<<<<<<<<<<<<<
30250  * ccalculateConservationResidualDG(nElements_global,
30251  * nDOF_test_element,
30252  */
30253  __pyx_v_nDOF_test_element = (__pyx_v_elementResidual->dimensions[1]);
30254 
30255  /* "cfemIntegrals.pyx":5071
30256  * cdef int nElements_global = elementResidual.shape[0]
30257  * cdef int nDOF_test_element = elementResidual.shape[1]
30258  * ccalculateConservationResidualDG(nElements_global, # <<<<<<<<<<<<<<
30259  * nDOF_test_element,
30260  * <double*>elementResidual.data,
30261  */
30262  calculateConservationResidualDG(__pyx_v_nElements_global, __pyx_v_nDOF_test_element, ((double *)__pyx_v_elementResidual->data), ((double *)__pyx_v_conservationResidual->data));
30263 
30264  /* "cfemIntegrals.pyx":5067
30265  * <double*>v.data,
30266  * <double*>vAverage.data)
30267  * def calculateConservationResidualDG(np.ndarray elementResidual, # <<<<<<<<<<<<<<
30268  * np.ndarray conservationResidual):
30269  * cdef int nElements_global = elementResidual.shape[0]
30270  */
30271 
30272  /* function exit code */
30273  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
30274  __Pyx_XGIVEREF(__pyx_r);
30275  __Pyx_RefNannyFinishContext();
30276  return __pyx_r;
30277 }
30278 
30279 /* "cfemIntegrals.pyx":5075
30280  * <double*>elementResidual.data,
30281  * <double*>conservationResidual.data)
30282  * def calculateConservationResidual(np.ndarray n, # <<<<<<<<<<<<<<
30283  * np.ndarray dS_u,
30284  * np.ndarray elementResidual,
30285  */
30286 
30287 /* Python wrapper */
30288 static PyObject *__pyx_pw_13cfemIntegrals_261calculateConservationResidual(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
30289 static PyMethodDef __pyx_mdef_13cfemIntegrals_261calculateConservationResidual = {"calculateConservationResidual", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_261calculateConservationResidual, METH_VARARGS|METH_KEYWORDS, 0};
30290 static PyObject *__pyx_pw_13cfemIntegrals_261calculateConservationResidual(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
30291  PyArrayObject *__pyx_v_n = 0;
30292  PyArrayObject *__pyx_v_dS_u = 0;
30293  PyArrayObject *__pyx_v_elementResidual = 0;
30294  PyArrayObject *__pyx_v_velocity = 0;
30295  PyArrayObject *__pyx_v_conservationResidual = 0;
30296  int __pyx_lineno = 0;
30297  const char *__pyx_filename = NULL;
30298  int __pyx_clineno = 0;
30299  PyObject *__pyx_r = 0;
30300  __Pyx_RefNannyDeclarations
30301  __Pyx_RefNannySetupContext("calculateConservationResidual (wrapper)", 0);
30302  {
30303  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_n,&__pyx_n_s_dS_u,&__pyx_n_s_elementResidual,&__pyx_n_s_velocity,&__pyx_n_s_conservationResidual,0};
30304  PyObject* values[5] = {0,0,0,0,0};
30305  if (unlikely(__pyx_kwds)) {
30306  Py_ssize_t kw_args;
30307  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
30308  switch (pos_args) {
30309  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
30310  CYTHON_FALLTHROUGH;
30311  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
30312  CYTHON_FALLTHROUGH;
30313  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
30314  CYTHON_FALLTHROUGH;
30315  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
30316  CYTHON_FALLTHROUGH;
30317  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
30318  CYTHON_FALLTHROUGH;
30319  case 0: break;
30320  default: goto __pyx_L5_argtuple_error;
30321  }
30322  kw_args = PyDict_Size(__pyx_kwds);
30323  switch (pos_args) {
30324  case 0:
30325  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n)) != 0)) kw_args--;
30326  else goto __pyx_L5_argtuple_error;
30327  CYTHON_FALLTHROUGH;
30328  case 1:
30329  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dS_u)) != 0)) kw_args--;
30330  else {
30331  __Pyx_RaiseArgtupleInvalid("calculateConservationResidual", 1, 5, 5, 1); __PYX_ERR(0, 5075, __pyx_L3_error)
30332  }
30333  CYTHON_FALLTHROUGH;
30334  case 2:
30335  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementResidual)) != 0)) kw_args--;
30336  else {
30337  __Pyx_RaiseArgtupleInvalid("calculateConservationResidual", 1, 5, 5, 2); __PYX_ERR(0, 5075, __pyx_L3_error)
30338  }
30339  CYTHON_FALLTHROUGH;
30340  case 3:
30341  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_velocity)) != 0)) kw_args--;
30342  else {
30343  __Pyx_RaiseArgtupleInvalid("calculateConservationResidual", 1, 5, 5, 3); __PYX_ERR(0, 5075, __pyx_L3_error)
30344  }
30345  CYTHON_FALLTHROUGH;
30346  case 4:
30347  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_conservationResidual)) != 0)) kw_args--;
30348  else {
30349  __Pyx_RaiseArgtupleInvalid("calculateConservationResidual", 1, 5, 5, 4); __PYX_ERR(0, 5075, __pyx_L3_error)
30350  }
30351  }
30352  if (unlikely(kw_args > 0)) {
30353  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateConservationResidual") < 0)) __PYX_ERR(0, 5075, __pyx_L3_error)
30354  }
30355  } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
30356  goto __pyx_L5_argtuple_error;
30357  } else {
30358  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
30359  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
30360  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
30361  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
30362  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
30363  }
30364  __pyx_v_n = ((PyArrayObject *)values[0]);
30365  __pyx_v_dS_u = ((PyArrayObject *)values[1]);
30366  __pyx_v_elementResidual = ((PyArrayObject *)values[2]);
30367  __pyx_v_velocity = ((PyArrayObject *)values[3]);
30368  __pyx_v_conservationResidual = ((PyArrayObject *)values[4]);
30369  }
30370  goto __pyx_L4_argument_unpacking_done;
30371  __pyx_L5_argtuple_error:;
30372  __Pyx_RaiseArgtupleInvalid("calculateConservationResidual", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5075, __pyx_L3_error)
30373  __pyx_L3_error:;
30374  __Pyx_AddTraceback("cfemIntegrals.calculateConservationResidual", __pyx_clineno, __pyx_lineno, __pyx_filename);
30375  __Pyx_RefNannyFinishContext();
30376  return NULL;
30377  __pyx_L4_argument_unpacking_done:;
30378  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_n), __pyx_ptype_5numpy_ndarray, 1, "n", 0))) __PYX_ERR(0, 5075, __pyx_L1_error)
30379  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dS_u), __pyx_ptype_5numpy_ndarray, 1, "dS_u", 0))) __PYX_ERR(0, 5076, __pyx_L1_error)
30380  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementResidual), __pyx_ptype_5numpy_ndarray, 1, "elementResidual", 0))) __PYX_ERR(0, 5077, __pyx_L1_error)
30381  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_velocity), __pyx_ptype_5numpy_ndarray, 1, "velocity", 0))) __PYX_ERR(0, 5078, __pyx_L1_error)
30382  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_conservationResidual), __pyx_ptype_5numpy_ndarray, 1, "conservationResidual", 0))) __PYX_ERR(0, 5079, __pyx_L1_error)
30383  __pyx_r = __pyx_pf_13cfemIntegrals_260calculateConservationResidual(__pyx_self, __pyx_v_n, __pyx_v_dS_u, __pyx_v_elementResidual, __pyx_v_velocity, __pyx_v_conservationResidual);
30384 
30385  /* function exit code */
30386  goto __pyx_L0;
30387  __pyx_L1_error:;
30388  __pyx_r = NULL;
30389  __pyx_L0:;
30390  __Pyx_RefNannyFinishContext();
30391  return __pyx_r;
30392 }
30393 
30394 static PyObject *__pyx_pf_13cfemIntegrals_260calculateConservationResidual(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_n, PyArrayObject *__pyx_v_dS_u, PyArrayObject *__pyx_v_elementResidual, PyArrayObject *__pyx_v_velocity, PyArrayObject *__pyx_v_conservationResidual) {
30395  int __pyx_v_nElements_global;
30396  int __pyx_v_nDOF_test_element;
30397  int __pyx_v_nElementBoundaries_element;
30398  int __pyx_v_nQuadraturePoints_elementBoundary;
30399  int __pyx_v_nSpace;
30400  PyObject *__pyx_r = NULL;
30401  __Pyx_RefNannyDeclarations
30402  __Pyx_RefNannySetupContext("calculateConservationResidual", 0);
30403 
30404  /* "cfemIntegrals.pyx":5080
30405  * np.ndarray velocity,
30406  * np.ndarray conservationResidual):
30407  * cdef int nElements_global = elementResidual.shape[0] # <<<<<<<<<<<<<<
30408  * cdef int nDOF_test_element = elementResidual.shape[1]
30409  * cdef int nElementBoundaries_element = n.shape[1]
30410  */
30411  __pyx_v_nElements_global = (__pyx_v_elementResidual->dimensions[0]);
30412 
30413  /* "cfemIntegrals.pyx":5081
30414  * np.ndarray conservationResidual):
30415  * cdef int nElements_global = elementResidual.shape[0]
30416  * cdef int nDOF_test_element = elementResidual.shape[1] # <<<<<<<<<<<<<<
30417  * cdef int nElementBoundaries_element = n.shape[1]
30418  * cdef int nQuadraturePoints_elementBoundary = n.shape[2]
30419  */
30420  __pyx_v_nDOF_test_element = (__pyx_v_elementResidual->dimensions[1]);
30421 
30422  /* "cfemIntegrals.pyx":5082
30423  * cdef int nElements_global = elementResidual.shape[0]
30424  * cdef int nDOF_test_element = elementResidual.shape[1]
30425  * cdef int nElementBoundaries_element = n.shape[1] # <<<<<<<<<<<<<<
30426  * cdef int nQuadraturePoints_elementBoundary = n.shape[2]
30427  * cdef int nSpace = n.shape[3]
30428  */
30429  __pyx_v_nElementBoundaries_element = (__pyx_v_n->dimensions[1]);
30430 
30431  /* "cfemIntegrals.pyx":5083
30432  * cdef int nDOF_test_element = elementResidual.shape[1]
30433  * cdef int nElementBoundaries_element = n.shape[1]
30434  * cdef int nQuadraturePoints_elementBoundary = n.shape[2] # <<<<<<<<<<<<<<
30435  * cdef int nSpace = n.shape[3]
30436  * ccalculateConservationResidual(nElements_global,
30437  */
30438  __pyx_v_nQuadraturePoints_elementBoundary = (__pyx_v_n->dimensions[2]);
30439 
30440  /* "cfemIntegrals.pyx":5084
30441  * cdef int nElementBoundaries_element = n.shape[1]
30442  * cdef int nQuadraturePoints_elementBoundary = n.shape[2]
30443  * cdef int nSpace = n.shape[3] # <<<<<<<<<<<<<<
30444  * ccalculateConservationResidual(nElements_global,
30445  * nDOF_test_element,
30446  */
30447  __pyx_v_nSpace = (__pyx_v_n->dimensions[3]);
30448 
30449  /* "cfemIntegrals.pyx":5085
30450  * cdef int nQuadraturePoints_elementBoundary = n.shape[2]
30451  * cdef int nSpace = n.shape[3]
30452  * ccalculateConservationResidual(nElements_global, # <<<<<<<<<<<<<<
30453  * nDOF_test_element,
30454  * nElementBoundaries_element,
30455  */
30456  calculateConservationResidual(__pyx_v_nElements_global, __pyx_v_nDOF_test_element, __pyx_v_nElementBoundaries_element, __pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nSpace, ((double *)__pyx_v_n->data), ((double *)__pyx_v_dS_u->data), ((double *)__pyx_v_elementResidual->data), ((double *)__pyx_v_velocity->data), ((double *)__pyx_v_conservationResidual->data));
30457 
30458  /* "cfemIntegrals.pyx":5075
30459  * <double*>elementResidual.data,
30460  * <double*>conservationResidual.data)
30461  * def calculateConservationResidual(np.ndarray n, # <<<<<<<<<<<<<<
30462  * np.ndarray dS_u,
30463  * np.ndarray elementResidual,
30464  */
30465 
30466  /* function exit code */
30467  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
30468  __Pyx_XGIVEREF(__pyx_r);
30469  __Pyx_RefNannyFinishContext();
30470  return __pyx_r;
30471 }
30472 
30473 /* "cfemIntegrals.pyx":5095
30474  * <double*>velocity.data,
30475  * <double*>conservationResidual.data)
30476  * def calculateConservationResidualGlobalBoundaries(int nElements_global, # <<<<<<<<<<<<<<
30477  * int nInteriorElementBoundaries_global,
30478  * int nExteriorElementBoundaries_global,
30479  */
30480 
30481 /* Python wrapper */
30482 static PyObject *__pyx_pw_13cfemIntegrals_263calculateConservationResidualGlobalBoundaries(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
30483 static PyMethodDef __pyx_mdef_13cfemIntegrals_263calculateConservationResidualGlobalBoundaries = {"calculateConservationResidualGlobalBoundaries", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_263calculateConservationResidualGlobalBoundaries, METH_VARARGS|METH_KEYWORDS, 0};
30484 static PyObject *__pyx_pw_13cfemIntegrals_263calculateConservationResidualGlobalBoundaries(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
30485  int __pyx_v_nElements_global;
30486  int __pyx_v_nInteriorElementBoundaries_global;
30487  int __pyx_v_nExteriorElementBoundaries_global;
30488  int __pyx_v_nElementBoundaries_element;
30489  int __pyx_v_nQuadraturePoints_elementBoundary;
30490  int __pyx_v_nNodes_element;
30491  int __pyx_v_nSpace;
30492  PyArrayObject *__pyx_v_interiorElementBoundaries = 0;
30493  PyArrayObject *__pyx_v_exteriorElementBoundaries = 0;
30494  PyArrayObject *__pyx_v_elementBoundaryElements = 0;
30495  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries = 0;
30496  PyArrayObject *__pyx_v_dS = 0;
30497  PyArrayObject *__pyx_v_normal = 0;
30498  PyArrayObject *__pyx_v_elementResidual = 0;
30499  PyArrayObject *__pyx_v_velocity = 0;
30500  PyArrayObject *__pyx_v_conservationResidual = 0;
30501  int __pyx_lineno = 0;
30502  const char *__pyx_filename = NULL;
30503  int __pyx_clineno = 0;
30504  PyObject *__pyx_r = 0;
30505  __Pyx_RefNannyDeclarations
30506  __Pyx_RefNannySetupContext("calculateConservationResidualGlobalBoundaries (wrapper)", 0);
30507  {
30508  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nElements_global,&__pyx_n_s_nInteriorElementBoundaries_globa,&__pyx_n_s_nExteriorElementBoundaries_globa,&__pyx_n_s_nElementBoundaries_element,&__pyx_n_s_nQuadraturePoints_elementBoundar,&__pyx_n_s_nNodes_element,&__pyx_n_s_nSpace,&__pyx_n_s_interiorElementBoundaries,&__pyx_n_s_exteriorElementBoundaries,&__pyx_n_s_elementBoundaryElements,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_dS,&__pyx_n_s_normal,&__pyx_n_s_elementResidual,&__pyx_n_s_velocity,&__pyx_n_s_conservationResidual,0};
30509  PyObject* values[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
30510  if (unlikely(__pyx_kwds)) {
30511  Py_ssize_t kw_args;
30512  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
30513  switch (pos_args) {
30514  case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
30515  CYTHON_FALLTHROUGH;
30516  case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
30517  CYTHON_FALLTHROUGH;
30518  case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
30519  CYTHON_FALLTHROUGH;
30520  case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
30521  CYTHON_FALLTHROUGH;
30522  case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
30523  CYTHON_FALLTHROUGH;
30524  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
30525  CYTHON_FALLTHROUGH;
30526  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
30527  CYTHON_FALLTHROUGH;
30528  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
30529  CYTHON_FALLTHROUGH;
30530  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
30531  CYTHON_FALLTHROUGH;
30532  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
30533  CYTHON_FALLTHROUGH;
30534  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
30535  CYTHON_FALLTHROUGH;
30536  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
30537  CYTHON_FALLTHROUGH;
30538  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
30539  CYTHON_FALLTHROUGH;
30540  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
30541  CYTHON_FALLTHROUGH;
30542  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
30543  CYTHON_FALLTHROUGH;
30544  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
30545  CYTHON_FALLTHROUGH;
30546  case 0: break;
30547  default: goto __pyx_L5_argtuple_error;
30548  }
30549  kw_args = PyDict_Size(__pyx_kwds);
30550  switch (pos_args) {
30551  case 0:
30552  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nElements_global)) != 0)) kw_args--;
30553  else goto __pyx_L5_argtuple_error;
30554  CYTHON_FALLTHROUGH;
30555  case 1:
30556  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nInteriorElementBoundaries_globa)) != 0)) kw_args--;
30557  else {
30558  __Pyx_RaiseArgtupleInvalid("calculateConservationResidualGlobalBoundaries", 1, 16, 16, 1); __PYX_ERR(0, 5095, __pyx_L3_error)
30559  }
30560  CYTHON_FALLTHROUGH;
30561  case 2:
30562  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nExteriorElementBoundaries_globa)) != 0)) kw_args--;
30563  else {
30564  __Pyx_RaiseArgtupleInvalid("calculateConservationResidualGlobalBoundaries", 1, 16, 16, 2); __PYX_ERR(0, 5095, __pyx_L3_error)
30565  }
30566  CYTHON_FALLTHROUGH;
30567  case 3:
30568  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nElementBoundaries_element)) != 0)) kw_args--;
30569  else {
30570  __Pyx_RaiseArgtupleInvalid("calculateConservationResidualGlobalBoundaries", 1, 16, 16, 3); __PYX_ERR(0, 5095, __pyx_L3_error)
30571  }
30572  CYTHON_FALLTHROUGH;
30573  case 4:
30574  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nQuadraturePoints_elementBoundar)) != 0)) kw_args--;
30575  else {
30576  __Pyx_RaiseArgtupleInvalid("calculateConservationResidualGlobalBoundaries", 1, 16, 16, 4); __PYX_ERR(0, 5095, __pyx_L3_error)
30577  }
30578  CYTHON_FALLTHROUGH;
30579  case 5:
30580  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nNodes_element)) != 0)) kw_args--;
30581  else {
30582  __Pyx_RaiseArgtupleInvalid("calculateConservationResidualGlobalBoundaries", 1, 16, 16, 5); __PYX_ERR(0, 5095, __pyx_L3_error)
30583  }
30584  CYTHON_FALLTHROUGH;
30585  case 6:
30586  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nSpace)) != 0)) kw_args--;
30587  else {
30588  __Pyx_RaiseArgtupleInvalid("calculateConservationResidualGlobalBoundaries", 1, 16, 16, 6); __PYX_ERR(0, 5095, __pyx_L3_error)
30589  }
30590  CYTHON_FALLTHROUGH;
30591  case 7:
30592  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_interiorElementBoundaries)) != 0)) kw_args--;
30593  else {
30594  __Pyx_RaiseArgtupleInvalid("calculateConservationResidualGlobalBoundaries", 1, 16, 16, 7); __PYX_ERR(0, 5095, __pyx_L3_error)
30595  }
30596  CYTHON_FALLTHROUGH;
30597  case 8:
30598  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exteriorElementBoundaries)) != 0)) kw_args--;
30599  else {
30600  __Pyx_RaiseArgtupleInvalid("calculateConservationResidualGlobalBoundaries", 1, 16, 16, 8); __PYX_ERR(0, 5095, __pyx_L3_error)
30601  }
30602  CYTHON_FALLTHROUGH;
30603  case 9:
30604  if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElements)) != 0)) kw_args--;
30605  else {
30606  __Pyx_RaiseArgtupleInvalid("calculateConservationResidualGlobalBoundaries", 1, 16, 16, 9); __PYX_ERR(0, 5095, __pyx_L3_error)
30607  }
30608  CYTHON_FALLTHROUGH;
30609  case 10:
30610  if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
30611  else {
30612  __Pyx_RaiseArgtupleInvalid("calculateConservationResidualGlobalBoundaries", 1, 16, 16, 10); __PYX_ERR(0, 5095, __pyx_L3_error)
30613  }
30614  CYTHON_FALLTHROUGH;
30615  case 11:
30616  if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dS)) != 0)) kw_args--;
30617  else {
30618  __Pyx_RaiseArgtupleInvalid("calculateConservationResidualGlobalBoundaries", 1, 16, 16, 11); __PYX_ERR(0, 5095, __pyx_L3_error)
30619  }
30620  CYTHON_FALLTHROUGH;
30621  case 12:
30622  if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_normal)) != 0)) kw_args--;
30623  else {
30624  __Pyx_RaiseArgtupleInvalid("calculateConservationResidualGlobalBoundaries", 1, 16, 16, 12); __PYX_ERR(0, 5095, __pyx_L3_error)
30625  }
30626  CYTHON_FALLTHROUGH;
30627  case 13:
30628  if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementResidual)) != 0)) kw_args--;
30629  else {
30630  __Pyx_RaiseArgtupleInvalid("calculateConservationResidualGlobalBoundaries", 1, 16, 16, 13); __PYX_ERR(0, 5095, __pyx_L3_error)
30631  }
30632  CYTHON_FALLTHROUGH;
30633  case 14:
30634  if (likely((values[14] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_velocity)) != 0)) kw_args--;
30635  else {
30636  __Pyx_RaiseArgtupleInvalid("calculateConservationResidualGlobalBoundaries", 1, 16, 16, 14); __PYX_ERR(0, 5095, __pyx_L3_error)
30637  }
30638  CYTHON_FALLTHROUGH;
30639  case 15:
30640  if (likely((values[15] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_conservationResidual)) != 0)) kw_args--;
30641  else {
30642  __Pyx_RaiseArgtupleInvalid("calculateConservationResidualGlobalBoundaries", 1, 16, 16, 15); __PYX_ERR(0, 5095, __pyx_L3_error)
30643  }
30644  }
30645  if (unlikely(kw_args > 0)) {
30646  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateConservationResidualGlobalBoundaries") < 0)) __PYX_ERR(0, 5095, __pyx_L3_error)
30647  }
30648  } else if (PyTuple_GET_SIZE(__pyx_args) != 16) {
30649  goto __pyx_L5_argtuple_error;
30650  } else {
30651  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
30652  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
30653  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
30654  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
30655  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
30656  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
30657  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
30658  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
30659  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
30660  values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
30661  values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
30662  values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
30663  values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
30664  values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
30665  values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
30666  values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
30667  }
30668  __pyx_v_nElements_global = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_nElements_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5095, __pyx_L3_error)
30669  __pyx_v_nInteriorElementBoundaries_global = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_nInteriorElementBoundaries_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5096, __pyx_L3_error)
30670  __pyx_v_nExteriorElementBoundaries_global = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_nExteriorElementBoundaries_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5097, __pyx_L3_error)
30671  __pyx_v_nElementBoundaries_element = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_nElementBoundaries_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5098, __pyx_L3_error)
30672  __pyx_v_nQuadraturePoints_elementBoundary = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_nQuadraturePoints_elementBoundary == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5099, __pyx_L3_error)
30673  __pyx_v_nNodes_element = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_nNodes_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5100, __pyx_L3_error)
30674  __pyx_v_nSpace = __Pyx_PyInt_As_int(values[6]); if (unlikely((__pyx_v_nSpace == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5101, __pyx_L3_error)
30675  __pyx_v_interiorElementBoundaries = ((PyArrayObject *)values[7]);
30676  __pyx_v_exteriorElementBoundaries = ((PyArrayObject *)values[8]);
30677  __pyx_v_elementBoundaryElements = ((PyArrayObject *)values[9]);
30678  __pyx_v_elementBoundaryLocalElementBoundaries = ((PyArrayObject *)values[10]);
30679  __pyx_v_dS = ((PyArrayObject *)values[11]);
30680  __pyx_v_normal = ((PyArrayObject *)values[12]);
30681  __pyx_v_elementResidual = ((PyArrayObject *)values[13]);
30682  __pyx_v_velocity = ((PyArrayObject *)values[14]);
30683  __pyx_v_conservationResidual = ((PyArrayObject *)values[15]);
30684  }
30685  goto __pyx_L4_argument_unpacking_done;
30686  __pyx_L5_argtuple_error:;
30687  __Pyx_RaiseArgtupleInvalid("calculateConservationResidualGlobalBoundaries", 1, 16, 16, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5095, __pyx_L3_error)
30688  __pyx_L3_error:;
30689  __Pyx_AddTraceback("cfemIntegrals.calculateConservationResidualGlobalBoundaries", __pyx_clineno, __pyx_lineno, __pyx_filename);
30690  __Pyx_RefNannyFinishContext();
30691  return NULL;
30692  __pyx_L4_argument_unpacking_done:;
30693  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_interiorElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "interiorElementBoundaries", 0))) __PYX_ERR(0, 5102, __pyx_L1_error)
30694  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exteriorElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "exteriorElementBoundaries", 0))) __PYX_ERR(0, 5103, __pyx_L1_error)
30695  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElements), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElements", 0))) __PYX_ERR(0, 5104, __pyx_L1_error)
30696  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundaries", 0))) __PYX_ERR(0, 5105, __pyx_L1_error)
30697  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dS), __pyx_ptype_5numpy_ndarray, 1, "dS", 0))) __PYX_ERR(0, 5106, __pyx_L1_error)
30698  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_normal), __pyx_ptype_5numpy_ndarray, 1, "normal", 0))) __PYX_ERR(0, 5107, __pyx_L1_error)
30699  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementResidual), __pyx_ptype_5numpy_ndarray, 1, "elementResidual", 0))) __PYX_ERR(0, 5108, __pyx_L1_error)
30700  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_velocity), __pyx_ptype_5numpy_ndarray, 1, "velocity", 0))) __PYX_ERR(0, 5109, __pyx_L1_error)
30701  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_conservationResidual), __pyx_ptype_5numpy_ndarray, 1, "conservationResidual", 0))) __PYX_ERR(0, 5110, __pyx_L1_error)
30702  __pyx_r = __pyx_pf_13cfemIntegrals_262calculateConservationResidualGlobalBoundaries(__pyx_self, __pyx_v_nElements_global, __pyx_v_nInteriorElementBoundaries_global, __pyx_v_nExteriorElementBoundaries_global, __pyx_v_nElementBoundaries_element, __pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nNodes_element, __pyx_v_nSpace, __pyx_v_interiorElementBoundaries, __pyx_v_exteriorElementBoundaries, __pyx_v_elementBoundaryElements, __pyx_v_elementBoundaryLocalElementBoundaries, __pyx_v_dS, __pyx_v_normal, __pyx_v_elementResidual, __pyx_v_velocity, __pyx_v_conservationResidual);
30703 
30704  /* function exit code */
30705  goto __pyx_L0;
30706  __pyx_L1_error:;
30707  __pyx_r = NULL;
30708  __pyx_L0:;
30709  __Pyx_RefNannyFinishContext();
30710  return __pyx_r;
30711 }
30712 
30713 static PyObject *__pyx_pf_13cfemIntegrals_262calculateConservationResidualGlobalBoundaries(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nElements_global, int __pyx_v_nInteriorElementBoundaries_global, int __pyx_v_nExteriorElementBoundaries_global, int __pyx_v_nElementBoundaries_element, int __pyx_v_nQuadraturePoints_elementBoundary, int __pyx_v_nNodes_element, int __pyx_v_nSpace, PyArrayObject *__pyx_v_interiorElementBoundaries, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_dS, PyArrayObject *__pyx_v_normal, PyArrayObject *__pyx_v_elementResidual, PyArrayObject *__pyx_v_velocity, PyArrayObject *__pyx_v_conservationResidual) {
30714  PyObject *__pyx_r = NULL;
30715  __Pyx_RefNannyDeclarations
30716  __Pyx_RefNannySetupContext("calculateConservationResidualGlobalBoundaries", 0);
30717 
30718  /* "cfemIntegrals.pyx":5111
30719  * np.ndarray velocity,
30720  * np.ndarray conservationResidual):
30721  * ccalculateConservationResidualGlobalBoundaries(nElements_global, # <<<<<<<<<<<<<<
30722  * nInteriorElementBoundaries_global,
30723  * nExteriorElementBoundaries_global,
30724  */
30725  calculateConservationResidualGlobalBoundaries(__pyx_v_nElements_global, __pyx_v_nInteriorElementBoundaries_global, __pyx_v_nExteriorElementBoundaries_global, __pyx_v_nElementBoundaries_element, __pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nNodes_element, __pyx_v_nSpace, ((int *)__pyx_v_interiorElementBoundaries->data), ((int *)__pyx_v_exteriorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), ((double *)__pyx_v_dS->data), ((double *)__pyx_v_normal->data), ((double *)__pyx_v_elementResidual->data), ((double *)__pyx_v_velocity->data), ((double *)__pyx_v_conservationResidual->data));
30726 
30727  /* "cfemIntegrals.pyx":5095
30728  * <double*>velocity.data,
30729  * <double*>conservationResidual.data)
30730  * def calculateConservationResidualGlobalBoundaries(int nElements_global, # <<<<<<<<<<<<<<
30731  * int nInteriorElementBoundaries_global,
30732  * int nExteriorElementBoundaries_global,
30733  */
30734 
30735  /* function exit code */
30736  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
30737  __Pyx_XGIVEREF(__pyx_r);
30738  __Pyx_RefNannyFinishContext();
30739  return __pyx_r;
30740 }
30741 
30742 /* "cfemIntegrals.pyx":5127
30743  * <double*>velocity.data,
30744  * <double*>conservationResidual.data)
30745  * def copyGlobalElementBoundaryVelocityToElementBoundary(np.ndarray interiorElementBoundaries, # <<<<<<<<<<<<<<
30746  * np.ndarray exteriorElementBoundaries,
30747  * np.ndarray elementBoundaryElementsArray,
30748  */
30749 
30750 /* Python wrapper */
30751 static PyObject *__pyx_pw_13cfemIntegrals_265copyGlobalElementBoundaryVelocityToElementBoundary(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
30752 static PyMethodDef __pyx_mdef_13cfemIntegrals_265copyGlobalElementBoundaryVelocityToElementBoundary = {"copyGlobalElementBoundaryVelocityToElementBoundary", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_265copyGlobalElementBoundaryVelocityToElementBoundary, METH_VARARGS|METH_KEYWORDS, 0};
30753 static PyObject *__pyx_pw_13cfemIntegrals_265copyGlobalElementBoundaryVelocityToElementBoundary(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
30754  PyArrayObject *__pyx_v_interiorElementBoundaries = 0;
30755  PyArrayObject *__pyx_v_exteriorElementBoundaries = 0;
30756  PyArrayObject *__pyx_v_elementBoundaryElementsArray = 0;
30757  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray = 0;
30758  PyArrayObject *__pyx_v_velocityBoundary_global = 0;
30759  PyArrayObject *__pyx_v_velocityBoundary_element = 0;
30760  int __pyx_lineno = 0;
30761  const char *__pyx_filename = NULL;
30762  int __pyx_clineno = 0;
30763  PyObject *__pyx_r = 0;
30764  __Pyx_RefNannyDeclarations
30765  __Pyx_RefNannySetupContext("copyGlobalElementBoundaryVelocityToElementBoundary (wrapper)", 0);
30766  {
30767  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_interiorElementBoundaries,&__pyx_n_s_exteriorElementBoundaries,&__pyx_n_s_elementBoundaryElementsArray,&__pyx_n_s_elementBoundaryLocalElementBound_2,&__pyx_n_s_velocityBoundary_global,&__pyx_n_s_velocityBoundary_element,0};
30768  PyObject* values[6] = {0,0,0,0,0,0};
30769  if (unlikely(__pyx_kwds)) {
30770  Py_ssize_t kw_args;
30771  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
30772  switch (pos_args) {
30773  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
30774  CYTHON_FALLTHROUGH;
30775  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
30776  CYTHON_FALLTHROUGH;
30777  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
30778  CYTHON_FALLTHROUGH;
30779  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
30780  CYTHON_FALLTHROUGH;
30781  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
30782  CYTHON_FALLTHROUGH;
30783  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
30784  CYTHON_FALLTHROUGH;
30785  case 0: break;
30786  default: goto __pyx_L5_argtuple_error;
30787  }
30788  kw_args = PyDict_Size(__pyx_kwds);
30789  switch (pos_args) {
30790  case 0:
30791  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_interiorElementBoundaries)) != 0)) kw_args--;
30792  else goto __pyx_L5_argtuple_error;
30793  CYTHON_FALLTHROUGH;
30794  case 1:
30795  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exteriorElementBoundaries)) != 0)) kw_args--;
30796  else {
30797  __Pyx_RaiseArgtupleInvalid("copyGlobalElementBoundaryVelocityToElementBoundary", 1, 6, 6, 1); __PYX_ERR(0, 5127, __pyx_L3_error)
30798  }
30799  CYTHON_FALLTHROUGH;
30800  case 2:
30801  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElementsArray)) != 0)) kw_args--;
30802  else {
30803  __Pyx_RaiseArgtupleInvalid("copyGlobalElementBoundaryVelocityToElementBoundary", 1, 6, 6, 2); __PYX_ERR(0, 5127, __pyx_L3_error)
30804  }
30805  CYTHON_FALLTHROUGH;
30806  case 3:
30807  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound_2)) != 0)) kw_args--;
30808  else {
30809  __Pyx_RaiseArgtupleInvalid("copyGlobalElementBoundaryVelocityToElementBoundary", 1, 6, 6, 3); __PYX_ERR(0, 5127, __pyx_L3_error)
30810  }
30811  CYTHON_FALLTHROUGH;
30812  case 4:
30813  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_velocityBoundary_global)) != 0)) kw_args--;
30814  else {
30815  __Pyx_RaiseArgtupleInvalid("copyGlobalElementBoundaryVelocityToElementBoundary", 1, 6, 6, 4); __PYX_ERR(0, 5127, __pyx_L3_error)
30816  }
30817  CYTHON_FALLTHROUGH;
30818  case 5:
30819  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_velocityBoundary_element)) != 0)) kw_args--;
30820  else {
30821  __Pyx_RaiseArgtupleInvalid("copyGlobalElementBoundaryVelocityToElementBoundary", 1, 6, 6, 5); __PYX_ERR(0, 5127, __pyx_L3_error)
30822  }
30823  }
30824  if (unlikely(kw_args > 0)) {
30825  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "copyGlobalElementBoundaryVelocityToElementBoundary") < 0)) __PYX_ERR(0, 5127, __pyx_L3_error)
30826  }
30827  } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
30828  goto __pyx_L5_argtuple_error;
30829  } else {
30830  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
30831  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
30832  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
30833  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
30834  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
30835  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
30836  }
30837  __pyx_v_interiorElementBoundaries = ((PyArrayObject *)values[0]);
30838  __pyx_v_exteriorElementBoundaries = ((PyArrayObject *)values[1]);
30839  __pyx_v_elementBoundaryElementsArray = ((PyArrayObject *)values[2]);
30840  __pyx_v_elementBoundaryLocalElementBoundariesArray = ((PyArrayObject *)values[3]);
30841  __pyx_v_velocityBoundary_global = ((PyArrayObject *)values[4]);
30842  __pyx_v_velocityBoundary_element = ((PyArrayObject *)values[5]);
30843  }
30844  goto __pyx_L4_argument_unpacking_done;
30845  __pyx_L5_argtuple_error:;
30846  __Pyx_RaiseArgtupleInvalid("copyGlobalElementBoundaryVelocityToElementBoundary", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5127, __pyx_L3_error)
30847  __pyx_L3_error:;
30848  __Pyx_AddTraceback("cfemIntegrals.copyGlobalElementBoundaryVelocityToElementBoundary", __pyx_clineno, __pyx_lineno, __pyx_filename);
30849  __Pyx_RefNannyFinishContext();
30850  return NULL;
30851  __pyx_L4_argument_unpacking_done:;
30852  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_interiorElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "interiorElementBoundaries", 0))) __PYX_ERR(0, 5127, __pyx_L1_error)
30853  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exteriorElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "exteriorElementBoundaries", 0))) __PYX_ERR(0, 5128, __pyx_L1_error)
30854  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElementsArray), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElementsArray", 0))) __PYX_ERR(0, 5129, __pyx_L1_error)
30855  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundariesArray), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundariesArray", 0))) __PYX_ERR(0, 5130, __pyx_L1_error)
30856  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_velocityBoundary_global), __pyx_ptype_5numpy_ndarray, 1, "velocityBoundary_global", 0))) __PYX_ERR(0, 5131, __pyx_L1_error)
30857  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_velocityBoundary_element), __pyx_ptype_5numpy_ndarray, 1, "velocityBoundary_element", 0))) __PYX_ERR(0, 5132, __pyx_L1_error)
30858  __pyx_r = __pyx_pf_13cfemIntegrals_264copyGlobalElementBoundaryVelocityToElementBoundary(__pyx_self, __pyx_v_interiorElementBoundaries, __pyx_v_exteriorElementBoundaries, __pyx_v_elementBoundaryElementsArray, __pyx_v_elementBoundaryLocalElementBoundariesArray, __pyx_v_velocityBoundary_global, __pyx_v_velocityBoundary_element);
30859 
30860  /* function exit code */
30861  goto __pyx_L0;
30862  __pyx_L1_error:;
30863  __pyx_r = NULL;
30864  __pyx_L0:;
30865  __Pyx_RefNannyFinishContext();
30866  return __pyx_r;
30867 }
30868 
30869 static PyObject *__pyx_pf_13cfemIntegrals_264copyGlobalElementBoundaryVelocityToElementBoundary(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_interiorElementBoundaries, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElementsArray, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray, PyArrayObject *__pyx_v_velocityBoundary_global, PyArrayObject *__pyx_v_velocityBoundary_element) {
30870  int __pyx_v_nElements_global;
30871  int __pyx_v_nInteriorElementBoundaries_global;
30872  int __pyx_v_nExteriorElementBoundaries_global;
30873  int __pyx_v_nElementBoundaries_global;
30874  int __pyx_v_nElementBoundaries_element;
30875  int __pyx_v_nQuadraturePoints_elementBoundary;
30876  int __pyx_v_nSpace;
30877  PyObject *__pyx_r = NULL;
30878  __Pyx_RefNannyDeclarations
30879  __Pyx_RefNannySetupContext("copyGlobalElementBoundaryVelocityToElementBoundary", 0);
30880 
30881  /* "cfemIntegrals.pyx":5133
30882  * np.ndarray velocityBoundary_global,
30883  * np.ndarray velocityBoundary_element):
30884  * cdef int nElements_global = velocityBoundary_element.shape[0] # <<<<<<<<<<<<<<
30885  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0]
30886  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundaries.shape[0]
30887  */
30888  __pyx_v_nElements_global = (__pyx_v_velocityBoundary_element->dimensions[0]);
30889 
30890  /* "cfemIntegrals.pyx":5134
30891  * np.ndarray velocityBoundary_element):
30892  * cdef int nElements_global = velocityBoundary_element.shape[0]
30893  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0] # <<<<<<<<<<<<<<
30894  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundaries.shape[0]
30895  * cdef int nElementBoundaries_global = velocityBoundary_global.shape[0]
30896  */
30897  __pyx_v_nInteriorElementBoundaries_global = (__pyx_v_interiorElementBoundaries->dimensions[0]);
30898 
30899  /* "cfemIntegrals.pyx":5135
30900  * cdef int nElements_global = velocityBoundary_element.shape[0]
30901  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0]
30902  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundaries.shape[0] # <<<<<<<<<<<<<<
30903  * cdef int nElementBoundaries_global = velocityBoundary_global.shape[0]
30904  * cdef int nElementBoundaries_element = velocityBoundary_element.shape[1]
30905  */
30906  __pyx_v_nExteriorElementBoundaries_global = (__pyx_v_exteriorElementBoundaries->dimensions[0]);
30907 
30908  /* "cfemIntegrals.pyx":5136
30909  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0]
30910  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundaries.shape[0]
30911  * cdef int nElementBoundaries_global = velocityBoundary_global.shape[0] # <<<<<<<<<<<<<<
30912  * cdef int nElementBoundaries_element = velocityBoundary_element.shape[1]
30913  * cdef int nQuadraturePoints_elementBoundary = velocityBoundary_element.shape[2]
30914  */
30915  __pyx_v_nElementBoundaries_global = (__pyx_v_velocityBoundary_global->dimensions[0]);
30916 
30917  /* "cfemIntegrals.pyx":5137
30918  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundaries.shape[0]
30919  * cdef int nElementBoundaries_global = velocityBoundary_global.shape[0]
30920  * cdef int nElementBoundaries_element = velocityBoundary_element.shape[1] # <<<<<<<<<<<<<<
30921  * cdef int nQuadraturePoints_elementBoundary = velocityBoundary_element.shape[2]
30922  * cdef int nSpace = velocityBoundary_element.shape[3]
30923  */
30924  __pyx_v_nElementBoundaries_element = (__pyx_v_velocityBoundary_element->dimensions[1]);
30925 
30926  /* "cfemIntegrals.pyx":5138
30927  * cdef int nElementBoundaries_global = velocityBoundary_global.shape[0]
30928  * cdef int nElementBoundaries_element = velocityBoundary_element.shape[1]
30929  * cdef int nQuadraturePoints_elementBoundary = velocityBoundary_element.shape[2] # <<<<<<<<<<<<<<
30930  * cdef int nSpace = velocityBoundary_element.shape[3]
30931  * ccopyGlobalElementBoundaryVelocityToElementBoundary(nElements_global,
30932  */
30933  __pyx_v_nQuadraturePoints_elementBoundary = (__pyx_v_velocityBoundary_element->dimensions[2]);
30934 
30935  /* "cfemIntegrals.pyx":5139
30936  * cdef int nElementBoundaries_element = velocityBoundary_element.shape[1]
30937  * cdef int nQuadraturePoints_elementBoundary = velocityBoundary_element.shape[2]
30938  * cdef int nSpace = velocityBoundary_element.shape[3] # <<<<<<<<<<<<<<
30939  * ccopyGlobalElementBoundaryVelocityToElementBoundary(nElements_global,
30940  * nInteriorElementBoundaries_global,
30941  */
30942  __pyx_v_nSpace = (__pyx_v_velocityBoundary_element->dimensions[3]);
30943 
30944  /* "cfemIntegrals.pyx":5140
30945  * cdef int nQuadraturePoints_elementBoundary = velocityBoundary_element.shape[2]
30946  * cdef int nSpace = velocityBoundary_element.shape[3]
30947  * ccopyGlobalElementBoundaryVelocityToElementBoundary(nElements_global, # <<<<<<<<<<<<<<
30948  * nInteriorElementBoundaries_global,
30949  * nExteriorElementBoundaries_global,
30950  */
30951  copyGlobalElementBoundaryVelocityToElementBoundary(__pyx_v_nElements_global, __pyx_v_nInteriorElementBoundaries_global, __pyx_v_nExteriorElementBoundaries_global, __pyx_v_nElementBoundaries_global, __pyx_v_nElementBoundaries_element, __pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nSpace, ((int *)__pyx_v_interiorElementBoundaries->data), ((int *)__pyx_v_exteriorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElementsArray->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundariesArray->data), ((double *)__pyx_v_velocityBoundary_global->data), ((double *)__pyx_v_velocityBoundary_element->data));
30952 
30953  /* "cfemIntegrals.pyx":5127
30954  * <double*>velocity.data,
30955  * <double*>conservationResidual.data)
30956  * def copyGlobalElementBoundaryVelocityToElementBoundary(np.ndarray interiorElementBoundaries, # <<<<<<<<<<<<<<
30957  * np.ndarray exteriorElementBoundaries,
30958  * np.ndarray elementBoundaryElementsArray,
30959  */
30960 
30961  /* function exit code */
30962  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
30963  __Pyx_XGIVEREF(__pyx_r);
30964  __Pyx_RefNannyFinishContext();
30965  return __pyx_r;
30966 }
30967 
30968 /* "cfemIntegrals.pyx":5153
30969  * <double*>velocityBoundary_global.data,
30970  * <double*>velocityBoundary_element.data)
30971  * def loadBoundaryFluxIntoGlobalElementBoundaryVelocity(np.ndarray exteriorElementBoundaries, # <<<<<<<<<<<<<<
30972  * np.ndarray fluxElementBoundaries,
30973  * np.ndarray normal,
30974  */
30975 
30976 /* Python wrapper */
30977 static PyObject *__pyx_pw_13cfemIntegrals_267loadBoundaryFluxIntoGlobalElementBoundaryVelocity(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
30978 static PyMethodDef __pyx_mdef_13cfemIntegrals_267loadBoundaryFluxIntoGlobalElementBoundaryVelocity = {"loadBoundaryFluxIntoGlobalElementBoundaryVelocity", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_267loadBoundaryFluxIntoGlobalElementBoundaryVelocity, METH_VARARGS|METH_KEYWORDS, 0};
30979 static PyObject *__pyx_pw_13cfemIntegrals_267loadBoundaryFluxIntoGlobalElementBoundaryVelocity(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
30980  PyArrayObject *__pyx_v_exteriorElementBoundaries = 0;
30981  PyArrayObject *__pyx_v_fluxElementBoundaries = 0;
30982  PyArrayObject *__pyx_v_normal = 0;
30983  PyArrayObject *__pyx_v_flux = 0;
30984  double __pyx_v_updateCoef;
30985  PyArrayObject *__pyx_v_velocity = 0;
30986  int __pyx_lineno = 0;
30987  const char *__pyx_filename = NULL;
30988  int __pyx_clineno = 0;
30989  PyObject *__pyx_r = 0;
30990  __Pyx_RefNannyDeclarations
30991  __Pyx_RefNannySetupContext("loadBoundaryFluxIntoGlobalElementBoundaryVelocity (wrapper)", 0);
30992  {
30993  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exteriorElementBoundaries,&__pyx_n_s_fluxElementBoundaries,&__pyx_n_s_normal,&__pyx_n_s_flux,&__pyx_n_s_updateCoef,&__pyx_n_s_velocity,0};
30994  PyObject* values[6] = {0,0,0,0,0,0};
30995  if (unlikely(__pyx_kwds)) {
30996  Py_ssize_t kw_args;
30997  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
30998  switch (pos_args) {
30999  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
31000  CYTHON_FALLTHROUGH;
31001  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
31002  CYTHON_FALLTHROUGH;
31003  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
31004  CYTHON_FALLTHROUGH;
31005  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
31006  CYTHON_FALLTHROUGH;
31007  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
31008  CYTHON_FALLTHROUGH;
31009  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
31010  CYTHON_FALLTHROUGH;
31011  case 0: break;
31012  default: goto __pyx_L5_argtuple_error;
31013  }
31014  kw_args = PyDict_Size(__pyx_kwds);
31015  switch (pos_args) {
31016  case 0:
31017  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exteriorElementBoundaries)) != 0)) kw_args--;
31018  else goto __pyx_L5_argtuple_error;
31019  CYTHON_FALLTHROUGH;
31020  case 1:
31021  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fluxElementBoundaries)) != 0)) kw_args--;
31022  else {
31023  __Pyx_RaiseArgtupleInvalid("loadBoundaryFluxIntoGlobalElementBoundaryVelocity", 1, 6, 6, 1); __PYX_ERR(0, 5153, __pyx_L3_error)
31024  }
31025  CYTHON_FALLTHROUGH;
31026  case 2:
31027  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_normal)) != 0)) kw_args--;
31028  else {
31029  __Pyx_RaiseArgtupleInvalid("loadBoundaryFluxIntoGlobalElementBoundaryVelocity", 1, 6, 6, 2); __PYX_ERR(0, 5153, __pyx_L3_error)
31030  }
31031  CYTHON_FALLTHROUGH;
31032  case 3:
31033  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flux)) != 0)) kw_args--;
31034  else {
31035  __Pyx_RaiseArgtupleInvalid("loadBoundaryFluxIntoGlobalElementBoundaryVelocity", 1, 6, 6, 3); __PYX_ERR(0, 5153, __pyx_L3_error)
31036  }
31037  CYTHON_FALLTHROUGH;
31038  case 4:
31039  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_updateCoef)) != 0)) kw_args--;
31040  else {
31041  __Pyx_RaiseArgtupleInvalid("loadBoundaryFluxIntoGlobalElementBoundaryVelocity", 1, 6, 6, 4); __PYX_ERR(0, 5153, __pyx_L3_error)
31042  }
31043  CYTHON_FALLTHROUGH;
31044  case 5:
31045  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_velocity)) != 0)) kw_args--;
31046  else {
31047  __Pyx_RaiseArgtupleInvalid("loadBoundaryFluxIntoGlobalElementBoundaryVelocity", 1, 6, 6, 5); __PYX_ERR(0, 5153, __pyx_L3_error)
31048  }
31049  }
31050  if (unlikely(kw_args > 0)) {
31051  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "loadBoundaryFluxIntoGlobalElementBoundaryVelocity") < 0)) __PYX_ERR(0, 5153, __pyx_L3_error)
31052  }
31053  } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
31054  goto __pyx_L5_argtuple_error;
31055  } else {
31056  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
31057  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
31058  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
31059  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
31060  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
31061  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
31062  }
31063  __pyx_v_exteriorElementBoundaries = ((PyArrayObject *)values[0]);
31064  __pyx_v_fluxElementBoundaries = ((PyArrayObject *)values[1]);
31065  __pyx_v_normal = ((PyArrayObject *)values[2]);
31066  __pyx_v_flux = ((PyArrayObject *)values[3]);
31067  __pyx_v_updateCoef = __pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_updateCoef == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5157, __pyx_L3_error)
31068  __pyx_v_velocity = ((PyArrayObject *)values[5]);
31069  }
31070  goto __pyx_L4_argument_unpacking_done;
31071  __pyx_L5_argtuple_error:;
31072  __Pyx_RaiseArgtupleInvalid("loadBoundaryFluxIntoGlobalElementBoundaryVelocity", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5153, __pyx_L3_error)
31073  __pyx_L3_error:;
31074  __Pyx_AddTraceback("cfemIntegrals.loadBoundaryFluxIntoGlobalElementBoundaryVelocity", __pyx_clineno, __pyx_lineno, __pyx_filename);
31075  __Pyx_RefNannyFinishContext();
31076  return NULL;
31077  __pyx_L4_argument_unpacking_done:;
31078  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exteriorElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "exteriorElementBoundaries", 0))) __PYX_ERR(0, 5153, __pyx_L1_error)
31079  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fluxElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "fluxElementBoundaries", 0))) __PYX_ERR(0, 5154, __pyx_L1_error)
31080  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_normal), __pyx_ptype_5numpy_ndarray, 1, "normal", 0))) __PYX_ERR(0, 5155, __pyx_L1_error)
31081  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_flux), __pyx_ptype_5numpy_ndarray, 1, "flux", 0))) __PYX_ERR(0, 5156, __pyx_L1_error)
31082  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_velocity), __pyx_ptype_5numpy_ndarray, 1, "velocity", 0))) __PYX_ERR(0, 5158, __pyx_L1_error)
31083  __pyx_r = __pyx_pf_13cfemIntegrals_266loadBoundaryFluxIntoGlobalElementBoundaryVelocity(__pyx_self, __pyx_v_exteriorElementBoundaries, __pyx_v_fluxElementBoundaries, __pyx_v_normal, __pyx_v_flux, __pyx_v_updateCoef, __pyx_v_velocity);
31084 
31085  /* function exit code */
31086  goto __pyx_L0;
31087  __pyx_L1_error:;
31088  __pyx_r = NULL;
31089  __pyx_L0:;
31090  __Pyx_RefNannyFinishContext();
31091  return __pyx_r;
31092 }
31093 
31094 static PyObject *__pyx_pf_13cfemIntegrals_266loadBoundaryFluxIntoGlobalElementBoundaryVelocity(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_fluxElementBoundaries, PyArrayObject *__pyx_v_normal, PyArrayObject *__pyx_v_flux, double __pyx_v_updateCoef, PyArrayObject *__pyx_v_velocity) {
31095  int __pyx_v_nExteriorElementBoundaries_global;
31096  int __pyx_v_nQuadraturePoints_elementBoundary;
31097  int __pyx_v_nSpace;
31098  PyObject *__pyx_r = NULL;
31099  __Pyx_RefNannyDeclarations
31100  __Pyx_RefNannySetupContext("loadBoundaryFluxIntoGlobalElementBoundaryVelocity", 0);
31101 
31102  /* "cfemIntegrals.pyx":5159
31103  * double updateCoef,
31104  * np.ndarray velocity):
31105  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundaries.shape[0] # <<<<<<<<<<<<<<
31106  * cdef int nQuadraturePoints_elementBoundary = normal.shape[1]
31107  * cdef int nSpace = normal.shape[2]
31108  */
31109  __pyx_v_nExteriorElementBoundaries_global = (__pyx_v_exteriorElementBoundaries->dimensions[0]);
31110 
31111  /* "cfemIntegrals.pyx":5160
31112  * np.ndarray velocity):
31113  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundaries.shape[0]
31114  * cdef int nQuadraturePoints_elementBoundary = normal.shape[1] # <<<<<<<<<<<<<<
31115  * cdef int nSpace = normal.shape[2]
31116  * cloadBoundaryFluxIntoGlobalElementBoundaryVelocity(nExteriorElementBoundaries_global,
31117  */
31118  __pyx_v_nQuadraturePoints_elementBoundary = (__pyx_v_normal->dimensions[1]);
31119 
31120  /* "cfemIntegrals.pyx":5161
31121  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundaries.shape[0]
31122  * cdef int nQuadraturePoints_elementBoundary = normal.shape[1]
31123  * cdef int nSpace = normal.shape[2] # <<<<<<<<<<<<<<
31124  * cloadBoundaryFluxIntoGlobalElementBoundaryVelocity(nExteriorElementBoundaries_global,
31125  * nQuadraturePoints_elementBoundary,
31126  */
31127  __pyx_v_nSpace = (__pyx_v_normal->dimensions[2]);
31128 
31129  /* "cfemIntegrals.pyx":5162
31130  * cdef int nQuadraturePoints_elementBoundary = normal.shape[1]
31131  * cdef int nSpace = normal.shape[2]
31132  * cloadBoundaryFluxIntoGlobalElementBoundaryVelocity(nExteriorElementBoundaries_global, # <<<<<<<<<<<<<<
31133  * nQuadraturePoints_elementBoundary,
31134  * nSpace,
31135  */
31136  loadBoundaryFluxIntoGlobalElementBoundaryVelocity(__pyx_v_nExteriorElementBoundaries_global, __pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nSpace, ((int *)__pyx_v_exteriorElementBoundaries->data), ((int *)__pyx_v_fluxElementBoundaries->data), ((double *)__pyx_v_normal->data), ((double *)__pyx_v_flux->data), __pyx_v_updateCoef, ((double *)__pyx_v_velocity->data));
31137 
31138  /* "cfemIntegrals.pyx":5153
31139  * <double*>velocityBoundary_global.data,
31140  * <double*>velocityBoundary_element.data)
31141  * def loadBoundaryFluxIntoGlobalElementBoundaryVelocity(np.ndarray exteriorElementBoundaries, # <<<<<<<<<<<<<<
31142  * np.ndarray fluxElementBoundaries,
31143  * np.ndarray normal,
31144  */
31145 
31146  /* function exit code */
31147  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
31148  __Pyx_XGIVEREF(__pyx_r);
31149  __Pyx_RefNannyFinishContext();
31150  return __pyx_r;
31151 }
31152 
31153 /* "cfemIntegrals.pyx":5171
31154  * updateCoef,
31155  * <double*>velocity.data)
31156  * def calculateInteriorNumericalTrace_Potential(np.ndarray interiorElementBoundaries, # <<<<<<<<<<<<<<
31157  * np.ndarray elementBoundaryElements,
31158  * np.ndarray elementBoundaryLocalElementBoundaries,
31159  */
31160 
31161 /* Python wrapper */
31162 static PyObject *__pyx_pw_13cfemIntegrals_269calculateInteriorNumericalTrace_Potential(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
31163 static PyMethodDef __pyx_mdef_13cfemIntegrals_269calculateInteriorNumericalTrace_Potential = {"calculateInteriorNumericalTrace_Potential", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_269calculateInteriorNumericalTrace_Potential, METH_VARARGS|METH_KEYWORDS, 0};
31164 static PyObject *__pyx_pw_13cfemIntegrals_269calculateInteriorNumericalTrace_Potential(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
31165  PyArrayObject *__pyx_v_interiorElementBoundaries = 0;
31166  PyArrayObject *__pyx_v_elementBoundaryElements = 0;
31167  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries = 0;
31168  PyArrayObject *__pyx_v_phi = 0;
31169  PyArrayObject *__pyx_v_dphi = 0;
31170  PyArrayObject *__pyx_v_phi_trace = 0;
31171  PyArrayObject *__pyx_v_dphi_trace_left = 0;
31172  PyArrayObject *__pyx_v_dphi_trace_right = 0;
31173  int __pyx_lineno = 0;
31174  const char *__pyx_filename = NULL;
31175  int __pyx_clineno = 0;
31176  PyObject *__pyx_r = 0;
31177  __Pyx_RefNannyDeclarations
31178  __Pyx_RefNannySetupContext("calculateInteriorNumericalTrace_Potential (wrapper)", 0);
31179  {
31180  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_interiorElementBoundaries,&__pyx_n_s_elementBoundaryElements,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_phi,&__pyx_n_s_dphi,&__pyx_n_s_phi_trace,&__pyx_n_s_dphi_trace_left,&__pyx_n_s_dphi_trace_right,0};
31181  PyObject* values[8] = {0,0,0,0,0,0,0,0};
31182  if (unlikely(__pyx_kwds)) {
31183  Py_ssize_t kw_args;
31184  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
31185  switch (pos_args) {
31186  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
31187  CYTHON_FALLTHROUGH;
31188  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
31189  CYTHON_FALLTHROUGH;
31190  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
31191  CYTHON_FALLTHROUGH;
31192  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
31193  CYTHON_FALLTHROUGH;
31194  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
31195  CYTHON_FALLTHROUGH;
31196  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
31197  CYTHON_FALLTHROUGH;
31198  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
31199  CYTHON_FALLTHROUGH;
31200  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
31201  CYTHON_FALLTHROUGH;
31202  case 0: break;
31203  default: goto __pyx_L5_argtuple_error;
31204  }
31205  kw_args = PyDict_Size(__pyx_kwds);
31206  switch (pos_args) {
31207  case 0:
31208  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_interiorElementBoundaries)) != 0)) kw_args--;
31209  else goto __pyx_L5_argtuple_error;
31210  CYTHON_FALLTHROUGH;
31211  case 1:
31212  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElements)) != 0)) kw_args--;
31213  else {
31214  __Pyx_RaiseArgtupleInvalid("calculateInteriorNumericalTrace_Potential", 1, 8, 8, 1); __PYX_ERR(0, 5171, __pyx_L3_error)
31215  }
31216  CYTHON_FALLTHROUGH;
31217  case 2:
31218  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
31219  else {
31220  __Pyx_RaiseArgtupleInvalid("calculateInteriorNumericalTrace_Potential", 1, 8, 8, 2); __PYX_ERR(0, 5171, __pyx_L3_error)
31221  }
31222  CYTHON_FALLTHROUGH;
31223  case 3:
31224  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_phi)) != 0)) kw_args--;
31225  else {
31226  __Pyx_RaiseArgtupleInvalid("calculateInteriorNumericalTrace_Potential", 1, 8, 8, 3); __PYX_ERR(0, 5171, __pyx_L3_error)
31227  }
31228  CYTHON_FALLTHROUGH;
31229  case 4:
31230  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dphi)) != 0)) kw_args--;
31231  else {
31232  __Pyx_RaiseArgtupleInvalid("calculateInteriorNumericalTrace_Potential", 1, 8, 8, 4); __PYX_ERR(0, 5171, __pyx_L3_error)
31233  }
31234  CYTHON_FALLTHROUGH;
31235  case 5:
31236  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_phi_trace)) != 0)) kw_args--;
31237  else {
31238  __Pyx_RaiseArgtupleInvalid("calculateInteriorNumericalTrace_Potential", 1, 8, 8, 5); __PYX_ERR(0, 5171, __pyx_L3_error)
31239  }
31240  CYTHON_FALLTHROUGH;
31241  case 6:
31242  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dphi_trace_left)) != 0)) kw_args--;
31243  else {
31244  __Pyx_RaiseArgtupleInvalid("calculateInteriorNumericalTrace_Potential", 1, 8, 8, 6); __PYX_ERR(0, 5171, __pyx_L3_error)
31245  }
31246  CYTHON_FALLTHROUGH;
31247  case 7:
31248  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dphi_trace_right)) != 0)) kw_args--;
31249  else {
31250  __Pyx_RaiseArgtupleInvalid("calculateInteriorNumericalTrace_Potential", 1, 8, 8, 7); __PYX_ERR(0, 5171, __pyx_L3_error)
31251  }
31252  }
31253  if (unlikely(kw_args > 0)) {
31254  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateInteriorNumericalTrace_Potential") < 0)) __PYX_ERR(0, 5171, __pyx_L3_error)
31255  }
31256  } else if (PyTuple_GET_SIZE(__pyx_args) != 8) {
31257  goto __pyx_L5_argtuple_error;
31258  } else {
31259  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
31260  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
31261  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
31262  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
31263  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
31264  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
31265  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
31266  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
31267  }
31268  __pyx_v_interiorElementBoundaries = ((PyArrayObject *)values[0]);
31269  __pyx_v_elementBoundaryElements = ((PyArrayObject *)values[1]);
31270  __pyx_v_elementBoundaryLocalElementBoundaries = ((PyArrayObject *)values[2]);
31271  __pyx_v_phi = ((PyArrayObject *)values[3]);
31272  __pyx_v_dphi = ((PyArrayObject *)values[4]);
31273  __pyx_v_phi_trace = ((PyArrayObject *)values[5]);
31274  __pyx_v_dphi_trace_left = ((PyArrayObject *)values[6]);
31275  __pyx_v_dphi_trace_right = ((PyArrayObject *)values[7]);
31276  }
31277  goto __pyx_L4_argument_unpacking_done;
31278  __pyx_L5_argtuple_error:;
31279  __Pyx_RaiseArgtupleInvalid("calculateInteriorNumericalTrace_Potential", 1, 8, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5171, __pyx_L3_error)
31280  __pyx_L3_error:;
31281  __Pyx_AddTraceback("cfemIntegrals.calculateInteriorNumericalTrace_Potential", __pyx_clineno, __pyx_lineno, __pyx_filename);
31282  __Pyx_RefNannyFinishContext();
31283  return NULL;
31284  __pyx_L4_argument_unpacking_done:;
31285  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_interiorElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "interiorElementBoundaries", 0))) __PYX_ERR(0, 5171, __pyx_L1_error)
31286  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElements), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElements", 0))) __PYX_ERR(0, 5172, __pyx_L1_error)
31287  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundaries", 0))) __PYX_ERR(0, 5173, __pyx_L1_error)
31288  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_phi), __pyx_ptype_5numpy_ndarray, 1, "phi", 0))) __PYX_ERR(0, 5174, __pyx_L1_error)
31289  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dphi), __pyx_ptype_5numpy_ndarray, 1, "dphi", 0))) __PYX_ERR(0, 5175, __pyx_L1_error)
31290  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_phi_trace), __pyx_ptype_5numpy_ndarray, 1, "phi_trace", 0))) __PYX_ERR(0, 5176, __pyx_L1_error)
31291  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dphi_trace_left), __pyx_ptype_5numpy_ndarray, 1, "dphi_trace_left", 0))) __PYX_ERR(0, 5177, __pyx_L1_error)
31292  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dphi_trace_right), __pyx_ptype_5numpy_ndarray, 1, "dphi_trace_right", 0))) __PYX_ERR(0, 5178, __pyx_L1_error)
31293  __pyx_r = __pyx_pf_13cfemIntegrals_268calculateInteriorNumericalTrace_Potential(__pyx_self, __pyx_v_interiorElementBoundaries, __pyx_v_elementBoundaryElements, __pyx_v_elementBoundaryLocalElementBoundaries, __pyx_v_phi, __pyx_v_dphi, __pyx_v_phi_trace, __pyx_v_dphi_trace_left, __pyx_v_dphi_trace_right);
31294 
31295  /* function exit code */
31296  goto __pyx_L0;
31297  __pyx_L1_error:;
31298  __pyx_r = NULL;
31299  __pyx_L0:;
31300  __Pyx_RefNannyFinishContext();
31301  return __pyx_r;
31302 }
31303 
31304 static PyObject *__pyx_pf_13cfemIntegrals_268calculateInteriorNumericalTrace_Potential(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_interiorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_phi, PyArrayObject *__pyx_v_dphi, PyArrayObject *__pyx_v_phi_trace, PyArrayObject *__pyx_v_dphi_trace_left, PyArrayObject *__pyx_v_dphi_trace_right) {
31305  int __pyx_v_nInteriorElementBoundaries_global;
31306  int __pyx_v_nElementBoundaries_element;
31307  int __pyx_v_nQuadraturePoints_elementBoundary;
31308  PyObject *__pyx_r = NULL;
31309  __Pyx_RefNannyDeclarations
31310  __Pyx_RefNannySetupContext("calculateInteriorNumericalTrace_Potential", 0);
31311 
31312  /* "cfemIntegrals.pyx":5179
31313  * np.ndarray dphi_trace_left,
31314  * np.ndarray dphi_trace_right):
31315  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0] # <<<<<<<<<<<<<<
31316  * cdef int nElementBoundaries_element = phi.shape[1]
31317  * cdef int nQuadraturePoints_elementBoundary = phi.shape[2]
31318  */
31319  __pyx_v_nInteriorElementBoundaries_global = (__pyx_v_interiorElementBoundaries->dimensions[0]);
31320 
31321  /* "cfemIntegrals.pyx":5180
31322  * np.ndarray dphi_trace_right):
31323  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0]
31324  * cdef int nElementBoundaries_element = phi.shape[1] # <<<<<<<<<<<<<<
31325  * cdef int nQuadraturePoints_elementBoundary = phi.shape[2]
31326  * ccalculateInteriorNumericalTrace_Potential(nInteriorElementBoundaries_global,
31327  */
31328  __pyx_v_nElementBoundaries_element = (__pyx_v_phi->dimensions[1]);
31329 
31330  /* "cfemIntegrals.pyx":5181
31331  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0]
31332  * cdef int nElementBoundaries_element = phi.shape[1]
31333  * cdef int nQuadraturePoints_elementBoundary = phi.shape[2] # <<<<<<<<<<<<<<
31334  * ccalculateInteriorNumericalTrace_Potential(nInteriorElementBoundaries_global,
31335  * nElementBoundaries_element,
31336  */
31337  __pyx_v_nQuadraturePoints_elementBoundary = (__pyx_v_phi->dimensions[2]);
31338 
31339  /* "cfemIntegrals.pyx":5182
31340  * cdef int nElementBoundaries_element = phi.shape[1]
31341  * cdef int nQuadraturePoints_elementBoundary = phi.shape[2]
31342  * ccalculateInteriorNumericalTrace_Potential(nInteriorElementBoundaries_global, # <<<<<<<<<<<<<<
31343  * nElementBoundaries_element,
31344  * nQuadraturePoints_elementBoundary,
31345  */
31346  calculateInteriorNumericalTrace_Potential(__pyx_v_nInteriorElementBoundaries_global, __pyx_v_nElementBoundaries_element, __pyx_v_nQuadraturePoints_elementBoundary, ((int *)__pyx_v_interiorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), ((double *)__pyx_v_phi->data), ((double *)__pyx_v_dphi->data), ((double *)__pyx_v_phi_trace->data), ((double *)__pyx_v_dphi_trace_left->data), ((double *)__pyx_v_dphi_trace_right->data));
31347 
31348  /* "cfemIntegrals.pyx":5171
31349  * updateCoef,
31350  * <double*>velocity.data)
31351  * def calculateInteriorNumericalTrace_Potential(np.ndarray interiorElementBoundaries, # <<<<<<<<<<<<<<
31352  * np.ndarray elementBoundaryElements,
31353  * np.ndarray elementBoundaryLocalElementBoundaries,
31354  */
31355 
31356  /* function exit code */
31357  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
31358  __Pyx_XGIVEREF(__pyx_r);
31359  __Pyx_RefNannyFinishContext();
31360  return __pyx_r;
31361 }
31362 
31363 /* "cfemIntegrals.pyx":5193
31364  * <double*>dphi_trace_left.data,
31365  * <double*>dphi_trace_right.data)
31366  * def calculateExteriorNumericalTrace_Potential(np.ndarray isDOFBoundary, # <<<<<<<<<<<<<<
31367  * np.ndarray exteriorElementBoundaries,
31368  * np.ndarray elementBoundaryElements,
31369  */
31370 
31371 /* Python wrapper */
31372 static PyObject *__pyx_pw_13cfemIntegrals_271calculateExteriorNumericalTrace_Potential(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
31373 static PyMethodDef __pyx_mdef_13cfemIntegrals_271calculateExteriorNumericalTrace_Potential = {"calculateExteriorNumericalTrace_Potential", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_271calculateExteriorNumericalTrace_Potential, METH_VARARGS|METH_KEYWORDS, 0};
31374 static PyObject *__pyx_pw_13cfemIntegrals_271calculateExteriorNumericalTrace_Potential(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
31375  PyArrayObject *__pyx_v_isDOFBoundary = 0;
31376  PyArrayObject *__pyx_v_exteriorElementBoundaries = 0;
31377  PyArrayObject *__pyx_v_elementBoundaryElements = 0;
31378  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries = 0;
31379  PyArrayObject *__pyx_v_phi_bc = 0;
31380  PyArrayObject *__pyx_v_phi = 0;
31381  PyArrayObject *__pyx_v_dphi = 0;
31382  PyArrayObject *__pyx_v_phi_trace = 0;
31383  PyArrayObject *__pyx_v_dphi_trace_left = 0;
31384  int __pyx_lineno = 0;
31385  const char *__pyx_filename = NULL;
31386  int __pyx_clineno = 0;
31387  PyObject *__pyx_r = 0;
31388  __Pyx_RefNannyDeclarations
31389  __Pyx_RefNannySetupContext("calculateExteriorNumericalTrace_Potential (wrapper)", 0);
31390  {
31391  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_isDOFBoundary,&__pyx_n_s_exteriorElementBoundaries,&__pyx_n_s_elementBoundaryElements,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_phi_bc,&__pyx_n_s_phi,&__pyx_n_s_dphi,&__pyx_n_s_phi_trace,&__pyx_n_s_dphi_trace_left,0};
31392  PyObject* values[9] = {0,0,0,0,0,0,0,0,0};
31393  if (unlikely(__pyx_kwds)) {
31394  Py_ssize_t kw_args;
31395  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
31396  switch (pos_args) {
31397  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
31398  CYTHON_FALLTHROUGH;
31399  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
31400  CYTHON_FALLTHROUGH;
31401  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
31402  CYTHON_FALLTHROUGH;
31403  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
31404  CYTHON_FALLTHROUGH;
31405  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
31406  CYTHON_FALLTHROUGH;
31407  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
31408  CYTHON_FALLTHROUGH;
31409  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
31410  CYTHON_FALLTHROUGH;
31411  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
31412  CYTHON_FALLTHROUGH;
31413  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
31414  CYTHON_FALLTHROUGH;
31415  case 0: break;
31416  default: goto __pyx_L5_argtuple_error;
31417  }
31418  kw_args = PyDict_Size(__pyx_kwds);
31419  switch (pos_args) {
31420  case 0:
31421  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_isDOFBoundary)) != 0)) kw_args--;
31422  else goto __pyx_L5_argtuple_error;
31423  CYTHON_FALLTHROUGH;
31424  case 1:
31425  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exteriorElementBoundaries)) != 0)) kw_args--;
31426  else {
31427  __Pyx_RaiseArgtupleInvalid("calculateExteriorNumericalTrace_Potential", 1, 9, 9, 1); __PYX_ERR(0, 5193, __pyx_L3_error)
31428  }
31429  CYTHON_FALLTHROUGH;
31430  case 2:
31431  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElements)) != 0)) kw_args--;
31432  else {
31433  __Pyx_RaiseArgtupleInvalid("calculateExteriorNumericalTrace_Potential", 1, 9, 9, 2); __PYX_ERR(0, 5193, __pyx_L3_error)
31434  }
31435  CYTHON_FALLTHROUGH;
31436  case 3:
31437  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
31438  else {
31439  __Pyx_RaiseArgtupleInvalid("calculateExteriorNumericalTrace_Potential", 1, 9, 9, 3); __PYX_ERR(0, 5193, __pyx_L3_error)
31440  }
31441  CYTHON_FALLTHROUGH;
31442  case 4:
31443  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_phi_bc)) != 0)) kw_args--;
31444  else {
31445  __Pyx_RaiseArgtupleInvalid("calculateExteriorNumericalTrace_Potential", 1, 9, 9, 4); __PYX_ERR(0, 5193, __pyx_L3_error)
31446  }
31447  CYTHON_FALLTHROUGH;
31448  case 5:
31449  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_phi)) != 0)) kw_args--;
31450  else {
31451  __Pyx_RaiseArgtupleInvalid("calculateExteriorNumericalTrace_Potential", 1, 9, 9, 5); __PYX_ERR(0, 5193, __pyx_L3_error)
31452  }
31453  CYTHON_FALLTHROUGH;
31454  case 6:
31455  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dphi)) != 0)) kw_args--;
31456  else {
31457  __Pyx_RaiseArgtupleInvalid("calculateExteriorNumericalTrace_Potential", 1, 9, 9, 6); __PYX_ERR(0, 5193, __pyx_L3_error)
31458  }
31459  CYTHON_FALLTHROUGH;
31460  case 7:
31461  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_phi_trace)) != 0)) kw_args--;
31462  else {
31463  __Pyx_RaiseArgtupleInvalid("calculateExteriorNumericalTrace_Potential", 1, 9, 9, 7); __PYX_ERR(0, 5193, __pyx_L3_error)
31464  }
31465  CYTHON_FALLTHROUGH;
31466  case 8:
31467  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dphi_trace_left)) != 0)) kw_args--;
31468  else {
31469  __Pyx_RaiseArgtupleInvalid("calculateExteriorNumericalTrace_Potential", 1, 9, 9, 8); __PYX_ERR(0, 5193, __pyx_L3_error)
31470  }
31471  }
31472  if (unlikely(kw_args > 0)) {
31473  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateExteriorNumericalTrace_Potential") < 0)) __PYX_ERR(0, 5193, __pyx_L3_error)
31474  }
31475  } else if (PyTuple_GET_SIZE(__pyx_args) != 9) {
31476  goto __pyx_L5_argtuple_error;
31477  } else {
31478  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
31479  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
31480  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
31481  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
31482  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
31483  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
31484  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
31485  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
31486  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
31487  }
31488  __pyx_v_isDOFBoundary = ((PyArrayObject *)values[0]);
31489  __pyx_v_exteriorElementBoundaries = ((PyArrayObject *)values[1]);
31490  __pyx_v_elementBoundaryElements = ((PyArrayObject *)values[2]);
31491  __pyx_v_elementBoundaryLocalElementBoundaries = ((PyArrayObject *)values[3]);
31492  __pyx_v_phi_bc = ((PyArrayObject *)values[4]);
31493  __pyx_v_phi = ((PyArrayObject *)values[5]);
31494  __pyx_v_dphi = ((PyArrayObject *)values[6]);
31495  __pyx_v_phi_trace = ((PyArrayObject *)values[7]);
31496  __pyx_v_dphi_trace_left = ((PyArrayObject *)values[8]);
31497  }
31498  goto __pyx_L4_argument_unpacking_done;
31499  __pyx_L5_argtuple_error:;
31500  __Pyx_RaiseArgtupleInvalid("calculateExteriorNumericalTrace_Potential", 1, 9, 9, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5193, __pyx_L3_error)
31501  __pyx_L3_error:;
31502  __Pyx_AddTraceback("cfemIntegrals.calculateExteriorNumericalTrace_Potential", __pyx_clineno, __pyx_lineno, __pyx_filename);
31503  __Pyx_RefNannyFinishContext();
31504  return NULL;
31505  __pyx_L4_argument_unpacking_done:;
31506  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_isDOFBoundary), __pyx_ptype_5numpy_ndarray, 1, "isDOFBoundary", 0))) __PYX_ERR(0, 5193, __pyx_L1_error)
31507  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exteriorElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "exteriorElementBoundaries", 0))) __PYX_ERR(0, 5194, __pyx_L1_error)
31508  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElements), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElements", 0))) __PYX_ERR(0, 5195, __pyx_L1_error)
31509  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundaries", 0))) __PYX_ERR(0, 5196, __pyx_L1_error)
31510  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_phi_bc), __pyx_ptype_5numpy_ndarray, 1, "phi_bc", 0))) __PYX_ERR(0, 5197, __pyx_L1_error)
31511  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_phi), __pyx_ptype_5numpy_ndarray, 1, "phi", 0))) __PYX_ERR(0, 5198, __pyx_L1_error)
31512  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dphi), __pyx_ptype_5numpy_ndarray, 1, "dphi", 0))) __PYX_ERR(0, 5199, __pyx_L1_error)
31513  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_phi_trace), __pyx_ptype_5numpy_ndarray, 1, "phi_trace", 0))) __PYX_ERR(0, 5200, __pyx_L1_error)
31514  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dphi_trace_left), __pyx_ptype_5numpy_ndarray, 1, "dphi_trace_left", 0))) __PYX_ERR(0, 5201, __pyx_L1_error)
31515  __pyx_r = __pyx_pf_13cfemIntegrals_270calculateExteriorNumericalTrace_Potential(__pyx_self, __pyx_v_isDOFBoundary, __pyx_v_exteriorElementBoundaries, __pyx_v_elementBoundaryElements, __pyx_v_elementBoundaryLocalElementBoundaries, __pyx_v_phi_bc, __pyx_v_phi, __pyx_v_dphi, __pyx_v_phi_trace, __pyx_v_dphi_trace_left);
31516 
31517  /* function exit code */
31518  goto __pyx_L0;
31519  __pyx_L1_error:;
31520  __pyx_r = NULL;
31521  __pyx_L0:;
31522  __Pyx_RefNannyFinishContext();
31523  return __pyx_r;
31524 }
31525 
31526 static PyObject *__pyx_pf_13cfemIntegrals_270calculateExteriorNumericalTrace_Potential(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_isDOFBoundary, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_phi_bc, PyArrayObject *__pyx_v_phi, PyArrayObject *__pyx_v_dphi, PyArrayObject *__pyx_v_phi_trace, PyArrayObject *__pyx_v_dphi_trace_left) {
31527  int __pyx_v_nExteriorElementBoundaries_global;
31528  int __pyx_v_nElementBoundaries_element;
31529  int __pyx_v_nQuadraturePoints_elementBoundary;
31530  PyObject *__pyx_r = NULL;
31531  __Pyx_RefNannyDeclarations
31532  __Pyx_RefNannySetupContext("calculateExteriorNumericalTrace_Potential", 0);
31533 
31534  /* "cfemIntegrals.pyx":5202
31535  * np.ndarray phi_trace,
31536  * np.ndarray dphi_trace_left):
31537  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundaries.shape[0] # <<<<<<<<<<<<<<
31538  * cdef int nElementBoundaries_element = phi.shape[1]
31539  * cdef int nQuadraturePoints_elementBoundary = phi.shape[2]
31540  */
31541  __pyx_v_nExteriorElementBoundaries_global = (__pyx_v_exteriorElementBoundaries->dimensions[0]);
31542 
31543  /* "cfemIntegrals.pyx":5203
31544  * np.ndarray dphi_trace_left):
31545  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundaries.shape[0]
31546  * cdef int nElementBoundaries_element = phi.shape[1] # <<<<<<<<<<<<<<
31547  * cdef int nQuadraturePoints_elementBoundary = phi.shape[2]
31548  * ccalculateExteriorNumericalTrace_Potential(<int *>isDOFBoundary.data,
31549  */
31550  __pyx_v_nElementBoundaries_element = (__pyx_v_phi->dimensions[1]);
31551 
31552  /* "cfemIntegrals.pyx":5204
31553  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundaries.shape[0]
31554  * cdef int nElementBoundaries_element = phi.shape[1]
31555  * cdef int nQuadraturePoints_elementBoundary = phi.shape[2] # <<<<<<<<<<<<<<
31556  * ccalculateExteriorNumericalTrace_Potential(<int *>isDOFBoundary.data,
31557  * nExteriorElementBoundaries_global,
31558  */
31559  __pyx_v_nQuadraturePoints_elementBoundary = (__pyx_v_phi->dimensions[2]);
31560 
31561  /* "cfemIntegrals.pyx":5205
31562  * cdef int nElementBoundaries_element = phi.shape[1]
31563  * cdef int nQuadraturePoints_elementBoundary = phi.shape[2]
31564  * ccalculateExteriorNumericalTrace_Potential(<int *>isDOFBoundary.data, # <<<<<<<<<<<<<<
31565  * nExteriorElementBoundaries_global,
31566  * nElementBoundaries_element,
31567  */
31568  calculateExteriorNumericalTrace_Potential(((int *)__pyx_v_isDOFBoundary->data), __pyx_v_nExteriorElementBoundaries_global, __pyx_v_nElementBoundaries_element, __pyx_v_nQuadraturePoints_elementBoundary, ((int *)__pyx_v_exteriorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), ((double *)__pyx_v_phi_bc->data), ((double *)__pyx_v_phi->data), ((double *)__pyx_v_dphi->data), ((double *)__pyx_v_phi_trace->data), ((double *)__pyx_v_dphi_trace_left->data));
31569 
31570  /* "cfemIntegrals.pyx":5193
31571  * <double*>dphi_trace_left.data,
31572  * <double*>dphi_trace_right.data)
31573  * def calculateExteriorNumericalTrace_Potential(np.ndarray isDOFBoundary, # <<<<<<<<<<<<<<
31574  * np.ndarray exteriorElementBoundaries,
31575  * np.ndarray elementBoundaryElements,
31576  */
31577 
31578  /* function exit code */
31579  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
31580  __Pyx_XGIVEREF(__pyx_r);
31581  __Pyx_RefNannyFinishContext();
31582  return __pyx_r;
31583 }
31584 
31585 /* "cfemIntegrals.pyx":5217
31586  * <double*>phi_trace.data,
31587  * <double*>dphi_trace_left.data)
31588  * def updateInteriorElementBoundary_MixedForm_weak(np.ndarray interiorElementBoundaries, # <<<<<<<<<<<<<<
31589  * np.ndarray elementBoundaryElements,
31590  * np.ndarray elementBoundaryLocalElementBoundaries,
31591  */
31592 
31593 /* Python wrapper */
31594 static PyObject *__pyx_pw_13cfemIntegrals_273updateInteriorElementBoundary_MixedForm_weak(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
31595 static PyMethodDef __pyx_mdef_13cfemIntegrals_273updateInteriorElementBoundary_MixedForm_weak = {"updateInteriorElementBoundary_MixedForm_weak", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_273updateInteriorElementBoundary_MixedForm_weak, METH_VARARGS|METH_KEYWORDS, 0};
31596 static PyObject *__pyx_pw_13cfemIntegrals_273updateInteriorElementBoundary_MixedForm_weak(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
31597  PyArrayObject *__pyx_v_interiorElementBoundaries = 0;
31598  PyArrayObject *__pyx_v_elementBoundaryElements = 0;
31599  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries = 0;
31600  PyArrayObject *__pyx_v_n = 0;
31601  PyArrayObject *__pyx_v_phi_trace = 0;
31602  PyArrayObject *__pyx_v_w_dS = 0;
31603  PyArrayObject *__pyx_v_b = 0;
31604  int __pyx_lineno = 0;
31605  const char *__pyx_filename = NULL;
31606  int __pyx_clineno = 0;
31607  PyObject *__pyx_r = 0;
31608  __Pyx_RefNannyDeclarations
31609  __Pyx_RefNannySetupContext("updateInteriorElementBoundary_MixedForm_weak (wrapper)", 0);
31610  {
31611  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_interiorElementBoundaries,&__pyx_n_s_elementBoundaryElements,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_n,&__pyx_n_s_phi_trace,&__pyx_n_s_w_dS,&__pyx_n_s_b,0};
31612  PyObject* values[7] = {0,0,0,0,0,0,0};
31613  if (unlikely(__pyx_kwds)) {
31614  Py_ssize_t kw_args;
31615  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
31616  switch (pos_args) {
31617  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
31618  CYTHON_FALLTHROUGH;
31619  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
31620  CYTHON_FALLTHROUGH;
31621  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
31622  CYTHON_FALLTHROUGH;
31623  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
31624  CYTHON_FALLTHROUGH;
31625  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
31626  CYTHON_FALLTHROUGH;
31627  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
31628  CYTHON_FALLTHROUGH;
31629  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
31630  CYTHON_FALLTHROUGH;
31631  case 0: break;
31632  default: goto __pyx_L5_argtuple_error;
31633  }
31634  kw_args = PyDict_Size(__pyx_kwds);
31635  switch (pos_args) {
31636  case 0:
31637  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_interiorElementBoundaries)) != 0)) kw_args--;
31638  else goto __pyx_L5_argtuple_error;
31639  CYTHON_FALLTHROUGH;
31640  case 1:
31641  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElements)) != 0)) kw_args--;
31642  else {
31643  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundary_MixedForm_weak", 1, 7, 7, 1); __PYX_ERR(0, 5217, __pyx_L3_error)
31644  }
31645  CYTHON_FALLTHROUGH;
31646  case 2:
31647  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
31648  else {
31649  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundary_MixedForm_weak", 1, 7, 7, 2); __PYX_ERR(0, 5217, __pyx_L3_error)
31650  }
31651  CYTHON_FALLTHROUGH;
31652  case 3:
31653  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n)) != 0)) kw_args--;
31654  else {
31655  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundary_MixedForm_weak", 1, 7, 7, 3); __PYX_ERR(0, 5217, __pyx_L3_error)
31656  }
31657  CYTHON_FALLTHROUGH;
31658  case 4:
31659  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_phi_trace)) != 0)) kw_args--;
31660  else {
31661  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundary_MixedForm_weak", 1, 7, 7, 4); __PYX_ERR(0, 5217, __pyx_L3_error)
31662  }
31663  CYTHON_FALLTHROUGH;
31664  case 5:
31665  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_w_dS)) != 0)) kw_args--;
31666  else {
31667  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundary_MixedForm_weak", 1, 7, 7, 5); __PYX_ERR(0, 5217, __pyx_L3_error)
31668  }
31669  CYTHON_FALLTHROUGH;
31670  case 6:
31671  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--;
31672  else {
31673  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundary_MixedForm_weak", 1, 7, 7, 6); __PYX_ERR(0, 5217, __pyx_L3_error)
31674  }
31675  }
31676  if (unlikely(kw_args > 0)) {
31677  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateInteriorElementBoundary_MixedForm_weak") < 0)) __PYX_ERR(0, 5217, __pyx_L3_error)
31678  }
31679  } else if (PyTuple_GET_SIZE(__pyx_args) != 7) {
31680  goto __pyx_L5_argtuple_error;
31681  } else {
31682  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
31683  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
31684  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
31685  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
31686  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
31687  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
31688  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
31689  }
31690  __pyx_v_interiorElementBoundaries = ((PyArrayObject *)values[0]);
31691  __pyx_v_elementBoundaryElements = ((PyArrayObject *)values[1]);
31692  __pyx_v_elementBoundaryLocalElementBoundaries = ((PyArrayObject *)values[2]);
31693  __pyx_v_n = ((PyArrayObject *)values[3]);
31694  __pyx_v_phi_trace = ((PyArrayObject *)values[4]);
31695  __pyx_v_w_dS = ((PyArrayObject *)values[5]);
31696  __pyx_v_b = ((PyArrayObject *)values[6]);
31697  }
31698  goto __pyx_L4_argument_unpacking_done;
31699  __pyx_L5_argtuple_error:;
31700  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundary_MixedForm_weak", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5217, __pyx_L3_error)
31701  __pyx_L3_error:;
31702  __Pyx_AddTraceback("cfemIntegrals.updateInteriorElementBoundary_MixedForm_weak", __pyx_clineno, __pyx_lineno, __pyx_filename);
31703  __Pyx_RefNannyFinishContext();
31704  return NULL;
31705  __pyx_L4_argument_unpacking_done:;
31706  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_interiorElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "interiorElementBoundaries", 0))) __PYX_ERR(0, 5217, __pyx_L1_error)
31707  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElements), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElements", 0))) __PYX_ERR(0, 5218, __pyx_L1_error)
31708  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundaries", 0))) __PYX_ERR(0, 5219, __pyx_L1_error)
31709  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_n), __pyx_ptype_5numpy_ndarray, 1, "n", 0))) __PYX_ERR(0, 5220, __pyx_L1_error)
31710  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_phi_trace), __pyx_ptype_5numpy_ndarray, 1, "phi_trace", 0))) __PYX_ERR(0, 5221, __pyx_L1_error)
31711  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w_dS), __pyx_ptype_5numpy_ndarray, 1, "w_dS", 0))) __PYX_ERR(0, 5222, __pyx_L1_error)
31712  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_b), __pyx_ptype_5numpy_ndarray, 1, "b", 0))) __PYX_ERR(0, 5223, __pyx_L1_error)
31713  __pyx_r = __pyx_pf_13cfemIntegrals_272updateInteriorElementBoundary_MixedForm_weak(__pyx_self, __pyx_v_interiorElementBoundaries, __pyx_v_elementBoundaryElements, __pyx_v_elementBoundaryLocalElementBoundaries, __pyx_v_n, __pyx_v_phi_trace, __pyx_v_w_dS, __pyx_v_b);
31714 
31715  /* function exit code */
31716  goto __pyx_L0;
31717  __pyx_L1_error:;
31718  __pyx_r = NULL;
31719  __pyx_L0:;
31720  __Pyx_RefNannyFinishContext();
31721  return __pyx_r;
31722 }
31723 
31724 static PyObject *__pyx_pf_13cfemIntegrals_272updateInteriorElementBoundary_MixedForm_weak(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_interiorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_n, PyArrayObject *__pyx_v_phi_trace, PyArrayObject *__pyx_v_w_dS, PyArrayObject *__pyx_v_b) {
31725  int __pyx_v_nInteriorElementBoundaries_global;
31726  int __pyx_v_nElementBoundaries_element;
31727  int __pyx_v_nQuadraturePoints_elementBoundary;
31728  int __pyx_v_nDOF_test_element;
31729  int __pyx_v_nSpace;
31730  PyObject *__pyx_r = NULL;
31731  __Pyx_RefNannyDeclarations
31732  __Pyx_RefNannySetupContext("updateInteriorElementBoundary_MixedForm_weak", 0);
31733 
31734  /* "cfemIntegrals.pyx":5224
31735  * np.ndarray w_dS,
31736  * np.ndarray b):
31737  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0] # <<<<<<<<<<<<<<
31738  * cdef int nElementBoundaries_element = w_dS.shape[1]
31739  * cdef int nQuadraturePoints_elementBoundary = w_dS.shape[2]
31740  */
31741  __pyx_v_nInteriorElementBoundaries_global = (__pyx_v_interiorElementBoundaries->dimensions[0]);
31742 
31743  /* "cfemIntegrals.pyx":5225
31744  * np.ndarray b):
31745  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0]
31746  * cdef int nElementBoundaries_element = w_dS.shape[1] # <<<<<<<<<<<<<<
31747  * cdef int nQuadraturePoints_elementBoundary = w_dS.shape[2]
31748  * cdef int nDOF_test_element = w_dS.shape[3]
31749  */
31750  __pyx_v_nElementBoundaries_element = (__pyx_v_w_dS->dimensions[1]);
31751 
31752  /* "cfemIntegrals.pyx":5226
31753  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0]
31754  * cdef int nElementBoundaries_element = w_dS.shape[1]
31755  * cdef int nQuadraturePoints_elementBoundary = w_dS.shape[2] # <<<<<<<<<<<<<<
31756  * cdef int nDOF_test_element = w_dS.shape[3]
31757  * cdef int nSpace = n.shape[3]
31758  */
31759  __pyx_v_nQuadraturePoints_elementBoundary = (__pyx_v_w_dS->dimensions[2]);
31760 
31761  /* "cfemIntegrals.pyx":5227
31762  * cdef int nElementBoundaries_element = w_dS.shape[1]
31763  * cdef int nQuadraturePoints_elementBoundary = w_dS.shape[2]
31764  * cdef int nDOF_test_element = w_dS.shape[3] # <<<<<<<<<<<<<<
31765  * cdef int nSpace = n.shape[3]
31766  * cupdateInteriorElementBoundary_MixedForm_weak(nInteriorElementBoundaries_global,
31767  */
31768  __pyx_v_nDOF_test_element = (__pyx_v_w_dS->dimensions[3]);
31769 
31770  /* "cfemIntegrals.pyx":5228
31771  * cdef int nQuadraturePoints_elementBoundary = w_dS.shape[2]
31772  * cdef int nDOF_test_element = w_dS.shape[3]
31773  * cdef int nSpace = n.shape[3] # <<<<<<<<<<<<<<
31774  * cupdateInteriorElementBoundary_MixedForm_weak(nInteriorElementBoundaries_global,
31775  * nElementBoundaries_element,
31776  */
31777  __pyx_v_nSpace = (__pyx_v_n->dimensions[3]);
31778 
31779  /* "cfemIntegrals.pyx":5229
31780  * cdef int nDOF_test_element = w_dS.shape[3]
31781  * cdef int nSpace = n.shape[3]
31782  * cupdateInteriorElementBoundary_MixedForm_weak(nInteriorElementBoundaries_global, # <<<<<<<<<<<<<<
31783  * nElementBoundaries_element,
31784  * nQuadraturePoints_elementBoundary,
31785  */
31786  updateInteriorElementBoundary_MixedForm_weak(__pyx_v_nInteriorElementBoundaries_global, __pyx_v_nElementBoundaries_element, __pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nDOF_test_element, __pyx_v_nSpace, ((int *)__pyx_v_interiorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), ((double *)__pyx_v_n->data), ((double *)__pyx_v_phi_trace->data), ((double *)__pyx_v_w_dS->data), ((double *)__pyx_v_b->data));
31787 
31788  /* "cfemIntegrals.pyx":5217
31789  * <double*>phi_trace.data,
31790  * <double*>dphi_trace_left.data)
31791  * def updateInteriorElementBoundary_MixedForm_weak(np.ndarray interiorElementBoundaries, # <<<<<<<<<<<<<<
31792  * np.ndarray elementBoundaryElements,
31793  * np.ndarray elementBoundaryLocalElementBoundaries,
31794  */
31795 
31796  /* function exit code */
31797  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
31798  __Pyx_XGIVEREF(__pyx_r);
31799  __Pyx_RefNannyFinishContext();
31800  return __pyx_r;
31801 }
31802 
31803 /* "cfemIntegrals.pyx":5241
31804  * <double*>w_dS.data,
31805  * <double*>b.data)
31806  * def updateInteriorElementBoundary_MixedForm_weakJacobian(np.ndarray interiorElementBoundaries, # <<<<<<<<<<<<<<
31807  * np.ndarray elementBoundaryElements,
31808  * np.ndarray elementBoundaryLocalElementBoundaries,
31809  */
31810 
31811 /* Python wrapper */
31812 static PyObject *__pyx_pw_13cfemIntegrals_275updateInteriorElementBoundary_MixedForm_weakJacobian(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
31813 static PyMethodDef __pyx_mdef_13cfemIntegrals_275updateInteriorElementBoundary_MixedForm_weakJacobian = {"updateInteriorElementBoundary_MixedForm_weakJacobian", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_275updateInteriorElementBoundary_MixedForm_weakJacobian, METH_VARARGS|METH_KEYWORDS, 0};
31814 static PyObject *__pyx_pw_13cfemIntegrals_275updateInteriorElementBoundary_MixedForm_weakJacobian(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
31815  PyArrayObject *__pyx_v_interiorElementBoundaries = 0;
31816  PyArrayObject *__pyx_v_elementBoundaryElements = 0;
31817  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries = 0;
31818  PyArrayObject *__pyx_v_n = 0;
31819  PyArrayObject *__pyx_v_dphi_trace_left = 0;
31820  PyArrayObject *__pyx_v_dphi_trace_right = 0;
31821  PyArrayObject *__pyx_v_v = 0;
31822  PyArrayObject *__pyx_v_w_dS = 0;
31823  PyArrayObject *__pyx_v_db = 0;
31824  PyArrayObject *__pyx_v_db_eb = 0;
31825  int __pyx_lineno = 0;
31826  const char *__pyx_filename = NULL;
31827  int __pyx_clineno = 0;
31828  PyObject *__pyx_r = 0;
31829  __Pyx_RefNannyDeclarations
31830  __Pyx_RefNannySetupContext("updateInteriorElementBoundary_MixedForm_weakJacobian (wrapper)", 0);
31831  {
31832  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_interiorElementBoundaries,&__pyx_n_s_elementBoundaryElements,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_n,&__pyx_n_s_dphi_trace_left,&__pyx_n_s_dphi_trace_right,&__pyx_n_s_v,&__pyx_n_s_w_dS,&__pyx_n_s_db,&__pyx_n_s_db_eb,0};
31833  PyObject* values[10] = {0,0,0,0,0,0,0,0,0,0};
31834  if (unlikely(__pyx_kwds)) {
31835  Py_ssize_t kw_args;
31836  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
31837  switch (pos_args) {
31838  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
31839  CYTHON_FALLTHROUGH;
31840  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
31841  CYTHON_FALLTHROUGH;
31842  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
31843  CYTHON_FALLTHROUGH;
31844  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
31845  CYTHON_FALLTHROUGH;
31846  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
31847  CYTHON_FALLTHROUGH;
31848  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
31849  CYTHON_FALLTHROUGH;
31850  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
31851  CYTHON_FALLTHROUGH;
31852  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
31853  CYTHON_FALLTHROUGH;
31854  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
31855  CYTHON_FALLTHROUGH;
31856  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
31857  CYTHON_FALLTHROUGH;
31858  case 0: break;
31859  default: goto __pyx_L5_argtuple_error;
31860  }
31861  kw_args = PyDict_Size(__pyx_kwds);
31862  switch (pos_args) {
31863  case 0:
31864  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_interiorElementBoundaries)) != 0)) kw_args--;
31865  else goto __pyx_L5_argtuple_error;
31866  CYTHON_FALLTHROUGH;
31867  case 1:
31868  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElements)) != 0)) kw_args--;
31869  else {
31870  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundary_MixedForm_weakJacobian", 1, 10, 10, 1); __PYX_ERR(0, 5241, __pyx_L3_error)
31871  }
31872  CYTHON_FALLTHROUGH;
31873  case 2:
31874  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
31875  else {
31876  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundary_MixedForm_weakJacobian", 1, 10, 10, 2); __PYX_ERR(0, 5241, __pyx_L3_error)
31877  }
31878  CYTHON_FALLTHROUGH;
31879  case 3:
31880  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n)) != 0)) kw_args--;
31881  else {
31882  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundary_MixedForm_weakJacobian", 1, 10, 10, 3); __PYX_ERR(0, 5241, __pyx_L3_error)
31883  }
31884  CYTHON_FALLTHROUGH;
31885  case 4:
31886  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dphi_trace_left)) != 0)) kw_args--;
31887  else {
31888  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundary_MixedForm_weakJacobian", 1, 10, 10, 4); __PYX_ERR(0, 5241, __pyx_L3_error)
31889  }
31890  CYTHON_FALLTHROUGH;
31891  case 5:
31892  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dphi_trace_right)) != 0)) kw_args--;
31893  else {
31894  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundary_MixedForm_weakJacobian", 1, 10, 10, 5); __PYX_ERR(0, 5241, __pyx_L3_error)
31895  }
31896  CYTHON_FALLTHROUGH;
31897  case 6:
31898  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
31899  else {
31900  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundary_MixedForm_weakJacobian", 1, 10, 10, 6); __PYX_ERR(0, 5241, __pyx_L3_error)
31901  }
31902  CYTHON_FALLTHROUGH;
31903  case 7:
31904  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_w_dS)) != 0)) kw_args--;
31905  else {
31906  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundary_MixedForm_weakJacobian", 1, 10, 10, 7); __PYX_ERR(0, 5241, __pyx_L3_error)
31907  }
31908  CYTHON_FALLTHROUGH;
31909  case 8:
31910  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_db)) != 0)) kw_args--;
31911  else {
31912  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundary_MixedForm_weakJacobian", 1, 10, 10, 8); __PYX_ERR(0, 5241, __pyx_L3_error)
31913  }
31914  CYTHON_FALLTHROUGH;
31915  case 9:
31916  if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_db_eb)) != 0)) kw_args--;
31917  else {
31918  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundary_MixedForm_weakJacobian", 1, 10, 10, 9); __PYX_ERR(0, 5241, __pyx_L3_error)
31919  }
31920  }
31921  if (unlikely(kw_args > 0)) {
31922  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateInteriorElementBoundary_MixedForm_weakJacobian") < 0)) __PYX_ERR(0, 5241, __pyx_L3_error)
31923  }
31924  } else if (PyTuple_GET_SIZE(__pyx_args) != 10) {
31925  goto __pyx_L5_argtuple_error;
31926  } else {
31927  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
31928  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
31929  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
31930  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
31931  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
31932  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
31933  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
31934  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
31935  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
31936  values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
31937  }
31938  __pyx_v_interiorElementBoundaries = ((PyArrayObject *)values[0]);
31939  __pyx_v_elementBoundaryElements = ((PyArrayObject *)values[1]);
31940  __pyx_v_elementBoundaryLocalElementBoundaries = ((PyArrayObject *)values[2]);
31941  __pyx_v_n = ((PyArrayObject *)values[3]);
31942  __pyx_v_dphi_trace_left = ((PyArrayObject *)values[4]);
31943  __pyx_v_dphi_trace_right = ((PyArrayObject *)values[5]);
31944  __pyx_v_v = ((PyArrayObject *)values[6]);
31945  __pyx_v_w_dS = ((PyArrayObject *)values[7]);
31946  __pyx_v_db = ((PyArrayObject *)values[8]);
31947  __pyx_v_db_eb = ((PyArrayObject *)values[9]);
31948  }
31949  goto __pyx_L4_argument_unpacking_done;
31950  __pyx_L5_argtuple_error:;
31951  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundary_MixedForm_weakJacobian", 1, 10, 10, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5241, __pyx_L3_error)
31952  __pyx_L3_error:;
31953  __Pyx_AddTraceback("cfemIntegrals.updateInteriorElementBoundary_MixedForm_weakJacobian", __pyx_clineno, __pyx_lineno, __pyx_filename);
31954  __Pyx_RefNannyFinishContext();
31955  return NULL;
31956  __pyx_L4_argument_unpacking_done:;
31957  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_interiorElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "interiorElementBoundaries", 0))) __PYX_ERR(0, 5241, __pyx_L1_error)
31958  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElements), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElements", 0))) __PYX_ERR(0, 5242, __pyx_L1_error)
31959  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundaries", 0))) __PYX_ERR(0, 5243, __pyx_L1_error)
31960  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_n), __pyx_ptype_5numpy_ndarray, 1, "n", 0))) __PYX_ERR(0, 5244, __pyx_L1_error)
31961  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dphi_trace_left), __pyx_ptype_5numpy_ndarray, 1, "dphi_trace_left", 0))) __PYX_ERR(0, 5245, __pyx_L1_error)
31962  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dphi_trace_right), __pyx_ptype_5numpy_ndarray, 1, "dphi_trace_right", 0))) __PYX_ERR(0, 5246, __pyx_L1_error)
31963  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), __pyx_ptype_5numpy_ndarray, 1, "v", 0))) __PYX_ERR(0, 5247, __pyx_L1_error)
31964  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w_dS), __pyx_ptype_5numpy_ndarray, 1, "w_dS", 0))) __PYX_ERR(0, 5248, __pyx_L1_error)
31965  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_db), __pyx_ptype_5numpy_ndarray, 1, "db", 0))) __PYX_ERR(0, 5249, __pyx_L1_error)
31966  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_db_eb), __pyx_ptype_5numpy_ndarray, 1, "db_eb", 0))) __PYX_ERR(0, 5250, __pyx_L1_error)
31967  __pyx_r = __pyx_pf_13cfemIntegrals_274updateInteriorElementBoundary_MixedForm_weakJacobian(__pyx_self, __pyx_v_interiorElementBoundaries, __pyx_v_elementBoundaryElements, __pyx_v_elementBoundaryLocalElementBoundaries, __pyx_v_n, __pyx_v_dphi_trace_left, __pyx_v_dphi_trace_right, __pyx_v_v, __pyx_v_w_dS, __pyx_v_db, __pyx_v_db_eb);
31968 
31969  /* function exit code */
31970  goto __pyx_L0;
31971  __pyx_L1_error:;
31972  __pyx_r = NULL;
31973  __pyx_L0:;
31974  __Pyx_RefNannyFinishContext();
31975  return __pyx_r;
31976 }
31977 
31978 static PyObject *__pyx_pf_13cfemIntegrals_274updateInteriorElementBoundary_MixedForm_weakJacobian(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_interiorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_n, PyArrayObject *__pyx_v_dphi_trace_left, PyArrayObject *__pyx_v_dphi_trace_right, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_w_dS, PyArrayObject *__pyx_v_db, PyArrayObject *__pyx_v_db_eb) {
31979  int __pyx_v_nInteriorElementBoundaries_global;
31980  int __pyx_v_nElementBoundaries_element;
31981  int __pyx_v_nQuadraturePoints_elementBoundary;
31982  int __pyx_v_nDOF_test_element;
31983  int __pyx_v_nSpace;
31984  PyObject *__pyx_r = NULL;
31985  __Pyx_RefNannyDeclarations
31986  __Pyx_RefNannySetupContext("updateInteriorElementBoundary_MixedForm_weakJacobian", 0);
31987 
31988  /* "cfemIntegrals.pyx":5251
31989  * np.ndarray db,
31990  * np.ndarray db_eb):
31991  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0] # <<<<<<<<<<<<<<
31992  * cdef int nElementBoundaries_element = v.shape[1]
31993  * cdef int nQuadraturePoints_elementBoundary = v.shape[2]
31994  */
31995  __pyx_v_nInteriorElementBoundaries_global = (__pyx_v_interiorElementBoundaries->dimensions[0]);
31996 
31997  /* "cfemIntegrals.pyx":5252
31998  * np.ndarray db_eb):
31999  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0]
32000  * cdef int nElementBoundaries_element = v.shape[1] # <<<<<<<<<<<<<<
32001  * cdef int nQuadraturePoints_elementBoundary = v.shape[2]
32002  * cdef int nDOF_test_element = v.shape[3]
32003  */
32004  __pyx_v_nElementBoundaries_element = (__pyx_v_v->dimensions[1]);
32005 
32006  /* "cfemIntegrals.pyx":5253
32007  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0]
32008  * cdef int nElementBoundaries_element = v.shape[1]
32009  * cdef int nQuadraturePoints_elementBoundary = v.shape[2] # <<<<<<<<<<<<<<
32010  * cdef int nDOF_test_element = v.shape[3]
32011  * cdef int nSpace = n.shape[3]
32012  */
32013  __pyx_v_nQuadraturePoints_elementBoundary = (__pyx_v_v->dimensions[2]);
32014 
32015  /* "cfemIntegrals.pyx":5254
32016  * cdef int nElementBoundaries_element = v.shape[1]
32017  * cdef int nQuadraturePoints_elementBoundary = v.shape[2]
32018  * cdef int nDOF_test_element = v.shape[3] # <<<<<<<<<<<<<<
32019  * cdef int nSpace = n.shape[3]
32020  * cupdateInteriorElementBoundary_MixedForm_weakJacobian(nInteriorElementBoundaries_global,
32021  */
32022  __pyx_v_nDOF_test_element = (__pyx_v_v->dimensions[3]);
32023 
32024  /* "cfemIntegrals.pyx":5255
32025  * cdef int nQuadraturePoints_elementBoundary = v.shape[2]
32026  * cdef int nDOF_test_element = v.shape[3]
32027  * cdef int nSpace = n.shape[3] # <<<<<<<<<<<<<<
32028  * cupdateInteriorElementBoundary_MixedForm_weakJacobian(nInteriorElementBoundaries_global,
32029  * nElementBoundaries_element,
32030  */
32031  __pyx_v_nSpace = (__pyx_v_n->dimensions[3]);
32032 
32033  /* "cfemIntegrals.pyx":5256
32034  * cdef int nDOF_test_element = v.shape[3]
32035  * cdef int nSpace = n.shape[3]
32036  * cupdateInteriorElementBoundary_MixedForm_weakJacobian(nInteriorElementBoundaries_global, # <<<<<<<<<<<<<<
32037  * nElementBoundaries_element,
32038  * nQuadraturePoints_elementBoundary,
32039  */
32040  updateInteriorElementBoundary_MixedForm_weakJacobian(__pyx_v_nInteriorElementBoundaries_global, __pyx_v_nElementBoundaries_element, __pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nDOF_test_element, __pyx_v_nSpace, ((int *)__pyx_v_interiorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), ((double *)__pyx_v_n->data), ((double *)__pyx_v_dphi_trace_left->data), ((double *)__pyx_v_dphi_trace_right->data), ((double *)__pyx_v_v->data), ((double *)__pyx_v_w_dS->data), ((double *)__pyx_v_db->data), ((double *)__pyx_v_db_eb->data));
32041 
32042  /* "cfemIntegrals.pyx":5241
32043  * <double*>w_dS.data,
32044  * <double*>b.data)
32045  * def updateInteriorElementBoundary_MixedForm_weakJacobian(np.ndarray interiorElementBoundaries, # <<<<<<<<<<<<<<
32046  * np.ndarray elementBoundaryElements,
32047  * np.ndarray elementBoundaryLocalElementBoundaries,
32048  */
32049 
32050  /* function exit code */
32051  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
32052  __Pyx_XGIVEREF(__pyx_r);
32053  __Pyx_RefNannyFinishContext();
32054  return __pyx_r;
32055 }
32056 
32057 /* "cfemIntegrals.pyx":5271
32058  * <double*>db.data,
32059  * <double*>db_eb.data)
32060  * def updateExteriorElementBoundary_MixedForm_weak(np.ndarray exteriorElementBoundaries, # <<<<<<<<<<<<<<
32061  * np.ndarray elementBoundaryElements,
32062  * np.ndarray elementBoundaryLocalElementBoundaries,
32063  */
32064 
32065 /* Python wrapper */
32066 static PyObject *__pyx_pw_13cfemIntegrals_277updateExteriorElementBoundary_MixedForm_weak(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
32067 static PyMethodDef __pyx_mdef_13cfemIntegrals_277updateExteriorElementBoundary_MixedForm_weak = {"updateExteriorElementBoundary_MixedForm_weak", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_277updateExteriorElementBoundary_MixedForm_weak, METH_VARARGS|METH_KEYWORDS, 0};
32068 static PyObject *__pyx_pw_13cfemIntegrals_277updateExteriorElementBoundary_MixedForm_weak(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
32069  PyArrayObject *__pyx_v_exteriorElementBoundaries = 0;
32070  PyArrayObject *__pyx_v_elementBoundaryElements = 0;
32071  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries = 0;
32072  PyArrayObject *__pyx_v_n = 0;
32073  PyArrayObject *__pyx_v_phi_trace = 0;
32074  PyArrayObject *__pyx_v_w_dS = 0;
32075  PyArrayObject *__pyx_v_b = 0;
32076  int __pyx_lineno = 0;
32077  const char *__pyx_filename = NULL;
32078  int __pyx_clineno = 0;
32079  PyObject *__pyx_r = 0;
32080  __Pyx_RefNannyDeclarations
32081  __Pyx_RefNannySetupContext("updateExteriorElementBoundary_MixedForm_weak (wrapper)", 0);
32082  {
32083  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exteriorElementBoundaries,&__pyx_n_s_elementBoundaryElements,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_n,&__pyx_n_s_phi_trace,&__pyx_n_s_w_dS,&__pyx_n_s_b,0};
32084  PyObject* values[7] = {0,0,0,0,0,0,0};
32085  if (unlikely(__pyx_kwds)) {
32086  Py_ssize_t kw_args;
32087  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
32088  switch (pos_args) {
32089  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
32090  CYTHON_FALLTHROUGH;
32091  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
32092  CYTHON_FALLTHROUGH;
32093  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
32094  CYTHON_FALLTHROUGH;
32095  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
32096  CYTHON_FALLTHROUGH;
32097  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
32098  CYTHON_FALLTHROUGH;
32099  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
32100  CYTHON_FALLTHROUGH;
32101  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
32102  CYTHON_FALLTHROUGH;
32103  case 0: break;
32104  default: goto __pyx_L5_argtuple_error;
32105  }
32106  kw_args = PyDict_Size(__pyx_kwds);
32107  switch (pos_args) {
32108  case 0:
32109  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exteriorElementBoundaries)) != 0)) kw_args--;
32110  else goto __pyx_L5_argtuple_error;
32111  CYTHON_FALLTHROUGH;
32112  case 1:
32113  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElements)) != 0)) kw_args--;
32114  else {
32115  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundary_MixedForm_weak", 1, 7, 7, 1); __PYX_ERR(0, 5271, __pyx_L3_error)
32116  }
32117  CYTHON_FALLTHROUGH;
32118  case 2:
32119  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
32120  else {
32121  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundary_MixedForm_weak", 1, 7, 7, 2); __PYX_ERR(0, 5271, __pyx_L3_error)
32122  }
32123  CYTHON_FALLTHROUGH;
32124  case 3:
32125  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n)) != 0)) kw_args--;
32126  else {
32127  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundary_MixedForm_weak", 1, 7, 7, 3); __PYX_ERR(0, 5271, __pyx_L3_error)
32128  }
32129  CYTHON_FALLTHROUGH;
32130  case 4:
32131  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_phi_trace)) != 0)) kw_args--;
32132  else {
32133  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundary_MixedForm_weak", 1, 7, 7, 4); __PYX_ERR(0, 5271, __pyx_L3_error)
32134  }
32135  CYTHON_FALLTHROUGH;
32136  case 5:
32137  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_w_dS)) != 0)) kw_args--;
32138  else {
32139  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundary_MixedForm_weak", 1, 7, 7, 5); __PYX_ERR(0, 5271, __pyx_L3_error)
32140  }
32141  CYTHON_FALLTHROUGH;
32142  case 6:
32143  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--;
32144  else {
32145  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundary_MixedForm_weak", 1, 7, 7, 6); __PYX_ERR(0, 5271, __pyx_L3_error)
32146  }
32147  }
32148  if (unlikely(kw_args > 0)) {
32149  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateExteriorElementBoundary_MixedForm_weak") < 0)) __PYX_ERR(0, 5271, __pyx_L3_error)
32150  }
32151  } else if (PyTuple_GET_SIZE(__pyx_args) != 7) {
32152  goto __pyx_L5_argtuple_error;
32153  } else {
32154  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
32155  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
32156  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
32157  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
32158  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
32159  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
32160  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
32161  }
32162  __pyx_v_exteriorElementBoundaries = ((PyArrayObject *)values[0]);
32163  __pyx_v_elementBoundaryElements = ((PyArrayObject *)values[1]);
32164  __pyx_v_elementBoundaryLocalElementBoundaries = ((PyArrayObject *)values[2]);
32165  __pyx_v_n = ((PyArrayObject *)values[3]);
32166  __pyx_v_phi_trace = ((PyArrayObject *)values[4]);
32167  __pyx_v_w_dS = ((PyArrayObject *)values[5]);
32168  __pyx_v_b = ((PyArrayObject *)values[6]);
32169  }
32170  goto __pyx_L4_argument_unpacking_done;
32171  __pyx_L5_argtuple_error:;
32172  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundary_MixedForm_weak", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5271, __pyx_L3_error)
32173  __pyx_L3_error:;
32174  __Pyx_AddTraceback("cfemIntegrals.updateExteriorElementBoundary_MixedForm_weak", __pyx_clineno, __pyx_lineno, __pyx_filename);
32175  __Pyx_RefNannyFinishContext();
32176  return NULL;
32177  __pyx_L4_argument_unpacking_done:;
32178  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exteriorElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "exteriorElementBoundaries", 0))) __PYX_ERR(0, 5271, __pyx_L1_error)
32179  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElements), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElements", 0))) __PYX_ERR(0, 5272, __pyx_L1_error)
32180  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundaries", 0))) __PYX_ERR(0, 5273, __pyx_L1_error)
32181  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_n), __pyx_ptype_5numpy_ndarray, 1, "n", 0))) __PYX_ERR(0, 5274, __pyx_L1_error)
32182  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_phi_trace), __pyx_ptype_5numpy_ndarray, 1, "phi_trace", 0))) __PYX_ERR(0, 5275, __pyx_L1_error)
32183  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w_dS), __pyx_ptype_5numpy_ndarray, 1, "w_dS", 0))) __PYX_ERR(0, 5276, __pyx_L1_error)
32184  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_b), __pyx_ptype_5numpy_ndarray, 1, "b", 0))) __PYX_ERR(0, 5277, __pyx_L1_error)
32185  __pyx_r = __pyx_pf_13cfemIntegrals_276updateExteriorElementBoundary_MixedForm_weak(__pyx_self, __pyx_v_exteriorElementBoundaries, __pyx_v_elementBoundaryElements, __pyx_v_elementBoundaryLocalElementBoundaries, __pyx_v_n, __pyx_v_phi_trace, __pyx_v_w_dS, __pyx_v_b);
32186 
32187  /* function exit code */
32188  goto __pyx_L0;
32189  __pyx_L1_error:;
32190  __pyx_r = NULL;
32191  __pyx_L0:;
32192  __Pyx_RefNannyFinishContext();
32193  return __pyx_r;
32194 }
32195 
32196 static PyObject *__pyx_pf_13cfemIntegrals_276updateExteriorElementBoundary_MixedForm_weak(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_n, PyArrayObject *__pyx_v_phi_trace, PyArrayObject *__pyx_v_w_dS, PyArrayObject *__pyx_v_b) {
32197  int __pyx_v_nExteriorElementBoundaries_global;
32198  int __pyx_v_nElementBoundaries_element;
32199  int __pyx_v_nQuadraturePoints_elementBoundary;
32200  int __pyx_v_nDOF_test_element;
32201  int __pyx_v_nSpace;
32202  PyObject *__pyx_r = NULL;
32203  __Pyx_RefNannyDeclarations
32204  __Pyx_RefNannySetupContext("updateExteriorElementBoundary_MixedForm_weak", 0);
32205 
32206  /* "cfemIntegrals.pyx":5278
32207  * np.ndarray w_dS,
32208  * np.ndarray b):
32209  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundaries.shape[0] # <<<<<<<<<<<<<<
32210  * cdef int nElementBoundaries_element = w_dS.shape[1]
32211  * cdef int nQuadraturePoints_elementBoundary = w_dS.shape[2]
32212  */
32213  __pyx_v_nExteriorElementBoundaries_global = (__pyx_v_exteriorElementBoundaries->dimensions[0]);
32214 
32215  /* "cfemIntegrals.pyx":5279
32216  * np.ndarray b):
32217  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundaries.shape[0]
32218  * cdef int nElementBoundaries_element = w_dS.shape[1] # <<<<<<<<<<<<<<
32219  * cdef int nQuadraturePoints_elementBoundary = w_dS.shape[2]
32220  * cdef int nDOF_test_element = w_dS.shape[3]
32221  */
32222  __pyx_v_nElementBoundaries_element = (__pyx_v_w_dS->dimensions[1]);
32223 
32224  /* "cfemIntegrals.pyx":5280
32225  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundaries.shape[0]
32226  * cdef int nElementBoundaries_element = w_dS.shape[1]
32227  * cdef int nQuadraturePoints_elementBoundary = w_dS.shape[2] # <<<<<<<<<<<<<<
32228  * cdef int nDOF_test_element = w_dS.shape[3]
32229  * cdef int nSpace = n.shape[3]
32230  */
32231  __pyx_v_nQuadraturePoints_elementBoundary = (__pyx_v_w_dS->dimensions[2]);
32232 
32233  /* "cfemIntegrals.pyx":5281
32234  * cdef int nElementBoundaries_element = w_dS.shape[1]
32235  * cdef int nQuadraturePoints_elementBoundary = w_dS.shape[2]
32236  * cdef int nDOF_test_element = w_dS.shape[3] # <<<<<<<<<<<<<<
32237  * cdef int nSpace = n.shape[3]
32238  * cupdateExteriorElementBoundary_MixedForm_weak(nExteriorElementBoundaries_global,
32239  */
32240  __pyx_v_nDOF_test_element = (__pyx_v_w_dS->dimensions[3]);
32241 
32242  /* "cfemIntegrals.pyx":5282
32243  * cdef int nQuadraturePoints_elementBoundary = w_dS.shape[2]
32244  * cdef int nDOF_test_element = w_dS.shape[3]
32245  * cdef int nSpace = n.shape[3] # <<<<<<<<<<<<<<
32246  * cupdateExteriorElementBoundary_MixedForm_weak(nExteriorElementBoundaries_global,
32247  * nElementBoundaries_element,
32248  */
32249  __pyx_v_nSpace = (__pyx_v_n->dimensions[3]);
32250 
32251  /* "cfemIntegrals.pyx":5283
32252  * cdef int nDOF_test_element = w_dS.shape[3]
32253  * cdef int nSpace = n.shape[3]
32254  * cupdateExteriorElementBoundary_MixedForm_weak(nExteriorElementBoundaries_global, # <<<<<<<<<<<<<<
32255  * nElementBoundaries_element,
32256  * nQuadraturePoints_elementBoundary,
32257  */
32258  updateExteriorElementBoundary_MixedForm_weak(__pyx_v_nExteriorElementBoundaries_global, __pyx_v_nElementBoundaries_element, __pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nDOF_test_element, __pyx_v_nSpace, ((int *)__pyx_v_exteriorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), ((double *)__pyx_v_n->data), ((double *)__pyx_v_phi_trace->data), ((double *)__pyx_v_w_dS->data), ((double *)__pyx_v_b->data));
32259 
32260  /* "cfemIntegrals.pyx":5271
32261  * <double*>db.data,
32262  * <double*>db_eb.data)
32263  * def updateExteriorElementBoundary_MixedForm_weak(np.ndarray exteriorElementBoundaries, # <<<<<<<<<<<<<<
32264  * np.ndarray elementBoundaryElements,
32265  * np.ndarray elementBoundaryLocalElementBoundaries,
32266  */
32267 
32268  /* function exit code */
32269  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
32270  __Pyx_XGIVEREF(__pyx_r);
32271  __Pyx_RefNannyFinishContext();
32272  return __pyx_r;
32273 }
32274 
32275 /* "cfemIntegrals.pyx":5295
32276  * <double*>w_dS.data,
32277  * <double*>b.data)
32278  * def updateExteriorElementBoundary_MixedForm_weakJacobian(np.ndarray exteriorElementBoundaries, # <<<<<<<<<<<<<<
32279  * np.ndarray elementBoundaryElements,
32280  * np.ndarray elementBoundaryLocalElementBoundaries,
32281  */
32282 
32283 /* Python wrapper */
32284 static PyObject *__pyx_pw_13cfemIntegrals_279updateExteriorElementBoundary_MixedForm_weakJacobian(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
32285 static PyMethodDef __pyx_mdef_13cfemIntegrals_279updateExteriorElementBoundary_MixedForm_weakJacobian = {"updateExteriorElementBoundary_MixedForm_weakJacobian", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_279updateExteriorElementBoundary_MixedForm_weakJacobian, METH_VARARGS|METH_KEYWORDS, 0};
32286 static PyObject *__pyx_pw_13cfemIntegrals_279updateExteriorElementBoundary_MixedForm_weakJacobian(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
32287  PyArrayObject *__pyx_v_exteriorElementBoundaries = 0;
32288  PyArrayObject *__pyx_v_elementBoundaryElements = 0;
32289  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries = 0;
32290  PyArrayObject *__pyx_v_n = 0;
32291  PyArrayObject *__pyx_v_dphi_trace_left = 0;
32292  PyArrayObject *__pyx_v_v = 0;
32293  PyArrayObject *__pyx_v_w_dS = 0;
32294  PyArrayObject *__pyx_v_db = 0;
32295  PyArrayObject *__pyx_v_db_eb = 0;
32296  int __pyx_lineno = 0;
32297  const char *__pyx_filename = NULL;
32298  int __pyx_clineno = 0;
32299  PyObject *__pyx_r = 0;
32300  __Pyx_RefNannyDeclarations
32301  __Pyx_RefNannySetupContext("updateExteriorElementBoundary_MixedForm_weakJacobian (wrapper)", 0);
32302  {
32303  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exteriorElementBoundaries,&__pyx_n_s_elementBoundaryElements,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_n,&__pyx_n_s_dphi_trace_left,&__pyx_n_s_v,&__pyx_n_s_w_dS,&__pyx_n_s_db,&__pyx_n_s_db_eb,0};
32304  PyObject* values[9] = {0,0,0,0,0,0,0,0,0};
32305  if (unlikely(__pyx_kwds)) {
32306  Py_ssize_t kw_args;
32307  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
32308  switch (pos_args) {
32309  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
32310  CYTHON_FALLTHROUGH;
32311  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
32312  CYTHON_FALLTHROUGH;
32313  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
32314  CYTHON_FALLTHROUGH;
32315  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
32316  CYTHON_FALLTHROUGH;
32317  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
32318  CYTHON_FALLTHROUGH;
32319  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
32320  CYTHON_FALLTHROUGH;
32321  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
32322  CYTHON_FALLTHROUGH;
32323  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
32324  CYTHON_FALLTHROUGH;
32325  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
32326  CYTHON_FALLTHROUGH;
32327  case 0: break;
32328  default: goto __pyx_L5_argtuple_error;
32329  }
32330  kw_args = PyDict_Size(__pyx_kwds);
32331  switch (pos_args) {
32332  case 0:
32333  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exteriorElementBoundaries)) != 0)) kw_args--;
32334  else goto __pyx_L5_argtuple_error;
32335  CYTHON_FALLTHROUGH;
32336  case 1:
32337  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElements)) != 0)) kw_args--;
32338  else {
32339  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundary_MixedForm_weakJacobian", 1, 9, 9, 1); __PYX_ERR(0, 5295, __pyx_L3_error)
32340  }
32341  CYTHON_FALLTHROUGH;
32342  case 2:
32343  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
32344  else {
32345  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundary_MixedForm_weakJacobian", 1, 9, 9, 2); __PYX_ERR(0, 5295, __pyx_L3_error)
32346  }
32347  CYTHON_FALLTHROUGH;
32348  case 3:
32349  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n)) != 0)) kw_args--;
32350  else {
32351  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundary_MixedForm_weakJacobian", 1, 9, 9, 3); __PYX_ERR(0, 5295, __pyx_L3_error)
32352  }
32353  CYTHON_FALLTHROUGH;
32354  case 4:
32355  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dphi_trace_left)) != 0)) kw_args--;
32356  else {
32357  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundary_MixedForm_weakJacobian", 1, 9, 9, 4); __PYX_ERR(0, 5295, __pyx_L3_error)
32358  }
32359  CYTHON_FALLTHROUGH;
32360  case 5:
32361  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
32362  else {
32363  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundary_MixedForm_weakJacobian", 1, 9, 9, 5); __PYX_ERR(0, 5295, __pyx_L3_error)
32364  }
32365  CYTHON_FALLTHROUGH;
32366  case 6:
32367  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_w_dS)) != 0)) kw_args--;
32368  else {
32369  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundary_MixedForm_weakJacobian", 1, 9, 9, 6); __PYX_ERR(0, 5295, __pyx_L3_error)
32370  }
32371  CYTHON_FALLTHROUGH;
32372  case 7:
32373  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_db)) != 0)) kw_args--;
32374  else {
32375  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundary_MixedForm_weakJacobian", 1, 9, 9, 7); __PYX_ERR(0, 5295, __pyx_L3_error)
32376  }
32377  CYTHON_FALLTHROUGH;
32378  case 8:
32379  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_db_eb)) != 0)) kw_args--;
32380  else {
32381  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundary_MixedForm_weakJacobian", 1, 9, 9, 8); __PYX_ERR(0, 5295, __pyx_L3_error)
32382  }
32383  }
32384  if (unlikely(kw_args > 0)) {
32385  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateExteriorElementBoundary_MixedForm_weakJacobian") < 0)) __PYX_ERR(0, 5295, __pyx_L3_error)
32386  }
32387  } else if (PyTuple_GET_SIZE(__pyx_args) != 9) {
32388  goto __pyx_L5_argtuple_error;
32389  } else {
32390  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
32391  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
32392  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
32393  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
32394  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
32395  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
32396  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
32397  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
32398  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
32399  }
32400  __pyx_v_exteriorElementBoundaries = ((PyArrayObject *)values[0]);
32401  __pyx_v_elementBoundaryElements = ((PyArrayObject *)values[1]);
32402  __pyx_v_elementBoundaryLocalElementBoundaries = ((PyArrayObject *)values[2]);
32403  __pyx_v_n = ((PyArrayObject *)values[3]);
32404  __pyx_v_dphi_trace_left = ((PyArrayObject *)values[4]);
32405  __pyx_v_v = ((PyArrayObject *)values[5]);
32406  __pyx_v_w_dS = ((PyArrayObject *)values[6]);
32407  __pyx_v_db = ((PyArrayObject *)values[7]);
32408  __pyx_v_db_eb = ((PyArrayObject *)values[8]);
32409  }
32410  goto __pyx_L4_argument_unpacking_done;
32411  __pyx_L5_argtuple_error:;
32412  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundary_MixedForm_weakJacobian", 1, 9, 9, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5295, __pyx_L3_error)
32413  __pyx_L3_error:;
32414  __Pyx_AddTraceback("cfemIntegrals.updateExteriorElementBoundary_MixedForm_weakJacobian", __pyx_clineno, __pyx_lineno, __pyx_filename);
32415  __Pyx_RefNannyFinishContext();
32416  return NULL;
32417  __pyx_L4_argument_unpacking_done:;
32418  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exteriorElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "exteriorElementBoundaries", 0))) __PYX_ERR(0, 5295, __pyx_L1_error)
32419  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElements), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElements", 0))) __PYX_ERR(0, 5296, __pyx_L1_error)
32420  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundaries", 0))) __PYX_ERR(0, 5297, __pyx_L1_error)
32421  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_n), __pyx_ptype_5numpy_ndarray, 1, "n", 0))) __PYX_ERR(0, 5298, __pyx_L1_error)
32422  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dphi_trace_left), __pyx_ptype_5numpy_ndarray, 1, "dphi_trace_left", 0))) __PYX_ERR(0, 5299, __pyx_L1_error)
32423  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), __pyx_ptype_5numpy_ndarray, 1, "v", 0))) __PYX_ERR(0, 5300, __pyx_L1_error)
32424  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w_dS), __pyx_ptype_5numpy_ndarray, 1, "w_dS", 0))) __PYX_ERR(0, 5301, __pyx_L1_error)
32425  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_db), __pyx_ptype_5numpy_ndarray, 1, "db", 0))) __PYX_ERR(0, 5302, __pyx_L1_error)
32426  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_db_eb), __pyx_ptype_5numpy_ndarray, 1, "db_eb", 0))) __PYX_ERR(0, 5303, __pyx_L1_error)
32427  __pyx_r = __pyx_pf_13cfemIntegrals_278updateExteriorElementBoundary_MixedForm_weakJacobian(__pyx_self, __pyx_v_exteriorElementBoundaries, __pyx_v_elementBoundaryElements, __pyx_v_elementBoundaryLocalElementBoundaries, __pyx_v_n, __pyx_v_dphi_trace_left, __pyx_v_v, __pyx_v_w_dS, __pyx_v_db, __pyx_v_db_eb);
32428 
32429  /* function exit code */
32430  goto __pyx_L0;
32431  __pyx_L1_error:;
32432  __pyx_r = NULL;
32433  __pyx_L0:;
32434  __Pyx_RefNannyFinishContext();
32435  return __pyx_r;
32436 }
32437 
32438 static PyObject *__pyx_pf_13cfemIntegrals_278updateExteriorElementBoundary_MixedForm_weakJacobian(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_n, PyArrayObject *__pyx_v_dphi_trace_left, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_w_dS, PyArrayObject *__pyx_v_db, PyArrayObject *__pyx_v_db_eb) {
32439  int __pyx_v_nExteriorElementBoundaries_global;
32440  int __pyx_v_nElementBoundaries_element;
32441  int __pyx_v_nQuadraturePoints_elementBoundary;
32442  int __pyx_v_nDOF_test_element;
32443  int __pyx_v_nSpace;
32444  PyObject *__pyx_r = NULL;
32445  __Pyx_RefNannyDeclarations
32446  __Pyx_RefNannySetupContext("updateExteriorElementBoundary_MixedForm_weakJacobian", 0);
32447 
32448  /* "cfemIntegrals.pyx":5304
32449  * np.ndarray db,
32450  * np.ndarray db_eb):
32451  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundaries.shape[0] # <<<<<<<<<<<<<<
32452  * cdef int nElementBoundaries_element = v.shape[1]
32453  * cdef int nQuadraturePoints_elementBoundary = v.shape[2]
32454  */
32455  __pyx_v_nExteriorElementBoundaries_global = (__pyx_v_exteriorElementBoundaries->dimensions[0]);
32456 
32457  /* "cfemIntegrals.pyx":5305
32458  * np.ndarray db_eb):
32459  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundaries.shape[0]
32460  * cdef int nElementBoundaries_element = v.shape[1] # <<<<<<<<<<<<<<
32461  * cdef int nQuadraturePoints_elementBoundary = v.shape[2]
32462  * cdef int nDOF_test_element = v.shape[3]
32463  */
32464  __pyx_v_nElementBoundaries_element = (__pyx_v_v->dimensions[1]);
32465 
32466  /* "cfemIntegrals.pyx":5306
32467  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundaries.shape[0]
32468  * cdef int nElementBoundaries_element = v.shape[1]
32469  * cdef int nQuadraturePoints_elementBoundary = v.shape[2] # <<<<<<<<<<<<<<
32470  * cdef int nDOF_test_element = v.shape[3]
32471  * cdef int nSpace = n.shape[3]
32472  */
32473  __pyx_v_nQuadraturePoints_elementBoundary = (__pyx_v_v->dimensions[2]);
32474 
32475  /* "cfemIntegrals.pyx":5307
32476  * cdef int nElementBoundaries_element = v.shape[1]
32477  * cdef int nQuadraturePoints_elementBoundary = v.shape[2]
32478  * cdef int nDOF_test_element = v.shape[3] # <<<<<<<<<<<<<<
32479  * cdef int nSpace = n.shape[3]
32480  * cupdateExteriorElementBoundary_MixedForm_weakJacobian(nExteriorElementBoundaries_global,
32481  */
32482  __pyx_v_nDOF_test_element = (__pyx_v_v->dimensions[3]);
32483 
32484  /* "cfemIntegrals.pyx":5308
32485  * cdef int nQuadraturePoints_elementBoundary = v.shape[2]
32486  * cdef int nDOF_test_element = v.shape[3]
32487  * cdef int nSpace = n.shape[3] # <<<<<<<<<<<<<<
32488  * cupdateExteriorElementBoundary_MixedForm_weakJacobian(nExteriorElementBoundaries_global,
32489  * nElementBoundaries_element,
32490  */
32491  __pyx_v_nSpace = (__pyx_v_n->dimensions[3]);
32492 
32493  /* "cfemIntegrals.pyx":5309
32494  * cdef int nDOF_test_element = v.shape[3]
32495  * cdef int nSpace = n.shape[3]
32496  * cupdateExteriorElementBoundary_MixedForm_weakJacobian(nExteriorElementBoundaries_global, # <<<<<<<<<<<<<<
32497  * nElementBoundaries_element,
32498  * nQuadraturePoints_elementBoundary,
32499  */
32500  updateExteriorElementBoundary_MixedForm_weakJacobian(__pyx_v_nExteriorElementBoundaries_global, __pyx_v_nElementBoundaries_element, __pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nDOF_test_element, __pyx_v_nSpace, ((int *)__pyx_v_exteriorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), ((double *)__pyx_v_n->data), ((double *)__pyx_v_dphi_trace_left->data), ((double *)__pyx_v_v->data), ((double *)__pyx_v_w_dS->data), ((double *)__pyx_v_db->data), ((double *)__pyx_v_db_eb->data));
32501 
32502  /* "cfemIntegrals.pyx":5295
32503  * <double*>w_dS.data,
32504  * <double*>b.data)
32505  * def updateExteriorElementBoundary_MixedForm_weakJacobian(np.ndarray exteriorElementBoundaries, # <<<<<<<<<<<<<<
32506  * np.ndarray elementBoundaryElements,
32507  * np.ndarray elementBoundaryLocalElementBoundaries,
32508  */
32509 
32510  /* function exit code */
32511  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
32512  __Pyx_XGIVEREF(__pyx_r);
32513  __Pyx_RefNannyFinishContext();
32514  return __pyx_r;
32515 }
32516 
32517 /* "cfemIntegrals.pyx":5323
32518  * <double*>db.data,
32519  * <double*>db_eb.data)
32520  * def updatePotential_MixedForm_weak(np.ndarray phi, # <<<<<<<<<<<<<<
32521  * np.ndarray grad_w_dV,
32522  * np.ndarray b):
32523  */
32524 
32525 /* Python wrapper */
32526 static PyObject *__pyx_pw_13cfemIntegrals_281updatePotential_MixedForm_weak(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
32527 static PyMethodDef __pyx_mdef_13cfemIntegrals_281updatePotential_MixedForm_weak = {"updatePotential_MixedForm_weak", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_281updatePotential_MixedForm_weak, METH_VARARGS|METH_KEYWORDS, 0};
32528 static PyObject *__pyx_pw_13cfemIntegrals_281updatePotential_MixedForm_weak(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
32529  PyArrayObject *__pyx_v_phi = 0;
32530  PyArrayObject *__pyx_v_grad_w_dV = 0;
32531  PyArrayObject *__pyx_v_b = 0;
32532  int __pyx_lineno = 0;
32533  const char *__pyx_filename = NULL;
32534  int __pyx_clineno = 0;
32535  PyObject *__pyx_r = 0;
32536  __Pyx_RefNannyDeclarations
32537  __Pyx_RefNannySetupContext("updatePotential_MixedForm_weak (wrapper)", 0);
32538  {
32539  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_phi,&__pyx_n_s_grad_w_dV,&__pyx_n_s_b,0};
32540  PyObject* values[3] = {0,0,0};
32541  if (unlikely(__pyx_kwds)) {
32542  Py_ssize_t kw_args;
32543  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
32544  switch (pos_args) {
32545  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
32546  CYTHON_FALLTHROUGH;
32547  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
32548  CYTHON_FALLTHROUGH;
32549  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
32550  CYTHON_FALLTHROUGH;
32551  case 0: break;
32552  default: goto __pyx_L5_argtuple_error;
32553  }
32554  kw_args = PyDict_Size(__pyx_kwds);
32555  switch (pos_args) {
32556  case 0:
32557  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_phi)) != 0)) kw_args--;
32558  else goto __pyx_L5_argtuple_error;
32559  CYTHON_FALLTHROUGH;
32560  case 1:
32561  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_w_dV)) != 0)) kw_args--;
32562  else {
32563  __Pyx_RaiseArgtupleInvalid("updatePotential_MixedForm_weak", 1, 3, 3, 1); __PYX_ERR(0, 5323, __pyx_L3_error)
32564  }
32565  CYTHON_FALLTHROUGH;
32566  case 2:
32567  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--;
32568  else {
32569  __Pyx_RaiseArgtupleInvalid("updatePotential_MixedForm_weak", 1, 3, 3, 2); __PYX_ERR(0, 5323, __pyx_L3_error)
32570  }
32571  }
32572  if (unlikely(kw_args > 0)) {
32573  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updatePotential_MixedForm_weak") < 0)) __PYX_ERR(0, 5323, __pyx_L3_error)
32574  }
32575  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
32576  goto __pyx_L5_argtuple_error;
32577  } else {
32578  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
32579  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
32580  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
32581  }
32582  __pyx_v_phi = ((PyArrayObject *)values[0]);
32583  __pyx_v_grad_w_dV = ((PyArrayObject *)values[1]);
32584  __pyx_v_b = ((PyArrayObject *)values[2]);
32585  }
32586  goto __pyx_L4_argument_unpacking_done;
32587  __pyx_L5_argtuple_error:;
32588  __Pyx_RaiseArgtupleInvalid("updatePotential_MixedForm_weak", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5323, __pyx_L3_error)
32589  __pyx_L3_error:;
32590  __Pyx_AddTraceback("cfemIntegrals.updatePotential_MixedForm_weak", __pyx_clineno, __pyx_lineno, __pyx_filename);
32591  __Pyx_RefNannyFinishContext();
32592  return NULL;
32593  __pyx_L4_argument_unpacking_done:;
32594  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_phi), __pyx_ptype_5numpy_ndarray, 1, "phi", 0))) __PYX_ERR(0, 5323, __pyx_L1_error)
32595  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_w_dV), __pyx_ptype_5numpy_ndarray, 1, "grad_w_dV", 0))) __PYX_ERR(0, 5324, __pyx_L1_error)
32596  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_b), __pyx_ptype_5numpy_ndarray, 1, "b", 0))) __PYX_ERR(0, 5325, __pyx_L1_error)
32597  __pyx_r = __pyx_pf_13cfemIntegrals_280updatePotential_MixedForm_weak(__pyx_self, __pyx_v_phi, __pyx_v_grad_w_dV, __pyx_v_b);
32598 
32599  /* function exit code */
32600  goto __pyx_L0;
32601  __pyx_L1_error:;
32602  __pyx_r = NULL;
32603  __pyx_L0:;
32604  __Pyx_RefNannyFinishContext();
32605  return __pyx_r;
32606 }
32607 
32608 static PyObject *__pyx_pf_13cfemIntegrals_280updatePotential_MixedForm_weak(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_phi, PyArrayObject *__pyx_v_grad_w_dV, PyArrayObject *__pyx_v_b) {
32609  int __pyx_v_nElements_global;
32610  int __pyx_v_nQuadraturePoints_element;
32611  int __pyx_v_nDOF_test_element;
32612  int __pyx_v_nSpace;
32613  PyObject *__pyx_r = NULL;
32614  __Pyx_RefNannyDeclarations
32615  __Pyx_RefNannySetupContext("updatePotential_MixedForm_weak", 0);
32616 
32617  /* "cfemIntegrals.pyx":5326
32618  * np.ndarray grad_w_dV,
32619  * np.ndarray b):
32620  * cdef int nElements_global = grad_w_dV.shape[0] # <<<<<<<<<<<<<<
32621  * cdef int nQuadraturePoints_element = grad_w_dV.shape[1]
32622  * cdef int nDOF_test_element = grad_w_dV.shape[2]
32623  */
32624  __pyx_v_nElements_global = (__pyx_v_grad_w_dV->dimensions[0]);
32625 
32626  /* "cfemIntegrals.pyx":5327
32627  * np.ndarray b):
32628  * cdef int nElements_global = grad_w_dV.shape[0]
32629  * cdef int nQuadraturePoints_element = grad_w_dV.shape[1] # <<<<<<<<<<<<<<
32630  * cdef int nDOF_test_element = grad_w_dV.shape[2]
32631  * cdef int nSpace = grad_w_dV.shape[3]
32632  */
32633  __pyx_v_nQuadraturePoints_element = (__pyx_v_grad_w_dV->dimensions[1]);
32634 
32635  /* "cfemIntegrals.pyx":5328
32636  * cdef int nElements_global = grad_w_dV.shape[0]
32637  * cdef int nQuadraturePoints_element = grad_w_dV.shape[1]
32638  * cdef int nDOF_test_element = grad_w_dV.shape[2] # <<<<<<<<<<<<<<
32639  * cdef int nSpace = grad_w_dV.shape[3]
32640  * cupdatePotential_MixedForm_weak(nElements_global,
32641  */
32642  __pyx_v_nDOF_test_element = (__pyx_v_grad_w_dV->dimensions[2]);
32643 
32644  /* "cfemIntegrals.pyx":5329
32645  * cdef int nQuadraturePoints_element = grad_w_dV.shape[1]
32646  * cdef int nDOF_test_element = grad_w_dV.shape[2]
32647  * cdef int nSpace = grad_w_dV.shape[3] # <<<<<<<<<<<<<<
32648  * cupdatePotential_MixedForm_weak(nElements_global,
32649  * nQuadraturePoints_element,
32650  */
32651  __pyx_v_nSpace = (__pyx_v_grad_w_dV->dimensions[3]);
32652 
32653  /* "cfemIntegrals.pyx":5330
32654  * cdef int nDOF_test_element = grad_w_dV.shape[2]
32655  * cdef int nSpace = grad_w_dV.shape[3]
32656  * cupdatePotential_MixedForm_weak(nElements_global, # <<<<<<<<<<<<<<
32657  * nQuadraturePoints_element,
32658  * nDOF_test_element,
32659  */
32660  updatePotential_MixedForm_weak(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_test_element, __pyx_v_nSpace, ((double *)__pyx_v_phi->data), ((double *)__pyx_v_grad_w_dV->data), ((double *)__pyx_v_b->data));
32661 
32662  /* "cfemIntegrals.pyx":5323
32663  * <double*>db.data,
32664  * <double*>db_eb.data)
32665  * def updatePotential_MixedForm_weak(np.ndarray phi, # <<<<<<<<<<<<<<
32666  * np.ndarray grad_w_dV,
32667  * np.ndarray b):
32668  */
32669 
32670  /* function exit code */
32671  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
32672  __Pyx_XGIVEREF(__pyx_r);
32673  __Pyx_RefNannyFinishContext();
32674  return __pyx_r;
32675 }
32676 
32677 /* "cfemIntegrals.pyx":5337
32678  * <double*>grad_w_dV.data,
32679  * <double*>b.data)
32680  * def updatePotential_MixedForm_weakJacobian(np.ndarray dphi, # <<<<<<<<<<<<<<
32681  * np.ndarray v,
32682  * np.ndarray grad_w_dV,
32683  */
32684 
32685 /* Python wrapper */
32686 static PyObject *__pyx_pw_13cfemIntegrals_283updatePotential_MixedForm_weakJacobian(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
32687 static PyMethodDef __pyx_mdef_13cfemIntegrals_283updatePotential_MixedForm_weakJacobian = {"updatePotential_MixedForm_weakJacobian", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_283updatePotential_MixedForm_weakJacobian, METH_VARARGS|METH_KEYWORDS, 0};
32688 static PyObject *__pyx_pw_13cfemIntegrals_283updatePotential_MixedForm_weakJacobian(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
32689  PyArrayObject *__pyx_v_dphi = 0;
32690  PyArrayObject *__pyx_v_v = 0;
32691  PyArrayObject *__pyx_v_grad_w_dV = 0;
32692  PyArrayObject *__pyx_v_db = 0;
32693  int __pyx_lineno = 0;
32694  const char *__pyx_filename = NULL;
32695  int __pyx_clineno = 0;
32696  PyObject *__pyx_r = 0;
32697  __Pyx_RefNannyDeclarations
32698  __Pyx_RefNannySetupContext("updatePotential_MixedForm_weakJacobian (wrapper)", 0);
32699  {
32700  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dphi,&__pyx_n_s_v,&__pyx_n_s_grad_w_dV,&__pyx_n_s_db,0};
32701  PyObject* values[4] = {0,0,0,0};
32702  if (unlikely(__pyx_kwds)) {
32703  Py_ssize_t kw_args;
32704  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
32705  switch (pos_args) {
32706  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
32707  CYTHON_FALLTHROUGH;
32708  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
32709  CYTHON_FALLTHROUGH;
32710  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
32711  CYTHON_FALLTHROUGH;
32712  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
32713  CYTHON_FALLTHROUGH;
32714  case 0: break;
32715  default: goto __pyx_L5_argtuple_error;
32716  }
32717  kw_args = PyDict_Size(__pyx_kwds);
32718  switch (pos_args) {
32719  case 0:
32720  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dphi)) != 0)) kw_args--;
32721  else goto __pyx_L5_argtuple_error;
32722  CYTHON_FALLTHROUGH;
32723  case 1:
32724  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
32725  else {
32726  __Pyx_RaiseArgtupleInvalid("updatePotential_MixedForm_weakJacobian", 1, 4, 4, 1); __PYX_ERR(0, 5337, __pyx_L3_error)
32727  }
32728  CYTHON_FALLTHROUGH;
32729  case 2:
32730  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_w_dV)) != 0)) kw_args--;
32731  else {
32732  __Pyx_RaiseArgtupleInvalid("updatePotential_MixedForm_weakJacobian", 1, 4, 4, 2); __PYX_ERR(0, 5337, __pyx_L3_error)
32733  }
32734  CYTHON_FALLTHROUGH;
32735  case 3:
32736  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_db)) != 0)) kw_args--;
32737  else {
32738  __Pyx_RaiseArgtupleInvalid("updatePotential_MixedForm_weakJacobian", 1, 4, 4, 3); __PYX_ERR(0, 5337, __pyx_L3_error)
32739  }
32740  }
32741  if (unlikely(kw_args > 0)) {
32742  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updatePotential_MixedForm_weakJacobian") < 0)) __PYX_ERR(0, 5337, __pyx_L3_error)
32743  }
32744  } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
32745  goto __pyx_L5_argtuple_error;
32746  } else {
32747  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
32748  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
32749  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
32750  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
32751  }
32752  __pyx_v_dphi = ((PyArrayObject *)values[0]);
32753  __pyx_v_v = ((PyArrayObject *)values[1]);
32754  __pyx_v_grad_w_dV = ((PyArrayObject *)values[2]);
32755  __pyx_v_db = ((PyArrayObject *)values[3]);
32756  }
32757  goto __pyx_L4_argument_unpacking_done;
32758  __pyx_L5_argtuple_error:;
32759  __Pyx_RaiseArgtupleInvalid("updatePotential_MixedForm_weakJacobian", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5337, __pyx_L3_error)
32760  __pyx_L3_error:;
32761  __Pyx_AddTraceback("cfemIntegrals.updatePotential_MixedForm_weakJacobian", __pyx_clineno, __pyx_lineno, __pyx_filename);
32762  __Pyx_RefNannyFinishContext();
32763  return NULL;
32764  __pyx_L4_argument_unpacking_done:;
32765  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dphi), __pyx_ptype_5numpy_ndarray, 1, "dphi", 0))) __PYX_ERR(0, 5337, __pyx_L1_error)
32766  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), __pyx_ptype_5numpy_ndarray, 1, "v", 0))) __PYX_ERR(0, 5338, __pyx_L1_error)
32767  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_w_dV), __pyx_ptype_5numpy_ndarray, 1, "grad_w_dV", 0))) __PYX_ERR(0, 5339, __pyx_L1_error)
32768  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_db), __pyx_ptype_5numpy_ndarray, 1, "db", 0))) __PYX_ERR(0, 5340, __pyx_L1_error)
32769  __pyx_r = __pyx_pf_13cfemIntegrals_282updatePotential_MixedForm_weakJacobian(__pyx_self, __pyx_v_dphi, __pyx_v_v, __pyx_v_grad_w_dV, __pyx_v_db);
32770 
32771  /* function exit code */
32772  goto __pyx_L0;
32773  __pyx_L1_error:;
32774  __pyx_r = NULL;
32775  __pyx_L0:;
32776  __Pyx_RefNannyFinishContext();
32777  return __pyx_r;
32778 }
32779 
32780 static PyObject *__pyx_pf_13cfemIntegrals_282updatePotential_MixedForm_weakJacobian(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dphi, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_grad_w_dV, PyArrayObject *__pyx_v_db) {
32781  int __pyx_v_nElements_global;
32782  int __pyx_v_nQuadraturePoints_element;
32783  int __pyx_v_nDOF_test_element;
32784  int __pyx_v_nSpace;
32785  PyObject *__pyx_r = NULL;
32786  __Pyx_RefNannyDeclarations
32787  __Pyx_RefNannySetupContext("updatePotential_MixedForm_weakJacobian", 0);
32788 
32789  /* "cfemIntegrals.pyx":5341
32790  * np.ndarray grad_w_dV,
32791  * np.ndarray db):
32792  * cdef int nElements_global = grad_w_dV.shape[0] # <<<<<<<<<<<<<<
32793  * cdef int nQuadraturePoints_element = grad_w_dV.shape[1]
32794  * cdef int nDOF_test_element = grad_w_dV.shape[2]
32795  */
32796  __pyx_v_nElements_global = (__pyx_v_grad_w_dV->dimensions[0]);
32797 
32798  /* "cfemIntegrals.pyx":5342
32799  * np.ndarray db):
32800  * cdef int nElements_global = grad_w_dV.shape[0]
32801  * cdef int nQuadraturePoints_element = grad_w_dV.shape[1] # <<<<<<<<<<<<<<
32802  * cdef int nDOF_test_element = grad_w_dV.shape[2]
32803  * cdef int nSpace = grad_w_dV.shape[3]
32804  */
32805  __pyx_v_nQuadraturePoints_element = (__pyx_v_grad_w_dV->dimensions[1]);
32806 
32807  /* "cfemIntegrals.pyx":5343
32808  * cdef int nElements_global = grad_w_dV.shape[0]
32809  * cdef int nQuadraturePoints_element = grad_w_dV.shape[1]
32810  * cdef int nDOF_test_element = grad_w_dV.shape[2] # <<<<<<<<<<<<<<
32811  * cdef int nSpace = grad_w_dV.shape[3]
32812  * cupdatePotential_MixedForm_weakJacobian(nElements_global,
32813  */
32814  __pyx_v_nDOF_test_element = (__pyx_v_grad_w_dV->dimensions[2]);
32815 
32816  /* "cfemIntegrals.pyx":5344
32817  * cdef int nQuadraturePoints_element = grad_w_dV.shape[1]
32818  * cdef int nDOF_test_element = grad_w_dV.shape[2]
32819  * cdef int nSpace = grad_w_dV.shape[3] # <<<<<<<<<<<<<<
32820  * cupdatePotential_MixedForm_weakJacobian(nElements_global,
32821  * nQuadraturePoints_element,
32822  */
32823  __pyx_v_nSpace = (__pyx_v_grad_w_dV->dimensions[3]);
32824 
32825  /* "cfemIntegrals.pyx":5345
32826  * cdef int nDOF_test_element = grad_w_dV.shape[2]
32827  * cdef int nSpace = grad_w_dV.shape[3]
32828  * cupdatePotential_MixedForm_weakJacobian(nElements_global, # <<<<<<<<<<<<<<
32829  * nQuadraturePoints_element,
32830  * nDOF_test_element,
32831  */
32832  updatePotential_MixedForm_weakJacobian(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_test_element, __pyx_v_nSpace, ((double *)__pyx_v_dphi->data), ((double *)__pyx_v_v->data), ((double *)__pyx_v_grad_w_dV->data), ((double *)__pyx_v_db->data));
32833 
32834  /* "cfemIntegrals.pyx":5337
32835  * <double*>grad_w_dV.data,
32836  * <double*>b.data)
32837  * def updatePotential_MixedForm_weakJacobian(np.ndarray dphi, # <<<<<<<<<<<<<<
32838  * np.ndarray v,
32839  * np.ndarray grad_w_dV,
32840  */
32841 
32842  /* function exit code */
32843  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
32844  __Pyx_XGIVEREF(__pyx_r);
32845  __Pyx_RefNannyFinishContext();
32846  return __pyx_r;
32847 }
32848 
32849 /* "cfemIntegrals.pyx":5353
32850  * <double*>grad_w_dV.data,
32851  * <double*>db.data)
32852  * def calculateVelocityQuadrature_MixedForm(np.ndarray A_inv, # <<<<<<<<<<<<<<
32853  * np.ndarray b,
32854  * np.ndarray v,
32855  */
32856 
32857 /* Python wrapper */
32858 static PyObject *__pyx_pw_13cfemIntegrals_285calculateVelocityQuadrature_MixedForm(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
32859 static PyMethodDef __pyx_mdef_13cfemIntegrals_285calculateVelocityQuadrature_MixedForm = {"calculateVelocityQuadrature_MixedForm", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_285calculateVelocityQuadrature_MixedForm, METH_VARARGS|METH_KEYWORDS, 0};
32860 static PyObject *__pyx_pw_13cfemIntegrals_285calculateVelocityQuadrature_MixedForm(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
32861  PyArrayObject *__pyx_v_A_inv = 0;
32862  PyArrayObject *__pyx_v_b = 0;
32863  PyArrayObject *__pyx_v_v = 0;
32864  PyArrayObject *__pyx_v_V = 0;
32865  PyArrayObject *__pyx_v_qv = 0;
32866  PyArrayObject *__pyx_v_qV = 0;
32867  int __pyx_lineno = 0;
32868  const char *__pyx_filename = NULL;
32869  int __pyx_clineno = 0;
32870  PyObject *__pyx_r = 0;
32871  __Pyx_RefNannyDeclarations
32872  __Pyx_RefNannySetupContext("calculateVelocityQuadrature_MixedForm (wrapper)", 0);
32873  {
32874  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_A_inv,&__pyx_n_s_b,&__pyx_n_s_v,&__pyx_n_s_V,&__pyx_n_s_qv,&__pyx_n_s_qV,0};
32875  PyObject* values[6] = {0,0,0,0,0,0};
32876  if (unlikely(__pyx_kwds)) {
32877  Py_ssize_t kw_args;
32878  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
32879  switch (pos_args) {
32880  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
32881  CYTHON_FALLTHROUGH;
32882  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
32883  CYTHON_FALLTHROUGH;
32884  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
32885  CYTHON_FALLTHROUGH;
32886  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
32887  CYTHON_FALLTHROUGH;
32888  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
32889  CYTHON_FALLTHROUGH;
32890  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
32891  CYTHON_FALLTHROUGH;
32892  case 0: break;
32893  default: goto __pyx_L5_argtuple_error;
32894  }
32895  kw_args = PyDict_Size(__pyx_kwds);
32896  switch (pos_args) {
32897  case 0:
32898  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_A_inv)) != 0)) kw_args--;
32899  else goto __pyx_L5_argtuple_error;
32900  CYTHON_FALLTHROUGH;
32901  case 1:
32902  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--;
32903  else {
32904  __Pyx_RaiseArgtupleInvalid("calculateVelocityQuadrature_MixedForm", 1, 6, 6, 1); __PYX_ERR(0, 5353, __pyx_L3_error)
32905  }
32906  CYTHON_FALLTHROUGH;
32907  case 2:
32908  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
32909  else {
32910  __Pyx_RaiseArgtupleInvalid("calculateVelocityQuadrature_MixedForm", 1, 6, 6, 2); __PYX_ERR(0, 5353, __pyx_L3_error)
32911  }
32912  CYTHON_FALLTHROUGH;
32913  case 3:
32914  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_V)) != 0)) kw_args--;
32915  else {
32916  __Pyx_RaiseArgtupleInvalid("calculateVelocityQuadrature_MixedForm", 1, 6, 6, 3); __PYX_ERR(0, 5353, __pyx_L3_error)
32917  }
32918  CYTHON_FALLTHROUGH;
32919  case 4:
32920  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_qv)) != 0)) kw_args--;
32921  else {
32922  __Pyx_RaiseArgtupleInvalid("calculateVelocityQuadrature_MixedForm", 1, 6, 6, 4); __PYX_ERR(0, 5353, __pyx_L3_error)
32923  }
32924  CYTHON_FALLTHROUGH;
32925  case 5:
32926  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_qV)) != 0)) kw_args--;
32927  else {
32928  __Pyx_RaiseArgtupleInvalid("calculateVelocityQuadrature_MixedForm", 1, 6, 6, 5); __PYX_ERR(0, 5353, __pyx_L3_error)
32929  }
32930  }
32931  if (unlikely(kw_args > 0)) {
32932  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateVelocityQuadrature_MixedForm") < 0)) __PYX_ERR(0, 5353, __pyx_L3_error)
32933  }
32934  } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
32935  goto __pyx_L5_argtuple_error;
32936  } else {
32937  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
32938  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
32939  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
32940  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
32941  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
32942  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
32943  }
32944  __pyx_v_A_inv = ((PyArrayObject *)values[0]);
32945  __pyx_v_b = ((PyArrayObject *)values[1]);
32946  __pyx_v_v = ((PyArrayObject *)values[2]);
32947  __pyx_v_V = ((PyArrayObject *)values[3]);
32948  __pyx_v_qv = ((PyArrayObject *)values[4]);
32949  __pyx_v_qV = ((PyArrayObject *)values[5]);
32950  }
32951  goto __pyx_L4_argument_unpacking_done;
32952  __pyx_L5_argtuple_error:;
32953  __Pyx_RaiseArgtupleInvalid("calculateVelocityQuadrature_MixedForm", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5353, __pyx_L3_error)
32954  __pyx_L3_error:;
32955  __Pyx_AddTraceback("cfemIntegrals.calculateVelocityQuadrature_MixedForm", __pyx_clineno, __pyx_lineno, __pyx_filename);
32956  __Pyx_RefNannyFinishContext();
32957  return NULL;
32958  __pyx_L4_argument_unpacking_done:;
32959  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_A_inv), __pyx_ptype_5numpy_ndarray, 1, "A_inv", 0))) __PYX_ERR(0, 5353, __pyx_L1_error)
32960  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_b), __pyx_ptype_5numpy_ndarray, 1, "b", 0))) __PYX_ERR(0, 5354, __pyx_L1_error)
32961  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), __pyx_ptype_5numpy_ndarray, 1, "v", 0))) __PYX_ERR(0, 5355, __pyx_L1_error)
32962  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_V), __pyx_ptype_5numpy_ndarray, 1, "V", 0))) __PYX_ERR(0, 5356, __pyx_L1_error)
32963  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_qv), __pyx_ptype_5numpy_ndarray, 1, "qv", 0))) __PYX_ERR(0, 5357, __pyx_L1_error)
32964  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_qV), __pyx_ptype_5numpy_ndarray, 1, "qV", 0))) __PYX_ERR(0, 5358, __pyx_L1_error)
32965  __pyx_r = __pyx_pf_13cfemIntegrals_284calculateVelocityQuadrature_MixedForm(__pyx_self, __pyx_v_A_inv, __pyx_v_b, __pyx_v_v, __pyx_v_V, __pyx_v_qv, __pyx_v_qV);
32966 
32967  /* function exit code */
32968  goto __pyx_L0;
32969  __pyx_L1_error:;
32970  __pyx_r = NULL;
32971  __pyx_L0:;
32972  __Pyx_RefNannyFinishContext();
32973  return __pyx_r;
32974 }
32975 
32976 static PyObject *__pyx_pf_13cfemIntegrals_284calculateVelocityQuadrature_MixedForm(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_A_inv, PyArrayObject *__pyx_v_b, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_V, PyArrayObject *__pyx_v_qv, PyArrayObject *__pyx_v_qV) {
32977  int __pyx_v_nElements_global;
32978  int __pyx_v_nElementBoundaries_element;
32979  int __pyx_v_nElementBoundaryQuadraturePoints_elementBoundary;
32980  int __pyx_v_nDOF_element;
32981  int __pyx_v_nSpace;
32982  int __pyx_v_nQuadraturePoints_element;
32983  PyObject *__pyx_r = NULL;
32984  __Pyx_RefNannyDeclarations
32985  __Pyx_RefNannySetupContext("calculateVelocityQuadrature_MixedForm", 0);
32986 
32987  /* "cfemIntegrals.pyx":5359
32988  * np.ndarray qv,
32989  * np.ndarray qV):
32990  * cdef int nElements_global = v.shape[0] # <<<<<<<<<<<<<<
32991  * cdef int nElementBoundaries_element = v.shape[1]
32992  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = v.shape[2]
32993  */
32994  __pyx_v_nElements_global = (__pyx_v_v->dimensions[0]);
32995 
32996  /* "cfemIntegrals.pyx":5360
32997  * np.ndarray qV):
32998  * cdef int nElements_global = v.shape[0]
32999  * cdef int nElementBoundaries_element = v.shape[1] # <<<<<<<<<<<<<<
33000  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = v.shape[2]
33001  * cdef int nDOF_element = v.shape[3]
33002  */
33003  __pyx_v_nElementBoundaries_element = (__pyx_v_v->dimensions[1]);
33004 
33005  /* "cfemIntegrals.pyx":5361
33006  * cdef int nElements_global = v.shape[0]
33007  * cdef int nElementBoundaries_element = v.shape[1]
33008  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = v.shape[2] # <<<<<<<<<<<<<<
33009  * cdef int nDOF_element = v.shape[3]
33010  * cdef int nSpace = b.shape[1]
33011  */
33012  __pyx_v_nElementBoundaryQuadraturePoints_elementBoundary = (__pyx_v_v->dimensions[2]);
33013 
33014  /* "cfemIntegrals.pyx":5362
33015  * cdef int nElementBoundaries_element = v.shape[1]
33016  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = v.shape[2]
33017  * cdef int nDOF_element = v.shape[3] # <<<<<<<<<<<<<<
33018  * cdef int nSpace = b.shape[1]
33019  * cdef int nQuadraturePoints_element = qv.shape[1]
33020  */
33021  __pyx_v_nDOF_element = (__pyx_v_v->dimensions[3]);
33022 
33023  /* "cfemIntegrals.pyx":5363
33024  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = v.shape[2]
33025  * cdef int nDOF_element = v.shape[3]
33026  * cdef int nSpace = b.shape[1] # <<<<<<<<<<<<<<
33027  * cdef int nQuadraturePoints_element = qv.shape[1]
33028  * ccalculateVelocityQuadrature_MixedForm(nElements_global,
33029  */
33030  __pyx_v_nSpace = (__pyx_v_b->dimensions[1]);
33031 
33032  /* "cfemIntegrals.pyx":5364
33033  * cdef int nDOF_element = v.shape[3]
33034  * cdef int nSpace = b.shape[1]
33035  * cdef int nQuadraturePoints_element = qv.shape[1] # <<<<<<<<<<<<<<
33036  * ccalculateVelocityQuadrature_MixedForm(nElements_global,
33037  * nElementBoundaries_element,
33038  */
33039  __pyx_v_nQuadraturePoints_element = (__pyx_v_qv->dimensions[1]);
33040 
33041  /* "cfemIntegrals.pyx":5365
33042  * cdef int nSpace = b.shape[1]
33043  * cdef int nQuadraturePoints_element = qv.shape[1]
33044  * ccalculateVelocityQuadrature_MixedForm(nElements_global, # <<<<<<<<<<<<<<
33045  * nElementBoundaries_element,
33046  * nElementBoundaryQuadraturePoints_elementBoundary,
33047  */
33048  calculateVelocityQuadrature_MixedForm(__pyx_v_nElements_global, __pyx_v_nElementBoundaries_element, __pyx_v_nElementBoundaryQuadraturePoints_elementBoundary, __pyx_v_nDOF_element, __pyx_v_nSpace, __pyx_v_nQuadraturePoints_element, ((double *)__pyx_v_A_inv->data), ((double *)__pyx_v_b->data), ((double *)__pyx_v_v->data), ((double *)__pyx_v_V->data), ((double *)__pyx_v_qv->data), ((double *)__pyx_v_qV->data));
33049 
33050  /* "cfemIntegrals.pyx":5353
33051  * <double*>grad_w_dV.data,
33052  * <double*>db.data)
33053  * def calculateVelocityQuadrature_MixedForm(np.ndarray A_inv, # <<<<<<<<<<<<<<
33054  * np.ndarray b,
33055  * np.ndarray v,
33056  */
33057 
33058  /* function exit code */
33059  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
33060  __Pyx_XGIVEREF(__pyx_r);
33061  __Pyx_RefNannyFinishContext();
33062  return __pyx_r;
33063 }
33064 
33065 /* "cfemIntegrals.pyx":5377
33066  * <double*>qv.data,
33067  * <double*>qV.data)
33068  * def calculateVelocityQuadrature_MixedForm_Jacobian(np.ndarray A_inv, # <<<<<<<<<<<<<<
33069  * np.ndarray db,
33070  * np.ndarray db_eb,
33071  */
33072 
33073 /* Python wrapper */
33074 static PyObject *__pyx_pw_13cfemIntegrals_287calculateVelocityQuadrature_MixedForm_Jacobian(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
33075 static PyMethodDef __pyx_mdef_13cfemIntegrals_287calculateVelocityQuadrature_MixedForm_Jacobian = {"calculateVelocityQuadrature_MixedForm_Jacobian", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_287calculateVelocityQuadrature_MixedForm_Jacobian, METH_VARARGS|METH_KEYWORDS, 0};
33076 static PyObject *__pyx_pw_13cfemIntegrals_287calculateVelocityQuadrature_MixedForm_Jacobian(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
33077  PyArrayObject *__pyx_v_A_inv = 0;
33078  PyArrayObject *__pyx_v_db = 0;
33079  PyArrayObject *__pyx_v_db_eb = 0;
33080  PyArrayObject *__pyx_v_v = 0;
33081  PyArrayObject *__pyx_v_DV = 0;
33082  PyArrayObject *__pyx_v_DV_eb = 0;
33083  PyArrayObject *__pyx_v_qv = 0;
33084  PyArrayObject *__pyx_v_qDV = 0;
33085  PyArrayObject *__pyx_v_qDV_eb = 0;
33086  int __pyx_lineno = 0;
33087  const char *__pyx_filename = NULL;
33088  int __pyx_clineno = 0;
33089  PyObject *__pyx_r = 0;
33090  __Pyx_RefNannyDeclarations
33091  __Pyx_RefNannySetupContext("calculateVelocityQuadrature_MixedForm_Jacobian (wrapper)", 0);
33092  {
33093  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_A_inv,&__pyx_n_s_db,&__pyx_n_s_db_eb,&__pyx_n_s_v,&__pyx_n_s_DV,&__pyx_n_s_DV_eb,&__pyx_n_s_qv,&__pyx_n_s_qDV,&__pyx_n_s_qDV_eb,0};
33094  PyObject* values[9] = {0,0,0,0,0,0,0,0,0};
33095  if (unlikely(__pyx_kwds)) {
33096  Py_ssize_t kw_args;
33097  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
33098  switch (pos_args) {
33099  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
33100  CYTHON_FALLTHROUGH;
33101  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
33102  CYTHON_FALLTHROUGH;
33103  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
33104  CYTHON_FALLTHROUGH;
33105  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
33106  CYTHON_FALLTHROUGH;
33107  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
33108  CYTHON_FALLTHROUGH;
33109  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
33110  CYTHON_FALLTHROUGH;
33111  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
33112  CYTHON_FALLTHROUGH;
33113  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
33114  CYTHON_FALLTHROUGH;
33115  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
33116  CYTHON_FALLTHROUGH;
33117  case 0: break;
33118  default: goto __pyx_L5_argtuple_error;
33119  }
33120  kw_args = PyDict_Size(__pyx_kwds);
33121  switch (pos_args) {
33122  case 0:
33123  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_A_inv)) != 0)) kw_args--;
33124  else goto __pyx_L5_argtuple_error;
33125  CYTHON_FALLTHROUGH;
33126  case 1:
33127  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_db)) != 0)) kw_args--;
33128  else {
33129  __Pyx_RaiseArgtupleInvalid("calculateVelocityQuadrature_MixedForm_Jacobian", 1, 9, 9, 1); __PYX_ERR(0, 5377, __pyx_L3_error)
33130  }
33131  CYTHON_FALLTHROUGH;
33132  case 2:
33133  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_db_eb)) != 0)) kw_args--;
33134  else {
33135  __Pyx_RaiseArgtupleInvalid("calculateVelocityQuadrature_MixedForm_Jacobian", 1, 9, 9, 2); __PYX_ERR(0, 5377, __pyx_L3_error)
33136  }
33137  CYTHON_FALLTHROUGH;
33138  case 3:
33139  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
33140  else {
33141  __Pyx_RaiseArgtupleInvalid("calculateVelocityQuadrature_MixedForm_Jacobian", 1, 9, 9, 3); __PYX_ERR(0, 5377, __pyx_L3_error)
33142  }
33143  CYTHON_FALLTHROUGH;
33144  case 4:
33145  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_DV)) != 0)) kw_args--;
33146  else {
33147  __Pyx_RaiseArgtupleInvalid("calculateVelocityQuadrature_MixedForm_Jacobian", 1, 9, 9, 4); __PYX_ERR(0, 5377, __pyx_L3_error)
33148  }
33149  CYTHON_FALLTHROUGH;
33150  case 5:
33151  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_DV_eb)) != 0)) kw_args--;
33152  else {
33153  __Pyx_RaiseArgtupleInvalid("calculateVelocityQuadrature_MixedForm_Jacobian", 1, 9, 9, 5); __PYX_ERR(0, 5377, __pyx_L3_error)
33154  }
33155  CYTHON_FALLTHROUGH;
33156  case 6:
33157  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_qv)) != 0)) kw_args--;
33158  else {
33159  __Pyx_RaiseArgtupleInvalid("calculateVelocityQuadrature_MixedForm_Jacobian", 1, 9, 9, 6); __PYX_ERR(0, 5377, __pyx_L3_error)
33160  }
33161  CYTHON_FALLTHROUGH;
33162  case 7:
33163  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_qDV)) != 0)) kw_args--;
33164  else {
33165  __Pyx_RaiseArgtupleInvalid("calculateVelocityQuadrature_MixedForm_Jacobian", 1, 9, 9, 7); __PYX_ERR(0, 5377, __pyx_L3_error)
33166  }
33167  CYTHON_FALLTHROUGH;
33168  case 8:
33169  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_qDV_eb)) != 0)) kw_args--;
33170  else {
33171  __Pyx_RaiseArgtupleInvalid("calculateVelocityQuadrature_MixedForm_Jacobian", 1, 9, 9, 8); __PYX_ERR(0, 5377, __pyx_L3_error)
33172  }
33173  }
33174  if (unlikely(kw_args > 0)) {
33175  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateVelocityQuadrature_MixedForm_Jacobian") < 0)) __PYX_ERR(0, 5377, __pyx_L3_error)
33176  }
33177  } else if (PyTuple_GET_SIZE(__pyx_args) != 9) {
33178  goto __pyx_L5_argtuple_error;
33179  } else {
33180  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
33181  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
33182  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
33183  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
33184  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
33185  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
33186  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
33187  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
33188  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
33189  }
33190  __pyx_v_A_inv = ((PyArrayObject *)values[0]);
33191  __pyx_v_db = ((PyArrayObject *)values[1]);
33192  __pyx_v_db_eb = ((PyArrayObject *)values[2]);
33193  __pyx_v_v = ((PyArrayObject *)values[3]);
33194  __pyx_v_DV = ((PyArrayObject *)values[4]);
33195  __pyx_v_DV_eb = ((PyArrayObject *)values[5]);
33196  __pyx_v_qv = ((PyArrayObject *)values[6]);
33197  __pyx_v_qDV = ((PyArrayObject *)values[7]);
33198  __pyx_v_qDV_eb = ((PyArrayObject *)values[8]);
33199  }
33200  goto __pyx_L4_argument_unpacking_done;
33201  __pyx_L5_argtuple_error:;
33202  __Pyx_RaiseArgtupleInvalid("calculateVelocityQuadrature_MixedForm_Jacobian", 1, 9, 9, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5377, __pyx_L3_error)
33203  __pyx_L3_error:;
33204  __Pyx_AddTraceback("cfemIntegrals.calculateVelocityQuadrature_MixedForm_Jacobian", __pyx_clineno, __pyx_lineno, __pyx_filename);
33205  __Pyx_RefNannyFinishContext();
33206  return NULL;
33207  __pyx_L4_argument_unpacking_done:;
33208  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_A_inv), __pyx_ptype_5numpy_ndarray, 1, "A_inv", 0))) __PYX_ERR(0, 5377, __pyx_L1_error)
33209  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_db), __pyx_ptype_5numpy_ndarray, 1, "db", 0))) __PYX_ERR(0, 5378, __pyx_L1_error)
33210  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_db_eb), __pyx_ptype_5numpy_ndarray, 1, "db_eb", 0))) __PYX_ERR(0, 5379, __pyx_L1_error)
33211  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), __pyx_ptype_5numpy_ndarray, 1, "v", 0))) __PYX_ERR(0, 5380, __pyx_L1_error)
33212  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_DV), __pyx_ptype_5numpy_ndarray, 1, "DV", 0))) __PYX_ERR(0, 5381, __pyx_L1_error)
33213  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_DV_eb), __pyx_ptype_5numpy_ndarray, 1, "DV_eb", 0))) __PYX_ERR(0, 5382, __pyx_L1_error)
33214  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_qv), __pyx_ptype_5numpy_ndarray, 1, "qv", 0))) __PYX_ERR(0, 5383, __pyx_L1_error)
33215  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_qDV), __pyx_ptype_5numpy_ndarray, 1, "qDV", 0))) __PYX_ERR(0, 5384, __pyx_L1_error)
33216  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_qDV_eb), __pyx_ptype_5numpy_ndarray, 1, "qDV_eb", 0))) __PYX_ERR(0, 5385, __pyx_L1_error)
33217  __pyx_r = __pyx_pf_13cfemIntegrals_286calculateVelocityQuadrature_MixedForm_Jacobian(__pyx_self, __pyx_v_A_inv, __pyx_v_db, __pyx_v_db_eb, __pyx_v_v, __pyx_v_DV, __pyx_v_DV_eb, __pyx_v_qv, __pyx_v_qDV, __pyx_v_qDV_eb);
33218 
33219  /* function exit code */
33220  goto __pyx_L0;
33221  __pyx_L1_error:;
33222  __pyx_r = NULL;
33223  __pyx_L0:;
33224  __Pyx_RefNannyFinishContext();
33225  return __pyx_r;
33226 }
33227 
33228 static PyObject *__pyx_pf_13cfemIntegrals_286calculateVelocityQuadrature_MixedForm_Jacobian(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_A_inv, PyArrayObject *__pyx_v_db, PyArrayObject *__pyx_v_db_eb, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_DV, PyArrayObject *__pyx_v_DV_eb, PyArrayObject *__pyx_v_qv, PyArrayObject *__pyx_v_qDV, PyArrayObject *__pyx_v_qDV_eb) {
33229  int __pyx_v_nElements_global;
33230  int __pyx_v_nElementBoundaries_element;
33231  int __pyx_v_nElementBoundaryQuadraturePoints_elementBoundary;
33232  int __pyx_v_nDOF_element;
33233  int __pyx_v_nSpace;
33234  int __pyx_v_nQuadraturePoints_element;
33235  PyObject *__pyx_r = NULL;
33236  __Pyx_RefNannyDeclarations
33237  __Pyx_RefNannySetupContext("calculateVelocityQuadrature_MixedForm_Jacobian", 0);
33238 
33239  /* "cfemIntegrals.pyx":5386
33240  * np.ndarray qDV,
33241  * np.ndarray qDV_eb):
33242  * cdef int nElements_global = v.shape[0] # <<<<<<<<<<<<<<
33243  * cdef int nElementBoundaries_element = v.shape[1]
33244  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = v.shape[2]
33245  */
33246  __pyx_v_nElements_global = (__pyx_v_v->dimensions[0]);
33247 
33248  /* "cfemIntegrals.pyx":5387
33249  * np.ndarray qDV_eb):
33250  * cdef int nElements_global = v.shape[0]
33251  * cdef int nElementBoundaries_element = v.shape[1] # <<<<<<<<<<<<<<
33252  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = v.shape[2]
33253  * cdef int nDOF_element = v.shape[3]
33254  */
33255  __pyx_v_nElementBoundaries_element = (__pyx_v_v->dimensions[1]);
33256 
33257  /* "cfemIntegrals.pyx":5388
33258  * cdef int nElements_global = v.shape[0]
33259  * cdef int nElementBoundaries_element = v.shape[1]
33260  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = v.shape[2] # <<<<<<<<<<<<<<
33261  * cdef int nDOF_element = v.shape[3]
33262  * cdef int nSpace = db.shape[1]
33263  */
33264  __pyx_v_nElementBoundaryQuadraturePoints_elementBoundary = (__pyx_v_v->dimensions[2]);
33265 
33266  /* "cfemIntegrals.pyx":5389
33267  * cdef int nElementBoundaries_element = v.shape[1]
33268  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = v.shape[2]
33269  * cdef int nDOF_element = v.shape[3] # <<<<<<<<<<<<<<
33270  * cdef int nSpace = db.shape[1]
33271  * cdef int nQuadraturePoints_element = qv.shape[1]
33272  */
33273  __pyx_v_nDOF_element = (__pyx_v_v->dimensions[3]);
33274 
33275  /* "cfemIntegrals.pyx":5390
33276  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = v.shape[2]
33277  * cdef int nDOF_element = v.shape[3]
33278  * cdef int nSpace = db.shape[1] # <<<<<<<<<<<<<<
33279  * cdef int nQuadraturePoints_element = qv.shape[1]
33280  * ccalculateVelocityQuadrature_MixedForm_Jacobian(nElements_global,
33281  */
33282  __pyx_v_nSpace = (__pyx_v_db->dimensions[1]);
33283 
33284  /* "cfemIntegrals.pyx":5391
33285  * cdef int nDOF_element = v.shape[3]
33286  * cdef int nSpace = db.shape[1]
33287  * cdef int nQuadraturePoints_element = qv.shape[1] # <<<<<<<<<<<<<<
33288  * ccalculateVelocityQuadrature_MixedForm_Jacobian(nElements_global,
33289  * nElementBoundaries_element,
33290  */
33291  __pyx_v_nQuadraturePoints_element = (__pyx_v_qv->dimensions[1]);
33292 
33293  /* "cfemIntegrals.pyx":5392
33294  * cdef int nSpace = db.shape[1]
33295  * cdef int nQuadraturePoints_element = qv.shape[1]
33296  * ccalculateVelocityQuadrature_MixedForm_Jacobian(nElements_global, # <<<<<<<<<<<<<<
33297  * nElementBoundaries_element,
33298  * nElementBoundaryQuadraturePoints_elementBoundary,
33299  */
33300  calculateVelocityQuadrature_MixedForm_Jacobian(__pyx_v_nElements_global, __pyx_v_nElementBoundaries_element, __pyx_v_nElementBoundaryQuadraturePoints_elementBoundary, __pyx_v_nDOF_element, __pyx_v_nSpace, __pyx_v_nQuadraturePoints_element, ((double *)__pyx_v_A_inv->data), ((double *)__pyx_v_db->data), ((double *)__pyx_v_db_eb->data), ((double *)__pyx_v_v->data), ((double *)__pyx_v_DV->data), ((double *)__pyx_v_DV_eb->data), ((double *)__pyx_v_qv->data), ((double *)__pyx_v_qDV->data), ((double *)__pyx_v_qDV_eb->data));
33301 
33302  /* "cfemIntegrals.pyx":5377
33303  * <double*>qv.data,
33304  * <double*>qV.data)
33305  * def calculateVelocityQuadrature_MixedForm_Jacobian(np.ndarray A_inv, # <<<<<<<<<<<<<<
33306  * np.ndarray db,
33307  * np.ndarray db_eb,
33308  */
33309 
33310  /* function exit code */
33311  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
33312  __Pyx_XGIVEREF(__pyx_r);
33313  __Pyx_RefNannyFinishContext();
33314  return __pyx_r;
33315 }
33316 
33317 /* "cfemIntegrals.pyx":5407
33318  * <double*>qDV.data,
33319  * <double*>qDV_eb.data)
33320  * def calculateVelocityProjectionMatrixLDG(np.ndarray vXw_dV, # <<<<<<<<<<<<<<
33321  * np.ndarray A_inv):
33322  * cdef int nElements_global = vXw_dV.shape[0]
33323  */
33324 
33325 /* Python wrapper */
33326 static PyObject *__pyx_pw_13cfemIntegrals_289calculateVelocityProjectionMatrixLDG(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
33327 static PyMethodDef __pyx_mdef_13cfemIntegrals_289calculateVelocityProjectionMatrixLDG = {"calculateVelocityProjectionMatrixLDG", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_289calculateVelocityProjectionMatrixLDG, METH_VARARGS|METH_KEYWORDS, 0};
33328 static PyObject *__pyx_pw_13cfemIntegrals_289calculateVelocityProjectionMatrixLDG(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
33329  PyArrayObject *__pyx_v_vXw_dV = 0;
33330  PyArrayObject *__pyx_v_A_inv = 0;
33331  int __pyx_lineno = 0;
33332  const char *__pyx_filename = NULL;
33333  int __pyx_clineno = 0;
33334  PyObject *__pyx_r = 0;
33335  __Pyx_RefNannyDeclarations
33336  __Pyx_RefNannySetupContext("calculateVelocityProjectionMatrixLDG (wrapper)", 0);
33337  {
33338  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_vXw_dV,&__pyx_n_s_A_inv,0};
33339  PyObject* values[2] = {0,0};
33340  if (unlikely(__pyx_kwds)) {
33341  Py_ssize_t kw_args;
33342  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
33343  switch (pos_args) {
33344  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
33345  CYTHON_FALLTHROUGH;
33346  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
33347  CYTHON_FALLTHROUGH;
33348  case 0: break;
33349  default: goto __pyx_L5_argtuple_error;
33350  }
33351  kw_args = PyDict_Size(__pyx_kwds);
33352  switch (pos_args) {
33353  case 0:
33354  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vXw_dV)) != 0)) kw_args--;
33355  else goto __pyx_L5_argtuple_error;
33356  CYTHON_FALLTHROUGH;
33357  case 1:
33358  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_A_inv)) != 0)) kw_args--;
33359  else {
33360  __Pyx_RaiseArgtupleInvalid("calculateVelocityProjectionMatrixLDG", 1, 2, 2, 1); __PYX_ERR(0, 5407, __pyx_L3_error)
33361  }
33362  }
33363  if (unlikely(kw_args > 0)) {
33364  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateVelocityProjectionMatrixLDG") < 0)) __PYX_ERR(0, 5407, __pyx_L3_error)
33365  }
33366  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
33367  goto __pyx_L5_argtuple_error;
33368  } else {
33369  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
33370  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
33371  }
33372  __pyx_v_vXw_dV = ((PyArrayObject *)values[0]);
33373  __pyx_v_A_inv = ((PyArrayObject *)values[1]);
33374  }
33375  goto __pyx_L4_argument_unpacking_done;
33376  __pyx_L5_argtuple_error:;
33377  __Pyx_RaiseArgtupleInvalid("calculateVelocityProjectionMatrixLDG", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5407, __pyx_L3_error)
33378  __pyx_L3_error:;
33379  __Pyx_AddTraceback("cfemIntegrals.calculateVelocityProjectionMatrixLDG", __pyx_clineno, __pyx_lineno, __pyx_filename);
33380  __Pyx_RefNannyFinishContext();
33381  return NULL;
33382  __pyx_L4_argument_unpacking_done:;
33383  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vXw_dV), __pyx_ptype_5numpy_ndarray, 1, "vXw_dV", 0))) __PYX_ERR(0, 5407, __pyx_L1_error)
33384  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_A_inv), __pyx_ptype_5numpy_ndarray, 1, "A_inv", 0))) __PYX_ERR(0, 5408, __pyx_L1_error)
33385  __pyx_r = __pyx_pf_13cfemIntegrals_288calculateVelocityProjectionMatrixLDG(__pyx_self, __pyx_v_vXw_dV, __pyx_v_A_inv);
33386 
33387  /* function exit code */
33388  goto __pyx_L0;
33389  __pyx_L1_error:;
33390  __pyx_r = NULL;
33391  __pyx_L0:;
33392  __Pyx_RefNannyFinishContext();
33393  return __pyx_r;
33394 }
33395 
33396 static PyObject *__pyx_pf_13cfemIntegrals_288calculateVelocityProjectionMatrixLDG(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_vXw_dV, PyArrayObject *__pyx_v_A_inv) {
33397  int __pyx_v_nElements_global;
33398  int __pyx_v_nQuadraturePoints_element;
33399  int __pyx_v_nDOF_element;
33400  PyObject *__pyx_r = NULL;
33401  __Pyx_RefNannyDeclarations
33402  __Pyx_RefNannySetupContext("calculateVelocityProjectionMatrixLDG", 0);
33403 
33404  /* "cfemIntegrals.pyx":5409
33405  * def calculateVelocityProjectionMatrixLDG(np.ndarray vXw_dV,
33406  * np.ndarray A_inv):
33407  * cdef int nElements_global = vXw_dV.shape[0] # <<<<<<<<<<<<<<
33408  * cdef int nQuadraturePoints_element = vXw_dV.shape[1]
33409  * cdef int nDOF_element = vXw_dV.shape[2]
33410  */
33411  __pyx_v_nElements_global = (__pyx_v_vXw_dV->dimensions[0]);
33412 
33413  /* "cfemIntegrals.pyx":5410
33414  * np.ndarray A_inv):
33415  * cdef int nElements_global = vXw_dV.shape[0]
33416  * cdef int nQuadraturePoints_element = vXw_dV.shape[1] # <<<<<<<<<<<<<<
33417  * cdef int nDOF_element = vXw_dV.shape[2]
33418  * ccalculateVelocityProjectionMatrixLDG(nElements_global,
33419  */
33420  __pyx_v_nQuadraturePoints_element = (__pyx_v_vXw_dV->dimensions[1]);
33421 
33422  /* "cfemIntegrals.pyx":5411
33423  * cdef int nElements_global = vXw_dV.shape[0]
33424  * cdef int nQuadraturePoints_element = vXw_dV.shape[1]
33425  * cdef int nDOF_element = vXw_dV.shape[2] # <<<<<<<<<<<<<<
33426  * ccalculateVelocityProjectionMatrixLDG(nElements_global,
33427  * nQuadraturePoints_element,
33428  */
33429  __pyx_v_nDOF_element = (__pyx_v_vXw_dV->dimensions[2]);
33430 
33431  /* "cfemIntegrals.pyx":5412
33432  * cdef int nQuadraturePoints_element = vXw_dV.shape[1]
33433  * cdef int nDOF_element = vXw_dV.shape[2]
33434  * ccalculateVelocityProjectionMatrixLDG(nElements_global, # <<<<<<<<<<<<<<
33435  * nQuadraturePoints_element,
33436  * nDOF_element,
33437  */
33438  calculateVelocityProjectionMatrixLDG(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_element, ((double *)__pyx_v_vXw_dV->data), ((double *)__pyx_v_A_inv->data));
33439 
33440  /* "cfemIntegrals.pyx":5407
33441  * <double*>qDV.data,
33442  * <double*>qDV_eb.data)
33443  * def calculateVelocityProjectionMatrixLDG(np.ndarray vXw_dV, # <<<<<<<<<<<<<<
33444  * np.ndarray A_inv):
33445  * cdef int nElements_global = vXw_dV.shape[0]
33446  */
33447 
33448  /* function exit code */
33449  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
33450  __Pyx_XGIVEREF(__pyx_r);
33451  __Pyx_RefNannyFinishContext();
33452  return __pyx_r;
33453 }
33454 
33455 /* "cfemIntegrals.pyx":5417
33456  * <double*>vXw_dV.data,
33457  * <double*>A_inv.data)
33458  * def updateDiffusion_MixedForm_weak(np.ndarray a, # <<<<<<<<<<<<<<
33459  * np.ndarray qV,
33460  * np.ndarray grad_w_dV,
33461  */
33462 
33463 /* Python wrapper */
33464 static PyObject *__pyx_pw_13cfemIntegrals_291updateDiffusion_MixedForm_weak(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
33465 static PyMethodDef __pyx_mdef_13cfemIntegrals_291updateDiffusion_MixedForm_weak = {"updateDiffusion_MixedForm_weak", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_291updateDiffusion_MixedForm_weak, METH_VARARGS|METH_KEYWORDS, 0};
33466 static PyObject *__pyx_pw_13cfemIntegrals_291updateDiffusion_MixedForm_weak(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
33467  PyArrayObject *__pyx_v_a = 0;
33468  PyArrayObject *__pyx_v_qV = 0;
33469  PyArrayObject *__pyx_v_grad_w_dV = 0;
33470  PyArrayObject *__pyx_v_weak_residual = 0;
33471  int __pyx_lineno = 0;
33472  const char *__pyx_filename = NULL;
33473  int __pyx_clineno = 0;
33474  PyObject *__pyx_r = 0;
33475  __Pyx_RefNannyDeclarations
33476  __Pyx_RefNannySetupContext("updateDiffusion_MixedForm_weak (wrapper)", 0);
33477  {
33478  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_a,&__pyx_n_s_qV,&__pyx_n_s_grad_w_dV,&__pyx_n_s_weak_residual,0};
33479  PyObject* values[4] = {0,0,0,0};
33480  if (unlikely(__pyx_kwds)) {
33481  Py_ssize_t kw_args;
33482  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
33483  switch (pos_args) {
33484  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
33485  CYTHON_FALLTHROUGH;
33486  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
33487  CYTHON_FALLTHROUGH;
33488  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
33489  CYTHON_FALLTHROUGH;
33490  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
33491  CYTHON_FALLTHROUGH;
33492  case 0: break;
33493  default: goto __pyx_L5_argtuple_error;
33494  }
33495  kw_args = PyDict_Size(__pyx_kwds);
33496  switch (pos_args) {
33497  case 0:
33498  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
33499  else goto __pyx_L5_argtuple_error;
33500  CYTHON_FALLTHROUGH;
33501  case 1:
33502  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_qV)) != 0)) kw_args--;
33503  else {
33504  __Pyx_RaiseArgtupleInvalid("updateDiffusion_MixedForm_weak", 1, 4, 4, 1); __PYX_ERR(0, 5417, __pyx_L3_error)
33505  }
33506  CYTHON_FALLTHROUGH;
33507  case 2:
33508  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_w_dV)) != 0)) kw_args--;
33509  else {
33510  __Pyx_RaiseArgtupleInvalid("updateDiffusion_MixedForm_weak", 1, 4, 4, 2); __PYX_ERR(0, 5417, __pyx_L3_error)
33511  }
33512  CYTHON_FALLTHROUGH;
33513  case 3:
33514  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weak_residual)) != 0)) kw_args--;
33515  else {
33516  __Pyx_RaiseArgtupleInvalid("updateDiffusion_MixedForm_weak", 1, 4, 4, 3); __PYX_ERR(0, 5417, __pyx_L3_error)
33517  }
33518  }
33519  if (unlikely(kw_args > 0)) {
33520  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateDiffusion_MixedForm_weak") < 0)) __PYX_ERR(0, 5417, __pyx_L3_error)
33521  }
33522  } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
33523  goto __pyx_L5_argtuple_error;
33524  } else {
33525  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
33526  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
33527  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
33528  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
33529  }
33530  __pyx_v_a = ((PyArrayObject *)values[0]);
33531  __pyx_v_qV = ((PyArrayObject *)values[1]);
33532  __pyx_v_grad_w_dV = ((PyArrayObject *)values[2]);
33533  __pyx_v_weak_residual = ((PyArrayObject *)values[3]);
33534  }
33535  goto __pyx_L4_argument_unpacking_done;
33536  __pyx_L5_argtuple_error:;
33537  __Pyx_RaiseArgtupleInvalid("updateDiffusion_MixedForm_weak", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5417, __pyx_L3_error)
33538  __pyx_L3_error:;
33539  __Pyx_AddTraceback("cfemIntegrals.updateDiffusion_MixedForm_weak", __pyx_clineno, __pyx_lineno, __pyx_filename);
33540  __Pyx_RefNannyFinishContext();
33541  return NULL;
33542  __pyx_L4_argument_unpacking_done:;
33543  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1, "a", 0))) __PYX_ERR(0, 5417, __pyx_L1_error)
33544  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_qV), __pyx_ptype_5numpy_ndarray, 1, "qV", 0))) __PYX_ERR(0, 5418, __pyx_L1_error)
33545  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_w_dV), __pyx_ptype_5numpy_ndarray, 1, "grad_w_dV", 0))) __PYX_ERR(0, 5419, __pyx_L1_error)
33546  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_weak_residual), __pyx_ptype_5numpy_ndarray, 1, "weak_residual", 0))) __PYX_ERR(0, 5420, __pyx_L1_error)
33547  __pyx_r = __pyx_pf_13cfemIntegrals_290updateDiffusion_MixedForm_weak(__pyx_self, __pyx_v_a, __pyx_v_qV, __pyx_v_grad_w_dV, __pyx_v_weak_residual);
33548 
33549  /* function exit code */
33550  goto __pyx_L0;
33551  __pyx_L1_error:;
33552  __pyx_r = NULL;
33553  __pyx_L0:;
33554  __Pyx_RefNannyFinishContext();
33555  return __pyx_r;
33556 }
33557 
33558 static PyObject *__pyx_pf_13cfemIntegrals_290updateDiffusion_MixedForm_weak(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_qV, PyArrayObject *__pyx_v_grad_w_dV, PyArrayObject *__pyx_v_weak_residual) {
33559  int __pyx_v_nElements_global;
33560  int __pyx_v_nQuadraturePoints_element;
33561  int __pyx_v_nDOF_test_element;
33562  int __pyx_v_nSpace;
33563  PyObject *__pyx_r = NULL;
33564  __Pyx_RefNannyDeclarations
33565  __Pyx_RefNannySetupContext("updateDiffusion_MixedForm_weak", 0);
33566 
33567  /* "cfemIntegrals.pyx":5421
33568  * np.ndarray grad_w_dV,
33569  * np.ndarray weak_residual):
33570  * cdef int nElements_global = grad_w_dV.shape[0] # <<<<<<<<<<<<<<
33571  * cdef int nQuadraturePoints_element = grad_w_dV.shape[1]
33572  * cdef int nDOF_test_element = grad_w_dV.shape[2]
33573  */
33574  __pyx_v_nElements_global = (__pyx_v_grad_w_dV->dimensions[0]);
33575 
33576  /* "cfemIntegrals.pyx":5422
33577  * np.ndarray weak_residual):
33578  * cdef int nElements_global = grad_w_dV.shape[0]
33579  * cdef int nQuadraturePoints_element = grad_w_dV.shape[1] # <<<<<<<<<<<<<<
33580  * cdef int nDOF_test_element = grad_w_dV.shape[2]
33581  * cdef int nSpace = grad_w_dV.shape[3]
33582  */
33583  __pyx_v_nQuadraturePoints_element = (__pyx_v_grad_w_dV->dimensions[1]);
33584 
33585  /* "cfemIntegrals.pyx":5423
33586  * cdef int nElements_global = grad_w_dV.shape[0]
33587  * cdef int nQuadraturePoints_element = grad_w_dV.shape[1]
33588  * cdef int nDOF_test_element = grad_w_dV.shape[2] # <<<<<<<<<<<<<<
33589  * cdef int nSpace = grad_w_dV.shape[3]
33590  * cupdateDiffusion_MixedForm_weak(nElements_global,
33591  */
33592  __pyx_v_nDOF_test_element = (__pyx_v_grad_w_dV->dimensions[2]);
33593 
33594  /* "cfemIntegrals.pyx":5424
33595  * cdef int nQuadraturePoints_element = grad_w_dV.shape[1]
33596  * cdef int nDOF_test_element = grad_w_dV.shape[2]
33597  * cdef int nSpace = grad_w_dV.shape[3] # <<<<<<<<<<<<<<
33598  * cupdateDiffusion_MixedForm_weak(nElements_global,
33599  * nQuadraturePoints_element,
33600  */
33601  __pyx_v_nSpace = (__pyx_v_grad_w_dV->dimensions[3]);
33602 
33603  /* "cfemIntegrals.pyx":5425
33604  * cdef int nDOF_test_element = grad_w_dV.shape[2]
33605  * cdef int nSpace = grad_w_dV.shape[3]
33606  * cupdateDiffusion_MixedForm_weak(nElements_global, # <<<<<<<<<<<<<<
33607  * nQuadraturePoints_element,
33608  * nDOF_test_element,
33609  */
33610  updateDiffusion_MixedForm_weak(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_test_element, __pyx_v_nSpace, ((double *)__pyx_v_a->data), ((double *)__pyx_v_qV->data), ((double *)__pyx_v_grad_w_dV->data), ((double *)__pyx_v_weak_residual->data));
33611 
33612  /* "cfemIntegrals.pyx":5417
33613  * <double*>vXw_dV.data,
33614  * <double*>A_inv.data)
33615  * def updateDiffusion_MixedForm_weak(np.ndarray a, # <<<<<<<<<<<<<<
33616  * np.ndarray qV,
33617  * np.ndarray grad_w_dV,
33618  */
33619 
33620  /* function exit code */
33621  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
33622  __Pyx_XGIVEREF(__pyx_r);
33623  __Pyx_RefNannyFinishContext();
33624  return __pyx_r;
33625 }
33626 
33627 /* "cfemIntegrals.pyx":5433
33628  * <double*>grad_w_dV.data,
33629  * <double*>weak_residual.data)
33630  * def updateDiffusionJacobian_MixedForm_weak(np.ndarray a, # <<<<<<<<<<<<<<
33631  * np.ndarray da,
33632  * np.ndarray qV,
33633  */
33634 
33635 /* Python wrapper */
33636 static PyObject *__pyx_pw_13cfemIntegrals_293updateDiffusionJacobian_MixedForm_weak(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
33637 static PyMethodDef __pyx_mdef_13cfemIntegrals_293updateDiffusionJacobian_MixedForm_weak = {"updateDiffusionJacobian_MixedForm_weak", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_293updateDiffusionJacobian_MixedForm_weak, METH_VARARGS|METH_KEYWORDS, 0};
33638 static PyObject *__pyx_pw_13cfemIntegrals_293updateDiffusionJacobian_MixedForm_weak(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
33639  PyArrayObject *__pyx_v_a = 0;
33640  PyArrayObject *__pyx_v_da = 0;
33641  PyArrayObject *__pyx_v_qV = 0;
33642  PyArrayObject *__pyx_v_qDV = 0;
33643  PyArrayObject *__pyx_v_qDV_eb = 0;
33644  PyArrayObject *__pyx_v_grad_w_dV = 0;
33645  PyArrayObject *__pyx_v_v = 0;
33646  PyArrayObject *__pyx_v_jacobian_weak_residual = 0;
33647  PyArrayObject *__pyx_v_jacobian_weak_residual_eb = 0;
33648  int __pyx_lineno = 0;
33649  const char *__pyx_filename = NULL;
33650  int __pyx_clineno = 0;
33651  PyObject *__pyx_r = 0;
33652  __Pyx_RefNannyDeclarations
33653  __Pyx_RefNannySetupContext("updateDiffusionJacobian_MixedForm_weak (wrapper)", 0);
33654  {
33655  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_a,&__pyx_n_s_da,&__pyx_n_s_qV,&__pyx_n_s_qDV,&__pyx_n_s_qDV_eb,&__pyx_n_s_grad_w_dV,&__pyx_n_s_v,&__pyx_n_s_jacobian_weak_residual,&__pyx_n_s_jacobian_weak_residual_eb,0};
33656  PyObject* values[9] = {0,0,0,0,0,0,0,0,0};
33657  if (unlikely(__pyx_kwds)) {
33658  Py_ssize_t kw_args;
33659  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
33660  switch (pos_args) {
33661  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
33662  CYTHON_FALLTHROUGH;
33663  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
33664  CYTHON_FALLTHROUGH;
33665  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
33666  CYTHON_FALLTHROUGH;
33667  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
33668  CYTHON_FALLTHROUGH;
33669  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
33670  CYTHON_FALLTHROUGH;
33671  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
33672  CYTHON_FALLTHROUGH;
33673  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
33674  CYTHON_FALLTHROUGH;
33675  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
33676  CYTHON_FALLTHROUGH;
33677  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
33678  CYTHON_FALLTHROUGH;
33679  case 0: break;
33680  default: goto __pyx_L5_argtuple_error;
33681  }
33682  kw_args = PyDict_Size(__pyx_kwds);
33683  switch (pos_args) {
33684  case 0:
33685  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
33686  else goto __pyx_L5_argtuple_error;
33687  CYTHON_FALLTHROUGH;
33688  case 1:
33689  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_da)) != 0)) kw_args--;
33690  else {
33691  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_MixedForm_weak", 1, 9, 9, 1); __PYX_ERR(0, 5433, __pyx_L3_error)
33692  }
33693  CYTHON_FALLTHROUGH;
33694  case 2:
33695  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_qV)) != 0)) kw_args--;
33696  else {
33697  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_MixedForm_weak", 1, 9, 9, 2); __PYX_ERR(0, 5433, __pyx_L3_error)
33698  }
33699  CYTHON_FALLTHROUGH;
33700  case 3:
33701  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_qDV)) != 0)) kw_args--;
33702  else {
33703  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_MixedForm_weak", 1, 9, 9, 3); __PYX_ERR(0, 5433, __pyx_L3_error)
33704  }
33705  CYTHON_FALLTHROUGH;
33706  case 4:
33707  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_qDV_eb)) != 0)) kw_args--;
33708  else {
33709  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_MixedForm_weak", 1, 9, 9, 4); __PYX_ERR(0, 5433, __pyx_L3_error)
33710  }
33711  CYTHON_FALLTHROUGH;
33712  case 5:
33713  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_w_dV)) != 0)) kw_args--;
33714  else {
33715  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_MixedForm_weak", 1, 9, 9, 5); __PYX_ERR(0, 5433, __pyx_L3_error)
33716  }
33717  CYTHON_FALLTHROUGH;
33718  case 6:
33719  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
33720  else {
33721  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_MixedForm_weak", 1, 9, 9, 6); __PYX_ERR(0, 5433, __pyx_L3_error)
33722  }
33723  CYTHON_FALLTHROUGH;
33724  case 7:
33725  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jacobian_weak_residual)) != 0)) kw_args--;
33726  else {
33727  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_MixedForm_weak", 1, 9, 9, 7); __PYX_ERR(0, 5433, __pyx_L3_error)
33728  }
33729  CYTHON_FALLTHROUGH;
33730  case 8:
33731  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jacobian_weak_residual_eb)) != 0)) kw_args--;
33732  else {
33733  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_MixedForm_weak", 1, 9, 9, 8); __PYX_ERR(0, 5433, __pyx_L3_error)
33734  }
33735  }
33736  if (unlikely(kw_args > 0)) {
33737  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateDiffusionJacobian_MixedForm_weak") < 0)) __PYX_ERR(0, 5433, __pyx_L3_error)
33738  }
33739  } else if (PyTuple_GET_SIZE(__pyx_args) != 9) {
33740  goto __pyx_L5_argtuple_error;
33741  } else {
33742  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
33743  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
33744  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
33745  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
33746  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
33747  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
33748  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
33749  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
33750  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
33751  }
33752  __pyx_v_a = ((PyArrayObject *)values[0]);
33753  __pyx_v_da = ((PyArrayObject *)values[1]);
33754  __pyx_v_qV = ((PyArrayObject *)values[2]);
33755  __pyx_v_qDV = ((PyArrayObject *)values[3]);
33756  __pyx_v_qDV_eb = ((PyArrayObject *)values[4]);
33757  __pyx_v_grad_w_dV = ((PyArrayObject *)values[5]);
33758  __pyx_v_v = ((PyArrayObject *)values[6]);
33759  __pyx_v_jacobian_weak_residual = ((PyArrayObject *)values[7]);
33760  __pyx_v_jacobian_weak_residual_eb = ((PyArrayObject *)values[8]);
33761  }
33762  goto __pyx_L4_argument_unpacking_done;
33763  __pyx_L5_argtuple_error:;
33764  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_MixedForm_weak", 1, 9, 9, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5433, __pyx_L3_error)
33765  __pyx_L3_error:;
33766  __Pyx_AddTraceback("cfemIntegrals.updateDiffusionJacobian_MixedForm_weak", __pyx_clineno, __pyx_lineno, __pyx_filename);
33767  __Pyx_RefNannyFinishContext();
33768  return NULL;
33769  __pyx_L4_argument_unpacking_done:;
33770  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1, "a", 0))) __PYX_ERR(0, 5433, __pyx_L1_error)
33771  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_da), __pyx_ptype_5numpy_ndarray, 1, "da", 0))) __PYX_ERR(0, 5434, __pyx_L1_error)
33772  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_qV), __pyx_ptype_5numpy_ndarray, 1, "qV", 0))) __PYX_ERR(0, 5435, __pyx_L1_error)
33773  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_qDV), __pyx_ptype_5numpy_ndarray, 1, "qDV", 0))) __PYX_ERR(0, 5436, __pyx_L1_error)
33774  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_qDV_eb), __pyx_ptype_5numpy_ndarray, 1, "qDV_eb", 0))) __PYX_ERR(0, 5437, __pyx_L1_error)
33775  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_w_dV), __pyx_ptype_5numpy_ndarray, 1, "grad_w_dV", 0))) __PYX_ERR(0, 5438, __pyx_L1_error)
33776  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), __pyx_ptype_5numpy_ndarray, 1, "v", 0))) __PYX_ERR(0, 5439, __pyx_L1_error)
33777  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_jacobian_weak_residual), __pyx_ptype_5numpy_ndarray, 1, "jacobian_weak_residual", 0))) __PYX_ERR(0, 5440, __pyx_L1_error)
33778  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_jacobian_weak_residual_eb), __pyx_ptype_5numpy_ndarray, 1, "jacobian_weak_residual_eb", 0))) __PYX_ERR(0, 5441, __pyx_L1_error)
33779  __pyx_r = __pyx_pf_13cfemIntegrals_292updateDiffusionJacobian_MixedForm_weak(__pyx_self, __pyx_v_a, __pyx_v_da, __pyx_v_qV, __pyx_v_qDV, __pyx_v_qDV_eb, __pyx_v_grad_w_dV, __pyx_v_v, __pyx_v_jacobian_weak_residual, __pyx_v_jacobian_weak_residual_eb);
33780 
33781  /* function exit code */
33782  goto __pyx_L0;
33783  __pyx_L1_error:;
33784  __pyx_r = NULL;
33785  __pyx_L0:;
33786  __Pyx_RefNannyFinishContext();
33787  return __pyx_r;
33788 }
33789 
33790 static PyObject *__pyx_pf_13cfemIntegrals_292updateDiffusionJacobian_MixedForm_weak(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_da, PyArrayObject *__pyx_v_qV, PyArrayObject *__pyx_v_qDV, PyArrayObject *__pyx_v_qDV_eb, PyArrayObject *__pyx_v_grad_w_dV, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_jacobian_weak_residual, PyArrayObject *__pyx_v_jacobian_weak_residual_eb) {
33791  int __pyx_v_nElements_global;
33792  int __pyx_v_nElementBoundaries_element;
33793  int __pyx_v_nQuadraturePoints_element;
33794  int __pyx_v_nDOF_trial_element;
33795  int __pyx_v_nDOF_test_element;
33796  int __pyx_v_nSpace;
33797  PyObject *__pyx_r = NULL;
33798  __Pyx_RefNannyDeclarations
33799  __Pyx_RefNannySetupContext("updateDiffusionJacobian_MixedForm_weak", 0);
33800 
33801  /* "cfemIntegrals.pyx":5442
33802  * np.ndarray jacobian_weak_residual,
33803  * np.ndarray jacobian_weak_residual_eb):
33804  * cdef int nElements_global = qDV_eb.shape[0] # <<<<<<<<<<<<<<
33805  * cdef int nElementBoundaries_element = qDV_eb.shape[1]
33806  * cdef int nQuadraturePoints_element = qDV_eb.shape[2]
33807  */
33808  __pyx_v_nElements_global = (__pyx_v_qDV_eb->dimensions[0]);
33809 
33810  /* "cfemIntegrals.pyx":5443
33811  * np.ndarray jacobian_weak_residual_eb):
33812  * cdef int nElements_global = qDV_eb.shape[0]
33813  * cdef int nElementBoundaries_element = qDV_eb.shape[1] # <<<<<<<<<<<<<<
33814  * cdef int nQuadraturePoints_element = qDV_eb.shape[2]
33815  * cdef int nDOF_trial_element = qDV_eb.shape[3]
33816  */
33817  __pyx_v_nElementBoundaries_element = (__pyx_v_qDV_eb->dimensions[1]);
33818 
33819  /* "cfemIntegrals.pyx":5444
33820  * cdef int nElements_global = qDV_eb.shape[0]
33821  * cdef int nElementBoundaries_element = qDV_eb.shape[1]
33822  * cdef int nQuadraturePoints_element = qDV_eb.shape[2] # <<<<<<<<<<<<<<
33823  * cdef int nDOF_trial_element = qDV_eb.shape[3]
33824  * cdef int nDOF_test_element = grad_w_dV.shape[2]
33825  */
33826  __pyx_v_nQuadraturePoints_element = (__pyx_v_qDV_eb->dimensions[2]);
33827 
33828  /* "cfemIntegrals.pyx":5445
33829  * cdef int nElementBoundaries_element = qDV_eb.shape[1]
33830  * cdef int nQuadraturePoints_element = qDV_eb.shape[2]
33831  * cdef int nDOF_trial_element = qDV_eb.shape[3] # <<<<<<<<<<<<<<
33832  * cdef int nDOF_test_element = grad_w_dV.shape[2]
33833  * cdef int nSpace = grad_w_dV.shape[3]
33834  */
33835  __pyx_v_nDOF_trial_element = (__pyx_v_qDV_eb->dimensions[3]);
33836 
33837  /* "cfemIntegrals.pyx":5446
33838  * cdef int nQuadraturePoints_element = qDV_eb.shape[2]
33839  * cdef int nDOF_trial_element = qDV_eb.shape[3]
33840  * cdef int nDOF_test_element = grad_w_dV.shape[2] # <<<<<<<<<<<<<<
33841  * cdef int nSpace = grad_w_dV.shape[3]
33842  * cupdateDiffusionJacobian_MixedForm_weak(nElements_global,
33843  */
33844  __pyx_v_nDOF_test_element = (__pyx_v_grad_w_dV->dimensions[2]);
33845 
33846  /* "cfemIntegrals.pyx":5447
33847  * cdef int nDOF_trial_element = qDV_eb.shape[3]
33848  * cdef int nDOF_test_element = grad_w_dV.shape[2]
33849  * cdef int nSpace = grad_w_dV.shape[3] # <<<<<<<<<<<<<<
33850  * cupdateDiffusionJacobian_MixedForm_weak(nElements_global,
33851  * nElementBoundaries_element,
33852  */
33853  __pyx_v_nSpace = (__pyx_v_grad_w_dV->dimensions[3]);
33854 
33855  /* "cfemIntegrals.pyx":5448
33856  * cdef int nDOF_test_element = grad_w_dV.shape[2]
33857  * cdef int nSpace = grad_w_dV.shape[3]
33858  * cupdateDiffusionJacobian_MixedForm_weak(nElements_global, # <<<<<<<<<<<<<<
33859  * nElementBoundaries_element,
33860  * nQuadraturePoints_element,
33861  */
33862  updateDiffusionJacobian_MixedForm_weak(__pyx_v_nElements_global, __pyx_v_nElementBoundaries_element, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_trial_element, __pyx_v_nDOF_test_element, __pyx_v_nSpace, ((double *)__pyx_v_a->data), ((double *)__pyx_v_da->data), ((double *)__pyx_v_qV->data), ((double *)__pyx_v_qDV->data), ((double *)__pyx_v_qDV_eb->data), ((double *)__pyx_v_grad_w_dV->data), ((double *)__pyx_v_v->data), ((double *)__pyx_v_jacobian_weak_residual->data), ((double *)__pyx_v_jacobian_weak_residual_eb->data));
33863 
33864  /* "cfemIntegrals.pyx":5433
33865  * <double*>grad_w_dV.data,
33866  * <double*>weak_residual.data)
33867  * def updateDiffusionJacobian_MixedForm_weak(np.ndarray a, # <<<<<<<<<<<<<<
33868  * np.ndarray da,
33869  * np.ndarray qV,
33870  */
33871 
33872  /* function exit code */
33873  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
33874  __Pyx_XGIVEREF(__pyx_r);
33875  __Pyx_RefNannyFinishContext();
33876  return __pyx_r;
33877 }
33878 
33879 /* "cfemIntegrals.pyx":5463
33880  * <double*>jacobian_weak_residual.data,
33881  * <double*>jacobian_weak_residual_eb.data)
33882  * def estimate_mt(np.ndarray v, # <<<<<<<<<<<<<<
33883  * np.ndarray vXw_dV,
33884  * np.ndarray elementSpatialResidual,
33885  */
33886 
33887 /* Python wrapper */
33888 static PyObject *__pyx_pw_13cfemIntegrals_295estimate_mt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
33889 static PyMethodDef __pyx_mdef_13cfemIntegrals_295estimate_mt = {"estimate_mt", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_295estimate_mt, METH_VARARGS|METH_KEYWORDS, 0};
33890 static PyObject *__pyx_pw_13cfemIntegrals_295estimate_mt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
33891  PyArrayObject *__pyx_v_v = 0;
33892  PyArrayObject *__pyx_v_vXw_dV = 0;
33893  PyArrayObject *__pyx_v_elementSpatialResidual = 0;
33894  PyArrayObject *__pyx_v_mt = 0;
33895  int __pyx_lineno = 0;
33896  const char *__pyx_filename = NULL;
33897  int __pyx_clineno = 0;
33898  PyObject *__pyx_r = 0;
33899  __Pyx_RefNannyDeclarations
33900  __Pyx_RefNannySetupContext("estimate_mt (wrapper)", 0);
33901  {
33902  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_v,&__pyx_n_s_vXw_dV,&__pyx_n_s_elementSpatialResidual,&__pyx_n_s_mt,0};
33903  PyObject* values[4] = {0,0,0,0};
33904  if (unlikely(__pyx_kwds)) {
33905  Py_ssize_t kw_args;
33906  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
33907  switch (pos_args) {
33908  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
33909  CYTHON_FALLTHROUGH;
33910  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
33911  CYTHON_FALLTHROUGH;
33912  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
33913  CYTHON_FALLTHROUGH;
33914  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
33915  CYTHON_FALLTHROUGH;
33916  case 0: break;
33917  default: goto __pyx_L5_argtuple_error;
33918  }
33919  kw_args = PyDict_Size(__pyx_kwds);
33920  switch (pos_args) {
33921  case 0:
33922  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
33923  else goto __pyx_L5_argtuple_error;
33924  CYTHON_FALLTHROUGH;
33925  case 1:
33926  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vXw_dV)) != 0)) kw_args--;
33927  else {
33928  __Pyx_RaiseArgtupleInvalid("estimate_mt", 1, 4, 4, 1); __PYX_ERR(0, 5463, __pyx_L3_error)
33929  }
33930  CYTHON_FALLTHROUGH;
33931  case 2:
33932  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementSpatialResidual)) != 0)) kw_args--;
33933  else {
33934  __Pyx_RaiseArgtupleInvalid("estimate_mt", 1, 4, 4, 2); __PYX_ERR(0, 5463, __pyx_L3_error)
33935  }
33936  CYTHON_FALLTHROUGH;
33937  case 3:
33938  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mt)) != 0)) kw_args--;
33939  else {
33940  __Pyx_RaiseArgtupleInvalid("estimate_mt", 1, 4, 4, 3); __PYX_ERR(0, 5463, __pyx_L3_error)
33941  }
33942  }
33943  if (unlikely(kw_args > 0)) {
33944  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "estimate_mt") < 0)) __PYX_ERR(0, 5463, __pyx_L3_error)
33945  }
33946  } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
33947  goto __pyx_L5_argtuple_error;
33948  } else {
33949  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
33950  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
33951  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
33952  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
33953  }
33954  __pyx_v_v = ((PyArrayObject *)values[0]);
33955  __pyx_v_vXw_dV = ((PyArrayObject *)values[1]);
33956  __pyx_v_elementSpatialResidual = ((PyArrayObject *)values[2]);
33957  __pyx_v_mt = ((PyArrayObject *)values[3]);
33958  }
33959  goto __pyx_L4_argument_unpacking_done;
33960  __pyx_L5_argtuple_error:;
33961  __Pyx_RaiseArgtupleInvalid("estimate_mt", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5463, __pyx_L3_error)
33962  __pyx_L3_error:;
33963  __Pyx_AddTraceback("cfemIntegrals.estimate_mt", __pyx_clineno, __pyx_lineno, __pyx_filename);
33964  __Pyx_RefNannyFinishContext();
33965  return NULL;
33966  __pyx_L4_argument_unpacking_done:;
33967  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), __pyx_ptype_5numpy_ndarray, 1, "v", 0))) __PYX_ERR(0, 5463, __pyx_L1_error)
33968  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vXw_dV), __pyx_ptype_5numpy_ndarray, 1, "vXw_dV", 0))) __PYX_ERR(0, 5464, __pyx_L1_error)
33969  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementSpatialResidual), __pyx_ptype_5numpy_ndarray, 1, "elementSpatialResidual", 0))) __PYX_ERR(0, 5465, __pyx_L1_error)
33970  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mt), __pyx_ptype_5numpy_ndarray, 1, "mt", 0))) __PYX_ERR(0, 5466, __pyx_L1_error)
33971  __pyx_r = __pyx_pf_13cfemIntegrals_294estimate_mt(__pyx_self, __pyx_v_v, __pyx_v_vXw_dV, __pyx_v_elementSpatialResidual, __pyx_v_mt);
33972 
33973  /* function exit code */
33974  goto __pyx_L0;
33975  __pyx_L1_error:;
33976  __pyx_r = NULL;
33977  __pyx_L0:;
33978  __Pyx_RefNannyFinishContext();
33979  return __pyx_r;
33980 }
33981 
33982 static PyObject *__pyx_pf_13cfemIntegrals_294estimate_mt(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_vXw_dV, PyArrayObject *__pyx_v_elementSpatialResidual, PyArrayObject *__pyx_v_mt) {
33983  int __pyx_v_nElements_global;
33984  int __pyx_v_nQuadraturePoints_element;
33985  int __pyx_v_nDOF_element;
33986  PyObject *__pyx_r = NULL;
33987  __Pyx_RefNannyDeclarations
33988  __Pyx_RefNannySetupContext("estimate_mt", 0);
33989 
33990  /* "cfemIntegrals.pyx":5467
33991  * np.ndarray elementSpatialResidual,
33992  * np.ndarray mt):
33993  * cdef int nElements_global = vXw_dV.shape[0] # <<<<<<<<<<<<<<
33994  * cdef int nQuadraturePoints_element = vXw_dV.shape[1]
33995  * cdef int nDOF_element = vXw_dV.shape[2]
33996  */
33997  __pyx_v_nElements_global = (__pyx_v_vXw_dV->dimensions[0]);
33998 
33999  /* "cfemIntegrals.pyx":5468
34000  * np.ndarray mt):
34001  * cdef int nElements_global = vXw_dV.shape[0]
34002  * cdef int nQuadraturePoints_element = vXw_dV.shape[1] # <<<<<<<<<<<<<<
34003  * cdef int nDOF_element = vXw_dV.shape[2]
34004  * cestimate_mt(nElements_global,
34005  */
34006  __pyx_v_nQuadraturePoints_element = (__pyx_v_vXw_dV->dimensions[1]);
34007 
34008  /* "cfemIntegrals.pyx":5469
34009  * cdef int nElements_global = vXw_dV.shape[0]
34010  * cdef int nQuadraturePoints_element = vXw_dV.shape[1]
34011  * cdef int nDOF_element = vXw_dV.shape[2] # <<<<<<<<<<<<<<
34012  * cestimate_mt(nElements_global,
34013  * nQuadraturePoints_element,
34014  */
34015  __pyx_v_nDOF_element = (__pyx_v_vXw_dV->dimensions[2]);
34016 
34017  /* "cfemIntegrals.pyx":5470
34018  * cdef int nQuadraturePoints_element = vXw_dV.shape[1]
34019  * cdef int nDOF_element = vXw_dV.shape[2]
34020  * cestimate_mt(nElements_global, # <<<<<<<<<<<<<<
34021  * nQuadraturePoints_element,
34022  * nDOF_element,
34023  */
34024  estimate_mt(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_element, ((double *)__pyx_v_v->data), ((double *)__pyx_v_vXw_dV->data), ((double *)__pyx_v_elementSpatialResidual->data), ((double *)__pyx_v_mt->data));
34025 
34026  /* "cfemIntegrals.pyx":5463
34027  * <double*>jacobian_weak_residual.data,
34028  * <double*>jacobian_weak_residual_eb.data)
34029  * def estimate_mt(np.ndarray v, # <<<<<<<<<<<<<<
34030  * np.ndarray vXw_dV,
34031  * np.ndarray elementSpatialResidual,
34032  */
34033 
34034  /* function exit code */
34035  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
34036  __Pyx_XGIVEREF(__pyx_r);
34037  __Pyx_RefNannyFinishContext();
34038  return __pyx_r;
34039 }
34040 
34041 /* "cfemIntegrals.pyx":5477
34042  * <double*>elementSpatialResidual.data,
34043  * <double*>mt.data)
34044  * def estimate_mt_lowmem(np.ndarray v, # <<<<<<<<<<<<<<
34045  * np.ndarray w_dV,
34046  * np.ndarray elementSpatialResidual,
34047  */
34048 
34049 /* Python wrapper */
34050 static PyObject *__pyx_pw_13cfemIntegrals_297estimate_mt_lowmem(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
34051 static PyMethodDef __pyx_mdef_13cfemIntegrals_297estimate_mt_lowmem = {"estimate_mt_lowmem", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_297estimate_mt_lowmem, METH_VARARGS|METH_KEYWORDS, 0};
34052 static PyObject *__pyx_pw_13cfemIntegrals_297estimate_mt_lowmem(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
34053  PyArrayObject *__pyx_v_v = 0;
34054  PyArrayObject *__pyx_v_w_dV = 0;
34055  PyArrayObject *__pyx_v_elementSpatialResidual = 0;
34056  PyArrayObject *__pyx_v_mt = 0;
34057  int __pyx_lineno = 0;
34058  const char *__pyx_filename = NULL;
34059  int __pyx_clineno = 0;
34060  PyObject *__pyx_r = 0;
34061  __Pyx_RefNannyDeclarations
34062  __Pyx_RefNannySetupContext("estimate_mt_lowmem (wrapper)", 0);
34063  {
34064  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_v,&__pyx_n_s_w_dV,&__pyx_n_s_elementSpatialResidual,&__pyx_n_s_mt,0};
34065  PyObject* values[4] = {0,0,0,0};
34066  if (unlikely(__pyx_kwds)) {
34067  Py_ssize_t kw_args;
34068  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
34069  switch (pos_args) {
34070  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
34071  CYTHON_FALLTHROUGH;
34072  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
34073  CYTHON_FALLTHROUGH;
34074  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
34075  CYTHON_FALLTHROUGH;
34076  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
34077  CYTHON_FALLTHROUGH;
34078  case 0: break;
34079  default: goto __pyx_L5_argtuple_error;
34080  }
34081  kw_args = PyDict_Size(__pyx_kwds);
34082  switch (pos_args) {
34083  case 0:
34084  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
34085  else goto __pyx_L5_argtuple_error;
34086  CYTHON_FALLTHROUGH;
34087  case 1:
34088  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_w_dV)) != 0)) kw_args--;
34089  else {
34090  __Pyx_RaiseArgtupleInvalid("estimate_mt_lowmem", 1, 4, 4, 1); __PYX_ERR(0, 5477, __pyx_L3_error)
34091  }
34092  CYTHON_FALLTHROUGH;
34093  case 2:
34094  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementSpatialResidual)) != 0)) kw_args--;
34095  else {
34096  __Pyx_RaiseArgtupleInvalid("estimate_mt_lowmem", 1, 4, 4, 2); __PYX_ERR(0, 5477, __pyx_L3_error)
34097  }
34098  CYTHON_FALLTHROUGH;
34099  case 3:
34100  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mt)) != 0)) kw_args--;
34101  else {
34102  __Pyx_RaiseArgtupleInvalid("estimate_mt_lowmem", 1, 4, 4, 3); __PYX_ERR(0, 5477, __pyx_L3_error)
34103  }
34104  }
34105  if (unlikely(kw_args > 0)) {
34106  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "estimate_mt_lowmem") < 0)) __PYX_ERR(0, 5477, __pyx_L3_error)
34107  }
34108  } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
34109  goto __pyx_L5_argtuple_error;
34110  } else {
34111  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
34112  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
34113  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
34114  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
34115  }
34116  __pyx_v_v = ((PyArrayObject *)values[0]);
34117  __pyx_v_w_dV = ((PyArrayObject *)values[1]);
34118  __pyx_v_elementSpatialResidual = ((PyArrayObject *)values[2]);
34119  __pyx_v_mt = ((PyArrayObject *)values[3]);
34120  }
34121  goto __pyx_L4_argument_unpacking_done;
34122  __pyx_L5_argtuple_error:;
34123  __Pyx_RaiseArgtupleInvalid("estimate_mt_lowmem", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5477, __pyx_L3_error)
34124  __pyx_L3_error:;
34125  __Pyx_AddTraceback("cfemIntegrals.estimate_mt_lowmem", __pyx_clineno, __pyx_lineno, __pyx_filename);
34126  __Pyx_RefNannyFinishContext();
34127  return NULL;
34128  __pyx_L4_argument_unpacking_done:;
34129  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), __pyx_ptype_5numpy_ndarray, 1, "v", 0))) __PYX_ERR(0, 5477, __pyx_L1_error)
34130  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w_dV), __pyx_ptype_5numpy_ndarray, 1, "w_dV", 0))) __PYX_ERR(0, 5478, __pyx_L1_error)
34131  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementSpatialResidual), __pyx_ptype_5numpy_ndarray, 1, "elementSpatialResidual", 0))) __PYX_ERR(0, 5479, __pyx_L1_error)
34132  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mt), __pyx_ptype_5numpy_ndarray, 1, "mt", 0))) __PYX_ERR(0, 5480, __pyx_L1_error)
34133  __pyx_r = __pyx_pf_13cfemIntegrals_296estimate_mt_lowmem(__pyx_self, __pyx_v_v, __pyx_v_w_dV, __pyx_v_elementSpatialResidual, __pyx_v_mt);
34134 
34135  /* function exit code */
34136  goto __pyx_L0;
34137  __pyx_L1_error:;
34138  __pyx_r = NULL;
34139  __pyx_L0:;
34140  __Pyx_RefNannyFinishContext();
34141  return __pyx_r;
34142 }
34143 
34144 static PyObject *__pyx_pf_13cfemIntegrals_296estimate_mt_lowmem(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_w_dV, PyArrayObject *__pyx_v_elementSpatialResidual, PyArrayObject *__pyx_v_mt) {
34145  int __pyx_v_nElements_global;
34146  int __pyx_v_nQuadraturePoints_element;
34147  int __pyx_v_nDOF_element;
34148  PyObject *__pyx_r = NULL;
34149  __Pyx_RefNannyDeclarations
34150  __Pyx_RefNannySetupContext("estimate_mt_lowmem", 0);
34151 
34152  /* "cfemIntegrals.pyx":5481
34153  * np.ndarray elementSpatialResidual,
34154  * np.ndarray mt):
34155  * cdef int nElements_global = w_dV.shape[0] # <<<<<<<<<<<<<<
34156  * cdef int nQuadraturePoints_element = w_dV.shape[1]
34157  * cdef int nDOF_element = w_dV.shape[2]
34158  */
34159  __pyx_v_nElements_global = (__pyx_v_w_dV->dimensions[0]);
34160 
34161  /* "cfemIntegrals.pyx":5482
34162  * np.ndarray mt):
34163  * cdef int nElements_global = w_dV.shape[0]
34164  * cdef int nQuadraturePoints_element = w_dV.shape[1] # <<<<<<<<<<<<<<
34165  * cdef int nDOF_element = w_dV.shape[2]
34166  * cestimate_mt_lowmem(nElements_global,
34167  */
34168  __pyx_v_nQuadraturePoints_element = (__pyx_v_w_dV->dimensions[1]);
34169 
34170  /* "cfemIntegrals.pyx":5483
34171  * cdef int nElements_global = w_dV.shape[0]
34172  * cdef int nQuadraturePoints_element = w_dV.shape[1]
34173  * cdef int nDOF_element = w_dV.shape[2] # <<<<<<<<<<<<<<
34174  * cestimate_mt_lowmem(nElements_global,
34175  * nQuadraturePoints_element,
34176  */
34177  __pyx_v_nDOF_element = (__pyx_v_w_dV->dimensions[2]);
34178 
34179  /* "cfemIntegrals.pyx":5484
34180  * cdef int nQuadraturePoints_element = w_dV.shape[1]
34181  * cdef int nDOF_element = w_dV.shape[2]
34182  * cestimate_mt_lowmem(nElements_global, # <<<<<<<<<<<<<<
34183  * nQuadraturePoints_element,
34184  * nDOF_element,
34185  */
34186  estimate_mt_lowmem(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_element, ((double *)__pyx_v_v->data), ((double *)__pyx_v_w_dV->data), ((double *)__pyx_v_elementSpatialResidual->data), ((double *)__pyx_v_mt->data));
34187 
34188  /* "cfemIntegrals.pyx":5477
34189  * <double*>elementSpatialResidual.data,
34190  * <double*>mt.data)
34191  * def estimate_mt_lowmem(np.ndarray v, # <<<<<<<<<<<<<<
34192  * np.ndarray w_dV,
34193  * np.ndarray elementSpatialResidual,
34194  */
34195 
34196  /* function exit code */
34197  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
34198  __Pyx_XGIVEREF(__pyx_r);
34199  __Pyx_RefNannyFinishContext();
34200  return __pyx_r;
34201 }
34202 
34203 /* "cfemIntegrals.pyx":5491
34204  * <double*> elementSpatialResidual.data,
34205  * <double*> mt.data)
34206  * def scalarDomainIntegral(np.ndarray dV, # <<<<<<<<<<<<<<
34207  * np.ndarray nValueArray,
34208  * int nElements_global):
34209  */
34210 
34211 /* Python wrapper */
34212 static PyObject *__pyx_pw_13cfemIntegrals_299scalarDomainIntegral(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
34213 static PyMethodDef __pyx_mdef_13cfemIntegrals_299scalarDomainIntegral = {"scalarDomainIntegral", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_299scalarDomainIntegral, METH_VARARGS|METH_KEYWORDS, 0};
34214 static PyObject *__pyx_pw_13cfemIntegrals_299scalarDomainIntegral(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
34215  PyArrayObject *__pyx_v_dV = 0;
34216  PyArrayObject *__pyx_v_nValueArray = 0;
34217  int __pyx_v_nElements_global;
34218  int __pyx_lineno = 0;
34219  const char *__pyx_filename = NULL;
34220  int __pyx_clineno = 0;
34221  PyObject *__pyx_r = 0;
34222  __Pyx_RefNannyDeclarations
34223  __Pyx_RefNannySetupContext("scalarDomainIntegral (wrapper)", 0);
34224  {
34225  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dV,&__pyx_n_s_nValueArray,&__pyx_n_s_nElements_global,0};
34226  PyObject* values[3] = {0,0,0};
34227  if (unlikely(__pyx_kwds)) {
34228  Py_ssize_t kw_args;
34229  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
34230  switch (pos_args) {
34231  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
34232  CYTHON_FALLTHROUGH;
34233  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
34234  CYTHON_FALLTHROUGH;
34235  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
34236  CYTHON_FALLTHROUGH;
34237  case 0: break;
34238  default: goto __pyx_L5_argtuple_error;
34239  }
34240  kw_args = PyDict_Size(__pyx_kwds);
34241  switch (pos_args) {
34242  case 0:
34243  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dV)) != 0)) kw_args--;
34244  else goto __pyx_L5_argtuple_error;
34245  CYTHON_FALLTHROUGH;
34246  case 1:
34247  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nValueArray)) != 0)) kw_args--;
34248  else {
34249  __Pyx_RaiseArgtupleInvalid("scalarDomainIntegral", 1, 3, 3, 1); __PYX_ERR(0, 5491, __pyx_L3_error)
34250  }
34251  CYTHON_FALLTHROUGH;
34252  case 2:
34253  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nElements_global)) != 0)) kw_args--;
34254  else {
34255  __Pyx_RaiseArgtupleInvalid("scalarDomainIntegral", 1, 3, 3, 2); __PYX_ERR(0, 5491, __pyx_L3_error)
34256  }
34257  }
34258  if (unlikely(kw_args > 0)) {
34259  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "scalarDomainIntegral") < 0)) __PYX_ERR(0, 5491, __pyx_L3_error)
34260  }
34261  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
34262  goto __pyx_L5_argtuple_error;
34263  } else {
34264  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
34265  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
34266  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
34267  }
34268  __pyx_v_dV = ((PyArrayObject *)values[0]);
34269  __pyx_v_nValueArray = ((PyArrayObject *)values[1]);
34270  __pyx_v_nElements_global = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_nElements_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5493, __pyx_L3_error)
34271  }
34272  goto __pyx_L4_argument_unpacking_done;
34273  __pyx_L5_argtuple_error:;
34274  __Pyx_RaiseArgtupleInvalid("scalarDomainIntegral", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5491, __pyx_L3_error)
34275  __pyx_L3_error:;
34276  __Pyx_AddTraceback("cfemIntegrals.scalarDomainIntegral", __pyx_clineno, __pyx_lineno, __pyx_filename);
34277  __Pyx_RefNannyFinishContext();
34278  return NULL;
34279  __pyx_L4_argument_unpacking_done:;
34280  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dV), __pyx_ptype_5numpy_ndarray, 1, "dV", 0))) __PYX_ERR(0, 5491, __pyx_L1_error)
34281  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nValueArray), __pyx_ptype_5numpy_ndarray, 1, "nValueArray", 0))) __PYX_ERR(0, 5492, __pyx_L1_error)
34282  __pyx_r = __pyx_pf_13cfemIntegrals_298scalarDomainIntegral(__pyx_self, __pyx_v_dV, __pyx_v_nValueArray, __pyx_v_nElements_global);
34283 
34284  /* function exit code */
34285  goto __pyx_L0;
34286  __pyx_L1_error:;
34287  __pyx_r = NULL;
34288  __pyx_L0:;
34289  __Pyx_RefNannyFinishContext();
34290  return __pyx_r;
34291 }
34292 
34293 static PyObject *__pyx_pf_13cfemIntegrals_298scalarDomainIntegral(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dV, PyArrayObject *__pyx_v_nValueArray, int __pyx_v_nElements_global) {
34294  double __pyx_v_output;
34295  int __pyx_v_nQuadraturePoints_element;
34296  PyObject *__pyx_r = NULL;
34297  __Pyx_RefNannyDeclarations
34298  PyObject *__pyx_t_1 = NULL;
34299  int __pyx_lineno = 0;
34300  const char *__pyx_filename = NULL;
34301  int __pyx_clineno = 0;
34302  __Pyx_RefNannySetupContext("scalarDomainIntegral", 0);
34303 
34304  /* "cfemIntegrals.pyx":5495
34305  * int nElements_global):
34306  * cdef double output
34307  * cdef int nQuadraturePoints_element = dV.shape[1] # <<<<<<<<<<<<<<
34308  * output = cscalarDomainIntegral(nElements_global,
34309  * nQuadraturePoints_element,
34310  */
34311  __pyx_v_nQuadraturePoints_element = (__pyx_v_dV->dimensions[1]);
34312 
34313  /* "cfemIntegrals.pyx":5496
34314  * cdef double output
34315  * cdef int nQuadraturePoints_element = dV.shape[1]
34316  * output = cscalarDomainIntegral(nElements_global, # <<<<<<<<<<<<<<
34317  * nQuadraturePoints_element,
34318  * <double*> dV.data,
34319  */
34320  __pyx_v_output = scalarDomainIntegral(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, ((double *)__pyx_v_dV->data), ((double *)__pyx_v_nValueArray->data));
34321 
34322  /* "cfemIntegrals.pyx":5500
34323  * <double*> dV.data,
34324  * <double*> nValueArray.data)
34325  * return output # <<<<<<<<<<<<<<
34326  * def scalarHeavisideDomainIntegral(int nElements_global,
34327  * int nQuadraturePoints_element,
34328  */
34329  __Pyx_XDECREF(__pyx_r);
34330  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_output); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5500, __pyx_L1_error)
34331  __Pyx_GOTREF(__pyx_t_1);
34332  __pyx_r = __pyx_t_1;
34333  __pyx_t_1 = 0;
34334  goto __pyx_L0;
34335 
34336  /* "cfemIntegrals.pyx":5491
34337  * <double*> elementSpatialResidual.data,
34338  * <double*> mt.data)
34339  * def scalarDomainIntegral(np.ndarray dV, # <<<<<<<<<<<<<<
34340  * np.ndarray nValueArray,
34341  * int nElements_global):
34342  */
34343 
34344  /* function exit code */
34345  __pyx_L1_error:;
34346  __Pyx_XDECREF(__pyx_t_1);
34347  __Pyx_AddTraceback("cfemIntegrals.scalarDomainIntegral", __pyx_clineno, __pyx_lineno, __pyx_filename);
34348  __pyx_r = NULL;
34349  __pyx_L0:;
34350  __Pyx_XGIVEREF(__pyx_r);
34351  __Pyx_RefNannyFinishContext();
34352  return __pyx_r;
34353 }
34354 
34355 /* "cfemIntegrals.pyx":5501
34356  * <double*> nValueArray.data)
34357  * return output
34358  * def scalarHeavisideDomainIntegral(int nElements_global, # <<<<<<<<<<<<<<
34359  * int nQuadraturePoints_element,
34360  * np.ndarray dV,
34361  */
34362 
34363 /* Python wrapper */
34364 static PyObject *__pyx_pw_13cfemIntegrals_301scalarHeavisideDomainIntegral(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
34365 static PyMethodDef __pyx_mdef_13cfemIntegrals_301scalarHeavisideDomainIntegral = {"scalarHeavisideDomainIntegral", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_301scalarHeavisideDomainIntegral, METH_VARARGS|METH_KEYWORDS, 0};
34366 static PyObject *__pyx_pw_13cfemIntegrals_301scalarHeavisideDomainIntegral(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
34367  int __pyx_v_nElements_global;
34368  int __pyx_v_nQuadraturePoints_element;
34369  PyArrayObject *__pyx_v_dV = 0;
34370  PyArrayObject *__pyx_v_nValueArray = 0;
34371  int __pyx_lineno = 0;
34372  const char *__pyx_filename = NULL;
34373  int __pyx_clineno = 0;
34374  PyObject *__pyx_r = 0;
34375  __Pyx_RefNannyDeclarations
34376  __Pyx_RefNannySetupContext("scalarHeavisideDomainIntegral (wrapper)", 0);
34377  {
34378  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nElements_global,&__pyx_n_s_nQuadraturePoints_element,&__pyx_n_s_dV,&__pyx_n_s_nValueArray,0};
34379  PyObject* values[4] = {0,0,0,0};
34380  if (unlikely(__pyx_kwds)) {
34381  Py_ssize_t kw_args;
34382  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
34383  switch (pos_args) {
34384  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
34385  CYTHON_FALLTHROUGH;
34386  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
34387  CYTHON_FALLTHROUGH;
34388  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
34389  CYTHON_FALLTHROUGH;
34390  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
34391  CYTHON_FALLTHROUGH;
34392  case 0: break;
34393  default: goto __pyx_L5_argtuple_error;
34394  }
34395  kw_args = PyDict_Size(__pyx_kwds);
34396  switch (pos_args) {
34397  case 0:
34398  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nElements_global)) != 0)) kw_args--;
34399  else goto __pyx_L5_argtuple_error;
34400  CYTHON_FALLTHROUGH;
34401  case 1:
34402  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nQuadraturePoints_element)) != 0)) kw_args--;
34403  else {
34404  __Pyx_RaiseArgtupleInvalid("scalarHeavisideDomainIntegral", 1, 4, 4, 1); __PYX_ERR(0, 5501, __pyx_L3_error)
34405  }
34406  CYTHON_FALLTHROUGH;
34407  case 2:
34408  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dV)) != 0)) kw_args--;
34409  else {
34410  __Pyx_RaiseArgtupleInvalid("scalarHeavisideDomainIntegral", 1, 4, 4, 2); __PYX_ERR(0, 5501, __pyx_L3_error)
34411  }
34412  CYTHON_FALLTHROUGH;
34413  case 3:
34414  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nValueArray)) != 0)) kw_args--;
34415  else {
34416  __Pyx_RaiseArgtupleInvalid("scalarHeavisideDomainIntegral", 1, 4, 4, 3); __PYX_ERR(0, 5501, __pyx_L3_error)
34417  }
34418  }
34419  if (unlikely(kw_args > 0)) {
34420  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "scalarHeavisideDomainIntegral") < 0)) __PYX_ERR(0, 5501, __pyx_L3_error)
34421  }
34422  } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
34423  goto __pyx_L5_argtuple_error;
34424  } else {
34425  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
34426  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
34427  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
34428  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
34429  }
34430  __pyx_v_nElements_global = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_nElements_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5501, __pyx_L3_error)
34431  __pyx_v_nQuadraturePoints_element = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_nQuadraturePoints_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5502, __pyx_L3_error)
34432  __pyx_v_dV = ((PyArrayObject *)values[2]);
34433  __pyx_v_nValueArray = ((PyArrayObject *)values[3]);
34434  }
34435  goto __pyx_L4_argument_unpacking_done;
34436  __pyx_L5_argtuple_error:;
34437  __Pyx_RaiseArgtupleInvalid("scalarHeavisideDomainIntegral", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5501, __pyx_L3_error)
34438  __pyx_L3_error:;
34439  __Pyx_AddTraceback("cfemIntegrals.scalarHeavisideDomainIntegral", __pyx_clineno, __pyx_lineno, __pyx_filename);
34440  __Pyx_RefNannyFinishContext();
34441  return NULL;
34442  __pyx_L4_argument_unpacking_done:;
34443  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dV), __pyx_ptype_5numpy_ndarray, 1, "dV", 0))) __PYX_ERR(0, 5503, __pyx_L1_error)
34444  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nValueArray), __pyx_ptype_5numpy_ndarray, 1, "nValueArray", 0))) __PYX_ERR(0, 5504, __pyx_L1_error)
34445  __pyx_r = __pyx_pf_13cfemIntegrals_300scalarHeavisideDomainIntegral(__pyx_self, __pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_dV, __pyx_v_nValueArray);
34446 
34447  /* function exit code */
34448  goto __pyx_L0;
34449  __pyx_L1_error:;
34450  __pyx_r = NULL;
34451  __pyx_L0:;
34452  __Pyx_RefNannyFinishContext();
34453  return __pyx_r;
34454 }
34455 
34456 static PyObject *__pyx_pf_13cfemIntegrals_300scalarHeavisideDomainIntegral(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nElements_global, int __pyx_v_nQuadraturePoints_element, PyArrayObject *__pyx_v_dV, PyArrayObject *__pyx_v_nValueArray) {
34457  double __pyx_v_output;
34458  PyObject *__pyx_r = NULL;
34459  __Pyx_RefNannyDeclarations
34460  PyObject *__pyx_t_1 = NULL;
34461  int __pyx_lineno = 0;
34462  const char *__pyx_filename = NULL;
34463  int __pyx_clineno = 0;
34464  __Pyx_RefNannySetupContext("scalarHeavisideDomainIntegral", 0);
34465 
34466  /* "cfemIntegrals.pyx":5506
34467  * np.ndarray nValueArray):
34468  * cdef double output
34469  * output = cscalarHeavisideDomainIntegral(nElements_global, # <<<<<<<<<<<<<<
34470  * nQuadraturePoints_element,
34471  * <double*> dV.data,
34472  */
34473  __pyx_v_output = scalarHeavisideDomainIntegral(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, ((double *)__pyx_v_dV->data), ((double *)__pyx_v_nValueArray->data));
34474 
34475  /* "cfemIntegrals.pyx":5510
34476  * <double*> dV.data,
34477  * <double*> nValueArray.data)
34478  * return output # <<<<<<<<<<<<<<
34479  * def scalarSmoothedHeavisideDomainIntegral(double epsFact,
34480  * np.ndarray elementDiameter,
34481  */
34482  __Pyx_XDECREF(__pyx_r);
34483  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_output); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5510, __pyx_L1_error)
34484  __Pyx_GOTREF(__pyx_t_1);
34485  __pyx_r = __pyx_t_1;
34486  __pyx_t_1 = 0;
34487  goto __pyx_L0;
34488 
34489  /* "cfemIntegrals.pyx":5501
34490  * <double*> nValueArray.data)
34491  * return output
34492  * def scalarHeavisideDomainIntegral(int nElements_global, # <<<<<<<<<<<<<<
34493  * int nQuadraturePoints_element,
34494  * np.ndarray dV,
34495  */
34496 
34497  /* function exit code */
34498  __pyx_L1_error:;
34499  __Pyx_XDECREF(__pyx_t_1);
34500  __Pyx_AddTraceback("cfemIntegrals.scalarHeavisideDomainIntegral", __pyx_clineno, __pyx_lineno, __pyx_filename);
34501  __pyx_r = NULL;
34502  __pyx_L0:;
34503  __Pyx_XGIVEREF(__pyx_r);
34504  __Pyx_RefNannyFinishContext();
34505  return __pyx_r;
34506 }
34507 
34508 /* "cfemIntegrals.pyx":5511
34509  * <double*> nValueArray.data)
34510  * return output
34511  * def scalarSmoothedHeavisideDomainIntegral(double epsFact, # <<<<<<<<<<<<<<
34512  * np.ndarray elementDiameter,
34513  * np.ndarray dV,
34514  */
34515 
34516 /* Python wrapper */
34517 static PyObject *__pyx_pw_13cfemIntegrals_303scalarSmoothedHeavisideDomainIntegral(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
34518 static PyMethodDef __pyx_mdef_13cfemIntegrals_303scalarSmoothedHeavisideDomainIntegral = {"scalarSmoothedHeavisideDomainIntegral", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_303scalarSmoothedHeavisideDomainIntegral, METH_VARARGS|METH_KEYWORDS, 0};
34519 static PyObject *__pyx_pw_13cfemIntegrals_303scalarSmoothedHeavisideDomainIntegral(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
34520  double __pyx_v_epsFact;
34521  PyArrayObject *__pyx_v_elementDiameter = 0;
34522  PyArrayObject *__pyx_v_dV = 0;
34523  PyArrayObject *__pyx_v_nValueArray = 0;
34524  int __pyx_v_nElements_global;
34525  int __pyx_lineno = 0;
34526  const char *__pyx_filename = NULL;
34527  int __pyx_clineno = 0;
34528  PyObject *__pyx_r = 0;
34529  __Pyx_RefNannyDeclarations
34530  __Pyx_RefNannySetupContext("scalarSmoothedHeavisideDomainIntegral (wrapper)", 0);
34531  {
34532  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_epsFact,&__pyx_n_s_elementDiameter,&__pyx_n_s_dV,&__pyx_n_s_nValueArray,&__pyx_n_s_nElements_global,0};
34533  PyObject* values[5] = {0,0,0,0,0};
34534  if (unlikely(__pyx_kwds)) {
34535  Py_ssize_t kw_args;
34536  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
34537  switch (pos_args) {
34538  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
34539  CYTHON_FALLTHROUGH;
34540  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
34541  CYTHON_FALLTHROUGH;
34542  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
34543  CYTHON_FALLTHROUGH;
34544  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
34545  CYTHON_FALLTHROUGH;
34546  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
34547  CYTHON_FALLTHROUGH;
34548  case 0: break;
34549  default: goto __pyx_L5_argtuple_error;
34550  }
34551  kw_args = PyDict_Size(__pyx_kwds);
34552  switch (pos_args) {
34553  case 0:
34554  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_epsFact)) != 0)) kw_args--;
34555  else goto __pyx_L5_argtuple_error;
34556  CYTHON_FALLTHROUGH;
34557  case 1:
34558  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementDiameter)) != 0)) kw_args--;
34559  else {
34560  __Pyx_RaiseArgtupleInvalid("scalarSmoothedHeavisideDomainIntegral", 1, 5, 5, 1); __PYX_ERR(0, 5511, __pyx_L3_error)
34561  }
34562  CYTHON_FALLTHROUGH;
34563  case 2:
34564  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dV)) != 0)) kw_args--;
34565  else {
34566  __Pyx_RaiseArgtupleInvalid("scalarSmoothedHeavisideDomainIntegral", 1, 5, 5, 2); __PYX_ERR(0, 5511, __pyx_L3_error)
34567  }
34568  CYTHON_FALLTHROUGH;
34569  case 3:
34570  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nValueArray)) != 0)) kw_args--;
34571  else {
34572  __Pyx_RaiseArgtupleInvalid("scalarSmoothedHeavisideDomainIntegral", 1, 5, 5, 3); __PYX_ERR(0, 5511, __pyx_L3_error)
34573  }
34574  CYTHON_FALLTHROUGH;
34575  case 4:
34576  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nElements_global)) != 0)) kw_args--;
34577  else {
34578  __Pyx_RaiseArgtupleInvalid("scalarSmoothedHeavisideDomainIntegral", 1, 5, 5, 4); __PYX_ERR(0, 5511, __pyx_L3_error)
34579  }
34580  }
34581  if (unlikely(kw_args > 0)) {
34582  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "scalarSmoothedHeavisideDomainIntegral") < 0)) __PYX_ERR(0, 5511, __pyx_L3_error)
34583  }
34584  } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
34585  goto __pyx_L5_argtuple_error;
34586  } else {
34587  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
34588  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
34589  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
34590  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
34591  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
34592  }
34593  __pyx_v_epsFact = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_epsFact == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5511, __pyx_L3_error)
34594  __pyx_v_elementDiameter = ((PyArrayObject *)values[1]);
34595  __pyx_v_dV = ((PyArrayObject *)values[2]);
34596  __pyx_v_nValueArray = ((PyArrayObject *)values[3]);
34597  __pyx_v_nElements_global = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_nElements_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5515, __pyx_L3_error)
34598  }
34599  goto __pyx_L4_argument_unpacking_done;
34600  __pyx_L5_argtuple_error:;
34601  __Pyx_RaiseArgtupleInvalid("scalarSmoothedHeavisideDomainIntegral", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5511, __pyx_L3_error)
34602  __pyx_L3_error:;
34603  __Pyx_AddTraceback("cfemIntegrals.scalarSmoothedHeavisideDomainIntegral", __pyx_clineno, __pyx_lineno, __pyx_filename);
34604  __Pyx_RefNannyFinishContext();
34605  return NULL;
34606  __pyx_L4_argument_unpacking_done:;
34607  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementDiameter), __pyx_ptype_5numpy_ndarray, 1, "elementDiameter", 0))) __PYX_ERR(0, 5512, __pyx_L1_error)
34608  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dV), __pyx_ptype_5numpy_ndarray, 1, "dV", 0))) __PYX_ERR(0, 5513, __pyx_L1_error)
34609  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nValueArray), __pyx_ptype_5numpy_ndarray, 1, "nValueArray", 0))) __PYX_ERR(0, 5514, __pyx_L1_error)
34610  __pyx_r = __pyx_pf_13cfemIntegrals_302scalarSmoothedHeavisideDomainIntegral(__pyx_self, __pyx_v_epsFact, __pyx_v_elementDiameter, __pyx_v_dV, __pyx_v_nValueArray, __pyx_v_nElements_global);
34611 
34612  /* function exit code */
34613  goto __pyx_L0;
34614  __pyx_L1_error:;
34615  __pyx_r = NULL;
34616  __pyx_L0:;
34617  __Pyx_RefNannyFinishContext();
34618  return __pyx_r;
34619 }
34620 
34621 static PyObject *__pyx_pf_13cfemIntegrals_302scalarSmoothedHeavisideDomainIntegral(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_epsFact, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_dV, PyArrayObject *__pyx_v_nValueArray, int __pyx_v_nElements_global) {
34622  double __pyx_v_output;
34623  int __pyx_v_nQuadraturePoints_element;
34624  PyObject *__pyx_r = NULL;
34625  __Pyx_RefNannyDeclarations
34626  PyObject *__pyx_t_1 = NULL;
34627  int __pyx_lineno = 0;
34628  const char *__pyx_filename = NULL;
34629  int __pyx_clineno = 0;
34630  __Pyx_RefNannySetupContext("scalarSmoothedHeavisideDomainIntegral", 0);
34631 
34632  /* "cfemIntegrals.pyx":5517
34633  * int nElements_global):
34634  * cdef double output
34635  * cdef int nQuadraturePoints_element = dV.shape[1] # <<<<<<<<<<<<<<
34636  * output = cscalarSmoothedHeavisideDomainIntegral(nElements_global,
34637  * nQuadraturePoints_element,
34638  */
34639  __pyx_v_nQuadraturePoints_element = (__pyx_v_dV->dimensions[1]);
34640 
34641  /* "cfemIntegrals.pyx":5518
34642  * cdef double output
34643  * cdef int nQuadraturePoints_element = dV.shape[1]
34644  * output = cscalarSmoothedHeavisideDomainIntegral(nElements_global, # <<<<<<<<<<<<<<
34645  * nQuadraturePoints_element,
34646  * epsFact,
34647  */
34648  __pyx_v_output = scalarSmoothedHeavisideDomainIntegral(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_epsFact, ((double *)__pyx_v_elementDiameter->data), ((double *)__pyx_v_dV->data), ((double *)__pyx_v_nValueArray->data));
34649 
34650  /* "cfemIntegrals.pyx":5524
34651  * <double*> dV.data,
34652  * <double*> nValueArray.data)
34653  * return output # <<<<<<<<<<<<<<
34654  * def fluxDomainBoundaryIntegral(int nElementBoundaries_owned,
34655  * np.ndarray flag,
34656  */
34657  __Pyx_XDECREF(__pyx_r);
34658  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_output); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5524, __pyx_L1_error)
34659  __Pyx_GOTREF(__pyx_t_1);
34660  __pyx_r = __pyx_t_1;
34661  __pyx_t_1 = 0;
34662  goto __pyx_L0;
34663 
34664  /* "cfemIntegrals.pyx":5511
34665  * <double*> nValueArray.data)
34666  * return output
34667  * def scalarSmoothedHeavisideDomainIntegral(double epsFact, # <<<<<<<<<<<<<<
34668  * np.ndarray elementDiameter,
34669  * np.ndarray dV,
34670  */
34671 
34672  /* function exit code */
34673  __pyx_L1_error:;
34674  __Pyx_XDECREF(__pyx_t_1);
34675  __Pyx_AddTraceback("cfemIntegrals.scalarSmoothedHeavisideDomainIntegral", __pyx_clineno, __pyx_lineno, __pyx_filename);
34676  __pyx_r = NULL;
34677  __pyx_L0:;
34678  __Pyx_XGIVEREF(__pyx_r);
34679  __Pyx_RefNannyFinishContext();
34680  return __pyx_r;
34681 }
34682 
34683 /* "cfemIntegrals.pyx":5525
34684  * <double*> nValueArray.data)
34685  * return output
34686  * def fluxDomainBoundaryIntegral(int nElementBoundaries_owned, # <<<<<<<<<<<<<<
34687  * np.ndarray flag,
34688  * np.ndarray exteriorElementBoundariesArray,
34689  */
34690 
34691 /* Python wrapper */
34692 static PyObject *__pyx_pw_13cfemIntegrals_305fluxDomainBoundaryIntegral(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
34693 static PyMethodDef __pyx_mdef_13cfemIntegrals_305fluxDomainBoundaryIntegral = {"fluxDomainBoundaryIntegral", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_305fluxDomainBoundaryIntegral, METH_VARARGS|METH_KEYWORDS, 0};
34694 static PyObject *__pyx_pw_13cfemIntegrals_305fluxDomainBoundaryIntegral(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
34695  int __pyx_v_nElementBoundaries_owned;
34696  PyArrayObject *__pyx_v_flag = 0;
34697  PyArrayObject *__pyx_v_exteriorElementBoundariesArray = 0;
34698  PyArrayObject *__pyx_v_dS = 0;
34699  PyArrayObject *__pyx_v_nValueArray = 0;
34700  int __pyx_lineno = 0;
34701  const char *__pyx_filename = NULL;
34702  int __pyx_clineno = 0;
34703  PyObject *__pyx_r = 0;
34704  __Pyx_RefNannyDeclarations
34705  __Pyx_RefNannySetupContext("fluxDomainBoundaryIntegral (wrapper)", 0);
34706  {
34707  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nElementBoundaries_owned,&__pyx_n_s_flag,&__pyx_n_s_exteriorElementBoundariesArray,&__pyx_n_s_dS,&__pyx_n_s_nValueArray,0};
34708  PyObject* values[5] = {0,0,0,0,0};
34709  if (unlikely(__pyx_kwds)) {
34710  Py_ssize_t kw_args;
34711  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
34712  switch (pos_args) {
34713  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
34714  CYTHON_FALLTHROUGH;
34715  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
34716  CYTHON_FALLTHROUGH;
34717  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
34718  CYTHON_FALLTHROUGH;
34719  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
34720  CYTHON_FALLTHROUGH;
34721  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
34722  CYTHON_FALLTHROUGH;
34723  case 0: break;
34724  default: goto __pyx_L5_argtuple_error;
34725  }
34726  kw_args = PyDict_Size(__pyx_kwds);
34727  switch (pos_args) {
34728  case 0:
34729  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nElementBoundaries_owned)) != 0)) kw_args--;
34730  else goto __pyx_L5_argtuple_error;
34731  CYTHON_FALLTHROUGH;
34732  case 1:
34733  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flag)) != 0)) kw_args--;
34734  else {
34735  __Pyx_RaiseArgtupleInvalid("fluxDomainBoundaryIntegral", 1, 5, 5, 1); __PYX_ERR(0, 5525, __pyx_L3_error)
34736  }
34737  CYTHON_FALLTHROUGH;
34738  case 2:
34739  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exteriorElementBoundariesArray)) != 0)) kw_args--;
34740  else {
34741  __Pyx_RaiseArgtupleInvalid("fluxDomainBoundaryIntegral", 1, 5, 5, 2); __PYX_ERR(0, 5525, __pyx_L3_error)
34742  }
34743  CYTHON_FALLTHROUGH;
34744  case 3:
34745  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dS)) != 0)) kw_args--;
34746  else {
34747  __Pyx_RaiseArgtupleInvalid("fluxDomainBoundaryIntegral", 1, 5, 5, 3); __PYX_ERR(0, 5525, __pyx_L3_error)
34748  }
34749  CYTHON_FALLTHROUGH;
34750  case 4:
34751  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nValueArray)) != 0)) kw_args--;
34752  else {
34753  __Pyx_RaiseArgtupleInvalid("fluxDomainBoundaryIntegral", 1, 5, 5, 4); __PYX_ERR(0, 5525, __pyx_L3_error)
34754  }
34755  }
34756  if (unlikely(kw_args > 0)) {
34757  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fluxDomainBoundaryIntegral") < 0)) __PYX_ERR(0, 5525, __pyx_L3_error)
34758  }
34759  } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
34760  goto __pyx_L5_argtuple_error;
34761  } else {
34762  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
34763  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
34764  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
34765  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
34766  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
34767  }
34768  __pyx_v_nElementBoundaries_owned = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_nElementBoundaries_owned == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5525, __pyx_L3_error)
34769  __pyx_v_flag = ((PyArrayObject *)values[1]);
34770  __pyx_v_exteriorElementBoundariesArray = ((PyArrayObject *)values[2]);
34771  __pyx_v_dS = ((PyArrayObject *)values[3]);
34772  __pyx_v_nValueArray = ((PyArrayObject *)values[4]);
34773  }
34774  goto __pyx_L4_argument_unpacking_done;
34775  __pyx_L5_argtuple_error:;
34776  __Pyx_RaiseArgtupleInvalid("fluxDomainBoundaryIntegral", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5525, __pyx_L3_error)
34777  __pyx_L3_error:;
34778  __Pyx_AddTraceback("cfemIntegrals.fluxDomainBoundaryIntegral", __pyx_clineno, __pyx_lineno, __pyx_filename);
34779  __Pyx_RefNannyFinishContext();
34780  return NULL;
34781  __pyx_L4_argument_unpacking_done:;
34782  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_flag), __pyx_ptype_5numpy_ndarray, 1, "flag", 0))) __PYX_ERR(0, 5526, __pyx_L1_error)
34783  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exteriorElementBoundariesArray), __pyx_ptype_5numpy_ndarray, 1, "exteriorElementBoundariesArray", 0))) __PYX_ERR(0, 5527, __pyx_L1_error)
34784  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dS), __pyx_ptype_5numpy_ndarray, 1, "dS", 0))) __PYX_ERR(0, 5528, __pyx_L1_error)
34785  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nValueArray), __pyx_ptype_5numpy_ndarray, 1, "nValueArray", 0))) __PYX_ERR(0, 5529, __pyx_L1_error)
34786  __pyx_r = __pyx_pf_13cfemIntegrals_304fluxDomainBoundaryIntegral(__pyx_self, __pyx_v_nElementBoundaries_owned, __pyx_v_flag, __pyx_v_exteriorElementBoundariesArray, __pyx_v_dS, __pyx_v_nValueArray);
34787 
34788  /* function exit code */
34789  goto __pyx_L0;
34790  __pyx_L1_error:;
34791  __pyx_r = NULL;
34792  __pyx_L0:;
34793  __Pyx_RefNannyFinishContext();
34794  return __pyx_r;
34795 }
34796 
34797 static PyObject *__pyx_pf_13cfemIntegrals_304fluxDomainBoundaryIntegral(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nElementBoundaries_owned, PyArrayObject *__pyx_v_flag, PyArrayObject *__pyx_v_exteriorElementBoundariesArray, PyArrayObject *__pyx_v_dS, PyArrayObject *__pyx_v_nValueArray) {
34798  npy_intp __pyx_v_nExteriorElementBoundaries;
34799  npy_intp __pyx_v_nQuadraturePoints_elementBoundary;
34800  double __pyx_v_output;
34801  PyObject *__pyx_r = NULL;
34802  __Pyx_RefNannyDeclarations
34803  PyObject *__pyx_t_1 = NULL;
34804  int __pyx_lineno = 0;
34805  const char *__pyx_filename = NULL;
34806  int __pyx_clineno = 0;
34807  __Pyx_RefNannySetupContext("fluxDomainBoundaryIntegral", 0);
34808 
34809  /* "cfemIntegrals.pyx":5530
34810  * np.ndarray dS,
34811  * np.ndarray nValueArray):
34812  * nExteriorElementBoundaries = nValueArray.shape[0] # <<<<<<<<<<<<<<
34813  * nQuadraturePoints_elementBoundary = nValueArray.shape[1]
34814  * cdef double output
34815  */
34816  __pyx_v_nExteriorElementBoundaries = (__pyx_v_nValueArray->dimensions[0]);
34817 
34818  /* "cfemIntegrals.pyx":5531
34819  * np.ndarray nValueArray):
34820  * nExteriorElementBoundaries = nValueArray.shape[0]
34821  * nQuadraturePoints_elementBoundary = nValueArray.shape[1] # <<<<<<<<<<<<<<
34822  * cdef double output
34823  * output = cfluxDomainBoundaryIntegral(nExteriorElementBoundaries,
34824  */
34825  __pyx_v_nQuadraturePoints_elementBoundary = (__pyx_v_nValueArray->dimensions[1]);
34826 
34827  /* "cfemIntegrals.pyx":5533
34828  * nQuadraturePoints_elementBoundary = nValueArray.shape[1]
34829  * cdef double output
34830  * output = cfluxDomainBoundaryIntegral(nExteriorElementBoundaries, # <<<<<<<<<<<<<<
34831  * nElementBoundaries_owned,
34832  * nQuadraturePoints_elementBoundary,
34833  */
34834  __pyx_v_output = fluxDomainBoundaryIntegral(__pyx_v_nExteriorElementBoundaries, __pyx_v_nElementBoundaries_owned, __pyx_v_nQuadraturePoints_elementBoundary, ((int *)__pyx_v_flag->data), ((int *)__pyx_v_exteriorElementBoundariesArray->data), ((double *)__pyx_v_dS->data), ((double *)__pyx_v_nValueArray->data));
34835 
34836  /* "cfemIntegrals.pyx":5540
34837  * <double*> dS.data,
34838  * <double*> nValueArray.data)
34839  * return output # <<<<<<<<<<<<<<
34840  * def fluxDomainBoundaryIntegralFromVector(int nElementBoundaries_owned,
34841  * np.ndarray flag,
34842  */
34843  __Pyx_XDECREF(__pyx_r);
34844  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_output); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5540, __pyx_L1_error)
34845  __Pyx_GOTREF(__pyx_t_1);
34846  __pyx_r = __pyx_t_1;
34847  __pyx_t_1 = 0;
34848  goto __pyx_L0;
34849 
34850  /* "cfemIntegrals.pyx":5525
34851  * <double*> nValueArray.data)
34852  * return output
34853  * def fluxDomainBoundaryIntegral(int nElementBoundaries_owned, # <<<<<<<<<<<<<<
34854  * np.ndarray flag,
34855  * np.ndarray exteriorElementBoundariesArray,
34856  */
34857 
34858  /* function exit code */
34859  __pyx_L1_error:;
34860  __Pyx_XDECREF(__pyx_t_1);
34861  __Pyx_AddTraceback("cfemIntegrals.fluxDomainBoundaryIntegral", __pyx_clineno, __pyx_lineno, __pyx_filename);
34862  __pyx_r = NULL;
34863  __pyx_L0:;
34864  __Pyx_XGIVEREF(__pyx_r);
34865  __Pyx_RefNannyFinishContext();
34866  return __pyx_r;
34867 }
34868 
34869 /* "cfemIntegrals.pyx":5541
34870  * <double*> nValueArray.data)
34871  * return output
34872  * def fluxDomainBoundaryIntegralFromVector(int nElementBoundaries_owned, # <<<<<<<<<<<<<<
34873  * np.ndarray flag,
34874  * np.ndarray exteriorElementBoundaries,
34875  */
34876 
34877 /* Python wrapper */
34878 static PyObject *__pyx_pw_13cfemIntegrals_307fluxDomainBoundaryIntegralFromVector(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
34879 static PyMethodDef __pyx_mdef_13cfemIntegrals_307fluxDomainBoundaryIntegralFromVector = {"fluxDomainBoundaryIntegralFromVector", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_307fluxDomainBoundaryIntegralFromVector, METH_VARARGS|METH_KEYWORDS, 0};
34880 static PyObject *__pyx_pw_13cfemIntegrals_307fluxDomainBoundaryIntegralFromVector(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
34881  int __pyx_v_nElementBoundaries_owned;
34882  PyArrayObject *__pyx_v_flag = 0;
34883  PyArrayObject *__pyx_v_exteriorElementBoundaries = 0;
34884  PyArrayObject *__pyx_v_dS = 0;
34885  PyArrayObject *__pyx_v_nValueArray = 0;
34886  PyArrayObject *__pyx_v_normal = 0;
34887  int __pyx_lineno = 0;
34888  const char *__pyx_filename = NULL;
34889  int __pyx_clineno = 0;
34890  PyObject *__pyx_r = 0;
34891  __Pyx_RefNannyDeclarations
34892  __Pyx_RefNannySetupContext("fluxDomainBoundaryIntegralFromVector (wrapper)", 0);
34893  {
34894  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nElementBoundaries_owned,&__pyx_n_s_flag,&__pyx_n_s_exteriorElementBoundaries,&__pyx_n_s_dS,&__pyx_n_s_nValueArray,&__pyx_n_s_normal,0};
34895  PyObject* values[6] = {0,0,0,0,0,0};
34896  if (unlikely(__pyx_kwds)) {
34897  Py_ssize_t kw_args;
34898  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
34899  switch (pos_args) {
34900  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
34901  CYTHON_FALLTHROUGH;
34902  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
34903  CYTHON_FALLTHROUGH;
34904  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
34905  CYTHON_FALLTHROUGH;
34906  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
34907  CYTHON_FALLTHROUGH;
34908  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
34909  CYTHON_FALLTHROUGH;
34910  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
34911  CYTHON_FALLTHROUGH;
34912  case 0: break;
34913  default: goto __pyx_L5_argtuple_error;
34914  }
34915  kw_args = PyDict_Size(__pyx_kwds);
34916  switch (pos_args) {
34917  case 0:
34918  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nElementBoundaries_owned)) != 0)) kw_args--;
34919  else goto __pyx_L5_argtuple_error;
34920  CYTHON_FALLTHROUGH;
34921  case 1:
34922  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flag)) != 0)) kw_args--;
34923  else {
34924  __Pyx_RaiseArgtupleInvalid("fluxDomainBoundaryIntegralFromVector", 1, 6, 6, 1); __PYX_ERR(0, 5541, __pyx_L3_error)
34925  }
34926  CYTHON_FALLTHROUGH;
34927  case 2:
34928  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exteriorElementBoundaries)) != 0)) kw_args--;
34929  else {
34930  __Pyx_RaiseArgtupleInvalid("fluxDomainBoundaryIntegralFromVector", 1, 6, 6, 2); __PYX_ERR(0, 5541, __pyx_L3_error)
34931  }
34932  CYTHON_FALLTHROUGH;
34933  case 3:
34934  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dS)) != 0)) kw_args--;
34935  else {
34936  __Pyx_RaiseArgtupleInvalid("fluxDomainBoundaryIntegralFromVector", 1, 6, 6, 3); __PYX_ERR(0, 5541, __pyx_L3_error)
34937  }
34938  CYTHON_FALLTHROUGH;
34939  case 4:
34940  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nValueArray)) != 0)) kw_args--;
34941  else {
34942  __Pyx_RaiseArgtupleInvalid("fluxDomainBoundaryIntegralFromVector", 1, 6, 6, 4); __PYX_ERR(0, 5541, __pyx_L3_error)
34943  }
34944  CYTHON_FALLTHROUGH;
34945  case 5:
34946  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_normal)) != 0)) kw_args--;
34947  else {
34948  __Pyx_RaiseArgtupleInvalid("fluxDomainBoundaryIntegralFromVector", 1, 6, 6, 5); __PYX_ERR(0, 5541, __pyx_L3_error)
34949  }
34950  }
34951  if (unlikely(kw_args > 0)) {
34952  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fluxDomainBoundaryIntegralFromVector") < 0)) __PYX_ERR(0, 5541, __pyx_L3_error)
34953  }
34954  } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
34955  goto __pyx_L5_argtuple_error;
34956  } else {
34957  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
34958  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
34959  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
34960  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
34961  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
34962  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
34963  }
34964  __pyx_v_nElementBoundaries_owned = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_nElementBoundaries_owned == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5541, __pyx_L3_error)
34965  __pyx_v_flag = ((PyArrayObject *)values[1]);
34966  __pyx_v_exteriorElementBoundaries = ((PyArrayObject *)values[2]);
34967  __pyx_v_dS = ((PyArrayObject *)values[3]);
34968  __pyx_v_nValueArray = ((PyArrayObject *)values[4]);
34969  __pyx_v_normal = ((PyArrayObject *)values[5]);
34970  }
34971  goto __pyx_L4_argument_unpacking_done;
34972  __pyx_L5_argtuple_error:;
34973  __Pyx_RaiseArgtupleInvalid("fluxDomainBoundaryIntegralFromVector", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5541, __pyx_L3_error)
34974  __pyx_L3_error:;
34975  __Pyx_AddTraceback("cfemIntegrals.fluxDomainBoundaryIntegralFromVector", __pyx_clineno, __pyx_lineno, __pyx_filename);
34976  __Pyx_RefNannyFinishContext();
34977  return NULL;
34978  __pyx_L4_argument_unpacking_done:;
34979  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_flag), __pyx_ptype_5numpy_ndarray, 1, "flag", 0))) __PYX_ERR(0, 5542, __pyx_L1_error)
34980  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exteriorElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "exteriorElementBoundaries", 0))) __PYX_ERR(0, 5543, __pyx_L1_error)
34981  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dS), __pyx_ptype_5numpy_ndarray, 1, "dS", 0))) __PYX_ERR(0, 5544, __pyx_L1_error)
34982  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nValueArray), __pyx_ptype_5numpy_ndarray, 1, "nValueArray", 0))) __PYX_ERR(0, 5545, __pyx_L1_error)
34983  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_normal), __pyx_ptype_5numpy_ndarray, 1, "normal", 0))) __PYX_ERR(0, 5546, __pyx_L1_error)
34984  __pyx_r = __pyx_pf_13cfemIntegrals_306fluxDomainBoundaryIntegralFromVector(__pyx_self, __pyx_v_nElementBoundaries_owned, __pyx_v_flag, __pyx_v_exteriorElementBoundaries, __pyx_v_dS, __pyx_v_nValueArray, __pyx_v_normal);
34985 
34986  /* function exit code */
34987  goto __pyx_L0;
34988  __pyx_L1_error:;
34989  __pyx_r = NULL;
34990  __pyx_L0:;
34991  __Pyx_RefNannyFinishContext();
34992  return __pyx_r;
34993 }
34994 
34995 static PyObject *__pyx_pf_13cfemIntegrals_306fluxDomainBoundaryIntegralFromVector(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nElementBoundaries_owned, PyArrayObject *__pyx_v_flag, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_dS, PyArrayObject *__pyx_v_nValueArray, PyArrayObject *__pyx_v_normal) {
34996  double __pyx_v_output;
34997  int __pyx_v_nExteriorElementBoundaries;
34998  int __pyx_v_nQuadraturePoints_elementBoundary;
34999  int __pyx_v_nSpace;
35000  PyObject *__pyx_r = NULL;
35001  __Pyx_RefNannyDeclarations
35002  PyObject *__pyx_t_1 = NULL;
35003  int __pyx_lineno = 0;
35004  const char *__pyx_filename = NULL;
35005  int __pyx_clineno = 0;
35006  __Pyx_RefNannySetupContext("fluxDomainBoundaryIntegralFromVector", 0);
35007 
35008  /* "cfemIntegrals.pyx":5548
35009  * np.ndarray normal):
35010  * cdef double output
35011  * cdef int nExteriorElementBoundaries = normal.shape[0] # <<<<<<<<<<<<<<
35012  * cdef int nQuadraturePoints_elementBoundary = normal.shape[1]
35013  * cdef int nSpace = normal.shape[2]
35014  */
35015  __pyx_v_nExteriorElementBoundaries = (__pyx_v_normal->dimensions[0]);
35016 
35017  /* "cfemIntegrals.pyx":5549
35018  * cdef double output
35019  * cdef int nExteriorElementBoundaries = normal.shape[0]
35020  * cdef int nQuadraturePoints_elementBoundary = normal.shape[1] # <<<<<<<<<<<<<<
35021  * cdef int nSpace = normal.shape[2]
35022  * output = cfluxDomainBoundaryIntegralFromVector(nExteriorElementBoundaries,
35023  */
35024  __pyx_v_nQuadraturePoints_elementBoundary = (__pyx_v_normal->dimensions[1]);
35025 
35026  /* "cfemIntegrals.pyx":5550
35027  * cdef int nExteriorElementBoundaries = normal.shape[0]
35028  * cdef int nQuadraturePoints_elementBoundary = normal.shape[1]
35029  * cdef int nSpace = normal.shape[2] # <<<<<<<<<<<<<<
35030  * output = cfluxDomainBoundaryIntegralFromVector(nExteriorElementBoundaries,
35031  * nElementBoundaries_owned,
35032  */
35033  __pyx_v_nSpace = (__pyx_v_normal->dimensions[2]);
35034 
35035  /* "cfemIntegrals.pyx":5551
35036  * cdef int nQuadraturePoints_elementBoundary = normal.shape[1]
35037  * cdef int nSpace = normal.shape[2]
35038  * output = cfluxDomainBoundaryIntegralFromVector(nExteriorElementBoundaries, # <<<<<<<<<<<<<<
35039  * nElementBoundaries_owned,
35040  * nQuadraturePoints_elementBoundary,
35041  */
35042  __pyx_v_output = fluxDomainBoundaryIntegralFromVector(__pyx_v_nExteriorElementBoundaries, __pyx_v_nElementBoundaries_owned, __pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nSpace, ((int *)__pyx_v_flag->data), ((int *)__pyx_v_exteriorElementBoundaries->data), ((double *)__pyx_v_dS->data), ((double *)__pyx_v_nValueArray->data), ((double *)__pyx_v_normal->data));
35043 
35044  /* "cfemIntegrals.pyx":5560
35045  * <double*> nValueArray.data,
35046  * <double*> normal.data)
35047  * return output # <<<<<<<<<<<<<<
35048  * def copyExteriorElementBoundaryValuesFromElementBoundaryValues(np.ndarray exteriorElementBoundaries,
35049  * np.ndarray elementBoundaryElements,
35050  */
35051  __Pyx_XDECREF(__pyx_r);
35052  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_output); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5560, __pyx_L1_error)
35053  __Pyx_GOTREF(__pyx_t_1);
35054  __pyx_r = __pyx_t_1;
35055  __pyx_t_1 = 0;
35056  goto __pyx_L0;
35057 
35058  /* "cfemIntegrals.pyx":5541
35059  * <double*> nValueArray.data)
35060  * return output
35061  * def fluxDomainBoundaryIntegralFromVector(int nElementBoundaries_owned, # <<<<<<<<<<<<<<
35062  * np.ndarray flag,
35063  * np.ndarray exteriorElementBoundaries,
35064  */
35065 
35066  /* function exit code */
35067  __pyx_L1_error:;
35068  __Pyx_XDECREF(__pyx_t_1);
35069  __Pyx_AddTraceback("cfemIntegrals.fluxDomainBoundaryIntegralFromVector", __pyx_clineno, __pyx_lineno, __pyx_filename);
35070  __pyx_r = NULL;
35071  __pyx_L0:;
35072  __Pyx_XGIVEREF(__pyx_r);
35073  __Pyx_RefNannyFinishContext();
35074  return __pyx_r;
35075 }
35076 
35077 /* "cfemIntegrals.pyx":5561
35078  * <double*> normal.data)
35079  * return output
35080  * def copyExteriorElementBoundaryValuesFromElementBoundaryValues(np.ndarray exteriorElementBoundaries, # <<<<<<<<<<<<<<
35081  * np.ndarray elementBoundaryElements,
35082  * np.ndarray elementBoundaryLocalElementBoundaries,
35083  */
35084 
35085 /* Python wrapper */
35086 static PyObject *__pyx_pw_13cfemIntegrals_309copyExteriorElementBoundaryValuesFromElementBoundaryValues(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
35087 static PyMethodDef __pyx_mdef_13cfemIntegrals_309copyExteriorElementBoundaryValuesFromElementBoundaryValues = {"copyExteriorElementBoundaryValuesFromElementBoundaryValues", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_309copyExteriorElementBoundaryValuesFromElementBoundaryValues, METH_VARARGS|METH_KEYWORDS, 0};
35088 static PyObject *__pyx_pw_13cfemIntegrals_309copyExteriorElementBoundaryValuesFromElementBoundaryValues(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
35089  PyArrayObject *__pyx_v_exteriorElementBoundaries = 0;
35090  PyArrayObject *__pyx_v_elementBoundaryElements = 0;
35091  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries = 0;
35092  PyArrayObject *__pyx_v_ebq_val = 0;
35093  PyArrayObject *__pyx_v_ebqe_val = 0;
35094  int __pyx_lineno = 0;
35095  const char *__pyx_filename = NULL;
35096  int __pyx_clineno = 0;
35097  PyObject *__pyx_r = 0;
35098  __Pyx_RefNannyDeclarations
35099  __Pyx_RefNannySetupContext("copyExteriorElementBoundaryValuesFromElementBoundaryValues (wrapper)", 0);
35100  {
35101  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exteriorElementBoundaries,&__pyx_n_s_elementBoundaryElements,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_ebq_val,&__pyx_n_s_ebqe_val,0};
35102  PyObject* values[5] = {0,0,0,0,0};
35103  if (unlikely(__pyx_kwds)) {
35104  Py_ssize_t kw_args;
35105  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
35106  switch (pos_args) {
35107  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
35108  CYTHON_FALLTHROUGH;
35109  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
35110  CYTHON_FALLTHROUGH;
35111  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
35112  CYTHON_FALLTHROUGH;
35113  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
35114  CYTHON_FALLTHROUGH;
35115  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
35116  CYTHON_FALLTHROUGH;
35117  case 0: break;
35118  default: goto __pyx_L5_argtuple_error;
35119  }
35120  kw_args = PyDict_Size(__pyx_kwds);
35121  switch (pos_args) {
35122  case 0:
35123  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exteriorElementBoundaries)) != 0)) kw_args--;
35124  else goto __pyx_L5_argtuple_error;
35125  CYTHON_FALLTHROUGH;
35126  case 1:
35127  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElements)) != 0)) kw_args--;
35128  else {
35129  __Pyx_RaiseArgtupleInvalid("copyExteriorElementBoundaryValuesFromElementBoundaryValues", 1, 5, 5, 1); __PYX_ERR(0, 5561, __pyx_L3_error)
35130  }
35131  CYTHON_FALLTHROUGH;
35132  case 2:
35133  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
35134  else {
35135  __Pyx_RaiseArgtupleInvalid("copyExteriorElementBoundaryValuesFromElementBoundaryValues", 1, 5, 5, 2); __PYX_ERR(0, 5561, __pyx_L3_error)
35136  }
35137  CYTHON_FALLTHROUGH;
35138  case 3:
35139  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ebq_val)) != 0)) kw_args--;
35140  else {
35141  __Pyx_RaiseArgtupleInvalid("copyExteriorElementBoundaryValuesFromElementBoundaryValues", 1, 5, 5, 3); __PYX_ERR(0, 5561, __pyx_L3_error)
35142  }
35143  CYTHON_FALLTHROUGH;
35144  case 4:
35145  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ebqe_val)) != 0)) kw_args--;
35146  else {
35147  __Pyx_RaiseArgtupleInvalid("copyExteriorElementBoundaryValuesFromElementBoundaryValues", 1, 5, 5, 4); __PYX_ERR(0, 5561, __pyx_L3_error)
35148  }
35149  }
35150  if (unlikely(kw_args > 0)) {
35151  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "copyExteriorElementBoundaryValuesFromElementBoundaryValues") < 0)) __PYX_ERR(0, 5561, __pyx_L3_error)
35152  }
35153  } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
35154  goto __pyx_L5_argtuple_error;
35155  } else {
35156  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
35157  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
35158  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
35159  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
35160  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
35161  }
35162  __pyx_v_exteriorElementBoundaries = ((PyArrayObject *)values[0]);
35163  __pyx_v_elementBoundaryElements = ((PyArrayObject *)values[1]);
35164  __pyx_v_elementBoundaryLocalElementBoundaries = ((PyArrayObject *)values[2]);
35165  __pyx_v_ebq_val = ((PyArrayObject *)values[3]);
35166  __pyx_v_ebqe_val = ((PyArrayObject *)values[4]);
35167  }
35168  goto __pyx_L4_argument_unpacking_done;
35169  __pyx_L5_argtuple_error:;
35170  __Pyx_RaiseArgtupleInvalid("copyExteriorElementBoundaryValuesFromElementBoundaryValues", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5561, __pyx_L3_error)
35171  __pyx_L3_error:;
35172  __Pyx_AddTraceback("cfemIntegrals.copyExteriorElementBoundaryValuesFromElementBoundaryValues", __pyx_clineno, __pyx_lineno, __pyx_filename);
35173  __Pyx_RefNannyFinishContext();
35174  return NULL;
35175  __pyx_L4_argument_unpacking_done:;
35176  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exteriorElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "exteriorElementBoundaries", 0))) __PYX_ERR(0, 5561, __pyx_L1_error)
35177  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElements), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElements", 0))) __PYX_ERR(0, 5562, __pyx_L1_error)
35178  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundaries", 0))) __PYX_ERR(0, 5563, __pyx_L1_error)
35179  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ebq_val), __pyx_ptype_5numpy_ndarray, 1, "ebq_val", 0))) __PYX_ERR(0, 5564, __pyx_L1_error)
35180  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ebqe_val), __pyx_ptype_5numpy_ndarray, 1, "ebqe_val", 0))) __PYX_ERR(0, 5565, __pyx_L1_error)
35181  __pyx_r = __pyx_pf_13cfemIntegrals_308copyExteriorElementBoundaryValuesFromElementBoundaryValues(__pyx_self, __pyx_v_exteriorElementBoundaries, __pyx_v_elementBoundaryElements, __pyx_v_elementBoundaryLocalElementBoundaries, __pyx_v_ebq_val, __pyx_v_ebqe_val);
35182 
35183  /* function exit code */
35184  goto __pyx_L0;
35185  __pyx_L1_error:;
35186  __pyx_r = NULL;
35187  __pyx_L0:;
35188  __Pyx_RefNannyFinishContext();
35189  return __pyx_r;
35190 }
35191 
35192 static PyObject *__pyx_pf_13cfemIntegrals_308copyExteriorElementBoundaryValuesFromElementBoundaryValues(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_ebq_val, PyArrayObject *__pyx_v_ebqe_val) {
35193  int __pyx_v_nExteriorElementBoundaries_global;
35194  int __pyx_v_nElements_global;
35195  int __pyx_v_nElementBoundaries_element;
35196  int __pyx_v_nQuadraturePoints_elementBoundary;
35197  int __pyx_v_nValuesPerQuadraturePoint;
35198  int __pyx_v_nd;
35199  long __pyx_v_i;
35200  PyObject *__pyx_r = NULL;
35201  __Pyx_RefNannyDeclarations
35202  int __pyx_t_1;
35203  int __pyx_t_2;
35204  int __pyx_t_3;
35205  long __pyx_t_4;
35206  __Pyx_RefNannySetupContext("copyExteriorElementBoundaryValuesFromElementBoundaryValues", 0);
35207 
35208  /* "cfemIntegrals.pyx":5566
35209  * np.ndarray ebq_val,
35210  * np.ndarray ebqe_val):
35211  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundaries.shape[0] # <<<<<<<<<<<<<<
35212  * cdef int nElements_global = ebq_val.shape[0]
35213  * cdef int nElementBoundaries_element = ebq_val.shape[1]
35214  */
35215  __pyx_v_nExteriorElementBoundaries_global = (__pyx_v_exteriorElementBoundaries->dimensions[0]);
35216 
35217  /* "cfemIntegrals.pyx":5567
35218  * np.ndarray ebqe_val):
35219  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundaries.shape[0]
35220  * cdef int nElements_global = ebq_val.shape[0] # <<<<<<<<<<<<<<
35221  * cdef int nElementBoundaries_element = ebq_val.shape[1]
35222  * cdef int nQuadraturePoints_elementBoundary = ebq_val.shape[2]
35223  */
35224  __pyx_v_nElements_global = (__pyx_v_ebq_val->dimensions[0]);
35225 
35226  /* "cfemIntegrals.pyx":5568
35227  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundaries.shape[0]
35228  * cdef int nElements_global = ebq_val.shape[0]
35229  * cdef int nElementBoundaries_element = ebq_val.shape[1] # <<<<<<<<<<<<<<
35230  * cdef int nQuadraturePoints_elementBoundary = ebq_val.shape[2]
35231  * cdef int nValuesPerQuadraturePoint = 1
35232  */
35233  __pyx_v_nElementBoundaries_element = (__pyx_v_ebq_val->dimensions[1]);
35234 
35235  /* "cfemIntegrals.pyx":5569
35236  * cdef int nElements_global = ebq_val.shape[0]
35237  * cdef int nElementBoundaries_element = ebq_val.shape[1]
35238  * cdef int nQuadraturePoints_elementBoundary = ebq_val.shape[2] # <<<<<<<<<<<<<<
35239  * cdef int nValuesPerQuadraturePoint = 1
35240  * cdef int nd = ebq_val.ndim
35241  */
35242  __pyx_v_nQuadraturePoints_elementBoundary = (__pyx_v_ebq_val->dimensions[2]);
35243 
35244  /* "cfemIntegrals.pyx":5570
35245  * cdef int nElementBoundaries_element = ebq_val.shape[1]
35246  * cdef int nQuadraturePoints_elementBoundary = ebq_val.shape[2]
35247  * cdef int nValuesPerQuadraturePoint = 1 # <<<<<<<<<<<<<<
35248  * cdef int nd = ebq_val.ndim
35249  * if nd > 3:
35250  */
35251  __pyx_v_nValuesPerQuadraturePoint = 1;
35252 
35253  /* "cfemIntegrals.pyx":5571
35254  * cdef int nQuadraturePoints_elementBoundary = ebq_val.shape[2]
35255  * cdef int nValuesPerQuadraturePoint = 1
35256  * cdef int nd = ebq_val.ndim # <<<<<<<<<<<<<<
35257  * if nd > 3:
35258  * for i in range(3,nd):
35259  */
35260  __pyx_t_1 = __pyx_v_ebq_val->nd;
35261  __pyx_v_nd = __pyx_t_1;
35262 
35263  /* "cfemIntegrals.pyx":5572
35264  * cdef int nValuesPerQuadraturePoint = 1
35265  * cdef int nd = ebq_val.ndim
35266  * if nd > 3: # <<<<<<<<<<<<<<
35267  * for i in range(3,nd):
35268  * nValuesPerQuadraturePoint *= ebq_val.shape[i]
35269  */
35270  __pyx_t_2 = ((__pyx_v_nd > 3) != 0);
35271  if (__pyx_t_2) {
35272 
35273  /* "cfemIntegrals.pyx":5573
35274  * cdef int nd = ebq_val.ndim
35275  * if nd > 3:
35276  * for i in range(3,nd): # <<<<<<<<<<<<<<
35277  * nValuesPerQuadraturePoint *= ebq_val.shape[i]
35278  * ccopyExteriorElementBoundaryValuesFromElementBoundaryValues(nExteriorElementBoundaries_global,
35279  */
35280  __pyx_t_1 = __pyx_v_nd;
35281  __pyx_t_3 = __pyx_t_1;
35282  for (__pyx_t_4 = 3; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
35283  __pyx_v_i = __pyx_t_4;
35284 
35285  /* "cfemIntegrals.pyx":5574
35286  * if nd > 3:
35287  * for i in range(3,nd):
35288  * nValuesPerQuadraturePoint *= ebq_val.shape[i] # <<<<<<<<<<<<<<
35289  * ccopyExteriorElementBoundaryValuesFromElementBoundaryValues(nExteriorElementBoundaries_global,
35290  * nElements_global,
35291  */
35292  __pyx_v_nValuesPerQuadraturePoint = (__pyx_v_nValuesPerQuadraturePoint * (__pyx_v_ebq_val->dimensions[__pyx_v_i]));
35293  }
35294 
35295  /* "cfemIntegrals.pyx":5572
35296  * cdef int nValuesPerQuadraturePoint = 1
35297  * cdef int nd = ebq_val.ndim
35298  * if nd > 3: # <<<<<<<<<<<<<<
35299  * for i in range(3,nd):
35300  * nValuesPerQuadraturePoint *= ebq_val.shape[i]
35301  */
35302  }
35303 
35304  /* "cfemIntegrals.pyx":5575
35305  * for i in range(3,nd):
35306  * nValuesPerQuadraturePoint *= ebq_val.shape[i]
35307  * ccopyExteriorElementBoundaryValuesFromElementBoundaryValues(nExteriorElementBoundaries_global, # <<<<<<<<<<<<<<
35308  * nElements_global,
35309  * nElementBoundaries_element,
35310  */
35311  copyExteriorElementBoundaryValuesFromElementBoundaryValues(__pyx_v_nExteriorElementBoundaries_global, __pyx_v_nElements_global, __pyx_v_nElementBoundaries_element, __pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nValuesPerQuadraturePoint, ((int *)__pyx_v_exteriorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), ((double *)__pyx_v_ebq_val->data), ((double *)__pyx_v_ebqe_val->data));
35312 
35313  /* "cfemIntegrals.pyx":5561
35314  * <double*> normal.data)
35315  * return output
35316  * def copyExteriorElementBoundaryValuesFromElementBoundaryValues(np.ndarray exteriorElementBoundaries, # <<<<<<<<<<<<<<
35317  * np.ndarray elementBoundaryElements,
35318  * np.ndarray elementBoundaryLocalElementBoundaries,
35319  */
35320 
35321  /* function exit code */
35322  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
35323  __Pyx_XGIVEREF(__pyx_r);
35324  __Pyx_RefNannyFinishContext();
35325  return __pyx_r;
35326 }
35327 
35328 /* "cfemIntegrals.pyx":5585
35329  * <double*> ebq_val.data,
35330  * <double*> ebqe_val.data)
35331  * def copyExteriorElementBoundaryValuesToElementBoundaryValues(np.ndarray exteriorElementBoundaries, # <<<<<<<<<<<<<<
35332  * np.ndarray elementBoundaryElements,
35333  * np.ndarray elementBoundaryLocalElementBoundaries,
35334  */
35335 
35336 /* Python wrapper */
35337 static PyObject *__pyx_pw_13cfemIntegrals_311copyExteriorElementBoundaryValuesToElementBoundaryValues(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
35338 static PyMethodDef __pyx_mdef_13cfemIntegrals_311copyExteriorElementBoundaryValuesToElementBoundaryValues = {"copyExteriorElementBoundaryValuesToElementBoundaryValues", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_311copyExteriorElementBoundaryValuesToElementBoundaryValues, METH_VARARGS|METH_KEYWORDS, 0};
35339 static PyObject *__pyx_pw_13cfemIntegrals_311copyExteriorElementBoundaryValuesToElementBoundaryValues(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
35340  PyArrayObject *__pyx_v_exteriorElementBoundaries = 0;
35341  PyArrayObject *__pyx_v_elementBoundaryElements = 0;
35342  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries = 0;
35343  PyArrayObject *__pyx_v_ebqe_val = 0;
35344  PyArrayObject *__pyx_v_ebq_val = 0;
35345  int __pyx_lineno = 0;
35346  const char *__pyx_filename = NULL;
35347  int __pyx_clineno = 0;
35348  PyObject *__pyx_r = 0;
35349  __Pyx_RefNannyDeclarations
35350  __Pyx_RefNannySetupContext("copyExteriorElementBoundaryValuesToElementBoundaryValues (wrapper)", 0);
35351  {
35352  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exteriorElementBoundaries,&__pyx_n_s_elementBoundaryElements,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_ebqe_val,&__pyx_n_s_ebq_val,0};
35353  PyObject* values[5] = {0,0,0,0,0};
35354  if (unlikely(__pyx_kwds)) {
35355  Py_ssize_t kw_args;
35356  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
35357  switch (pos_args) {
35358  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
35359  CYTHON_FALLTHROUGH;
35360  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
35361  CYTHON_FALLTHROUGH;
35362  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
35363  CYTHON_FALLTHROUGH;
35364  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
35365  CYTHON_FALLTHROUGH;
35366  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
35367  CYTHON_FALLTHROUGH;
35368  case 0: break;
35369  default: goto __pyx_L5_argtuple_error;
35370  }
35371  kw_args = PyDict_Size(__pyx_kwds);
35372  switch (pos_args) {
35373  case 0:
35374  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exteriorElementBoundaries)) != 0)) kw_args--;
35375  else goto __pyx_L5_argtuple_error;
35376  CYTHON_FALLTHROUGH;
35377  case 1:
35378  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElements)) != 0)) kw_args--;
35379  else {
35380  __Pyx_RaiseArgtupleInvalid("copyExteriorElementBoundaryValuesToElementBoundaryValues", 1, 5, 5, 1); __PYX_ERR(0, 5585, __pyx_L3_error)
35381  }
35382  CYTHON_FALLTHROUGH;
35383  case 2:
35384  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
35385  else {
35386  __Pyx_RaiseArgtupleInvalid("copyExteriorElementBoundaryValuesToElementBoundaryValues", 1, 5, 5, 2); __PYX_ERR(0, 5585, __pyx_L3_error)
35387  }
35388  CYTHON_FALLTHROUGH;
35389  case 3:
35390  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ebqe_val)) != 0)) kw_args--;
35391  else {
35392  __Pyx_RaiseArgtupleInvalid("copyExteriorElementBoundaryValuesToElementBoundaryValues", 1, 5, 5, 3); __PYX_ERR(0, 5585, __pyx_L3_error)
35393  }
35394  CYTHON_FALLTHROUGH;
35395  case 4:
35396  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ebq_val)) != 0)) kw_args--;
35397  else {
35398  __Pyx_RaiseArgtupleInvalid("copyExteriorElementBoundaryValuesToElementBoundaryValues", 1, 5, 5, 4); __PYX_ERR(0, 5585, __pyx_L3_error)
35399  }
35400  }
35401  if (unlikely(kw_args > 0)) {
35402  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "copyExteriorElementBoundaryValuesToElementBoundaryValues") < 0)) __PYX_ERR(0, 5585, __pyx_L3_error)
35403  }
35404  } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
35405  goto __pyx_L5_argtuple_error;
35406  } else {
35407  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
35408  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
35409  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
35410  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
35411  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
35412  }
35413  __pyx_v_exteriorElementBoundaries = ((PyArrayObject *)values[0]);
35414  __pyx_v_elementBoundaryElements = ((PyArrayObject *)values[1]);
35415  __pyx_v_elementBoundaryLocalElementBoundaries = ((PyArrayObject *)values[2]);
35416  __pyx_v_ebqe_val = ((PyArrayObject *)values[3]);
35417  __pyx_v_ebq_val = ((PyArrayObject *)values[4]);
35418  }
35419  goto __pyx_L4_argument_unpacking_done;
35420  __pyx_L5_argtuple_error:;
35421  __Pyx_RaiseArgtupleInvalid("copyExteriorElementBoundaryValuesToElementBoundaryValues", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5585, __pyx_L3_error)
35422  __pyx_L3_error:;
35423  __Pyx_AddTraceback("cfemIntegrals.copyExteriorElementBoundaryValuesToElementBoundaryValues", __pyx_clineno, __pyx_lineno, __pyx_filename);
35424  __Pyx_RefNannyFinishContext();
35425  return NULL;
35426  __pyx_L4_argument_unpacking_done:;
35427  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exteriorElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "exteriorElementBoundaries", 0))) __PYX_ERR(0, 5585, __pyx_L1_error)
35428  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElements), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElements", 0))) __PYX_ERR(0, 5586, __pyx_L1_error)
35429  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundaries", 0))) __PYX_ERR(0, 5587, __pyx_L1_error)
35430  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ebqe_val), __pyx_ptype_5numpy_ndarray, 1, "ebqe_val", 0))) __PYX_ERR(0, 5588, __pyx_L1_error)
35431  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ebq_val), __pyx_ptype_5numpy_ndarray, 1, "ebq_val", 0))) __PYX_ERR(0, 5589, __pyx_L1_error)
35432  __pyx_r = __pyx_pf_13cfemIntegrals_310copyExteriorElementBoundaryValuesToElementBoundaryValues(__pyx_self, __pyx_v_exteriorElementBoundaries, __pyx_v_elementBoundaryElements, __pyx_v_elementBoundaryLocalElementBoundaries, __pyx_v_ebqe_val, __pyx_v_ebq_val);
35433 
35434  /* function exit code */
35435  goto __pyx_L0;
35436  __pyx_L1_error:;
35437  __pyx_r = NULL;
35438  __pyx_L0:;
35439  __Pyx_RefNannyFinishContext();
35440  return __pyx_r;
35441 }
35442 
35443 static PyObject *__pyx_pf_13cfemIntegrals_310copyExteriorElementBoundaryValuesToElementBoundaryValues(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_ebqe_val, PyArrayObject *__pyx_v_ebq_val) {
35444  int __pyx_v_nExteriorElementBoundaries_global;
35445  int __pyx_v_nElements_global;
35446  int __pyx_v_nElementBoundaries_element;
35447  int __pyx_v_nQuadraturePoints_elementBoundary;
35448  int __pyx_v_nValuesPerQuadraturePoint;
35449  int __pyx_v_nd;
35450  long __pyx_v_i;
35451  PyObject *__pyx_r = NULL;
35452  __Pyx_RefNannyDeclarations
35453  int __pyx_t_1;
35454  int __pyx_t_2;
35455  int __pyx_t_3;
35456  long __pyx_t_4;
35457  __Pyx_RefNannySetupContext("copyExteriorElementBoundaryValuesToElementBoundaryValues", 0);
35458 
35459  /* "cfemIntegrals.pyx":5590
35460  * np.ndarray ebqe_val,
35461  * np.ndarray ebq_val):
35462  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundaries.shape[0] # <<<<<<<<<<<<<<
35463  * cdef int nElements_global = ebq_val.shape[0]
35464  * cdef int nElementBoundaries_element = ebq_val.shape[1]
35465  */
35466  __pyx_v_nExteriorElementBoundaries_global = (__pyx_v_exteriorElementBoundaries->dimensions[0]);
35467 
35468  /* "cfemIntegrals.pyx":5591
35469  * np.ndarray ebq_val):
35470  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundaries.shape[0]
35471  * cdef int nElements_global = ebq_val.shape[0] # <<<<<<<<<<<<<<
35472  * cdef int nElementBoundaries_element = ebq_val.shape[1]
35473  * cdef int nQuadraturePoints_elementBoundary = ebq_val.shape[2]
35474  */
35475  __pyx_v_nElements_global = (__pyx_v_ebq_val->dimensions[0]);
35476 
35477  /* "cfemIntegrals.pyx":5592
35478  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundaries.shape[0]
35479  * cdef int nElements_global = ebq_val.shape[0]
35480  * cdef int nElementBoundaries_element = ebq_val.shape[1] # <<<<<<<<<<<<<<
35481  * cdef int nQuadraturePoints_elementBoundary = ebq_val.shape[2]
35482  * cdef int nValuesPerQuadraturePoint = 1
35483  */
35484  __pyx_v_nElementBoundaries_element = (__pyx_v_ebq_val->dimensions[1]);
35485 
35486  /* "cfemIntegrals.pyx":5593
35487  * cdef int nElements_global = ebq_val.shape[0]
35488  * cdef int nElementBoundaries_element = ebq_val.shape[1]
35489  * cdef int nQuadraturePoints_elementBoundary = ebq_val.shape[2] # <<<<<<<<<<<<<<
35490  * cdef int nValuesPerQuadraturePoint = 1
35491  * cdef int nd = ebq_val.ndim
35492  */
35493  __pyx_v_nQuadraturePoints_elementBoundary = (__pyx_v_ebq_val->dimensions[2]);
35494 
35495  /* "cfemIntegrals.pyx":5594
35496  * cdef int nElementBoundaries_element = ebq_val.shape[1]
35497  * cdef int nQuadraturePoints_elementBoundary = ebq_val.shape[2]
35498  * cdef int nValuesPerQuadraturePoint = 1 # <<<<<<<<<<<<<<
35499  * cdef int nd = ebq_val.ndim
35500  * if nd > 3:
35501  */
35502  __pyx_v_nValuesPerQuadraturePoint = 1;
35503 
35504  /* "cfemIntegrals.pyx":5595
35505  * cdef int nQuadraturePoints_elementBoundary = ebq_val.shape[2]
35506  * cdef int nValuesPerQuadraturePoint = 1
35507  * cdef int nd = ebq_val.ndim # <<<<<<<<<<<<<<
35508  * if nd > 3:
35509  * for i in range(3,nd):
35510  */
35511  __pyx_t_1 = __pyx_v_ebq_val->nd;
35512  __pyx_v_nd = __pyx_t_1;
35513 
35514  /* "cfemIntegrals.pyx":5596
35515  * cdef int nValuesPerQuadraturePoint = 1
35516  * cdef int nd = ebq_val.ndim
35517  * if nd > 3: # <<<<<<<<<<<<<<
35518  * for i in range(3,nd):
35519  * nValuesPerQuadraturePoint *= ebq_val.shape[i]
35520  */
35521  __pyx_t_2 = ((__pyx_v_nd > 3) != 0);
35522  if (__pyx_t_2) {
35523 
35524  /* "cfemIntegrals.pyx":5597
35525  * cdef int nd = ebq_val.ndim
35526  * if nd > 3:
35527  * for i in range(3,nd): # <<<<<<<<<<<<<<
35528  * nValuesPerQuadraturePoint *= ebq_val.shape[i]
35529  * ccopyExteriorElementBoundaryValuesToElementBoundaryValues(nExteriorElementBoundaries_global,
35530  */
35531  __pyx_t_1 = __pyx_v_nd;
35532  __pyx_t_3 = __pyx_t_1;
35533  for (__pyx_t_4 = 3; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
35534  __pyx_v_i = __pyx_t_4;
35535 
35536  /* "cfemIntegrals.pyx":5598
35537  * if nd > 3:
35538  * for i in range(3,nd):
35539  * nValuesPerQuadraturePoint *= ebq_val.shape[i] # <<<<<<<<<<<<<<
35540  * ccopyExteriorElementBoundaryValuesToElementBoundaryValues(nExteriorElementBoundaries_global,
35541  * nElements_global,
35542  */
35543  __pyx_v_nValuesPerQuadraturePoint = (__pyx_v_nValuesPerQuadraturePoint * (__pyx_v_ebq_val->dimensions[__pyx_v_i]));
35544  }
35545 
35546  /* "cfemIntegrals.pyx":5596
35547  * cdef int nValuesPerQuadraturePoint = 1
35548  * cdef int nd = ebq_val.ndim
35549  * if nd > 3: # <<<<<<<<<<<<<<
35550  * for i in range(3,nd):
35551  * nValuesPerQuadraturePoint *= ebq_val.shape[i]
35552  */
35553  }
35554 
35555  /* "cfemIntegrals.pyx":5599
35556  * for i in range(3,nd):
35557  * nValuesPerQuadraturePoint *= ebq_val.shape[i]
35558  * ccopyExteriorElementBoundaryValuesToElementBoundaryValues(nExteriorElementBoundaries_global, # <<<<<<<<<<<<<<
35559  * nElements_global,
35560  * nElementBoundaries_element,
35561  */
35562  copyExteriorElementBoundaryValuesToElementBoundaryValues(__pyx_v_nExteriorElementBoundaries_global, __pyx_v_nElements_global, __pyx_v_nElementBoundaries_element, __pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nValuesPerQuadraturePoint, ((int *)__pyx_v_exteriorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), ((double *)__pyx_v_ebqe_val->data), ((double *)__pyx_v_ebq_val->data));
35563 
35564  /* "cfemIntegrals.pyx":5585
35565  * <double*> ebq_val.data,
35566  * <double*> ebqe_val.data)
35567  * def copyExteriorElementBoundaryValuesToElementBoundaryValues(np.ndarray exteriorElementBoundaries, # <<<<<<<<<<<<<<
35568  * np.ndarray elementBoundaryElements,
35569  * np.ndarray elementBoundaryLocalElementBoundaries,
35570  */
35571 
35572  /* function exit code */
35573  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
35574  __Pyx_XGIVEREF(__pyx_r);
35575  __Pyx_RefNannyFinishContext();
35576  return __pyx_r;
35577 }
35578 
35579 /* "cfemIntegrals.pyx":5609
35580  * <double*> ebqe_val.data,
35581  * <double*> ebq_val.data)
35582  * def copyExteriorElementBoundaryValuesToGlobalElementBoundaryValues(np.ndarray exteriorElementBoundaries, # <<<<<<<<<<<<<<
35583  * np.ndarray elementBoundaryElements,
35584  * np.ndarray elementBoundaryLocalElementBoundaries,
35585  */
35586 
35587 /* Python wrapper */
35588 static PyObject *__pyx_pw_13cfemIntegrals_313copyExteriorElementBoundaryValuesToGlobalElementBoundaryValues(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
35589 static PyMethodDef __pyx_mdef_13cfemIntegrals_313copyExteriorElementBoundaryValuesToGlobalElementBoundaryValues = {"copyExteriorElementBoundaryValuesToGlobalElementBoundaryValues", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_313copyExteriorElementBoundaryValuesToGlobalElementBoundaryValues, METH_VARARGS|METH_KEYWORDS, 0};
35590 static PyObject *__pyx_pw_13cfemIntegrals_313copyExteriorElementBoundaryValuesToGlobalElementBoundaryValues(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
35591  PyArrayObject *__pyx_v_exteriorElementBoundaries = 0;
35592  PyArrayObject *__pyx_v_elementBoundaryElements = 0;
35593  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries = 0;
35594  PyArrayObject *__pyx_v_ebqe_val = 0;
35595  PyArrayObject *__pyx_v_ebq_global_val = 0;
35596  int __pyx_lineno = 0;
35597  const char *__pyx_filename = NULL;
35598  int __pyx_clineno = 0;
35599  PyObject *__pyx_r = 0;
35600  __Pyx_RefNannyDeclarations
35601  __Pyx_RefNannySetupContext("copyExteriorElementBoundaryValuesToGlobalElementBoundaryValues (wrapper)", 0);
35602  {
35603  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exteriorElementBoundaries,&__pyx_n_s_elementBoundaryElements,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_ebqe_val,&__pyx_n_s_ebq_global_val,0};
35604  PyObject* values[5] = {0,0,0,0,0};
35605  if (unlikely(__pyx_kwds)) {
35606  Py_ssize_t kw_args;
35607  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
35608  switch (pos_args) {
35609  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
35610  CYTHON_FALLTHROUGH;
35611  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
35612  CYTHON_FALLTHROUGH;
35613  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
35614  CYTHON_FALLTHROUGH;
35615  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
35616  CYTHON_FALLTHROUGH;
35617  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
35618  CYTHON_FALLTHROUGH;
35619  case 0: break;
35620  default: goto __pyx_L5_argtuple_error;
35621  }
35622  kw_args = PyDict_Size(__pyx_kwds);
35623  switch (pos_args) {
35624  case 0:
35625  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exteriorElementBoundaries)) != 0)) kw_args--;
35626  else goto __pyx_L5_argtuple_error;
35627  CYTHON_FALLTHROUGH;
35628  case 1:
35629  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElements)) != 0)) kw_args--;
35630  else {
35631  __Pyx_RaiseArgtupleInvalid("copyExteriorElementBoundaryValuesToGlobalElementBoundaryValues", 1, 5, 5, 1); __PYX_ERR(0, 5609, __pyx_L3_error)
35632  }
35633  CYTHON_FALLTHROUGH;
35634  case 2:
35635  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
35636  else {
35637  __Pyx_RaiseArgtupleInvalid("copyExteriorElementBoundaryValuesToGlobalElementBoundaryValues", 1, 5, 5, 2); __PYX_ERR(0, 5609, __pyx_L3_error)
35638  }
35639  CYTHON_FALLTHROUGH;
35640  case 3:
35641  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ebqe_val)) != 0)) kw_args--;
35642  else {
35643  __Pyx_RaiseArgtupleInvalid("copyExteriorElementBoundaryValuesToGlobalElementBoundaryValues", 1, 5, 5, 3); __PYX_ERR(0, 5609, __pyx_L3_error)
35644  }
35645  CYTHON_FALLTHROUGH;
35646  case 4:
35647  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ebq_global_val)) != 0)) kw_args--;
35648  else {
35649  __Pyx_RaiseArgtupleInvalid("copyExteriorElementBoundaryValuesToGlobalElementBoundaryValues", 1, 5, 5, 4); __PYX_ERR(0, 5609, __pyx_L3_error)
35650  }
35651  }
35652  if (unlikely(kw_args > 0)) {
35653  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "copyExteriorElementBoundaryValuesToGlobalElementBoundaryValues") < 0)) __PYX_ERR(0, 5609, __pyx_L3_error)
35654  }
35655  } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
35656  goto __pyx_L5_argtuple_error;
35657  } else {
35658  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
35659  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
35660  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
35661  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
35662  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
35663  }
35664  __pyx_v_exteriorElementBoundaries = ((PyArrayObject *)values[0]);
35665  __pyx_v_elementBoundaryElements = ((PyArrayObject *)values[1]);
35666  __pyx_v_elementBoundaryLocalElementBoundaries = ((PyArrayObject *)values[2]);
35667  __pyx_v_ebqe_val = ((PyArrayObject *)values[3]);
35668  __pyx_v_ebq_global_val = ((PyArrayObject *)values[4]);
35669  }
35670  goto __pyx_L4_argument_unpacking_done;
35671  __pyx_L5_argtuple_error:;
35672  __Pyx_RaiseArgtupleInvalid("copyExteriorElementBoundaryValuesToGlobalElementBoundaryValues", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5609, __pyx_L3_error)
35673  __pyx_L3_error:;
35674  __Pyx_AddTraceback("cfemIntegrals.copyExteriorElementBoundaryValuesToGlobalElementBoundaryValues", __pyx_clineno, __pyx_lineno, __pyx_filename);
35675  __Pyx_RefNannyFinishContext();
35676  return NULL;
35677  __pyx_L4_argument_unpacking_done:;
35678  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exteriorElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "exteriorElementBoundaries", 0))) __PYX_ERR(0, 5609, __pyx_L1_error)
35679  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElements), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElements", 0))) __PYX_ERR(0, 5610, __pyx_L1_error)
35680  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundaries", 0))) __PYX_ERR(0, 5611, __pyx_L1_error)
35681  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ebqe_val), __pyx_ptype_5numpy_ndarray, 1, "ebqe_val", 0))) __PYX_ERR(0, 5612, __pyx_L1_error)
35682  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ebq_global_val), __pyx_ptype_5numpy_ndarray, 1, "ebq_global_val", 0))) __PYX_ERR(0, 5613, __pyx_L1_error)
35683  __pyx_r = __pyx_pf_13cfemIntegrals_312copyExteriorElementBoundaryValuesToGlobalElementBoundaryValues(__pyx_self, __pyx_v_exteriorElementBoundaries, __pyx_v_elementBoundaryElements, __pyx_v_elementBoundaryLocalElementBoundaries, __pyx_v_ebqe_val, __pyx_v_ebq_global_val);
35684 
35685  /* function exit code */
35686  goto __pyx_L0;
35687  __pyx_L1_error:;
35688  __pyx_r = NULL;
35689  __pyx_L0:;
35690  __Pyx_RefNannyFinishContext();
35691  return __pyx_r;
35692 }
35693 
35694 static PyObject *__pyx_pf_13cfemIntegrals_312copyExteriorElementBoundaryValuesToGlobalElementBoundaryValues(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_ebqe_val, PyArrayObject *__pyx_v_ebq_global_val) {
35695  int __pyx_v_nExteriorElementBoundaries_global;
35696  int __pyx_v_nQuadraturePoints_elementBoundary;
35697  int __pyx_v_nValuesPerQuadraturePoint;
35698  int __pyx_v_nd;
35699  long __pyx_v_i;
35700  PyObject *__pyx_r = NULL;
35701  __Pyx_RefNannyDeclarations
35702  int __pyx_t_1;
35703  int __pyx_t_2;
35704  int __pyx_t_3;
35705  long __pyx_t_4;
35706  __Pyx_RefNannySetupContext("copyExteriorElementBoundaryValuesToGlobalElementBoundaryValues", 0);
35707 
35708  /* "cfemIntegrals.pyx":5614
35709  * np.ndarray ebqe_val,
35710  * np.ndarray ebq_global_val):
35711  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundaries.shape[0] # <<<<<<<<<<<<<<
35712  * cdef int nQuadraturePoints_elementBoundary = ebq_global_val.shape[1]
35713  * cdef int nValuesPerQuadraturePoint = 1
35714  */
35715  __pyx_v_nExteriorElementBoundaries_global = (__pyx_v_exteriorElementBoundaries->dimensions[0]);
35716 
35717  /* "cfemIntegrals.pyx":5615
35718  * np.ndarray ebq_global_val):
35719  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundaries.shape[0]
35720  * cdef int nQuadraturePoints_elementBoundary = ebq_global_val.shape[1] # <<<<<<<<<<<<<<
35721  * cdef int nValuesPerQuadraturePoint = 1
35722  * cdef int nd = ebq_global_val.ndim
35723  */
35724  __pyx_v_nQuadraturePoints_elementBoundary = (__pyx_v_ebq_global_val->dimensions[1]);
35725 
35726  /* "cfemIntegrals.pyx":5616
35727  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundaries.shape[0]
35728  * cdef int nQuadraturePoints_elementBoundary = ebq_global_val.shape[1]
35729  * cdef int nValuesPerQuadraturePoint = 1 # <<<<<<<<<<<<<<
35730  * cdef int nd = ebq_global_val.ndim
35731  * if nd > 2:
35732  */
35733  __pyx_v_nValuesPerQuadraturePoint = 1;
35734 
35735  /* "cfemIntegrals.pyx":5617
35736  * cdef int nQuadraturePoints_elementBoundary = ebq_global_val.shape[1]
35737  * cdef int nValuesPerQuadraturePoint = 1
35738  * cdef int nd = ebq_global_val.ndim # <<<<<<<<<<<<<<
35739  * if nd > 2:
35740  * for i in range(2,nd):
35741  */
35742  __pyx_t_1 = __pyx_v_ebq_global_val->nd;
35743  __pyx_v_nd = __pyx_t_1;
35744 
35745  /* "cfemIntegrals.pyx":5618
35746  * cdef int nValuesPerQuadraturePoint = 1
35747  * cdef int nd = ebq_global_val.ndim
35748  * if nd > 2: # <<<<<<<<<<<<<<
35749  * for i in range(2,nd):
35750  * nValuesPerQuadraturePoint *= ebq_global_val.shape[i]
35751  */
35752  __pyx_t_2 = ((__pyx_v_nd > 2) != 0);
35753  if (__pyx_t_2) {
35754 
35755  /* "cfemIntegrals.pyx":5619
35756  * cdef int nd = ebq_global_val.ndim
35757  * if nd > 2:
35758  * for i in range(2,nd): # <<<<<<<<<<<<<<
35759  * nValuesPerQuadraturePoint *= ebq_global_val.shape[i]
35760  * ccopyExteriorElementBoundaryValuesToGlobalElementBoundaryValues(nExteriorElementBoundaries_global,
35761  */
35762  __pyx_t_1 = __pyx_v_nd;
35763  __pyx_t_3 = __pyx_t_1;
35764  for (__pyx_t_4 = 2; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
35765  __pyx_v_i = __pyx_t_4;
35766 
35767  /* "cfemIntegrals.pyx":5620
35768  * if nd > 2:
35769  * for i in range(2,nd):
35770  * nValuesPerQuadraturePoint *= ebq_global_val.shape[i] # <<<<<<<<<<<<<<
35771  * ccopyExteriorElementBoundaryValuesToGlobalElementBoundaryValues(nExteriorElementBoundaries_global,
35772  * nQuadraturePoints_elementBoundary,
35773  */
35774  __pyx_v_nValuesPerQuadraturePoint = (__pyx_v_nValuesPerQuadraturePoint * (__pyx_v_ebq_global_val->dimensions[__pyx_v_i]));
35775  }
35776 
35777  /* "cfemIntegrals.pyx":5618
35778  * cdef int nValuesPerQuadraturePoint = 1
35779  * cdef int nd = ebq_global_val.ndim
35780  * if nd > 2: # <<<<<<<<<<<<<<
35781  * for i in range(2,nd):
35782  * nValuesPerQuadraturePoint *= ebq_global_val.shape[i]
35783  */
35784  }
35785 
35786  /* "cfemIntegrals.pyx":5621
35787  * for i in range(2,nd):
35788  * nValuesPerQuadraturePoint *= ebq_global_val.shape[i]
35789  * ccopyExteriorElementBoundaryValuesToGlobalElementBoundaryValues(nExteriorElementBoundaries_global, # <<<<<<<<<<<<<<
35790  * nQuadraturePoints_elementBoundary,
35791  * nValuesPerQuadraturePoint,
35792  */
35793  copyExteriorElementBoundaryValuesToGlobalElementBoundaryValues(__pyx_v_nExteriorElementBoundaries_global, __pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nValuesPerQuadraturePoint, ((int *)__pyx_v_exteriorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), ((double *)__pyx_v_ebqe_val->data), ((double *)__pyx_v_ebq_global_val->data));
35794 
35795  /* "cfemIntegrals.pyx":5609
35796  * <double*> ebqe_val.data,
35797  * <double*> ebq_val.data)
35798  * def copyExteriorElementBoundaryValuesToGlobalElementBoundaryValues(np.ndarray exteriorElementBoundaries, # <<<<<<<<<<<<<<
35799  * np.ndarray elementBoundaryElements,
35800  * np.ndarray elementBoundaryLocalElementBoundaries,
35801  */
35802 
35803  /* function exit code */
35804  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
35805  __Pyx_XGIVEREF(__pyx_r);
35806  __Pyx_RefNannyFinishContext();
35807  return __pyx_r;
35808 }
35809 
35810 /* "cfemIntegrals.pyx":5629
35811  * <double*> ebqe_val.data,
35812  * <double*> ebq_global_val.data)
35813  * def copyExteriorElementBoundaryValuesFromGlobalElementBoundaryValues(np.ndarray exteriorElementBoundaries, # <<<<<<<<<<<<<<
35814  * np.ndarray elementBoundaryElements,
35815  * np.ndarray elementBoundaryLocalElementBoundaries,
35816  */
35817 
35818 /* Python wrapper */
35819 static PyObject *__pyx_pw_13cfemIntegrals_315copyExteriorElementBoundaryValuesFromGlobalElementBoundaryValues(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
35820 static PyMethodDef __pyx_mdef_13cfemIntegrals_315copyExteriorElementBoundaryValuesFromGlobalElementBoundaryValues = {"copyExteriorElementBoundaryValuesFromGlobalElementBoundaryValues", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_315copyExteriorElementBoundaryValuesFromGlobalElementBoundaryValues, METH_VARARGS|METH_KEYWORDS, 0};
35821 static PyObject *__pyx_pw_13cfemIntegrals_315copyExteriorElementBoundaryValuesFromGlobalElementBoundaryValues(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
35822  PyArrayObject *__pyx_v_exteriorElementBoundaries = 0;
35823  PyArrayObject *__pyx_v_elementBoundaryElements = 0;
35824  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries = 0;
35825  PyArrayObject *__pyx_v_ebq_global_val = 0;
35826  PyArrayObject *__pyx_v_ebqe_val = 0;
35827  int __pyx_lineno = 0;
35828  const char *__pyx_filename = NULL;
35829  int __pyx_clineno = 0;
35830  PyObject *__pyx_r = 0;
35831  __Pyx_RefNannyDeclarations
35832  __Pyx_RefNannySetupContext("copyExteriorElementBoundaryValuesFromGlobalElementBoundaryValues (wrapper)", 0);
35833  {
35834  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exteriorElementBoundaries,&__pyx_n_s_elementBoundaryElements,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_ebq_global_val,&__pyx_n_s_ebqe_val,0};
35835  PyObject* values[5] = {0,0,0,0,0};
35836  if (unlikely(__pyx_kwds)) {
35837  Py_ssize_t kw_args;
35838  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
35839  switch (pos_args) {
35840  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
35841  CYTHON_FALLTHROUGH;
35842  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
35843  CYTHON_FALLTHROUGH;
35844  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
35845  CYTHON_FALLTHROUGH;
35846  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
35847  CYTHON_FALLTHROUGH;
35848  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
35849  CYTHON_FALLTHROUGH;
35850  case 0: break;
35851  default: goto __pyx_L5_argtuple_error;
35852  }
35853  kw_args = PyDict_Size(__pyx_kwds);
35854  switch (pos_args) {
35855  case 0:
35856  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exteriorElementBoundaries)) != 0)) kw_args--;
35857  else goto __pyx_L5_argtuple_error;
35858  CYTHON_FALLTHROUGH;
35859  case 1:
35860  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElements)) != 0)) kw_args--;
35861  else {
35862  __Pyx_RaiseArgtupleInvalid("copyExteriorElementBoundaryValuesFromGlobalElementBoundaryValues", 1, 5, 5, 1); __PYX_ERR(0, 5629, __pyx_L3_error)
35863  }
35864  CYTHON_FALLTHROUGH;
35865  case 2:
35866  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
35867  else {
35868  __Pyx_RaiseArgtupleInvalid("copyExteriorElementBoundaryValuesFromGlobalElementBoundaryValues", 1, 5, 5, 2); __PYX_ERR(0, 5629, __pyx_L3_error)
35869  }
35870  CYTHON_FALLTHROUGH;
35871  case 3:
35872  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ebq_global_val)) != 0)) kw_args--;
35873  else {
35874  __Pyx_RaiseArgtupleInvalid("copyExteriorElementBoundaryValuesFromGlobalElementBoundaryValues", 1, 5, 5, 3); __PYX_ERR(0, 5629, __pyx_L3_error)
35875  }
35876  CYTHON_FALLTHROUGH;
35877  case 4:
35878  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ebqe_val)) != 0)) kw_args--;
35879  else {
35880  __Pyx_RaiseArgtupleInvalid("copyExteriorElementBoundaryValuesFromGlobalElementBoundaryValues", 1, 5, 5, 4); __PYX_ERR(0, 5629, __pyx_L3_error)
35881  }
35882  }
35883  if (unlikely(kw_args > 0)) {
35884  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "copyExteriorElementBoundaryValuesFromGlobalElementBoundaryValues") < 0)) __PYX_ERR(0, 5629, __pyx_L3_error)
35885  }
35886  } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
35887  goto __pyx_L5_argtuple_error;
35888  } else {
35889  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
35890  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
35891  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
35892  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
35893  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
35894  }
35895  __pyx_v_exteriorElementBoundaries = ((PyArrayObject *)values[0]);
35896  __pyx_v_elementBoundaryElements = ((PyArrayObject *)values[1]);
35897  __pyx_v_elementBoundaryLocalElementBoundaries = ((PyArrayObject *)values[2]);
35898  __pyx_v_ebq_global_val = ((PyArrayObject *)values[3]);
35899  __pyx_v_ebqe_val = ((PyArrayObject *)values[4]);
35900  }
35901  goto __pyx_L4_argument_unpacking_done;
35902  __pyx_L5_argtuple_error:;
35903  __Pyx_RaiseArgtupleInvalid("copyExteriorElementBoundaryValuesFromGlobalElementBoundaryValues", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5629, __pyx_L3_error)
35904  __pyx_L3_error:;
35905  __Pyx_AddTraceback("cfemIntegrals.copyExteriorElementBoundaryValuesFromGlobalElementBoundaryValues", __pyx_clineno, __pyx_lineno, __pyx_filename);
35906  __Pyx_RefNannyFinishContext();
35907  return NULL;
35908  __pyx_L4_argument_unpacking_done:;
35909  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exteriorElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "exteriorElementBoundaries", 0))) __PYX_ERR(0, 5629, __pyx_L1_error)
35910  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElements), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElements", 0))) __PYX_ERR(0, 5630, __pyx_L1_error)
35911  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundaries", 0))) __PYX_ERR(0, 5631, __pyx_L1_error)
35912  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ebq_global_val), __pyx_ptype_5numpy_ndarray, 1, "ebq_global_val", 0))) __PYX_ERR(0, 5632, __pyx_L1_error)
35913  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ebqe_val), __pyx_ptype_5numpy_ndarray, 1, "ebqe_val", 0))) __PYX_ERR(0, 5633, __pyx_L1_error)
35914  __pyx_r = __pyx_pf_13cfemIntegrals_314copyExteriorElementBoundaryValuesFromGlobalElementBoundaryValues(__pyx_self, __pyx_v_exteriorElementBoundaries, __pyx_v_elementBoundaryElements, __pyx_v_elementBoundaryLocalElementBoundaries, __pyx_v_ebq_global_val, __pyx_v_ebqe_val);
35915 
35916  /* function exit code */
35917  goto __pyx_L0;
35918  __pyx_L1_error:;
35919  __pyx_r = NULL;
35920  __pyx_L0:;
35921  __Pyx_RefNannyFinishContext();
35922  return __pyx_r;
35923 }
35924 
35925 static PyObject *__pyx_pf_13cfemIntegrals_314copyExteriorElementBoundaryValuesFromGlobalElementBoundaryValues(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_ebq_global_val, PyArrayObject *__pyx_v_ebqe_val) {
35926  int __pyx_v_nExteriorElementBoundaries_global;
35927  int __pyx_v_nQuadraturePoints_elementBoundary;
35928  int __pyx_v_nValuesPerQuadraturePoint;
35929  int __pyx_v_nd;
35930  long __pyx_v_i;
35931  PyObject *__pyx_r = NULL;
35932  __Pyx_RefNannyDeclarations
35933  int __pyx_t_1;
35934  int __pyx_t_2;
35935  int __pyx_t_3;
35936  long __pyx_t_4;
35937  __Pyx_RefNannySetupContext("copyExteriorElementBoundaryValuesFromGlobalElementBoundaryValues", 0);
35938 
35939  /* "cfemIntegrals.pyx":5634
35940  * np.ndarray ebq_global_val,
35941  * np.ndarray ebqe_val):
35942  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundaries.shape[0] # <<<<<<<<<<<<<<
35943  * cdef int nQuadraturePoints_elementBoundary = ebq_global_val.shape[1]
35944  * cdef int nValuesPerQuadraturePoint = 1;
35945  */
35946  __pyx_v_nExteriorElementBoundaries_global = (__pyx_v_exteriorElementBoundaries->dimensions[0]);
35947 
35948  /* "cfemIntegrals.pyx":5635
35949  * np.ndarray ebqe_val):
35950  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundaries.shape[0]
35951  * cdef int nQuadraturePoints_elementBoundary = ebq_global_val.shape[1] # <<<<<<<<<<<<<<
35952  * cdef int nValuesPerQuadraturePoint = 1;
35953  * cdef int nd = ebq_global_val.ndim
35954  */
35955  __pyx_v_nQuadraturePoints_elementBoundary = (__pyx_v_ebq_global_val->dimensions[1]);
35956 
35957  /* "cfemIntegrals.pyx":5636
35958  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundaries.shape[0]
35959  * cdef int nQuadraturePoints_elementBoundary = ebq_global_val.shape[1]
35960  * cdef int nValuesPerQuadraturePoint = 1; # <<<<<<<<<<<<<<
35961  * cdef int nd = ebq_global_val.ndim
35962  * if nd > 2:
35963  */
35964  __pyx_v_nValuesPerQuadraturePoint = 1;
35965 
35966  /* "cfemIntegrals.pyx":5637
35967  * cdef int nQuadraturePoints_elementBoundary = ebq_global_val.shape[1]
35968  * cdef int nValuesPerQuadraturePoint = 1;
35969  * cdef int nd = ebq_global_val.ndim # <<<<<<<<<<<<<<
35970  * if nd > 2:
35971  * for i in range(2,nd):
35972  */
35973  __pyx_t_1 = __pyx_v_ebq_global_val->nd;
35974  __pyx_v_nd = __pyx_t_1;
35975 
35976  /* "cfemIntegrals.pyx":5638
35977  * cdef int nValuesPerQuadraturePoint = 1;
35978  * cdef int nd = ebq_global_val.ndim
35979  * if nd > 2: # <<<<<<<<<<<<<<
35980  * for i in range(2,nd):
35981  * nValuesPerQuadraturePoint *= ebq_global_val.shape[i]
35982  */
35983  __pyx_t_2 = ((__pyx_v_nd > 2) != 0);
35984  if (__pyx_t_2) {
35985 
35986  /* "cfemIntegrals.pyx":5639
35987  * cdef int nd = ebq_global_val.ndim
35988  * if nd > 2:
35989  * for i in range(2,nd): # <<<<<<<<<<<<<<
35990  * nValuesPerQuadraturePoint *= ebq_global_val.shape[i]
35991  * ccopyExteriorElementBoundaryValuesFromGlobalElementBoundaryValues(nExteriorElementBoundaries_global,
35992  */
35993  __pyx_t_1 = __pyx_v_nd;
35994  __pyx_t_3 = __pyx_t_1;
35995  for (__pyx_t_4 = 2; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
35996  __pyx_v_i = __pyx_t_4;
35997 
35998  /* "cfemIntegrals.pyx":5640
35999  * if nd > 2:
36000  * for i in range(2,nd):
36001  * nValuesPerQuadraturePoint *= ebq_global_val.shape[i] # <<<<<<<<<<<<<<
36002  * ccopyExteriorElementBoundaryValuesFromGlobalElementBoundaryValues(nExteriorElementBoundaries_global,
36003  * nQuadraturePoints_elementBoundary,
36004  */
36005  __pyx_v_nValuesPerQuadraturePoint = (__pyx_v_nValuesPerQuadraturePoint * (__pyx_v_ebq_global_val->dimensions[__pyx_v_i]));
36006  }
36007 
36008  /* "cfemIntegrals.pyx":5638
36009  * cdef int nValuesPerQuadraturePoint = 1;
36010  * cdef int nd = ebq_global_val.ndim
36011  * if nd > 2: # <<<<<<<<<<<<<<
36012  * for i in range(2,nd):
36013  * nValuesPerQuadraturePoint *= ebq_global_val.shape[i]
36014  */
36015  }
36016 
36017  /* "cfemIntegrals.pyx":5641
36018  * for i in range(2,nd):
36019  * nValuesPerQuadraturePoint *= ebq_global_val.shape[i]
36020  * ccopyExteriorElementBoundaryValuesFromGlobalElementBoundaryValues(nExteriorElementBoundaries_global, # <<<<<<<<<<<<<<
36021  * nQuadraturePoints_elementBoundary,
36022  * nValuesPerQuadraturePoint,
36023  */
36024  copyExteriorElementBoundaryValuesFromGlobalElementBoundaryValues(__pyx_v_nExteriorElementBoundaries_global, __pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nValuesPerQuadraturePoint, ((int *)__pyx_v_exteriorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), ((double *)__pyx_v_ebq_global_val->data), ((double *)__pyx_v_ebqe_val->data));
36025 
36026  /* "cfemIntegrals.pyx":5629
36027  * <double*> ebqe_val.data,
36028  * <double*> ebq_global_val.data)
36029  * def copyExteriorElementBoundaryValuesFromGlobalElementBoundaryValues(np.ndarray exteriorElementBoundaries, # <<<<<<<<<<<<<<
36030  * np.ndarray elementBoundaryElements,
36031  * np.ndarray elementBoundaryLocalElementBoundaries,
36032  */
36033 
36034  /* function exit code */
36035  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
36036  __Pyx_XGIVEREF(__pyx_r);
36037  __Pyx_RefNannyFinishContext();
36038  return __pyx_r;
36039 }
36040 
36041 /* "cfemIntegrals.pyx":5649
36042  * <double*> ebq_global_val.data,
36043  * <double*> ebqe_val.data)
36044  * def computeC0P1InterpolantDGP0(np.ndarray elementNodesArray, # <<<<<<<<<<<<<<
36045  * np.ndarray nodeElementOffsets,
36046  * np.ndarray nodeElementsArray,
36047  */
36048 
36049 /* Python wrapper */
36050 static PyObject *__pyx_pw_13cfemIntegrals_317computeC0P1InterpolantDGP0(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
36051 static PyMethodDef __pyx_mdef_13cfemIntegrals_317computeC0P1InterpolantDGP0 = {"computeC0P1InterpolantDGP0", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_317computeC0P1InterpolantDGP0, METH_VARARGS|METH_KEYWORDS, 0};
36052 static PyObject *__pyx_pw_13cfemIntegrals_317computeC0P1InterpolantDGP0(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
36053  PyArrayObject *__pyx_v_elementNodesArray = 0;
36054  PyArrayObject *__pyx_v_nodeElementOffsets = 0;
36055  PyArrayObject *__pyx_v_nodeElementsArray = 0;
36056  PyArrayObject *__pyx_v_l2g = 0;
36057  PyArrayObject *__pyx_v_dof = 0;
36058  PyArrayObject *__pyx_v_nodalAverage = 0;
36059  PyObject *__pyx_v_dim_dof = 0;
36060  int __pyx_lineno = 0;
36061  const char *__pyx_filename = NULL;
36062  int __pyx_clineno = 0;
36063  PyObject *__pyx_r = 0;
36064  __Pyx_RefNannyDeclarations
36065  __Pyx_RefNannySetupContext("computeC0P1InterpolantDGP0 (wrapper)", 0);
36066  {
36067  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_elementNodesArray,&__pyx_n_s_nodeElementOffsets,&__pyx_n_s_nodeElementsArray,&__pyx_n_s_l2g,&__pyx_n_s_dof,&__pyx_n_s_nodalAverage,&__pyx_n_s_dim_dof,0};
36068  PyObject* values[7] = {0,0,0,0,0,0,0};
36069  if (unlikely(__pyx_kwds)) {
36070  Py_ssize_t kw_args;
36071  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
36072  switch (pos_args) {
36073  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
36074  CYTHON_FALLTHROUGH;
36075  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
36076  CYTHON_FALLTHROUGH;
36077  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
36078  CYTHON_FALLTHROUGH;
36079  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
36080  CYTHON_FALLTHROUGH;
36081  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
36082  CYTHON_FALLTHROUGH;
36083  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
36084  CYTHON_FALLTHROUGH;
36085  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
36086  CYTHON_FALLTHROUGH;
36087  case 0: break;
36088  default: goto __pyx_L5_argtuple_error;
36089  }
36090  kw_args = PyDict_Size(__pyx_kwds);
36091  switch (pos_args) {
36092  case 0:
36093  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementNodesArray)) != 0)) kw_args--;
36094  else goto __pyx_L5_argtuple_error;
36095  CYTHON_FALLTHROUGH;
36096  case 1:
36097  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodeElementOffsets)) != 0)) kw_args--;
36098  else {
36099  __Pyx_RaiseArgtupleInvalid("computeC0P1InterpolantDGP0", 1, 7, 7, 1); __PYX_ERR(0, 5649, __pyx_L3_error)
36100  }
36101  CYTHON_FALLTHROUGH;
36102  case 2:
36103  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodeElementsArray)) != 0)) kw_args--;
36104  else {
36105  __Pyx_RaiseArgtupleInvalid("computeC0P1InterpolantDGP0", 1, 7, 7, 2); __PYX_ERR(0, 5649, __pyx_L3_error)
36106  }
36107  CYTHON_FALLTHROUGH;
36108  case 3:
36109  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_l2g)) != 0)) kw_args--;
36110  else {
36111  __Pyx_RaiseArgtupleInvalid("computeC0P1InterpolantDGP0", 1, 7, 7, 3); __PYX_ERR(0, 5649, __pyx_L3_error)
36112  }
36113  CYTHON_FALLTHROUGH;
36114  case 4:
36115  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dof)) != 0)) kw_args--;
36116  else {
36117  __Pyx_RaiseArgtupleInvalid("computeC0P1InterpolantDGP0", 1, 7, 7, 4); __PYX_ERR(0, 5649, __pyx_L3_error)
36118  }
36119  CYTHON_FALLTHROUGH;
36120  case 5:
36121  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodalAverage)) != 0)) kw_args--;
36122  else {
36123  __Pyx_RaiseArgtupleInvalid("computeC0P1InterpolantDGP0", 1, 7, 7, 5); __PYX_ERR(0, 5649, __pyx_L3_error)
36124  }
36125  CYTHON_FALLTHROUGH;
36126  case 6:
36127  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dim_dof)) != 0)) kw_args--;
36128  else {
36129  __Pyx_RaiseArgtupleInvalid("computeC0P1InterpolantDGP0", 1, 7, 7, 6); __PYX_ERR(0, 5649, __pyx_L3_error)
36130  }
36131  }
36132  if (unlikely(kw_args > 0)) {
36133  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "computeC0P1InterpolantDGP0") < 0)) __PYX_ERR(0, 5649, __pyx_L3_error)
36134  }
36135  } else if (PyTuple_GET_SIZE(__pyx_args) != 7) {
36136  goto __pyx_L5_argtuple_error;
36137  } else {
36138  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
36139  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
36140  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
36141  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
36142  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
36143  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
36144  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
36145  }
36146  __pyx_v_elementNodesArray = ((PyArrayObject *)values[0]);
36147  __pyx_v_nodeElementOffsets = ((PyArrayObject *)values[1]);
36148  __pyx_v_nodeElementsArray = ((PyArrayObject *)values[2]);
36149  __pyx_v_l2g = ((PyArrayObject *)values[3]);
36150  __pyx_v_dof = ((PyArrayObject *)values[4]);
36151  __pyx_v_nodalAverage = ((PyArrayObject *)values[5]);
36152  __pyx_v_dim_dof = values[6];
36153  }
36154  goto __pyx_L4_argument_unpacking_done;
36155  __pyx_L5_argtuple_error:;
36156  __Pyx_RaiseArgtupleInvalid("computeC0P1InterpolantDGP0", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5649, __pyx_L3_error)
36157  __pyx_L3_error:;
36158  __Pyx_AddTraceback("cfemIntegrals.computeC0P1InterpolantDGP0", __pyx_clineno, __pyx_lineno, __pyx_filename);
36159  __Pyx_RefNannyFinishContext();
36160  return NULL;
36161  __pyx_L4_argument_unpacking_done:;
36162  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNodesArray), __pyx_ptype_5numpy_ndarray, 1, "elementNodesArray", 0))) __PYX_ERR(0, 5649, __pyx_L1_error)
36163  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodeElementOffsets), __pyx_ptype_5numpy_ndarray, 1, "nodeElementOffsets", 0))) __PYX_ERR(0, 5650, __pyx_L1_error)
36164  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodeElementsArray), __pyx_ptype_5numpy_ndarray, 1, "nodeElementsArray", 0))) __PYX_ERR(0, 5651, __pyx_L1_error)
36165  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_l2g), __pyx_ptype_5numpy_ndarray, 1, "l2g", 0))) __PYX_ERR(0, 5652, __pyx_L1_error)
36166  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dof), __pyx_ptype_5numpy_ndarray, 1, "dof", 0))) __PYX_ERR(0, 5653, __pyx_L1_error)
36167  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodalAverage), __pyx_ptype_5numpy_ndarray, 1, "nodalAverage", 0))) __PYX_ERR(0, 5654, __pyx_L1_error)
36168  __pyx_r = __pyx_pf_13cfemIntegrals_316computeC0P1InterpolantDGP0(__pyx_self, __pyx_v_elementNodesArray, __pyx_v_nodeElementOffsets, __pyx_v_nodeElementsArray, __pyx_v_l2g, __pyx_v_dof, __pyx_v_nodalAverage, __pyx_v_dim_dof);
36169 
36170  /* function exit code */
36171  goto __pyx_L0;
36172  __pyx_L1_error:;
36173  __pyx_r = NULL;
36174  __pyx_L0:;
36175  __Pyx_RefNannyFinishContext();
36176  return __pyx_r;
36177 }
36178 
36179 static PyObject *__pyx_pf_13cfemIntegrals_316computeC0P1InterpolantDGP0(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementNodesArray, PyArrayObject *__pyx_v_nodeElementOffsets, PyArrayObject *__pyx_v_nodeElementsArray, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_dof, PyArrayObject *__pyx_v_nodalAverage, PyObject *__pyx_v_dim_dof) {
36180  int __pyx_v_nElements_global;
36181  int __pyx_v_nNodes_global;
36182  int __pyx_v_nNodes_element;
36183  int __pyx_v_nDOF_element;
36184  PyObject *__pyx_r = NULL;
36185  __Pyx_RefNannyDeclarations
36186  int __pyx_t_1;
36187  int __pyx_lineno = 0;
36188  const char *__pyx_filename = NULL;
36189  int __pyx_clineno = 0;
36190  __Pyx_RefNannySetupContext("computeC0P1InterpolantDGP0", 0);
36191 
36192  /* "cfemIntegrals.pyx":5656
36193  * np.ndarray nodalAverage,
36194  * dim_dof):
36195  * cdef int nElements_global = elementNodesArray.shape[0] # <<<<<<<<<<<<<<
36196  * cdef int nNodes_global = nodeElementOffsets.shape[0]-1
36197  * cdef int nNodes_element = elementNodesArray.shape[1]
36198  */
36199  __pyx_v_nElements_global = (__pyx_v_elementNodesArray->dimensions[0]);
36200 
36201  /* "cfemIntegrals.pyx":5657
36202  * dim_dof):
36203  * cdef int nElements_global = elementNodesArray.shape[0]
36204  * cdef int nNodes_global = nodeElementOffsets.shape[0]-1 # <<<<<<<<<<<<<<
36205  * cdef int nNodes_element = elementNodesArray.shape[1]
36206  * cdef int nDOF_element = l2g.shape[1]
36207  */
36208  __pyx_v_nNodes_global = ((__pyx_v_nodeElementOffsets->dimensions[0]) - 1);
36209 
36210  /* "cfemIntegrals.pyx":5658
36211  * cdef int nElements_global = elementNodesArray.shape[0]
36212  * cdef int nNodes_global = nodeElementOffsets.shape[0]-1
36213  * cdef int nNodes_element = elementNodesArray.shape[1] # <<<<<<<<<<<<<<
36214  * cdef int nDOF_element = l2g.shape[1]
36215  * ccomputeC0P1InterpolantDGP0(nElements_global,
36216  */
36217  __pyx_v_nNodes_element = (__pyx_v_elementNodesArray->dimensions[1]);
36218 
36219  /* "cfemIntegrals.pyx":5659
36220  * cdef int nNodes_global = nodeElementOffsets.shape[0]-1
36221  * cdef int nNodes_element = elementNodesArray.shape[1]
36222  * cdef int nDOF_element = l2g.shape[1] # <<<<<<<<<<<<<<
36223  * ccomputeC0P1InterpolantDGP0(nElements_global,
36224  * nNodes_global,
36225  */
36226  __pyx_v_nDOF_element = (__pyx_v_l2g->dimensions[1]);
36227 
36228  /* "cfemIntegrals.pyx":5664
36229  * nNodes_element,
36230  * nDOF_element,
36231  * dim_dof, # <<<<<<<<<<<<<<
36232  * <int*> elementNodesArray.data,
36233  * <int*> nodeElementOffsets.data,
36234  */
36235  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_dim_dof); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5664, __pyx_L1_error)
36236 
36237  /* "cfemIntegrals.pyx":5660
36238  * cdef int nNodes_element = elementNodesArray.shape[1]
36239  * cdef int nDOF_element = l2g.shape[1]
36240  * ccomputeC0P1InterpolantDGP0(nElements_global, # <<<<<<<<<<<<<<
36241  * nNodes_global,
36242  * nNodes_element,
36243  */
36244  computeC0P1InterpolantDGP0(__pyx_v_nElements_global, __pyx_v_nNodes_global, __pyx_v_nNodes_element, __pyx_v_nDOF_element, __pyx_t_1, ((int *)__pyx_v_elementNodesArray->data), ((int *)__pyx_v_nodeElementOffsets->data), ((int *)__pyx_v_nodeElementsArray->data), ((int *)__pyx_v_l2g->data), ((double *)__pyx_v_dof->data), ((double *)__pyx_v_nodalAverage->data));
36245 
36246  /* "cfemIntegrals.pyx":5649
36247  * <double*> ebq_global_val.data,
36248  * <double*> ebqe_val.data)
36249  * def computeC0P1InterpolantDGP0(np.ndarray elementNodesArray, # <<<<<<<<<<<<<<
36250  * np.ndarray nodeElementOffsets,
36251  * np.ndarray nodeElementsArray,
36252  */
36253 
36254  /* function exit code */
36255  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
36256  goto __pyx_L0;
36257  __pyx_L1_error:;
36258  __Pyx_AddTraceback("cfemIntegrals.computeC0P1InterpolantDGP0", __pyx_clineno, __pyx_lineno, __pyx_filename);
36259  __pyx_r = NULL;
36260  __pyx_L0:;
36261  __Pyx_XGIVEREF(__pyx_r);
36262  __Pyx_RefNannyFinishContext();
36263  return __pyx_r;
36264 }
36265 
36266 /* "cfemIntegrals.pyx":5671
36267  * <double*> dof.data,
36268  * <double*> nodalAverage.data)
36269  * def computeC0P1InterpolantNCP1(int dim_dof, # <<<<<<<<<<<<<<
36270  * np.ndarray elementNodesArray,
36271  * np.ndarray nodeElementOffsets,
36272  */
36273 
36274 /* Python wrapper */
36275 static PyObject *__pyx_pw_13cfemIntegrals_319computeC0P1InterpolantNCP1(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
36276 static PyMethodDef __pyx_mdef_13cfemIntegrals_319computeC0P1InterpolantNCP1 = {"computeC0P1InterpolantNCP1", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_319computeC0P1InterpolantNCP1, METH_VARARGS|METH_KEYWORDS, 0};
36277 static PyObject *__pyx_pw_13cfemIntegrals_319computeC0P1InterpolantNCP1(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
36278  int __pyx_v_dim_dof;
36279  PyArrayObject *__pyx_v_elementNodesArray = 0;
36280  PyArrayObject *__pyx_v_nodeElementOffsets = 0;
36281  PyArrayObject *__pyx_v_nodeElementsArray = 0;
36282  PyArrayObject *__pyx_v_l2g = 0;
36283  PyArrayObject *__pyx_v_dof = 0;
36284  PyArrayObject *__pyx_v_nodalAverage = 0;
36285  int __pyx_lineno = 0;
36286  const char *__pyx_filename = NULL;
36287  int __pyx_clineno = 0;
36288  PyObject *__pyx_r = 0;
36289  __Pyx_RefNannyDeclarations
36290  __Pyx_RefNannySetupContext("computeC0P1InterpolantNCP1 (wrapper)", 0);
36291  {
36292  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dim_dof,&__pyx_n_s_elementNodesArray,&__pyx_n_s_nodeElementOffsets,&__pyx_n_s_nodeElementsArray,&__pyx_n_s_l2g,&__pyx_n_s_dof,&__pyx_n_s_nodalAverage,0};
36293  PyObject* values[7] = {0,0,0,0,0,0,0};
36294  if (unlikely(__pyx_kwds)) {
36295  Py_ssize_t kw_args;
36296  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
36297  switch (pos_args) {
36298  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
36299  CYTHON_FALLTHROUGH;
36300  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
36301  CYTHON_FALLTHROUGH;
36302  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
36303  CYTHON_FALLTHROUGH;
36304  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
36305  CYTHON_FALLTHROUGH;
36306  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
36307  CYTHON_FALLTHROUGH;
36308  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
36309  CYTHON_FALLTHROUGH;
36310  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
36311  CYTHON_FALLTHROUGH;
36312  case 0: break;
36313  default: goto __pyx_L5_argtuple_error;
36314  }
36315  kw_args = PyDict_Size(__pyx_kwds);
36316  switch (pos_args) {
36317  case 0:
36318  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dim_dof)) != 0)) kw_args--;
36319  else goto __pyx_L5_argtuple_error;
36320  CYTHON_FALLTHROUGH;
36321  case 1:
36322  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementNodesArray)) != 0)) kw_args--;
36323  else {
36324  __Pyx_RaiseArgtupleInvalid("computeC0P1InterpolantNCP1", 1, 7, 7, 1); __PYX_ERR(0, 5671, __pyx_L3_error)
36325  }
36326  CYTHON_FALLTHROUGH;
36327  case 2:
36328  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodeElementOffsets)) != 0)) kw_args--;
36329  else {
36330  __Pyx_RaiseArgtupleInvalid("computeC0P1InterpolantNCP1", 1, 7, 7, 2); __PYX_ERR(0, 5671, __pyx_L3_error)
36331  }
36332  CYTHON_FALLTHROUGH;
36333  case 3:
36334  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodeElementsArray)) != 0)) kw_args--;
36335  else {
36336  __Pyx_RaiseArgtupleInvalid("computeC0P1InterpolantNCP1", 1, 7, 7, 3); __PYX_ERR(0, 5671, __pyx_L3_error)
36337  }
36338  CYTHON_FALLTHROUGH;
36339  case 4:
36340  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_l2g)) != 0)) kw_args--;
36341  else {
36342  __Pyx_RaiseArgtupleInvalid("computeC0P1InterpolantNCP1", 1, 7, 7, 4); __PYX_ERR(0, 5671, __pyx_L3_error)
36343  }
36344  CYTHON_FALLTHROUGH;
36345  case 5:
36346  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dof)) != 0)) kw_args--;
36347  else {
36348  __Pyx_RaiseArgtupleInvalid("computeC0P1InterpolantNCP1", 1, 7, 7, 5); __PYX_ERR(0, 5671, __pyx_L3_error)
36349  }
36350  CYTHON_FALLTHROUGH;
36351  case 6:
36352  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodalAverage)) != 0)) kw_args--;
36353  else {
36354  __Pyx_RaiseArgtupleInvalid("computeC0P1InterpolantNCP1", 1, 7, 7, 6); __PYX_ERR(0, 5671, __pyx_L3_error)
36355  }
36356  }
36357  if (unlikely(kw_args > 0)) {
36358  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "computeC0P1InterpolantNCP1") < 0)) __PYX_ERR(0, 5671, __pyx_L3_error)
36359  }
36360  } else if (PyTuple_GET_SIZE(__pyx_args) != 7) {
36361  goto __pyx_L5_argtuple_error;
36362  } else {
36363  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
36364  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
36365  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
36366  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
36367  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
36368  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
36369  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
36370  }
36371  __pyx_v_dim_dof = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_dim_dof == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5671, __pyx_L3_error)
36372  __pyx_v_elementNodesArray = ((PyArrayObject *)values[1]);
36373  __pyx_v_nodeElementOffsets = ((PyArrayObject *)values[2]);
36374  __pyx_v_nodeElementsArray = ((PyArrayObject *)values[3]);
36375  __pyx_v_l2g = ((PyArrayObject *)values[4]);
36376  __pyx_v_dof = ((PyArrayObject *)values[5]);
36377  __pyx_v_nodalAverage = ((PyArrayObject *)values[6]);
36378  }
36379  goto __pyx_L4_argument_unpacking_done;
36380  __pyx_L5_argtuple_error:;
36381  __Pyx_RaiseArgtupleInvalid("computeC0P1InterpolantNCP1", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5671, __pyx_L3_error)
36382  __pyx_L3_error:;
36383  __Pyx_AddTraceback("cfemIntegrals.computeC0P1InterpolantNCP1", __pyx_clineno, __pyx_lineno, __pyx_filename);
36384  __Pyx_RefNannyFinishContext();
36385  return NULL;
36386  __pyx_L4_argument_unpacking_done:;
36387  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNodesArray), __pyx_ptype_5numpy_ndarray, 1, "elementNodesArray", 0))) __PYX_ERR(0, 5672, __pyx_L1_error)
36388  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodeElementOffsets), __pyx_ptype_5numpy_ndarray, 1, "nodeElementOffsets", 0))) __PYX_ERR(0, 5673, __pyx_L1_error)
36389  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodeElementsArray), __pyx_ptype_5numpy_ndarray, 1, "nodeElementsArray", 0))) __PYX_ERR(0, 5674, __pyx_L1_error)
36390  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_l2g), __pyx_ptype_5numpy_ndarray, 1, "l2g", 0))) __PYX_ERR(0, 5675, __pyx_L1_error)
36391  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dof), __pyx_ptype_5numpy_ndarray, 1, "dof", 0))) __PYX_ERR(0, 5676, __pyx_L1_error)
36392  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodalAverage), __pyx_ptype_5numpy_ndarray, 1, "nodalAverage", 0))) __PYX_ERR(0, 5677, __pyx_L1_error)
36393  __pyx_r = __pyx_pf_13cfemIntegrals_318computeC0P1InterpolantNCP1(__pyx_self, __pyx_v_dim_dof, __pyx_v_elementNodesArray, __pyx_v_nodeElementOffsets, __pyx_v_nodeElementsArray, __pyx_v_l2g, __pyx_v_dof, __pyx_v_nodalAverage);
36394 
36395  /* function exit code */
36396  goto __pyx_L0;
36397  __pyx_L1_error:;
36398  __pyx_r = NULL;
36399  __pyx_L0:;
36400  __Pyx_RefNannyFinishContext();
36401  return __pyx_r;
36402 }
36403 
36404 static PyObject *__pyx_pf_13cfemIntegrals_318computeC0P1InterpolantNCP1(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_dim_dof, PyArrayObject *__pyx_v_elementNodesArray, PyArrayObject *__pyx_v_nodeElementOffsets, PyArrayObject *__pyx_v_nodeElementsArray, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_dof, PyArrayObject *__pyx_v_nodalAverage) {
36405  int __pyx_v_nElements_global;
36406  int __pyx_v_nNodes_global;
36407  int __pyx_v_nNodes_element;
36408  int __pyx_v_nDOF_element;
36409  PyObject *__pyx_r = NULL;
36410  __Pyx_RefNannyDeclarations
36411  __Pyx_RefNannySetupContext("computeC0P1InterpolantNCP1", 0);
36412 
36413  /* "cfemIntegrals.pyx":5678
36414  * np.ndarray dof,
36415  * np.ndarray nodalAverage):
36416  * cdef int nElements_global = elementNodesArray.shape[0] # <<<<<<<<<<<<<<
36417  * cdef int nNodes_global = nodeElementOffsets.shape[0]-1
36418  * cdef int nNodes_element = elementNodesArray.shape[1]
36419  */
36420  __pyx_v_nElements_global = (__pyx_v_elementNodesArray->dimensions[0]);
36421 
36422  /* "cfemIntegrals.pyx":5679
36423  * np.ndarray nodalAverage):
36424  * cdef int nElements_global = elementNodesArray.shape[0]
36425  * cdef int nNodes_global = nodeElementOffsets.shape[0]-1 # <<<<<<<<<<<<<<
36426  * cdef int nNodes_element = elementNodesArray.shape[1]
36427  * cdef int nDOF_element = l2g.shape[1]
36428  */
36429  __pyx_v_nNodes_global = ((__pyx_v_nodeElementOffsets->dimensions[0]) - 1);
36430 
36431  /* "cfemIntegrals.pyx":5680
36432  * cdef int nElements_global = elementNodesArray.shape[0]
36433  * cdef int nNodes_global = nodeElementOffsets.shape[0]-1
36434  * cdef int nNodes_element = elementNodesArray.shape[1] # <<<<<<<<<<<<<<
36435  * cdef int nDOF_element = l2g.shape[1]
36436  * ccomputeC0P1InterpolantNCP1(nElements_global,
36437  */
36438  __pyx_v_nNodes_element = (__pyx_v_elementNodesArray->dimensions[1]);
36439 
36440  /* "cfemIntegrals.pyx":5681
36441  * cdef int nNodes_global = nodeElementOffsets.shape[0]-1
36442  * cdef int nNodes_element = elementNodesArray.shape[1]
36443  * cdef int nDOF_element = l2g.shape[1] # <<<<<<<<<<<<<<
36444  * ccomputeC0P1InterpolantNCP1(nElements_global,
36445  * nNodes_global,
36446  */
36447  __pyx_v_nDOF_element = (__pyx_v_l2g->dimensions[1]);
36448 
36449  /* "cfemIntegrals.pyx":5682
36450  * cdef int nNodes_element = elementNodesArray.shape[1]
36451  * cdef int nDOF_element = l2g.shape[1]
36452  * ccomputeC0P1InterpolantNCP1(nElements_global, # <<<<<<<<<<<<<<
36453  * nNodes_global,
36454  * nNodes_element,
36455  */
36456  computeC0P1InterpolantNCP1(__pyx_v_nElements_global, __pyx_v_nNodes_global, __pyx_v_nNodes_element, __pyx_v_nDOF_element, __pyx_v_dim_dof, ((int *)__pyx_v_elementNodesArray->data), ((int *)__pyx_v_nodeElementOffsets->data), ((int *)__pyx_v_nodeElementsArray->data), ((int *)__pyx_v_l2g->data), ((double *)__pyx_v_dof->data), ((double *)__pyx_v_nodalAverage->data));
36457 
36458  /* "cfemIntegrals.pyx":5671
36459  * <double*> dof.data,
36460  * <double*> nodalAverage.data)
36461  * def computeC0P1InterpolantNCP1(int dim_dof, # <<<<<<<<<<<<<<
36462  * np.ndarray elementNodesArray,
36463  * np.ndarray nodeElementOffsets,
36464  */
36465 
36466  /* function exit code */
36467  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
36468  __Pyx_XGIVEREF(__pyx_r);
36469  __Pyx_RefNannyFinishContext();
36470  return __pyx_r;
36471 }
36472 
36473 /* "cfemIntegrals.pyx":5693
36474  * <double*> dof.data,
36475  * <double*> nodalAverage.data)
36476  * def computeC0P1InterpolantDGP12(int dim_dof, # <<<<<<<<<<<<<<
36477  * np.ndarray elementNodesArray,
36478  * np.ndarray nodeElementOffsets,
36479  */
36480 
36481 /* Python wrapper */
36482 static PyObject *__pyx_pw_13cfemIntegrals_321computeC0P1InterpolantDGP12(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
36483 static PyMethodDef __pyx_mdef_13cfemIntegrals_321computeC0P1InterpolantDGP12 = {"computeC0P1InterpolantDGP12", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_321computeC0P1InterpolantDGP12, METH_VARARGS|METH_KEYWORDS, 0};
36484 static PyObject *__pyx_pw_13cfemIntegrals_321computeC0P1InterpolantDGP12(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
36485  int __pyx_v_dim_dof;
36486  PyArrayObject *__pyx_v_elementNodesArray = 0;
36487  PyArrayObject *__pyx_v_nodeElementOffsets = 0;
36488  PyArrayObject *__pyx_v_nodeElementsArray = 0;
36489  PyArrayObject *__pyx_v_l2g = 0;
36490  PyArrayObject *__pyx_v_dof = 0;
36491  PyArrayObject *__pyx_v_nodalAverage = 0;
36492  int __pyx_lineno = 0;
36493  const char *__pyx_filename = NULL;
36494  int __pyx_clineno = 0;
36495  PyObject *__pyx_r = 0;
36496  __Pyx_RefNannyDeclarations
36497  __Pyx_RefNannySetupContext("computeC0P1InterpolantDGP12 (wrapper)", 0);
36498  {
36499  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dim_dof,&__pyx_n_s_elementNodesArray,&__pyx_n_s_nodeElementOffsets,&__pyx_n_s_nodeElementsArray,&__pyx_n_s_l2g,&__pyx_n_s_dof,&__pyx_n_s_nodalAverage,0};
36500  PyObject* values[7] = {0,0,0,0,0,0,0};
36501  if (unlikely(__pyx_kwds)) {
36502  Py_ssize_t kw_args;
36503  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
36504  switch (pos_args) {
36505  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
36506  CYTHON_FALLTHROUGH;
36507  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
36508  CYTHON_FALLTHROUGH;
36509  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
36510  CYTHON_FALLTHROUGH;
36511  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
36512  CYTHON_FALLTHROUGH;
36513  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
36514  CYTHON_FALLTHROUGH;
36515  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
36516  CYTHON_FALLTHROUGH;
36517  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
36518  CYTHON_FALLTHROUGH;
36519  case 0: break;
36520  default: goto __pyx_L5_argtuple_error;
36521  }
36522  kw_args = PyDict_Size(__pyx_kwds);
36523  switch (pos_args) {
36524  case 0:
36525  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dim_dof)) != 0)) kw_args--;
36526  else goto __pyx_L5_argtuple_error;
36527  CYTHON_FALLTHROUGH;
36528  case 1:
36529  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementNodesArray)) != 0)) kw_args--;
36530  else {
36531  __Pyx_RaiseArgtupleInvalid("computeC0P1InterpolantDGP12", 1, 7, 7, 1); __PYX_ERR(0, 5693, __pyx_L3_error)
36532  }
36533  CYTHON_FALLTHROUGH;
36534  case 2:
36535  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodeElementOffsets)) != 0)) kw_args--;
36536  else {
36537  __Pyx_RaiseArgtupleInvalid("computeC0P1InterpolantDGP12", 1, 7, 7, 2); __PYX_ERR(0, 5693, __pyx_L3_error)
36538  }
36539  CYTHON_FALLTHROUGH;
36540  case 3:
36541  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodeElementsArray)) != 0)) kw_args--;
36542  else {
36543  __Pyx_RaiseArgtupleInvalid("computeC0P1InterpolantDGP12", 1, 7, 7, 3); __PYX_ERR(0, 5693, __pyx_L3_error)
36544  }
36545  CYTHON_FALLTHROUGH;
36546  case 4:
36547  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_l2g)) != 0)) kw_args--;
36548  else {
36549  __Pyx_RaiseArgtupleInvalid("computeC0P1InterpolantDGP12", 1, 7, 7, 4); __PYX_ERR(0, 5693, __pyx_L3_error)
36550  }
36551  CYTHON_FALLTHROUGH;
36552  case 5:
36553  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dof)) != 0)) kw_args--;
36554  else {
36555  __Pyx_RaiseArgtupleInvalid("computeC0P1InterpolantDGP12", 1, 7, 7, 5); __PYX_ERR(0, 5693, __pyx_L3_error)
36556  }
36557  CYTHON_FALLTHROUGH;
36558  case 6:
36559  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodalAverage)) != 0)) kw_args--;
36560  else {
36561  __Pyx_RaiseArgtupleInvalid("computeC0P1InterpolantDGP12", 1, 7, 7, 6); __PYX_ERR(0, 5693, __pyx_L3_error)
36562  }
36563  }
36564  if (unlikely(kw_args > 0)) {
36565  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "computeC0P1InterpolantDGP12") < 0)) __PYX_ERR(0, 5693, __pyx_L3_error)
36566  }
36567  } else if (PyTuple_GET_SIZE(__pyx_args) != 7) {
36568  goto __pyx_L5_argtuple_error;
36569  } else {
36570  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
36571  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
36572  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
36573  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
36574  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
36575  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
36576  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
36577  }
36578  __pyx_v_dim_dof = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_dim_dof == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5693, __pyx_L3_error)
36579  __pyx_v_elementNodesArray = ((PyArrayObject *)values[1]);
36580  __pyx_v_nodeElementOffsets = ((PyArrayObject *)values[2]);
36581  __pyx_v_nodeElementsArray = ((PyArrayObject *)values[3]);
36582  __pyx_v_l2g = ((PyArrayObject *)values[4]);
36583  __pyx_v_dof = ((PyArrayObject *)values[5]);
36584  __pyx_v_nodalAverage = ((PyArrayObject *)values[6]);
36585  }
36586  goto __pyx_L4_argument_unpacking_done;
36587  __pyx_L5_argtuple_error:;
36588  __Pyx_RaiseArgtupleInvalid("computeC0P1InterpolantDGP12", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5693, __pyx_L3_error)
36589  __pyx_L3_error:;
36590  __Pyx_AddTraceback("cfemIntegrals.computeC0P1InterpolantDGP12", __pyx_clineno, __pyx_lineno, __pyx_filename);
36591  __Pyx_RefNannyFinishContext();
36592  return NULL;
36593  __pyx_L4_argument_unpacking_done:;
36594  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNodesArray), __pyx_ptype_5numpy_ndarray, 1, "elementNodesArray", 0))) __PYX_ERR(0, 5694, __pyx_L1_error)
36595  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodeElementOffsets), __pyx_ptype_5numpy_ndarray, 1, "nodeElementOffsets", 0))) __PYX_ERR(0, 5695, __pyx_L1_error)
36596  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodeElementsArray), __pyx_ptype_5numpy_ndarray, 1, "nodeElementsArray", 0))) __PYX_ERR(0, 5696, __pyx_L1_error)
36597  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_l2g), __pyx_ptype_5numpy_ndarray, 1, "l2g", 0))) __PYX_ERR(0, 5697, __pyx_L1_error)
36598  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dof), __pyx_ptype_5numpy_ndarray, 1, "dof", 0))) __PYX_ERR(0, 5698, __pyx_L1_error)
36599  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodalAverage), __pyx_ptype_5numpy_ndarray, 1, "nodalAverage", 0))) __PYX_ERR(0, 5699, __pyx_L1_error)
36600  __pyx_r = __pyx_pf_13cfemIntegrals_320computeC0P1InterpolantDGP12(__pyx_self, __pyx_v_dim_dof, __pyx_v_elementNodesArray, __pyx_v_nodeElementOffsets, __pyx_v_nodeElementsArray, __pyx_v_l2g, __pyx_v_dof, __pyx_v_nodalAverage);
36601 
36602  /* function exit code */
36603  goto __pyx_L0;
36604  __pyx_L1_error:;
36605  __pyx_r = NULL;
36606  __pyx_L0:;
36607  __Pyx_RefNannyFinishContext();
36608  return __pyx_r;
36609 }
36610 
36611 static PyObject *__pyx_pf_13cfemIntegrals_320computeC0P1InterpolantDGP12(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_dim_dof, PyArrayObject *__pyx_v_elementNodesArray, PyArrayObject *__pyx_v_nodeElementOffsets, PyArrayObject *__pyx_v_nodeElementsArray, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_dof, PyArrayObject *__pyx_v_nodalAverage) {
36612  int __pyx_v_nElements_global;
36613  int __pyx_v_nNodes_global;
36614  int __pyx_v_nNodes_element;
36615  int __pyx_v_nDOF_element;
36616  PyObject *__pyx_r = NULL;
36617  __Pyx_RefNannyDeclarations
36618  __Pyx_RefNannySetupContext("computeC0P1InterpolantDGP12", 0);
36619 
36620  /* "cfemIntegrals.pyx":5700
36621  * np.ndarray dof,
36622  * np.ndarray nodalAverage):
36623  * cdef int nElements_global = elementNodesArray.shape[0] # <<<<<<<<<<<<<<
36624  * cdef int nNodes_global = nodeElementOffsets.shape[0]-1
36625  * cdef int nNodes_element = elementNodesArray.shape[1]
36626  */
36627  __pyx_v_nElements_global = (__pyx_v_elementNodesArray->dimensions[0]);
36628 
36629  /* "cfemIntegrals.pyx":5701
36630  * np.ndarray nodalAverage):
36631  * cdef int nElements_global = elementNodesArray.shape[0]
36632  * cdef int nNodes_global = nodeElementOffsets.shape[0]-1 # <<<<<<<<<<<<<<
36633  * cdef int nNodes_element = elementNodesArray.shape[1]
36634  * cdef int nDOF_element = l2g.shape[1]
36635  */
36636  __pyx_v_nNodes_global = ((__pyx_v_nodeElementOffsets->dimensions[0]) - 1);
36637 
36638  /* "cfemIntegrals.pyx":5702
36639  * cdef int nElements_global = elementNodesArray.shape[0]
36640  * cdef int nNodes_global = nodeElementOffsets.shape[0]-1
36641  * cdef int nNodes_element = elementNodesArray.shape[1] # <<<<<<<<<<<<<<
36642  * cdef int nDOF_element = l2g.shape[1]
36643  * ccomputeC0P1InterpolantDGP12(nElements_global,
36644  */
36645  __pyx_v_nNodes_element = (__pyx_v_elementNodesArray->dimensions[1]);
36646 
36647  /* "cfemIntegrals.pyx":5703
36648  * cdef int nNodes_global = nodeElementOffsets.shape[0]-1
36649  * cdef int nNodes_element = elementNodesArray.shape[1]
36650  * cdef int nDOF_element = l2g.shape[1] # <<<<<<<<<<<<<<
36651  * ccomputeC0P1InterpolantDGP12(nElements_global,
36652  * nNodes_global,
36653  */
36654  __pyx_v_nDOF_element = (__pyx_v_l2g->dimensions[1]);
36655 
36656  /* "cfemIntegrals.pyx":5704
36657  * cdef int nNodes_element = elementNodesArray.shape[1]
36658  * cdef int nDOF_element = l2g.shape[1]
36659  * ccomputeC0P1InterpolantDGP12(nElements_global, # <<<<<<<<<<<<<<
36660  * nNodes_global,
36661  * nNodes_element,
36662  */
36663  computeC0P1InterpolantDGP12(__pyx_v_nElements_global, __pyx_v_nNodes_global, __pyx_v_nNodes_element, __pyx_v_nDOF_element, __pyx_v_dim_dof, ((int *)__pyx_v_elementNodesArray->data), ((int *)__pyx_v_nodeElementOffsets->data), ((int *)__pyx_v_nodeElementsArray->data), ((int *)__pyx_v_l2g->data), ((double *)__pyx_v_dof->data), ((double *)__pyx_v_nodalAverage->data));
36664 
36665  /* "cfemIntegrals.pyx":5693
36666  * <double*> dof.data,
36667  * <double*> nodalAverage.data)
36668  * def computeC0P1InterpolantDGP12(int dim_dof, # <<<<<<<<<<<<<<
36669  * np.ndarray elementNodesArray,
36670  * np.ndarray nodeElementOffsets,
36671  */
36672 
36673  /* function exit code */
36674  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
36675  __Pyx_XGIVEREF(__pyx_r);
36676  __Pyx_RefNannyFinishContext();
36677  return __pyx_r;
36678 }
36679 
36680 /* "cfemIntegrals.pyx":5715
36681  * <double*> dof.data,
36682  * <double*> nodalAverage.data)
36683  * def parametricFiniteElementSpace_getValuesGlobalExteriorTrace(np.ndarray exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
36684  * np.ndarray elementBoundaryElementsArray,
36685  * np.ndarray elementBoundaryLocalElementBoundariesArray,
36686  */
36687 
36688 /* Python wrapper */
36689 static PyObject *__pyx_pw_13cfemIntegrals_323parametricFiniteElementSpace_getValuesGlobalExteriorTrace(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
36690 static PyMethodDef __pyx_mdef_13cfemIntegrals_323parametricFiniteElementSpace_getValuesGlobalExteriorTrace = {"parametricFiniteElementSpace_getValuesGlobalExteriorTrace", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_323parametricFiniteElementSpace_getValuesGlobalExteriorTrace, METH_VARARGS|METH_KEYWORDS, 0};
36691 static PyObject *__pyx_pw_13cfemIntegrals_323parametricFiniteElementSpace_getValuesGlobalExteriorTrace(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
36692  PyArrayObject *__pyx_v_exteriorElementBoundariesArray = 0;
36693  PyArrayObject *__pyx_v_elementBoundaryElementsArray = 0;
36694  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray = 0;
36695  PyArrayObject *__pyx_v_psi = 0;
36696  PyArrayObject *__pyx_v_vArray = 0;
36697  int __pyx_lineno = 0;
36698  const char *__pyx_filename = NULL;
36699  int __pyx_clineno = 0;
36700  PyObject *__pyx_r = 0;
36701  __Pyx_RefNannyDeclarations
36702  __Pyx_RefNannySetupContext("parametricFiniteElementSpace_getValuesGlobalExteriorTrace (wrapper)", 0);
36703  {
36704  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exteriorElementBoundariesArray,&__pyx_n_s_elementBoundaryElementsArray,&__pyx_n_s_elementBoundaryLocalElementBound_2,&__pyx_n_s_psi,&__pyx_n_s_vArray,0};
36705  PyObject* values[5] = {0,0,0,0,0};
36706  if (unlikely(__pyx_kwds)) {
36707  Py_ssize_t kw_args;
36708  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
36709  switch (pos_args) {
36710  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
36711  CYTHON_FALLTHROUGH;
36712  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
36713  CYTHON_FALLTHROUGH;
36714  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
36715  CYTHON_FALLTHROUGH;
36716  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
36717  CYTHON_FALLTHROUGH;
36718  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
36719  CYTHON_FALLTHROUGH;
36720  case 0: break;
36721  default: goto __pyx_L5_argtuple_error;
36722  }
36723  kw_args = PyDict_Size(__pyx_kwds);
36724  switch (pos_args) {
36725  case 0:
36726  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exteriorElementBoundariesArray)) != 0)) kw_args--;
36727  else goto __pyx_L5_argtuple_error;
36728  CYTHON_FALLTHROUGH;
36729  case 1:
36730  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElementsArray)) != 0)) kw_args--;
36731  else {
36732  __Pyx_RaiseArgtupleInvalid("parametricFiniteElementSpace_getValuesGlobalExteriorTrace", 1, 5, 5, 1); __PYX_ERR(0, 5715, __pyx_L3_error)
36733  }
36734  CYTHON_FALLTHROUGH;
36735  case 2:
36736  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound_2)) != 0)) kw_args--;
36737  else {
36738  __Pyx_RaiseArgtupleInvalid("parametricFiniteElementSpace_getValuesGlobalExteriorTrace", 1, 5, 5, 2); __PYX_ERR(0, 5715, __pyx_L3_error)
36739  }
36740  CYTHON_FALLTHROUGH;
36741  case 3:
36742  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_psi)) != 0)) kw_args--;
36743  else {
36744  __Pyx_RaiseArgtupleInvalid("parametricFiniteElementSpace_getValuesGlobalExteriorTrace", 1, 5, 5, 3); __PYX_ERR(0, 5715, __pyx_L3_error)
36745  }
36746  CYTHON_FALLTHROUGH;
36747  case 4:
36748  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vArray)) != 0)) kw_args--;
36749  else {
36750  __Pyx_RaiseArgtupleInvalid("parametricFiniteElementSpace_getValuesGlobalExteriorTrace", 1, 5, 5, 4); __PYX_ERR(0, 5715, __pyx_L3_error)
36751  }
36752  }
36753  if (unlikely(kw_args > 0)) {
36754  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parametricFiniteElementSpace_getValuesGlobalExteriorTrace") < 0)) __PYX_ERR(0, 5715, __pyx_L3_error)
36755  }
36756  } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
36757  goto __pyx_L5_argtuple_error;
36758  } else {
36759  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
36760  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
36761  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
36762  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
36763  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
36764  }
36765  __pyx_v_exteriorElementBoundariesArray = ((PyArrayObject *)values[0]);
36766  __pyx_v_elementBoundaryElementsArray = ((PyArrayObject *)values[1]);
36767  __pyx_v_elementBoundaryLocalElementBoundariesArray = ((PyArrayObject *)values[2]);
36768  __pyx_v_psi = ((PyArrayObject *)values[3]);
36769  __pyx_v_vArray = ((PyArrayObject *)values[4]);
36770  }
36771  goto __pyx_L4_argument_unpacking_done;
36772  __pyx_L5_argtuple_error:;
36773  __Pyx_RaiseArgtupleInvalid("parametricFiniteElementSpace_getValuesGlobalExteriorTrace", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5715, __pyx_L3_error)
36774  __pyx_L3_error:;
36775  __Pyx_AddTraceback("cfemIntegrals.parametricFiniteElementSpace_getValuesGlobalExteriorTrace", __pyx_clineno, __pyx_lineno, __pyx_filename);
36776  __Pyx_RefNannyFinishContext();
36777  return NULL;
36778  __pyx_L4_argument_unpacking_done:;
36779  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exteriorElementBoundariesArray), __pyx_ptype_5numpy_ndarray, 1, "exteriorElementBoundariesArray", 0))) __PYX_ERR(0, 5715, __pyx_L1_error)
36780  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElementsArray), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElementsArray", 0))) __PYX_ERR(0, 5716, __pyx_L1_error)
36781  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundariesArray), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundariesArray", 0))) __PYX_ERR(0, 5717, __pyx_L1_error)
36782  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_psi), __pyx_ptype_5numpy_ndarray, 1, "psi", 0))) __PYX_ERR(0, 5718, __pyx_L1_error)
36783  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vArray), __pyx_ptype_5numpy_ndarray, 1, "vArray", 0))) __PYX_ERR(0, 5719, __pyx_L1_error)
36784  __pyx_r = __pyx_pf_13cfemIntegrals_322parametricFiniteElementSpace_getValuesGlobalExteriorTrace(__pyx_self, __pyx_v_exteriorElementBoundariesArray, __pyx_v_elementBoundaryElementsArray, __pyx_v_elementBoundaryLocalElementBoundariesArray, __pyx_v_psi, __pyx_v_vArray);
36785 
36786  /* function exit code */
36787  goto __pyx_L0;
36788  __pyx_L1_error:;
36789  __pyx_r = NULL;
36790  __pyx_L0:;
36791  __Pyx_RefNannyFinishContext();
36792  return __pyx_r;
36793 }
36794 
36795 static PyObject *__pyx_pf_13cfemIntegrals_322parametricFiniteElementSpace_getValuesGlobalExteriorTrace(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_exteriorElementBoundariesArray, PyArrayObject *__pyx_v_elementBoundaryElementsArray, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray, PyArrayObject *__pyx_v_psi, PyArrayObject *__pyx_v_vArray) {
36796  int __pyx_v_nElementBoundaries_element;
36797  int __pyx_v_nElementBoundaryQuadraturePoints_elementBoundary;
36798  int __pyx_v_nDOF_element;
36799  int __pyx_v_nExteriorElementBoundaries_global;
36800  PyObject *__pyx_r = NULL;
36801  __Pyx_RefNannyDeclarations
36802  __Pyx_RefNannySetupContext("parametricFiniteElementSpace_getValuesGlobalExteriorTrace", 0);
36803 
36804  /* "cfemIntegrals.pyx":5720
36805  * np.ndarray psi,
36806  * np.ndarray vArray):
36807  * cdef int nElementBoundaries_element = psi.shape[0] # <<<<<<<<<<<<<<
36808  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = psi.shape[1]
36809  * cdef int nDOF_element = psi.shape[2]
36810  */
36811  __pyx_v_nElementBoundaries_element = (__pyx_v_psi->dimensions[0]);
36812 
36813  /* "cfemIntegrals.pyx":5721
36814  * np.ndarray vArray):
36815  * cdef int nElementBoundaries_element = psi.shape[0]
36816  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = psi.shape[1] # <<<<<<<<<<<<<<
36817  * cdef int nDOF_element = psi.shape[2]
36818  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundariesArray.shape[0]
36819  */
36820  __pyx_v_nElementBoundaryQuadraturePoints_elementBoundary = (__pyx_v_psi->dimensions[1]);
36821 
36822  /* "cfemIntegrals.pyx":5722
36823  * cdef int nElementBoundaries_element = psi.shape[0]
36824  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = psi.shape[1]
36825  * cdef int nDOF_element = psi.shape[2] # <<<<<<<<<<<<<<
36826  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundariesArray.shape[0]
36827  * cparametricFiniteElementSpace_getValuesGlobalExteriorTrace(nElementBoundaries_element,
36828  */
36829  __pyx_v_nDOF_element = (__pyx_v_psi->dimensions[2]);
36830 
36831  /* "cfemIntegrals.pyx":5723
36832  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = psi.shape[1]
36833  * cdef int nDOF_element = psi.shape[2]
36834  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundariesArray.shape[0] # <<<<<<<<<<<<<<
36835  * cparametricFiniteElementSpace_getValuesGlobalExteriorTrace(nElementBoundaries_element,
36836  * nElementBoundaryQuadraturePoints_elementBoundary,
36837  */
36838  __pyx_v_nExteriorElementBoundaries_global = (__pyx_v_exteriorElementBoundariesArray->dimensions[0]);
36839 
36840  /* "cfemIntegrals.pyx":5724
36841  * cdef int nDOF_element = psi.shape[2]
36842  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundariesArray.shape[0]
36843  * cparametricFiniteElementSpace_getValuesGlobalExteriorTrace(nElementBoundaries_element, # <<<<<<<<<<<<<<
36844  * nElementBoundaryQuadraturePoints_elementBoundary,
36845  * nDOF_element,
36846  */
36847  parametricFiniteElementSpace_getValuesGlobalExteriorTrace(__pyx_v_nElementBoundaries_element, __pyx_v_nElementBoundaryQuadraturePoints_elementBoundary, __pyx_v_nDOF_element, __pyx_v_nExteriorElementBoundaries_global, ((int *)__pyx_v_exteriorElementBoundariesArray->data), ((int *)__pyx_v_elementBoundaryElementsArray->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundariesArray->data), ((double *)__pyx_v_psi->data), ((double *)__pyx_v_vArray->data));
36848 
36849  /* "cfemIntegrals.pyx":5715
36850  * <double*> dof.data,
36851  * <double*> nodalAverage.data)
36852  * def parametricFiniteElementSpace_getValuesGlobalExteriorTrace(np.ndarray exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
36853  * np.ndarray elementBoundaryElementsArray,
36854  * np.ndarray elementBoundaryLocalElementBoundariesArray,
36855  */
36856 
36857  /* function exit code */
36858  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
36859  __Pyx_XGIVEREF(__pyx_r);
36860  __Pyx_RefNannyFinishContext();
36861  return __pyx_r;
36862 }
36863 
36864 /* "cfemIntegrals.pyx":5733
36865  * <double*> psi.data,
36866  * <double*> vArray.data)
36867  * def parametricFiniteElementSpace_getGradientValuesGlobalExteriorTrace(np.ndarray exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
36868  * np.ndarray elementBoundaryElementsArray,
36869  * np.ndarray elementBoundaryLocalElementBoundariesArray,
36870  */
36871 
36872 /* Python wrapper */
36873 static PyObject *__pyx_pw_13cfemIntegrals_325parametricFiniteElementSpace_getGradientValuesGlobalExteriorTrace(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
36874 static PyMethodDef __pyx_mdef_13cfemIntegrals_325parametricFiniteElementSpace_getGradientValuesGlobalExteriorTrace = {"parametricFiniteElementSpace_getGradientValuesGlobalExteriorTrace", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_325parametricFiniteElementSpace_getGradientValuesGlobalExteriorTrace, METH_VARARGS|METH_KEYWORDS, 0};
36875 static PyObject *__pyx_pw_13cfemIntegrals_325parametricFiniteElementSpace_getGradientValuesGlobalExteriorTrace(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
36876  PyArrayObject *__pyx_v_exteriorElementBoundariesArray = 0;
36877  PyArrayObject *__pyx_v_elementBoundaryElementsArray = 0;
36878  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray = 0;
36879  PyArrayObject *__pyx_v_grad_psi = 0;
36880  PyArrayObject *__pyx_v_inverseJacobianArray = 0;
36881  PyArrayObject *__pyx_v_grad_vArray = 0;
36882  int __pyx_lineno = 0;
36883  const char *__pyx_filename = NULL;
36884  int __pyx_clineno = 0;
36885  PyObject *__pyx_r = 0;
36886  __Pyx_RefNannyDeclarations
36887  __Pyx_RefNannySetupContext("parametricFiniteElementSpace_getGradientValuesGlobalExteriorTrace (wrapper)", 0);
36888  {
36889  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exteriorElementBoundariesArray,&__pyx_n_s_elementBoundaryElementsArray,&__pyx_n_s_elementBoundaryLocalElementBound_2,&__pyx_n_s_grad_psi,&__pyx_n_s_inverseJacobianArray,&__pyx_n_s_grad_vArray,0};
36890  PyObject* values[6] = {0,0,0,0,0,0};
36891  if (unlikely(__pyx_kwds)) {
36892  Py_ssize_t kw_args;
36893  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
36894  switch (pos_args) {
36895  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
36896  CYTHON_FALLTHROUGH;
36897  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
36898  CYTHON_FALLTHROUGH;
36899  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
36900  CYTHON_FALLTHROUGH;
36901  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
36902  CYTHON_FALLTHROUGH;
36903  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
36904  CYTHON_FALLTHROUGH;
36905  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
36906  CYTHON_FALLTHROUGH;
36907  case 0: break;
36908  default: goto __pyx_L5_argtuple_error;
36909  }
36910  kw_args = PyDict_Size(__pyx_kwds);
36911  switch (pos_args) {
36912  case 0:
36913  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exteriorElementBoundariesArray)) != 0)) kw_args--;
36914  else goto __pyx_L5_argtuple_error;
36915  CYTHON_FALLTHROUGH;
36916  case 1:
36917  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElementsArray)) != 0)) kw_args--;
36918  else {
36919  __Pyx_RaiseArgtupleInvalid("parametricFiniteElementSpace_getGradientValuesGlobalExteriorTrace", 1, 6, 6, 1); __PYX_ERR(0, 5733, __pyx_L3_error)
36920  }
36921  CYTHON_FALLTHROUGH;
36922  case 2:
36923  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound_2)) != 0)) kw_args--;
36924  else {
36925  __Pyx_RaiseArgtupleInvalid("parametricFiniteElementSpace_getGradientValuesGlobalExteriorTrace", 1, 6, 6, 2); __PYX_ERR(0, 5733, __pyx_L3_error)
36926  }
36927  CYTHON_FALLTHROUGH;
36928  case 3:
36929  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_psi)) != 0)) kw_args--;
36930  else {
36931  __Pyx_RaiseArgtupleInvalid("parametricFiniteElementSpace_getGradientValuesGlobalExteriorTrace", 1, 6, 6, 3); __PYX_ERR(0, 5733, __pyx_L3_error)
36932  }
36933  CYTHON_FALLTHROUGH;
36934  case 4:
36935  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inverseJacobianArray)) != 0)) kw_args--;
36936  else {
36937  __Pyx_RaiseArgtupleInvalid("parametricFiniteElementSpace_getGradientValuesGlobalExteriorTrace", 1, 6, 6, 4); __PYX_ERR(0, 5733, __pyx_L3_error)
36938  }
36939  CYTHON_FALLTHROUGH;
36940  case 5:
36941  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_vArray)) != 0)) kw_args--;
36942  else {
36943  __Pyx_RaiseArgtupleInvalid("parametricFiniteElementSpace_getGradientValuesGlobalExteriorTrace", 1, 6, 6, 5); __PYX_ERR(0, 5733, __pyx_L3_error)
36944  }
36945  }
36946  if (unlikely(kw_args > 0)) {
36947  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parametricFiniteElementSpace_getGradientValuesGlobalExteriorTrace") < 0)) __PYX_ERR(0, 5733, __pyx_L3_error)
36948  }
36949  } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
36950  goto __pyx_L5_argtuple_error;
36951  } else {
36952  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
36953  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
36954  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
36955  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
36956  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
36957  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
36958  }
36959  __pyx_v_exteriorElementBoundariesArray = ((PyArrayObject *)values[0]);
36960  __pyx_v_elementBoundaryElementsArray = ((PyArrayObject *)values[1]);
36961  __pyx_v_elementBoundaryLocalElementBoundariesArray = ((PyArrayObject *)values[2]);
36962  __pyx_v_grad_psi = ((PyArrayObject *)values[3]);
36963  __pyx_v_inverseJacobianArray = ((PyArrayObject *)values[4]);
36964  __pyx_v_grad_vArray = ((PyArrayObject *)values[5]);
36965  }
36966  goto __pyx_L4_argument_unpacking_done;
36967  __pyx_L5_argtuple_error:;
36968  __Pyx_RaiseArgtupleInvalid("parametricFiniteElementSpace_getGradientValuesGlobalExteriorTrace", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5733, __pyx_L3_error)
36969  __pyx_L3_error:;
36970  __Pyx_AddTraceback("cfemIntegrals.parametricFiniteElementSpace_getGradientValuesGlobalExteriorTrace", __pyx_clineno, __pyx_lineno, __pyx_filename);
36971  __Pyx_RefNannyFinishContext();
36972  return NULL;
36973  __pyx_L4_argument_unpacking_done:;
36974  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exteriorElementBoundariesArray), __pyx_ptype_5numpy_ndarray, 1, "exteriorElementBoundariesArray", 0))) __PYX_ERR(0, 5733, __pyx_L1_error)
36975  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElementsArray), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElementsArray", 0))) __PYX_ERR(0, 5734, __pyx_L1_error)
36976  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundariesArray), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundariesArray", 0))) __PYX_ERR(0, 5735, __pyx_L1_error)
36977  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_psi), __pyx_ptype_5numpy_ndarray, 1, "grad_psi", 0))) __PYX_ERR(0, 5736, __pyx_L1_error)
36978  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_inverseJacobianArray), __pyx_ptype_5numpy_ndarray, 1, "inverseJacobianArray", 0))) __PYX_ERR(0, 5737, __pyx_L1_error)
36979  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_vArray), __pyx_ptype_5numpy_ndarray, 1, "grad_vArray", 0))) __PYX_ERR(0, 5738, __pyx_L1_error)
36980  __pyx_r = __pyx_pf_13cfemIntegrals_324parametricFiniteElementSpace_getGradientValuesGlobalExteriorTrace(__pyx_self, __pyx_v_exteriorElementBoundariesArray, __pyx_v_elementBoundaryElementsArray, __pyx_v_elementBoundaryLocalElementBoundariesArray, __pyx_v_grad_psi, __pyx_v_inverseJacobianArray, __pyx_v_grad_vArray);
36981 
36982  /* function exit code */
36983  goto __pyx_L0;
36984  __pyx_L1_error:;
36985  __pyx_r = NULL;
36986  __pyx_L0:;
36987  __Pyx_RefNannyFinishContext();
36988  return __pyx_r;
36989 }
36990 
36991 static PyObject *__pyx_pf_13cfemIntegrals_324parametricFiniteElementSpace_getGradientValuesGlobalExteriorTrace(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_exteriorElementBoundariesArray, PyArrayObject *__pyx_v_elementBoundaryElementsArray, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray, PyArrayObject *__pyx_v_grad_psi, PyArrayObject *__pyx_v_inverseJacobianArray, PyArrayObject *__pyx_v_grad_vArray) {
36992  int __pyx_v_nElementBoundaries_element;
36993  int __pyx_v_nElementBoundaryQuadraturePoints_elementBoundary;
36994  int __pyx_v_nDOF_element;
36995  int __pyx_v_nSpace_global;
36996  int __pyx_v_nExteriorElementBoundaries_global;
36997  PyObject *__pyx_r = NULL;
36998  __Pyx_RefNannyDeclarations
36999  __Pyx_RefNannySetupContext("parametricFiniteElementSpace_getGradientValuesGlobalExteriorTrace", 0);
37000 
37001  /* "cfemIntegrals.pyx":5739
37002  * np.ndarray inverseJacobianArray,
37003  * np.ndarray grad_vArray):
37004  * cdef int nElementBoundaries_element = grad_psi.shape[0] # <<<<<<<<<<<<<<
37005  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = grad_psi.shape[1]
37006  * cdef int nDOF_element = grad_psi.shape[2]
37007  */
37008  __pyx_v_nElementBoundaries_element = (__pyx_v_grad_psi->dimensions[0]);
37009 
37010  /* "cfemIntegrals.pyx":5740
37011  * np.ndarray grad_vArray):
37012  * cdef int nElementBoundaries_element = grad_psi.shape[0]
37013  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = grad_psi.shape[1] # <<<<<<<<<<<<<<
37014  * cdef int nDOF_element = grad_psi.shape[2]
37015  * cdef int nSpace_global = grad_vArray.shape[3]
37016  */
37017  __pyx_v_nElementBoundaryQuadraturePoints_elementBoundary = (__pyx_v_grad_psi->dimensions[1]);
37018 
37019  /* "cfemIntegrals.pyx":5741
37020  * cdef int nElementBoundaries_element = grad_psi.shape[0]
37021  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = grad_psi.shape[1]
37022  * cdef int nDOF_element = grad_psi.shape[2] # <<<<<<<<<<<<<<
37023  * cdef int nSpace_global = grad_vArray.shape[3]
37024  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundariesArray.shape[0]
37025  */
37026  __pyx_v_nDOF_element = (__pyx_v_grad_psi->dimensions[2]);
37027 
37028  /* "cfemIntegrals.pyx":5742
37029  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = grad_psi.shape[1]
37030  * cdef int nDOF_element = grad_psi.shape[2]
37031  * cdef int nSpace_global = grad_vArray.shape[3] # <<<<<<<<<<<<<<
37032  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundariesArray.shape[0]
37033  * cparametricFiniteElementSpace_getGradientValuesGlobalExteriorTrace(nElementBoundaries_element,
37034  */
37035  __pyx_v_nSpace_global = (__pyx_v_grad_vArray->dimensions[3]);
37036 
37037  /* "cfemIntegrals.pyx":5743
37038  * cdef int nDOF_element = grad_psi.shape[2]
37039  * cdef int nSpace_global = grad_vArray.shape[3]
37040  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundariesArray.shape[0] # <<<<<<<<<<<<<<
37041  * cparametricFiniteElementSpace_getGradientValuesGlobalExteriorTrace(nElementBoundaries_element,
37042  * nElementBoundaryQuadraturePoints_elementBoundary,
37043  */
37044  __pyx_v_nExteriorElementBoundaries_global = (__pyx_v_exteriorElementBoundariesArray->dimensions[0]);
37045 
37046  /* "cfemIntegrals.pyx":5744
37047  * cdef int nSpace_global = grad_vArray.shape[3]
37048  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundariesArray.shape[0]
37049  * cparametricFiniteElementSpace_getGradientValuesGlobalExteriorTrace(nElementBoundaries_element, # <<<<<<<<<<<<<<
37050  * nElementBoundaryQuadraturePoints_elementBoundary,
37051  * nDOF_element,
37052  */
37053  parametricFiniteElementSpace_getGradientValuesGlobalExteriorTrace(__pyx_v_nElementBoundaries_element, __pyx_v_nElementBoundaryQuadraturePoints_elementBoundary, __pyx_v_nDOF_element, __pyx_v_nSpace_global, __pyx_v_nExteriorElementBoundaries_global, ((int *)__pyx_v_exteriorElementBoundariesArray->data), ((int *)__pyx_v_elementBoundaryElementsArray->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundariesArray->data), ((double *)__pyx_v_grad_psi->data), ((double *)__pyx_v_inverseJacobianArray->data), ((double *)__pyx_v_grad_vArray->data));
37054 
37055  /* "cfemIntegrals.pyx":5733
37056  * <double*> psi.data,
37057  * <double*> vArray.data)
37058  * def parametricFiniteElementSpace_getGradientValuesGlobalExteriorTrace(np.ndarray exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
37059  * np.ndarray elementBoundaryElementsArray,
37060  * np.ndarray elementBoundaryLocalElementBoundariesArray,
37061  */
37062 
37063  /* function exit code */
37064  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
37065  __Pyx_XGIVEREF(__pyx_r);
37066  __Pyx_RefNannyFinishContext();
37067  return __pyx_r;
37068 }
37069 
37070 /* "cfemIntegrals.pyx":5755
37071  * <double*> inverseJacobianArray.data,
37072  * <double*> grad_vArray.data)
37073  * def parametricMaps_getValuesGlobalExteriorTrace(np.ndarray exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
37074  * np.ndarray elementBoundaryElementsArray,
37075  * np.ndarray elementBoundaryLocalElementBoundariesArray,
37076  */
37077 
37078 /* Python wrapper */
37079 static PyObject *__pyx_pw_13cfemIntegrals_327parametricMaps_getValuesGlobalExteriorTrace(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
37080 static PyMethodDef __pyx_mdef_13cfemIntegrals_327parametricMaps_getValuesGlobalExteriorTrace = {"parametricMaps_getValuesGlobalExteriorTrace", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_327parametricMaps_getValuesGlobalExteriorTrace, METH_VARARGS|METH_KEYWORDS, 0};
37081 static PyObject *__pyx_pw_13cfemIntegrals_327parametricMaps_getValuesGlobalExteriorTrace(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
37082  PyArrayObject *__pyx_v_exteriorElementBoundariesArray = 0;
37083  PyArrayObject *__pyx_v_elementBoundaryElementsArray = 0;
37084  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray = 0;
37085  PyArrayObject *__pyx_v_psi = 0;
37086  PyArrayObject *__pyx_v_l2g = 0;
37087  PyArrayObject *__pyx_v_nodeArray = 0;
37088  PyArrayObject *__pyx_v_xArray = 0;
37089  int __pyx_lineno = 0;
37090  const char *__pyx_filename = NULL;
37091  int __pyx_clineno = 0;
37092  PyObject *__pyx_r = 0;
37093  __Pyx_RefNannyDeclarations
37094  __Pyx_RefNannySetupContext("parametricMaps_getValuesGlobalExteriorTrace (wrapper)", 0);
37095  {
37096  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exteriorElementBoundariesArray,&__pyx_n_s_elementBoundaryElementsArray,&__pyx_n_s_elementBoundaryLocalElementBound_2,&__pyx_n_s_psi,&__pyx_n_s_l2g,&__pyx_n_s_nodeArray,&__pyx_n_s_xArray,0};
37097  PyObject* values[7] = {0,0,0,0,0,0,0};
37098  if (unlikely(__pyx_kwds)) {
37099  Py_ssize_t kw_args;
37100  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
37101  switch (pos_args) {
37102  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
37103  CYTHON_FALLTHROUGH;
37104  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
37105  CYTHON_FALLTHROUGH;
37106  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
37107  CYTHON_FALLTHROUGH;
37108  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
37109  CYTHON_FALLTHROUGH;
37110  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
37111  CYTHON_FALLTHROUGH;
37112  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
37113  CYTHON_FALLTHROUGH;
37114  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
37115  CYTHON_FALLTHROUGH;
37116  case 0: break;
37117  default: goto __pyx_L5_argtuple_error;
37118  }
37119  kw_args = PyDict_Size(__pyx_kwds);
37120  switch (pos_args) {
37121  case 0:
37122  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exteriorElementBoundariesArray)) != 0)) kw_args--;
37123  else goto __pyx_L5_argtuple_error;
37124  CYTHON_FALLTHROUGH;
37125  case 1:
37126  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElementsArray)) != 0)) kw_args--;
37127  else {
37128  __Pyx_RaiseArgtupleInvalid("parametricMaps_getValuesGlobalExteriorTrace", 1, 7, 7, 1); __PYX_ERR(0, 5755, __pyx_L3_error)
37129  }
37130  CYTHON_FALLTHROUGH;
37131  case 2:
37132  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound_2)) != 0)) kw_args--;
37133  else {
37134  __Pyx_RaiseArgtupleInvalid("parametricMaps_getValuesGlobalExteriorTrace", 1, 7, 7, 2); __PYX_ERR(0, 5755, __pyx_L3_error)
37135  }
37136  CYTHON_FALLTHROUGH;
37137  case 3:
37138  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_psi)) != 0)) kw_args--;
37139  else {
37140  __Pyx_RaiseArgtupleInvalid("parametricMaps_getValuesGlobalExteriorTrace", 1, 7, 7, 3); __PYX_ERR(0, 5755, __pyx_L3_error)
37141  }
37142  CYTHON_FALLTHROUGH;
37143  case 4:
37144  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_l2g)) != 0)) kw_args--;
37145  else {
37146  __Pyx_RaiseArgtupleInvalid("parametricMaps_getValuesGlobalExteriorTrace", 1, 7, 7, 4); __PYX_ERR(0, 5755, __pyx_L3_error)
37147  }
37148  CYTHON_FALLTHROUGH;
37149  case 5:
37150  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodeArray)) != 0)) kw_args--;
37151  else {
37152  __Pyx_RaiseArgtupleInvalid("parametricMaps_getValuesGlobalExteriorTrace", 1, 7, 7, 5); __PYX_ERR(0, 5755, __pyx_L3_error)
37153  }
37154  CYTHON_FALLTHROUGH;
37155  case 6:
37156  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xArray)) != 0)) kw_args--;
37157  else {
37158  __Pyx_RaiseArgtupleInvalid("parametricMaps_getValuesGlobalExteriorTrace", 1, 7, 7, 6); __PYX_ERR(0, 5755, __pyx_L3_error)
37159  }
37160  }
37161  if (unlikely(kw_args > 0)) {
37162  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parametricMaps_getValuesGlobalExteriorTrace") < 0)) __PYX_ERR(0, 5755, __pyx_L3_error)
37163  }
37164  } else if (PyTuple_GET_SIZE(__pyx_args) != 7) {
37165  goto __pyx_L5_argtuple_error;
37166  } else {
37167  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
37168  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
37169  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
37170  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
37171  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
37172  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
37173  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
37174  }
37175  __pyx_v_exteriorElementBoundariesArray = ((PyArrayObject *)values[0]);
37176  __pyx_v_elementBoundaryElementsArray = ((PyArrayObject *)values[1]);
37177  __pyx_v_elementBoundaryLocalElementBoundariesArray = ((PyArrayObject *)values[2]);
37178  __pyx_v_psi = ((PyArrayObject *)values[3]);
37179  __pyx_v_l2g = ((PyArrayObject *)values[4]);
37180  __pyx_v_nodeArray = ((PyArrayObject *)values[5]);
37181  __pyx_v_xArray = ((PyArrayObject *)values[6]);
37182  }
37183  goto __pyx_L4_argument_unpacking_done;
37184  __pyx_L5_argtuple_error:;
37185  __Pyx_RaiseArgtupleInvalid("parametricMaps_getValuesGlobalExteriorTrace", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5755, __pyx_L3_error)
37186  __pyx_L3_error:;
37187  __Pyx_AddTraceback("cfemIntegrals.parametricMaps_getValuesGlobalExteriorTrace", __pyx_clineno, __pyx_lineno, __pyx_filename);
37188  __Pyx_RefNannyFinishContext();
37189  return NULL;
37190  __pyx_L4_argument_unpacking_done:;
37191  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exteriorElementBoundariesArray), __pyx_ptype_5numpy_ndarray, 1, "exteriorElementBoundariesArray", 0))) __PYX_ERR(0, 5755, __pyx_L1_error)
37192  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElementsArray), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElementsArray", 0))) __PYX_ERR(0, 5756, __pyx_L1_error)
37193  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundariesArray), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundariesArray", 0))) __PYX_ERR(0, 5757, __pyx_L1_error)
37194  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_psi), __pyx_ptype_5numpy_ndarray, 1, "psi", 0))) __PYX_ERR(0, 5758, __pyx_L1_error)
37195  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_l2g), __pyx_ptype_5numpy_ndarray, 1, "l2g", 0))) __PYX_ERR(0, 5759, __pyx_L1_error)
37196  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodeArray), __pyx_ptype_5numpy_ndarray, 1, "nodeArray", 0))) __PYX_ERR(0, 5760, __pyx_L1_error)
37197  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xArray), __pyx_ptype_5numpy_ndarray, 1, "xArray", 0))) __PYX_ERR(0, 5761, __pyx_L1_error)
37198  __pyx_r = __pyx_pf_13cfemIntegrals_326parametricMaps_getValuesGlobalExteriorTrace(__pyx_self, __pyx_v_exteriorElementBoundariesArray, __pyx_v_elementBoundaryElementsArray, __pyx_v_elementBoundaryLocalElementBoundariesArray, __pyx_v_psi, __pyx_v_l2g, __pyx_v_nodeArray, __pyx_v_xArray);
37199 
37200  /* function exit code */
37201  goto __pyx_L0;
37202  __pyx_L1_error:;
37203  __pyx_r = NULL;
37204  __pyx_L0:;
37205  __Pyx_RefNannyFinishContext();
37206  return __pyx_r;
37207 }
37208 
37209 static PyObject *__pyx_pf_13cfemIntegrals_326parametricMaps_getValuesGlobalExteriorTrace(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_exteriorElementBoundariesArray, PyArrayObject *__pyx_v_elementBoundaryElementsArray, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray, PyArrayObject *__pyx_v_psi, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_nodeArray, PyArrayObject *__pyx_v_xArray) {
37210  int __pyx_v_nQuadraturePoints_elementBoundary;
37211  int __pyx_v_nDOF_element;
37212  int __pyx_v_nSpace_global;
37213  int __pyx_v_nExteriorElementBoundaries_global;
37214  PyObject *__pyx_r = NULL;
37215  __Pyx_RefNannyDeclarations
37216  __Pyx_RefNannySetupContext("parametricMaps_getValuesGlobalExteriorTrace", 0);
37217 
37218  /* "cfemIntegrals.pyx":5762
37219  * np.ndarray nodeArray,
37220  * np.ndarray xArray):
37221  * cdef int nQuadraturePoints_elementBoundary = xArray.shape[1] # <<<<<<<<<<<<<<
37222  * cdef int nDOF_element = l2g.shape[1]
37223  * cdef int nSpace_global = xArray.shape[2]
37224  */
37225  __pyx_v_nQuadraturePoints_elementBoundary = (__pyx_v_xArray->dimensions[1]);
37226 
37227  /* "cfemIntegrals.pyx":5763
37228  * np.ndarray xArray):
37229  * cdef int nQuadraturePoints_elementBoundary = xArray.shape[1]
37230  * cdef int nDOF_element = l2g.shape[1] # <<<<<<<<<<<<<<
37231  * cdef int nSpace_global = xArray.shape[2]
37232  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundariesArray.shape[0]
37233  */
37234  __pyx_v_nDOF_element = (__pyx_v_l2g->dimensions[1]);
37235 
37236  /* "cfemIntegrals.pyx":5764
37237  * cdef int nQuadraturePoints_elementBoundary = xArray.shape[1]
37238  * cdef int nDOF_element = l2g.shape[1]
37239  * cdef int nSpace_global = xArray.shape[2] # <<<<<<<<<<<<<<
37240  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundariesArray.shape[0]
37241  * cparametricMaps_getValuesGlobalExteriorTrace(nQuadraturePoints_elementBoundary,
37242  */
37243  __pyx_v_nSpace_global = (__pyx_v_xArray->dimensions[2]);
37244 
37245  /* "cfemIntegrals.pyx":5765
37246  * cdef int nDOF_element = l2g.shape[1]
37247  * cdef int nSpace_global = xArray.shape[2]
37248  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundariesArray.shape[0] # <<<<<<<<<<<<<<
37249  * cparametricMaps_getValuesGlobalExteriorTrace(nQuadraturePoints_elementBoundary,
37250  * nDOF_element,
37251  */
37252  __pyx_v_nExteriorElementBoundaries_global = (__pyx_v_exteriorElementBoundariesArray->dimensions[0]);
37253 
37254  /* "cfemIntegrals.pyx":5766
37255  * cdef int nSpace_global = xArray.shape[2]
37256  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundariesArray.shape[0]
37257  * cparametricMaps_getValuesGlobalExteriorTrace(nQuadraturePoints_elementBoundary, # <<<<<<<<<<<<<<
37258  * nDOF_element,
37259  * nSpace_global,
37260  */
37261  parametricMaps_getValuesGlobalExteriorTrace(__pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nDOF_element, __pyx_v_nSpace_global, __pyx_v_nExteriorElementBoundaries_global, ((int *)__pyx_v_exteriorElementBoundariesArray->data), ((int *)__pyx_v_elementBoundaryElementsArray->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundariesArray->data), ((double *)__pyx_v_psi->data), ((int *)__pyx_v_l2g->data), ((double *)__pyx_v_nodeArray->data), ((double *)__pyx_v_xArray->data));
37262 
37263  /* "cfemIntegrals.pyx":5755
37264  * <double*> inverseJacobianArray.data,
37265  * <double*> grad_vArray.data)
37266  * def parametricMaps_getValuesGlobalExteriorTrace(np.ndarray exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
37267  * np.ndarray elementBoundaryElementsArray,
37268  * np.ndarray elementBoundaryLocalElementBoundariesArray,
37269  */
37270 
37271  /* function exit code */
37272  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
37273  __Pyx_XGIVEREF(__pyx_r);
37274  __Pyx_RefNannyFinishContext();
37275  return __pyx_r;
37276 }
37277 
37278 /* "cfemIntegrals.pyx":5777
37279  * <double*> nodeArray.data,
37280  * <double*> xArray.data)
37281  * def parametricMaps_getInverseValuesGlobalExteriorTrace(np.ndarray exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
37282  * np.ndarray elementBoundaryElementsArray,
37283  * np.ndarray elementBoundaryLocalElementBoundariesArray,
37284  */
37285 
37286 /* Python wrapper */
37287 static PyObject *__pyx_pw_13cfemIntegrals_329parametricMaps_getInverseValuesGlobalExteriorTrace(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
37288 static PyMethodDef __pyx_mdef_13cfemIntegrals_329parametricMaps_getInverseValuesGlobalExteriorTrace = {"parametricMaps_getInverseValuesGlobalExteriorTrace", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_329parametricMaps_getInverseValuesGlobalExteriorTrace, METH_VARARGS|METH_KEYWORDS, 0};
37289 static PyObject *__pyx_pw_13cfemIntegrals_329parametricMaps_getInverseValuesGlobalExteriorTrace(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
37290  PyArrayObject *__pyx_v_exteriorElementBoundariesArray = 0;
37291  PyArrayObject *__pyx_v_elementBoundaryElementsArray = 0;
37292  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray = 0;
37293  PyArrayObject *__pyx_v_inverseJacobian = 0;
37294  PyArrayObject *__pyx_v_l2g = 0;
37295  PyArrayObject *__pyx_v_nodeArray = 0;
37296  PyArrayObject *__pyx_v_xArray = 0;
37297  PyArrayObject *__pyx_v_xiArray = 0;
37298  int __pyx_lineno = 0;
37299  const char *__pyx_filename = NULL;
37300  int __pyx_clineno = 0;
37301  PyObject *__pyx_r = 0;
37302  __Pyx_RefNannyDeclarations
37303  __Pyx_RefNannySetupContext("parametricMaps_getInverseValuesGlobalExteriorTrace (wrapper)", 0);
37304  {
37305  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exteriorElementBoundariesArray,&__pyx_n_s_elementBoundaryElementsArray,&__pyx_n_s_elementBoundaryLocalElementBound_2,&__pyx_n_s_inverseJacobian,&__pyx_n_s_l2g,&__pyx_n_s_nodeArray,&__pyx_n_s_xArray,&__pyx_n_s_xiArray,0};
37306  PyObject* values[8] = {0,0,0,0,0,0,0,0};
37307  if (unlikely(__pyx_kwds)) {
37308  Py_ssize_t kw_args;
37309  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
37310  switch (pos_args) {
37311  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
37312  CYTHON_FALLTHROUGH;
37313  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
37314  CYTHON_FALLTHROUGH;
37315  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
37316  CYTHON_FALLTHROUGH;
37317  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
37318  CYTHON_FALLTHROUGH;
37319  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
37320  CYTHON_FALLTHROUGH;
37321  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
37322  CYTHON_FALLTHROUGH;
37323  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
37324  CYTHON_FALLTHROUGH;
37325  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
37326  CYTHON_FALLTHROUGH;
37327  case 0: break;
37328  default: goto __pyx_L5_argtuple_error;
37329  }
37330  kw_args = PyDict_Size(__pyx_kwds);
37331  switch (pos_args) {
37332  case 0:
37333  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exteriorElementBoundariesArray)) != 0)) kw_args--;
37334  else goto __pyx_L5_argtuple_error;
37335  CYTHON_FALLTHROUGH;
37336  case 1:
37337  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElementsArray)) != 0)) kw_args--;
37338  else {
37339  __Pyx_RaiseArgtupleInvalid("parametricMaps_getInverseValuesGlobalExteriorTrace", 1, 8, 8, 1); __PYX_ERR(0, 5777, __pyx_L3_error)
37340  }
37341  CYTHON_FALLTHROUGH;
37342  case 2:
37343  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound_2)) != 0)) kw_args--;
37344  else {
37345  __Pyx_RaiseArgtupleInvalid("parametricMaps_getInverseValuesGlobalExteriorTrace", 1, 8, 8, 2); __PYX_ERR(0, 5777, __pyx_L3_error)
37346  }
37347  CYTHON_FALLTHROUGH;
37348  case 3:
37349  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inverseJacobian)) != 0)) kw_args--;
37350  else {
37351  __Pyx_RaiseArgtupleInvalid("parametricMaps_getInverseValuesGlobalExteriorTrace", 1, 8, 8, 3); __PYX_ERR(0, 5777, __pyx_L3_error)
37352  }
37353  CYTHON_FALLTHROUGH;
37354  case 4:
37355  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_l2g)) != 0)) kw_args--;
37356  else {
37357  __Pyx_RaiseArgtupleInvalid("parametricMaps_getInverseValuesGlobalExteriorTrace", 1, 8, 8, 4); __PYX_ERR(0, 5777, __pyx_L3_error)
37358  }
37359  CYTHON_FALLTHROUGH;
37360  case 5:
37361  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodeArray)) != 0)) kw_args--;
37362  else {
37363  __Pyx_RaiseArgtupleInvalid("parametricMaps_getInverseValuesGlobalExteriorTrace", 1, 8, 8, 5); __PYX_ERR(0, 5777, __pyx_L3_error)
37364  }
37365  CYTHON_FALLTHROUGH;
37366  case 6:
37367  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xArray)) != 0)) kw_args--;
37368  else {
37369  __Pyx_RaiseArgtupleInvalid("parametricMaps_getInverseValuesGlobalExteriorTrace", 1, 8, 8, 6); __PYX_ERR(0, 5777, __pyx_L3_error)
37370  }
37371  CYTHON_FALLTHROUGH;
37372  case 7:
37373  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xiArray)) != 0)) kw_args--;
37374  else {
37375  __Pyx_RaiseArgtupleInvalid("parametricMaps_getInverseValuesGlobalExteriorTrace", 1, 8, 8, 7); __PYX_ERR(0, 5777, __pyx_L3_error)
37376  }
37377  }
37378  if (unlikely(kw_args > 0)) {
37379  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parametricMaps_getInverseValuesGlobalExteriorTrace") < 0)) __PYX_ERR(0, 5777, __pyx_L3_error)
37380  }
37381  } else if (PyTuple_GET_SIZE(__pyx_args) != 8) {
37382  goto __pyx_L5_argtuple_error;
37383  } else {
37384  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
37385  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
37386  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
37387  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
37388  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
37389  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
37390  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
37391  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
37392  }
37393  __pyx_v_exteriorElementBoundariesArray = ((PyArrayObject *)values[0]);
37394  __pyx_v_elementBoundaryElementsArray = ((PyArrayObject *)values[1]);
37395  __pyx_v_elementBoundaryLocalElementBoundariesArray = ((PyArrayObject *)values[2]);
37396  __pyx_v_inverseJacobian = ((PyArrayObject *)values[3]);
37397  __pyx_v_l2g = ((PyArrayObject *)values[4]);
37398  __pyx_v_nodeArray = ((PyArrayObject *)values[5]);
37399  __pyx_v_xArray = ((PyArrayObject *)values[6]);
37400  __pyx_v_xiArray = ((PyArrayObject *)values[7]);
37401  }
37402  goto __pyx_L4_argument_unpacking_done;
37403  __pyx_L5_argtuple_error:;
37404  __Pyx_RaiseArgtupleInvalid("parametricMaps_getInverseValuesGlobalExteriorTrace", 1, 8, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5777, __pyx_L3_error)
37405  __pyx_L3_error:;
37406  __Pyx_AddTraceback("cfemIntegrals.parametricMaps_getInverseValuesGlobalExteriorTrace", __pyx_clineno, __pyx_lineno, __pyx_filename);
37407  __Pyx_RefNannyFinishContext();
37408  return NULL;
37409  __pyx_L4_argument_unpacking_done:;
37410  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exteriorElementBoundariesArray), __pyx_ptype_5numpy_ndarray, 1, "exteriorElementBoundariesArray", 0))) __PYX_ERR(0, 5777, __pyx_L1_error)
37411  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElementsArray), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElementsArray", 0))) __PYX_ERR(0, 5778, __pyx_L1_error)
37412  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundariesArray), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundariesArray", 0))) __PYX_ERR(0, 5779, __pyx_L1_error)
37413  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_inverseJacobian), __pyx_ptype_5numpy_ndarray, 1, "inverseJacobian", 0))) __PYX_ERR(0, 5780, __pyx_L1_error)
37414  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_l2g), __pyx_ptype_5numpy_ndarray, 1, "l2g", 0))) __PYX_ERR(0, 5781, __pyx_L1_error)
37415  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodeArray), __pyx_ptype_5numpy_ndarray, 1, "nodeArray", 0))) __PYX_ERR(0, 5782, __pyx_L1_error)
37416  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xArray), __pyx_ptype_5numpy_ndarray, 1, "xArray", 0))) __PYX_ERR(0, 5783, __pyx_L1_error)
37417  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xiArray), __pyx_ptype_5numpy_ndarray, 1, "xiArray", 0))) __PYX_ERR(0, 5784, __pyx_L1_error)
37418  __pyx_r = __pyx_pf_13cfemIntegrals_328parametricMaps_getInverseValuesGlobalExteriorTrace(__pyx_self, __pyx_v_exteriorElementBoundariesArray, __pyx_v_elementBoundaryElementsArray, __pyx_v_elementBoundaryLocalElementBoundariesArray, __pyx_v_inverseJacobian, __pyx_v_l2g, __pyx_v_nodeArray, __pyx_v_xArray, __pyx_v_xiArray);
37419 
37420  /* function exit code */
37421  goto __pyx_L0;
37422  __pyx_L1_error:;
37423  __pyx_r = NULL;
37424  __pyx_L0:;
37425  __Pyx_RefNannyFinishContext();
37426  return __pyx_r;
37427 }
37428 
37429 static PyObject *__pyx_pf_13cfemIntegrals_328parametricMaps_getInverseValuesGlobalExteriorTrace(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_exteriorElementBoundariesArray, PyArrayObject *__pyx_v_elementBoundaryElementsArray, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray, PyArrayObject *__pyx_v_inverseJacobian, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_nodeArray, PyArrayObject *__pyx_v_xArray, PyArrayObject *__pyx_v_xiArray) {
37430  int __pyx_v_nElementBoundaryQuadraturePoints_elementBoundary;
37431  int __pyx_v_nDOF_element;
37432  int __pyx_v_nSpace_global;
37433  int __pyx_v_nExteriorElementBoundaries_global;
37434  PyObject *__pyx_r = NULL;
37435  __Pyx_RefNannyDeclarations
37436  __Pyx_RefNannySetupContext("parametricMaps_getInverseValuesGlobalExteriorTrace", 0);
37437 
37438  /* "cfemIntegrals.pyx":5785
37439  * np.ndarray xArray,
37440  * np.ndarray xiArray):
37441  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = xArray.shape[1] # <<<<<<<<<<<<<<
37442  * cdef int nDOF_element = l2g.shape[1]
37443  * cdef int nSpace_global = inverseJacobian.shape[3]
37444  */
37445  __pyx_v_nElementBoundaryQuadraturePoints_elementBoundary = (__pyx_v_xArray->dimensions[1]);
37446 
37447  /* "cfemIntegrals.pyx":5786
37448  * np.ndarray xiArray):
37449  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = xArray.shape[1]
37450  * cdef int nDOF_element = l2g.shape[1] # <<<<<<<<<<<<<<
37451  * cdef int nSpace_global = inverseJacobian.shape[3]
37452  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundariesArray.shape[0]
37453  */
37454  __pyx_v_nDOF_element = (__pyx_v_l2g->dimensions[1]);
37455 
37456  /* "cfemIntegrals.pyx":5787
37457  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = xArray.shape[1]
37458  * cdef int nDOF_element = l2g.shape[1]
37459  * cdef int nSpace_global = inverseJacobian.shape[3] # <<<<<<<<<<<<<<
37460  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundariesArray.shape[0]
37461  * cparametricMaps_getInverseValuesGlobalExteriorTrace(nElementBoundaryQuadraturePoints_elementBoundary,
37462  */
37463  __pyx_v_nSpace_global = (__pyx_v_inverseJacobian->dimensions[3]);
37464 
37465  /* "cfemIntegrals.pyx":5788
37466  * cdef int nDOF_element = l2g.shape[1]
37467  * cdef int nSpace_global = inverseJacobian.shape[3]
37468  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundariesArray.shape[0] # <<<<<<<<<<<<<<
37469  * cparametricMaps_getInverseValuesGlobalExteriorTrace(nElementBoundaryQuadraturePoints_elementBoundary,
37470  * nDOF_element,
37471  */
37472  __pyx_v_nExteriorElementBoundaries_global = (__pyx_v_exteriorElementBoundariesArray->dimensions[0]);
37473 
37474  /* "cfemIntegrals.pyx":5789
37475  * cdef int nSpace_global = inverseJacobian.shape[3]
37476  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundariesArray.shape[0]
37477  * cparametricMaps_getInverseValuesGlobalExteriorTrace(nElementBoundaryQuadraturePoints_elementBoundary, # <<<<<<<<<<<<<<
37478  * nDOF_element,
37479  * nSpace_global,
37480  */
37481  parametricMaps_getInverseValuesGlobalExteriorTrace(__pyx_v_nElementBoundaryQuadraturePoints_elementBoundary, __pyx_v_nDOF_element, __pyx_v_nSpace_global, __pyx_v_nExteriorElementBoundaries_global, ((int *)__pyx_v_exteriorElementBoundariesArray->data), ((int *)__pyx_v_elementBoundaryElementsArray->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundariesArray->data), ((double *)__pyx_v_inverseJacobian->data), ((int *)__pyx_v_l2g->data), ((double *)__pyx_v_nodeArray->data), ((double *)__pyx_v_xArray->data), ((double *)__pyx_v_xiArray->data));
37482 
37483  /* "cfemIntegrals.pyx":5777
37484  * <double*> nodeArray.data,
37485  * <double*> xArray.data)
37486  * def parametricMaps_getInverseValuesGlobalExteriorTrace(np.ndarray exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
37487  * np.ndarray elementBoundaryElementsArray,
37488  * np.ndarray elementBoundaryLocalElementBoundariesArray,
37489  */
37490 
37491  /* function exit code */
37492  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
37493  __Pyx_XGIVEREF(__pyx_r);
37494  __Pyx_RefNannyFinishContext();
37495  return __pyx_r;
37496 }
37497 
37498 /* "cfemIntegrals.pyx":5801
37499  * <double*> xArray.data,
37500  * <double*> xiArray.data)
37501  * def parametricMaps_getJacobianValuesGlobalExteriorTrace(np.ndarray exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
37502  * np.ndarray elementBoundaryElementsArray,
37503  * np.ndarray elementBoundaryLocalElementBoundariesArray,
37504  */
37505 
37506 /* Python wrapper */
37507 static PyObject *__pyx_pw_13cfemIntegrals_331parametricMaps_getJacobianValuesGlobalExteriorTrace(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
37508 static PyMethodDef __pyx_mdef_13cfemIntegrals_331parametricMaps_getJacobianValuesGlobalExteriorTrace = {"parametricMaps_getJacobianValuesGlobalExteriorTrace", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_331parametricMaps_getJacobianValuesGlobalExteriorTrace, METH_VARARGS|METH_KEYWORDS, 0};
37509 static PyObject *__pyx_pw_13cfemIntegrals_331parametricMaps_getJacobianValuesGlobalExteriorTrace(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
37510  PyArrayObject *__pyx_v_exteriorElementBoundariesArray = 0;
37511  PyArrayObject *__pyx_v_elementBoundaryElementsArray = 0;
37512  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray = 0;
37513  PyArrayObject *__pyx_v_grad_psi = 0;
37514  PyArrayObject *__pyx_v_boundaryNormals = 0;
37515  PyArrayObject *__pyx_v_boundaryJacobians = 0;
37516  PyArrayObject *__pyx_v_l2g = 0;
37517  PyArrayObject *__pyx_v_nodeArray = 0;
37518  PyArrayObject *__pyx_v_jacobianInverseArray = 0;
37519  PyArrayObject *__pyx_v_metricTensorArray = 0;
37520  PyArrayObject *__pyx_v_metricTensorDeterminantSqrtArray = 0;
37521  PyArrayObject *__pyx_v_unitNormalArray = 0;
37522  int __pyx_lineno = 0;
37523  const char *__pyx_filename = NULL;
37524  int __pyx_clineno = 0;
37525  PyObject *__pyx_r = 0;
37526  __Pyx_RefNannyDeclarations
37527  __Pyx_RefNannySetupContext("parametricMaps_getJacobianValuesGlobalExteriorTrace (wrapper)", 0);
37528  {
37529  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exteriorElementBoundariesArray,&__pyx_n_s_elementBoundaryElementsArray,&__pyx_n_s_elementBoundaryLocalElementBound_2,&__pyx_n_s_grad_psi,&__pyx_n_s_boundaryNormals,&__pyx_n_s_boundaryJacobians,&__pyx_n_s_l2g,&__pyx_n_s_nodeArray,&__pyx_n_s_jacobianInverseArray,&__pyx_n_s_metricTensorArray,&__pyx_n_s_metricTensorDeterminantSqrtArray,&__pyx_n_s_unitNormalArray,0};
37530  PyObject* values[12] = {0,0,0,0,0,0,0,0,0,0,0,0};
37531  if (unlikely(__pyx_kwds)) {
37532  Py_ssize_t kw_args;
37533  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
37534  switch (pos_args) {
37535  case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
37536  CYTHON_FALLTHROUGH;
37537  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
37538  CYTHON_FALLTHROUGH;
37539  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
37540  CYTHON_FALLTHROUGH;
37541  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
37542  CYTHON_FALLTHROUGH;
37543  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
37544  CYTHON_FALLTHROUGH;
37545  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
37546  CYTHON_FALLTHROUGH;
37547  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
37548  CYTHON_FALLTHROUGH;
37549  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
37550  CYTHON_FALLTHROUGH;
37551  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
37552  CYTHON_FALLTHROUGH;
37553  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
37554  CYTHON_FALLTHROUGH;
37555  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
37556  CYTHON_FALLTHROUGH;
37557  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
37558  CYTHON_FALLTHROUGH;
37559  case 0: break;
37560  default: goto __pyx_L5_argtuple_error;
37561  }
37562  kw_args = PyDict_Size(__pyx_kwds);
37563  switch (pos_args) {
37564  case 0:
37565  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exteriorElementBoundariesArray)) != 0)) kw_args--;
37566  else goto __pyx_L5_argtuple_error;
37567  CYTHON_FALLTHROUGH;
37568  case 1:
37569  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElementsArray)) != 0)) kw_args--;
37570  else {
37571  __Pyx_RaiseArgtupleInvalid("parametricMaps_getJacobianValuesGlobalExteriorTrace", 1, 12, 12, 1); __PYX_ERR(0, 5801, __pyx_L3_error)
37572  }
37573  CYTHON_FALLTHROUGH;
37574  case 2:
37575  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound_2)) != 0)) kw_args--;
37576  else {
37577  __Pyx_RaiseArgtupleInvalid("parametricMaps_getJacobianValuesGlobalExteriorTrace", 1, 12, 12, 2); __PYX_ERR(0, 5801, __pyx_L3_error)
37578  }
37579  CYTHON_FALLTHROUGH;
37580  case 3:
37581  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_psi)) != 0)) kw_args--;
37582  else {
37583  __Pyx_RaiseArgtupleInvalid("parametricMaps_getJacobianValuesGlobalExteriorTrace", 1, 12, 12, 3); __PYX_ERR(0, 5801, __pyx_L3_error)
37584  }
37585  CYTHON_FALLTHROUGH;
37586  case 4:
37587  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_boundaryNormals)) != 0)) kw_args--;
37588  else {
37589  __Pyx_RaiseArgtupleInvalid("parametricMaps_getJacobianValuesGlobalExteriorTrace", 1, 12, 12, 4); __PYX_ERR(0, 5801, __pyx_L3_error)
37590  }
37591  CYTHON_FALLTHROUGH;
37592  case 5:
37593  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_boundaryJacobians)) != 0)) kw_args--;
37594  else {
37595  __Pyx_RaiseArgtupleInvalid("parametricMaps_getJacobianValuesGlobalExteriorTrace", 1, 12, 12, 5); __PYX_ERR(0, 5801, __pyx_L3_error)
37596  }
37597  CYTHON_FALLTHROUGH;
37598  case 6:
37599  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_l2g)) != 0)) kw_args--;
37600  else {
37601  __Pyx_RaiseArgtupleInvalid("parametricMaps_getJacobianValuesGlobalExteriorTrace", 1, 12, 12, 6); __PYX_ERR(0, 5801, __pyx_L3_error)
37602  }
37603  CYTHON_FALLTHROUGH;
37604  case 7:
37605  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodeArray)) != 0)) kw_args--;
37606  else {
37607  __Pyx_RaiseArgtupleInvalid("parametricMaps_getJacobianValuesGlobalExteriorTrace", 1, 12, 12, 7); __PYX_ERR(0, 5801, __pyx_L3_error)
37608  }
37609  CYTHON_FALLTHROUGH;
37610  case 8:
37611  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jacobianInverseArray)) != 0)) kw_args--;
37612  else {
37613  __Pyx_RaiseArgtupleInvalid("parametricMaps_getJacobianValuesGlobalExteriorTrace", 1, 12, 12, 8); __PYX_ERR(0, 5801, __pyx_L3_error)
37614  }
37615  CYTHON_FALLTHROUGH;
37616  case 9:
37617  if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_metricTensorArray)) != 0)) kw_args--;
37618  else {
37619  __Pyx_RaiseArgtupleInvalid("parametricMaps_getJacobianValuesGlobalExteriorTrace", 1, 12, 12, 9); __PYX_ERR(0, 5801, __pyx_L3_error)
37620  }
37621  CYTHON_FALLTHROUGH;
37622  case 10:
37623  if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_metricTensorDeterminantSqrtArray)) != 0)) kw_args--;
37624  else {
37625  __Pyx_RaiseArgtupleInvalid("parametricMaps_getJacobianValuesGlobalExteriorTrace", 1, 12, 12, 10); __PYX_ERR(0, 5801, __pyx_L3_error)
37626  }
37627  CYTHON_FALLTHROUGH;
37628  case 11:
37629  if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_unitNormalArray)) != 0)) kw_args--;
37630  else {
37631  __Pyx_RaiseArgtupleInvalid("parametricMaps_getJacobianValuesGlobalExteriorTrace", 1, 12, 12, 11); __PYX_ERR(0, 5801, __pyx_L3_error)
37632  }
37633  }
37634  if (unlikely(kw_args > 0)) {
37635  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parametricMaps_getJacobianValuesGlobalExteriorTrace") < 0)) __PYX_ERR(0, 5801, __pyx_L3_error)
37636  }
37637  } else if (PyTuple_GET_SIZE(__pyx_args) != 12) {
37638  goto __pyx_L5_argtuple_error;
37639  } else {
37640  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
37641  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
37642  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
37643  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
37644  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
37645  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
37646  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
37647  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
37648  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
37649  values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
37650  values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
37651  values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
37652  }
37653  __pyx_v_exteriorElementBoundariesArray = ((PyArrayObject *)values[0]);
37654  __pyx_v_elementBoundaryElementsArray = ((PyArrayObject *)values[1]);
37655  __pyx_v_elementBoundaryLocalElementBoundariesArray = ((PyArrayObject *)values[2]);
37656  __pyx_v_grad_psi = ((PyArrayObject *)values[3]);
37657  __pyx_v_boundaryNormals = ((PyArrayObject *)values[4]);
37658  __pyx_v_boundaryJacobians = ((PyArrayObject *)values[5]);
37659  __pyx_v_l2g = ((PyArrayObject *)values[6]);
37660  __pyx_v_nodeArray = ((PyArrayObject *)values[7]);
37661  __pyx_v_jacobianInverseArray = ((PyArrayObject *)values[8]);
37662  __pyx_v_metricTensorArray = ((PyArrayObject *)values[9]);
37663  __pyx_v_metricTensorDeterminantSqrtArray = ((PyArrayObject *)values[10]);
37664  __pyx_v_unitNormalArray = ((PyArrayObject *)values[11]);
37665  }
37666  goto __pyx_L4_argument_unpacking_done;
37667  __pyx_L5_argtuple_error:;
37668  __Pyx_RaiseArgtupleInvalid("parametricMaps_getJacobianValuesGlobalExteriorTrace", 1, 12, 12, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5801, __pyx_L3_error)
37669  __pyx_L3_error:;
37670  __Pyx_AddTraceback("cfemIntegrals.parametricMaps_getJacobianValuesGlobalExteriorTrace", __pyx_clineno, __pyx_lineno, __pyx_filename);
37671  __Pyx_RefNannyFinishContext();
37672  return NULL;
37673  __pyx_L4_argument_unpacking_done:;
37674  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exteriorElementBoundariesArray), __pyx_ptype_5numpy_ndarray, 1, "exteriorElementBoundariesArray", 0))) __PYX_ERR(0, 5801, __pyx_L1_error)
37675  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElementsArray), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElementsArray", 0))) __PYX_ERR(0, 5802, __pyx_L1_error)
37676  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundariesArray), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundariesArray", 0))) __PYX_ERR(0, 5803, __pyx_L1_error)
37677  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_psi), __pyx_ptype_5numpy_ndarray, 1, "grad_psi", 0))) __PYX_ERR(0, 5804, __pyx_L1_error)
37678  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_boundaryNormals), __pyx_ptype_5numpy_ndarray, 1, "boundaryNormals", 0))) __PYX_ERR(0, 5805, __pyx_L1_error)
37679  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_boundaryJacobians), __pyx_ptype_5numpy_ndarray, 1, "boundaryJacobians", 0))) __PYX_ERR(0, 5806, __pyx_L1_error)
37680  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_l2g), __pyx_ptype_5numpy_ndarray, 1, "l2g", 0))) __PYX_ERR(0, 5807, __pyx_L1_error)
37681  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodeArray), __pyx_ptype_5numpy_ndarray, 1, "nodeArray", 0))) __PYX_ERR(0, 5808, __pyx_L1_error)
37682  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_jacobianInverseArray), __pyx_ptype_5numpy_ndarray, 1, "jacobianInverseArray", 0))) __PYX_ERR(0, 5809, __pyx_L1_error)
37683  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_metricTensorArray), __pyx_ptype_5numpy_ndarray, 1, "metricTensorArray", 0))) __PYX_ERR(0, 5810, __pyx_L1_error)
37684  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_metricTensorDeterminantSqrtArray), __pyx_ptype_5numpy_ndarray, 1, "metricTensorDeterminantSqrtArray", 0))) __PYX_ERR(0, 5811, __pyx_L1_error)
37685  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_unitNormalArray), __pyx_ptype_5numpy_ndarray, 1, "unitNormalArray", 0))) __PYX_ERR(0, 5812, __pyx_L1_error)
37686  __pyx_r = __pyx_pf_13cfemIntegrals_330parametricMaps_getJacobianValuesGlobalExteriorTrace(__pyx_self, __pyx_v_exteriorElementBoundariesArray, __pyx_v_elementBoundaryElementsArray, __pyx_v_elementBoundaryLocalElementBoundariesArray, __pyx_v_grad_psi, __pyx_v_boundaryNormals, __pyx_v_boundaryJacobians, __pyx_v_l2g, __pyx_v_nodeArray, __pyx_v_jacobianInverseArray, __pyx_v_metricTensorArray, __pyx_v_metricTensorDeterminantSqrtArray, __pyx_v_unitNormalArray);
37687 
37688  /* function exit code */
37689  goto __pyx_L0;
37690  __pyx_L1_error:;
37691  __pyx_r = NULL;
37692  __pyx_L0:;
37693  __Pyx_RefNannyFinishContext();
37694  return __pyx_r;
37695 }
37696 
37697 static PyObject *__pyx_pf_13cfemIntegrals_330parametricMaps_getJacobianValuesGlobalExteriorTrace(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_exteriorElementBoundariesArray, PyArrayObject *__pyx_v_elementBoundaryElementsArray, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray, PyArrayObject *__pyx_v_grad_psi, PyArrayObject *__pyx_v_boundaryNormals, PyArrayObject *__pyx_v_boundaryJacobians, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_nodeArray, PyArrayObject *__pyx_v_jacobianInverseArray, PyArrayObject *__pyx_v_metricTensorArray, PyArrayObject *__pyx_v_metricTensorDeterminantSqrtArray, PyArrayObject *__pyx_v_unitNormalArray) {
37698  int __pyx_v_nd;
37699  PyObject *__pyx_r = NULL;
37700  __Pyx_RefNannyDeclarations
37701  int __pyx_lineno = 0;
37702  const char *__pyx_filename = NULL;
37703  int __pyx_clineno = 0;
37704  __Pyx_RefNannySetupContext("parametricMaps_getJacobianValuesGlobalExteriorTrace", 0);
37705 
37706  /* "cfemIntegrals.pyx":5813
37707  * np.ndarray metricTensorDeterminantSqrtArray,
37708  * np.ndarray unitNormalArray):
37709  * cdef int nd = jacobianInverseArray.shape[2] # <<<<<<<<<<<<<<
37710  * if nd == 1:
37711  * cparametricMaps_getJacobianValuesGlobalExteriorTrace1D(jacobianInverseArray.shape[1],
37712  */
37713  __pyx_v_nd = (__pyx_v_jacobianInverseArray->dimensions[2]);
37714 
37715  /* "cfemIntegrals.pyx":5814
37716  * np.ndarray unitNormalArray):
37717  * cdef int nd = jacobianInverseArray.shape[2]
37718  * if nd == 1: # <<<<<<<<<<<<<<
37719  * cparametricMaps_getJacobianValuesGlobalExteriorTrace1D(jacobianInverseArray.shape[1],
37720  * l2g.shape[1],
37721  */
37722  switch (__pyx_v_nd) {
37723  case 1:
37724 
37725  /* "cfemIntegrals.pyx":5815
37726  * cdef int nd = jacobianInverseArray.shape[2]
37727  * if nd == 1:
37728  * cparametricMaps_getJacobianValuesGlobalExteriorTrace1D(jacobianInverseArray.shape[1], # <<<<<<<<<<<<<<
37729  * l2g.shape[1],
37730  * exteriorElementBoundariesArray.shape[0],
37731  */
37732  parametricMaps_getJacobianValuesGlobalExteriorTrace1D((__pyx_v_jacobianInverseArray->dimensions[1]), (__pyx_v_l2g->dimensions[1]), (__pyx_v_exteriorElementBoundariesArray->dimensions[0]), ((int *)__pyx_v_exteriorElementBoundariesArray->data), ((int *)__pyx_v_elementBoundaryElementsArray->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundariesArray->data), ((double *)__pyx_v_grad_psi->data), ((double *)__pyx_v_boundaryNormals->data), ((double *)__pyx_v_boundaryJacobians->data), ((int *)__pyx_v_l2g->data), ((double *)__pyx_v_nodeArray->data), ((double *)__pyx_v_jacobianInverseArray->data), ((double *)__pyx_v_metricTensorArray->data), ((double *)__pyx_v_metricTensorDeterminantSqrtArray->data), ((double *)__pyx_v_unitNormalArray->data));
37733 
37734  /* "cfemIntegrals.pyx":5814
37735  * np.ndarray unitNormalArray):
37736  * cdef int nd = jacobianInverseArray.shape[2]
37737  * if nd == 1: # <<<<<<<<<<<<<<
37738  * cparametricMaps_getJacobianValuesGlobalExteriorTrace1D(jacobianInverseArray.shape[1],
37739  * l2g.shape[1],
37740  */
37741  break;
37742  case 2:
37743 
37744  /* "cfemIntegrals.pyx":5831
37745  * <double*> unitNormalArray.data)
37746  * elif nd == 2:
37747  * cparametricMaps_getJacobianValuesGlobalExteriorTrace2D(jacobianInverseArray.shape[1], # <<<<<<<<<<<<<<
37748  * l2g.shape[1],
37749  * exteriorElementBoundariesArray.shape[0],
37750  */
37751  parametricMaps_getJacobianValuesGlobalExteriorTrace2D((__pyx_v_jacobianInverseArray->dimensions[1]), (__pyx_v_l2g->dimensions[1]), (__pyx_v_exteriorElementBoundariesArray->dimensions[0]), ((int *)__pyx_v_exteriorElementBoundariesArray->data), ((int *)__pyx_v_elementBoundaryElementsArray->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundariesArray->data), ((double *)__pyx_v_grad_psi->data), ((double *)__pyx_v_boundaryNormals->data), ((double *)__pyx_v_boundaryJacobians->data), ((int *)__pyx_v_l2g->data), ((double *)__pyx_v_nodeArray->data), ((double *)__pyx_v_jacobianInverseArray->data), ((double *)__pyx_v_metricTensorArray->data), ((double *)__pyx_v_metricTensorDeterminantSqrtArray->data), ((double *)__pyx_v_unitNormalArray->data));
37752 
37753  /* "cfemIntegrals.pyx":5830
37754  * <double*> metricTensorDeterminantSqrtArray.data,
37755  * <double*> unitNormalArray.data)
37756  * elif nd == 2: # <<<<<<<<<<<<<<
37757  * cparametricMaps_getJacobianValuesGlobalExteriorTrace2D(jacobianInverseArray.shape[1],
37758  * l2g.shape[1],
37759  */
37760  break;
37761  case 3:
37762 
37763  /* "cfemIntegrals.pyx":5847
37764  * <double*> unitNormalArray.data)
37765  * elif nd == 3:
37766  * cparametricMaps_getJacobianValuesGlobalExteriorTrace3D(jacobianInverseArray.shape[1], # <<<<<<<<<<<<<<
37767  * l2g.shape[1],
37768  * exteriorElementBoundariesArray.shape[0],
37769  */
37770  parametricMaps_getJacobianValuesGlobalExteriorTrace3D((__pyx_v_jacobianInverseArray->dimensions[1]), (__pyx_v_l2g->dimensions[1]), (__pyx_v_exteriorElementBoundariesArray->dimensions[0]), ((int *)__pyx_v_exteriorElementBoundariesArray->data), ((int *)__pyx_v_elementBoundaryElementsArray->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundariesArray->data), ((double *)__pyx_v_grad_psi->data), ((double *)__pyx_v_boundaryNormals->data), ((double *)__pyx_v_boundaryJacobians->data), ((int *)__pyx_v_l2g->data), ((double *)__pyx_v_nodeArray->data), ((double *)__pyx_v_jacobianInverseArray->data), ((double *)__pyx_v_metricTensorArray->data), ((double *)__pyx_v_metricTensorDeterminantSqrtArray->data), ((double *)__pyx_v_unitNormalArray->data));
37771 
37772  /* "cfemIntegrals.pyx":5846
37773  * <double*> metricTensorDeterminantSqrtArray.data,
37774  * <double*> unitNormalArray.data)
37775  * elif nd == 3: # <<<<<<<<<<<<<<
37776  * cparametricMaps_getJacobianValuesGlobalExteriorTrace3D(jacobianInverseArray.shape[1],
37777  * l2g.shape[1],
37778  */
37779  break;
37780  default:
37781 
37782  /* "cfemIntegrals.pyx":5863
37783  * <double*> unitNormalArray.data)
37784  * else:
37785  * print("error in getJacobianValuesTrace...jacobianInverse not sized properly") # <<<<<<<<<<<<<<
37786  * def parametricMaps_getJacobianValuesGlobalExteriorTrace_movingDomain(np.ndarray exteriorElementBoundariesArray,
37787  * np.ndarray elementBoundaryElementsArray,
37788  */
37789  if (__Pyx_PrintOne(0, __pyx_kp_s_error_in_getJacobianValuesTrace) < 0) __PYX_ERR(0, 5863, __pyx_L1_error)
37790  break;
37791  }
37792 
37793  /* "cfemIntegrals.pyx":5801
37794  * <double*> xArray.data,
37795  * <double*> xiArray.data)
37796  * def parametricMaps_getJacobianValuesGlobalExteriorTrace(np.ndarray exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
37797  * np.ndarray elementBoundaryElementsArray,
37798  * np.ndarray elementBoundaryLocalElementBoundariesArray,
37799  */
37800 
37801  /* function exit code */
37802  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
37803  goto __pyx_L0;
37804  __pyx_L1_error:;
37805  __Pyx_AddTraceback("cfemIntegrals.parametricMaps_getJacobianValuesGlobalExteriorTrace", __pyx_clineno, __pyx_lineno, __pyx_filename);
37806  __pyx_r = NULL;
37807  __pyx_L0:;
37808  __Pyx_XGIVEREF(__pyx_r);
37809  __Pyx_RefNannyFinishContext();
37810  return __pyx_r;
37811 }
37812 
37813 /* "cfemIntegrals.pyx":5864
37814  * else:
37815  * print("error in getJacobianValuesTrace...jacobianInverse not sized properly")
37816  * def parametricMaps_getJacobianValuesGlobalExteriorTrace_movingDomain(np.ndarray exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
37817  * np.ndarray elementBoundaryElementsArray,
37818  * np.ndarray elementBoundaryLocalElementBoundariesArray,
37819  */
37820 
37821 /* Python wrapper */
37822 static PyObject *__pyx_pw_13cfemIntegrals_333parametricMaps_getJacobianValuesGlobalExteriorTrace_movingDomain(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
37823 static PyMethodDef __pyx_mdef_13cfemIntegrals_333parametricMaps_getJacobianValuesGlobalExteriorTrace_movingDomain = {"parametricMaps_getJacobianValuesGlobalExteriorTrace_movingDomain", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_333parametricMaps_getJacobianValuesGlobalExteriorTrace_movingDomain, METH_VARARGS|METH_KEYWORDS, 0};
37824 static PyObject *__pyx_pw_13cfemIntegrals_333parametricMaps_getJacobianValuesGlobalExteriorTrace_movingDomain(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
37825  PyArrayObject *__pyx_v_exteriorElementBoundariesArray = 0;
37826  PyArrayObject *__pyx_v_elementBoundaryElementsArray = 0;
37827  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray = 0;
37828  PyArrayObject *__pyx_v_xtArray = 0;
37829  PyArrayObject *__pyx_v_grad_psi = 0;
37830  PyArrayObject *__pyx_v_boundaryNormals = 0;
37831  PyArrayObject *__pyx_v_boundaryJacobians = 0;
37832  PyArrayObject *__pyx_v_l2g = 0;
37833  PyArrayObject *__pyx_v_nodeArray = 0;
37834  PyArrayObject *__pyx_v_jacobianInverseArray = 0;
37835  PyArrayObject *__pyx_v_metricTensorArray = 0;
37836  PyArrayObject *__pyx_v_metricTensorDeterminantSqrtArray = 0;
37837  PyArrayObject *__pyx_v_unitNormalArray = 0;
37838  int __pyx_lineno = 0;
37839  const char *__pyx_filename = NULL;
37840  int __pyx_clineno = 0;
37841  PyObject *__pyx_r = 0;
37842  __Pyx_RefNannyDeclarations
37843  __Pyx_RefNannySetupContext("parametricMaps_getJacobianValuesGlobalExteriorTrace_movingDomain (wrapper)", 0);
37844  {
37845  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exteriorElementBoundariesArray,&__pyx_n_s_elementBoundaryElementsArray,&__pyx_n_s_elementBoundaryLocalElementBound_2,&__pyx_n_s_xtArray,&__pyx_n_s_grad_psi,&__pyx_n_s_boundaryNormals,&__pyx_n_s_boundaryJacobians,&__pyx_n_s_l2g,&__pyx_n_s_nodeArray,&__pyx_n_s_jacobianInverseArray,&__pyx_n_s_metricTensorArray,&__pyx_n_s_metricTensorDeterminantSqrtArray,&__pyx_n_s_unitNormalArray,0};
37846  PyObject* values[13] = {0,0,0,0,0,0,0,0,0,0,0,0,0};
37847  if (unlikely(__pyx_kwds)) {
37848  Py_ssize_t kw_args;
37849  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
37850  switch (pos_args) {
37851  case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
37852  CYTHON_FALLTHROUGH;
37853  case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
37854  CYTHON_FALLTHROUGH;
37855  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
37856  CYTHON_FALLTHROUGH;
37857  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
37858  CYTHON_FALLTHROUGH;
37859  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
37860  CYTHON_FALLTHROUGH;
37861  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
37862  CYTHON_FALLTHROUGH;
37863  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
37864  CYTHON_FALLTHROUGH;
37865  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
37866  CYTHON_FALLTHROUGH;
37867  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
37868  CYTHON_FALLTHROUGH;
37869  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
37870  CYTHON_FALLTHROUGH;
37871  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
37872  CYTHON_FALLTHROUGH;
37873  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
37874  CYTHON_FALLTHROUGH;
37875  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
37876  CYTHON_FALLTHROUGH;
37877  case 0: break;
37878  default: goto __pyx_L5_argtuple_error;
37879  }
37880  kw_args = PyDict_Size(__pyx_kwds);
37881  switch (pos_args) {
37882  case 0:
37883  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exteriorElementBoundariesArray)) != 0)) kw_args--;
37884  else goto __pyx_L5_argtuple_error;
37885  CYTHON_FALLTHROUGH;
37886  case 1:
37887  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElementsArray)) != 0)) kw_args--;
37888  else {
37889  __Pyx_RaiseArgtupleInvalid("parametricMaps_getJacobianValuesGlobalExteriorTrace_movingDomain", 1, 13, 13, 1); __PYX_ERR(0, 5864, __pyx_L3_error)
37890  }
37891  CYTHON_FALLTHROUGH;
37892  case 2:
37893  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound_2)) != 0)) kw_args--;
37894  else {
37895  __Pyx_RaiseArgtupleInvalid("parametricMaps_getJacobianValuesGlobalExteriorTrace_movingDomain", 1, 13, 13, 2); __PYX_ERR(0, 5864, __pyx_L3_error)
37896  }
37897  CYTHON_FALLTHROUGH;
37898  case 3:
37899  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xtArray)) != 0)) kw_args--;
37900  else {
37901  __Pyx_RaiseArgtupleInvalid("parametricMaps_getJacobianValuesGlobalExteriorTrace_movingDomain", 1, 13, 13, 3); __PYX_ERR(0, 5864, __pyx_L3_error)
37902  }
37903  CYTHON_FALLTHROUGH;
37904  case 4:
37905  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_psi)) != 0)) kw_args--;
37906  else {
37907  __Pyx_RaiseArgtupleInvalid("parametricMaps_getJacobianValuesGlobalExteriorTrace_movingDomain", 1, 13, 13, 4); __PYX_ERR(0, 5864, __pyx_L3_error)
37908  }
37909  CYTHON_FALLTHROUGH;
37910  case 5:
37911  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_boundaryNormals)) != 0)) kw_args--;
37912  else {
37913  __Pyx_RaiseArgtupleInvalid("parametricMaps_getJacobianValuesGlobalExteriorTrace_movingDomain", 1, 13, 13, 5); __PYX_ERR(0, 5864, __pyx_L3_error)
37914  }
37915  CYTHON_FALLTHROUGH;
37916  case 6:
37917  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_boundaryJacobians)) != 0)) kw_args--;
37918  else {
37919  __Pyx_RaiseArgtupleInvalid("parametricMaps_getJacobianValuesGlobalExteriorTrace_movingDomain", 1, 13, 13, 6); __PYX_ERR(0, 5864, __pyx_L3_error)
37920  }
37921  CYTHON_FALLTHROUGH;
37922  case 7:
37923  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_l2g)) != 0)) kw_args--;
37924  else {
37925  __Pyx_RaiseArgtupleInvalid("parametricMaps_getJacobianValuesGlobalExteriorTrace_movingDomain", 1, 13, 13, 7); __PYX_ERR(0, 5864, __pyx_L3_error)
37926  }
37927  CYTHON_FALLTHROUGH;
37928  case 8:
37929  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodeArray)) != 0)) kw_args--;
37930  else {
37931  __Pyx_RaiseArgtupleInvalid("parametricMaps_getJacobianValuesGlobalExteriorTrace_movingDomain", 1, 13, 13, 8); __PYX_ERR(0, 5864, __pyx_L3_error)
37932  }
37933  CYTHON_FALLTHROUGH;
37934  case 9:
37935  if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jacobianInverseArray)) != 0)) kw_args--;
37936  else {
37937  __Pyx_RaiseArgtupleInvalid("parametricMaps_getJacobianValuesGlobalExteriorTrace_movingDomain", 1, 13, 13, 9); __PYX_ERR(0, 5864, __pyx_L3_error)
37938  }
37939  CYTHON_FALLTHROUGH;
37940  case 10:
37941  if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_metricTensorArray)) != 0)) kw_args--;
37942  else {
37943  __Pyx_RaiseArgtupleInvalid("parametricMaps_getJacobianValuesGlobalExteriorTrace_movingDomain", 1, 13, 13, 10); __PYX_ERR(0, 5864, __pyx_L3_error)
37944  }
37945  CYTHON_FALLTHROUGH;
37946  case 11:
37947  if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_metricTensorDeterminantSqrtArray)) != 0)) kw_args--;
37948  else {
37949  __Pyx_RaiseArgtupleInvalid("parametricMaps_getJacobianValuesGlobalExteriorTrace_movingDomain", 1, 13, 13, 11); __PYX_ERR(0, 5864, __pyx_L3_error)
37950  }
37951  CYTHON_FALLTHROUGH;
37952  case 12:
37953  if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_unitNormalArray)) != 0)) kw_args--;
37954  else {
37955  __Pyx_RaiseArgtupleInvalid("parametricMaps_getJacobianValuesGlobalExteriorTrace_movingDomain", 1, 13, 13, 12); __PYX_ERR(0, 5864, __pyx_L3_error)
37956  }
37957  }
37958  if (unlikely(kw_args > 0)) {
37959  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parametricMaps_getJacobianValuesGlobalExteriorTrace_movingDomain") < 0)) __PYX_ERR(0, 5864, __pyx_L3_error)
37960  }
37961  } else if (PyTuple_GET_SIZE(__pyx_args) != 13) {
37962  goto __pyx_L5_argtuple_error;
37963  } else {
37964  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
37965  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
37966  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
37967  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
37968  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
37969  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
37970  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
37971  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
37972  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
37973  values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
37974  values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
37975  values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
37976  values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
37977  }
37978  __pyx_v_exteriorElementBoundariesArray = ((PyArrayObject *)values[0]);
37979  __pyx_v_elementBoundaryElementsArray = ((PyArrayObject *)values[1]);
37980  __pyx_v_elementBoundaryLocalElementBoundariesArray = ((PyArrayObject *)values[2]);
37981  __pyx_v_xtArray = ((PyArrayObject *)values[3]);
37982  __pyx_v_grad_psi = ((PyArrayObject *)values[4]);
37983  __pyx_v_boundaryNormals = ((PyArrayObject *)values[5]);
37984  __pyx_v_boundaryJacobians = ((PyArrayObject *)values[6]);
37985  __pyx_v_l2g = ((PyArrayObject *)values[7]);
37986  __pyx_v_nodeArray = ((PyArrayObject *)values[8]);
37987  __pyx_v_jacobianInverseArray = ((PyArrayObject *)values[9]);
37988  __pyx_v_metricTensorArray = ((PyArrayObject *)values[10]);
37989  __pyx_v_metricTensorDeterminantSqrtArray = ((PyArrayObject *)values[11]);
37990  __pyx_v_unitNormalArray = ((PyArrayObject *)values[12]);
37991  }
37992  goto __pyx_L4_argument_unpacking_done;
37993  __pyx_L5_argtuple_error:;
37994  __Pyx_RaiseArgtupleInvalid("parametricMaps_getJacobianValuesGlobalExteriorTrace_movingDomain", 1, 13, 13, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5864, __pyx_L3_error)
37995  __pyx_L3_error:;
37996  __Pyx_AddTraceback("cfemIntegrals.parametricMaps_getJacobianValuesGlobalExteriorTrace_movingDomain", __pyx_clineno, __pyx_lineno, __pyx_filename);
37997  __Pyx_RefNannyFinishContext();
37998  return NULL;
37999  __pyx_L4_argument_unpacking_done:;
38000  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exteriorElementBoundariesArray), __pyx_ptype_5numpy_ndarray, 1, "exteriorElementBoundariesArray", 0))) __PYX_ERR(0, 5864, __pyx_L1_error)
38001  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElementsArray), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElementsArray", 0))) __PYX_ERR(0, 5865, __pyx_L1_error)
38002  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundariesArray), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundariesArray", 0))) __PYX_ERR(0, 5866, __pyx_L1_error)
38003  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xtArray), __pyx_ptype_5numpy_ndarray, 1, "xtArray", 0))) __PYX_ERR(0, 5867, __pyx_L1_error)
38004  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_psi), __pyx_ptype_5numpy_ndarray, 1, "grad_psi", 0))) __PYX_ERR(0, 5868, __pyx_L1_error)
38005  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_boundaryNormals), __pyx_ptype_5numpy_ndarray, 1, "boundaryNormals", 0))) __PYX_ERR(0, 5869, __pyx_L1_error)
38006  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_boundaryJacobians), __pyx_ptype_5numpy_ndarray, 1, "boundaryJacobians", 0))) __PYX_ERR(0, 5870, __pyx_L1_error)
38007  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_l2g), __pyx_ptype_5numpy_ndarray, 1, "l2g", 0))) __PYX_ERR(0, 5871, __pyx_L1_error)
38008  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodeArray), __pyx_ptype_5numpy_ndarray, 1, "nodeArray", 0))) __PYX_ERR(0, 5872, __pyx_L1_error)
38009  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_jacobianInverseArray), __pyx_ptype_5numpy_ndarray, 1, "jacobianInverseArray", 0))) __PYX_ERR(0, 5873, __pyx_L1_error)
38010  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_metricTensorArray), __pyx_ptype_5numpy_ndarray, 1, "metricTensorArray", 0))) __PYX_ERR(0, 5874, __pyx_L1_error)
38011  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_metricTensorDeterminantSqrtArray), __pyx_ptype_5numpy_ndarray, 1, "metricTensorDeterminantSqrtArray", 0))) __PYX_ERR(0, 5875, __pyx_L1_error)
38012  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_unitNormalArray), __pyx_ptype_5numpy_ndarray, 1, "unitNormalArray", 0))) __PYX_ERR(0, 5876, __pyx_L1_error)
38013  __pyx_r = __pyx_pf_13cfemIntegrals_332parametricMaps_getJacobianValuesGlobalExteriorTrace_movingDomain(__pyx_self, __pyx_v_exteriorElementBoundariesArray, __pyx_v_elementBoundaryElementsArray, __pyx_v_elementBoundaryLocalElementBoundariesArray, __pyx_v_xtArray, __pyx_v_grad_psi, __pyx_v_boundaryNormals, __pyx_v_boundaryJacobians, __pyx_v_l2g, __pyx_v_nodeArray, __pyx_v_jacobianInverseArray, __pyx_v_metricTensorArray, __pyx_v_metricTensorDeterminantSqrtArray, __pyx_v_unitNormalArray);
38014 
38015  /* function exit code */
38016  goto __pyx_L0;
38017  __pyx_L1_error:;
38018  __pyx_r = NULL;
38019  __pyx_L0:;
38020  __Pyx_RefNannyFinishContext();
38021  return __pyx_r;
38022 }
38023 
38024 static PyObject *__pyx_pf_13cfemIntegrals_332parametricMaps_getJacobianValuesGlobalExteriorTrace_movingDomain(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_exteriorElementBoundariesArray, PyArrayObject *__pyx_v_elementBoundaryElementsArray, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray, PyArrayObject *__pyx_v_xtArray, PyArrayObject *__pyx_v_grad_psi, PyArrayObject *__pyx_v_boundaryNormals, PyArrayObject *__pyx_v_boundaryJacobians, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_nodeArray, PyArrayObject *__pyx_v_jacobianInverseArray, PyArrayObject *__pyx_v_metricTensorArray, PyArrayObject *__pyx_v_metricTensorDeterminantSqrtArray, PyArrayObject *__pyx_v_unitNormalArray) {
38025  int __pyx_v_nd;
38026  PyObject *__pyx_r = NULL;
38027  __Pyx_RefNannyDeclarations
38028  int __pyx_lineno = 0;
38029  const char *__pyx_filename = NULL;
38030  int __pyx_clineno = 0;
38031  __Pyx_RefNannySetupContext("parametricMaps_getJacobianValuesGlobalExteriorTrace_movingDomain", 0);
38032 
38033  /* "cfemIntegrals.pyx":5877
38034  * np.ndarray metricTensorDeterminantSqrtArray,
38035  * np.ndarray unitNormalArray):
38036  * cdef int nd = jacobianInverseArray.shape[2] # <<<<<<<<<<<<<<
38037  * if nd == 1:
38038  * cparametricMaps_getJacobianValuesGlobalExteriorTrace1D(jacobianInverseArray.shape[1],
38039  */
38040  __pyx_v_nd = (__pyx_v_jacobianInverseArray->dimensions[2]);
38041 
38042  /* "cfemIntegrals.pyx":5878
38043  * np.ndarray unitNormalArray):
38044  * cdef int nd = jacobianInverseArray.shape[2]
38045  * if nd == 1: # <<<<<<<<<<<<<<
38046  * cparametricMaps_getJacobianValuesGlobalExteriorTrace1D(jacobianInverseArray.shape[1],
38047  * l2g.shape[1],
38048  */
38049  switch (__pyx_v_nd) {
38050  case 1:
38051 
38052  /* "cfemIntegrals.pyx":5879
38053  * cdef int nd = jacobianInverseArray.shape[2]
38054  * if nd == 1:
38055  * cparametricMaps_getJacobianValuesGlobalExteriorTrace1D(jacobianInverseArray.shape[1], # <<<<<<<<<<<<<<
38056  * l2g.shape[1],
38057  * exteriorElementBoundariesArray.shape[0],
38058  */
38059  parametricMaps_getJacobianValuesGlobalExteriorTrace1D((__pyx_v_jacobianInverseArray->dimensions[1]), (__pyx_v_l2g->dimensions[1]), (__pyx_v_exteriorElementBoundariesArray->dimensions[0]), ((int *)__pyx_v_exteriorElementBoundariesArray->data), ((int *)__pyx_v_elementBoundaryElementsArray->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundariesArray->data), ((double *)__pyx_v_grad_psi->data), ((double *)__pyx_v_boundaryNormals->data), ((double *)__pyx_v_boundaryJacobians->data), ((int *)__pyx_v_l2g->data), ((double *)__pyx_v_nodeArray->data), ((double *)__pyx_v_jacobianInverseArray->data), ((double *)__pyx_v_metricTensorArray->data), ((double *)__pyx_v_metricTensorDeterminantSqrtArray->data), ((double *)__pyx_v_unitNormalArray->data));
38060 
38061  /* "cfemIntegrals.pyx":5878
38062  * np.ndarray unitNormalArray):
38063  * cdef int nd = jacobianInverseArray.shape[2]
38064  * if nd == 1: # <<<<<<<<<<<<<<
38065  * cparametricMaps_getJacobianValuesGlobalExteriorTrace1D(jacobianInverseArray.shape[1],
38066  * l2g.shape[1],
38067  */
38068  break;
38069  case 2:
38070 
38071  /* "cfemIntegrals.pyx":5895
38072  * <double*> unitNormalArray.data)
38073  * elif nd == 2:
38074  * cparametricMaps_getJacobianValuesGlobalExteriorTrace2D_movingDomain(jacobianInverseArray.shape[1], # <<<<<<<<<<<<<<
38075  * l2g.shape[1],
38076  * exteriorElementBoundariesArray.shape[0],
38077  */
38078  parametricMaps_getJacobianValuesGlobalExteriorTrace2D_movingDomain((__pyx_v_jacobianInverseArray->dimensions[1]), (__pyx_v_l2g->dimensions[1]), (__pyx_v_exteriorElementBoundariesArray->dimensions[0]), ((int *)__pyx_v_exteriorElementBoundariesArray->data), ((int *)__pyx_v_elementBoundaryElementsArray->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundariesArray->data), ((double *)__pyx_v_xtArray->data), ((double *)__pyx_v_grad_psi->data), ((double *)__pyx_v_boundaryNormals->data), ((double *)__pyx_v_boundaryJacobians->data), ((int *)__pyx_v_l2g->data), ((double *)__pyx_v_nodeArray->data), ((double *)__pyx_v_jacobianInverseArray->data), ((double *)__pyx_v_metricTensorArray->data), ((double *)__pyx_v_metricTensorDeterminantSqrtArray->data), ((double *)__pyx_v_unitNormalArray->data));
38079 
38080  /* "cfemIntegrals.pyx":5894
38081  * <double*> metricTensorDeterminantSqrtArray.data,
38082  * <double*> unitNormalArray.data)
38083  * elif nd == 2: # <<<<<<<<<<<<<<
38084  * cparametricMaps_getJacobianValuesGlobalExteriorTrace2D_movingDomain(jacobianInverseArray.shape[1],
38085  * l2g.shape[1],
38086  */
38087  break;
38088  case 3:
38089 
38090  /* "cfemIntegrals.pyx":5912
38091  * <double*> unitNormalArray.data)
38092  * elif nd == 3:
38093  * cparametricMaps_getJacobianValuesGlobalExteriorTrace3D(jacobianInverseArray.shape[1], # <<<<<<<<<<<<<<
38094  * l2g.shape[1],
38095  * exteriorElementBoundariesArray.shape[0],
38096  */
38097  parametricMaps_getJacobianValuesGlobalExteriorTrace3D((__pyx_v_jacobianInverseArray->dimensions[1]), (__pyx_v_l2g->dimensions[1]), (__pyx_v_exteriorElementBoundariesArray->dimensions[0]), ((int *)__pyx_v_exteriorElementBoundariesArray->data), ((int *)__pyx_v_elementBoundaryElementsArray->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundariesArray->data), ((double *)__pyx_v_grad_psi->data), ((double *)__pyx_v_boundaryNormals->data), ((double *)__pyx_v_boundaryJacobians->data), ((int *)__pyx_v_l2g->data), ((double *)__pyx_v_nodeArray->data), ((double *)__pyx_v_jacobianInverseArray->data), ((double *)__pyx_v_metricTensorArray->data), ((double *)__pyx_v_metricTensorDeterminantSqrtArray->data), ((double *)__pyx_v_unitNormalArray->data));
38098 
38099  /* "cfemIntegrals.pyx":5911
38100  * <double*> metricTensorDeterminantSqrtArray.data,
38101  * <double*> unitNormalArray.data)
38102  * elif nd == 3: # <<<<<<<<<<<<<<
38103  * cparametricMaps_getJacobianValuesGlobalExteriorTrace3D(jacobianInverseArray.shape[1],
38104  * l2g.shape[1],
38105  */
38106  break;
38107  default:
38108 
38109  /* "cfemIntegrals.pyx":5928
38110  * <double*> unitNormalArray.data)
38111  * else:
38112  * print("error in getJacobianValuesTrace...jacobianInverse not sized properly") # <<<<<<<<<<<<<<
38113  * def calculateWeightedShapeGlobalExteriorTrace(np.ndarray exteriorElementBoundariesArray,
38114  * np.ndarray elementBoundaryElementsArray,
38115  */
38116  if (__Pyx_PrintOne(0, __pyx_kp_s_error_in_getJacobianValuesTrace) < 0) __PYX_ERR(0, 5928, __pyx_L1_error)
38117  break;
38118  }
38119 
38120  /* "cfemIntegrals.pyx":5864
38121  * else:
38122  * print("error in getJacobianValuesTrace...jacobianInverse not sized properly")
38123  * def parametricMaps_getJacobianValuesGlobalExteriorTrace_movingDomain(np.ndarray exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
38124  * np.ndarray elementBoundaryElementsArray,
38125  * np.ndarray elementBoundaryLocalElementBoundariesArray,
38126  */
38127 
38128  /* function exit code */
38129  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
38130  goto __pyx_L0;
38131  __pyx_L1_error:;
38132  __Pyx_AddTraceback("cfemIntegrals.parametricMaps_getJacobianValuesGlobalExteriorTrace_movingDomain", __pyx_clineno, __pyx_lineno, __pyx_filename);
38133  __pyx_r = NULL;
38134  __pyx_L0:;
38135  __Pyx_XGIVEREF(__pyx_r);
38136  __Pyx_RefNannyFinishContext();
38137  return __pyx_r;
38138 }
38139 
38140 /* "cfemIntegrals.pyx":5929
38141  * else:
38142  * print("error in getJacobianValuesTrace...jacobianInverse not sized properly")
38143  * def calculateWeightedShapeGlobalExteriorTrace(np.ndarray exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
38144  * np.ndarray elementBoundaryElementsArray,
38145  * np.ndarray elementBoundaryLocalElementBoundariesArray,
38146  */
38147 
38148 /* Python wrapper */
38149 static PyObject *__pyx_pw_13cfemIntegrals_335calculateWeightedShapeGlobalExteriorTrace(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
38150 static PyMethodDef __pyx_mdef_13cfemIntegrals_335calculateWeightedShapeGlobalExteriorTrace = {"calculateWeightedShapeGlobalExteriorTrace", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_335calculateWeightedShapeGlobalExteriorTrace, METH_VARARGS|METH_KEYWORDS, 0};
38151 static PyObject *__pyx_pw_13cfemIntegrals_335calculateWeightedShapeGlobalExteriorTrace(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
38152  PyArrayObject *__pyx_v_exteriorElementBoundariesArray = 0;
38153  PyArrayObject *__pyx_v_elementBoundaryElementsArray = 0;
38154  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray = 0;
38155  PyArrayObject *__pyx_v_dSR = 0;
38156  PyArrayObject *__pyx_v_sqrt_det_g = 0;
38157  PyArrayObject *__pyx_v_w = 0;
38158  PyArrayObject *__pyx_v_w_dS = 0;
38159  int __pyx_lineno = 0;
38160  const char *__pyx_filename = NULL;
38161  int __pyx_clineno = 0;
38162  PyObject *__pyx_r = 0;
38163  __Pyx_RefNannyDeclarations
38164  __Pyx_RefNannySetupContext("calculateWeightedShapeGlobalExteriorTrace (wrapper)", 0);
38165  {
38166  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exteriorElementBoundariesArray,&__pyx_n_s_elementBoundaryElementsArray,&__pyx_n_s_elementBoundaryLocalElementBound_2,&__pyx_n_s_dSR,&__pyx_n_s_sqrt_det_g,&__pyx_n_s_w,&__pyx_n_s_w_dS,0};
38167  PyObject* values[7] = {0,0,0,0,0,0,0};
38168  if (unlikely(__pyx_kwds)) {
38169  Py_ssize_t kw_args;
38170  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
38171  switch (pos_args) {
38172  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
38173  CYTHON_FALLTHROUGH;
38174  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
38175  CYTHON_FALLTHROUGH;
38176  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
38177  CYTHON_FALLTHROUGH;
38178  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
38179  CYTHON_FALLTHROUGH;
38180  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
38181  CYTHON_FALLTHROUGH;
38182  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
38183  CYTHON_FALLTHROUGH;
38184  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
38185  CYTHON_FALLTHROUGH;
38186  case 0: break;
38187  default: goto __pyx_L5_argtuple_error;
38188  }
38189  kw_args = PyDict_Size(__pyx_kwds);
38190  switch (pos_args) {
38191  case 0:
38192  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exteriorElementBoundariesArray)) != 0)) kw_args--;
38193  else goto __pyx_L5_argtuple_error;
38194  CYTHON_FALLTHROUGH;
38195  case 1:
38196  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElementsArray)) != 0)) kw_args--;
38197  else {
38198  __Pyx_RaiseArgtupleInvalid("calculateWeightedShapeGlobalExteriorTrace", 1, 7, 7, 1); __PYX_ERR(0, 5929, __pyx_L3_error)
38199  }
38200  CYTHON_FALLTHROUGH;
38201  case 2:
38202  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound_2)) != 0)) kw_args--;
38203  else {
38204  __Pyx_RaiseArgtupleInvalid("calculateWeightedShapeGlobalExteriorTrace", 1, 7, 7, 2); __PYX_ERR(0, 5929, __pyx_L3_error)
38205  }
38206  CYTHON_FALLTHROUGH;
38207  case 3:
38208  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dSR)) != 0)) kw_args--;
38209  else {
38210  __Pyx_RaiseArgtupleInvalid("calculateWeightedShapeGlobalExteriorTrace", 1, 7, 7, 3); __PYX_ERR(0, 5929, __pyx_L3_error)
38211  }
38212  CYTHON_FALLTHROUGH;
38213  case 4:
38214  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sqrt_det_g)) != 0)) kw_args--;
38215  else {
38216  __Pyx_RaiseArgtupleInvalid("calculateWeightedShapeGlobalExteriorTrace", 1, 7, 7, 4); __PYX_ERR(0, 5929, __pyx_L3_error)
38217  }
38218  CYTHON_FALLTHROUGH;
38219  case 5:
38220  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_w)) != 0)) kw_args--;
38221  else {
38222  __Pyx_RaiseArgtupleInvalid("calculateWeightedShapeGlobalExteriorTrace", 1, 7, 7, 5); __PYX_ERR(0, 5929, __pyx_L3_error)
38223  }
38224  CYTHON_FALLTHROUGH;
38225  case 6:
38226  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_w_dS)) != 0)) kw_args--;
38227  else {
38228  __Pyx_RaiseArgtupleInvalid("calculateWeightedShapeGlobalExteriorTrace", 1, 7, 7, 6); __PYX_ERR(0, 5929, __pyx_L3_error)
38229  }
38230  }
38231  if (unlikely(kw_args > 0)) {
38232  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateWeightedShapeGlobalExteriorTrace") < 0)) __PYX_ERR(0, 5929, __pyx_L3_error)
38233  }
38234  } else if (PyTuple_GET_SIZE(__pyx_args) != 7) {
38235  goto __pyx_L5_argtuple_error;
38236  } else {
38237  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
38238  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
38239  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
38240  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
38241  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
38242  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
38243  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
38244  }
38245  __pyx_v_exteriorElementBoundariesArray = ((PyArrayObject *)values[0]);
38246  __pyx_v_elementBoundaryElementsArray = ((PyArrayObject *)values[1]);
38247  __pyx_v_elementBoundaryLocalElementBoundariesArray = ((PyArrayObject *)values[2]);
38248  __pyx_v_dSR = ((PyArrayObject *)values[3]);
38249  __pyx_v_sqrt_det_g = ((PyArrayObject *)values[4]);
38250  __pyx_v_w = ((PyArrayObject *)values[5]);
38251  __pyx_v_w_dS = ((PyArrayObject *)values[6]);
38252  }
38253  goto __pyx_L4_argument_unpacking_done;
38254  __pyx_L5_argtuple_error:;
38255  __Pyx_RaiseArgtupleInvalid("calculateWeightedShapeGlobalExteriorTrace", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5929, __pyx_L3_error)
38256  __pyx_L3_error:;
38257  __Pyx_AddTraceback("cfemIntegrals.calculateWeightedShapeGlobalExteriorTrace", __pyx_clineno, __pyx_lineno, __pyx_filename);
38258  __Pyx_RefNannyFinishContext();
38259  return NULL;
38260  __pyx_L4_argument_unpacking_done:;
38261  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exteriorElementBoundariesArray), __pyx_ptype_5numpy_ndarray, 1, "exteriorElementBoundariesArray", 0))) __PYX_ERR(0, 5929, __pyx_L1_error)
38262  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElementsArray), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElementsArray", 0))) __PYX_ERR(0, 5930, __pyx_L1_error)
38263  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundariesArray), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundariesArray", 0))) __PYX_ERR(0, 5931, __pyx_L1_error)
38264  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dSR), __pyx_ptype_5numpy_ndarray, 1, "dSR", 0))) __PYX_ERR(0, 5932, __pyx_L1_error)
38265  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sqrt_det_g), __pyx_ptype_5numpy_ndarray, 1, "sqrt_det_g", 0))) __PYX_ERR(0, 5933, __pyx_L1_error)
38266  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w), __pyx_ptype_5numpy_ndarray, 1, "w", 0))) __PYX_ERR(0, 5934, __pyx_L1_error)
38267  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w_dS), __pyx_ptype_5numpy_ndarray, 1, "w_dS", 0))) __PYX_ERR(0, 5935, __pyx_L1_error)
38268  __pyx_r = __pyx_pf_13cfemIntegrals_334calculateWeightedShapeGlobalExteriorTrace(__pyx_self, __pyx_v_exteriorElementBoundariesArray, __pyx_v_elementBoundaryElementsArray, __pyx_v_elementBoundaryLocalElementBoundariesArray, __pyx_v_dSR, __pyx_v_sqrt_det_g, __pyx_v_w, __pyx_v_w_dS);
38269 
38270  /* function exit code */
38271  goto __pyx_L0;
38272  __pyx_L1_error:;
38273  __pyx_r = NULL;
38274  __pyx_L0:;
38275  __Pyx_RefNannyFinishContext();
38276  return __pyx_r;
38277 }
38278 
38279 static PyObject *__pyx_pf_13cfemIntegrals_334calculateWeightedShapeGlobalExteriorTrace(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_exteriorElementBoundariesArray, PyArrayObject *__pyx_v_elementBoundaryElementsArray, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray, PyArrayObject *__pyx_v_dSR, PyArrayObject *__pyx_v_sqrt_det_g, PyArrayObject *__pyx_v_w, PyArrayObject *__pyx_v_w_dS) {
38280  int __pyx_v_nElementBoundaryQuadraturePoints_elementBoundary;
38281  int __pyx_v_nDOF_test_element;
38282  int __pyx_v_nExteriorElementBoundaries_global;
38283  PyObject *__pyx_r = NULL;
38284  __Pyx_RefNannyDeclarations
38285  __Pyx_RefNannySetupContext("calculateWeightedShapeGlobalExteriorTrace", 0);
38286 
38287  /* "cfemIntegrals.pyx":5936
38288  * np.ndarray w,
38289  * np.ndarray w_dS):
38290  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = w_dS.shape[1] # <<<<<<<<<<<<<<
38291  * cdef int nDOF_test_element = w_dS.shape[2]
38292  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundariesArray.shape[0]
38293  */
38294  __pyx_v_nElementBoundaryQuadraturePoints_elementBoundary = (__pyx_v_w_dS->dimensions[1]);
38295 
38296  /* "cfemIntegrals.pyx":5937
38297  * np.ndarray w_dS):
38298  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = w_dS.shape[1]
38299  * cdef int nDOF_test_element = w_dS.shape[2] # <<<<<<<<<<<<<<
38300  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundariesArray.shape[0]
38301  * ccalculateWeightedShapeGlobalExteriorTrace(nElementBoundaryQuadraturePoints_elementBoundary,
38302  */
38303  __pyx_v_nDOF_test_element = (__pyx_v_w_dS->dimensions[2]);
38304 
38305  /* "cfemIntegrals.pyx":5938
38306  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = w_dS.shape[1]
38307  * cdef int nDOF_test_element = w_dS.shape[2]
38308  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundariesArray.shape[0] # <<<<<<<<<<<<<<
38309  * ccalculateWeightedShapeGlobalExteriorTrace(nElementBoundaryQuadraturePoints_elementBoundary,
38310  * nDOF_test_element,
38311  */
38312  __pyx_v_nExteriorElementBoundaries_global = (__pyx_v_exteriorElementBoundariesArray->dimensions[0]);
38313 
38314  /* "cfemIntegrals.pyx":5939
38315  * cdef int nDOF_test_element = w_dS.shape[2]
38316  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundariesArray.shape[0]
38317  * ccalculateWeightedShapeGlobalExteriorTrace(nElementBoundaryQuadraturePoints_elementBoundary, # <<<<<<<<<<<<<<
38318  * nDOF_test_element,
38319  * nExteriorElementBoundaries_global,
38320  */
38321  calculateWeightedShapeGlobalExteriorTrace(__pyx_v_nElementBoundaryQuadraturePoints_elementBoundary, __pyx_v_nDOF_test_element, __pyx_v_nExteriorElementBoundaries_global, ((int *)__pyx_v_exteriorElementBoundariesArray->data), ((int *)__pyx_v_elementBoundaryElementsArray->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundariesArray->data), ((double *)__pyx_v_dSR->data), ((double *)__pyx_v_sqrt_det_g->data), ((double *)__pyx_v_w->data), ((double *)__pyx_v_w_dS->data));
38322 
38323  /* "cfemIntegrals.pyx":5929
38324  * else:
38325  * print("error in getJacobianValuesTrace...jacobianInverse not sized properly")
38326  * def calculateWeightedShapeGlobalExteriorTrace(np.ndarray exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
38327  * np.ndarray elementBoundaryElementsArray,
38328  * np.ndarray elementBoundaryLocalElementBoundariesArray,
38329  */
38330 
38331  /* function exit code */
38332  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
38333  __Pyx_XGIVEREF(__pyx_r);
38334  __Pyx_RefNannyFinishContext();
38335  return __pyx_r;
38336 }
38337 
38338 /* "cfemIntegrals.pyx":5949
38339  * <double*> w.data,
38340  * <double*> w_dS.data)
38341  * def calculateShape_X_weightedShapeGlobalExteriorTrace(np.ndarray exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
38342  * np.ndarray elementBoundaryElementsArray,
38343  * np.ndarray elementBoundaryLocalElementBoundariesArray,
38344  */
38345 
38346 /* Python wrapper */
38347 static PyObject *__pyx_pw_13cfemIntegrals_337calculateShape_X_weightedShapeGlobalExteriorTrace(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
38348 static PyMethodDef __pyx_mdef_13cfemIntegrals_337calculateShape_X_weightedShapeGlobalExteriorTrace = {"calculateShape_X_weightedShapeGlobalExteriorTrace", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_337calculateShape_X_weightedShapeGlobalExteriorTrace, METH_VARARGS|METH_KEYWORDS, 0};
38349 static PyObject *__pyx_pw_13cfemIntegrals_337calculateShape_X_weightedShapeGlobalExteriorTrace(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
38350  PyArrayObject *__pyx_v_exteriorElementBoundariesArray = 0;
38351  PyArrayObject *__pyx_v_elementBoundaryElementsArray = 0;
38352  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray = 0;
38353  PyArrayObject *__pyx_v_v = 0;
38354  PyArrayObject *__pyx_v_w_dS = 0;
38355  PyArrayObject *__pyx_v_v_X_w_dS = 0;
38356  int __pyx_lineno = 0;
38357  const char *__pyx_filename = NULL;
38358  int __pyx_clineno = 0;
38359  PyObject *__pyx_r = 0;
38360  __Pyx_RefNannyDeclarations
38361  __Pyx_RefNannySetupContext("calculateShape_X_weightedShapeGlobalExteriorTrace (wrapper)", 0);
38362  {
38363  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exteriorElementBoundariesArray,&__pyx_n_s_elementBoundaryElementsArray,&__pyx_n_s_elementBoundaryLocalElementBound_2,&__pyx_n_s_v,&__pyx_n_s_w_dS,&__pyx_n_s_v_X_w_dS,0};
38364  PyObject* values[6] = {0,0,0,0,0,0};
38365  if (unlikely(__pyx_kwds)) {
38366  Py_ssize_t kw_args;
38367  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
38368  switch (pos_args) {
38369  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
38370  CYTHON_FALLTHROUGH;
38371  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
38372  CYTHON_FALLTHROUGH;
38373  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
38374  CYTHON_FALLTHROUGH;
38375  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
38376  CYTHON_FALLTHROUGH;
38377  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
38378  CYTHON_FALLTHROUGH;
38379  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
38380  CYTHON_FALLTHROUGH;
38381  case 0: break;
38382  default: goto __pyx_L5_argtuple_error;
38383  }
38384  kw_args = PyDict_Size(__pyx_kwds);
38385  switch (pos_args) {
38386  case 0:
38387  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exteriorElementBoundariesArray)) != 0)) kw_args--;
38388  else goto __pyx_L5_argtuple_error;
38389  CYTHON_FALLTHROUGH;
38390  case 1:
38391  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElementsArray)) != 0)) kw_args--;
38392  else {
38393  __Pyx_RaiseArgtupleInvalid("calculateShape_X_weightedShapeGlobalExteriorTrace", 1, 6, 6, 1); __PYX_ERR(0, 5949, __pyx_L3_error)
38394  }
38395  CYTHON_FALLTHROUGH;
38396  case 2:
38397  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound_2)) != 0)) kw_args--;
38398  else {
38399  __Pyx_RaiseArgtupleInvalid("calculateShape_X_weightedShapeGlobalExteriorTrace", 1, 6, 6, 2); __PYX_ERR(0, 5949, __pyx_L3_error)
38400  }
38401  CYTHON_FALLTHROUGH;
38402  case 3:
38403  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
38404  else {
38405  __Pyx_RaiseArgtupleInvalid("calculateShape_X_weightedShapeGlobalExteriorTrace", 1, 6, 6, 3); __PYX_ERR(0, 5949, __pyx_L3_error)
38406  }
38407  CYTHON_FALLTHROUGH;
38408  case 4:
38409  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_w_dS)) != 0)) kw_args--;
38410  else {
38411  __Pyx_RaiseArgtupleInvalid("calculateShape_X_weightedShapeGlobalExteriorTrace", 1, 6, 6, 4); __PYX_ERR(0, 5949, __pyx_L3_error)
38412  }
38413  CYTHON_FALLTHROUGH;
38414  case 5:
38415  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v_X_w_dS)) != 0)) kw_args--;
38416  else {
38417  __Pyx_RaiseArgtupleInvalid("calculateShape_X_weightedShapeGlobalExteriorTrace", 1, 6, 6, 5); __PYX_ERR(0, 5949, __pyx_L3_error)
38418  }
38419  }
38420  if (unlikely(kw_args > 0)) {
38421  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateShape_X_weightedShapeGlobalExteriorTrace") < 0)) __PYX_ERR(0, 5949, __pyx_L3_error)
38422  }
38423  } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
38424  goto __pyx_L5_argtuple_error;
38425  } else {
38426  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
38427  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
38428  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
38429  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
38430  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
38431  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
38432  }
38433  __pyx_v_exteriorElementBoundariesArray = ((PyArrayObject *)values[0]);
38434  __pyx_v_elementBoundaryElementsArray = ((PyArrayObject *)values[1]);
38435  __pyx_v_elementBoundaryLocalElementBoundariesArray = ((PyArrayObject *)values[2]);
38436  __pyx_v_v = ((PyArrayObject *)values[3]);
38437  __pyx_v_w_dS = ((PyArrayObject *)values[4]);
38438  __pyx_v_v_X_w_dS = ((PyArrayObject *)values[5]);
38439  }
38440  goto __pyx_L4_argument_unpacking_done;
38441  __pyx_L5_argtuple_error:;
38442  __Pyx_RaiseArgtupleInvalid("calculateShape_X_weightedShapeGlobalExteriorTrace", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5949, __pyx_L3_error)
38443  __pyx_L3_error:;
38444  __Pyx_AddTraceback("cfemIntegrals.calculateShape_X_weightedShapeGlobalExteriorTrace", __pyx_clineno, __pyx_lineno, __pyx_filename);
38445  __Pyx_RefNannyFinishContext();
38446  return NULL;
38447  __pyx_L4_argument_unpacking_done:;
38448  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exteriorElementBoundariesArray), __pyx_ptype_5numpy_ndarray, 1, "exteriorElementBoundariesArray", 0))) __PYX_ERR(0, 5949, __pyx_L1_error)
38449  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElementsArray), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElementsArray", 0))) __PYX_ERR(0, 5950, __pyx_L1_error)
38450  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundariesArray), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundariesArray", 0))) __PYX_ERR(0, 5951, __pyx_L1_error)
38451  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), __pyx_ptype_5numpy_ndarray, 1, "v", 0))) __PYX_ERR(0, 5952, __pyx_L1_error)
38452  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w_dS), __pyx_ptype_5numpy_ndarray, 1, "w_dS", 0))) __PYX_ERR(0, 5953, __pyx_L1_error)
38453  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v_X_w_dS), __pyx_ptype_5numpy_ndarray, 1, "v_X_w_dS", 0))) __PYX_ERR(0, 5954, __pyx_L1_error)
38454  __pyx_r = __pyx_pf_13cfemIntegrals_336calculateShape_X_weightedShapeGlobalExteriorTrace(__pyx_self, __pyx_v_exteriorElementBoundariesArray, __pyx_v_elementBoundaryElementsArray, __pyx_v_elementBoundaryLocalElementBoundariesArray, __pyx_v_v, __pyx_v_w_dS, __pyx_v_v_X_w_dS);
38455 
38456  /* function exit code */
38457  goto __pyx_L0;
38458  __pyx_L1_error:;
38459  __pyx_r = NULL;
38460  __pyx_L0:;
38461  __Pyx_RefNannyFinishContext();
38462  return __pyx_r;
38463 }
38464 
38465 static PyObject *__pyx_pf_13cfemIntegrals_336calculateShape_X_weightedShapeGlobalExteriorTrace(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_exteriorElementBoundariesArray, PyArrayObject *__pyx_v_elementBoundaryElementsArray, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_w_dS, PyArrayObject *__pyx_v_v_X_w_dS) {
38466  int __pyx_v_nElementBoundaryQuadraturePoints_elementBoundary;
38467  int __pyx_v_nDOF_trial_element;
38468  int __pyx_v_nDOF_test_element;
38469  int __pyx_v_nExteriorElementBoundaries_global;
38470  PyObject *__pyx_r = NULL;
38471  __Pyx_RefNannyDeclarations
38472  __Pyx_RefNannySetupContext("calculateShape_X_weightedShapeGlobalExteriorTrace", 0);
38473 
38474  /* "cfemIntegrals.pyx":5955
38475  * np.ndarray w_dS,
38476  * np.ndarray v_X_w_dS):
38477  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = v_X_w_dS.shape[1] # <<<<<<<<<<<<<<
38478  * cdef int nDOF_trial_element = v_X_w_dS.shape[2]
38479  * cdef int nDOF_test_element = v_X_w_dS.shape[3]
38480  */
38481  __pyx_v_nElementBoundaryQuadraturePoints_elementBoundary = (__pyx_v_v_X_w_dS->dimensions[1]);
38482 
38483  /* "cfemIntegrals.pyx":5956
38484  * np.ndarray v_X_w_dS):
38485  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = v_X_w_dS.shape[1]
38486  * cdef int nDOF_trial_element = v_X_w_dS.shape[2] # <<<<<<<<<<<<<<
38487  * cdef int nDOF_test_element = v_X_w_dS.shape[3]
38488  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundariesArray.shape[0]
38489  */
38490  __pyx_v_nDOF_trial_element = (__pyx_v_v_X_w_dS->dimensions[2]);
38491 
38492  /* "cfemIntegrals.pyx":5957
38493  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = v_X_w_dS.shape[1]
38494  * cdef int nDOF_trial_element = v_X_w_dS.shape[2]
38495  * cdef int nDOF_test_element = v_X_w_dS.shape[3] # <<<<<<<<<<<<<<
38496  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundariesArray.shape[0]
38497  * ccalculateShape_X_weightedShapeGlobalExteriorTrace(nElementBoundaryQuadraturePoints_elementBoundary,
38498  */
38499  __pyx_v_nDOF_test_element = (__pyx_v_v_X_w_dS->dimensions[3]);
38500 
38501  /* "cfemIntegrals.pyx":5958
38502  * cdef int nDOF_trial_element = v_X_w_dS.shape[2]
38503  * cdef int nDOF_test_element = v_X_w_dS.shape[3]
38504  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundariesArray.shape[0] # <<<<<<<<<<<<<<
38505  * ccalculateShape_X_weightedShapeGlobalExteriorTrace(nElementBoundaryQuadraturePoints_elementBoundary,
38506  * nDOF_trial_element,
38507  */
38508  __pyx_v_nExteriorElementBoundaries_global = (__pyx_v_exteriorElementBoundariesArray->dimensions[0]);
38509 
38510  /* "cfemIntegrals.pyx":5959
38511  * cdef int nDOF_test_element = v_X_w_dS.shape[3]
38512  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundariesArray.shape[0]
38513  * ccalculateShape_X_weightedShapeGlobalExteriorTrace(nElementBoundaryQuadraturePoints_elementBoundary, # <<<<<<<<<<<<<<
38514  * nDOF_trial_element,
38515  * nDOF_test_element,
38516  */
38517  calculateShape_X_weightedShapeGlobalExteriorTrace(__pyx_v_nElementBoundaryQuadraturePoints_elementBoundary, __pyx_v_nDOF_trial_element, __pyx_v_nDOF_test_element, __pyx_v_nExteriorElementBoundaries_global, ((int *)__pyx_v_exteriorElementBoundariesArray->data), ((int *)__pyx_v_elementBoundaryElementsArray->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundariesArray->data), ((double *)__pyx_v_v->data), ((double *)__pyx_v_w_dS->data), ((double *)__pyx_v_v_X_w_dS->data));
38518 
38519  /* "cfemIntegrals.pyx":5949
38520  * <double*> w.data,
38521  * <double*> w_dS.data)
38522  * def calculateShape_X_weightedShapeGlobalExteriorTrace(np.ndarray exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
38523  * np.ndarray elementBoundaryElementsArray,
38524  * np.ndarray elementBoundaryLocalElementBoundariesArray,
38525  */
38526 
38527  /* function exit code */
38528  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
38529  __Pyx_XGIVEREF(__pyx_r);
38530  __Pyx_RefNannyFinishContext();
38531  return __pyx_r;
38532 }
38533 
38534 /* "cfemIntegrals.pyx":5969
38535  * <double*> w_dS.data,
38536  * <double*> v_X_w_dS.data)
38537  * def calculateGradShape_X_weightedShapeGlobalExteriorTrace(np.ndarray exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
38538  * np.ndarray elementBoundaryElementsArray,
38539  * np.ndarray elementBoundaryLocalElementBoundariesArray,
38540  */
38541 
38542 /* Python wrapper */
38543 static PyObject *__pyx_pw_13cfemIntegrals_339calculateGradShape_X_weightedShapeGlobalExteriorTrace(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
38544 static PyMethodDef __pyx_mdef_13cfemIntegrals_339calculateGradShape_X_weightedShapeGlobalExteriorTrace = {"calculateGradShape_X_weightedShapeGlobalExteriorTrace", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_339calculateGradShape_X_weightedShapeGlobalExteriorTrace, METH_VARARGS|METH_KEYWORDS, 0};
38545 static PyObject *__pyx_pw_13cfemIntegrals_339calculateGradShape_X_weightedShapeGlobalExteriorTrace(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
38546  PyArrayObject *__pyx_v_exteriorElementBoundariesArray = 0;
38547  PyArrayObject *__pyx_v_elementBoundaryElementsArray = 0;
38548  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray = 0;
38549  PyArrayObject *__pyx_v_grad_v = 0;
38550  PyArrayObject *__pyx_v_w_dS = 0;
38551  PyArrayObject *__pyx_v_grad_v_X_w_dS = 0;
38552  int __pyx_lineno = 0;
38553  const char *__pyx_filename = NULL;
38554  int __pyx_clineno = 0;
38555  PyObject *__pyx_r = 0;
38556  __Pyx_RefNannyDeclarations
38557  __Pyx_RefNannySetupContext("calculateGradShape_X_weightedShapeGlobalExteriorTrace (wrapper)", 0);
38558  {
38559  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exteriorElementBoundariesArray,&__pyx_n_s_elementBoundaryElementsArray,&__pyx_n_s_elementBoundaryLocalElementBound_2,&__pyx_n_s_grad_v,&__pyx_n_s_w_dS,&__pyx_n_s_grad_v_X_w_dS,0};
38560  PyObject* values[6] = {0,0,0,0,0,0};
38561  if (unlikely(__pyx_kwds)) {
38562  Py_ssize_t kw_args;
38563  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
38564  switch (pos_args) {
38565  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
38566  CYTHON_FALLTHROUGH;
38567  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
38568  CYTHON_FALLTHROUGH;
38569  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
38570  CYTHON_FALLTHROUGH;
38571  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
38572  CYTHON_FALLTHROUGH;
38573  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
38574  CYTHON_FALLTHROUGH;
38575  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
38576  CYTHON_FALLTHROUGH;
38577  case 0: break;
38578  default: goto __pyx_L5_argtuple_error;
38579  }
38580  kw_args = PyDict_Size(__pyx_kwds);
38581  switch (pos_args) {
38582  case 0:
38583  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exteriorElementBoundariesArray)) != 0)) kw_args--;
38584  else goto __pyx_L5_argtuple_error;
38585  CYTHON_FALLTHROUGH;
38586  case 1:
38587  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElementsArray)) != 0)) kw_args--;
38588  else {
38589  __Pyx_RaiseArgtupleInvalid("calculateGradShape_X_weightedShapeGlobalExteriorTrace", 1, 6, 6, 1); __PYX_ERR(0, 5969, __pyx_L3_error)
38590  }
38591  CYTHON_FALLTHROUGH;
38592  case 2:
38593  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound_2)) != 0)) kw_args--;
38594  else {
38595  __Pyx_RaiseArgtupleInvalid("calculateGradShape_X_weightedShapeGlobalExteriorTrace", 1, 6, 6, 2); __PYX_ERR(0, 5969, __pyx_L3_error)
38596  }
38597  CYTHON_FALLTHROUGH;
38598  case 3:
38599  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_v)) != 0)) kw_args--;
38600  else {
38601  __Pyx_RaiseArgtupleInvalid("calculateGradShape_X_weightedShapeGlobalExteriorTrace", 1, 6, 6, 3); __PYX_ERR(0, 5969, __pyx_L3_error)
38602  }
38603  CYTHON_FALLTHROUGH;
38604  case 4:
38605  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_w_dS)) != 0)) kw_args--;
38606  else {
38607  __Pyx_RaiseArgtupleInvalid("calculateGradShape_X_weightedShapeGlobalExteriorTrace", 1, 6, 6, 4); __PYX_ERR(0, 5969, __pyx_L3_error)
38608  }
38609  CYTHON_FALLTHROUGH;
38610  case 5:
38611  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_v_X_w_dS)) != 0)) kw_args--;
38612  else {
38613  __Pyx_RaiseArgtupleInvalid("calculateGradShape_X_weightedShapeGlobalExteriorTrace", 1, 6, 6, 5); __PYX_ERR(0, 5969, __pyx_L3_error)
38614  }
38615  }
38616  if (unlikely(kw_args > 0)) {
38617  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateGradShape_X_weightedShapeGlobalExteriorTrace") < 0)) __PYX_ERR(0, 5969, __pyx_L3_error)
38618  }
38619  } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
38620  goto __pyx_L5_argtuple_error;
38621  } else {
38622  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
38623  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
38624  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
38625  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
38626  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
38627  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
38628  }
38629  __pyx_v_exteriorElementBoundariesArray = ((PyArrayObject *)values[0]);
38630  __pyx_v_elementBoundaryElementsArray = ((PyArrayObject *)values[1]);
38631  __pyx_v_elementBoundaryLocalElementBoundariesArray = ((PyArrayObject *)values[2]);
38632  __pyx_v_grad_v = ((PyArrayObject *)values[3]);
38633  __pyx_v_w_dS = ((PyArrayObject *)values[4]);
38634  __pyx_v_grad_v_X_w_dS = ((PyArrayObject *)values[5]);
38635  }
38636  goto __pyx_L4_argument_unpacking_done;
38637  __pyx_L5_argtuple_error:;
38638  __Pyx_RaiseArgtupleInvalid("calculateGradShape_X_weightedShapeGlobalExteriorTrace", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5969, __pyx_L3_error)
38639  __pyx_L3_error:;
38640  __Pyx_AddTraceback("cfemIntegrals.calculateGradShape_X_weightedShapeGlobalExteriorTrace", __pyx_clineno, __pyx_lineno, __pyx_filename);
38641  __Pyx_RefNannyFinishContext();
38642  return NULL;
38643  __pyx_L4_argument_unpacking_done:;
38644  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exteriorElementBoundariesArray), __pyx_ptype_5numpy_ndarray, 1, "exteriorElementBoundariesArray", 0))) __PYX_ERR(0, 5969, __pyx_L1_error)
38645  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElementsArray), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElementsArray", 0))) __PYX_ERR(0, 5970, __pyx_L1_error)
38646  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundariesArray), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundariesArray", 0))) __PYX_ERR(0, 5971, __pyx_L1_error)
38647  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_v), __pyx_ptype_5numpy_ndarray, 1, "grad_v", 0))) __PYX_ERR(0, 5972, __pyx_L1_error)
38648  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w_dS), __pyx_ptype_5numpy_ndarray, 1, "w_dS", 0))) __PYX_ERR(0, 5973, __pyx_L1_error)
38649  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_v_X_w_dS), __pyx_ptype_5numpy_ndarray, 1, "grad_v_X_w_dS", 0))) __PYX_ERR(0, 5974, __pyx_L1_error)
38650  __pyx_r = __pyx_pf_13cfemIntegrals_338calculateGradShape_X_weightedShapeGlobalExteriorTrace(__pyx_self, __pyx_v_exteriorElementBoundariesArray, __pyx_v_elementBoundaryElementsArray, __pyx_v_elementBoundaryLocalElementBoundariesArray, __pyx_v_grad_v, __pyx_v_w_dS, __pyx_v_grad_v_X_w_dS);
38651 
38652  /* function exit code */
38653  goto __pyx_L0;
38654  __pyx_L1_error:;
38655  __pyx_r = NULL;
38656  __pyx_L0:;
38657  __Pyx_RefNannyFinishContext();
38658  return __pyx_r;
38659 }
38660 
38661 static PyObject *__pyx_pf_13cfemIntegrals_338calculateGradShape_X_weightedShapeGlobalExteriorTrace(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_exteriorElementBoundariesArray, PyArrayObject *__pyx_v_elementBoundaryElementsArray, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray, PyArrayObject *__pyx_v_grad_v, PyArrayObject *__pyx_v_w_dS, PyArrayObject *__pyx_v_grad_v_X_w_dS) {
38662  int __pyx_v_nElementBoundaryQuadraturePoints_elementBoundary;
38663  int __pyx_v_nDOF_trial_element;
38664  int __pyx_v_nDOF_test_element;
38665  int __pyx_v_nSpace;
38666  int __pyx_v_nExteriorElementBoundaries_global;
38667  PyObject *__pyx_r = NULL;
38668  __Pyx_RefNannyDeclarations
38669  __Pyx_RefNannySetupContext("calculateGradShape_X_weightedShapeGlobalExteriorTrace", 0);
38670 
38671  /* "cfemIntegrals.pyx":5975
38672  * np.ndarray w_dS,
38673  * np.ndarray grad_v_X_w_dS):
38674  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = grad_v_X_w_dS.shape[1] # <<<<<<<<<<<<<<
38675  * cdef int nDOF_trial_element = grad_v_X_w_dS.shape[2]
38676  * cdef int nDOF_test_element = grad_v_X_w_dS.shape[3]
38677  */
38678  __pyx_v_nElementBoundaryQuadraturePoints_elementBoundary = (__pyx_v_grad_v_X_w_dS->dimensions[1]);
38679 
38680  /* "cfemIntegrals.pyx":5976
38681  * np.ndarray grad_v_X_w_dS):
38682  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = grad_v_X_w_dS.shape[1]
38683  * cdef int nDOF_trial_element = grad_v_X_w_dS.shape[2] # <<<<<<<<<<<<<<
38684  * cdef int nDOF_test_element = grad_v_X_w_dS.shape[3]
38685  * cdef int nSpace = grad_v_X_w_dS.shape[4]
38686  */
38687  __pyx_v_nDOF_trial_element = (__pyx_v_grad_v_X_w_dS->dimensions[2]);
38688 
38689  /* "cfemIntegrals.pyx":5977
38690  * cdef int nElementBoundaryQuadraturePoints_elementBoundary = grad_v_X_w_dS.shape[1]
38691  * cdef int nDOF_trial_element = grad_v_X_w_dS.shape[2]
38692  * cdef int nDOF_test_element = grad_v_X_w_dS.shape[3] # <<<<<<<<<<<<<<
38693  * cdef int nSpace = grad_v_X_w_dS.shape[4]
38694  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundariesArray.shape[0]
38695  */
38696  __pyx_v_nDOF_test_element = (__pyx_v_grad_v_X_w_dS->dimensions[3]);
38697 
38698  /* "cfemIntegrals.pyx":5978
38699  * cdef int nDOF_trial_element = grad_v_X_w_dS.shape[2]
38700  * cdef int nDOF_test_element = grad_v_X_w_dS.shape[3]
38701  * cdef int nSpace = grad_v_X_w_dS.shape[4] # <<<<<<<<<<<<<<
38702  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundariesArray.shape[0]
38703  * ccalculateGradShape_X_weightedShapeGlobalExteriorTrace(nElementBoundaryQuadraturePoints_elementBoundary,
38704  */
38705  __pyx_v_nSpace = (__pyx_v_grad_v_X_w_dS->dimensions[4]);
38706 
38707  /* "cfemIntegrals.pyx":5979
38708  * cdef int nDOF_test_element = grad_v_X_w_dS.shape[3]
38709  * cdef int nSpace = grad_v_X_w_dS.shape[4]
38710  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundariesArray.shape[0] # <<<<<<<<<<<<<<
38711  * ccalculateGradShape_X_weightedShapeGlobalExteriorTrace(nElementBoundaryQuadraturePoints_elementBoundary,
38712  * nDOF_trial_element,
38713  */
38714  __pyx_v_nExteriorElementBoundaries_global = (__pyx_v_exteriorElementBoundariesArray->dimensions[0]);
38715 
38716  /* "cfemIntegrals.pyx":5980
38717  * cdef int nSpace = grad_v_X_w_dS.shape[4]
38718  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundariesArray.shape[0]
38719  * ccalculateGradShape_X_weightedShapeGlobalExteriorTrace(nElementBoundaryQuadraturePoints_elementBoundary, # <<<<<<<<<<<<<<
38720  * nDOF_trial_element,
38721  * nDOF_test_element,
38722  */
38723  calculateGradShape_X_weightedShapeGlobalExteriorTrace(__pyx_v_nElementBoundaryQuadraturePoints_elementBoundary, __pyx_v_nDOF_trial_element, __pyx_v_nDOF_test_element, __pyx_v_nSpace, __pyx_v_nExteriorElementBoundaries_global, ((int *)__pyx_v_exteriorElementBoundariesArray->data), ((int *)__pyx_v_elementBoundaryElementsArray->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundariesArray->data), ((double *)__pyx_v_grad_v->data), ((double *)__pyx_v_w_dS->data), ((double *)__pyx_v_grad_v_X_w_dS->data));
38724 
38725  /* "cfemIntegrals.pyx":5969
38726  * <double*> w_dS.data,
38727  * <double*> v_X_w_dS.data)
38728  * def calculateGradShape_X_weightedShapeGlobalExteriorTrace(np.ndarray exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
38729  * np.ndarray elementBoundaryElementsArray,
38730  * np.ndarray elementBoundaryLocalElementBoundariesArray,
38731  */
38732 
38733  /* function exit code */
38734  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
38735  __Pyx_XGIVEREF(__pyx_r);
38736  __Pyx_RefNannyFinishContext();
38737  return __pyx_r;
38738 }
38739 
38740 /* "cfemIntegrals.pyx":5991
38741  * <double*> w_dS.data,
38742  * <double*> grad_v_X_w_dS.data)
38743  * def calculateGlobalExteriorElementBoundaryIntegrationWeights(int nQuadraturePoints_elementBoundary, # <<<<<<<<<<<<<<
38744  * int nExteriorElementBoundaries_global,
38745  * np.ndarray sqrt_det_g,
38746  */
38747 
38748 /* Python wrapper */
38749 static PyObject *__pyx_pw_13cfemIntegrals_341calculateGlobalExteriorElementBoundaryIntegrationWeights(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
38750 static PyMethodDef __pyx_mdef_13cfemIntegrals_341calculateGlobalExteriorElementBoundaryIntegrationWeights = {"calculateGlobalExteriorElementBoundaryIntegrationWeights", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_341calculateGlobalExteriorElementBoundaryIntegrationWeights, METH_VARARGS|METH_KEYWORDS, 0};
38751 static PyObject *__pyx_pw_13cfemIntegrals_341calculateGlobalExteriorElementBoundaryIntegrationWeights(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
38752  int __pyx_v_nQuadraturePoints_elementBoundary;
38753  int __pyx_v_nExteriorElementBoundaries_global;
38754  PyArrayObject *__pyx_v_sqrt_det_g = 0;
38755  PyArrayObject *__pyx_v_referenceWeights = 0;
38756  PyArrayObject *__pyx_v_weights = 0;
38757  int __pyx_lineno = 0;
38758  const char *__pyx_filename = NULL;
38759  int __pyx_clineno = 0;
38760  PyObject *__pyx_r = 0;
38761  __Pyx_RefNannyDeclarations
38762  __Pyx_RefNannySetupContext("calculateGlobalExteriorElementBoundaryIntegrationWeights (wrapper)", 0);
38763  {
38764  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nQuadraturePoints_elementBoundar,&__pyx_n_s_nExteriorElementBoundaries_globa,&__pyx_n_s_sqrt_det_g,&__pyx_n_s_referenceWeights,&__pyx_n_s_weights,0};
38765  PyObject* values[5] = {0,0,0,0,0};
38766  if (unlikely(__pyx_kwds)) {
38767  Py_ssize_t kw_args;
38768  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
38769  switch (pos_args) {
38770  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
38771  CYTHON_FALLTHROUGH;
38772  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
38773  CYTHON_FALLTHROUGH;
38774  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
38775  CYTHON_FALLTHROUGH;
38776  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
38777  CYTHON_FALLTHROUGH;
38778  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
38779  CYTHON_FALLTHROUGH;
38780  case 0: break;
38781  default: goto __pyx_L5_argtuple_error;
38782  }
38783  kw_args = PyDict_Size(__pyx_kwds);
38784  switch (pos_args) {
38785  case 0:
38786  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nQuadraturePoints_elementBoundar)) != 0)) kw_args--;
38787  else goto __pyx_L5_argtuple_error;
38788  CYTHON_FALLTHROUGH;
38789  case 1:
38790  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nExteriorElementBoundaries_globa)) != 0)) kw_args--;
38791  else {
38792  __Pyx_RaiseArgtupleInvalid("calculateGlobalExteriorElementBoundaryIntegrationWeights", 1, 5, 5, 1); __PYX_ERR(0, 5991, __pyx_L3_error)
38793  }
38794  CYTHON_FALLTHROUGH;
38795  case 2:
38796  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sqrt_det_g)) != 0)) kw_args--;
38797  else {
38798  __Pyx_RaiseArgtupleInvalid("calculateGlobalExteriorElementBoundaryIntegrationWeights", 1, 5, 5, 2); __PYX_ERR(0, 5991, __pyx_L3_error)
38799  }
38800  CYTHON_FALLTHROUGH;
38801  case 3:
38802  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_referenceWeights)) != 0)) kw_args--;
38803  else {
38804  __Pyx_RaiseArgtupleInvalid("calculateGlobalExteriorElementBoundaryIntegrationWeights", 1, 5, 5, 3); __PYX_ERR(0, 5991, __pyx_L3_error)
38805  }
38806  CYTHON_FALLTHROUGH;
38807  case 4:
38808  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weights)) != 0)) kw_args--;
38809  else {
38810  __Pyx_RaiseArgtupleInvalid("calculateGlobalExteriorElementBoundaryIntegrationWeights", 1, 5, 5, 4); __PYX_ERR(0, 5991, __pyx_L3_error)
38811  }
38812  }
38813  if (unlikely(kw_args > 0)) {
38814  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateGlobalExteriorElementBoundaryIntegrationWeights") < 0)) __PYX_ERR(0, 5991, __pyx_L3_error)
38815  }
38816  } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
38817  goto __pyx_L5_argtuple_error;
38818  } else {
38819  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
38820  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
38821  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
38822  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
38823  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
38824  }
38825  __pyx_v_nQuadraturePoints_elementBoundary = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_nQuadraturePoints_elementBoundary == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5991, __pyx_L3_error)
38826  __pyx_v_nExteriorElementBoundaries_global = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_nExteriorElementBoundaries_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5992, __pyx_L3_error)
38827  __pyx_v_sqrt_det_g = ((PyArrayObject *)values[2]);
38828  __pyx_v_referenceWeights = ((PyArrayObject *)values[3]);
38829  __pyx_v_weights = ((PyArrayObject *)values[4]);
38830  }
38831  goto __pyx_L4_argument_unpacking_done;
38832  __pyx_L5_argtuple_error:;
38833  __Pyx_RaiseArgtupleInvalid("calculateGlobalExteriorElementBoundaryIntegrationWeights", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5991, __pyx_L3_error)
38834  __pyx_L3_error:;
38835  __Pyx_AddTraceback("cfemIntegrals.calculateGlobalExteriorElementBoundaryIntegrationWeights", __pyx_clineno, __pyx_lineno, __pyx_filename);
38836  __Pyx_RefNannyFinishContext();
38837  return NULL;
38838  __pyx_L4_argument_unpacking_done:;
38839  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sqrt_det_g), __pyx_ptype_5numpy_ndarray, 1, "sqrt_det_g", 0))) __PYX_ERR(0, 5993, __pyx_L1_error)
38840  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_referenceWeights), __pyx_ptype_5numpy_ndarray, 1, "referenceWeights", 0))) __PYX_ERR(0, 5994, __pyx_L1_error)
38841  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_weights), __pyx_ptype_5numpy_ndarray, 1, "weights", 0))) __PYX_ERR(0, 5995, __pyx_L1_error)
38842  __pyx_r = __pyx_pf_13cfemIntegrals_340calculateGlobalExteriorElementBoundaryIntegrationWeights(__pyx_self, __pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nExteriorElementBoundaries_global, __pyx_v_sqrt_det_g, __pyx_v_referenceWeights, __pyx_v_weights);
38843 
38844  /* function exit code */
38845  goto __pyx_L0;
38846  __pyx_L1_error:;
38847  __pyx_r = NULL;
38848  __pyx_L0:;
38849  __Pyx_RefNannyFinishContext();
38850  return __pyx_r;
38851 }
38852 
38853 static PyObject *__pyx_pf_13cfemIntegrals_340calculateGlobalExteriorElementBoundaryIntegrationWeights(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nQuadraturePoints_elementBoundary, int __pyx_v_nExteriorElementBoundaries_global, PyArrayObject *__pyx_v_sqrt_det_g, PyArrayObject *__pyx_v_referenceWeights, PyArrayObject *__pyx_v_weights) {
38854  PyObject *__pyx_r = NULL;
38855  __Pyx_RefNannyDeclarations
38856  __Pyx_RefNannySetupContext("calculateGlobalExteriorElementBoundaryIntegrationWeights", 0);
38857 
38858  /* "cfemIntegrals.pyx":5996
38859  * np.ndarray referenceWeights,
38860  * np.ndarray weights):
38861  * ccalculateGlobalExteriorElementBoundaryIntegrationWeights(nQuadraturePoints_elementBoundary, # <<<<<<<<<<<<<<
38862  * nExteriorElementBoundaries_global,
38863  * <double*> sqrt_det_g.data,
38864  */
38865  calculateGlobalExteriorElementBoundaryIntegrationWeights(__pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nExteriorElementBoundaries_global, ((double *)__pyx_v_sqrt_det_g->data), ((double *)__pyx_v_referenceWeights->data), ((double *)__pyx_v_weights->data));
38866 
38867  /* "cfemIntegrals.pyx":5991
38868  * <double*> w_dS.data,
38869  * <double*> grad_v_X_w_dS.data)
38870  * def calculateGlobalExteriorElementBoundaryIntegrationWeights(int nQuadraturePoints_elementBoundary, # <<<<<<<<<<<<<<
38871  * int nExteriorElementBoundaries_global,
38872  * np.ndarray sqrt_det_g,
38873  */
38874 
38875  /* function exit code */
38876  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
38877  __Pyx_XGIVEREF(__pyx_r);
38878  __Pyx_RefNannyFinishContext();
38879  return __pyx_r;
38880 }
38881 
38882 /* "cfemIntegrals.pyx":6001
38883  * <double*> referenceWeights.data,
38884  * <double*> weights.data)
38885  * def calculateFiniteElementFunctionValuesGlobalExteriorTrace(np.ndarray exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
38886  * np.ndarray elementBoundaryElementsArray,
38887  * np.ndarray elementBoundaryLocalElementBoundariesArray,
38888  */
38889 
38890 /* Python wrapper */
38891 static PyObject *__pyx_pw_13cfemIntegrals_343calculateFiniteElementFunctionValuesGlobalExteriorTrace(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
38892 static PyMethodDef __pyx_mdef_13cfemIntegrals_343calculateFiniteElementFunctionValuesGlobalExteriorTrace = {"calculateFiniteElementFunctionValuesGlobalExteriorTrace", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_343calculateFiniteElementFunctionValuesGlobalExteriorTrace, METH_VARARGS|METH_KEYWORDS, 0};
38893 static PyObject *__pyx_pw_13cfemIntegrals_343calculateFiniteElementFunctionValuesGlobalExteriorTrace(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
38894  PyArrayObject *__pyx_v_exteriorElementBoundariesArray = 0;
38895  PyArrayObject *__pyx_v_elementBoundaryElementsArray = 0;
38896  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray = 0;
38897  PyArrayObject *__pyx_v_l2g = 0;
38898  PyArrayObject *__pyx_v_dof = 0;
38899  PyArrayObject *__pyx_v_v = 0;
38900  PyArrayObject *__pyx_v_u = 0;
38901  int __pyx_lineno = 0;
38902  const char *__pyx_filename = NULL;
38903  int __pyx_clineno = 0;
38904  PyObject *__pyx_r = 0;
38905  __Pyx_RefNannyDeclarations
38906  __Pyx_RefNannySetupContext("calculateFiniteElementFunctionValuesGlobalExteriorTrace (wrapper)", 0);
38907  {
38908  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exteriorElementBoundariesArray,&__pyx_n_s_elementBoundaryElementsArray,&__pyx_n_s_elementBoundaryLocalElementBound_2,&__pyx_n_s_l2g,&__pyx_n_s_dof,&__pyx_n_s_v,&__pyx_n_s_u,0};
38909  PyObject* values[7] = {0,0,0,0,0,0,0};
38910  if (unlikely(__pyx_kwds)) {
38911  Py_ssize_t kw_args;
38912  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
38913  switch (pos_args) {
38914  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
38915  CYTHON_FALLTHROUGH;
38916  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
38917  CYTHON_FALLTHROUGH;
38918  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
38919  CYTHON_FALLTHROUGH;
38920  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
38921  CYTHON_FALLTHROUGH;
38922  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
38923  CYTHON_FALLTHROUGH;
38924  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
38925  CYTHON_FALLTHROUGH;
38926  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
38927  CYTHON_FALLTHROUGH;
38928  case 0: break;
38929  default: goto __pyx_L5_argtuple_error;
38930  }
38931  kw_args = PyDict_Size(__pyx_kwds);
38932  switch (pos_args) {
38933  case 0:
38934  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exteriorElementBoundariesArray)) != 0)) kw_args--;
38935  else goto __pyx_L5_argtuple_error;
38936  CYTHON_FALLTHROUGH;
38937  case 1:
38938  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElementsArray)) != 0)) kw_args--;
38939  else {
38940  __Pyx_RaiseArgtupleInvalid("calculateFiniteElementFunctionValuesGlobalExteriorTrace", 1, 7, 7, 1); __PYX_ERR(0, 6001, __pyx_L3_error)
38941  }
38942  CYTHON_FALLTHROUGH;
38943  case 2:
38944  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound_2)) != 0)) kw_args--;
38945  else {
38946  __Pyx_RaiseArgtupleInvalid("calculateFiniteElementFunctionValuesGlobalExteriorTrace", 1, 7, 7, 2); __PYX_ERR(0, 6001, __pyx_L3_error)
38947  }
38948  CYTHON_FALLTHROUGH;
38949  case 3:
38950  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_l2g)) != 0)) kw_args--;
38951  else {
38952  __Pyx_RaiseArgtupleInvalid("calculateFiniteElementFunctionValuesGlobalExteriorTrace", 1, 7, 7, 3); __PYX_ERR(0, 6001, __pyx_L3_error)
38953  }
38954  CYTHON_FALLTHROUGH;
38955  case 4:
38956  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dof)) != 0)) kw_args--;
38957  else {
38958  __Pyx_RaiseArgtupleInvalid("calculateFiniteElementFunctionValuesGlobalExteriorTrace", 1, 7, 7, 4); __PYX_ERR(0, 6001, __pyx_L3_error)
38959  }
38960  CYTHON_FALLTHROUGH;
38961  case 5:
38962  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
38963  else {
38964  __Pyx_RaiseArgtupleInvalid("calculateFiniteElementFunctionValuesGlobalExteriorTrace", 1, 7, 7, 5); __PYX_ERR(0, 6001, __pyx_L3_error)
38965  }
38966  CYTHON_FALLTHROUGH;
38967  case 6:
38968  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u)) != 0)) kw_args--;
38969  else {
38970  __Pyx_RaiseArgtupleInvalid("calculateFiniteElementFunctionValuesGlobalExteriorTrace", 1, 7, 7, 6); __PYX_ERR(0, 6001, __pyx_L3_error)
38971  }
38972  }
38973  if (unlikely(kw_args > 0)) {
38974  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateFiniteElementFunctionValuesGlobalExteriorTrace") < 0)) __PYX_ERR(0, 6001, __pyx_L3_error)
38975  }
38976  } else if (PyTuple_GET_SIZE(__pyx_args) != 7) {
38977  goto __pyx_L5_argtuple_error;
38978  } else {
38979  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
38980  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
38981  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
38982  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
38983  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
38984  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
38985  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
38986  }
38987  __pyx_v_exteriorElementBoundariesArray = ((PyArrayObject *)values[0]);
38988  __pyx_v_elementBoundaryElementsArray = ((PyArrayObject *)values[1]);
38989  __pyx_v_elementBoundaryLocalElementBoundariesArray = ((PyArrayObject *)values[2]);
38990  __pyx_v_l2g = ((PyArrayObject *)values[3]);
38991  __pyx_v_dof = ((PyArrayObject *)values[4]);
38992  __pyx_v_v = ((PyArrayObject *)values[5]);
38993  __pyx_v_u = ((PyArrayObject *)values[6]);
38994  }
38995  goto __pyx_L4_argument_unpacking_done;
38996  __pyx_L5_argtuple_error:;
38997  __Pyx_RaiseArgtupleInvalid("calculateFiniteElementFunctionValuesGlobalExteriorTrace", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6001, __pyx_L3_error)
38998  __pyx_L3_error:;
38999  __Pyx_AddTraceback("cfemIntegrals.calculateFiniteElementFunctionValuesGlobalExteriorTrace", __pyx_clineno, __pyx_lineno, __pyx_filename);
39000  __Pyx_RefNannyFinishContext();
39001  return NULL;
39002  __pyx_L4_argument_unpacking_done:;
39003  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exteriorElementBoundariesArray), __pyx_ptype_5numpy_ndarray, 1, "exteriorElementBoundariesArray", 0))) __PYX_ERR(0, 6001, __pyx_L1_error)
39004  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElementsArray), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElementsArray", 0))) __PYX_ERR(0, 6002, __pyx_L1_error)
39005  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundariesArray), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundariesArray", 0))) __PYX_ERR(0, 6003, __pyx_L1_error)
39006  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_l2g), __pyx_ptype_5numpy_ndarray, 1, "l2g", 0))) __PYX_ERR(0, 6004, __pyx_L1_error)
39007  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dof), __pyx_ptype_5numpy_ndarray, 1, "dof", 0))) __PYX_ERR(0, 6005, __pyx_L1_error)
39008  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), __pyx_ptype_5numpy_ndarray, 1, "v", 0))) __PYX_ERR(0, 6006, __pyx_L1_error)
39009  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u), __pyx_ptype_5numpy_ndarray, 1, "u", 0))) __PYX_ERR(0, 6007, __pyx_L1_error)
39010  __pyx_r = __pyx_pf_13cfemIntegrals_342calculateFiniteElementFunctionValuesGlobalExteriorTrace(__pyx_self, __pyx_v_exteriorElementBoundariesArray, __pyx_v_elementBoundaryElementsArray, __pyx_v_elementBoundaryLocalElementBoundariesArray, __pyx_v_l2g, __pyx_v_dof, __pyx_v_v, __pyx_v_u);
39011 
39012  /* function exit code */
39013  goto __pyx_L0;
39014  __pyx_L1_error:;
39015  __pyx_r = NULL;
39016  __pyx_L0:;
39017  __Pyx_RefNannyFinishContext();
39018  return __pyx_r;
39019 }
39020 
39021 static PyObject *__pyx_pf_13cfemIntegrals_342calculateFiniteElementFunctionValuesGlobalExteriorTrace(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_exteriorElementBoundariesArray, PyArrayObject *__pyx_v_elementBoundaryElementsArray, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_dof, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_u) {
39022  int __pyx_v_nQuadraturePoints_elementBoundary;
39023  int __pyx_v_nDOF_trial_element;
39024  int __pyx_v_nExteriorElementBoundaries_global;
39025  int __pyx_v_nComponents;
39026  int __pyx_v_nd;
39027  PyObject *__pyx_r = NULL;
39028  __Pyx_RefNannyDeclarations
39029  int __pyx_t_1;
39030  int __pyx_t_2;
39031  __Pyx_RefNannySetupContext("calculateFiniteElementFunctionValuesGlobalExteriorTrace", 0);
39032 
39033  /* "cfemIntegrals.pyx":6008
39034  * np.ndarray v,
39035  * np.ndarray u):
39036  * cdef int nQuadraturePoints_elementBoundary = v.shape[1] # <<<<<<<<<<<<<<
39037  * cdef int nDOF_trial_element = v.shape[2]
39038  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundariesArray.shape[0]
39039  */
39040  __pyx_v_nQuadraturePoints_elementBoundary = (__pyx_v_v->dimensions[1]);
39041 
39042  /* "cfemIntegrals.pyx":6009
39043  * np.ndarray u):
39044  * cdef int nQuadraturePoints_elementBoundary = v.shape[1]
39045  * cdef int nDOF_trial_element = v.shape[2] # <<<<<<<<<<<<<<
39046  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundariesArray.shape[0]
39047  * cdef int nComponents = 1
39048  */
39049  __pyx_v_nDOF_trial_element = (__pyx_v_v->dimensions[2]);
39050 
39051  /* "cfemIntegrals.pyx":6010
39052  * cdef int nQuadraturePoints_elementBoundary = v.shape[1]
39053  * cdef int nDOF_trial_element = v.shape[2]
39054  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundariesArray.shape[0] # <<<<<<<<<<<<<<
39055  * cdef int nComponents = 1
39056  * cdef int nd = u.ndim
39057  */
39058  __pyx_v_nExteriorElementBoundaries_global = (__pyx_v_exteriorElementBoundariesArray->dimensions[0]);
39059 
39060  /* "cfemIntegrals.pyx":6011
39061  * cdef int nDOF_trial_element = v.shape[2]
39062  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundariesArray.shape[0]
39063  * cdef int nComponents = 1 # <<<<<<<<<<<<<<
39064  * cdef int nd = u.ndim
39065  * if nd == 4:
39066  */
39067  __pyx_v_nComponents = 1;
39068 
39069  /* "cfemIntegrals.pyx":6012
39070  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundariesArray.shape[0]
39071  * cdef int nComponents = 1
39072  * cdef int nd = u.ndim # <<<<<<<<<<<<<<
39073  * if nd == 4:
39074  * nComponents = u.shape[3]
39075  */
39076  __pyx_t_1 = __pyx_v_u->nd;
39077  __pyx_v_nd = __pyx_t_1;
39078 
39079  /* "cfemIntegrals.pyx":6013
39080  * cdef int nComponents = 1
39081  * cdef int nd = u.ndim
39082  * if nd == 4: # <<<<<<<<<<<<<<
39083  * nComponents = u.shape[3]
39084  * else:
39085  */
39086  __pyx_t_2 = ((__pyx_v_nd == 4) != 0);
39087  if (__pyx_t_2) {
39088 
39089  /* "cfemIntegrals.pyx":6014
39090  * cdef int nd = u.ndim
39091  * if nd == 4:
39092  * nComponents = u.shape[3] # <<<<<<<<<<<<<<
39093  * else:
39094  * nComponents = 1
39095  */
39096  __pyx_v_nComponents = (__pyx_v_u->dimensions[3]);
39097 
39098  /* "cfemIntegrals.pyx":6013
39099  * cdef int nComponents = 1
39100  * cdef int nd = u.ndim
39101  * if nd == 4: # <<<<<<<<<<<<<<
39102  * nComponents = u.shape[3]
39103  * else:
39104  */
39105  goto __pyx_L3;
39106  }
39107 
39108  /* "cfemIntegrals.pyx":6016
39109  * nComponents = u.shape[3]
39110  * else:
39111  * nComponents = 1 # <<<<<<<<<<<<<<
39112  * ccalculateFiniteElementFunctionValuesGlobalExteriorTrace(nQuadraturePoints_elementBoundary,
39113  * nDOF_trial_element,
39114  */
39115  /*else*/ {
39116  __pyx_v_nComponents = 1;
39117  }
39118  __pyx_L3:;
39119 
39120  /* "cfemIntegrals.pyx":6017
39121  * else:
39122  * nComponents = 1
39123  * ccalculateFiniteElementFunctionValuesGlobalExteriorTrace(nQuadraturePoints_elementBoundary, # <<<<<<<<<<<<<<
39124  * nDOF_trial_element,
39125  * nComponents,
39126  */
39127  calculateFiniteElementFunctionValuesGlobalExteriorTrace(__pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nDOF_trial_element, __pyx_v_nComponents, __pyx_v_nExteriorElementBoundaries_global, ((int *)__pyx_v_exteriorElementBoundariesArray->data), ((int *)__pyx_v_elementBoundaryElementsArray->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundariesArray->data), ((int *)__pyx_v_l2g->data), ((double *)__pyx_v_dof->data), ((double *)__pyx_v_v->data), ((double *)__pyx_v_u->data));
39128 
39129  /* "cfemIntegrals.pyx":6001
39130  * <double*> referenceWeights.data,
39131  * <double*> weights.data)
39132  * def calculateFiniteElementFunctionValuesGlobalExteriorTrace(np.ndarray exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
39133  * np.ndarray elementBoundaryElementsArray,
39134  * np.ndarray elementBoundaryLocalElementBoundariesArray,
39135  */
39136 
39137  /* function exit code */
39138  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
39139  __Pyx_XGIVEREF(__pyx_r);
39140  __Pyx_RefNannyFinishContext();
39141  return __pyx_r;
39142 }
39143 
39144 /* "cfemIntegrals.pyx":6028
39145  * <double*> v.data,
39146  * <double*> u.data)
39147  * def calculateFiniteElementFunctionGradientValuesGlobalExteriorTrace(np.ndarray exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
39148  * np.ndarray elementBoundaryElementsArray,
39149  * np.ndarray elementBoundaryLocalElementBoundariesArray,
39150  */
39151 
39152 /* Python wrapper */
39153 static PyObject *__pyx_pw_13cfemIntegrals_345calculateFiniteElementFunctionGradientValuesGlobalExteriorTrace(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
39154 static PyMethodDef __pyx_mdef_13cfemIntegrals_345calculateFiniteElementFunctionGradientValuesGlobalExteriorTrace = {"calculateFiniteElementFunctionGradientValuesGlobalExteriorTrace", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_345calculateFiniteElementFunctionGradientValuesGlobalExteriorTrace, METH_VARARGS|METH_KEYWORDS, 0};
39155 static PyObject *__pyx_pw_13cfemIntegrals_345calculateFiniteElementFunctionGradientValuesGlobalExteriorTrace(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
39156  PyArrayObject *__pyx_v_exteriorElementBoundariesArray = 0;
39157  PyArrayObject *__pyx_v_elementBoundaryElementsArray = 0;
39158  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray = 0;
39159  PyArrayObject *__pyx_v_l2g = 0;
39160  PyArrayObject *__pyx_v_dof = 0;
39161  PyArrayObject *__pyx_v_grad_v = 0;
39162  PyArrayObject *__pyx_v_grad_u = 0;
39163  int __pyx_lineno = 0;
39164  const char *__pyx_filename = NULL;
39165  int __pyx_clineno = 0;
39166  PyObject *__pyx_r = 0;
39167  __Pyx_RefNannyDeclarations
39168  __Pyx_RefNannySetupContext("calculateFiniteElementFunctionGradientValuesGlobalExteriorTrace (wrapper)", 0);
39169  {
39170  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exteriorElementBoundariesArray,&__pyx_n_s_elementBoundaryElementsArray,&__pyx_n_s_elementBoundaryLocalElementBound_2,&__pyx_n_s_l2g,&__pyx_n_s_dof,&__pyx_n_s_grad_v,&__pyx_n_s_grad_u,0};
39171  PyObject* values[7] = {0,0,0,0,0,0,0};
39172  if (unlikely(__pyx_kwds)) {
39173  Py_ssize_t kw_args;
39174  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
39175  switch (pos_args) {
39176  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
39177  CYTHON_FALLTHROUGH;
39178  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
39179  CYTHON_FALLTHROUGH;
39180  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
39181  CYTHON_FALLTHROUGH;
39182  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
39183  CYTHON_FALLTHROUGH;
39184  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
39185  CYTHON_FALLTHROUGH;
39186  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
39187  CYTHON_FALLTHROUGH;
39188  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
39189  CYTHON_FALLTHROUGH;
39190  case 0: break;
39191  default: goto __pyx_L5_argtuple_error;
39192  }
39193  kw_args = PyDict_Size(__pyx_kwds);
39194  switch (pos_args) {
39195  case 0:
39196  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exteriorElementBoundariesArray)) != 0)) kw_args--;
39197  else goto __pyx_L5_argtuple_error;
39198  CYTHON_FALLTHROUGH;
39199  case 1:
39200  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElementsArray)) != 0)) kw_args--;
39201  else {
39202  __Pyx_RaiseArgtupleInvalid("calculateFiniteElementFunctionGradientValuesGlobalExteriorTrace", 1, 7, 7, 1); __PYX_ERR(0, 6028, __pyx_L3_error)
39203  }
39204  CYTHON_FALLTHROUGH;
39205  case 2:
39206  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound_2)) != 0)) kw_args--;
39207  else {
39208  __Pyx_RaiseArgtupleInvalid("calculateFiniteElementFunctionGradientValuesGlobalExteriorTrace", 1, 7, 7, 2); __PYX_ERR(0, 6028, __pyx_L3_error)
39209  }
39210  CYTHON_FALLTHROUGH;
39211  case 3:
39212  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_l2g)) != 0)) kw_args--;
39213  else {
39214  __Pyx_RaiseArgtupleInvalid("calculateFiniteElementFunctionGradientValuesGlobalExteriorTrace", 1, 7, 7, 3); __PYX_ERR(0, 6028, __pyx_L3_error)
39215  }
39216  CYTHON_FALLTHROUGH;
39217  case 4:
39218  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dof)) != 0)) kw_args--;
39219  else {
39220  __Pyx_RaiseArgtupleInvalid("calculateFiniteElementFunctionGradientValuesGlobalExteriorTrace", 1, 7, 7, 4); __PYX_ERR(0, 6028, __pyx_L3_error)
39221  }
39222  CYTHON_FALLTHROUGH;
39223  case 5:
39224  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_v)) != 0)) kw_args--;
39225  else {
39226  __Pyx_RaiseArgtupleInvalid("calculateFiniteElementFunctionGradientValuesGlobalExteriorTrace", 1, 7, 7, 5); __PYX_ERR(0, 6028, __pyx_L3_error)
39227  }
39228  CYTHON_FALLTHROUGH;
39229  case 6:
39230  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_u)) != 0)) kw_args--;
39231  else {
39232  __Pyx_RaiseArgtupleInvalid("calculateFiniteElementFunctionGradientValuesGlobalExteriorTrace", 1, 7, 7, 6); __PYX_ERR(0, 6028, __pyx_L3_error)
39233  }
39234  }
39235  if (unlikely(kw_args > 0)) {
39236  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateFiniteElementFunctionGradientValuesGlobalExteriorTrace") < 0)) __PYX_ERR(0, 6028, __pyx_L3_error)
39237  }
39238  } else if (PyTuple_GET_SIZE(__pyx_args) != 7) {
39239  goto __pyx_L5_argtuple_error;
39240  } else {
39241  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
39242  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
39243  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
39244  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
39245  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
39246  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
39247  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
39248  }
39249  __pyx_v_exteriorElementBoundariesArray = ((PyArrayObject *)values[0]);
39250  __pyx_v_elementBoundaryElementsArray = ((PyArrayObject *)values[1]);
39251  __pyx_v_elementBoundaryLocalElementBoundariesArray = ((PyArrayObject *)values[2]);
39252  __pyx_v_l2g = ((PyArrayObject *)values[3]);
39253  __pyx_v_dof = ((PyArrayObject *)values[4]);
39254  __pyx_v_grad_v = ((PyArrayObject *)values[5]);
39255  __pyx_v_grad_u = ((PyArrayObject *)values[6]);
39256  }
39257  goto __pyx_L4_argument_unpacking_done;
39258  __pyx_L5_argtuple_error:;
39259  __Pyx_RaiseArgtupleInvalid("calculateFiniteElementFunctionGradientValuesGlobalExteriorTrace", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6028, __pyx_L3_error)
39260  __pyx_L3_error:;
39261  __Pyx_AddTraceback("cfemIntegrals.calculateFiniteElementFunctionGradientValuesGlobalExteriorTrace", __pyx_clineno, __pyx_lineno, __pyx_filename);
39262  __Pyx_RefNannyFinishContext();
39263  return NULL;
39264  __pyx_L4_argument_unpacking_done:;
39265  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exteriorElementBoundariesArray), __pyx_ptype_5numpy_ndarray, 1, "exteriorElementBoundariesArray", 0))) __PYX_ERR(0, 6028, __pyx_L1_error)
39266  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElementsArray), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElementsArray", 0))) __PYX_ERR(0, 6029, __pyx_L1_error)
39267  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundariesArray), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundariesArray", 0))) __PYX_ERR(0, 6030, __pyx_L1_error)
39268  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_l2g), __pyx_ptype_5numpy_ndarray, 1, "l2g", 0))) __PYX_ERR(0, 6031, __pyx_L1_error)
39269  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dof), __pyx_ptype_5numpy_ndarray, 1, "dof", 0))) __PYX_ERR(0, 6032, __pyx_L1_error)
39270  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_v), __pyx_ptype_5numpy_ndarray, 1, "grad_v", 0))) __PYX_ERR(0, 6033, __pyx_L1_error)
39271  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_u), __pyx_ptype_5numpy_ndarray, 1, "grad_u", 0))) __PYX_ERR(0, 6034, __pyx_L1_error)
39272  __pyx_r = __pyx_pf_13cfemIntegrals_344calculateFiniteElementFunctionGradientValuesGlobalExteriorTrace(__pyx_self, __pyx_v_exteriorElementBoundariesArray, __pyx_v_elementBoundaryElementsArray, __pyx_v_elementBoundaryLocalElementBoundariesArray, __pyx_v_l2g, __pyx_v_dof, __pyx_v_grad_v, __pyx_v_grad_u);
39273 
39274  /* function exit code */
39275  goto __pyx_L0;
39276  __pyx_L1_error:;
39277  __pyx_r = NULL;
39278  __pyx_L0:;
39279  __Pyx_RefNannyFinishContext();
39280  return __pyx_r;
39281 }
39282 
39283 static PyObject *__pyx_pf_13cfemIntegrals_344calculateFiniteElementFunctionGradientValuesGlobalExteriorTrace(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_exteriorElementBoundariesArray, PyArrayObject *__pyx_v_elementBoundaryElementsArray, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_dof, PyArrayObject *__pyx_v_grad_v, PyArrayObject *__pyx_v_grad_u) {
39284  int __pyx_v_nQuadraturePoints_elementBoundary;
39285  int __pyx_v_nDOF_trial_element;
39286  int __pyx_v_nExteriorElementBoundaries_global;
39287  int __pyx_v_nComponents;
39288  int __pyx_v_nSpace;
39289  int __pyx_v_nd;
39290  PyObject *__pyx_r = NULL;
39291  __Pyx_RefNannyDeclarations
39292  int __pyx_t_1;
39293  int __pyx_t_2;
39294  __Pyx_RefNannySetupContext("calculateFiniteElementFunctionGradientValuesGlobalExteriorTrace", 0);
39295 
39296  /* "cfemIntegrals.pyx":6035
39297  * np.ndarray grad_v,
39298  * np.ndarray grad_u):
39299  * cdef int nQuadraturePoints_elementBoundary = grad_v.shape[1] # <<<<<<<<<<<<<<
39300  * cdef int nDOF_trial_element = grad_v.shape[2]
39301  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundariesArray.shape[0]
39302  */
39303  __pyx_v_nQuadraturePoints_elementBoundary = (__pyx_v_grad_v->dimensions[1]);
39304 
39305  /* "cfemIntegrals.pyx":6036
39306  * np.ndarray grad_u):
39307  * cdef int nQuadraturePoints_elementBoundary = grad_v.shape[1]
39308  * cdef int nDOF_trial_element = grad_v.shape[2] # <<<<<<<<<<<<<<
39309  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundariesArray.shape[0]
39310  * cdef int nComponents = 1
39311  */
39312  __pyx_v_nDOF_trial_element = (__pyx_v_grad_v->dimensions[2]);
39313 
39314  /* "cfemIntegrals.pyx":6037
39315  * cdef int nQuadraturePoints_elementBoundary = grad_v.shape[1]
39316  * cdef int nDOF_trial_element = grad_v.shape[2]
39317  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundariesArray.shape[0] # <<<<<<<<<<<<<<
39318  * cdef int nComponents = 1
39319  * cdef int nSpace = 1
39320  */
39321  __pyx_v_nExteriorElementBoundaries_global = (__pyx_v_exteriorElementBoundariesArray->dimensions[0]);
39322 
39323  /* "cfemIntegrals.pyx":6038
39324  * cdef int nDOF_trial_element = grad_v.shape[2]
39325  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundariesArray.shape[0]
39326  * cdef int nComponents = 1 # <<<<<<<<<<<<<<
39327  * cdef int nSpace = 1
39328  * cdef int nd = grad_u.ndim
39329  */
39330  __pyx_v_nComponents = 1;
39331 
39332  /* "cfemIntegrals.pyx":6039
39333  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundariesArray.shape[0]
39334  * cdef int nComponents = 1
39335  * cdef int nSpace = 1 # <<<<<<<<<<<<<<
39336  * cdef int nd = grad_u.ndim
39337  * if nd == 4:
39338  */
39339  __pyx_v_nSpace = 1;
39340 
39341  /* "cfemIntegrals.pyx":6040
39342  * cdef int nComponents = 1
39343  * cdef int nSpace = 1
39344  * cdef int nd = grad_u.ndim # <<<<<<<<<<<<<<
39345  * if nd == 4:
39346  * nComponents = grad_u.shape[2]
39347  */
39348  __pyx_t_1 = __pyx_v_grad_u->nd;
39349  __pyx_v_nd = __pyx_t_1;
39350 
39351  /* "cfemIntegrals.pyx":6041
39352  * cdef int nSpace = 1
39353  * cdef int nd = grad_u.ndim
39354  * if nd == 4: # <<<<<<<<<<<<<<
39355  * nComponents = grad_u.shape[2]
39356  * nSpace = grad_u.shape[3]
39357  */
39358  __pyx_t_2 = ((__pyx_v_nd == 4) != 0);
39359  if (__pyx_t_2) {
39360 
39361  /* "cfemIntegrals.pyx":6042
39362  * cdef int nd = grad_u.ndim
39363  * if nd == 4:
39364  * nComponents = grad_u.shape[2] # <<<<<<<<<<<<<<
39365  * nSpace = grad_u.shape[3]
39366  * else:
39367  */
39368  __pyx_v_nComponents = (__pyx_v_grad_u->dimensions[2]);
39369 
39370  /* "cfemIntegrals.pyx":6043
39371  * if nd == 4:
39372  * nComponents = grad_u.shape[2]
39373  * nSpace = grad_u.shape[3] # <<<<<<<<<<<<<<
39374  * else:
39375  * nComponents = 1
39376  */
39377  __pyx_v_nSpace = (__pyx_v_grad_u->dimensions[3]);
39378 
39379  /* "cfemIntegrals.pyx":6041
39380  * cdef int nSpace = 1
39381  * cdef int nd = grad_u.ndim
39382  * if nd == 4: # <<<<<<<<<<<<<<
39383  * nComponents = grad_u.shape[2]
39384  * nSpace = grad_u.shape[3]
39385  */
39386  goto __pyx_L3;
39387  }
39388 
39389  /* "cfemIntegrals.pyx":6045
39390  * nSpace = grad_u.shape[3]
39391  * else:
39392  * nComponents = 1 # <<<<<<<<<<<<<<
39393  * nSpace = grad_u.shape[2]
39394  * ccalculateFiniteElementFunctionGradientValuesGlobalExteriorTrace(nQuadraturePoints_elementBoundary,
39395  */
39396  /*else*/ {
39397  __pyx_v_nComponents = 1;
39398 
39399  /* "cfemIntegrals.pyx":6046
39400  * else:
39401  * nComponents = 1
39402  * nSpace = grad_u.shape[2] # <<<<<<<<<<<<<<
39403  * ccalculateFiniteElementFunctionGradientValuesGlobalExteriorTrace(nQuadraturePoints_elementBoundary,
39404  * nDOF_trial_element,
39405  */
39406  __pyx_v_nSpace = (__pyx_v_grad_u->dimensions[2]);
39407  }
39408  __pyx_L3:;
39409 
39410  /* "cfemIntegrals.pyx":6047
39411  * nComponents = 1
39412  * nSpace = grad_u.shape[2]
39413  * ccalculateFiniteElementFunctionGradientValuesGlobalExteriorTrace(nQuadraturePoints_elementBoundary, # <<<<<<<<<<<<<<
39414  * nDOF_trial_element,
39415  * nComponents,
39416  */
39417  calculateFiniteElementFunctionGradientValuesGlobalExteriorTrace(__pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nDOF_trial_element, __pyx_v_nComponents, __pyx_v_nSpace, __pyx_v_nExteriorElementBoundaries_global, ((int *)__pyx_v_exteriorElementBoundariesArray->data), ((int *)__pyx_v_elementBoundaryElementsArray->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundariesArray->data), ((int *)__pyx_v_l2g->data), ((double *)__pyx_v_dof->data), ((double *)__pyx_v_grad_v->data), ((double *)__pyx_v_grad_u->data));
39418 
39419  /* "cfemIntegrals.pyx":6028
39420  * <double*> v.data,
39421  * <double*> u.data)
39422  * def calculateFiniteElementFunctionGradientValuesGlobalExteriorTrace(np.ndarray exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
39423  * np.ndarray elementBoundaryElementsArray,
39424  * np.ndarray elementBoundaryLocalElementBoundariesArray,
39425  */
39426 
39427  /* function exit code */
39428  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
39429  __Pyx_XGIVEREF(__pyx_r);
39430  __Pyx_RefNannyFinishContext();
39431  return __pyx_r;
39432 }
39433 
39434 /* "cfemIntegrals.pyx":6059
39435  * <double*> grad_v.data,
39436  * <double*> grad_u.data)
39437  * def copyBetweenFreeUnknownsAndGlobalUnknowns(int nDOF2set, # <<<<<<<<<<<<<<
39438  * int offset,
39439  * int stride,
39440  */
39441 
39442 /* Python wrapper */
39443 static PyObject *__pyx_pw_13cfemIntegrals_347copyBetweenFreeUnknownsAndGlobalUnknowns(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
39444 static PyMethodDef __pyx_mdef_13cfemIntegrals_347copyBetweenFreeUnknownsAndGlobalUnknowns = {"copyBetweenFreeUnknownsAndGlobalUnknowns", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_347copyBetweenFreeUnknownsAndGlobalUnknowns, METH_VARARGS|METH_KEYWORDS, 0};
39445 static PyObject *__pyx_pw_13cfemIntegrals_347copyBetweenFreeUnknownsAndGlobalUnknowns(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
39446  int __pyx_v_nDOF2set;
39447  int __pyx_v_offset;
39448  int __pyx_v_stride;
39449  PyArrayObject *__pyx_v_globalDOFids = 0;
39450  PyArrayObject *__pyx_v_freeDOFids = 0;
39451  PyArrayObject *__pyx_v_free_u = 0;
39452  PyArrayObject *__pyx_v_u = 0;
39453  int __pyx_lineno = 0;
39454  const char *__pyx_filename = NULL;
39455  int __pyx_clineno = 0;
39456  PyObject *__pyx_r = 0;
39457  __Pyx_RefNannyDeclarations
39458  __Pyx_RefNannySetupContext("copyBetweenFreeUnknownsAndGlobalUnknowns (wrapper)", 0);
39459  {
39460  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nDOF2set,&__pyx_n_s_offset,&__pyx_n_s_stride,&__pyx_n_s_globalDOFids,&__pyx_n_s_freeDOFids,&__pyx_n_s_free_u,&__pyx_n_s_u,0};
39461  PyObject* values[7] = {0,0,0,0,0,0,0};
39462  if (unlikely(__pyx_kwds)) {
39463  Py_ssize_t kw_args;
39464  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
39465  switch (pos_args) {
39466  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
39467  CYTHON_FALLTHROUGH;
39468  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
39469  CYTHON_FALLTHROUGH;
39470  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
39471  CYTHON_FALLTHROUGH;
39472  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
39473  CYTHON_FALLTHROUGH;
39474  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
39475  CYTHON_FALLTHROUGH;
39476  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
39477  CYTHON_FALLTHROUGH;
39478  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
39479  CYTHON_FALLTHROUGH;
39480  case 0: break;
39481  default: goto __pyx_L5_argtuple_error;
39482  }
39483  kw_args = PyDict_Size(__pyx_kwds);
39484  switch (pos_args) {
39485  case 0:
39486  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nDOF2set)) != 0)) kw_args--;
39487  else goto __pyx_L5_argtuple_error;
39488  CYTHON_FALLTHROUGH;
39489  case 1:
39490  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset)) != 0)) kw_args--;
39491  else {
39492  __Pyx_RaiseArgtupleInvalid("copyBetweenFreeUnknownsAndGlobalUnknowns", 1, 7, 7, 1); __PYX_ERR(0, 6059, __pyx_L3_error)
39493  }
39494  CYTHON_FALLTHROUGH;
39495  case 2:
39496  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stride)) != 0)) kw_args--;
39497  else {
39498  __Pyx_RaiseArgtupleInvalid("copyBetweenFreeUnknownsAndGlobalUnknowns", 1, 7, 7, 2); __PYX_ERR(0, 6059, __pyx_L3_error)
39499  }
39500  CYTHON_FALLTHROUGH;
39501  case 3:
39502  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_globalDOFids)) != 0)) kw_args--;
39503  else {
39504  __Pyx_RaiseArgtupleInvalid("copyBetweenFreeUnknownsAndGlobalUnknowns", 1, 7, 7, 3); __PYX_ERR(0, 6059, __pyx_L3_error)
39505  }
39506  CYTHON_FALLTHROUGH;
39507  case 4:
39508  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeDOFids)) != 0)) kw_args--;
39509  else {
39510  __Pyx_RaiseArgtupleInvalid("copyBetweenFreeUnknownsAndGlobalUnknowns", 1, 7, 7, 4); __PYX_ERR(0, 6059, __pyx_L3_error)
39511  }
39512  CYTHON_FALLTHROUGH;
39513  case 5:
39514  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_free_u)) != 0)) kw_args--;
39515  else {
39516  __Pyx_RaiseArgtupleInvalid("copyBetweenFreeUnknownsAndGlobalUnknowns", 1, 7, 7, 5); __PYX_ERR(0, 6059, __pyx_L3_error)
39517  }
39518  CYTHON_FALLTHROUGH;
39519  case 6:
39520  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u)) != 0)) kw_args--;
39521  else {
39522  __Pyx_RaiseArgtupleInvalid("copyBetweenFreeUnknownsAndGlobalUnknowns", 1, 7, 7, 6); __PYX_ERR(0, 6059, __pyx_L3_error)
39523  }
39524  }
39525  if (unlikely(kw_args > 0)) {
39526  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "copyBetweenFreeUnknownsAndGlobalUnknowns") < 0)) __PYX_ERR(0, 6059, __pyx_L3_error)
39527  }
39528  } else if (PyTuple_GET_SIZE(__pyx_args) != 7) {
39529  goto __pyx_L5_argtuple_error;
39530  } else {
39531  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
39532  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
39533  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
39534  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
39535  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
39536  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
39537  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
39538  }
39539  __pyx_v_nDOF2set = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_nDOF2set == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6059, __pyx_L3_error)
39540  __pyx_v_offset = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_offset == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6060, __pyx_L3_error)
39541  __pyx_v_stride = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_stride == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6061, __pyx_L3_error)
39542  __pyx_v_globalDOFids = ((PyArrayObject *)values[3]);
39543  __pyx_v_freeDOFids = ((PyArrayObject *)values[4]);
39544  __pyx_v_free_u = ((PyArrayObject *)values[5]);
39545  __pyx_v_u = ((PyArrayObject *)values[6]);
39546  }
39547  goto __pyx_L4_argument_unpacking_done;
39548  __pyx_L5_argtuple_error:;
39549  __Pyx_RaiseArgtupleInvalid("copyBetweenFreeUnknownsAndGlobalUnknowns", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6059, __pyx_L3_error)
39550  __pyx_L3_error:;
39551  __Pyx_AddTraceback("cfemIntegrals.copyBetweenFreeUnknownsAndGlobalUnknowns", __pyx_clineno, __pyx_lineno, __pyx_filename);
39552  __Pyx_RefNannyFinishContext();
39553  return NULL;
39554  __pyx_L4_argument_unpacking_done:;
39555  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_globalDOFids), __pyx_ptype_5numpy_ndarray, 1, "globalDOFids", 0))) __PYX_ERR(0, 6062, __pyx_L1_error)
39556  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeDOFids), __pyx_ptype_5numpy_ndarray, 1, "freeDOFids", 0))) __PYX_ERR(0, 6063, __pyx_L1_error)
39557  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_free_u), __pyx_ptype_5numpy_ndarray, 1, "free_u", 0))) __PYX_ERR(0, 6064, __pyx_L1_error)
39558  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u), __pyx_ptype_5numpy_ndarray, 1, "u", 0))) __PYX_ERR(0, 6065, __pyx_L1_error)
39559  __pyx_r = __pyx_pf_13cfemIntegrals_346copyBetweenFreeUnknownsAndGlobalUnknowns(__pyx_self, __pyx_v_nDOF2set, __pyx_v_offset, __pyx_v_stride, __pyx_v_globalDOFids, __pyx_v_freeDOFids, __pyx_v_free_u, __pyx_v_u);
39560 
39561  /* function exit code */
39562  goto __pyx_L0;
39563  __pyx_L1_error:;
39564  __pyx_r = NULL;
39565  __pyx_L0:;
39566  __Pyx_RefNannyFinishContext();
39567  return __pyx_r;
39568 }
39569 
39570 static PyObject *__pyx_pf_13cfemIntegrals_346copyBetweenFreeUnknownsAndGlobalUnknowns(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nDOF2set, int __pyx_v_offset, int __pyx_v_stride, PyArrayObject *__pyx_v_globalDOFids, PyArrayObject *__pyx_v_freeDOFids, PyArrayObject *__pyx_v_free_u, PyArrayObject *__pyx_v_u) {
39571  PyObject *__pyx_r = NULL;
39572  __Pyx_RefNannyDeclarations
39573  int __pyx_t_1;
39574  PyObject *__pyx_t_2 = NULL;
39575  PyObject *__pyx_t_3 = NULL;
39576  int __pyx_lineno = 0;
39577  const char *__pyx_filename = NULL;
39578  int __pyx_clineno = 0;
39579  __Pyx_RefNannySetupContext("copyBetweenFreeUnknownsAndGlobalUnknowns", 0);
39580 
39581  /* "cfemIntegrals.pyx":6066
39582  * np.ndarray free_u,
39583  * np.ndarray u):
39584  * if nDOF2set > 0: # <<<<<<<<<<<<<<
39585  * ccopyFreeUnknownsToGlobalUnknowns(globalDOFids.shape[0],
39586  * offset,
39587  */
39588  __pyx_t_1 = ((__pyx_v_nDOF2set > 0) != 0);
39589  if (__pyx_t_1) {
39590 
39591  /* "cfemIntegrals.pyx":6067
39592  * np.ndarray u):
39593  * if nDOF2set > 0:
39594  * ccopyFreeUnknownsToGlobalUnknowns(globalDOFids.shape[0], # <<<<<<<<<<<<<<
39595  * offset,
39596  * stride,
39597  */
39598  copyFreeUnknownsToGlobalUnknowns((__pyx_v_globalDOFids->dimensions[0]), __pyx_v_offset, __pyx_v_stride, ((int *)__pyx_v_globalDOFids->data), ((int *)__pyx_v_freeDOFids->data), ((double *)__pyx_v_free_u->data), ((double *)__pyx_v_u->data));
39599 
39600  /* "cfemIntegrals.pyx":6066
39601  * np.ndarray free_u,
39602  * np.ndarray u):
39603  * if nDOF2set > 0: # <<<<<<<<<<<<<<
39604  * ccopyFreeUnknownsToGlobalUnknowns(globalDOFids.shape[0],
39605  * offset,
39606  */
39607  goto __pyx_L3;
39608  }
39609 
39610  /* "cfemIntegrals.pyx":6074
39611  * <double*> free_u.data,
39612  * <double*> u.data)
39613  * elif nDOF2set == 0: # <<<<<<<<<<<<<<
39614  * ccopyGlobalUnknownsToFreeUnknowns(globalDOFids.shape[0],
39615  * offset,
39616  */
39617  __pyx_t_1 = ((__pyx_v_nDOF2set == 0) != 0);
39618  if (__pyx_t_1) {
39619 
39620  /* "cfemIntegrals.pyx":6075
39621  * <double*> u.data)
39622  * elif nDOF2set == 0:
39623  * ccopyGlobalUnknownsToFreeUnknowns(globalDOFids.shape[0], # <<<<<<<<<<<<<<
39624  * offset,
39625  * stride,
39626  */
39627  copyGlobalUnknownsToFreeUnknowns((__pyx_v_globalDOFids->dimensions[0]), __pyx_v_offset, __pyx_v_stride, ((int *)__pyx_v_globalDOFids->data), ((int *)__pyx_v_freeDOFids->data), ((double *)__pyx_v_u->data), ((double *)__pyx_v_free_u->data));
39628 
39629  /* "cfemIntegrals.pyx":6074
39630  * <double*> free_u.data,
39631  * <double*> u.data)
39632  * elif nDOF2set == 0: # <<<<<<<<<<<<<<
39633  * ccopyGlobalUnknownsToFreeUnknowns(globalDOFids.shape[0],
39634  * offset,
39635  */
39636  goto __pyx_L3;
39637  }
39638 
39639  /* "cfemIntegrals.pyx":6083
39640  * <double*> free_u.data)
39641  * else:
39642  * print("error copyFromFreeToGlobal = ", nDOF2set, " not recognized quitting\n") # <<<<<<<<<<<<<<
39643  * def updateInteriorElementBoundaryDiffusionAdjoint(np.ndarray interiorElementBoundaries,
39644  * np.ndarray elementBoundaryElements,
39645  */
39646  /*else*/ {
39647  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_nDOF2set); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6083, __pyx_L1_error)
39648  __Pyx_GOTREF(__pyx_t_2);
39649  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6083, __pyx_L1_error)
39650  __Pyx_GOTREF(__pyx_t_3);
39651  __Pyx_INCREF(__pyx_kp_s_error_copyFromFreeToGlobal);
39652  __Pyx_GIVEREF(__pyx_kp_s_error_copyFromFreeToGlobal);
39653  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_s_error_copyFromFreeToGlobal);
39654  __Pyx_GIVEREF(__pyx_t_2);
39655  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
39656  __Pyx_INCREF(__pyx_kp_s_not_recognized_quitting);
39657  __Pyx_GIVEREF(__pyx_kp_s_not_recognized_quitting);
39658  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_s_not_recognized_quitting);
39659  __pyx_t_2 = 0;
39660  if (__Pyx_PrintOne(0, __pyx_t_3) < 0) __PYX_ERR(0, 6083, __pyx_L1_error)
39661  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
39662  }
39663  __pyx_L3:;
39664 
39665  /* "cfemIntegrals.pyx":6059
39666  * <double*> grad_v.data,
39667  * <double*> grad_u.data)
39668  * def copyBetweenFreeUnknownsAndGlobalUnknowns(int nDOF2set, # <<<<<<<<<<<<<<
39669  * int offset,
39670  * int stride,
39671  */
39672 
39673  /* function exit code */
39674  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
39675  goto __pyx_L0;
39676  __pyx_L1_error:;
39677  __Pyx_XDECREF(__pyx_t_2);
39678  __Pyx_XDECREF(__pyx_t_3);
39679  __Pyx_AddTraceback("cfemIntegrals.copyBetweenFreeUnknownsAndGlobalUnknowns", __pyx_clineno, __pyx_lineno, __pyx_filename);
39680  __pyx_r = NULL;
39681  __pyx_L0:;
39682  __Pyx_XGIVEREF(__pyx_r);
39683  __Pyx_RefNannyFinishContext();
39684  return __pyx_r;
39685 }
39686 
39687 /* "cfemIntegrals.pyx":6084
39688  * else:
39689  * print("error copyFromFreeToGlobal = ", nDOF2set, " not recognized quitting\n")
39690  * def updateInteriorElementBoundaryDiffusionAdjoint(np.ndarray interiorElementBoundaries, # <<<<<<<<<<<<<<
39691  * np.ndarray elementBoundaryElements,
39692  * np.ndarray elementBoundaryLocalElementBoundaries,
39693  */
39694 
39695 /* Python wrapper */
39696 static PyObject *__pyx_pw_13cfemIntegrals_349updateInteriorElementBoundaryDiffusionAdjoint(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
39697 static PyMethodDef __pyx_mdef_13cfemIntegrals_349updateInteriorElementBoundaryDiffusionAdjoint = {"updateInteriorElementBoundaryDiffusionAdjoint", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_349updateInteriorElementBoundaryDiffusionAdjoint, METH_VARARGS|METH_KEYWORDS, 0};
39698 static PyObject *__pyx_pw_13cfemIntegrals_349updateInteriorElementBoundaryDiffusionAdjoint(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
39699  PyArrayObject *__pyx_v_interiorElementBoundaries = 0;
39700  PyArrayObject *__pyx_v_elementBoundaryElements = 0;
39701  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries = 0;
39702  double __pyx_v_sigma;
39703  PyArrayObject *__pyx_v_u = 0;
39704  PyArrayObject *__pyx_v_n = 0;
39705  PyArrayObject *__pyx_v_a = 0;
39706  PyArrayObject *__pyx_v_grad_w = 0;
39707  PyArrayObject *__pyx_v_dS = 0;
39708  PyArrayObject *__pyx_v_residual = 0;
39709  int __pyx_lineno = 0;
39710  const char *__pyx_filename = NULL;
39711  int __pyx_clineno = 0;
39712  PyObject *__pyx_r = 0;
39713  __Pyx_RefNannyDeclarations
39714  __Pyx_RefNannySetupContext("updateInteriorElementBoundaryDiffusionAdjoint (wrapper)", 0);
39715  {
39716  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_interiorElementBoundaries,&__pyx_n_s_elementBoundaryElements,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_sigma,&__pyx_n_s_u,&__pyx_n_s_n,&__pyx_n_s_a,&__pyx_n_s_grad_w,&__pyx_n_s_dS,&__pyx_n_s_residual,0};
39717  PyObject* values[10] = {0,0,0,0,0,0,0,0,0,0};
39718  if (unlikely(__pyx_kwds)) {
39719  Py_ssize_t kw_args;
39720  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
39721  switch (pos_args) {
39722  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
39723  CYTHON_FALLTHROUGH;
39724  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
39725  CYTHON_FALLTHROUGH;
39726  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
39727  CYTHON_FALLTHROUGH;
39728  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
39729  CYTHON_FALLTHROUGH;
39730  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
39731  CYTHON_FALLTHROUGH;
39732  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
39733  CYTHON_FALLTHROUGH;
39734  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
39735  CYTHON_FALLTHROUGH;
39736  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
39737  CYTHON_FALLTHROUGH;
39738  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
39739  CYTHON_FALLTHROUGH;
39740  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
39741  CYTHON_FALLTHROUGH;
39742  case 0: break;
39743  default: goto __pyx_L5_argtuple_error;
39744  }
39745  kw_args = PyDict_Size(__pyx_kwds);
39746  switch (pos_args) {
39747  case 0:
39748  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_interiorElementBoundaries)) != 0)) kw_args--;
39749  else goto __pyx_L5_argtuple_error;
39750  CYTHON_FALLTHROUGH;
39751  case 1:
39752  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElements)) != 0)) kw_args--;
39753  else {
39754  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundaryDiffusionAdjoint", 1, 10, 10, 1); __PYX_ERR(0, 6084, __pyx_L3_error)
39755  }
39756  CYTHON_FALLTHROUGH;
39757  case 2:
39758  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
39759  else {
39760  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundaryDiffusionAdjoint", 1, 10, 10, 2); __PYX_ERR(0, 6084, __pyx_L3_error)
39761  }
39762  CYTHON_FALLTHROUGH;
39763  case 3:
39764  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sigma)) != 0)) kw_args--;
39765  else {
39766  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundaryDiffusionAdjoint", 1, 10, 10, 3); __PYX_ERR(0, 6084, __pyx_L3_error)
39767  }
39768  CYTHON_FALLTHROUGH;
39769  case 4:
39770  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u)) != 0)) kw_args--;
39771  else {
39772  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundaryDiffusionAdjoint", 1, 10, 10, 4); __PYX_ERR(0, 6084, __pyx_L3_error)
39773  }
39774  CYTHON_FALLTHROUGH;
39775  case 5:
39776  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n)) != 0)) kw_args--;
39777  else {
39778  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundaryDiffusionAdjoint", 1, 10, 10, 5); __PYX_ERR(0, 6084, __pyx_L3_error)
39779  }
39780  CYTHON_FALLTHROUGH;
39781  case 6:
39782  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
39783  else {
39784  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundaryDiffusionAdjoint", 1, 10, 10, 6); __PYX_ERR(0, 6084, __pyx_L3_error)
39785  }
39786  CYTHON_FALLTHROUGH;
39787  case 7:
39788  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_w)) != 0)) kw_args--;
39789  else {
39790  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundaryDiffusionAdjoint", 1, 10, 10, 7); __PYX_ERR(0, 6084, __pyx_L3_error)
39791  }
39792  CYTHON_FALLTHROUGH;
39793  case 8:
39794  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dS)) != 0)) kw_args--;
39795  else {
39796  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundaryDiffusionAdjoint", 1, 10, 10, 8); __PYX_ERR(0, 6084, __pyx_L3_error)
39797  }
39798  CYTHON_FALLTHROUGH;
39799  case 9:
39800  if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_residual)) != 0)) kw_args--;
39801  else {
39802  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundaryDiffusionAdjoint", 1, 10, 10, 9); __PYX_ERR(0, 6084, __pyx_L3_error)
39803  }
39804  }
39805  if (unlikely(kw_args > 0)) {
39806  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateInteriorElementBoundaryDiffusionAdjoint") < 0)) __PYX_ERR(0, 6084, __pyx_L3_error)
39807  }
39808  } else if (PyTuple_GET_SIZE(__pyx_args) != 10) {
39809  goto __pyx_L5_argtuple_error;
39810  } else {
39811  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
39812  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
39813  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
39814  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
39815  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
39816  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
39817  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
39818  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
39819  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
39820  values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
39821  }
39822  __pyx_v_interiorElementBoundaries = ((PyArrayObject *)values[0]);
39823  __pyx_v_elementBoundaryElements = ((PyArrayObject *)values[1]);
39824  __pyx_v_elementBoundaryLocalElementBoundaries = ((PyArrayObject *)values[2]);
39825  __pyx_v_sigma = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_sigma == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 6087, __pyx_L3_error)
39826  __pyx_v_u = ((PyArrayObject *)values[4]);
39827  __pyx_v_n = ((PyArrayObject *)values[5]);
39828  __pyx_v_a = ((PyArrayObject *)values[6]);
39829  __pyx_v_grad_w = ((PyArrayObject *)values[7]);
39830  __pyx_v_dS = ((PyArrayObject *)values[8]);
39831  __pyx_v_residual = ((PyArrayObject *)values[9]);
39832  }
39833  goto __pyx_L4_argument_unpacking_done;
39834  __pyx_L5_argtuple_error:;
39835  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundaryDiffusionAdjoint", 1, 10, 10, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6084, __pyx_L3_error)
39836  __pyx_L3_error:;
39837  __Pyx_AddTraceback("cfemIntegrals.updateInteriorElementBoundaryDiffusionAdjoint", __pyx_clineno, __pyx_lineno, __pyx_filename);
39838  __Pyx_RefNannyFinishContext();
39839  return NULL;
39840  __pyx_L4_argument_unpacking_done:;
39841  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_interiorElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "interiorElementBoundaries", 0))) __PYX_ERR(0, 6084, __pyx_L1_error)
39842  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElements), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElements", 0))) __PYX_ERR(0, 6085, __pyx_L1_error)
39843  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundaries", 0))) __PYX_ERR(0, 6086, __pyx_L1_error)
39844  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u), __pyx_ptype_5numpy_ndarray, 1, "u", 0))) __PYX_ERR(0, 6088, __pyx_L1_error)
39845  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_n), __pyx_ptype_5numpy_ndarray, 1, "n", 0))) __PYX_ERR(0, 6089, __pyx_L1_error)
39846  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1, "a", 0))) __PYX_ERR(0, 6090, __pyx_L1_error)
39847  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_w), __pyx_ptype_5numpy_ndarray, 1, "grad_w", 0))) __PYX_ERR(0, 6091, __pyx_L1_error)
39848  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dS), __pyx_ptype_5numpy_ndarray, 1, "dS", 0))) __PYX_ERR(0, 6092, __pyx_L1_error)
39849  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_residual), __pyx_ptype_5numpy_ndarray, 1, "residual", 0))) __PYX_ERR(0, 6093, __pyx_L1_error)
39850  __pyx_r = __pyx_pf_13cfemIntegrals_348updateInteriorElementBoundaryDiffusionAdjoint(__pyx_self, __pyx_v_interiorElementBoundaries, __pyx_v_elementBoundaryElements, __pyx_v_elementBoundaryLocalElementBoundaries, __pyx_v_sigma, __pyx_v_u, __pyx_v_n, __pyx_v_a, __pyx_v_grad_w, __pyx_v_dS, __pyx_v_residual);
39851 
39852  /* function exit code */
39853  goto __pyx_L0;
39854  __pyx_L1_error:;
39855  __pyx_r = NULL;
39856  __pyx_L0:;
39857  __Pyx_RefNannyFinishContext();
39858  return __pyx_r;
39859 }
39860 
39861 static PyObject *__pyx_pf_13cfemIntegrals_348updateInteriorElementBoundaryDiffusionAdjoint(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_interiorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, double __pyx_v_sigma, PyArrayObject *__pyx_v_u, PyArrayObject *__pyx_v_n, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_grad_w, PyArrayObject *__pyx_v_dS, PyArrayObject *__pyx_v_residual) {
39862  int __pyx_v_nInteriorElementBoundaries_global;
39863  int __pyx_v_nElementBoundaries_element;
39864  int __pyx_v_nQuadraturePoints_elementBoundary;
39865  int __pyx_v_nDOF_test_element;
39866  int __pyx_v_nSpace;
39867  PyObject *__pyx_r = NULL;
39868  __Pyx_RefNannyDeclarations
39869  __Pyx_RefNannySetupContext("updateInteriorElementBoundaryDiffusionAdjoint", 0);
39870 
39871  /* "cfemIntegrals.pyx":6094
39872  * np.ndarray dS,
39873  * np.ndarray residual):
39874  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0] # <<<<<<<<<<<<<<
39875  * cdef int nElementBoundaries_element = grad_w.shape[1]
39876  * cdef int nQuadraturePoints_elementBoundary = grad_w.shape[2]
39877  */
39878  __pyx_v_nInteriorElementBoundaries_global = (__pyx_v_interiorElementBoundaries->dimensions[0]);
39879 
39880  /* "cfemIntegrals.pyx":6095
39881  * np.ndarray residual):
39882  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0]
39883  * cdef int nElementBoundaries_element = grad_w.shape[1] # <<<<<<<<<<<<<<
39884  * cdef int nQuadraturePoints_elementBoundary = grad_w.shape[2]
39885  * cdef int nDOF_test_element = grad_w.shape[3]
39886  */
39887  __pyx_v_nElementBoundaries_element = (__pyx_v_grad_w->dimensions[1]);
39888 
39889  /* "cfemIntegrals.pyx":6096
39890  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0]
39891  * cdef int nElementBoundaries_element = grad_w.shape[1]
39892  * cdef int nQuadraturePoints_elementBoundary = grad_w.shape[2] # <<<<<<<<<<<<<<
39893  * cdef int nDOF_test_element = grad_w.shape[3]
39894  * cdef int nSpace = grad_w.shape[4]
39895  */
39896  __pyx_v_nQuadraturePoints_elementBoundary = (__pyx_v_grad_w->dimensions[2]);
39897 
39898  /* "cfemIntegrals.pyx":6097
39899  * cdef int nElementBoundaries_element = grad_w.shape[1]
39900  * cdef int nQuadraturePoints_elementBoundary = grad_w.shape[2]
39901  * cdef int nDOF_test_element = grad_w.shape[3] # <<<<<<<<<<<<<<
39902  * cdef int nSpace = grad_w.shape[4]
39903  * cupdateInteriorElementBoundaryDiffusionAdjoint(nInteriorElementBoundaries_global,
39904  */
39905  __pyx_v_nDOF_test_element = (__pyx_v_grad_w->dimensions[3]);
39906 
39907  /* "cfemIntegrals.pyx":6098
39908  * cdef int nQuadraturePoints_elementBoundary = grad_w.shape[2]
39909  * cdef int nDOF_test_element = grad_w.shape[3]
39910  * cdef int nSpace = grad_w.shape[4] # <<<<<<<<<<<<<<
39911  * cupdateInteriorElementBoundaryDiffusionAdjoint(nInteriorElementBoundaries_global,
39912  * nElementBoundaries_element,
39913  */
39914  __pyx_v_nSpace = (__pyx_v_grad_w->dimensions[4]);
39915 
39916  /* "cfemIntegrals.pyx":6099
39917  * cdef int nDOF_test_element = grad_w.shape[3]
39918  * cdef int nSpace = grad_w.shape[4]
39919  * cupdateInteriorElementBoundaryDiffusionAdjoint(nInteriorElementBoundaries_global, # <<<<<<<<<<<<<<
39920  * nElementBoundaries_element,
39921  * nQuadraturePoints_elementBoundary,
39922  */
39923  updateInteriorElementBoundaryDiffusionAdjoint(__pyx_v_nInteriorElementBoundaries_global, __pyx_v_nElementBoundaries_element, __pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nDOF_test_element, __pyx_v_nSpace, ((int *)__pyx_v_interiorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), __pyx_v_sigma, ((double *)__pyx_v_u->data), ((double *)__pyx_v_n->data), ((double *)__pyx_v_a->data), ((double *)__pyx_v_grad_w->data), ((double *)__pyx_v_dS->data), ((double *)__pyx_v_residual->data));
39924 
39925  /* "cfemIntegrals.pyx":6084
39926  * else:
39927  * print("error copyFromFreeToGlobal = ", nDOF2set, " not recognized quitting\n")
39928  * def updateInteriorElementBoundaryDiffusionAdjoint(np.ndarray interiorElementBoundaries, # <<<<<<<<<<<<<<
39929  * np.ndarray elementBoundaryElements,
39930  * np.ndarray elementBoundaryLocalElementBoundaries,
39931  */
39932 
39933  /* function exit code */
39934  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
39935  __Pyx_XGIVEREF(__pyx_r);
39936  __Pyx_RefNannyFinishContext();
39937  return __pyx_r;
39938 }
39939 
39940 /* "cfemIntegrals.pyx":6114
39941  * <double*> dS.data,
39942  * <double*> residual.data)
39943  * def updateExteriorElementBoundaryDiffusionAdjoint(np.ndarray isDOFBoundary, # <<<<<<<<<<<<<<
39944  * np.ndarray exteriorElementBoundaries,
39945  * np.ndarray elementBoundaryElements,
39946  */
39947 
39948 /* Python wrapper */
39949 static PyObject *__pyx_pw_13cfemIntegrals_351updateExteriorElementBoundaryDiffusionAdjoint(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
39950 static PyMethodDef __pyx_mdef_13cfemIntegrals_351updateExteriorElementBoundaryDiffusionAdjoint = {"updateExteriorElementBoundaryDiffusionAdjoint", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_351updateExteriorElementBoundaryDiffusionAdjoint, METH_VARARGS|METH_KEYWORDS, 0};
39951 static PyObject *__pyx_pw_13cfemIntegrals_351updateExteriorElementBoundaryDiffusionAdjoint(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
39952  PyArrayObject *__pyx_v_isDOFBoundary = 0;
39953  PyArrayObject *__pyx_v_exteriorElementBoundaries = 0;
39954  PyArrayObject *__pyx_v_elementBoundaryElements = 0;
39955  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries = 0;
39956  double __pyx_v_sigma;
39957  PyArrayObject *__pyx_v_u = 0;
39958  PyArrayObject *__pyx_v_ub = 0;
39959  PyArrayObject *__pyx_v_n = 0;
39960  PyArrayObject *__pyx_v_a = 0;
39961  PyArrayObject *__pyx_v_grad_w = 0;
39962  PyArrayObject *__pyx_v_dS = 0;
39963  PyArrayObject *__pyx_v_residual = 0;
39964  int __pyx_lineno = 0;
39965  const char *__pyx_filename = NULL;
39966  int __pyx_clineno = 0;
39967  PyObject *__pyx_r = 0;
39968  __Pyx_RefNannyDeclarations
39969  __Pyx_RefNannySetupContext("updateExteriorElementBoundaryDiffusionAdjoint (wrapper)", 0);
39970  {
39971  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_isDOFBoundary,&__pyx_n_s_exteriorElementBoundaries,&__pyx_n_s_elementBoundaryElements,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_sigma,&__pyx_n_s_u,&__pyx_n_s_ub,&__pyx_n_s_n,&__pyx_n_s_a,&__pyx_n_s_grad_w,&__pyx_n_s_dS,&__pyx_n_s_residual,0};
39972  PyObject* values[12] = {0,0,0,0,0,0,0,0,0,0,0,0};
39973  if (unlikely(__pyx_kwds)) {
39974  Py_ssize_t kw_args;
39975  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
39976  switch (pos_args) {
39977  case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
39978  CYTHON_FALLTHROUGH;
39979  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
39980  CYTHON_FALLTHROUGH;
39981  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
39982  CYTHON_FALLTHROUGH;
39983  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
39984  CYTHON_FALLTHROUGH;
39985  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
39986  CYTHON_FALLTHROUGH;
39987  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
39988  CYTHON_FALLTHROUGH;
39989  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
39990  CYTHON_FALLTHROUGH;
39991  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
39992  CYTHON_FALLTHROUGH;
39993  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
39994  CYTHON_FALLTHROUGH;
39995  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
39996  CYTHON_FALLTHROUGH;
39997  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
39998  CYTHON_FALLTHROUGH;
39999  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
40000  CYTHON_FALLTHROUGH;
40001  case 0: break;
40002  default: goto __pyx_L5_argtuple_error;
40003  }
40004  kw_args = PyDict_Size(__pyx_kwds);
40005  switch (pos_args) {
40006  case 0:
40007  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_isDOFBoundary)) != 0)) kw_args--;
40008  else goto __pyx_L5_argtuple_error;
40009  CYTHON_FALLTHROUGH;
40010  case 1:
40011  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exteriorElementBoundaries)) != 0)) kw_args--;
40012  else {
40013  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundaryDiffusionAdjoint", 1, 12, 12, 1); __PYX_ERR(0, 6114, __pyx_L3_error)
40014  }
40015  CYTHON_FALLTHROUGH;
40016  case 2:
40017  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElements)) != 0)) kw_args--;
40018  else {
40019  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundaryDiffusionAdjoint", 1, 12, 12, 2); __PYX_ERR(0, 6114, __pyx_L3_error)
40020  }
40021  CYTHON_FALLTHROUGH;
40022  case 3:
40023  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
40024  else {
40025  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundaryDiffusionAdjoint", 1, 12, 12, 3); __PYX_ERR(0, 6114, __pyx_L3_error)
40026  }
40027  CYTHON_FALLTHROUGH;
40028  case 4:
40029  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sigma)) != 0)) kw_args--;
40030  else {
40031  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundaryDiffusionAdjoint", 1, 12, 12, 4); __PYX_ERR(0, 6114, __pyx_L3_error)
40032  }
40033  CYTHON_FALLTHROUGH;
40034  case 5:
40035  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u)) != 0)) kw_args--;
40036  else {
40037  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundaryDiffusionAdjoint", 1, 12, 12, 5); __PYX_ERR(0, 6114, __pyx_L3_error)
40038  }
40039  CYTHON_FALLTHROUGH;
40040  case 6:
40041  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ub)) != 0)) kw_args--;
40042  else {
40043  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundaryDiffusionAdjoint", 1, 12, 12, 6); __PYX_ERR(0, 6114, __pyx_L3_error)
40044  }
40045  CYTHON_FALLTHROUGH;
40046  case 7:
40047  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n)) != 0)) kw_args--;
40048  else {
40049  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundaryDiffusionAdjoint", 1, 12, 12, 7); __PYX_ERR(0, 6114, __pyx_L3_error)
40050  }
40051  CYTHON_FALLTHROUGH;
40052  case 8:
40053  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
40054  else {
40055  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundaryDiffusionAdjoint", 1, 12, 12, 8); __PYX_ERR(0, 6114, __pyx_L3_error)
40056  }
40057  CYTHON_FALLTHROUGH;
40058  case 9:
40059  if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_w)) != 0)) kw_args--;
40060  else {
40061  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundaryDiffusionAdjoint", 1, 12, 12, 9); __PYX_ERR(0, 6114, __pyx_L3_error)
40062  }
40063  CYTHON_FALLTHROUGH;
40064  case 10:
40065  if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dS)) != 0)) kw_args--;
40066  else {
40067  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundaryDiffusionAdjoint", 1, 12, 12, 10); __PYX_ERR(0, 6114, __pyx_L3_error)
40068  }
40069  CYTHON_FALLTHROUGH;
40070  case 11:
40071  if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_residual)) != 0)) kw_args--;
40072  else {
40073  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundaryDiffusionAdjoint", 1, 12, 12, 11); __PYX_ERR(0, 6114, __pyx_L3_error)
40074  }
40075  }
40076  if (unlikely(kw_args > 0)) {
40077  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateExteriorElementBoundaryDiffusionAdjoint") < 0)) __PYX_ERR(0, 6114, __pyx_L3_error)
40078  }
40079  } else if (PyTuple_GET_SIZE(__pyx_args) != 12) {
40080  goto __pyx_L5_argtuple_error;
40081  } else {
40082  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
40083  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
40084  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
40085  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
40086  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
40087  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
40088  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
40089  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
40090  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
40091  values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
40092  values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
40093  values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
40094  }
40095  __pyx_v_isDOFBoundary = ((PyArrayObject *)values[0]);
40096  __pyx_v_exteriorElementBoundaries = ((PyArrayObject *)values[1]);
40097  __pyx_v_elementBoundaryElements = ((PyArrayObject *)values[2]);
40098  __pyx_v_elementBoundaryLocalElementBoundaries = ((PyArrayObject *)values[3]);
40099  __pyx_v_sigma = __pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_sigma == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 6118, __pyx_L3_error)
40100  __pyx_v_u = ((PyArrayObject *)values[5]);
40101  __pyx_v_ub = ((PyArrayObject *)values[6]);
40102  __pyx_v_n = ((PyArrayObject *)values[7]);
40103  __pyx_v_a = ((PyArrayObject *)values[8]);
40104  __pyx_v_grad_w = ((PyArrayObject *)values[9]);
40105  __pyx_v_dS = ((PyArrayObject *)values[10]);
40106  __pyx_v_residual = ((PyArrayObject *)values[11]);
40107  }
40108  goto __pyx_L4_argument_unpacking_done;
40109  __pyx_L5_argtuple_error:;
40110  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundaryDiffusionAdjoint", 1, 12, 12, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6114, __pyx_L3_error)
40111  __pyx_L3_error:;
40112  __Pyx_AddTraceback("cfemIntegrals.updateExteriorElementBoundaryDiffusionAdjoint", __pyx_clineno, __pyx_lineno, __pyx_filename);
40113  __Pyx_RefNannyFinishContext();
40114  return NULL;
40115  __pyx_L4_argument_unpacking_done:;
40116  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_isDOFBoundary), __pyx_ptype_5numpy_ndarray, 1, "isDOFBoundary", 0))) __PYX_ERR(0, 6114, __pyx_L1_error)
40117  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exteriorElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "exteriorElementBoundaries", 0))) __PYX_ERR(0, 6115, __pyx_L1_error)
40118  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElements), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElements", 0))) __PYX_ERR(0, 6116, __pyx_L1_error)
40119  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundaries", 0))) __PYX_ERR(0, 6117, __pyx_L1_error)
40120  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u), __pyx_ptype_5numpy_ndarray, 1, "u", 0))) __PYX_ERR(0, 6119, __pyx_L1_error)
40121  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ub), __pyx_ptype_5numpy_ndarray, 1, "ub", 0))) __PYX_ERR(0, 6120, __pyx_L1_error)
40122  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_n), __pyx_ptype_5numpy_ndarray, 1, "n", 0))) __PYX_ERR(0, 6121, __pyx_L1_error)
40123  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1, "a", 0))) __PYX_ERR(0, 6122, __pyx_L1_error)
40124  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_w), __pyx_ptype_5numpy_ndarray, 1, "grad_w", 0))) __PYX_ERR(0, 6123, __pyx_L1_error)
40125  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dS), __pyx_ptype_5numpy_ndarray, 1, "dS", 0))) __PYX_ERR(0, 6124, __pyx_L1_error)
40126  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_residual), __pyx_ptype_5numpy_ndarray, 1, "residual", 0))) __PYX_ERR(0, 6125, __pyx_L1_error)
40127  __pyx_r = __pyx_pf_13cfemIntegrals_350updateExteriorElementBoundaryDiffusionAdjoint(__pyx_self, __pyx_v_isDOFBoundary, __pyx_v_exteriorElementBoundaries, __pyx_v_elementBoundaryElements, __pyx_v_elementBoundaryLocalElementBoundaries, __pyx_v_sigma, __pyx_v_u, __pyx_v_ub, __pyx_v_n, __pyx_v_a, __pyx_v_grad_w, __pyx_v_dS, __pyx_v_residual);
40128 
40129  /* function exit code */
40130  goto __pyx_L0;
40131  __pyx_L1_error:;
40132  __pyx_r = NULL;
40133  __pyx_L0:;
40134  __Pyx_RefNannyFinishContext();
40135  return __pyx_r;
40136 }
40137 
40138 static PyObject *__pyx_pf_13cfemIntegrals_350updateExteriorElementBoundaryDiffusionAdjoint(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_isDOFBoundary, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, double __pyx_v_sigma, PyArrayObject *__pyx_v_u, PyArrayObject *__pyx_v_ub, PyArrayObject *__pyx_v_n, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_grad_w, PyArrayObject *__pyx_v_dS, PyArrayObject *__pyx_v_residual) {
40139  int __pyx_v_nExteriorElementBoundaries_global;
40140  int __pyx_v_nQuadraturePoints_elementBoundary;
40141  int __pyx_v_nDOF_test_element;
40142  int __pyx_v_nSpace;
40143  PyObject *__pyx_r = NULL;
40144  __Pyx_RefNannyDeclarations
40145  __Pyx_RefNannySetupContext("updateExteriorElementBoundaryDiffusionAdjoint", 0);
40146 
40147  /* "cfemIntegrals.pyx":6126
40148  * np.ndarray dS,
40149  * np.ndarray residual):
40150  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundaries.shape[0] # <<<<<<<<<<<<<<
40151  * cdef int nQuadraturePoints_elementBoundary = grad_w.shape[1]
40152  * cdef int nDOF_test_element = grad_w.shape[2]
40153  */
40154  __pyx_v_nExteriorElementBoundaries_global = (__pyx_v_exteriorElementBoundaries->dimensions[0]);
40155 
40156  /* "cfemIntegrals.pyx":6127
40157  * np.ndarray residual):
40158  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundaries.shape[0]
40159  * cdef int nQuadraturePoints_elementBoundary = grad_w.shape[1] # <<<<<<<<<<<<<<
40160  * cdef int nDOF_test_element = grad_w.shape[2]
40161  * cdef int nSpace = grad_w.shape[3]
40162  */
40163  __pyx_v_nQuadraturePoints_elementBoundary = (__pyx_v_grad_w->dimensions[1]);
40164 
40165  /* "cfemIntegrals.pyx":6128
40166  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundaries.shape[0]
40167  * cdef int nQuadraturePoints_elementBoundary = grad_w.shape[1]
40168  * cdef int nDOF_test_element = grad_w.shape[2] # <<<<<<<<<<<<<<
40169  * cdef int nSpace = grad_w.shape[3]
40170  * cupdateExteriorElementBoundaryDiffusionAdjoint(nExteriorElementBoundaries_global,
40171  */
40172  __pyx_v_nDOF_test_element = (__pyx_v_grad_w->dimensions[2]);
40173 
40174  /* "cfemIntegrals.pyx":6129
40175  * cdef int nQuadraturePoints_elementBoundary = grad_w.shape[1]
40176  * cdef int nDOF_test_element = grad_w.shape[2]
40177  * cdef int nSpace = grad_w.shape[3] # <<<<<<<<<<<<<<
40178  * cupdateExteriorElementBoundaryDiffusionAdjoint(nExteriorElementBoundaries_global,
40179  * nQuadraturePoints_elementBoundary,
40180  */
40181  __pyx_v_nSpace = (__pyx_v_grad_w->dimensions[3]);
40182 
40183  /* "cfemIntegrals.pyx":6130
40184  * cdef int nDOF_test_element = grad_w.shape[2]
40185  * cdef int nSpace = grad_w.shape[3]
40186  * cupdateExteriorElementBoundaryDiffusionAdjoint(nExteriorElementBoundaries_global, # <<<<<<<<<<<<<<
40187  * nQuadraturePoints_elementBoundary,
40188  * nDOF_test_element,
40189  */
40190  updateExteriorElementBoundaryDiffusionAdjoint(__pyx_v_nExteriorElementBoundaries_global, __pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nDOF_test_element, __pyx_v_nSpace, ((int *)__pyx_v_isDOFBoundary->data), ((int *)__pyx_v_exteriorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), __pyx_v_sigma, ((double *)__pyx_v_u->data), ((double *)__pyx_v_ub->data), ((double *)__pyx_v_n->data), ((double *)__pyx_v_a->data), ((double *)__pyx_v_grad_w->data), ((double *)__pyx_v_dS->data), ((double *)__pyx_v_residual->data));
40191 
40192  /* "cfemIntegrals.pyx":6114
40193  * <double*> dS.data,
40194  * <double*> residual.data)
40195  * def updateExteriorElementBoundaryDiffusionAdjoint(np.ndarray isDOFBoundary, # <<<<<<<<<<<<<<
40196  * np.ndarray exteriorElementBoundaries,
40197  * np.ndarray elementBoundaryElements,
40198  */
40199 
40200  /* function exit code */
40201  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
40202  __Pyx_XGIVEREF(__pyx_r);
40203  __Pyx_RefNannyFinishContext();
40204  return __pyx_r;
40205 }
40206 
40207 /* "cfemIntegrals.pyx":6146
40208  * <double*> dS.data,
40209  * <double*> residual.data)
40210  * def updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense(int offset_r, # <<<<<<<<<<<<<<
40211  * int stride_r,
40212  * int offset_u,
40213  */
40214 
40215 /* Python wrapper */
40216 static PyObject *__pyx_pw_13cfemIntegrals_353updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
40217 static PyMethodDef __pyx_mdef_13cfemIntegrals_353updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense = {"updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_353updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense, METH_VARARGS|METH_KEYWORDS, 0};
40218 static PyObject *__pyx_pw_13cfemIntegrals_353updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
40219  int __pyx_v_offset_r;
40220  int __pyx_v_stride_r;
40221  int __pyx_v_offset_u;
40222  int __pyx_v_stride_u;
40223  int __pyx_v_nFreeVDOF_global;
40224  PyArrayObject *__pyx_v_interiorElementBoundaries = 0;
40225  PyArrayObject *__pyx_v_elementBoundaryElements = 0;
40226  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries = 0;
40227  PyArrayObject *__pyx_v_nFreeDOF_element_r = 0;
40228  PyArrayObject *__pyx_v_freeLocal_r = 0;
40229  PyArrayObject *__pyx_v_freeGlobal_r = 0;
40230  PyArrayObject *__pyx_v_nFreeDOF_element_u = 0;
40231  PyArrayObject *__pyx_v_freeLocal_u = 0;
40232  PyArrayObject *__pyx_v_freeGlobal_u = 0;
40233  double __pyx_v_sigma;
40234  PyArrayObject *__pyx_v_v = 0;
40235  PyArrayObject *__pyx_v_n = 0;
40236  PyArrayObject *__pyx_v_a = 0;
40237  PyArrayObject *__pyx_v_grad_w = 0;
40238  PyArrayObject *__pyx_v_dS = 0;
40239  PyArrayObject *__pyx_v_jac = 0;
40240  int __pyx_lineno = 0;
40241  const char *__pyx_filename = NULL;
40242  int __pyx_clineno = 0;
40243  PyObject *__pyx_r = 0;
40244  __Pyx_RefNannyDeclarations
40245  __Pyx_RefNannySetupContext("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense (wrapper)", 0);
40246  {
40247  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_offset_r,&__pyx_n_s_stride_r,&__pyx_n_s_offset_u,&__pyx_n_s_stride_u,&__pyx_n_s_nFreeVDOF_global,&__pyx_n_s_interiorElementBoundaries,&__pyx_n_s_elementBoundaryElements,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_nFreeDOF_element_r,&__pyx_n_s_freeLocal_r,&__pyx_n_s_freeGlobal_r,&__pyx_n_s_nFreeDOF_element_u,&__pyx_n_s_freeLocal_u,&__pyx_n_s_freeGlobal_u,&__pyx_n_s_sigma,&__pyx_n_s_v,&__pyx_n_s_n,&__pyx_n_s_a,&__pyx_n_s_grad_w,&__pyx_n_s_dS,&__pyx_n_s_jac,0};
40248  PyObject* values[21] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
40249  if (unlikely(__pyx_kwds)) {
40250  Py_ssize_t kw_args;
40251  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
40252  switch (pos_args) {
40253  case 21: values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
40254  CYTHON_FALLTHROUGH;
40255  case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
40256  CYTHON_FALLTHROUGH;
40257  case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
40258  CYTHON_FALLTHROUGH;
40259  case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
40260  CYTHON_FALLTHROUGH;
40261  case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
40262  CYTHON_FALLTHROUGH;
40263  case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
40264  CYTHON_FALLTHROUGH;
40265  case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
40266  CYTHON_FALLTHROUGH;
40267  case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
40268  CYTHON_FALLTHROUGH;
40269  case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
40270  CYTHON_FALLTHROUGH;
40271  case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
40272  CYTHON_FALLTHROUGH;
40273  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
40274  CYTHON_FALLTHROUGH;
40275  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
40276  CYTHON_FALLTHROUGH;
40277  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
40278  CYTHON_FALLTHROUGH;
40279  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
40280  CYTHON_FALLTHROUGH;
40281  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
40282  CYTHON_FALLTHROUGH;
40283  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
40284  CYTHON_FALLTHROUGH;
40285  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
40286  CYTHON_FALLTHROUGH;
40287  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
40288  CYTHON_FALLTHROUGH;
40289  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
40290  CYTHON_FALLTHROUGH;
40291  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
40292  CYTHON_FALLTHROUGH;
40293  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
40294  CYTHON_FALLTHROUGH;
40295  case 0: break;
40296  default: goto __pyx_L5_argtuple_error;
40297  }
40298  kw_args = PyDict_Size(__pyx_kwds);
40299  switch (pos_args) {
40300  case 0:
40301  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset_r)) != 0)) kw_args--;
40302  else goto __pyx_L5_argtuple_error;
40303  CYTHON_FALLTHROUGH;
40304  case 1:
40305  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stride_r)) != 0)) kw_args--;
40306  else {
40307  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense", 1, 21, 21, 1); __PYX_ERR(0, 6146, __pyx_L3_error)
40308  }
40309  CYTHON_FALLTHROUGH;
40310  case 2:
40311  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset_u)) != 0)) kw_args--;
40312  else {
40313  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense", 1, 21, 21, 2); __PYX_ERR(0, 6146, __pyx_L3_error)
40314  }
40315  CYTHON_FALLTHROUGH;
40316  case 3:
40317  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stride_u)) != 0)) kw_args--;
40318  else {
40319  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense", 1, 21, 21, 3); __PYX_ERR(0, 6146, __pyx_L3_error)
40320  }
40321  CYTHON_FALLTHROUGH;
40322  case 4:
40323  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeVDOF_global)) != 0)) kw_args--;
40324  else {
40325  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense", 1, 21, 21, 4); __PYX_ERR(0, 6146, __pyx_L3_error)
40326  }
40327  CYTHON_FALLTHROUGH;
40328  case 5:
40329  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_interiorElementBoundaries)) != 0)) kw_args--;
40330  else {
40331  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense", 1, 21, 21, 5); __PYX_ERR(0, 6146, __pyx_L3_error)
40332  }
40333  CYTHON_FALLTHROUGH;
40334  case 6:
40335  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElements)) != 0)) kw_args--;
40336  else {
40337  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense", 1, 21, 21, 6); __PYX_ERR(0, 6146, __pyx_L3_error)
40338  }
40339  CYTHON_FALLTHROUGH;
40340  case 7:
40341  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
40342  else {
40343  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense", 1, 21, 21, 7); __PYX_ERR(0, 6146, __pyx_L3_error)
40344  }
40345  CYTHON_FALLTHROUGH;
40346  case 8:
40347  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeDOF_element_r)) != 0)) kw_args--;
40348  else {
40349  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense", 1, 21, 21, 8); __PYX_ERR(0, 6146, __pyx_L3_error)
40350  }
40351  CYTHON_FALLTHROUGH;
40352  case 9:
40353  if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeLocal_r)) != 0)) kw_args--;
40354  else {
40355  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense", 1, 21, 21, 9); __PYX_ERR(0, 6146, __pyx_L3_error)
40356  }
40357  CYTHON_FALLTHROUGH;
40358  case 10:
40359  if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeGlobal_r)) != 0)) kw_args--;
40360  else {
40361  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense", 1, 21, 21, 10); __PYX_ERR(0, 6146, __pyx_L3_error)
40362  }
40363  CYTHON_FALLTHROUGH;
40364  case 11:
40365  if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeDOF_element_u)) != 0)) kw_args--;
40366  else {
40367  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense", 1, 21, 21, 11); __PYX_ERR(0, 6146, __pyx_L3_error)
40368  }
40369  CYTHON_FALLTHROUGH;
40370  case 12:
40371  if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeLocal_u)) != 0)) kw_args--;
40372  else {
40373  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense", 1, 21, 21, 12); __PYX_ERR(0, 6146, __pyx_L3_error)
40374  }
40375  CYTHON_FALLTHROUGH;
40376  case 13:
40377  if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeGlobal_u)) != 0)) kw_args--;
40378  else {
40379  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense", 1, 21, 21, 13); __PYX_ERR(0, 6146, __pyx_L3_error)
40380  }
40381  CYTHON_FALLTHROUGH;
40382  case 14:
40383  if (likely((values[14] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sigma)) != 0)) kw_args--;
40384  else {
40385  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense", 1, 21, 21, 14); __PYX_ERR(0, 6146, __pyx_L3_error)
40386  }
40387  CYTHON_FALLTHROUGH;
40388  case 15:
40389  if (likely((values[15] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
40390  else {
40391  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense", 1, 21, 21, 15); __PYX_ERR(0, 6146, __pyx_L3_error)
40392  }
40393  CYTHON_FALLTHROUGH;
40394  case 16:
40395  if (likely((values[16] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n)) != 0)) kw_args--;
40396  else {
40397  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense", 1, 21, 21, 16); __PYX_ERR(0, 6146, __pyx_L3_error)
40398  }
40399  CYTHON_FALLTHROUGH;
40400  case 17:
40401  if (likely((values[17] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
40402  else {
40403  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense", 1, 21, 21, 17); __PYX_ERR(0, 6146, __pyx_L3_error)
40404  }
40405  CYTHON_FALLTHROUGH;
40406  case 18:
40407  if (likely((values[18] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_w)) != 0)) kw_args--;
40408  else {
40409  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense", 1, 21, 21, 18); __PYX_ERR(0, 6146, __pyx_L3_error)
40410  }
40411  CYTHON_FALLTHROUGH;
40412  case 19:
40413  if (likely((values[19] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dS)) != 0)) kw_args--;
40414  else {
40415  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense", 1, 21, 21, 19); __PYX_ERR(0, 6146, __pyx_L3_error)
40416  }
40417  CYTHON_FALLTHROUGH;
40418  case 20:
40419  if (likely((values[20] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jac)) != 0)) kw_args--;
40420  else {
40421  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense", 1, 21, 21, 20); __PYX_ERR(0, 6146, __pyx_L3_error)
40422  }
40423  }
40424  if (unlikely(kw_args > 0)) {
40425  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense") < 0)) __PYX_ERR(0, 6146, __pyx_L3_error)
40426  }
40427  } else if (PyTuple_GET_SIZE(__pyx_args) != 21) {
40428  goto __pyx_L5_argtuple_error;
40429  } else {
40430  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
40431  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
40432  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
40433  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
40434  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
40435  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
40436  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
40437  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
40438  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
40439  values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
40440  values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
40441  values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
40442  values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
40443  values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
40444  values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
40445  values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
40446  values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
40447  values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
40448  values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
40449  values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
40450  values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
40451  }
40452  __pyx_v_offset_r = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_offset_r == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6146, __pyx_L3_error)
40453  __pyx_v_stride_r = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_stride_r == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6147, __pyx_L3_error)
40454  __pyx_v_offset_u = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_offset_u == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6148, __pyx_L3_error)
40455  __pyx_v_stride_u = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_stride_u == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6149, __pyx_L3_error)
40456  __pyx_v_nFreeVDOF_global = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_nFreeVDOF_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6150, __pyx_L3_error)
40457  __pyx_v_interiorElementBoundaries = ((PyArrayObject *)values[5]);
40458  __pyx_v_elementBoundaryElements = ((PyArrayObject *)values[6]);
40459  __pyx_v_elementBoundaryLocalElementBoundaries = ((PyArrayObject *)values[7]);
40460  __pyx_v_nFreeDOF_element_r = ((PyArrayObject *)values[8]);
40461  __pyx_v_freeLocal_r = ((PyArrayObject *)values[9]);
40462  __pyx_v_freeGlobal_r = ((PyArrayObject *)values[10]);
40463  __pyx_v_nFreeDOF_element_u = ((PyArrayObject *)values[11]);
40464  __pyx_v_freeLocal_u = ((PyArrayObject *)values[12]);
40465  __pyx_v_freeGlobal_u = ((PyArrayObject *)values[13]);
40466  __pyx_v_sigma = __pyx_PyFloat_AsDouble(values[14]); if (unlikely((__pyx_v_sigma == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 6160, __pyx_L3_error)
40467  __pyx_v_v = ((PyArrayObject *)values[15]);
40468  __pyx_v_n = ((PyArrayObject *)values[16]);
40469  __pyx_v_a = ((PyArrayObject *)values[17]);
40470  __pyx_v_grad_w = ((PyArrayObject *)values[18]);
40471  __pyx_v_dS = ((PyArrayObject *)values[19]);
40472  __pyx_v_jac = ((PyArrayObject *)values[20]);
40473  }
40474  goto __pyx_L4_argument_unpacking_done;
40475  __pyx_L5_argtuple_error:;
40476  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense", 1, 21, 21, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6146, __pyx_L3_error)
40477  __pyx_L3_error:;
40478  __Pyx_AddTraceback("cfemIntegrals.updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense", __pyx_clineno, __pyx_lineno, __pyx_filename);
40479  __Pyx_RefNannyFinishContext();
40480  return NULL;
40481  __pyx_L4_argument_unpacking_done:;
40482  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_interiorElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "interiorElementBoundaries", 0))) __PYX_ERR(0, 6151, __pyx_L1_error)
40483  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElements), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElements", 0))) __PYX_ERR(0, 6152, __pyx_L1_error)
40484  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundaries", 0))) __PYX_ERR(0, 6153, __pyx_L1_error)
40485  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nFreeDOF_element_r), __pyx_ptype_5numpy_ndarray, 1, "nFreeDOF_element_r", 0))) __PYX_ERR(0, 6154, __pyx_L1_error)
40486  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeLocal_r), __pyx_ptype_5numpy_ndarray, 1, "freeLocal_r", 0))) __PYX_ERR(0, 6155, __pyx_L1_error)
40487  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeGlobal_r), __pyx_ptype_5numpy_ndarray, 1, "freeGlobal_r", 0))) __PYX_ERR(0, 6156, __pyx_L1_error)
40488  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nFreeDOF_element_u), __pyx_ptype_5numpy_ndarray, 1, "nFreeDOF_element_u", 0))) __PYX_ERR(0, 6157, __pyx_L1_error)
40489  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeLocal_u), __pyx_ptype_5numpy_ndarray, 1, "freeLocal_u", 0))) __PYX_ERR(0, 6158, __pyx_L1_error)
40490  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeGlobal_u), __pyx_ptype_5numpy_ndarray, 1, "freeGlobal_u", 0))) __PYX_ERR(0, 6159, __pyx_L1_error)
40491  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), __pyx_ptype_5numpy_ndarray, 1, "v", 0))) __PYX_ERR(0, 6161, __pyx_L1_error)
40492  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_n), __pyx_ptype_5numpy_ndarray, 1, "n", 0))) __PYX_ERR(0, 6162, __pyx_L1_error)
40493  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1, "a", 0))) __PYX_ERR(0, 6163, __pyx_L1_error)
40494  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_w), __pyx_ptype_5numpy_ndarray, 1, "grad_w", 0))) __PYX_ERR(0, 6164, __pyx_L1_error)
40495  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dS), __pyx_ptype_5numpy_ndarray, 1, "dS", 0))) __PYX_ERR(0, 6165, __pyx_L1_error)
40496  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_jac), __pyx_ptype_5numpy_ndarray, 1, "jac", 0))) __PYX_ERR(0, 6166, __pyx_L1_error)
40497  __pyx_r = __pyx_pf_13cfemIntegrals_352updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense(__pyx_self, __pyx_v_offset_r, __pyx_v_stride_r, __pyx_v_offset_u, __pyx_v_stride_u, __pyx_v_nFreeVDOF_global, __pyx_v_interiorElementBoundaries, __pyx_v_elementBoundaryElements, __pyx_v_elementBoundaryLocalElementBoundaries, __pyx_v_nFreeDOF_element_r, __pyx_v_freeLocal_r, __pyx_v_freeGlobal_r, __pyx_v_nFreeDOF_element_u, __pyx_v_freeLocal_u, __pyx_v_freeGlobal_u, __pyx_v_sigma, __pyx_v_v, __pyx_v_n, __pyx_v_a, __pyx_v_grad_w, __pyx_v_dS, __pyx_v_jac);
40498 
40499  /* function exit code */
40500  goto __pyx_L0;
40501  __pyx_L1_error:;
40502  __pyx_r = NULL;
40503  __pyx_L0:;
40504  __Pyx_RefNannyFinishContext();
40505  return __pyx_r;
40506 }
40507 
40508 static PyObject *__pyx_pf_13cfemIntegrals_352updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_offset_r, int __pyx_v_stride_r, int __pyx_v_offset_u, int __pyx_v_stride_u, int __pyx_v_nFreeVDOF_global, PyArrayObject *__pyx_v_interiorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_nFreeDOF_element_r, PyArrayObject *__pyx_v_freeLocal_r, PyArrayObject *__pyx_v_freeGlobal_r, PyArrayObject *__pyx_v_nFreeDOF_element_u, PyArrayObject *__pyx_v_freeLocal_u, PyArrayObject *__pyx_v_freeGlobal_u, double __pyx_v_sigma, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_n, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_grad_w, PyArrayObject *__pyx_v_dS, PyArrayObject *__pyx_v_jac) {
40509  int __pyx_v_nInteriorElementBoundaries_global;
40510  int __pyx_v_nElementBoundaries_element;
40511  int __pyx_v_nQuadraturePoints_elementBoundary;
40512  int __pyx_v_nDOF_test_element;
40513  int __pyx_v_nDOF_trial_element;
40514  int __pyx_v_nSpace;
40515  PyObject *__pyx_r = NULL;
40516  __Pyx_RefNannyDeclarations
40517  __Pyx_RefNannySetupContext("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense", 0);
40518 
40519  /* "cfemIntegrals.pyx":6167
40520  * np.ndarray dS,
40521  * np.ndarray jac):
40522  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0] # <<<<<<<<<<<<<<
40523  * cdef int nElementBoundaries_element = grad_w.shape[1]
40524  * cdef int nQuadraturePoints_elementBoundary = grad_w.shape[2]
40525  */
40526  __pyx_v_nInteriorElementBoundaries_global = (__pyx_v_interiorElementBoundaries->dimensions[0]);
40527 
40528  /* "cfemIntegrals.pyx":6168
40529  * np.ndarray jac):
40530  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0]
40531  * cdef int nElementBoundaries_element = grad_w.shape[1] # <<<<<<<<<<<<<<
40532  * cdef int nQuadraturePoints_elementBoundary = grad_w.shape[2]
40533  * cdef int nDOF_test_element = grad_w.shape[3]
40534  */
40535  __pyx_v_nElementBoundaries_element = (__pyx_v_grad_w->dimensions[1]);
40536 
40537  /* "cfemIntegrals.pyx":6169
40538  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0]
40539  * cdef int nElementBoundaries_element = grad_w.shape[1]
40540  * cdef int nQuadraturePoints_elementBoundary = grad_w.shape[2] # <<<<<<<<<<<<<<
40541  * cdef int nDOF_test_element = grad_w.shape[3]
40542  * cdef int nDOF_trial_element = v.shape[3]
40543  */
40544  __pyx_v_nQuadraturePoints_elementBoundary = (__pyx_v_grad_w->dimensions[2]);
40545 
40546  /* "cfemIntegrals.pyx":6170
40547  * cdef int nElementBoundaries_element = grad_w.shape[1]
40548  * cdef int nQuadraturePoints_elementBoundary = grad_w.shape[2]
40549  * cdef int nDOF_test_element = grad_w.shape[3] # <<<<<<<<<<<<<<
40550  * cdef int nDOF_trial_element = v.shape[3]
40551  * cdef int nSpace = n.shape[3]
40552  */
40553  __pyx_v_nDOF_test_element = (__pyx_v_grad_w->dimensions[3]);
40554 
40555  /* "cfemIntegrals.pyx":6171
40556  * cdef int nQuadraturePoints_elementBoundary = grad_w.shape[2]
40557  * cdef int nDOF_test_element = grad_w.shape[3]
40558  * cdef int nDOF_trial_element = v.shape[3] # <<<<<<<<<<<<<<
40559  * cdef int nSpace = n.shape[3]
40560  * cupdateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense(nInteriorElementBoundaries_global,
40561  */
40562  __pyx_v_nDOF_trial_element = (__pyx_v_v->dimensions[3]);
40563 
40564  /* "cfemIntegrals.pyx":6172
40565  * cdef int nDOF_test_element = grad_w.shape[3]
40566  * cdef int nDOF_trial_element = v.shape[3]
40567  * cdef int nSpace = n.shape[3] # <<<<<<<<<<<<<<
40568  * cupdateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense(nInteriorElementBoundaries_global,
40569  * nElementBoundaries_element,
40570  */
40571  __pyx_v_nSpace = (__pyx_v_n->dimensions[3]);
40572 
40573  /* "cfemIntegrals.pyx":6173
40574  * cdef int nDOF_trial_element = v.shape[3]
40575  * cdef int nSpace = n.shape[3]
40576  * cupdateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense(nInteriorElementBoundaries_global, # <<<<<<<<<<<<<<
40577  * nElementBoundaries_element,
40578  * nQuadraturePoints_elementBoundary,
40579  */
40580  updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense(__pyx_v_nInteriorElementBoundaries_global, __pyx_v_nElementBoundaries_element, __pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nDOF_test_element, __pyx_v_nDOF_trial_element, __pyx_v_nSpace, __pyx_v_offset_r, __pyx_v_stride_r, __pyx_v_offset_u, __pyx_v_stride_u, __pyx_v_nFreeVDOF_global, ((int *)__pyx_v_interiorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), ((int *)__pyx_v_nFreeDOF_element_r->data), ((int *)__pyx_v_freeLocal_r->data), ((int *)__pyx_v_freeGlobal_r->data), ((int *)__pyx_v_nFreeDOF_element_u->data), ((int *)__pyx_v_freeLocal_u->data), ((int *)__pyx_v_freeGlobal_u->data), __pyx_v_sigma, ((double *)__pyx_v_v->data), ((double *)__pyx_v_n->data), ((double *)__pyx_v_a->data), ((double *)__pyx_v_grad_w->data), ((double *)__pyx_v_dS->data), ((double *)__pyx_v_jac->data));
40581 
40582  /* "cfemIntegrals.pyx":6146
40583  * <double*> dS.data,
40584  * <double*> residual.data)
40585  * def updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense(int offset_r, # <<<<<<<<<<<<<<
40586  * int stride_r,
40587  * int offset_u,
40588  */
40589 
40590  /* function exit code */
40591  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
40592  __Pyx_XGIVEREF(__pyx_r);
40593  __Pyx_RefNannyFinishContext();
40594  return __pyx_r;
40595 }
40596 
40597 /* "cfemIntegrals.pyx":6200
40598  * <double*> dS.data,
40599  * <double*> jac.data)
40600  * def updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense(int offset_r, # <<<<<<<<<<<<<<
40601  * int stride_r,
40602  * int offset_u,
40603  */
40604 
40605 /* Python wrapper */
40606 static PyObject *__pyx_pw_13cfemIntegrals_355updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
40607 static PyMethodDef __pyx_mdef_13cfemIntegrals_355updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense = {"updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_355updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense, METH_VARARGS|METH_KEYWORDS, 0};
40608 static PyObject *__pyx_pw_13cfemIntegrals_355updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
40609  int __pyx_v_offset_r;
40610  int __pyx_v_stride_r;
40611  int __pyx_v_offset_u;
40612  int __pyx_v_stride_u;
40613  int __pyx_v_nFreeVDOF_global;
40614  PyArrayObject *__pyx_v_exteriorElementBoundaries = 0;
40615  PyArrayObject *__pyx_v_elementBoundaryElements = 0;
40616  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries = 0;
40617  PyArrayObject *__pyx_v_nFreeDOF_element_r = 0;
40618  PyArrayObject *__pyx_v_freeLocal_r = 0;
40619  PyArrayObject *__pyx_v_freeGlobal_r = 0;
40620  PyArrayObject *__pyx_v_nFreeDOF_element_u = 0;
40621  PyArrayObject *__pyx_v_freeLocal_u = 0;
40622  PyArrayObject *__pyx_v_freeGlobal_u = 0;
40623  PyArrayObject *__pyx_v_isDOFBoundary = 0;
40624  double __pyx_v_sigma;
40625  PyArrayObject *__pyx_v_v = 0;
40626  PyArrayObject *__pyx_v_n = 0;
40627  PyArrayObject *__pyx_v_a = 0;
40628  PyArrayObject *__pyx_v_grad_w = 0;
40629  PyArrayObject *__pyx_v_dS = 0;
40630  PyArrayObject *__pyx_v_jac = 0;
40631  int __pyx_lineno = 0;
40632  const char *__pyx_filename = NULL;
40633  int __pyx_clineno = 0;
40634  PyObject *__pyx_r = 0;
40635  __Pyx_RefNannyDeclarations
40636  __Pyx_RefNannySetupContext("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense (wrapper)", 0);
40637  {
40638  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_offset_r,&__pyx_n_s_stride_r,&__pyx_n_s_offset_u,&__pyx_n_s_stride_u,&__pyx_n_s_nFreeVDOF_global,&__pyx_n_s_exteriorElementBoundaries,&__pyx_n_s_elementBoundaryElements,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_nFreeDOF_element_r,&__pyx_n_s_freeLocal_r,&__pyx_n_s_freeGlobal_r,&__pyx_n_s_nFreeDOF_element_u,&__pyx_n_s_freeLocal_u,&__pyx_n_s_freeGlobal_u,&__pyx_n_s_isDOFBoundary,&__pyx_n_s_sigma,&__pyx_n_s_v,&__pyx_n_s_n,&__pyx_n_s_a,&__pyx_n_s_grad_w,&__pyx_n_s_dS,&__pyx_n_s_jac,0};
40639  PyObject* values[22] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
40640  if (unlikely(__pyx_kwds)) {
40641  Py_ssize_t kw_args;
40642  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
40643  switch (pos_args) {
40644  case 22: values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
40645  CYTHON_FALLTHROUGH;
40646  case 21: values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
40647  CYTHON_FALLTHROUGH;
40648  case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
40649  CYTHON_FALLTHROUGH;
40650  case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
40651  CYTHON_FALLTHROUGH;
40652  case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
40653  CYTHON_FALLTHROUGH;
40654  case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
40655  CYTHON_FALLTHROUGH;
40656  case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
40657  CYTHON_FALLTHROUGH;
40658  case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
40659  CYTHON_FALLTHROUGH;
40660  case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
40661  CYTHON_FALLTHROUGH;
40662  case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
40663  CYTHON_FALLTHROUGH;
40664  case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
40665  CYTHON_FALLTHROUGH;
40666  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
40667  CYTHON_FALLTHROUGH;
40668  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
40669  CYTHON_FALLTHROUGH;
40670  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
40671  CYTHON_FALLTHROUGH;
40672  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
40673  CYTHON_FALLTHROUGH;
40674  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
40675  CYTHON_FALLTHROUGH;
40676  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
40677  CYTHON_FALLTHROUGH;
40678  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
40679  CYTHON_FALLTHROUGH;
40680  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
40681  CYTHON_FALLTHROUGH;
40682  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
40683  CYTHON_FALLTHROUGH;
40684  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
40685  CYTHON_FALLTHROUGH;
40686  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
40687  CYTHON_FALLTHROUGH;
40688  case 0: break;
40689  default: goto __pyx_L5_argtuple_error;
40690  }
40691  kw_args = PyDict_Size(__pyx_kwds);
40692  switch (pos_args) {
40693  case 0:
40694  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset_r)) != 0)) kw_args--;
40695  else goto __pyx_L5_argtuple_error;
40696  CYTHON_FALLTHROUGH;
40697  case 1:
40698  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stride_r)) != 0)) kw_args--;
40699  else {
40700  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense", 1, 22, 22, 1); __PYX_ERR(0, 6200, __pyx_L3_error)
40701  }
40702  CYTHON_FALLTHROUGH;
40703  case 2:
40704  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset_u)) != 0)) kw_args--;
40705  else {
40706  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense", 1, 22, 22, 2); __PYX_ERR(0, 6200, __pyx_L3_error)
40707  }
40708  CYTHON_FALLTHROUGH;
40709  case 3:
40710  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stride_u)) != 0)) kw_args--;
40711  else {
40712  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense", 1, 22, 22, 3); __PYX_ERR(0, 6200, __pyx_L3_error)
40713  }
40714  CYTHON_FALLTHROUGH;
40715  case 4:
40716  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeVDOF_global)) != 0)) kw_args--;
40717  else {
40718  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense", 1, 22, 22, 4); __PYX_ERR(0, 6200, __pyx_L3_error)
40719  }
40720  CYTHON_FALLTHROUGH;
40721  case 5:
40722  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exteriorElementBoundaries)) != 0)) kw_args--;
40723  else {
40724  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense", 1, 22, 22, 5); __PYX_ERR(0, 6200, __pyx_L3_error)
40725  }
40726  CYTHON_FALLTHROUGH;
40727  case 6:
40728  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElements)) != 0)) kw_args--;
40729  else {
40730  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense", 1, 22, 22, 6); __PYX_ERR(0, 6200, __pyx_L3_error)
40731  }
40732  CYTHON_FALLTHROUGH;
40733  case 7:
40734  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
40735  else {
40736  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense", 1, 22, 22, 7); __PYX_ERR(0, 6200, __pyx_L3_error)
40737  }
40738  CYTHON_FALLTHROUGH;
40739  case 8:
40740  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeDOF_element_r)) != 0)) kw_args--;
40741  else {
40742  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense", 1, 22, 22, 8); __PYX_ERR(0, 6200, __pyx_L3_error)
40743  }
40744  CYTHON_FALLTHROUGH;
40745  case 9:
40746  if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeLocal_r)) != 0)) kw_args--;
40747  else {
40748  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense", 1, 22, 22, 9); __PYX_ERR(0, 6200, __pyx_L3_error)
40749  }
40750  CYTHON_FALLTHROUGH;
40751  case 10:
40752  if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeGlobal_r)) != 0)) kw_args--;
40753  else {
40754  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense", 1, 22, 22, 10); __PYX_ERR(0, 6200, __pyx_L3_error)
40755  }
40756  CYTHON_FALLTHROUGH;
40757  case 11:
40758  if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeDOF_element_u)) != 0)) kw_args--;
40759  else {
40760  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense", 1, 22, 22, 11); __PYX_ERR(0, 6200, __pyx_L3_error)
40761  }
40762  CYTHON_FALLTHROUGH;
40763  case 12:
40764  if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeLocal_u)) != 0)) kw_args--;
40765  else {
40766  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense", 1, 22, 22, 12); __PYX_ERR(0, 6200, __pyx_L3_error)
40767  }
40768  CYTHON_FALLTHROUGH;
40769  case 13:
40770  if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeGlobal_u)) != 0)) kw_args--;
40771  else {
40772  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense", 1, 22, 22, 13); __PYX_ERR(0, 6200, __pyx_L3_error)
40773  }
40774  CYTHON_FALLTHROUGH;
40775  case 14:
40776  if (likely((values[14] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_isDOFBoundary)) != 0)) kw_args--;
40777  else {
40778  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense", 1, 22, 22, 14); __PYX_ERR(0, 6200, __pyx_L3_error)
40779  }
40780  CYTHON_FALLTHROUGH;
40781  case 15:
40782  if (likely((values[15] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sigma)) != 0)) kw_args--;
40783  else {
40784  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense", 1, 22, 22, 15); __PYX_ERR(0, 6200, __pyx_L3_error)
40785  }
40786  CYTHON_FALLTHROUGH;
40787  case 16:
40788  if (likely((values[16] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
40789  else {
40790  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense", 1, 22, 22, 16); __PYX_ERR(0, 6200, __pyx_L3_error)
40791  }
40792  CYTHON_FALLTHROUGH;
40793  case 17:
40794  if (likely((values[17] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n)) != 0)) kw_args--;
40795  else {
40796  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense", 1, 22, 22, 17); __PYX_ERR(0, 6200, __pyx_L3_error)
40797  }
40798  CYTHON_FALLTHROUGH;
40799  case 18:
40800  if (likely((values[18] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
40801  else {
40802  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense", 1, 22, 22, 18); __PYX_ERR(0, 6200, __pyx_L3_error)
40803  }
40804  CYTHON_FALLTHROUGH;
40805  case 19:
40806  if (likely((values[19] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_w)) != 0)) kw_args--;
40807  else {
40808  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense", 1, 22, 22, 19); __PYX_ERR(0, 6200, __pyx_L3_error)
40809  }
40810  CYTHON_FALLTHROUGH;
40811  case 20:
40812  if (likely((values[20] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dS)) != 0)) kw_args--;
40813  else {
40814  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense", 1, 22, 22, 20); __PYX_ERR(0, 6200, __pyx_L3_error)
40815  }
40816  CYTHON_FALLTHROUGH;
40817  case 21:
40818  if (likely((values[21] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jac)) != 0)) kw_args--;
40819  else {
40820  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense", 1, 22, 22, 21); __PYX_ERR(0, 6200, __pyx_L3_error)
40821  }
40822  }
40823  if (unlikely(kw_args > 0)) {
40824  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense") < 0)) __PYX_ERR(0, 6200, __pyx_L3_error)
40825  }
40826  } else if (PyTuple_GET_SIZE(__pyx_args) != 22) {
40827  goto __pyx_L5_argtuple_error;
40828  } else {
40829  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
40830  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
40831  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
40832  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
40833  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
40834  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
40835  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
40836  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
40837  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
40838  values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
40839  values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
40840  values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
40841  values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
40842  values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
40843  values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
40844  values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
40845  values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
40846  values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
40847  values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
40848  values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
40849  values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
40850  values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
40851  }
40852  __pyx_v_offset_r = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_offset_r == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6200, __pyx_L3_error)
40853  __pyx_v_stride_r = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_stride_r == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6201, __pyx_L3_error)
40854  __pyx_v_offset_u = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_offset_u == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6202, __pyx_L3_error)
40855  __pyx_v_stride_u = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_stride_u == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6203, __pyx_L3_error)
40856  __pyx_v_nFreeVDOF_global = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_nFreeVDOF_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6204, __pyx_L3_error)
40857  __pyx_v_exteriorElementBoundaries = ((PyArrayObject *)values[5]);
40858  __pyx_v_elementBoundaryElements = ((PyArrayObject *)values[6]);
40859  __pyx_v_elementBoundaryLocalElementBoundaries = ((PyArrayObject *)values[7]);
40860  __pyx_v_nFreeDOF_element_r = ((PyArrayObject *)values[8]);
40861  __pyx_v_freeLocal_r = ((PyArrayObject *)values[9]);
40862  __pyx_v_freeGlobal_r = ((PyArrayObject *)values[10]);
40863  __pyx_v_nFreeDOF_element_u = ((PyArrayObject *)values[11]);
40864  __pyx_v_freeLocal_u = ((PyArrayObject *)values[12]);
40865  __pyx_v_freeGlobal_u = ((PyArrayObject *)values[13]);
40866  __pyx_v_isDOFBoundary = ((PyArrayObject *)values[14]);
40867  __pyx_v_sigma = __pyx_PyFloat_AsDouble(values[15]); if (unlikely((__pyx_v_sigma == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 6215, __pyx_L3_error)
40868  __pyx_v_v = ((PyArrayObject *)values[16]);
40869  __pyx_v_n = ((PyArrayObject *)values[17]);
40870  __pyx_v_a = ((PyArrayObject *)values[18]);
40871  __pyx_v_grad_w = ((PyArrayObject *)values[19]);
40872  __pyx_v_dS = ((PyArrayObject *)values[20]);
40873  __pyx_v_jac = ((PyArrayObject *)values[21]);
40874  }
40875  goto __pyx_L4_argument_unpacking_done;
40876  __pyx_L5_argtuple_error:;
40877  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense", 1, 22, 22, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6200, __pyx_L3_error)
40878  __pyx_L3_error:;
40879  __Pyx_AddTraceback("cfemIntegrals.updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense", __pyx_clineno, __pyx_lineno, __pyx_filename);
40880  __Pyx_RefNannyFinishContext();
40881  return NULL;
40882  __pyx_L4_argument_unpacking_done:;
40883  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exteriorElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "exteriorElementBoundaries", 0))) __PYX_ERR(0, 6205, __pyx_L1_error)
40884  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElements), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElements", 0))) __PYX_ERR(0, 6206, __pyx_L1_error)
40885  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundaries", 0))) __PYX_ERR(0, 6207, __pyx_L1_error)
40886  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nFreeDOF_element_r), __pyx_ptype_5numpy_ndarray, 1, "nFreeDOF_element_r", 0))) __PYX_ERR(0, 6208, __pyx_L1_error)
40887  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeLocal_r), __pyx_ptype_5numpy_ndarray, 1, "freeLocal_r", 0))) __PYX_ERR(0, 6209, __pyx_L1_error)
40888  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeGlobal_r), __pyx_ptype_5numpy_ndarray, 1, "freeGlobal_r", 0))) __PYX_ERR(0, 6210, __pyx_L1_error)
40889  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nFreeDOF_element_u), __pyx_ptype_5numpy_ndarray, 1, "nFreeDOF_element_u", 0))) __PYX_ERR(0, 6211, __pyx_L1_error)
40890  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeLocal_u), __pyx_ptype_5numpy_ndarray, 1, "freeLocal_u", 0))) __PYX_ERR(0, 6212, __pyx_L1_error)
40891  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeGlobal_u), __pyx_ptype_5numpy_ndarray, 1, "freeGlobal_u", 0))) __PYX_ERR(0, 6213, __pyx_L1_error)
40892  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_isDOFBoundary), __pyx_ptype_5numpy_ndarray, 1, "isDOFBoundary", 0))) __PYX_ERR(0, 6214, __pyx_L1_error)
40893  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), __pyx_ptype_5numpy_ndarray, 1, "v", 0))) __PYX_ERR(0, 6216, __pyx_L1_error)
40894  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_n), __pyx_ptype_5numpy_ndarray, 1, "n", 0))) __PYX_ERR(0, 6217, __pyx_L1_error)
40895  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1, "a", 0))) __PYX_ERR(0, 6218, __pyx_L1_error)
40896  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_w), __pyx_ptype_5numpy_ndarray, 1, "grad_w", 0))) __PYX_ERR(0, 6219, __pyx_L1_error)
40897  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dS), __pyx_ptype_5numpy_ndarray, 1, "dS", 0))) __PYX_ERR(0, 6220, __pyx_L1_error)
40898  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_jac), __pyx_ptype_5numpy_ndarray, 1, "jac", 0))) __PYX_ERR(0, 6221, __pyx_L1_error)
40899  __pyx_r = __pyx_pf_13cfemIntegrals_354updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense(__pyx_self, __pyx_v_offset_r, __pyx_v_stride_r, __pyx_v_offset_u, __pyx_v_stride_u, __pyx_v_nFreeVDOF_global, __pyx_v_exteriorElementBoundaries, __pyx_v_elementBoundaryElements, __pyx_v_elementBoundaryLocalElementBoundaries, __pyx_v_nFreeDOF_element_r, __pyx_v_freeLocal_r, __pyx_v_freeGlobal_r, __pyx_v_nFreeDOF_element_u, __pyx_v_freeLocal_u, __pyx_v_freeGlobal_u, __pyx_v_isDOFBoundary, __pyx_v_sigma, __pyx_v_v, __pyx_v_n, __pyx_v_a, __pyx_v_grad_w, __pyx_v_dS, __pyx_v_jac);
40900 
40901  /* function exit code */
40902  goto __pyx_L0;
40903  __pyx_L1_error:;
40904  __pyx_r = NULL;
40905  __pyx_L0:;
40906  __Pyx_RefNannyFinishContext();
40907  return __pyx_r;
40908 }
40909 
40910 static PyObject *__pyx_pf_13cfemIntegrals_354updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_offset_r, int __pyx_v_stride_r, int __pyx_v_offset_u, int __pyx_v_stride_u, int __pyx_v_nFreeVDOF_global, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_nFreeDOF_element_r, PyArrayObject *__pyx_v_freeLocal_r, PyArrayObject *__pyx_v_freeGlobal_r, PyArrayObject *__pyx_v_nFreeDOF_element_u, PyArrayObject *__pyx_v_freeLocal_u, PyArrayObject *__pyx_v_freeGlobal_u, PyArrayObject *__pyx_v_isDOFBoundary, double __pyx_v_sigma, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_n, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_grad_w, PyArrayObject *__pyx_v_dS, PyArrayObject *__pyx_v_jac) {
40911  int __pyx_v_nExteriorElementBoundaries_global;
40912  int __pyx_v_nQuadraturePoints_elementBoundary;
40913  int __pyx_v_nDOF_test_element;
40914  int __pyx_v_nDOF_trial_element;
40915  int __pyx_v_nSpace;
40916  PyObject *__pyx_r = NULL;
40917  __Pyx_RefNannyDeclarations
40918  __Pyx_RefNannySetupContext("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense", 0);
40919 
40920  /* "cfemIntegrals.pyx":6222
40921  * np.ndarray dS,
40922  * np.ndarray jac):
40923  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundaries.shape[0] # <<<<<<<<<<<<<<
40924  * cdef int nQuadraturePoints_elementBoundary = grad_w.shape[1]
40925  * cdef int nDOF_test_element = grad_w.shape[2]
40926  */
40927  __pyx_v_nExteriorElementBoundaries_global = (__pyx_v_exteriorElementBoundaries->dimensions[0]);
40928 
40929  /* "cfemIntegrals.pyx":6223
40930  * np.ndarray jac):
40931  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundaries.shape[0]
40932  * cdef int nQuadraturePoints_elementBoundary = grad_w.shape[1] # <<<<<<<<<<<<<<
40933  * cdef int nDOF_test_element = grad_w.shape[2]
40934  * cdef int nDOF_trial_element = v.shape[2]
40935  */
40936  __pyx_v_nQuadraturePoints_elementBoundary = (__pyx_v_grad_w->dimensions[1]);
40937 
40938  /* "cfemIntegrals.pyx":6224
40939  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundaries.shape[0]
40940  * cdef int nQuadraturePoints_elementBoundary = grad_w.shape[1]
40941  * cdef int nDOF_test_element = grad_w.shape[2] # <<<<<<<<<<<<<<
40942  * cdef int nDOF_trial_element = v.shape[2]
40943  * cdef int nSpace = n.shape[2]
40944  */
40945  __pyx_v_nDOF_test_element = (__pyx_v_grad_w->dimensions[2]);
40946 
40947  /* "cfemIntegrals.pyx":6225
40948  * cdef int nQuadraturePoints_elementBoundary = grad_w.shape[1]
40949  * cdef int nDOF_test_element = grad_w.shape[2]
40950  * cdef int nDOF_trial_element = v.shape[2] # <<<<<<<<<<<<<<
40951  * cdef int nSpace = n.shape[2]
40952  * cupdateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense(nExteriorElementBoundaries_global,
40953  */
40954  __pyx_v_nDOF_trial_element = (__pyx_v_v->dimensions[2]);
40955 
40956  /* "cfemIntegrals.pyx":6226
40957  * cdef int nDOF_test_element = grad_w.shape[2]
40958  * cdef int nDOF_trial_element = v.shape[2]
40959  * cdef int nSpace = n.shape[2] # <<<<<<<<<<<<<<
40960  * cupdateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense(nExteriorElementBoundaries_global,
40961  * nQuadraturePoints_elementBoundary,
40962  */
40963  __pyx_v_nSpace = (__pyx_v_n->dimensions[2]);
40964 
40965  /* "cfemIntegrals.pyx":6227
40966  * cdef int nDOF_trial_element = v.shape[2]
40967  * cdef int nSpace = n.shape[2]
40968  * cupdateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense(nExteriorElementBoundaries_global, # <<<<<<<<<<<<<<
40969  * nQuadraturePoints_elementBoundary,
40970  * nDOF_test_element,
40971  */
40972  updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense(__pyx_v_nExteriorElementBoundaries_global, __pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nDOF_test_element, __pyx_v_nDOF_trial_element, __pyx_v_nSpace, __pyx_v_offset_r, __pyx_v_stride_r, __pyx_v_offset_u, __pyx_v_stride_u, __pyx_v_nFreeVDOF_global, ((int *)__pyx_v_exteriorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), ((int *)__pyx_v_nFreeDOF_element_r->data), ((int *)__pyx_v_freeLocal_r->data), ((int *)__pyx_v_freeGlobal_r->data), ((int *)__pyx_v_nFreeDOF_element_u->data), ((int *)__pyx_v_freeLocal_u->data), ((int *)__pyx_v_freeGlobal_u->data), ((int *)__pyx_v_isDOFBoundary->data), __pyx_v_sigma, ((double *)__pyx_v_v->data), ((double *)__pyx_v_n->data), ((double *)__pyx_v_a->data), ((double *)__pyx_v_grad_w->data), ((double *)__pyx_v_dS->data), ((double *)__pyx_v_jac->data));
40973 
40974  /* "cfemIntegrals.pyx":6200
40975  * <double*> dS.data,
40976  * <double*> jac.data)
40977  * def updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense(int offset_r, # <<<<<<<<<<<<<<
40978  * int stride_r,
40979  * int offset_u,
40980  */
40981 
40982  /* function exit code */
40983  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
40984  __Pyx_XGIVEREF(__pyx_r);
40985  __Pyx_RefNannyFinishContext();
40986  return __pyx_r;
40987 }
40988 
40989 /* "cfemIntegrals.pyx":6254
40990  * <double*> dS.data,
40991  * <double*> jac.data)
40992  * def updateInteriorElementBoundaryDiffusionAdjoint_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
40993  * np.ndarray colind,
40994  * np.ndarray interiorElementBoundaries,
40995  */
40996 
40997 /* Python wrapper */
40998 static PyObject *__pyx_pw_13cfemIntegrals_357updateInteriorElementBoundaryDiffusionAdjoint_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
40999 static PyMethodDef __pyx_mdef_13cfemIntegrals_357updateInteriorElementBoundaryDiffusionAdjoint_sd = {"updateInteriorElementBoundaryDiffusionAdjoint_sd", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_357updateInteriorElementBoundaryDiffusionAdjoint_sd, METH_VARARGS|METH_KEYWORDS, 0};
41000 static PyObject *__pyx_pw_13cfemIntegrals_357updateInteriorElementBoundaryDiffusionAdjoint_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
41001  PyArrayObject *__pyx_v_rowptr = 0;
41002  PyArrayObject *__pyx_v_colind = 0;
41003  PyArrayObject *__pyx_v_interiorElementBoundaries = 0;
41004  PyArrayObject *__pyx_v_elementBoundaryElements = 0;
41005  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries = 0;
41006  double __pyx_v_sigma;
41007  PyArrayObject *__pyx_v_u = 0;
41008  PyArrayObject *__pyx_v_n = 0;
41009  PyArrayObject *__pyx_v_a = 0;
41010  PyArrayObject *__pyx_v_grad_w = 0;
41011  PyArrayObject *__pyx_v_dS = 0;
41012  PyArrayObject *__pyx_v_residual = 0;
41013  int __pyx_lineno = 0;
41014  const char *__pyx_filename = NULL;
41015  int __pyx_clineno = 0;
41016  PyObject *__pyx_r = 0;
41017  __Pyx_RefNannyDeclarations
41018  __Pyx_RefNannySetupContext("updateInteriorElementBoundaryDiffusionAdjoint_sd (wrapper)", 0);
41019  {
41020  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rowptr,&__pyx_n_s_colind,&__pyx_n_s_interiorElementBoundaries,&__pyx_n_s_elementBoundaryElements,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_sigma,&__pyx_n_s_u,&__pyx_n_s_n,&__pyx_n_s_a,&__pyx_n_s_grad_w,&__pyx_n_s_dS,&__pyx_n_s_residual,0};
41021  PyObject* values[12] = {0,0,0,0,0,0,0,0,0,0,0,0};
41022  if (unlikely(__pyx_kwds)) {
41023  Py_ssize_t kw_args;
41024  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
41025  switch (pos_args) {
41026  case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
41027  CYTHON_FALLTHROUGH;
41028  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
41029  CYTHON_FALLTHROUGH;
41030  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
41031  CYTHON_FALLTHROUGH;
41032  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
41033  CYTHON_FALLTHROUGH;
41034  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
41035  CYTHON_FALLTHROUGH;
41036  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
41037  CYTHON_FALLTHROUGH;
41038  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
41039  CYTHON_FALLTHROUGH;
41040  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
41041  CYTHON_FALLTHROUGH;
41042  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
41043  CYTHON_FALLTHROUGH;
41044  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
41045  CYTHON_FALLTHROUGH;
41046  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
41047  CYTHON_FALLTHROUGH;
41048  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
41049  CYTHON_FALLTHROUGH;
41050  case 0: break;
41051  default: goto __pyx_L5_argtuple_error;
41052  }
41053  kw_args = PyDict_Size(__pyx_kwds);
41054  switch (pos_args) {
41055  case 0:
41056  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rowptr)) != 0)) kw_args--;
41057  else goto __pyx_L5_argtuple_error;
41058  CYTHON_FALLTHROUGH;
41059  case 1:
41060  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_colind)) != 0)) kw_args--;
41061  else {
41062  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundaryDiffusionAdjoint_sd", 1, 12, 12, 1); __PYX_ERR(0, 6254, __pyx_L3_error)
41063  }
41064  CYTHON_FALLTHROUGH;
41065  case 2:
41066  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_interiorElementBoundaries)) != 0)) kw_args--;
41067  else {
41068  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundaryDiffusionAdjoint_sd", 1, 12, 12, 2); __PYX_ERR(0, 6254, __pyx_L3_error)
41069  }
41070  CYTHON_FALLTHROUGH;
41071  case 3:
41072  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElements)) != 0)) kw_args--;
41073  else {
41074  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundaryDiffusionAdjoint_sd", 1, 12, 12, 3); __PYX_ERR(0, 6254, __pyx_L3_error)
41075  }
41076  CYTHON_FALLTHROUGH;
41077  case 4:
41078  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
41079  else {
41080  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundaryDiffusionAdjoint_sd", 1, 12, 12, 4); __PYX_ERR(0, 6254, __pyx_L3_error)
41081  }
41082  CYTHON_FALLTHROUGH;
41083  case 5:
41084  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sigma)) != 0)) kw_args--;
41085  else {
41086  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundaryDiffusionAdjoint_sd", 1, 12, 12, 5); __PYX_ERR(0, 6254, __pyx_L3_error)
41087  }
41088  CYTHON_FALLTHROUGH;
41089  case 6:
41090  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u)) != 0)) kw_args--;
41091  else {
41092  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundaryDiffusionAdjoint_sd", 1, 12, 12, 6); __PYX_ERR(0, 6254, __pyx_L3_error)
41093  }
41094  CYTHON_FALLTHROUGH;
41095  case 7:
41096  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n)) != 0)) kw_args--;
41097  else {
41098  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundaryDiffusionAdjoint_sd", 1, 12, 12, 7); __PYX_ERR(0, 6254, __pyx_L3_error)
41099  }
41100  CYTHON_FALLTHROUGH;
41101  case 8:
41102  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
41103  else {
41104  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundaryDiffusionAdjoint_sd", 1, 12, 12, 8); __PYX_ERR(0, 6254, __pyx_L3_error)
41105  }
41106  CYTHON_FALLTHROUGH;
41107  case 9:
41108  if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_w)) != 0)) kw_args--;
41109  else {
41110  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundaryDiffusionAdjoint_sd", 1, 12, 12, 9); __PYX_ERR(0, 6254, __pyx_L3_error)
41111  }
41112  CYTHON_FALLTHROUGH;
41113  case 10:
41114  if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dS)) != 0)) kw_args--;
41115  else {
41116  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundaryDiffusionAdjoint_sd", 1, 12, 12, 10); __PYX_ERR(0, 6254, __pyx_L3_error)
41117  }
41118  CYTHON_FALLTHROUGH;
41119  case 11:
41120  if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_residual)) != 0)) kw_args--;
41121  else {
41122  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundaryDiffusionAdjoint_sd", 1, 12, 12, 11); __PYX_ERR(0, 6254, __pyx_L3_error)
41123  }
41124  }
41125  if (unlikely(kw_args > 0)) {
41126  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateInteriorElementBoundaryDiffusionAdjoint_sd") < 0)) __PYX_ERR(0, 6254, __pyx_L3_error)
41127  }
41128  } else if (PyTuple_GET_SIZE(__pyx_args) != 12) {
41129  goto __pyx_L5_argtuple_error;
41130  } else {
41131  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
41132  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
41133  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
41134  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
41135  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
41136  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
41137  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
41138  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
41139  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
41140  values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
41141  values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
41142  values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
41143  }
41144  __pyx_v_rowptr = ((PyArrayObject *)values[0]);
41145  __pyx_v_colind = ((PyArrayObject *)values[1]);
41146  __pyx_v_interiorElementBoundaries = ((PyArrayObject *)values[2]);
41147  __pyx_v_elementBoundaryElements = ((PyArrayObject *)values[3]);
41148  __pyx_v_elementBoundaryLocalElementBoundaries = ((PyArrayObject *)values[4]);
41149  __pyx_v_sigma = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_sigma == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 6259, __pyx_L3_error)
41150  __pyx_v_u = ((PyArrayObject *)values[6]);
41151  __pyx_v_n = ((PyArrayObject *)values[7]);
41152  __pyx_v_a = ((PyArrayObject *)values[8]);
41153  __pyx_v_grad_w = ((PyArrayObject *)values[9]);
41154  __pyx_v_dS = ((PyArrayObject *)values[10]);
41155  __pyx_v_residual = ((PyArrayObject *)values[11]);
41156  }
41157  goto __pyx_L4_argument_unpacking_done;
41158  __pyx_L5_argtuple_error:;
41159  __Pyx_RaiseArgtupleInvalid("updateInteriorElementBoundaryDiffusionAdjoint_sd", 1, 12, 12, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6254, __pyx_L3_error)
41160  __pyx_L3_error:;
41161  __Pyx_AddTraceback("cfemIntegrals.updateInteriorElementBoundaryDiffusionAdjoint_sd", __pyx_clineno, __pyx_lineno, __pyx_filename);
41162  __Pyx_RefNannyFinishContext();
41163  return NULL;
41164  __pyx_L4_argument_unpacking_done:;
41165  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rowptr), __pyx_ptype_5numpy_ndarray, 1, "rowptr", 0))) __PYX_ERR(0, 6254, __pyx_L1_error)
41166  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_colind), __pyx_ptype_5numpy_ndarray, 1, "colind", 0))) __PYX_ERR(0, 6255, __pyx_L1_error)
41167  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_interiorElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "interiorElementBoundaries", 0))) __PYX_ERR(0, 6256, __pyx_L1_error)
41168  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElements), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElements", 0))) __PYX_ERR(0, 6257, __pyx_L1_error)
41169  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundaries", 0))) __PYX_ERR(0, 6258, __pyx_L1_error)
41170  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u), __pyx_ptype_5numpy_ndarray, 1, "u", 0))) __PYX_ERR(0, 6260, __pyx_L1_error)
41171  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_n), __pyx_ptype_5numpy_ndarray, 1, "n", 0))) __PYX_ERR(0, 6261, __pyx_L1_error)
41172  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1, "a", 0))) __PYX_ERR(0, 6262, __pyx_L1_error)
41173  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_w), __pyx_ptype_5numpy_ndarray, 1, "grad_w", 0))) __PYX_ERR(0, 6263, __pyx_L1_error)
41174  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dS), __pyx_ptype_5numpy_ndarray, 1, "dS", 0))) __PYX_ERR(0, 6264, __pyx_L1_error)
41175  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_residual), __pyx_ptype_5numpy_ndarray, 1, "residual", 0))) __PYX_ERR(0, 6265, __pyx_L1_error)
41176  __pyx_r = __pyx_pf_13cfemIntegrals_356updateInteriorElementBoundaryDiffusionAdjoint_sd(__pyx_self, __pyx_v_rowptr, __pyx_v_colind, __pyx_v_interiorElementBoundaries, __pyx_v_elementBoundaryElements, __pyx_v_elementBoundaryLocalElementBoundaries, __pyx_v_sigma, __pyx_v_u, __pyx_v_n, __pyx_v_a, __pyx_v_grad_w, __pyx_v_dS, __pyx_v_residual);
41177 
41178  /* function exit code */
41179  goto __pyx_L0;
41180  __pyx_L1_error:;
41181  __pyx_r = NULL;
41182  __pyx_L0:;
41183  __Pyx_RefNannyFinishContext();
41184  return __pyx_r;
41185 }
41186 
41187 static PyObject *__pyx_pf_13cfemIntegrals_356updateInteriorElementBoundaryDiffusionAdjoint_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_interiorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, double __pyx_v_sigma, PyArrayObject *__pyx_v_u, PyArrayObject *__pyx_v_n, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_grad_w, PyArrayObject *__pyx_v_dS, PyArrayObject *__pyx_v_residual) {
41188  int __pyx_v_nInteriorElementBoundaries_global;
41189  int __pyx_v_nElementBoundaries_element;
41190  int __pyx_v_nQuadraturePoints_elementBoundary;
41191  int __pyx_v_nDOF_test_element;
41192  int __pyx_v_nSpace;
41193  PyObject *__pyx_r = NULL;
41194  __Pyx_RefNannyDeclarations
41195  __Pyx_RefNannySetupContext("updateInteriorElementBoundaryDiffusionAdjoint_sd", 0);
41196 
41197  /* "cfemIntegrals.pyx":6266
41198  * np.ndarray dS,
41199  * np.ndarray residual):
41200  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0] # <<<<<<<<<<<<<<
41201  * cdef int nElementBoundaries_element = grad_w.shape[1]
41202  * cdef int nQuadraturePoints_elementBoundary = grad_w.shape[2]
41203  */
41204  __pyx_v_nInteriorElementBoundaries_global = (__pyx_v_interiorElementBoundaries->dimensions[0]);
41205 
41206  /* "cfemIntegrals.pyx":6267
41207  * np.ndarray residual):
41208  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0]
41209  * cdef int nElementBoundaries_element = grad_w.shape[1] # <<<<<<<<<<<<<<
41210  * cdef int nQuadraturePoints_elementBoundary = grad_w.shape[2]
41211  * cdef int nDOF_test_element = grad_w.shape[3]
41212  */
41213  __pyx_v_nElementBoundaries_element = (__pyx_v_grad_w->dimensions[1]);
41214 
41215  /* "cfemIntegrals.pyx":6268
41216  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0]
41217  * cdef int nElementBoundaries_element = grad_w.shape[1]
41218  * cdef int nQuadraturePoints_elementBoundary = grad_w.shape[2] # <<<<<<<<<<<<<<
41219  * cdef int nDOF_test_element = grad_w.shape[3]
41220  * cdef int nSpace = grad_w.shape[4]
41221  */
41222  __pyx_v_nQuadraturePoints_elementBoundary = (__pyx_v_grad_w->dimensions[2]);
41223 
41224  /* "cfemIntegrals.pyx":6269
41225  * cdef int nElementBoundaries_element = grad_w.shape[1]
41226  * cdef int nQuadraturePoints_elementBoundary = grad_w.shape[2]
41227  * cdef int nDOF_test_element = grad_w.shape[3] # <<<<<<<<<<<<<<
41228  * cdef int nSpace = grad_w.shape[4]
41229  * cupdateInteriorElementBoundaryDiffusionAdjoint_sd(nInteriorElementBoundaries_global,
41230  */
41231  __pyx_v_nDOF_test_element = (__pyx_v_grad_w->dimensions[3]);
41232 
41233  /* "cfemIntegrals.pyx":6270
41234  * cdef int nQuadraturePoints_elementBoundary = grad_w.shape[2]
41235  * cdef int nDOF_test_element = grad_w.shape[3]
41236  * cdef int nSpace = grad_w.shape[4] # <<<<<<<<<<<<<<
41237  * cupdateInteriorElementBoundaryDiffusionAdjoint_sd(nInteriorElementBoundaries_global,
41238  * nElementBoundaries_element,
41239  */
41240  __pyx_v_nSpace = (__pyx_v_grad_w->dimensions[4]);
41241 
41242  /* "cfemIntegrals.pyx":6271
41243  * cdef int nDOF_test_element = grad_w.shape[3]
41244  * cdef int nSpace = grad_w.shape[4]
41245  * cupdateInteriorElementBoundaryDiffusionAdjoint_sd(nInteriorElementBoundaries_global, # <<<<<<<<<<<<<<
41246  * nElementBoundaries_element,
41247  * nQuadraturePoints_elementBoundary,
41248  */
41249  updateInteriorElementBoundaryDiffusionAdjoint_sd(__pyx_v_nInteriorElementBoundaries_global, __pyx_v_nElementBoundaries_element, __pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nDOF_test_element, __pyx_v_nSpace, ((int *)__pyx_v_rowptr->data), ((int *)__pyx_v_colind->data), ((int *)__pyx_v_interiorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), __pyx_v_sigma, ((double *)__pyx_v_u->data), ((double *)__pyx_v_n->data), ((double *)__pyx_v_a->data), ((double *)__pyx_v_grad_w->data), ((double *)__pyx_v_dS->data), ((double *)__pyx_v_residual->data));
41250 
41251  /* "cfemIntegrals.pyx":6254
41252  * <double*> dS.data,
41253  * <double*> jac.data)
41254  * def updateInteriorElementBoundaryDiffusionAdjoint_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
41255  * np.ndarray colind,
41256  * np.ndarray interiorElementBoundaries,
41257  */
41258 
41259  /* function exit code */
41260  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
41261  __Pyx_XGIVEREF(__pyx_r);
41262  __Pyx_RefNannyFinishContext();
41263  return __pyx_r;
41264 }
41265 
41266 /* "cfemIntegrals.pyx":6288
41267  * <double*> dS.data,
41268  * <double*> residual.data)
41269  * def updateExteriorElementBoundaryDiffusionAdjoint_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
41270  * np.ndarray colind,
41271  * np.ndarray isDOFBoundary,
41272  */
41273 
41274 /* Python wrapper */
41275 static PyObject *__pyx_pw_13cfemIntegrals_359updateExteriorElementBoundaryDiffusionAdjoint_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
41276 static PyMethodDef __pyx_mdef_13cfemIntegrals_359updateExteriorElementBoundaryDiffusionAdjoint_sd = {"updateExteriorElementBoundaryDiffusionAdjoint_sd", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_359updateExteriorElementBoundaryDiffusionAdjoint_sd, METH_VARARGS|METH_KEYWORDS, 0};
41277 static PyObject *__pyx_pw_13cfemIntegrals_359updateExteriorElementBoundaryDiffusionAdjoint_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
41278  PyArrayObject *__pyx_v_rowptr = 0;
41279  PyArrayObject *__pyx_v_colind = 0;
41280  PyArrayObject *__pyx_v_isDOFBoundary = 0;
41281  PyArrayObject *__pyx_v_exteriorElementBoundaries = 0;
41282  PyArrayObject *__pyx_v_elementBoundaryElements = 0;
41283  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries = 0;
41284  double __pyx_v_sigma;
41285  PyArrayObject *__pyx_v_u = 0;
41286  PyArrayObject *__pyx_v_ub = 0;
41287  PyArrayObject *__pyx_v_n = 0;
41288  PyArrayObject *__pyx_v_a = 0;
41289  PyArrayObject *__pyx_v_grad_w = 0;
41290  PyArrayObject *__pyx_v_dS = 0;
41291  PyArrayObject *__pyx_v_residual = 0;
41292  int __pyx_lineno = 0;
41293  const char *__pyx_filename = NULL;
41294  int __pyx_clineno = 0;
41295  PyObject *__pyx_r = 0;
41296  __Pyx_RefNannyDeclarations
41297  __Pyx_RefNannySetupContext("updateExteriorElementBoundaryDiffusionAdjoint_sd (wrapper)", 0);
41298  {
41299  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rowptr,&__pyx_n_s_colind,&__pyx_n_s_isDOFBoundary,&__pyx_n_s_exteriorElementBoundaries,&__pyx_n_s_elementBoundaryElements,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_sigma,&__pyx_n_s_u,&__pyx_n_s_ub,&__pyx_n_s_n,&__pyx_n_s_a,&__pyx_n_s_grad_w,&__pyx_n_s_dS,&__pyx_n_s_residual,0};
41300  PyObject* values[14] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0};
41301  if (unlikely(__pyx_kwds)) {
41302  Py_ssize_t kw_args;
41303  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
41304  switch (pos_args) {
41305  case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
41306  CYTHON_FALLTHROUGH;
41307  case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
41308  CYTHON_FALLTHROUGH;
41309  case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
41310  CYTHON_FALLTHROUGH;
41311  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
41312  CYTHON_FALLTHROUGH;
41313  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
41314  CYTHON_FALLTHROUGH;
41315  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
41316  CYTHON_FALLTHROUGH;
41317  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
41318  CYTHON_FALLTHROUGH;
41319  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
41320  CYTHON_FALLTHROUGH;
41321  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
41322  CYTHON_FALLTHROUGH;
41323  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
41324  CYTHON_FALLTHROUGH;
41325  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
41326  CYTHON_FALLTHROUGH;
41327  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
41328  CYTHON_FALLTHROUGH;
41329  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
41330  CYTHON_FALLTHROUGH;
41331  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
41332  CYTHON_FALLTHROUGH;
41333  case 0: break;
41334  default: goto __pyx_L5_argtuple_error;
41335  }
41336  kw_args = PyDict_Size(__pyx_kwds);
41337  switch (pos_args) {
41338  case 0:
41339  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rowptr)) != 0)) kw_args--;
41340  else goto __pyx_L5_argtuple_error;
41341  CYTHON_FALLTHROUGH;
41342  case 1:
41343  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_colind)) != 0)) kw_args--;
41344  else {
41345  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundaryDiffusionAdjoint_sd", 1, 14, 14, 1); __PYX_ERR(0, 6288, __pyx_L3_error)
41346  }
41347  CYTHON_FALLTHROUGH;
41348  case 2:
41349  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_isDOFBoundary)) != 0)) kw_args--;
41350  else {
41351  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundaryDiffusionAdjoint_sd", 1, 14, 14, 2); __PYX_ERR(0, 6288, __pyx_L3_error)
41352  }
41353  CYTHON_FALLTHROUGH;
41354  case 3:
41355  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exteriorElementBoundaries)) != 0)) kw_args--;
41356  else {
41357  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundaryDiffusionAdjoint_sd", 1, 14, 14, 3); __PYX_ERR(0, 6288, __pyx_L3_error)
41358  }
41359  CYTHON_FALLTHROUGH;
41360  case 4:
41361  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElements)) != 0)) kw_args--;
41362  else {
41363  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundaryDiffusionAdjoint_sd", 1, 14, 14, 4); __PYX_ERR(0, 6288, __pyx_L3_error)
41364  }
41365  CYTHON_FALLTHROUGH;
41366  case 5:
41367  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
41368  else {
41369  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundaryDiffusionAdjoint_sd", 1, 14, 14, 5); __PYX_ERR(0, 6288, __pyx_L3_error)
41370  }
41371  CYTHON_FALLTHROUGH;
41372  case 6:
41373  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sigma)) != 0)) kw_args--;
41374  else {
41375  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundaryDiffusionAdjoint_sd", 1, 14, 14, 6); __PYX_ERR(0, 6288, __pyx_L3_error)
41376  }
41377  CYTHON_FALLTHROUGH;
41378  case 7:
41379  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u)) != 0)) kw_args--;
41380  else {
41381  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundaryDiffusionAdjoint_sd", 1, 14, 14, 7); __PYX_ERR(0, 6288, __pyx_L3_error)
41382  }
41383  CYTHON_FALLTHROUGH;
41384  case 8:
41385  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ub)) != 0)) kw_args--;
41386  else {
41387  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundaryDiffusionAdjoint_sd", 1, 14, 14, 8); __PYX_ERR(0, 6288, __pyx_L3_error)
41388  }
41389  CYTHON_FALLTHROUGH;
41390  case 9:
41391  if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n)) != 0)) kw_args--;
41392  else {
41393  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundaryDiffusionAdjoint_sd", 1, 14, 14, 9); __PYX_ERR(0, 6288, __pyx_L3_error)
41394  }
41395  CYTHON_FALLTHROUGH;
41396  case 10:
41397  if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
41398  else {
41399  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundaryDiffusionAdjoint_sd", 1, 14, 14, 10); __PYX_ERR(0, 6288, __pyx_L3_error)
41400  }
41401  CYTHON_FALLTHROUGH;
41402  case 11:
41403  if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_w)) != 0)) kw_args--;
41404  else {
41405  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundaryDiffusionAdjoint_sd", 1, 14, 14, 11); __PYX_ERR(0, 6288, __pyx_L3_error)
41406  }
41407  CYTHON_FALLTHROUGH;
41408  case 12:
41409  if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dS)) != 0)) kw_args--;
41410  else {
41411  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundaryDiffusionAdjoint_sd", 1, 14, 14, 12); __PYX_ERR(0, 6288, __pyx_L3_error)
41412  }
41413  CYTHON_FALLTHROUGH;
41414  case 13:
41415  if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_residual)) != 0)) kw_args--;
41416  else {
41417  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundaryDiffusionAdjoint_sd", 1, 14, 14, 13); __PYX_ERR(0, 6288, __pyx_L3_error)
41418  }
41419  }
41420  if (unlikely(kw_args > 0)) {
41421  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateExteriorElementBoundaryDiffusionAdjoint_sd") < 0)) __PYX_ERR(0, 6288, __pyx_L3_error)
41422  }
41423  } else if (PyTuple_GET_SIZE(__pyx_args) != 14) {
41424  goto __pyx_L5_argtuple_error;
41425  } else {
41426  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
41427  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
41428  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
41429  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
41430  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
41431  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
41432  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
41433  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
41434  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
41435  values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
41436  values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
41437  values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
41438  values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
41439  values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
41440  }
41441  __pyx_v_rowptr = ((PyArrayObject *)values[0]);
41442  __pyx_v_colind = ((PyArrayObject *)values[1]);
41443  __pyx_v_isDOFBoundary = ((PyArrayObject *)values[2]);
41444  __pyx_v_exteriorElementBoundaries = ((PyArrayObject *)values[3]);
41445  __pyx_v_elementBoundaryElements = ((PyArrayObject *)values[4]);
41446  __pyx_v_elementBoundaryLocalElementBoundaries = ((PyArrayObject *)values[5]);
41447  __pyx_v_sigma = __pyx_PyFloat_AsDouble(values[6]); if (unlikely((__pyx_v_sigma == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 6294, __pyx_L3_error)
41448  __pyx_v_u = ((PyArrayObject *)values[7]);
41449  __pyx_v_ub = ((PyArrayObject *)values[8]);
41450  __pyx_v_n = ((PyArrayObject *)values[9]);
41451  __pyx_v_a = ((PyArrayObject *)values[10]);
41452  __pyx_v_grad_w = ((PyArrayObject *)values[11]);
41453  __pyx_v_dS = ((PyArrayObject *)values[12]);
41454  __pyx_v_residual = ((PyArrayObject *)values[13]);
41455  }
41456  goto __pyx_L4_argument_unpacking_done;
41457  __pyx_L5_argtuple_error:;
41458  __Pyx_RaiseArgtupleInvalid("updateExteriorElementBoundaryDiffusionAdjoint_sd", 1, 14, 14, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6288, __pyx_L3_error)
41459  __pyx_L3_error:;
41460  __Pyx_AddTraceback("cfemIntegrals.updateExteriorElementBoundaryDiffusionAdjoint_sd", __pyx_clineno, __pyx_lineno, __pyx_filename);
41461  __Pyx_RefNannyFinishContext();
41462  return NULL;
41463  __pyx_L4_argument_unpacking_done:;
41464  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rowptr), __pyx_ptype_5numpy_ndarray, 1, "rowptr", 0))) __PYX_ERR(0, 6288, __pyx_L1_error)
41465  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_colind), __pyx_ptype_5numpy_ndarray, 1, "colind", 0))) __PYX_ERR(0, 6289, __pyx_L1_error)
41466  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_isDOFBoundary), __pyx_ptype_5numpy_ndarray, 1, "isDOFBoundary", 0))) __PYX_ERR(0, 6290, __pyx_L1_error)
41467  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exteriorElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "exteriorElementBoundaries", 0))) __PYX_ERR(0, 6291, __pyx_L1_error)
41468  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElements), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElements", 0))) __PYX_ERR(0, 6292, __pyx_L1_error)
41469  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundaries", 0))) __PYX_ERR(0, 6293, __pyx_L1_error)
41470  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u), __pyx_ptype_5numpy_ndarray, 1, "u", 0))) __PYX_ERR(0, 6295, __pyx_L1_error)
41471  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ub), __pyx_ptype_5numpy_ndarray, 1, "ub", 0))) __PYX_ERR(0, 6296, __pyx_L1_error)
41472  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_n), __pyx_ptype_5numpy_ndarray, 1, "n", 0))) __PYX_ERR(0, 6297, __pyx_L1_error)
41473  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1, "a", 0))) __PYX_ERR(0, 6298, __pyx_L1_error)
41474  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_w), __pyx_ptype_5numpy_ndarray, 1, "grad_w", 0))) __PYX_ERR(0, 6299, __pyx_L1_error)
41475  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dS), __pyx_ptype_5numpy_ndarray, 1, "dS", 0))) __PYX_ERR(0, 6300, __pyx_L1_error)
41476  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_residual), __pyx_ptype_5numpy_ndarray, 1, "residual", 0))) __PYX_ERR(0, 6301, __pyx_L1_error)
41477  __pyx_r = __pyx_pf_13cfemIntegrals_358updateExteriorElementBoundaryDiffusionAdjoint_sd(__pyx_self, __pyx_v_rowptr, __pyx_v_colind, __pyx_v_isDOFBoundary, __pyx_v_exteriorElementBoundaries, __pyx_v_elementBoundaryElements, __pyx_v_elementBoundaryLocalElementBoundaries, __pyx_v_sigma, __pyx_v_u, __pyx_v_ub, __pyx_v_n, __pyx_v_a, __pyx_v_grad_w, __pyx_v_dS, __pyx_v_residual);
41478 
41479  /* function exit code */
41480  goto __pyx_L0;
41481  __pyx_L1_error:;
41482  __pyx_r = NULL;
41483  __pyx_L0:;
41484  __Pyx_RefNannyFinishContext();
41485  return __pyx_r;
41486 }
41487 
41488 static PyObject *__pyx_pf_13cfemIntegrals_358updateExteriorElementBoundaryDiffusionAdjoint_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_isDOFBoundary, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, double __pyx_v_sigma, PyArrayObject *__pyx_v_u, PyArrayObject *__pyx_v_ub, PyArrayObject *__pyx_v_n, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_grad_w, PyArrayObject *__pyx_v_dS, PyArrayObject *__pyx_v_residual) {
41489  int __pyx_v_nExteriorElementBoundaries_global;
41490  int __pyx_v_nQuadraturePoints_elementBoundary;
41491  int __pyx_v_nDOF_test_element;
41492  int __pyx_v_nSpace;
41493  PyObject *__pyx_r = NULL;
41494  __Pyx_RefNannyDeclarations
41495  __Pyx_RefNannySetupContext("updateExteriorElementBoundaryDiffusionAdjoint_sd", 0);
41496 
41497  /* "cfemIntegrals.pyx":6302
41498  * np.ndarray dS,
41499  * np.ndarray residual):
41500  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundaries.shape[0] # <<<<<<<<<<<<<<
41501  * cdef int nQuadraturePoints_elementBoundary = grad_w.shape[1]
41502  * cdef int nDOF_test_element = grad_w.shape[2]
41503  */
41504  __pyx_v_nExteriorElementBoundaries_global = (__pyx_v_exteriorElementBoundaries->dimensions[0]);
41505 
41506  /* "cfemIntegrals.pyx":6303
41507  * np.ndarray residual):
41508  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundaries.shape[0]
41509  * cdef int nQuadraturePoints_elementBoundary = grad_w.shape[1] # <<<<<<<<<<<<<<
41510  * cdef int nDOF_test_element = grad_w.shape[2]
41511  * cdef int nSpace = grad_w.shape[3]
41512  */
41513  __pyx_v_nQuadraturePoints_elementBoundary = (__pyx_v_grad_w->dimensions[1]);
41514 
41515  /* "cfemIntegrals.pyx":6304
41516  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundaries.shape[0]
41517  * cdef int nQuadraturePoints_elementBoundary = grad_w.shape[1]
41518  * cdef int nDOF_test_element = grad_w.shape[2] # <<<<<<<<<<<<<<
41519  * cdef int nSpace = grad_w.shape[3]
41520  * cupdateExteriorElementBoundaryDiffusionAdjoint_sd(nExteriorElementBoundaries_global,
41521  */
41522  __pyx_v_nDOF_test_element = (__pyx_v_grad_w->dimensions[2]);
41523 
41524  /* "cfemIntegrals.pyx":6305
41525  * cdef int nQuadraturePoints_elementBoundary = grad_w.shape[1]
41526  * cdef int nDOF_test_element = grad_w.shape[2]
41527  * cdef int nSpace = grad_w.shape[3] # <<<<<<<<<<<<<<
41528  * cupdateExteriorElementBoundaryDiffusionAdjoint_sd(nExteriorElementBoundaries_global,
41529  * nQuadraturePoints_elementBoundary,
41530  */
41531  __pyx_v_nSpace = (__pyx_v_grad_w->dimensions[3]);
41532 
41533  /* "cfemIntegrals.pyx":6306
41534  * cdef int nDOF_test_element = grad_w.shape[2]
41535  * cdef int nSpace = grad_w.shape[3]
41536  * cupdateExteriorElementBoundaryDiffusionAdjoint_sd(nExteriorElementBoundaries_global, # <<<<<<<<<<<<<<
41537  * nQuadraturePoints_elementBoundary,
41538  * nDOF_test_element,
41539  */
41540  updateExteriorElementBoundaryDiffusionAdjoint_sd(__pyx_v_nExteriorElementBoundaries_global, __pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nDOF_test_element, __pyx_v_nSpace, ((int *)__pyx_v_rowptr->data), ((int *)__pyx_v_colind->data), ((int *)__pyx_v_isDOFBoundary->data), ((int *)__pyx_v_exteriorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), __pyx_v_sigma, ((double *)__pyx_v_u->data), ((double *)__pyx_v_ub->data), ((double *)__pyx_v_n->data), ((double *)__pyx_v_a->data), ((double *)__pyx_v_grad_w->data), ((double *)__pyx_v_dS->data), ((double *)__pyx_v_residual->data));
41541 
41542  /* "cfemIntegrals.pyx":6288
41543  * <double*> dS.data,
41544  * <double*> residual.data)
41545  * def updateExteriorElementBoundaryDiffusionAdjoint_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
41546  * np.ndarray colind,
41547  * np.ndarray isDOFBoundary,
41548  */
41549 
41550  /* function exit code */
41551  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
41552  __Pyx_XGIVEREF(__pyx_r);
41553  __Pyx_RefNannyFinishContext();
41554  return __pyx_r;
41555 }
41556 
41557 /* "cfemIntegrals.pyx":6324
41558  * <double*> dS.data,
41559  * <double*> residual.data)
41560  * def updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
41561  * np.ndarray colind,
41562  * int offset_r,
41563  */
41564 
41565 /* Python wrapper */
41566 static PyObject *__pyx_pw_13cfemIntegrals_361updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
41567 static PyMethodDef __pyx_mdef_13cfemIntegrals_361updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense_sd = {"updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense_sd", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_361updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense_sd, METH_VARARGS|METH_KEYWORDS, 0};
41568 static PyObject *__pyx_pw_13cfemIntegrals_361updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
41569  PyArrayObject *__pyx_v_rowptr = 0;
41570  PyArrayObject *__pyx_v_colind = 0;
41571  int __pyx_v_offset_r;
41572  int __pyx_v_stride_r;
41573  int __pyx_v_offset_u;
41574  int __pyx_v_stride_u;
41575  int __pyx_v_nFreeVDOF_global;
41576  PyArrayObject *__pyx_v_interiorElementBoundaries = 0;
41577  PyArrayObject *__pyx_v_elementBoundaryElements = 0;
41578  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries = 0;
41579  PyArrayObject *__pyx_v_nFreeDOF_element_r = 0;
41580  PyArrayObject *__pyx_v_freeLocal_r = 0;
41581  PyArrayObject *__pyx_v_freeGlobal_r = 0;
41582  PyArrayObject *__pyx_v_nFreeDOF_element_u = 0;
41583  PyArrayObject *__pyx_v_freeLocal_u = 0;
41584  PyArrayObject *__pyx_v_freeGlobal_u = 0;
41585  double __pyx_v_sigma;
41586  PyArrayObject *__pyx_v_v = 0;
41587  PyArrayObject *__pyx_v_n = 0;
41588  PyArrayObject *__pyx_v_a = 0;
41589  PyArrayObject *__pyx_v_grad_w = 0;
41590  PyArrayObject *__pyx_v_dS = 0;
41591  PyArrayObject *__pyx_v_jac = 0;
41592  int __pyx_lineno = 0;
41593  const char *__pyx_filename = NULL;
41594  int __pyx_clineno = 0;
41595  PyObject *__pyx_r = 0;
41596  __Pyx_RefNannyDeclarations
41597  __Pyx_RefNannySetupContext("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense_sd (wrapper)", 0);
41598  {
41599  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rowptr,&__pyx_n_s_colind,&__pyx_n_s_offset_r,&__pyx_n_s_stride_r,&__pyx_n_s_offset_u,&__pyx_n_s_stride_u,&__pyx_n_s_nFreeVDOF_global,&__pyx_n_s_interiorElementBoundaries,&__pyx_n_s_elementBoundaryElements,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_nFreeDOF_element_r,&__pyx_n_s_freeLocal_r,&__pyx_n_s_freeGlobal_r,&__pyx_n_s_nFreeDOF_element_u,&__pyx_n_s_freeLocal_u,&__pyx_n_s_freeGlobal_u,&__pyx_n_s_sigma,&__pyx_n_s_v,&__pyx_n_s_n,&__pyx_n_s_a,&__pyx_n_s_grad_w,&__pyx_n_s_dS,&__pyx_n_s_jac,0};
41600  PyObject* values[23] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
41601  if (unlikely(__pyx_kwds)) {
41602  Py_ssize_t kw_args;
41603  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
41604  switch (pos_args) {
41605  case 23: values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
41606  CYTHON_FALLTHROUGH;
41607  case 22: values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
41608  CYTHON_FALLTHROUGH;
41609  case 21: values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
41610  CYTHON_FALLTHROUGH;
41611  case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
41612  CYTHON_FALLTHROUGH;
41613  case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
41614  CYTHON_FALLTHROUGH;
41615  case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
41616  CYTHON_FALLTHROUGH;
41617  case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
41618  CYTHON_FALLTHROUGH;
41619  case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
41620  CYTHON_FALLTHROUGH;
41621  case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
41622  CYTHON_FALLTHROUGH;
41623  case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
41624  CYTHON_FALLTHROUGH;
41625  case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
41626  CYTHON_FALLTHROUGH;
41627  case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
41628  CYTHON_FALLTHROUGH;
41629  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
41630  CYTHON_FALLTHROUGH;
41631  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
41632  CYTHON_FALLTHROUGH;
41633  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
41634  CYTHON_FALLTHROUGH;
41635  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
41636  CYTHON_FALLTHROUGH;
41637  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
41638  CYTHON_FALLTHROUGH;
41639  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
41640  CYTHON_FALLTHROUGH;
41641  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
41642  CYTHON_FALLTHROUGH;
41643  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
41644  CYTHON_FALLTHROUGH;
41645  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
41646  CYTHON_FALLTHROUGH;
41647  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
41648  CYTHON_FALLTHROUGH;
41649  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
41650  CYTHON_FALLTHROUGH;
41651  case 0: break;
41652  default: goto __pyx_L5_argtuple_error;
41653  }
41654  kw_args = PyDict_Size(__pyx_kwds);
41655  switch (pos_args) {
41656  case 0:
41657  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rowptr)) != 0)) kw_args--;
41658  else goto __pyx_L5_argtuple_error;
41659  CYTHON_FALLTHROUGH;
41660  case 1:
41661  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_colind)) != 0)) kw_args--;
41662  else {
41663  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense_sd", 1, 23, 23, 1); __PYX_ERR(0, 6324, __pyx_L3_error)
41664  }
41665  CYTHON_FALLTHROUGH;
41666  case 2:
41667  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset_r)) != 0)) kw_args--;
41668  else {
41669  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense_sd", 1, 23, 23, 2); __PYX_ERR(0, 6324, __pyx_L3_error)
41670  }
41671  CYTHON_FALLTHROUGH;
41672  case 3:
41673  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stride_r)) != 0)) kw_args--;
41674  else {
41675  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense_sd", 1, 23, 23, 3); __PYX_ERR(0, 6324, __pyx_L3_error)
41676  }
41677  CYTHON_FALLTHROUGH;
41678  case 4:
41679  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset_u)) != 0)) kw_args--;
41680  else {
41681  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense_sd", 1, 23, 23, 4); __PYX_ERR(0, 6324, __pyx_L3_error)
41682  }
41683  CYTHON_FALLTHROUGH;
41684  case 5:
41685  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stride_u)) != 0)) kw_args--;
41686  else {
41687  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense_sd", 1, 23, 23, 5); __PYX_ERR(0, 6324, __pyx_L3_error)
41688  }
41689  CYTHON_FALLTHROUGH;
41690  case 6:
41691  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeVDOF_global)) != 0)) kw_args--;
41692  else {
41693  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense_sd", 1, 23, 23, 6); __PYX_ERR(0, 6324, __pyx_L3_error)
41694  }
41695  CYTHON_FALLTHROUGH;
41696  case 7:
41697  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_interiorElementBoundaries)) != 0)) kw_args--;
41698  else {
41699  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense_sd", 1, 23, 23, 7); __PYX_ERR(0, 6324, __pyx_L3_error)
41700  }
41701  CYTHON_FALLTHROUGH;
41702  case 8:
41703  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElements)) != 0)) kw_args--;
41704  else {
41705  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense_sd", 1, 23, 23, 8); __PYX_ERR(0, 6324, __pyx_L3_error)
41706  }
41707  CYTHON_FALLTHROUGH;
41708  case 9:
41709  if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
41710  else {
41711  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense_sd", 1, 23, 23, 9); __PYX_ERR(0, 6324, __pyx_L3_error)
41712  }
41713  CYTHON_FALLTHROUGH;
41714  case 10:
41715  if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeDOF_element_r)) != 0)) kw_args--;
41716  else {
41717  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense_sd", 1, 23, 23, 10); __PYX_ERR(0, 6324, __pyx_L3_error)
41718  }
41719  CYTHON_FALLTHROUGH;
41720  case 11:
41721  if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeLocal_r)) != 0)) kw_args--;
41722  else {
41723  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense_sd", 1, 23, 23, 11); __PYX_ERR(0, 6324, __pyx_L3_error)
41724  }
41725  CYTHON_FALLTHROUGH;
41726  case 12:
41727  if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeGlobal_r)) != 0)) kw_args--;
41728  else {
41729  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense_sd", 1, 23, 23, 12); __PYX_ERR(0, 6324, __pyx_L3_error)
41730  }
41731  CYTHON_FALLTHROUGH;
41732  case 13:
41733  if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeDOF_element_u)) != 0)) kw_args--;
41734  else {
41735  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense_sd", 1, 23, 23, 13); __PYX_ERR(0, 6324, __pyx_L3_error)
41736  }
41737  CYTHON_FALLTHROUGH;
41738  case 14:
41739  if (likely((values[14] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeLocal_u)) != 0)) kw_args--;
41740  else {
41741  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense_sd", 1, 23, 23, 14); __PYX_ERR(0, 6324, __pyx_L3_error)
41742  }
41743  CYTHON_FALLTHROUGH;
41744  case 15:
41745  if (likely((values[15] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeGlobal_u)) != 0)) kw_args--;
41746  else {
41747  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense_sd", 1, 23, 23, 15); __PYX_ERR(0, 6324, __pyx_L3_error)
41748  }
41749  CYTHON_FALLTHROUGH;
41750  case 16:
41751  if (likely((values[16] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sigma)) != 0)) kw_args--;
41752  else {
41753  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense_sd", 1, 23, 23, 16); __PYX_ERR(0, 6324, __pyx_L3_error)
41754  }
41755  CYTHON_FALLTHROUGH;
41756  case 17:
41757  if (likely((values[17] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
41758  else {
41759  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense_sd", 1, 23, 23, 17); __PYX_ERR(0, 6324, __pyx_L3_error)
41760  }
41761  CYTHON_FALLTHROUGH;
41762  case 18:
41763  if (likely((values[18] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n)) != 0)) kw_args--;
41764  else {
41765  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense_sd", 1, 23, 23, 18); __PYX_ERR(0, 6324, __pyx_L3_error)
41766  }
41767  CYTHON_FALLTHROUGH;
41768  case 19:
41769  if (likely((values[19] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
41770  else {
41771  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense_sd", 1, 23, 23, 19); __PYX_ERR(0, 6324, __pyx_L3_error)
41772  }
41773  CYTHON_FALLTHROUGH;
41774  case 20:
41775  if (likely((values[20] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_w)) != 0)) kw_args--;
41776  else {
41777  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense_sd", 1, 23, 23, 20); __PYX_ERR(0, 6324, __pyx_L3_error)
41778  }
41779  CYTHON_FALLTHROUGH;
41780  case 21:
41781  if (likely((values[21] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dS)) != 0)) kw_args--;
41782  else {
41783  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense_sd", 1, 23, 23, 21); __PYX_ERR(0, 6324, __pyx_L3_error)
41784  }
41785  CYTHON_FALLTHROUGH;
41786  case 22:
41787  if (likely((values[22] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jac)) != 0)) kw_args--;
41788  else {
41789  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense_sd", 1, 23, 23, 22); __PYX_ERR(0, 6324, __pyx_L3_error)
41790  }
41791  }
41792  if (unlikely(kw_args > 0)) {
41793  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense_sd") < 0)) __PYX_ERR(0, 6324, __pyx_L3_error)
41794  }
41795  } else if (PyTuple_GET_SIZE(__pyx_args) != 23) {
41796  goto __pyx_L5_argtuple_error;
41797  } else {
41798  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
41799  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
41800  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
41801  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
41802  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
41803  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
41804  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
41805  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
41806  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
41807  values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
41808  values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
41809  values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
41810  values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
41811  values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
41812  values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
41813  values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
41814  values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
41815  values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
41816  values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
41817  values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
41818  values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
41819  values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
41820  values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
41821  }
41822  __pyx_v_rowptr = ((PyArrayObject *)values[0]);
41823  __pyx_v_colind = ((PyArrayObject *)values[1]);
41824  __pyx_v_offset_r = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_offset_r == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6326, __pyx_L3_error)
41825  __pyx_v_stride_r = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_stride_r == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6327, __pyx_L3_error)
41826  __pyx_v_offset_u = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_offset_u == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6328, __pyx_L3_error)
41827  __pyx_v_stride_u = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_stride_u == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6329, __pyx_L3_error)
41828  __pyx_v_nFreeVDOF_global = __Pyx_PyInt_As_int(values[6]); if (unlikely((__pyx_v_nFreeVDOF_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6330, __pyx_L3_error)
41829  __pyx_v_interiorElementBoundaries = ((PyArrayObject *)values[7]);
41830  __pyx_v_elementBoundaryElements = ((PyArrayObject *)values[8]);
41831  __pyx_v_elementBoundaryLocalElementBoundaries = ((PyArrayObject *)values[9]);
41832  __pyx_v_nFreeDOF_element_r = ((PyArrayObject *)values[10]);
41833  __pyx_v_freeLocal_r = ((PyArrayObject *)values[11]);
41834  __pyx_v_freeGlobal_r = ((PyArrayObject *)values[12]);
41835  __pyx_v_nFreeDOF_element_u = ((PyArrayObject *)values[13]);
41836  __pyx_v_freeLocal_u = ((PyArrayObject *)values[14]);
41837  __pyx_v_freeGlobal_u = ((PyArrayObject *)values[15]);
41838  __pyx_v_sigma = __pyx_PyFloat_AsDouble(values[16]); if (unlikely((__pyx_v_sigma == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 6340, __pyx_L3_error)
41839  __pyx_v_v = ((PyArrayObject *)values[17]);
41840  __pyx_v_n = ((PyArrayObject *)values[18]);
41841  __pyx_v_a = ((PyArrayObject *)values[19]);
41842  __pyx_v_grad_w = ((PyArrayObject *)values[20]);
41843  __pyx_v_dS = ((PyArrayObject *)values[21]);
41844  __pyx_v_jac = ((PyArrayObject *)values[22]);
41845  }
41846  goto __pyx_L4_argument_unpacking_done;
41847  __pyx_L5_argtuple_error:;
41848  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense_sd", 1, 23, 23, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6324, __pyx_L3_error)
41849  __pyx_L3_error:;
41850  __Pyx_AddTraceback("cfemIntegrals.updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense_sd", __pyx_clineno, __pyx_lineno, __pyx_filename);
41851  __Pyx_RefNannyFinishContext();
41852  return NULL;
41853  __pyx_L4_argument_unpacking_done:;
41854  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rowptr), __pyx_ptype_5numpy_ndarray, 1, "rowptr", 0))) __PYX_ERR(0, 6324, __pyx_L1_error)
41855  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_colind), __pyx_ptype_5numpy_ndarray, 1, "colind", 0))) __PYX_ERR(0, 6325, __pyx_L1_error)
41856  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_interiorElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "interiorElementBoundaries", 0))) __PYX_ERR(0, 6331, __pyx_L1_error)
41857  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElements), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElements", 0))) __PYX_ERR(0, 6332, __pyx_L1_error)
41858  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundaries", 0))) __PYX_ERR(0, 6333, __pyx_L1_error)
41859  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nFreeDOF_element_r), __pyx_ptype_5numpy_ndarray, 1, "nFreeDOF_element_r", 0))) __PYX_ERR(0, 6334, __pyx_L1_error)
41860  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeLocal_r), __pyx_ptype_5numpy_ndarray, 1, "freeLocal_r", 0))) __PYX_ERR(0, 6335, __pyx_L1_error)
41861  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeGlobal_r), __pyx_ptype_5numpy_ndarray, 1, "freeGlobal_r", 0))) __PYX_ERR(0, 6336, __pyx_L1_error)
41862  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nFreeDOF_element_u), __pyx_ptype_5numpy_ndarray, 1, "nFreeDOF_element_u", 0))) __PYX_ERR(0, 6337, __pyx_L1_error)
41863  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeLocal_u), __pyx_ptype_5numpy_ndarray, 1, "freeLocal_u", 0))) __PYX_ERR(0, 6338, __pyx_L1_error)
41864  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeGlobal_u), __pyx_ptype_5numpy_ndarray, 1, "freeGlobal_u", 0))) __PYX_ERR(0, 6339, __pyx_L1_error)
41865  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), __pyx_ptype_5numpy_ndarray, 1, "v", 0))) __PYX_ERR(0, 6341, __pyx_L1_error)
41866  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_n), __pyx_ptype_5numpy_ndarray, 1, "n", 0))) __PYX_ERR(0, 6342, __pyx_L1_error)
41867  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1, "a", 0))) __PYX_ERR(0, 6343, __pyx_L1_error)
41868  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_w), __pyx_ptype_5numpy_ndarray, 1, "grad_w", 0))) __PYX_ERR(0, 6344, __pyx_L1_error)
41869  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dS), __pyx_ptype_5numpy_ndarray, 1, "dS", 0))) __PYX_ERR(0, 6345, __pyx_L1_error)
41870  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_jac), __pyx_ptype_5numpy_ndarray, 1, "jac", 0))) __PYX_ERR(0, 6346, __pyx_L1_error)
41871  __pyx_r = __pyx_pf_13cfemIntegrals_360updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense_sd(__pyx_self, __pyx_v_rowptr, __pyx_v_colind, __pyx_v_offset_r, __pyx_v_stride_r, __pyx_v_offset_u, __pyx_v_stride_u, __pyx_v_nFreeVDOF_global, __pyx_v_interiorElementBoundaries, __pyx_v_elementBoundaryElements, __pyx_v_elementBoundaryLocalElementBoundaries, __pyx_v_nFreeDOF_element_r, __pyx_v_freeLocal_r, __pyx_v_freeGlobal_r, __pyx_v_nFreeDOF_element_u, __pyx_v_freeLocal_u, __pyx_v_freeGlobal_u, __pyx_v_sigma, __pyx_v_v, __pyx_v_n, __pyx_v_a, __pyx_v_grad_w, __pyx_v_dS, __pyx_v_jac);
41872 
41873  /* function exit code */
41874  goto __pyx_L0;
41875  __pyx_L1_error:;
41876  __pyx_r = NULL;
41877  __pyx_L0:;
41878  __Pyx_RefNannyFinishContext();
41879  return __pyx_r;
41880 }
41881 
41882 static PyObject *__pyx_pf_13cfemIntegrals_360updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, int __pyx_v_offset_r, int __pyx_v_stride_r, int __pyx_v_offset_u, int __pyx_v_stride_u, int __pyx_v_nFreeVDOF_global, PyArrayObject *__pyx_v_interiorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_nFreeDOF_element_r, PyArrayObject *__pyx_v_freeLocal_r, PyArrayObject *__pyx_v_freeGlobal_r, PyArrayObject *__pyx_v_nFreeDOF_element_u, PyArrayObject *__pyx_v_freeLocal_u, PyArrayObject *__pyx_v_freeGlobal_u, double __pyx_v_sigma, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_n, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_grad_w, PyArrayObject *__pyx_v_dS, PyArrayObject *__pyx_v_jac) {
41883  int __pyx_v_nInteriorElementBoundaries_global;
41884  int __pyx_v_nElementBoundaries_element;
41885  int __pyx_v_nQuadraturePoints_elementBoundary;
41886  int __pyx_v_nDOF_test_element;
41887  int __pyx_v_nDOF_trial_element;
41888  int __pyx_v_nSpace;
41889  PyObject *__pyx_r = NULL;
41890  __Pyx_RefNannyDeclarations
41891  __Pyx_RefNannySetupContext("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense_sd", 0);
41892 
41893  /* "cfemIntegrals.pyx":6347
41894  * np.ndarray dS,
41895  * np.ndarray jac):
41896  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0] # <<<<<<<<<<<<<<
41897  * cdef int nElementBoundaries_element = grad_w.shape[1]
41898  * cdef int nQuadraturePoints_elementBoundary = grad_w.shape[2]
41899  */
41900  __pyx_v_nInteriorElementBoundaries_global = (__pyx_v_interiorElementBoundaries->dimensions[0]);
41901 
41902  /* "cfemIntegrals.pyx":6348
41903  * np.ndarray jac):
41904  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0]
41905  * cdef int nElementBoundaries_element = grad_w.shape[1] # <<<<<<<<<<<<<<
41906  * cdef int nQuadraturePoints_elementBoundary = grad_w.shape[2]
41907  * cdef int nDOF_test_element = grad_w.shape[3]
41908  */
41909  __pyx_v_nElementBoundaries_element = (__pyx_v_grad_w->dimensions[1]);
41910 
41911  /* "cfemIntegrals.pyx":6349
41912  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0]
41913  * cdef int nElementBoundaries_element = grad_w.shape[1]
41914  * cdef int nQuadraturePoints_elementBoundary = grad_w.shape[2] # <<<<<<<<<<<<<<
41915  * cdef int nDOF_test_element = grad_w.shape[3]
41916  * cdef int nDOF_trial_element = v.shape[3]
41917  */
41918  __pyx_v_nQuadraturePoints_elementBoundary = (__pyx_v_grad_w->dimensions[2]);
41919 
41920  /* "cfemIntegrals.pyx":6350
41921  * cdef int nElementBoundaries_element = grad_w.shape[1]
41922  * cdef int nQuadraturePoints_elementBoundary = grad_w.shape[2]
41923  * cdef int nDOF_test_element = grad_w.shape[3] # <<<<<<<<<<<<<<
41924  * cdef int nDOF_trial_element = v.shape[3]
41925  * cdef int nSpace = n.shape[3]
41926  */
41927  __pyx_v_nDOF_test_element = (__pyx_v_grad_w->dimensions[3]);
41928 
41929  /* "cfemIntegrals.pyx":6351
41930  * cdef int nQuadraturePoints_elementBoundary = grad_w.shape[2]
41931  * cdef int nDOF_test_element = grad_w.shape[3]
41932  * cdef int nDOF_trial_element = v.shape[3] # <<<<<<<<<<<<<<
41933  * cdef int nSpace = n.shape[3]
41934  * cupdateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense_sd(nInteriorElementBoundaries_global,
41935  */
41936  __pyx_v_nDOF_trial_element = (__pyx_v_v->dimensions[3]);
41937 
41938  /* "cfemIntegrals.pyx":6352
41939  * cdef int nDOF_test_element = grad_w.shape[3]
41940  * cdef int nDOF_trial_element = v.shape[3]
41941  * cdef int nSpace = n.shape[3] # <<<<<<<<<<<<<<
41942  * cupdateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense_sd(nInteriorElementBoundaries_global,
41943  * nElementBoundaries_element,
41944  */
41945  __pyx_v_nSpace = (__pyx_v_n->dimensions[3]);
41946 
41947  /* "cfemIntegrals.pyx":6353
41948  * cdef int nDOF_trial_element = v.shape[3]
41949  * cdef int nSpace = n.shape[3]
41950  * cupdateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense_sd(nInteriorElementBoundaries_global, # <<<<<<<<<<<<<<
41951  * nElementBoundaries_element,
41952  * nQuadraturePoints_elementBoundary,
41953  */
41954  updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense_sd(__pyx_v_nInteriorElementBoundaries_global, __pyx_v_nElementBoundaries_element, __pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nDOF_test_element, __pyx_v_nDOF_trial_element, __pyx_v_nSpace, ((int *)__pyx_v_rowptr->data), ((int *)__pyx_v_colind->data), __pyx_v_offset_r, __pyx_v_stride_r, __pyx_v_offset_u, __pyx_v_stride_u, __pyx_v_nFreeVDOF_global, ((int *)__pyx_v_interiorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), ((int *)__pyx_v_nFreeDOF_element_r->data), ((int *)__pyx_v_freeLocal_r->data), ((int *)__pyx_v_freeGlobal_r->data), ((int *)__pyx_v_nFreeDOF_element_u->data), ((int *)__pyx_v_freeLocal_u->data), ((int *)__pyx_v_freeGlobal_u->data), __pyx_v_sigma, ((double *)__pyx_v_v->data), ((double *)__pyx_v_n->data), ((double *)__pyx_v_a->data), ((double *)__pyx_v_grad_w->data), ((double *)__pyx_v_dS->data), ((double *)__pyx_v_jac->data));
41955 
41956  /* "cfemIntegrals.pyx":6324
41957  * <double*> dS.data,
41958  * <double*> residual.data)
41959  * def updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
41960  * np.ndarray colind,
41961  * int offset_r,
41962  */
41963 
41964  /* function exit code */
41965  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
41966  __Pyx_XGIVEREF(__pyx_r);
41967  __Pyx_RefNannyFinishContext();
41968  return __pyx_r;
41969 }
41970 
41971 /* "cfemIntegrals.pyx":6382
41972  * <double*> dS.data,
41973  * <double*> jac.data)
41974  * def updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
41975  * np.ndarray colind,
41976  * int offset_r,
41977  */
41978 
41979 /* Python wrapper */
41980 static PyObject *__pyx_pw_13cfemIntegrals_363updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
41981 static PyMethodDef __pyx_mdef_13cfemIntegrals_363updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense_sd = {"updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense_sd", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_363updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense_sd, METH_VARARGS|METH_KEYWORDS, 0};
41982 static PyObject *__pyx_pw_13cfemIntegrals_363updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
41983  PyArrayObject *__pyx_v_rowptr = 0;
41984  PyArrayObject *__pyx_v_colind = 0;
41985  int __pyx_v_offset_r;
41986  int __pyx_v_stride_r;
41987  int __pyx_v_offset_u;
41988  int __pyx_v_stride_u;
41989  int __pyx_v_nFreeVDOF_global;
41990  PyArrayObject *__pyx_v_exteriorElementBoundaries = 0;
41991  PyArrayObject *__pyx_v_elementBoundaryElements = 0;
41992  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries = 0;
41993  PyArrayObject *__pyx_v_nFreeDOF_element_r = 0;
41994  PyArrayObject *__pyx_v_freeLocal_r = 0;
41995  PyArrayObject *__pyx_v_freeGlobal_r = 0;
41996  PyArrayObject *__pyx_v_nFreeDOF_element_u = 0;
41997  PyArrayObject *__pyx_v_freeLocal_u = 0;
41998  PyArrayObject *__pyx_v_freeGlobal_u = 0;
41999  PyArrayObject *__pyx_v_isDOFBoundary = 0;
42000  double __pyx_v_sigma;
42001  PyArrayObject *__pyx_v_v = 0;
42002  PyArrayObject *__pyx_v_n = 0;
42003  PyArrayObject *__pyx_v_a = 0;
42004  PyArrayObject *__pyx_v_grad_w = 0;
42005  PyArrayObject *__pyx_v_dS = 0;
42006  PyArrayObject *__pyx_v_jac = 0;
42007  int __pyx_lineno = 0;
42008  const char *__pyx_filename = NULL;
42009  int __pyx_clineno = 0;
42010  PyObject *__pyx_r = 0;
42011  __Pyx_RefNannyDeclarations
42012  __Pyx_RefNannySetupContext("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense_sd (wrapper)", 0);
42013  {
42014  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rowptr,&__pyx_n_s_colind,&__pyx_n_s_offset_r,&__pyx_n_s_stride_r,&__pyx_n_s_offset_u,&__pyx_n_s_stride_u,&__pyx_n_s_nFreeVDOF_global,&__pyx_n_s_exteriorElementBoundaries,&__pyx_n_s_elementBoundaryElements,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_nFreeDOF_element_r,&__pyx_n_s_freeLocal_r,&__pyx_n_s_freeGlobal_r,&__pyx_n_s_nFreeDOF_element_u,&__pyx_n_s_freeLocal_u,&__pyx_n_s_freeGlobal_u,&__pyx_n_s_isDOFBoundary,&__pyx_n_s_sigma,&__pyx_n_s_v,&__pyx_n_s_n,&__pyx_n_s_a,&__pyx_n_s_grad_w,&__pyx_n_s_dS,&__pyx_n_s_jac,0};
42015  PyObject* values[24] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
42016  if (unlikely(__pyx_kwds)) {
42017  Py_ssize_t kw_args;
42018  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
42019  switch (pos_args) {
42020  case 24: values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
42021  CYTHON_FALLTHROUGH;
42022  case 23: values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
42023  CYTHON_FALLTHROUGH;
42024  case 22: values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
42025  CYTHON_FALLTHROUGH;
42026  case 21: values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
42027  CYTHON_FALLTHROUGH;
42028  case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
42029  CYTHON_FALLTHROUGH;
42030  case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
42031  CYTHON_FALLTHROUGH;
42032  case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
42033  CYTHON_FALLTHROUGH;
42034  case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
42035  CYTHON_FALLTHROUGH;
42036  case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
42037  CYTHON_FALLTHROUGH;
42038  case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
42039  CYTHON_FALLTHROUGH;
42040  case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
42041  CYTHON_FALLTHROUGH;
42042  case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
42043  CYTHON_FALLTHROUGH;
42044  case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
42045  CYTHON_FALLTHROUGH;
42046  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
42047  CYTHON_FALLTHROUGH;
42048  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
42049  CYTHON_FALLTHROUGH;
42050  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
42051  CYTHON_FALLTHROUGH;
42052  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
42053  CYTHON_FALLTHROUGH;
42054  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
42055  CYTHON_FALLTHROUGH;
42056  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
42057  CYTHON_FALLTHROUGH;
42058  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
42059  CYTHON_FALLTHROUGH;
42060  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
42061  CYTHON_FALLTHROUGH;
42062  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
42063  CYTHON_FALLTHROUGH;
42064  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
42065  CYTHON_FALLTHROUGH;
42066  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
42067  CYTHON_FALLTHROUGH;
42068  case 0: break;
42069  default: goto __pyx_L5_argtuple_error;
42070  }
42071  kw_args = PyDict_Size(__pyx_kwds);
42072  switch (pos_args) {
42073  case 0:
42074  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rowptr)) != 0)) kw_args--;
42075  else goto __pyx_L5_argtuple_error;
42076  CYTHON_FALLTHROUGH;
42077  case 1:
42078  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_colind)) != 0)) kw_args--;
42079  else {
42080  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense_sd", 1, 24, 24, 1); __PYX_ERR(0, 6382, __pyx_L3_error)
42081  }
42082  CYTHON_FALLTHROUGH;
42083  case 2:
42084  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset_r)) != 0)) kw_args--;
42085  else {
42086  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense_sd", 1, 24, 24, 2); __PYX_ERR(0, 6382, __pyx_L3_error)
42087  }
42088  CYTHON_FALLTHROUGH;
42089  case 3:
42090  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stride_r)) != 0)) kw_args--;
42091  else {
42092  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense_sd", 1, 24, 24, 3); __PYX_ERR(0, 6382, __pyx_L3_error)
42093  }
42094  CYTHON_FALLTHROUGH;
42095  case 4:
42096  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset_u)) != 0)) kw_args--;
42097  else {
42098  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense_sd", 1, 24, 24, 4); __PYX_ERR(0, 6382, __pyx_L3_error)
42099  }
42100  CYTHON_FALLTHROUGH;
42101  case 5:
42102  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stride_u)) != 0)) kw_args--;
42103  else {
42104  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense_sd", 1, 24, 24, 5); __PYX_ERR(0, 6382, __pyx_L3_error)
42105  }
42106  CYTHON_FALLTHROUGH;
42107  case 6:
42108  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeVDOF_global)) != 0)) kw_args--;
42109  else {
42110  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense_sd", 1, 24, 24, 6); __PYX_ERR(0, 6382, __pyx_L3_error)
42111  }
42112  CYTHON_FALLTHROUGH;
42113  case 7:
42114  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exteriorElementBoundaries)) != 0)) kw_args--;
42115  else {
42116  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense_sd", 1, 24, 24, 7); __PYX_ERR(0, 6382, __pyx_L3_error)
42117  }
42118  CYTHON_FALLTHROUGH;
42119  case 8:
42120  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElements)) != 0)) kw_args--;
42121  else {
42122  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense_sd", 1, 24, 24, 8); __PYX_ERR(0, 6382, __pyx_L3_error)
42123  }
42124  CYTHON_FALLTHROUGH;
42125  case 9:
42126  if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
42127  else {
42128  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense_sd", 1, 24, 24, 9); __PYX_ERR(0, 6382, __pyx_L3_error)
42129  }
42130  CYTHON_FALLTHROUGH;
42131  case 10:
42132  if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeDOF_element_r)) != 0)) kw_args--;
42133  else {
42134  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense_sd", 1, 24, 24, 10); __PYX_ERR(0, 6382, __pyx_L3_error)
42135  }
42136  CYTHON_FALLTHROUGH;
42137  case 11:
42138  if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeLocal_r)) != 0)) kw_args--;
42139  else {
42140  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense_sd", 1, 24, 24, 11); __PYX_ERR(0, 6382, __pyx_L3_error)
42141  }
42142  CYTHON_FALLTHROUGH;
42143  case 12:
42144  if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeGlobal_r)) != 0)) kw_args--;
42145  else {
42146  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense_sd", 1, 24, 24, 12); __PYX_ERR(0, 6382, __pyx_L3_error)
42147  }
42148  CYTHON_FALLTHROUGH;
42149  case 13:
42150  if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeDOF_element_u)) != 0)) kw_args--;
42151  else {
42152  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense_sd", 1, 24, 24, 13); __PYX_ERR(0, 6382, __pyx_L3_error)
42153  }
42154  CYTHON_FALLTHROUGH;
42155  case 14:
42156  if (likely((values[14] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeLocal_u)) != 0)) kw_args--;
42157  else {
42158  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense_sd", 1, 24, 24, 14); __PYX_ERR(0, 6382, __pyx_L3_error)
42159  }
42160  CYTHON_FALLTHROUGH;
42161  case 15:
42162  if (likely((values[15] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeGlobal_u)) != 0)) kw_args--;
42163  else {
42164  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense_sd", 1, 24, 24, 15); __PYX_ERR(0, 6382, __pyx_L3_error)
42165  }
42166  CYTHON_FALLTHROUGH;
42167  case 16:
42168  if (likely((values[16] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_isDOFBoundary)) != 0)) kw_args--;
42169  else {
42170  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense_sd", 1, 24, 24, 16); __PYX_ERR(0, 6382, __pyx_L3_error)
42171  }
42172  CYTHON_FALLTHROUGH;
42173  case 17:
42174  if (likely((values[17] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sigma)) != 0)) kw_args--;
42175  else {
42176  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense_sd", 1, 24, 24, 17); __PYX_ERR(0, 6382, __pyx_L3_error)
42177  }
42178  CYTHON_FALLTHROUGH;
42179  case 18:
42180  if (likely((values[18] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
42181  else {
42182  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense_sd", 1, 24, 24, 18); __PYX_ERR(0, 6382, __pyx_L3_error)
42183  }
42184  CYTHON_FALLTHROUGH;
42185  case 19:
42186  if (likely((values[19] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n)) != 0)) kw_args--;
42187  else {
42188  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense_sd", 1, 24, 24, 19); __PYX_ERR(0, 6382, __pyx_L3_error)
42189  }
42190  CYTHON_FALLTHROUGH;
42191  case 20:
42192  if (likely((values[20] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
42193  else {
42194  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense_sd", 1, 24, 24, 20); __PYX_ERR(0, 6382, __pyx_L3_error)
42195  }
42196  CYTHON_FALLTHROUGH;
42197  case 21:
42198  if (likely((values[21] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_w)) != 0)) kw_args--;
42199  else {
42200  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense_sd", 1, 24, 24, 21); __PYX_ERR(0, 6382, __pyx_L3_error)
42201  }
42202  CYTHON_FALLTHROUGH;
42203  case 22:
42204  if (likely((values[22] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dS)) != 0)) kw_args--;
42205  else {
42206  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense_sd", 1, 24, 24, 22); __PYX_ERR(0, 6382, __pyx_L3_error)
42207  }
42208  CYTHON_FALLTHROUGH;
42209  case 23:
42210  if (likely((values[23] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jac)) != 0)) kw_args--;
42211  else {
42212  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense_sd", 1, 24, 24, 23); __PYX_ERR(0, 6382, __pyx_L3_error)
42213  }
42214  }
42215  if (unlikely(kw_args > 0)) {
42216  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense_sd") < 0)) __PYX_ERR(0, 6382, __pyx_L3_error)
42217  }
42218  } else if (PyTuple_GET_SIZE(__pyx_args) != 24) {
42219  goto __pyx_L5_argtuple_error;
42220  } else {
42221  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
42222  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
42223  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
42224  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
42225  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
42226  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
42227  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
42228  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
42229  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
42230  values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
42231  values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
42232  values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
42233  values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
42234  values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
42235  values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
42236  values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
42237  values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
42238  values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
42239  values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
42240  values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
42241  values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
42242  values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
42243  values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
42244  values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
42245  }
42246  __pyx_v_rowptr = ((PyArrayObject *)values[0]);
42247  __pyx_v_colind = ((PyArrayObject *)values[1]);
42248  __pyx_v_offset_r = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_offset_r == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6384, __pyx_L3_error)
42249  __pyx_v_stride_r = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_stride_r == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6385, __pyx_L3_error)
42250  __pyx_v_offset_u = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_offset_u == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6386, __pyx_L3_error)
42251  __pyx_v_stride_u = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_stride_u == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6387, __pyx_L3_error)
42252  __pyx_v_nFreeVDOF_global = __Pyx_PyInt_As_int(values[6]); if (unlikely((__pyx_v_nFreeVDOF_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6388, __pyx_L3_error)
42253  __pyx_v_exteriorElementBoundaries = ((PyArrayObject *)values[7]);
42254  __pyx_v_elementBoundaryElements = ((PyArrayObject *)values[8]);
42255  __pyx_v_elementBoundaryLocalElementBoundaries = ((PyArrayObject *)values[9]);
42256  __pyx_v_nFreeDOF_element_r = ((PyArrayObject *)values[10]);
42257  __pyx_v_freeLocal_r = ((PyArrayObject *)values[11]);
42258  __pyx_v_freeGlobal_r = ((PyArrayObject *)values[12]);
42259  __pyx_v_nFreeDOF_element_u = ((PyArrayObject *)values[13]);
42260  __pyx_v_freeLocal_u = ((PyArrayObject *)values[14]);
42261  __pyx_v_freeGlobal_u = ((PyArrayObject *)values[15]);
42262  __pyx_v_isDOFBoundary = ((PyArrayObject *)values[16]);
42263  __pyx_v_sigma = __pyx_PyFloat_AsDouble(values[17]); if (unlikely((__pyx_v_sigma == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 6399, __pyx_L3_error)
42264  __pyx_v_v = ((PyArrayObject *)values[18]);
42265  __pyx_v_n = ((PyArrayObject *)values[19]);
42266  __pyx_v_a = ((PyArrayObject *)values[20]);
42267  __pyx_v_grad_w = ((PyArrayObject *)values[21]);
42268  __pyx_v_dS = ((PyArrayObject *)values[22]);
42269  __pyx_v_jac = ((PyArrayObject *)values[23]);
42270  }
42271  goto __pyx_L4_argument_unpacking_done;
42272  __pyx_L5_argtuple_error:;
42273  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense_sd", 1, 24, 24, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6382, __pyx_L3_error)
42274  __pyx_L3_error:;
42275  __Pyx_AddTraceback("cfemIntegrals.updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense_sd", __pyx_clineno, __pyx_lineno, __pyx_filename);
42276  __Pyx_RefNannyFinishContext();
42277  return NULL;
42278  __pyx_L4_argument_unpacking_done:;
42279  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rowptr), __pyx_ptype_5numpy_ndarray, 1, "rowptr", 0))) __PYX_ERR(0, 6382, __pyx_L1_error)
42280  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_colind), __pyx_ptype_5numpy_ndarray, 1, "colind", 0))) __PYX_ERR(0, 6383, __pyx_L1_error)
42281  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exteriorElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "exteriorElementBoundaries", 0))) __PYX_ERR(0, 6389, __pyx_L1_error)
42282  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElements), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElements", 0))) __PYX_ERR(0, 6390, __pyx_L1_error)
42283  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundaries", 0))) __PYX_ERR(0, 6391, __pyx_L1_error)
42284  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nFreeDOF_element_r), __pyx_ptype_5numpy_ndarray, 1, "nFreeDOF_element_r", 0))) __PYX_ERR(0, 6392, __pyx_L1_error)
42285  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeLocal_r), __pyx_ptype_5numpy_ndarray, 1, "freeLocal_r", 0))) __PYX_ERR(0, 6393, __pyx_L1_error)
42286  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeGlobal_r), __pyx_ptype_5numpy_ndarray, 1, "freeGlobal_r", 0))) __PYX_ERR(0, 6394, __pyx_L1_error)
42287  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nFreeDOF_element_u), __pyx_ptype_5numpy_ndarray, 1, "nFreeDOF_element_u", 0))) __PYX_ERR(0, 6395, __pyx_L1_error)
42288  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeLocal_u), __pyx_ptype_5numpy_ndarray, 1, "freeLocal_u", 0))) __PYX_ERR(0, 6396, __pyx_L1_error)
42289  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeGlobal_u), __pyx_ptype_5numpy_ndarray, 1, "freeGlobal_u", 0))) __PYX_ERR(0, 6397, __pyx_L1_error)
42290  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_isDOFBoundary), __pyx_ptype_5numpy_ndarray, 1, "isDOFBoundary", 0))) __PYX_ERR(0, 6398, __pyx_L1_error)
42291  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), __pyx_ptype_5numpy_ndarray, 1, "v", 0))) __PYX_ERR(0, 6400, __pyx_L1_error)
42292  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_n), __pyx_ptype_5numpy_ndarray, 1, "n", 0))) __PYX_ERR(0, 6401, __pyx_L1_error)
42293  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1, "a", 0))) __PYX_ERR(0, 6402, __pyx_L1_error)
42294  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_w), __pyx_ptype_5numpy_ndarray, 1, "grad_w", 0))) __PYX_ERR(0, 6403, __pyx_L1_error)
42295  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dS), __pyx_ptype_5numpy_ndarray, 1, "dS", 0))) __PYX_ERR(0, 6404, __pyx_L1_error)
42296  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_jac), __pyx_ptype_5numpy_ndarray, 1, "jac", 0))) __PYX_ERR(0, 6405, __pyx_L1_error)
42297  __pyx_r = __pyx_pf_13cfemIntegrals_362updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense_sd(__pyx_self, __pyx_v_rowptr, __pyx_v_colind, __pyx_v_offset_r, __pyx_v_stride_r, __pyx_v_offset_u, __pyx_v_stride_u, __pyx_v_nFreeVDOF_global, __pyx_v_exteriorElementBoundaries, __pyx_v_elementBoundaryElements, __pyx_v_elementBoundaryLocalElementBoundaries, __pyx_v_nFreeDOF_element_r, __pyx_v_freeLocal_r, __pyx_v_freeGlobal_r, __pyx_v_nFreeDOF_element_u, __pyx_v_freeLocal_u, __pyx_v_freeGlobal_u, __pyx_v_isDOFBoundary, __pyx_v_sigma, __pyx_v_v, __pyx_v_n, __pyx_v_a, __pyx_v_grad_w, __pyx_v_dS, __pyx_v_jac);
42298 
42299  /* function exit code */
42300  goto __pyx_L0;
42301  __pyx_L1_error:;
42302  __pyx_r = NULL;
42303  __pyx_L0:;
42304  __Pyx_RefNannyFinishContext();
42305  return __pyx_r;
42306 }
42307 
42308 static PyObject *__pyx_pf_13cfemIntegrals_362updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, int __pyx_v_offset_r, int __pyx_v_stride_r, int __pyx_v_offset_u, int __pyx_v_stride_u, int __pyx_v_nFreeVDOF_global, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_nFreeDOF_element_r, PyArrayObject *__pyx_v_freeLocal_r, PyArrayObject *__pyx_v_freeGlobal_r, PyArrayObject *__pyx_v_nFreeDOF_element_u, PyArrayObject *__pyx_v_freeLocal_u, PyArrayObject *__pyx_v_freeGlobal_u, PyArrayObject *__pyx_v_isDOFBoundary, double __pyx_v_sigma, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_n, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_grad_w, PyArrayObject *__pyx_v_dS, PyArrayObject *__pyx_v_jac) {
42309  int __pyx_v_nExteriorElementBoundaries_global;
42310  int __pyx_v_nQuadraturePoints_elementBoundary;
42311  int __pyx_v_nDOF_test_element;
42312  int __pyx_v_nDOF_trial_element;
42313  int __pyx_v_nSpace;
42314  PyObject *__pyx_r = NULL;
42315  __Pyx_RefNannyDeclarations
42316  __Pyx_RefNannySetupContext("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense_sd", 0);
42317 
42318  /* "cfemIntegrals.pyx":6406
42319  * np.ndarray dS,
42320  * np.ndarray jac):
42321  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundaries.shape[0] # <<<<<<<<<<<<<<
42322  * cdef int nQuadraturePoints_elementBoundary = grad_w.shape[1]
42323  * cdef int nDOF_test_element = grad_w.shape[2]
42324  */
42325  __pyx_v_nExteriorElementBoundaries_global = (__pyx_v_exteriorElementBoundaries->dimensions[0]);
42326 
42327  /* "cfemIntegrals.pyx":6407
42328  * np.ndarray jac):
42329  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundaries.shape[0]
42330  * cdef int nQuadraturePoints_elementBoundary = grad_w.shape[1] # <<<<<<<<<<<<<<
42331  * cdef int nDOF_test_element = grad_w.shape[2]
42332  * cdef int nDOF_trial_element = v.shape[2]
42333  */
42334  __pyx_v_nQuadraturePoints_elementBoundary = (__pyx_v_grad_w->dimensions[1]);
42335 
42336  /* "cfemIntegrals.pyx":6408
42337  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundaries.shape[0]
42338  * cdef int nQuadraturePoints_elementBoundary = grad_w.shape[1]
42339  * cdef int nDOF_test_element = grad_w.shape[2] # <<<<<<<<<<<<<<
42340  * cdef int nDOF_trial_element = v.shape[2]
42341  * cdef int nSpace = n.shape[2]
42342  */
42343  __pyx_v_nDOF_test_element = (__pyx_v_grad_w->dimensions[2]);
42344 
42345  /* "cfemIntegrals.pyx":6409
42346  * cdef int nQuadraturePoints_elementBoundary = grad_w.shape[1]
42347  * cdef int nDOF_test_element = grad_w.shape[2]
42348  * cdef int nDOF_trial_element = v.shape[2] # <<<<<<<<<<<<<<
42349  * cdef int nSpace = n.shape[2]
42350  * cupdateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense_sd(nExteriorElementBoundaries_global,
42351  */
42352  __pyx_v_nDOF_trial_element = (__pyx_v_v->dimensions[2]);
42353 
42354  /* "cfemIntegrals.pyx":6410
42355  * cdef int nDOF_test_element = grad_w.shape[2]
42356  * cdef int nDOF_trial_element = v.shape[2]
42357  * cdef int nSpace = n.shape[2] # <<<<<<<<<<<<<<
42358  * cupdateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense_sd(nExteriorElementBoundaries_global,
42359  * nQuadraturePoints_elementBoundary,
42360  */
42361  __pyx_v_nSpace = (__pyx_v_n->dimensions[2]);
42362 
42363  /* "cfemIntegrals.pyx":6411
42364  * cdef int nDOF_trial_element = v.shape[2]
42365  * cdef int nSpace = n.shape[2]
42366  * cupdateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense_sd(nExteriorElementBoundaries_global, # <<<<<<<<<<<<<<
42367  * nQuadraturePoints_elementBoundary,
42368  * nDOF_test_element,
42369  */
42370  updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense_sd(__pyx_v_nExteriorElementBoundaries_global, __pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nDOF_test_element, __pyx_v_nDOF_trial_element, __pyx_v_nSpace, ((int *)__pyx_v_rowptr->data), ((int *)__pyx_v_colind->data), __pyx_v_offset_r, __pyx_v_stride_r, __pyx_v_offset_u, __pyx_v_stride_u, __pyx_v_nFreeVDOF_global, ((int *)__pyx_v_exteriorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), ((int *)__pyx_v_nFreeDOF_element_r->data), ((int *)__pyx_v_freeLocal_r->data), ((int *)__pyx_v_freeGlobal_r->data), ((int *)__pyx_v_nFreeDOF_element_u->data), ((int *)__pyx_v_freeLocal_u->data), ((int *)__pyx_v_freeGlobal_u->data), ((int *)__pyx_v_isDOFBoundary->data), __pyx_v_sigma, ((double *)__pyx_v_v->data), ((double *)__pyx_v_n->data), ((double *)__pyx_v_a->data), ((double *)__pyx_v_grad_w->data), ((double *)__pyx_v_dS->data), ((double *)__pyx_v_jac->data));
42371 
42372  /* "cfemIntegrals.pyx":6382
42373  * <double*> dS.data,
42374  * <double*> jac.data)
42375  * def updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
42376  * np.ndarray colind,
42377  * int offset_r,
42378  */
42379 
42380  /* function exit code */
42381  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
42382  __Pyx_XGIVEREF(__pyx_r);
42383  __Pyx_RefNannyFinishContext();
42384  return __pyx_r;
42385 }
42386 
42387 /* "cfemIntegrals.pyx":6440
42388  * <double*> dS.data,
42389  * <double*> jac.data)
42390  * def updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_CSR_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
42391  * np.ndarray colind,
42392  * int offset_r,
42393  */
42394 
42395 /* Python wrapper */
42396 static PyObject *__pyx_pw_13cfemIntegrals_365updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_CSR_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
42397 static PyMethodDef __pyx_mdef_13cfemIntegrals_365updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_CSR_sd = {"updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_CSR_sd", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_365updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_CSR_sd, METH_VARARGS|METH_KEYWORDS, 0};
42398 static PyObject *__pyx_pw_13cfemIntegrals_365updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_CSR_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
42399  PyArrayObject *__pyx_v_rowptr = 0;
42400  PyArrayObject *__pyx_v_colind = 0;
42401  int __pyx_v_offset_r;
42402  int __pyx_v_stride_r;
42403  int __pyx_v_offset_u;
42404  int __pyx_v_stride_u;
42405  int __pyx_v_nFreeVDOF_global;
42406  PyArrayObject *__pyx_v_interiorElementBoundaries = 0;
42407  PyArrayObject *__pyx_v_elementBoundaryElements = 0;
42408  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries = 0;
42409  PyArrayObject *__pyx_v_nFreeDOF_element_r = 0;
42410  PyArrayObject *__pyx_v_freeLocal_r = 0;
42411  PyArrayObject *__pyx_v_freeGlobal_r = 0;
42412  PyArrayObject *__pyx_v_nFreeDOF_element_u = 0;
42413  PyArrayObject *__pyx_v_freeLocal_u = 0;
42414  PyArrayObject *__pyx_v_freeGlobal_u = 0;
42415  PyArrayObject *__pyx_v_csrRowIndeces_ru = 0;
42416  PyArrayObject *__pyx_v_csrColumnOffsets_eb_ru = 0;
42417  double __pyx_v_sigma;
42418  PyArrayObject *__pyx_v_v = 0;
42419  PyArrayObject *__pyx_v_n = 0;
42420  PyArrayObject *__pyx_v_a = 0;
42421  PyArrayObject *__pyx_v_grad_w = 0;
42422  PyArrayObject *__pyx_v_dS = 0;
42423  PyObject *__pyx_v_jac = 0;
42424  int __pyx_lineno = 0;
42425  const char *__pyx_filename = NULL;
42426  int __pyx_clineno = 0;
42427  PyObject *__pyx_r = 0;
42428  __Pyx_RefNannyDeclarations
42429  __Pyx_RefNannySetupContext("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_CSR_sd (wrapper)", 0);
42430  {
42431  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rowptr,&__pyx_n_s_colind,&__pyx_n_s_offset_r,&__pyx_n_s_stride_r,&__pyx_n_s_offset_u,&__pyx_n_s_stride_u,&__pyx_n_s_nFreeVDOF_global,&__pyx_n_s_interiorElementBoundaries,&__pyx_n_s_elementBoundaryElements,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_nFreeDOF_element_r,&__pyx_n_s_freeLocal_r,&__pyx_n_s_freeGlobal_r,&__pyx_n_s_nFreeDOF_element_u,&__pyx_n_s_freeLocal_u,&__pyx_n_s_freeGlobal_u,&__pyx_n_s_csrRowIndeces_ru,&__pyx_n_s_csrColumnOffsets_eb_ru,&__pyx_n_s_sigma,&__pyx_n_s_v,&__pyx_n_s_n,&__pyx_n_s_a,&__pyx_n_s_grad_w,&__pyx_n_s_dS,&__pyx_n_s_jac,0};
42432  PyObject* values[25] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
42433  if (unlikely(__pyx_kwds)) {
42434  Py_ssize_t kw_args;
42435  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
42436  switch (pos_args) {
42437  case 25: values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
42438  CYTHON_FALLTHROUGH;
42439  case 24: values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
42440  CYTHON_FALLTHROUGH;
42441  case 23: values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
42442  CYTHON_FALLTHROUGH;
42443  case 22: values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
42444  CYTHON_FALLTHROUGH;
42445  case 21: values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
42446  CYTHON_FALLTHROUGH;
42447  case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
42448  CYTHON_FALLTHROUGH;
42449  case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
42450  CYTHON_FALLTHROUGH;
42451  case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
42452  CYTHON_FALLTHROUGH;
42453  case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
42454  CYTHON_FALLTHROUGH;
42455  case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
42456  CYTHON_FALLTHROUGH;
42457  case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
42458  CYTHON_FALLTHROUGH;
42459  case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
42460  CYTHON_FALLTHROUGH;
42461  case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
42462  CYTHON_FALLTHROUGH;
42463  case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
42464  CYTHON_FALLTHROUGH;
42465  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
42466  CYTHON_FALLTHROUGH;
42467  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
42468  CYTHON_FALLTHROUGH;
42469  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
42470  CYTHON_FALLTHROUGH;
42471  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
42472  CYTHON_FALLTHROUGH;
42473  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
42474  CYTHON_FALLTHROUGH;
42475  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
42476  CYTHON_FALLTHROUGH;
42477  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
42478  CYTHON_FALLTHROUGH;
42479  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
42480  CYTHON_FALLTHROUGH;
42481  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
42482  CYTHON_FALLTHROUGH;
42483  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
42484  CYTHON_FALLTHROUGH;
42485  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
42486  CYTHON_FALLTHROUGH;
42487  case 0: break;
42488  default: goto __pyx_L5_argtuple_error;
42489  }
42490  kw_args = PyDict_Size(__pyx_kwds);
42491  switch (pos_args) {
42492  case 0:
42493  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rowptr)) != 0)) kw_args--;
42494  else goto __pyx_L5_argtuple_error;
42495  CYTHON_FALLTHROUGH;
42496  case 1:
42497  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_colind)) != 0)) kw_args--;
42498  else {
42499  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_CSR_sd", 1, 25, 25, 1); __PYX_ERR(0, 6440, __pyx_L3_error)
42500  }
42501  CYTHON_FALLTHROUGH;
42502  case 2:
42503  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset_r)) != 0)) kw_args--;
42504  else {
42505  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_CSR_sd", 1, 25, 25, 2); __PYX_ERR(0, 6440, __pyx_L3_error)
42506  }
42507  CYTHON_FALLTHROUGH;
42508  case 3:
42509  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stride_r)) != 0)) kw_args--;
42510  else {
42511  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_CSR_sd", 1, 25, 25, 3); __PYX_ERR(0, 6440, __pyx_L3_error)
42512  }
42513  CYTHON_FALLTHROUGH;
42514  case 4:
42515  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset_u)) != 0)) kw_args--;
42516  else {
42517  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_CSR_sd", 1, 25, 25, 4); __PYX_ERR(0, 6440, __pyx_L3_error)
42518  }
42519  CYTHON_FALLTHROUGH;
42520  case 5:
42521  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stride_u)) != 0)) kw_args--;
42522  else {
42523  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_CSR_sd", 1, 25, 25, 5); __PYX_ERR(0, 6440, __pyx_L3_error)
42524  }
42525  CYTHON_FALLTHROUGH;
42526  case 6:
42527  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeVDOF_global)) != 0)) kw_args--;
42528  else {
42529  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_CSR_sd", 1, 25, 25, 6); __PYX_ERR(0, 6440, __pyx_L3_error)
42530  }
42531  CYTHON_FALLTHROUGH;
42532  case 7:
42533  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_interiorElementBoundaries)) != 0)) kw_args--;
42534  else {
42535  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_CSR_sd", 1, 25, 25, 7); __PYX_ERR(0, 6440, __pyx_L3_error)
42536  }
42537  CYTHON_FALLTHROUGH;
42538  case 8:
42539  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElements)) != 0)) kw_args--;
42540  else {
42541  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_CSR_sd", 1, 25, 25, 8); __PYX_ERR(0, 6440, __pyx_L3_error)
42542  }
42543  CYTHON_FALLTHROUGH;
42544  case 9:
42545  if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
42546  else {
42547  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_CSR_sd", 1, 25, 25, 9); __PYX_ERR(0, 6440, __pyx_L3_error)
42548  }
42549  CYTHON_FALLTHROUGH;
42550  case 10:
42551  if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeDOF_element_r)) != 0)) kw_args--;
42552  else {
42553  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_CSR_sd", 1, 25, 25, 10); __PYX_ERR(0, 6440, __pyx_L3_error)
42554  }
42555  CYTHON_FALLTHROUGH;
42556  case 11:
42557  if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeLocal_r)) != 0)) kw_args--;
42558  else {
42559  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_CSR_sd", 1, 25, 25, 11); __PYX_ERR(0, 6440, __pyx_L3_error)
42560  }
42561  CYTHON_FALLTHROUGH;
42562  case 12:
42563  if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeGlobal_r)) != 0)) kw_args--;
42564  else {
42565  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_CSR_sd", 1, 25, 25, 12); __PYX_ERR(0, 6440, __pyx_L3_error)
42566  }
42567  CYTHON_FALLTHROUGH;
42568  case 13:
42569  if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeDOF_element_u)) != 0)) kw_args--;
42570  else {
42571  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_CSR_sd", 1, 25, 25, 13); __PYX_ERR(0, 6440, __pyx_L3_error)
42572  }
42573  CYTHON_FALLTHROUGH;
42574  case 14:
42575  if (likely((values[14] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeLocal_u)) != 0)) kw_args--;
42576  else {
42577  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_CSR_sd", 1, 25, 25, 14); __PYX_ERR(0, 6440, __pyx_L3_error)
42578  }
42579  CYTHON_FALLTHROUGH;
42580  case 15:
42581  if (likely((values[15] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeGlobal_u)) != 0)) kw_args--;
42582  else {
42583  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_CSR_sd", 1, 25, 25, 15); __PYX_ERR(0, 6440, __pyx_L3_error)
42584  }
42585  CYTHON_FALLTHROUGH;
42586  case 16:
42587  if (likely((values[16] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_csrRowIndeces_ru)) != 0)) kw_args--;
42588  else {
42589  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_CSR_sd", 1, 25, 25, 16); __PYX_ERR(0, 6440, __pyx_L3_error)
42590  }
42591  CYTHON_FALLTHROUGH;
42592  case 17:
42593  if (likely((values[17] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_csrColumnOffsets_eb_ru)) != 0)) kw_args--;
42594  else {
42595  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_CSR_sd", 1, 25, 25, 17); __PYX_ERR(0, 6440, __pyx_L3_error)
42596  }
42597  CYTHON_FALLTHROUGH;
42598  case 18:
42599  if (likely((values[18] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sigma)) != 0)) kw_args--;
42600  else {
42601  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_CSR_sd", 1, 25, 25, 18); __PYX_ERR(0, 6440, __pyx_L3_error)
42602  }
42603  CYTHON_FALLTHROUGH;
42604  case 19:
42605  if (likely((values[19] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
42606  else {
42607  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_CSR_sd", 1, 25, 25, 19); __PYX_ERR(0, 6440, __pyx_L3_error)
42608  }
42609  CYTHON_FALLTHROUGH;
42610  case 20:
42611  if (likely((values[20] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n)) != 0)) kw_args--;
42612  else {
42613  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_CSR_sd", 1, 25, 25, 20); __PYX_ERR(0, 6440, __pyx_L3_error)
42614  }
42615  CYTHON_FALLTHROUGH;
42616  case 21:
42617  if (likely((values[21] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
42618  else {
42619  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_CSR_sd", 1, 25, 25, 21); __PYX_ERR(0, 6440, __pyx_L3_error)
42620  }
42621  CYTHON_FALLTHROUGH;
42622  case 22:
42623  if (likely((values[22] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_w)) != 0)) kw_args--;
42624  else {
42625  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_CSR_sd", 1, 25, 25, 22); __PYX_ERR(0, 6440, __pyx_L3_error)
42626  }
42627  CYTHON_FALLTHROUGH;
42628  case 23:
42629  if (likely((values[23] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dS)) != 0)) kw_args--;
42630  else {
42631  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_CSR_sd", 1, 25, 25, 23); __PYX_ERR(0, 6440, __pyx_L3_error)
42632  }
42633  CYTHON_FALLTHROUGH;
42634  case 24:
42635  if (likely((values[24] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jac)) != 0)) kw_args--;
42636  else {
42637  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_CSR_sd", 1, 25, 25, 24); __PYX_ERR(0, 6440, __pyx_L3_error)
42638  }
42639  }
42640  if (unlikely(kw_args > 0)) {
42641  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_CSR_sd") < 0)) __PYX_ERR(0, 6440, __pyx_L3_error)
42642  }
42643  } else if (PyTuple_GET_SIZE(__pyx_args) != 25) {
42644  goto __pyx_L5_argtuple_error;
42645  } else {
42646  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
42647  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
42648  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
42649  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
42650  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
42651  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
42652  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
42653  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
42654  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
42655  values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
42656  values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
42657  values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
42658  values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
42659  values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
42660  values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
42661  values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
42662  values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
42663  values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
42664  values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
42665  values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
42666  values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
42667  values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
42668  values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
42669  values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
42670  values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
42671  }
42672  __pyx_v_rowptr = ((PyArrayObject *)values[0]);
42673  __pyx_v_colind = ((PyArrayObject *)values[1]);
42674  __pyx_v_offset_r = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_offset_r == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6442, __pyx_L3_error)
42675  __pyx_v_stride_r = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_stride_r == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6443, __pyx_L3_error)
42676  __pyx_v_offset_u = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_offset_u == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6444, __pyx_L3_error)
42677  __pyx_v_stride_u = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_stride_u == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6445, __pyx_L3_error)
42678  __pyx_v_nFreeVDOF_global = __Pyx_PyInt_As_int(values[6]); if (unlikely((__pyx_v_nFreeVDOF_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6446, __pyx_L3_error)
42679  __pyx_v_interiorElementBoundaries = ((PyArrayObject *)values[7]);
42680  __pyx_v_elementBoundaryElements = ((PyArrayObject *)values[8]);
42681  __pyx_v_elementBoundaryLocalElementBoundaries = ((PyArrayObject *)values[9]);
42682  __pyx_v_nFreeDOF_element_r = ((PyArrayObject *)values[10]);
42683  __pyx_v_freeLocal_r = ((PyArrayObject *)values[11]);
42684  __pyx_v_freeGlobal_r = ((PyArrayObject *)values[12]);
42685  __pyx_v_nFreeDOF_element_u = ((PyArrayObject *)values[13]);
42686  __pyx_v_freeLocal_u = ((PyArrayObject *)values[14]);
42687  __pyx_v_freeGlobal_u = ((PyArrayObject *)values[15]);
42688  __pyx_v_csrRowIndeces_ru = ((PyArrayObject *)values[16]);
42689  __pyx_v_csrColumnOffsets_eb_ru = ((PyArrayObject *)values[17]);
42690  __pyx_v_sigma = __pyx_PyFloat_AsDouble(values[18]); if (unlikely((__pyx_v_sigma == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 6458, __pyx_L3_error)
42691  __pyx_v_v = ((PyArrayObject *)values[19]);
42692  __pyx_v_n = ((PyArrayObject *)values[20]);
42693  __pyx_v_a = ((PyArrayObject *)values[21]);
42694  __pyx_v_grad_w = ((PyArrayObject *)values[22]);
42695  __pyx_v_dS = ((PyArrayObject *)values[23]);
42696  __pyx_v_jac = values[24];
42697  }
42698  goto __pyx_L4_argument_unpacking_done;
42699  __pyx_L5_argtuple_error:;
42700  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_CSR_sd", 1, 25, 25, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6440, __pyx_L3_error)
42701  __pyx_L3_error:;
42702  __Pyx_AddTraceback("cfemIntegrals.updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_CSR_sd", __pyx_clineno, __pyx_lineno, __pyx_filename);
42703  __Pyx_RefNannyFinishContext();
42704  return NULL;
42705  __pyx_L4_argument_unpacking_done:;
42706  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rowptr), __pyx_ptype_5numpy_ndarray, 1, "rowptr", 0))) __PYX_ERR(0, 6440, __pyx_L1_error)
42707  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_colind), __pyx_ptype_5numpy_ndarray, 1, "colind", 0))) __PYX_ERR(0, 6441, __pyx_L1_error)
42708  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_interiorElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "interiorElementBoundaries", 0))) __PYX_ERR(0, 6447, __pyx_L1_error)
42709  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElements), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElements", 0))) __PYX_ERR(0, 6448, __pyx_L1_error)
42710  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundaries", 0))) __PYX_ERR(0, 6449, __pyx_L1_error)
42711  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nFreeDOF_element_r), __pyx_ptype_5numpy_ndarray, 1, "nFreeDOF_element_r", 0))) __PYX_ERR(0, 6450, __pyx_L1_error)
42712  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeLocal_r), __pyx_ptype_5numpy_ndarray, 1, "freeLocal_r", 0))) __PYX_ERR(0, 6451, __pyx_L1_error)
42713  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeGlobal_r), __pyx_ptype_5numpy_ndarray, 1, "freeGlobal_r", 0))) __PYX_ERR(0, 6452, __pyx_L1_error)
42714  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nFreeDOF_element_u), __pyx_ptype_5numpy_ndarray, 1, "nFreeDOF_element_u", 0))) __PYX_ERR(0, 6453, __pyx_L1_error)
42715  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeLocal_u), __pyx_ptype_5numpy_ndarray, 1, "freeLocal_u", 0))) __PYX_ERR(0, 6454, __pyx_L1_error)
42716  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeGlobal_u), __pyx_ptype_5numpy_ndarray, 1, "freeGlobal_u", 0))) __PYX_ERR(0, 6455, __pyx_L1_error)
42717  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_csrRowIndeces_ru), __pyx_ptype_5numpy_ndarray, 1, "csrRowIndeces_ru", 0))) __PYX_ERR(0, 6456, __pyx_L1_error)
42718  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_csrColumnOffsets_eb_ru), __pyx_ptype_5numpy_ndarray, 1, "csrColumnOffsets_eb_ru", 0))) __PYX_ERR(0, 6457, __pyx_L1_error)
42719  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), __pyx_ptype_5numpy_ndarray, 1, "v", 0))) __PYX_ERR(0, 6459, __pyx_L1_error)
42720  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_n), __pyx_ptype_5numpy_ndarray, 1, "n", 0))) __PYX_ERR(0, 6460, __pyx_L1_error)
42721  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1, "a", 0))) __PYX_ERR(0, 6461, __pyx_L1_error)
42722  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_w), __pyx_ptype_5numpy_ndarray, 1, "grad_w", 0))) __PYX_ERR(0, 6462, __pyx_L1_error)
42723  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dS), __pyx_ptype_5numpy_ndarray, 1, "dS", 0))) __PYX_ERR(0, 6463, __pyx_L1_error)
42724  __pyx_r = __pyx_pf_13cfemIntegrals_364updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_CSR_sd(__pyx_self, __pyx_v_rowptr, __pyx_v_colind, __pyx_v_offset_r, __pyx_v_stride_r, __pyx_v_offset_u, __pyx_v_stride_u, __pyx_v_nFreeVDOF_global, __pyx_v_interiorElementBoundaries, __pyx_v_elementBoundaryElements, __pyx_v_elementBoundaryLocalElementBoundaries, __pyx_v_nFreeDOF_element_r, __pyx_v_freeLocal_r, __pyx_v_freeGlobal_r, __pyx_v_nFreeDOF_element_u, __pyx_v_freeLocal_u, __pyx_v_freeGlobal_u, __pyx_v_csrRowIndeces_ru, __pyx_v_csrColumnOffsets_eb_ru, __pyx_v_sigma, __pyx_v_v, __pyx_v_n, __pyx_v_a, __pyx_v_grad_w, __pyx_v_dS, __pyx_v_jac);
42725 
42726  /* function exit code */
42727  goto __pyx_L0;
42728  __pyx_L1_error:;
42729  __pyx_r = NULL;
42730  __pyx_L0:;
42731  __Pyx_RefNannyFinishContext();
42732  return __pyx_r;
42733 }
42734 
42735 static PyObject *__pyx_pf_13cfemIntegrals_364updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_CSR_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, int __pyx_v_offset_r, int __pyx_v_stride_r, int __pyx_v_offset_u, int __pyx_v_stride_u, int __pyx_v_nFreeVDOF_global, PyArrayObject *__pyx_v_interiorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_nFreeDOF_element_r, PyArrayObject *__pyx_v_freeLocal_r, PyArrayObject *__pyx_v_freeGlobal_r, PyArrayObject *__pyx_v_nFreeDOF_element_u, PyArrayObject *__pyx_v_freeLocal_u, PyArrayObject *__pyx_v_freeGlobal_u, PyArrayObject *__pyx_v_csrRowIndeces_ru, PyArrayObject *__pyx_v_csrColumnOffsets_eb_ru, double __pyx_v_sigma, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_n, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_grad_w, PyArrayObject *__pyx_v_dS, PyObject *__pyx_v_jac) {
42736  CYTHON_UNUSED PyArrayObject *__pyx_v_rowptr_dummy = 0;
42737  CYTHON_UNUSED PyArrayObject *__pyx_v_colind_dummy = 0;
42738  PyArrayObject *__pyx_v_jac_array = 0;
42739  int __pyx_v_nInteriorElementBoundaries_global;
42740  int __pyx_v_nElementBoundaries_element;
42741  int __pyx_v_nQuadraturePoints_elementBoundary;
42742  int __pyx_v_nDOF_test_element;
42743  int __pyx_v_nDOF_trial_element;
42744  int __pyx_v_nSpace;
42745  PyObject *__pyx_r = NULL;
42746  __Pyx_RefNannyDeclarations
42747  PyObject *__pyx_t_1 = NULL;
42748  PyObject *__pyx_t_2 = NULL;
42749  PyObject *__pyx_t_3 = NULL;
42750  PyObject *__pyx_t_4 = NULL;
42751  PyObject *__pyx_t_5 = NULL;
42752  PyObject *(*__pyx_t_6)(PyObject *);
42753  int __pyx_lineno = 0;
42754  const char *__pyx_filename = NULL;
42755  int __pyx_clineno = 0;
42756  __Pyx_RefNannySetupContext("updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_CSR_sd", 0);
42757 
42758  /* "cfemIntegrals.pyx":6466
42759  * jac):
42760  * cdef np.ndarray rowptr_dummy, colind_dummy, jac_array
42761  * (rowptr_dummy,colind_dummy,jac_array) = jac.getCSRrepresentation() # <<<<<<<<<<<<<<
42762  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0]
42763  * cdef int nElementBoundaries_element = grad_w.shape[1]
42764  */
42765  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_jac, __pyx_n_s_getCSRrepresentation); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6466, __pyx_L1_error)
42766  __Pyx_GOTREF(__pyx_t_2);
42767  __pyx_t_3 = NULL;
42768  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
42769  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
42770  if (likely(__pyx_t_3)) {
42771  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
42772  __Pyx_INCREF(__pyx_t_3);
42773  __Pyx_INCREF(function);
42774  __Pyx_DECREF_SET(__pyx_t_2, function);
42775  }
42776  }
42777  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
42778  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
42779  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6466, __pyx_L1_error)
42780  __Pyx_GOTREF(__pyx_t_1);
42781  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
42782  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
42783  PyObject* sequence = __pyx_t_1;
42784  Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
42785  if (unlikely(size != 3)) {
42786  if (size > 3) __Pyx_RaiseTooManyValuesError(3);
42787  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
42788  __PYX_ERR(0, 6466, __pyx_L1_error)
42789  }
42790  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
42791  if (likely(PyTuple_CheckExact(sequence))) {
42792  __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
42793  __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1);
42794  __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2);
42795  } else {
42796  __pyx_t_2 = PyList_GET_ITEM(sequence, 0);
42797  __pyx_t_3 = PyList_GET_ITEM(sequence, 1);
42798  __pyx_t_4 = PyList_GET_ITEM(sequence, 2);
42799  }
42800  __Pyx_INCREF(__pyx_t_2);
42801  __Pyx_INCREF(__pyx_t_3);
42802  __Pyx_INCREF(__pyx_t_4);
42803  #else
42804  __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6466, __pyx_L1_error)
42805  __Pyx_GOTREF(__pyx_t_2);
42806  __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6466, __pyx_L1_error)
42807  __Pyx_GOTREF(__pyx_t_3);
42808  __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6466, __pyx_L1_error)
42809  __Pyx_GOTREF(__pyx_t_4);
42810  #endif
42811  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
42812  } else {
42813  Py_ssize_t index = -1;
42814  __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6466, __pyx_L1_error)
42815  __Pyx_GOTREF(__pyx_t_5);
42816  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
42817  __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext;
42818  index = 0; __pyx_t_2 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
42819  __Pyx_GOTREF(__pyx_t_2);
42820  index = 1; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
42821  __Pyx_GOTREF(__pyx_t_3);
42822  index = 2; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed;
42823  __Pyx_GOTREF(__pyx_t_4);
42824  if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 3) < 0) __PYX_ERR(0, 6466, __pyx_L1_error)
42825  __pyx_t_6 = NULL;
42826  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
42827  goto __pyx_L4_unpacking_done;
42828  __pyx_L3_unpacking_failed:;
42829  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
42830  __pyx_t_6 = NULL;
42831  if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
42832  __PYX_ERR(0, 6466, __pyx_L1_error)
42833  __pyx_L4_unpacking_done:;
42834  }
42835  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 6466, __pyx_L1_error)
42836  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 6466, __pyx_L1_error)
42837  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 6466, __pyx_L1_error)
42838  __pyx_v_rowptr_dummy = ((PyArrayObject *)__pyx_t_2);
42839  __pyx_t_2 = 0;
42840  __pyx_v_colind_dummy = ((PyArrayObject *)__pyx_t_3);
42841  __pyx_t_3 = 0;
42842  __pyx_v_jac_array = ((PyArrayObject *)__pyx_t_4);
42843  __pyx_t_4 = 0;
42844 
42845  /* "cfemIntegrals.pyx":6467
42846  * cdef np.ndarray rowptr_dummy, colind_dummy, jac_array
42847  * (rowptr_dummy,colind_dummy,jac_array) = jac.getCSRrepresentation()
42848  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0] # <<<<<<<<<<<<<<
42849  * cdef int nElementBoundaries_element = grad_w.shape[1]
42850  * cdef int nQuadraturePoints_elementBoundary = grad_w.shape[2]
42851  */
42852  __pyx_v_nInteriorElementBoundaries_global = (__pyx_v_interiorElementBoundaries->dimensions[0]);
42853 
42854  /* "cfemIntegrals.pyx":6468
42855  * (rowptr_dummy,colind_dummy,jac_array) = jac.getCSRrepresentation()
42856  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0]
42857  * cdef int nElementBoundaries_element = grad_w.shape[1] # <<<<<<<<<<<<<<
42858  * cdef int nQuadraturePoints_elementBoundary = grad_w.shape[2]
42859  * cdef int nDOF_test_element = grad_w.shape[3]
42860  */
42861  __pyx_v_nElementBoundaries_element = (__pyx_v_grad_w->dimensions[1]);
42862 
42863  /* "cfemIntegrals.pyx":6469
42864  * cdef int nInteriorElementBoundaries_global = interiorElementBoundaries.shape[0]
42865  * cdef int nElementBoundaries_element = grad_w.shape[1]
42866  * cdef int nQuadraturePoints_elementBoundary = grad_w.shape[2] # <<<<<<<<<<<<<<
42867  * cdef int nDOF_test_element = grad_w.shape[3]
42868  * cdef int nDOF_trial_element = v.shape[3]
42869  */
42870  __pyx_v_nQuadraturePoints_elementBoundary = (__pyx_v_grad_w->dimensions[2]);
42871 
42872  /* "cfemIntegrals.pyx":6470
42873  * cdef int nElementBoundaries_element = grad_w.shape[1]
42874  * cdef int nQuadraturePoints_elementBoundary = grad_w.shape[2]
42875  * cdef int nDOF_test_element = grad_w.shape[3] # <<<<<<<<<<<<<<
42876  * cdef int nDOF_trial_element = v.shape[3]
42877  * cdef int nSpace = n.shape[3]
42878  */
42879  __pyx_v_nDOF_test_element = (__pyx_v_grad_w->dimensions[3]);
42880 
42881  /* "cfemIntegrals.pyx":6471
42882  * cdef int nQuadraturePoints_elementBoundary = grad_w.shape[2]
42883  * cdef int nDOF_test_element = grad_w.shape[3]
42884  * cdef int nDOF_trial_element = v.shape[3] # <<<<<<<<<<<<<<
42885  * cdef int nSpace = n.shape[3]
42886  * cupdateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_CSR_sd(nInteriorElementBoundaries_global,
42887  */
42888  __pyx_v_nDOF_trial_element = (__pyx_v_v->dimensions[3]);
42889 
42890  /* "cfemIntegrals.pyx":6472
42891  * cdef int nDOF_test_element = grad_w.shape[3]
42892  * cdef int nDOF_trial_element = v.shape[3]
42893  * cdef int nSpace = n.shape[3] # <<<<<<<<<<<<<<
42894  * cupdateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_CSR_sd(nInteriorElementBoundaries_global,
42895  * nElementBoundaries_element,
42896  */
42897  __pyx_v_nSpace = (__pyx_v_n->dimensions[3]);
42898 
42899  /* "cfemIntegrals.pyx":6473
42900  * cdef int nDOF_trial_element = v.shape[3]
42901  * cdef int nSpace = n.shape[3]
42902  * cupdateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_CSR_sd(nInteriorElementBoundaries_global, # <<<<<<<<<<<<<<
42903  * nElementBoundaries_element,
42904  * nQuadraturePoints_elementBoundary,
42905  */
42906  updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_CSR_sd(__pyx_v_nInteriorElementBoundaries_global, __pyx_v_nElementBoundaries_element, __pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nDOF_test_element, __pyx_v_nDOF_trial_element, __pyx_v_nSpace, ((int *)__pyx_v_rowptr->data), ((int *)__pyx_v_colind->data), __pyx_v_offset_r, __pyx_v_stride_r, __pyx_v_offset_u, __pyx_v_stride_u, __pyx_v_nFreeVDOF_global, ((int *)__pyx_v_interiorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), ((int *)__pyx_v_nFreeDOF_element_r->data), ((int *)__pyx_v_freeLocal_r->data), ((int *)__pyx_v_freeGlobal_r->data), ((int *)__pyx_v_nFreeDOF_element_u->data), ((int *)__pyx_v_freeLocal_u->data), ((int *)__pyx_v_freeGlobal_u->data), ((int *)__pyx_v_csrRowIndeces_ru->data), ((int *)__pyx_v_csrColumnOffsets_eb_ru->data), __pyx_v_sigma, ((double *)__pyx_v_v->data), ((double *)__pyx_v_n->data), ((double *)__pyx_v_a->data), ((double *)__pyx_v_grad_w->data), ((double *)__pyx_v_dS->data), ((double *)__pyx_v_jac_array->data));
42907 
42908  /* "cfemIntegrals.pyx":6440
42909  * <double*> dS.data,
42910  * <double*> jac.data)
42911  * def updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_CSR_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
42912  * np.ndarray colind,
42913  * int offset_r,
42914  */
42915 
42916  /* function exit code */
42917  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
42918  goto __pyx_L0;
42919  __pyx_L1_error:;
42920  __Pyx_XDECREF(__pyx_t_1);
42921  __Pyx_XDECREF(__pyx_t_2);
42922  __Pyx_XDECREF(__pyx_t_3);
42923  __Pyx_XDECREF(__pyx_t_4);
42924  __Pyx_XDECREF(__pyx_t_5);
42925  __Pyx_AddTraceback("cfemIntegrals.updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_CSR_sd", __pyx_clineno, __pyx_lineno, __pyx_filename);
42926  __pyx_r = NULL;
42927  __pyx_L0:;
42928  __Pyx_XDECREF((PyObject *)__pyx_v_rowptr_dummy);
42929  __Pyx_XDECREF((PyObject *)__pyx_v_colind_dummy);
42930  __Pyx_XDECREF((PyObject *)__pyx_v_jac_array);
42931  __Pyx_XGIVEREF(__pyx_r);
42932  __Pyx_RefNannyFinishContext();
42933  return __pyx_r;
42934 }
42935 
42936 /* "cfemIntegrals.pyx":6504
42937  * <double*> dS.data,
42938  * <double*> jac_array.data)
42939  * def updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_CSR_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
42940  * np.ndarray colind,
42941  * int offset_r,
42942  */
42943 
42944 /* Python wrapper */
42945 static PyObject *__pyx_pw_13cfemIntegrals_367updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_CSR_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
42946 static PyMethodDef __pyx_mdef_13cfemIntegrals_367updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_CSR_sd = {"updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_CSR_sd", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_367updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_CSR_sd, METH_VARARGS|METH_KEYWORDS, 0};
42947 static PyObject *__pyx_pw_13cfemIntegrals_367updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_CSR_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
42948  PyArrayObject *__pyx_v_rowptr = 0;
42949  PyArrayObject *__pyx_v_colind = 0;
42950  int __pyx_v_offset_r;
42951  int __pyx_v_stride_r;
42952  int __pyx_v_offset_u;
42953  int __pyx_v_stride_u;
42954  int __pyx_v_nFreeVDOF_global;
42955  PyArrayObject *__pyx_v_exteriorElementBoundaries = 0;
42956  PyArrayObject *__pyx_v_elementBoundaryElements = 0;
42957  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries = 0;
42958  PyArrayObject *__pyx_v_nFreeDOF_element_r = 0;
42959  PyArrayObject *__pyx_v_freeLocal_r = 0;
42960  PyArrayObject *__pyx_v_freeGlobal_r = 0;
42961  PyArrayObject *__pyx_v_nFreeDOF_element_u = 0;
42962  PyArrayObject *__pyx_v_freeLocal_u = 0;
42963  PyArrayObject *__pyx_v_freeGlobal_u = 0;
42964  PyArrayObject *__pyx_v_csrRowIndeces_ru = 0;
42965  PyArrayObject *__pyx_v_csrColumnOffsets_eb_ru = 0;
42966  PyArrayObject *__pyx_v_isDOFBoundary = 0;
42967  double __pyx_v_sigma;
42968  PyArrayObject *__pyx_v_v = 0;
42969  PyArrayObject *__pyx_v_n = 0;
42970  PyArrayObject *__pyx_v_a = 0;
42971  PyArrayObject *__pyx_v_grad_w = 0;
42972  PyArrayObject *__pyx_v_dS = 0;
42973  PyObject *__pyx_v_jac = 0;
42974  int __pyx_lineno = 0;
42975  const char *__pyx_filename = NULL;
42976  int __pyx_clineno = 0;
42977  PyObject *__pyx_r = 0;
42978  __Pyx_RefNannyDeclarations
42979  __Pyx_RefNannySetupContext("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_CSR_sd (wrapper)", 0);
42980  {
42981  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rowptr,&__pyx_n_s_colind,&__pyx_n_s_offset_r,&__pyx_n_s_stride_r,&__pyx_n_s_offset_u,&__pyx_n_s_stride_u,&__pyx_n_s_nFreeVDOF_global,&__pyx_n_s_exteriorElementBoundaries,&__pyx_n_s_elementBoundaryElements,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_nFreeDOF_element_r,&__pyx_n_s_freeLocal_r,&__pyx_n_s_freeGlobal_r,&__pyx_n_s_nFreeDOF_element_u,&__pyx_n_s_freeLocal_u,&__pyx_n_s_freeGlobal_u,&__pyx_n_s_csrRowIndeces_ru,&__pyx_n_s_csrColumnOffsets_eb_ru,&__pyx_n_s_isDOFBoundary,&__pyx_n_s_sigma,&__pyx_n_s_v,&__pyx_n_s_n,&__pyx_n_s_a,&__pyx_n_s_grad_w,&__pyx_n_s_dS,&__pyx_n_s_jac,0};
42982  PyObject* values[26] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
42983  if (unlikely(__pyx_kwds)) {
42984  Py_ssize_t kw_args;
42985  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
42986  switch (pos_args) {
42987  case 26: values[25] = PyTuple_GET_ITEM(__pyx_args, 25);
42988  CYTHON_FALLTHROUGH;
42989  case 25: values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
42990  CYTHON_FALLTHROUGH;
42991  case 24: values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
42992  CYTHON_FALLTHROUGH;
42993  case 23: values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
42994  CYTHON_FALLTHROUGH;
42995  case 22: values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
42996  CYTHON_FALLTHROUGH;
42997  case 21: values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
42998  CYTHON_FALLTHROUGH;
42999  case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
43000  CYTHON_FALLTHROUGH;
43001  case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
43002  CYTHON_FALLTHROUGH;
43003  case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
43004  CYTHON_FALLTHROUGH;
43005  case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
43006  CYTHON_FALLTHROUGH;
43007  case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
43008  CYTHON_FALLTHROUGH;
43009  case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
43010  CYTHON_FALLTHROUGH;
43011  case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
43012  CYTHON_FALLTHROUGH;
43013  case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
43014  CYTHON_FALLTHROUGH;
43015  case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
43016  CYTHON_FALLTHROUGH;
43017  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
43018  CYTHON_FALLTHROUGH;
43019  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
43020  CYTHON_FALLTHROUGH;
43021  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
43022  CYTHON_FALLTHROUGH;
43023  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
43024  CYTHON_FALLTHROUGH;
43025  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
43026  CYTHON_FALLTHROUGH;
43027  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
43028  CYTHON_FALLTHROUGH;
43029  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
43030  CYTHON_FALLTHROUGH;
43031  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
43032  CYTHON_FALLTHROUGH;
43033  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
43034  CYTHON_FALLTHROUGH;
43035  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
43036  CYTHON_FALLTHROUGH;
43037  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
43038  CYTHON_FALLTHROUGH;
43039  case 0: break;
43040  default: goto __pyx_L5_argtuple_error;
43041  }
43042  kw_args = PyDict_Size(__pyx_kwds);
43043  switch (pos_args) {
43044  case 0:
43045  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rowptr)) != 0)) kw_args--;
43046  else goto __pyx_L5_argtuple_error;
43047  CYTHON_FALLTHROUGH;
43048  case 1:
43049  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_colind)) != 0)) kw_args--;
43050  else {
43051  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_CSR_sd", 1, 26, 26, 1); __PYX_ERR(0, 6504, __pyx_L3_error)
43052  }
43053  CYTHON_FALLTHROUGH;
43054  case 2:
43055  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset_r)) != 0)) kw_args--;
43056  else {
43057  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_CSR_sd", 1, 26, 26, 2); __PYX_ERR(0, 6504, __pyx_L3_error)
43058  }
43059  CYTHON_FALLTHROUGH;
43060  case 3:
43061  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stride_r)) != 0)) kw_args--;
43062  else {
43063  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_CSR_sd", 1, 26, 26, 3); __PYX_ERR(0, 6504, __pyx_L3_error)
43064  }
43065  CYTHON_FALLTHROUGH;
43066  case 4:
43067  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset_u)) != 0)) kw_args--;
43068  else {
43069  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_CSR_sd", 1, 26, 26, 4); __PYX_ERR(0, 6504, __pyx_L3_error)
43070  }
43071  CYTHON_FALLTHROUGH;
43072  case 5:
43073  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stride_u)) != 0)) kw_args--;
43074  else {
43075  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_CSR_sd", 1, 26, 26, 5); __PYX_ERR(0, 6504, __pyx_L3_error)
43076  }
43077  CYTHON_FALLTHROUGH;
43078  case 6:
43079  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeVDOF_global)) != 0)) kw_args--;
43080  else {
43081  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_CSR_sd", 1, 26, 26, 6); __PYX_ERR(0, 6504, __pyx_L3_error)
43082  }
43083  CYTHON_FALLTHROUGH;
43084  case 7:
43085  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exteriorElementBoundaries)) != 0)) kw_args--;
43086  else {
43087  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_CSR_sd", 1, 26, 26, 7); __PYX_ERR(0, 6504, __pyx_L3_error)
43088  }
43089  CYTHON_FALLTHROUGH;
43090  case 8:
43091  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElements)) != 0)) kw_args--;
43092  else {
43093  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_CSR_sd", 1, 26, 26, 8); __PYX_ERR(0, 6504, __pyx_L3_error)
43094  }
43095  CYTHON_FALLTHROUGH;
43096  case 9:
43097  if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
43098  else {
43099  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_CSR_sd", 1, 26, 26, 9); __PYX_ERR(0, 6504, __pyx_L3_error)
43100  }
43101  CYTHON_FALLTHROUGH;
43102  case 10:
43103  if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeDOF_element_r)) != 0)) kw_args--;
43104  else {
43105  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_CSR_sd", 1, 26, 26, 10); __PYX_ERR(0, 6504, __pyx_L3_error)
43106  }
43107  CYTHON_FALLTHROUGH;
43108  case 11:
43109  if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeLocal_r)) != 0)) kw_args--;
43110  else {
43111  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_CSR_sd", 1, 26, 26, 11); __PYX_ERR(0, 6504, __pyx_L3_error)
43112  }
43113  CYTHON_FALLTHROUGH;
43114  case 12:
43115  if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeGlobal_r)) != 0)) kw_args--;
43116  else {
43117  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_CSR_sd", 1, 26, 26, 12); __PYX_ERR(0, 6504, __pyx_L3_error)
43118  }
43119  CYTHON_FALLTHROUGH;
43120  case 13:
43121  if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeDOF_element_u)) != 0)) kw_args--;
43122  else {
43123  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_CSR_sd", 1, 26, 26, 13); __PYX_ERR(0, 6504, __pyx_L3_error)
43124  }
43125  CYTHON_FALLTHROUGH;
43126  case 14:
43127  if (likely((values[14] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeLocal_u)) != 0)) kw_args--;
43128  else {
43129  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_CSR_sd", 1, 26, 26, 14); __PYX_ERR(0, 6504, __pyx_L3_error)
43130  }
43131  CYTHON_FALLTHROUGH;
43132  case 15:
43133  if (likely((values[15] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeGlobal_u)) != 0)) kw_args--;
43134  else {
43135  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_CSR_sd", 1, 26, 26, 15); __PYX_ERR(0, 6504, __pyx_L3_error)
43136  }
43137  CYTHON_FALLTHROUGH;
43138  case 16:
43139  if (likely((values[16] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_csrRowIndeces_ru)) != 0)) kw_args--;
43140  else {
43141  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_CSR_sd", 1, 26, 26, 16); __PYX_ERR(0, 6504, __pyx_L3_error)
43142  }
43143  CYTHON_FALLTHROUGH;
43144  case 17:
43145  if (likely((values[17] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_csrColumnOffsets_eb_ru)) != 0)) kw_args--;
43146  else {
43147  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_CSR_sd", 1, 26, 26, 17); __PYX_ERR(0, 6504, __pyx_L3_error)
43148  }
43149  CYTHON_FALLTHROUGH;
43150  case 18:
43151  if (likely((values[18] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_isDOFBoundary)) != 0)) kw_args--;
43152  else {
43153  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_CSR_sd", 1, 26, 26, 18); __PYX_ERR(0, 6504, __pyx_L3_error)
43154  }
43155  CYTHON_FALLTHROUGH;
43156  case 19:
43157  if (likely((values[19] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sigma)) != 0)) kw_args--;
43158  else {
43159  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_CSR_sd", 1, 26, 26, 19); __PYX_ERR(0, 6504, __pyx_L3_error)
43160  }
43161  CYTHON_FALLTHROUGH;
43162  case 20:
43163  if (likely((values[20] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
43164  else {
43165  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_CSR_sd", 1, 26, 26, 20); __PYX_ERR(0, 6504, __pyx_L3_error)
43166  }
43167  CYTHON_FALLTHROUGH;
43168  case 21:
43169  if (likely((values[21] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n)) != 0)) kw_args--;
43170  else {
43171  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_CSR_sd", 1, 26, 26, 21); __PYX_ERR(0, 6504, __pyx_L3_error)
43172  }
43173  CYTHON_FALLTHROUGH;
43174  case 22:
43175  if (likely((values[22] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
43176  else {
43177  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_CSR_sd", 1, 26, 26, 22); __PYX_ERR(0, 6504, __pyx_L3_error)
43178  }
43179  CYTHON_FALLTHROUGH;
43180  case 23:
43181  if (likely((values[23] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_w)) != 0)) kw_args--;
43182  else {
43183  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_CSR_sd", 1, 26, 26, 23); __PYX_ERR(0, 6504, __pyx_L3_error)
43184  }
43185  CYTHON_FALLTHROUGH;
43186  case 24:
43187  if (likely((values[24] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dS)) != 0)) kw_args--;
43188  else {
43189  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_CSR_sd", 1, 26, 26, 24); __PYX_ERR(0, 6504, __pyx_L3_error)
43190  }
43191  CYTHON_FALLTHROUGH;
43192  case 25:
43193  if (likely((values[25] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jac)) != 0)) kw_args--;
43194  else {
43195  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_CSR_sd", 1, 26, 26, 25); __PYX_ERR(0, 6504, __pyx_L3_error)
43196  }
43197  }
43198  if (unlikely(kw_args > 0)) {
43199  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_CSR_sd") < 0)) __PYX_ERR(0, 6504, __pyx_L3_error)
43200  }
43201  } else if (PyTuple_GET_SIZE(__pyx_args) != 26) {
43202  goto __pyx_L5_argtuple_error;
43203  } else {
43204  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
43205  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
43206  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
43207  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
43208  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
43209  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
43210  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
43211  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
43212  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
43213  values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
43214  values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
43215  values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
43216  values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
43217  values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
43218  values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
43219  values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
43220  values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
43221  values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
43222  values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
43223  values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
43224  values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
43225  values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
43226  values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
43227  values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
43228  values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
43229  values[25] = PyTuple_GET_ITEM(__pyx_args, 25);
43230  }
43231  __pyx_v_rowptr = ((PyArrayObject *)values[0]);
43232  __pyx_v_colind = ((PyArrayObject *)values[1]);
43233  __pyx_v_offset_r = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_offset_r == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6506, __pyx_L3_error)
43234  __pyx_v_stride_r = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_stride_r == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6507, __pyx_L3_error)
43235  __pyx_v_offset_u = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_offset_u == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6508, __pyx_L3_error)
43236  __pyx_v_stride_u = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_stride_u == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6509, __pyx_L3_error)
43237  __pyx_v_nFreeVDOF_global = __Pyx_PyInt_As_int(values[6]); if (unlikely((__pyx_v_nFreeVDOF_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6510, __pyx_L3_error)
43238  __pyx_v_exteriorElementBoundaries = ((PyArrayObject *)values[7]);
43239  __pyx_v_elementBoundaryElements = ((PyArrayObject *)values[8]);
43240  __pyx_v_elementBoundaryLocalElementBoundaries = ((PyArrayObject *)values[9]);
43241  __pyx_v_nFreeDOF_element_r = ((PyArrayObject *)values[10]);
43242  __pyx_v_freeLocal_r = ((PyArrayObject *)values[11]);
43243  __pyx_v_freeGlobal_r = ((PyArrayObject *)values[12]);
43244  __pyx_v_nFreeDOF_element_u = ((PyArrayObject *)values[13]);
43245  __pyx_v_freeLocal_u = ((PyArrayObject *)values[14]);
43246  __pyx_v_freeGlobal_u = ((PyArrayObject *)values[15]);
43247  __pyx_v_csrRowIndeces_ru = ((PyArrayObject *)values[16]);
43248  __pyx_v_csrColumnOffsets_eb_ru = ((PyArrayObject *)values[17]);
43249  __pyx_v_isDOFBoundary = ((PyArrayObject *)values[18]);
43250  __pyx_v_sigma = __pyx_PyFloat_AsDouble(values[19]); if (unlikely((__pyx_v_sigma == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 6523, __pyx_L3_error)
43251  __pyx_v_v = ((PyArrayObject *)values[20]);
43252  __pyx_v_n = ((PyArrayObject *)values[21]);
43253  __pyx_v_a = ((PyArrayObject *)values[22]);
43254  __pyx_v_grad_w = ((PyArrayObject *)values[23]);
43255  __pyx_v_dS = ((PyArrayObject *)values[24]);
43256  __pyx_v_jac = values[25];
43257  }
43258  goto __pyx_L4_argument_unpacking_done;
43259  __pyx_L5_argtuple_error:;
43260  __Pyx_RaiseArgtupleInvalid("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_CSR_sd", 1, 26, 26, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6504, __pyx_L3_error)
43261  __pyx_L3_error:;
43262  __Pyx_AddTraceback("cfemIntegrals.updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_CSR_sd", __pyx_clineno, __pyx_lineno, __pyx_filename);
43263  __Pyx_RefNannyFinishContext();
43264  return NULL;
43265  __pyx_L4_argument_unpacking_done:;
43266  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rowptr), __pyx_ptype_5numpy_ndarray, 1, "rowptr", 0))) __PYX_ERR(0, 6504, __pyx_L1_error)
43267  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_colind), __pyx_ptype_5numpy_ndarray, 1, "colind", 0))) __PYX_ERR(0, 6505, __pyx_L1_error)
43268  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exteriorElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "exteriorElementBoundaries", 0))) __PYX_ERR(0, 6511, __pyx_L1_error)
43269  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElements), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElements", 0))) __PYX_ERR(0, 6512, __pyx_L1_error)
43270  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundaries), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundaries", 0))) __PYX_ERR(0, 6513, __pyx_L1_error)
43271  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nFreeDOF_element_r), __pyx_ptype_5numpy_ndarray, 1, "nFreeDOF_element_r", 0))) __PYX_ERR(0, 6514, __pyx_L1_error)
43272  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeLocal_r), __pyx_ptype_5numpy_ndarray, 1, "freeLocal_r", 0))) __PYX_ERR(0, 6515, __pyx_L1_error)
43273  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeGlobal_r), __pyx_ptype_5numpy_ndarray, 1, "freeGlobal_r", 0))) __PYX_ERR(0, 6516, __pyx_L1_error)
43274  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nFreeDOF_element_u), __pyx_ptype_5numpy_ndarray, 1, "nFreeDOF_element_u", 0))) __PYX_ERR(0, 6517, __pyx_L1_error)
43275  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeLocal_u), __pyx_ptype_5numpy_ndarray, 1, "freeLocal_u", 0))) __PYX_ERR(0, 6518, __pyx_L1_error)
43276  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeGlobal_u), __pyx_ptype_5numpy_ndarray, 1, "freeGlobal_u", 0))) __PYX_ERR(0, 6519, __pyx_L1_error)
43277  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_csrRowIndeces_ru), __pyx_ptype_5numpy_ndarray, 1, "csrRowIndeces_ru", 0))) __PYX_ERR(0, 6520, __pyx_L1_error)
43278  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_csrColumnOffsets_eb_ru), __pyx_ptype_5numpy_ndarray, 1, "csrColumnOffsets_eb_ru", 0))) __PYX_ERR(0, 6521, __pyx_L1_error)
43279  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_isDOFBoundary), __pyx_ptype_5numpy_ndarray, 1, "isDOFBoundary", 0))) __PYX_ERR(0, 6522, __pyx_L1_error)
43280  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), __pyx_ptype_5numpy_ndarray, 1, "v", 0))) __PYX_ERR(0, 6524, __pyx_L1_error)
43281  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_n), __pyx_ptype_5numpy_ndarray, 1, "n", 0))) __PYX_ERR(0, 6525, __pyx_L1_error)
43282  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1, "a", 0))) __PYX_ERR(0, 6526, __pyx_L1_error)
43283  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_w), __pyx_ptype_5numpy_ndarray, 1, "grad_w", 0))) __PYX_ERR(0, 6527, __pyx_L1_error)
43284  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dS), __pyx_ptype_5numpy_ndarray, 1, "dS", 0))) __PYX_ERR(0, 6528, __pyx_L1_error)
43285  __pyx_r = __pyx_pf_13cfemIntegrals_366updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_CSR_sd(__pyx_self, __pyx_v_rowptr, __pyx_v_colind, __pyx_v_offset_r, __pyx_v_stride_r, __pyx_v_offset_u, __pyx_v_stride_u, __pyx_v_nFreeVDOF_global, __pyx_v_exteriorElementBoundaries, __pyx_v_elementBoundaryElements, __pyx_v_elementBoundaryLocalElementBoundaries, __pyx_v_nFreeDOF_element_r, __pyx_v_freeLocal_r, __pyx_v_freeGlobal_r, __pyx_v_nFreeDOF_element_u, __pyx_v_freeLocal_u, __pyx_v_freeGlobal_u, __pyx_v_csrRowIndeces_ru, __pyx_v_csrColumnOffsets_eb_ru, __pyx_v_isDOFBoundary, __pyx_v_sigma, __pyx_v_v, __pyx_v_n, __pyx_v_a, __pyx_v_grad_w, __pyx_v_dS, __pyx_v_jac);
43286 
43287  /* function exit code */
43288  goto __pyx_L0;
43289  __pyx_L1_error:;
43290  __pyx_r = NULL;
43291  __pyx_L0:;
43292  __Pyx_RefNannyFinishContext();
43293  return __pyx_r;
43294 }
43295 
43296 static PyObject *__pyx_pf_13cfemIntegrals_366updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_CSR_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, int __pyx_v_offset_r, int __pyx_v_stride_r, int __pyx_v_offset_u, int __pyx_v_stride_u, int __pyx_v_nFreeVDOF_global, PyArrayObject *__pyx_v_exteriorElementBoundaries, PyArrayObject *__pyx_v_elementBoundaryElements, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundaries, PyArrayObject *__pyx_v_nFreeDOF_element_r, PyArrayObject *__pyx_v_freeLocal_r, PyArrayObject *__pyx_v_freeGlobal_r, PyArrayObject *__pyx_v_nFreeDOF_element_u, PyArrayObject *__pyx_v_freeLocal_u, PyArrayObject *__pyx_v_freeGlobal_u, PyArrayObject *__pyx_v_csrRowIndeces_ru, PyArrayObject *__pyx_v_csrColumnOffsets_eb_ru, PyArrayObject *__pyx_v_isDOFBoundary, double __pyx_v_sigma, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_n, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_grad_w, PyArrayObject *__pyx_v_dS, PyObject *__pyx_v_jac) {
43297  CYTHON_UNUSED PyArrayObject *__pyx_v_rowptr_dummy = 0;
43298  CYTHON_UNUSED PyArrayObject *__pyx_v_colind_dummy = 0;
43299  PyArrayObject *__pyx_v_jac_array = 0;
43300  int __pyx_v_nExteriorElementBoundaries_global;
43301  int __pyx_v_nQuadraturePoints_elementBoundary;
43302  int __pyx_v_nDOF_test_element;
43303  int __pyx_v_nDOF_trial_element;
43304  int __pyx_v_nSpace;
43305  PyObject *__pyx_r = NULL;
43306  __Pyx_RefNannyDeclarations
43307  PyObject *__pyx_t_1 = NULL;
43308  PyObject *__pyx_t_2 = NULL;
43309  PyObject *__pyx_t_3 = NULL;
43310  PyObject *__pyx_t_4 = NULL;
43311  PyObject *__pyx_t_5 = NULL;
43312  PyObject *(*__pyx_t_6)(PyObject *);
43313  int __pyx_lineno = 0;
43314  const char *__pyx_filename = NULL;
43315  int __pyx_clineno = 0;
43316  __Pyx_RefNannySetupContext("updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_CSR_sd", 0);
43317 
43318  /* "cfemIntegrals.pyx":6531
43319  * jac):
43320  * cdef np.ndarray rowptr_dummy, colind_dummy, jac_array
43321  * (rowptr_dummy,colind_dummy,jac_array) = jac.getCSRrepresentation() # <<<<<<<<<<<<<<
43322  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundaries.shape[0]
43323  * cdef int nQuadraturePoints_elementBoundary = grad_w.shape[1]
43324  */
43325  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_jac, __pyx_n_s_getCSRrepresentation); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6531, __pyx_L1_error)
43326  __Pyx_GOTREF(__pyx_t_2);
43327  __pyx_t_3 = NULL;
43328  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
43329  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
43330  if (likely(__pyx_t_3)) {
43331  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
43332  __Pyx_INCREF(__pyx_t_3);
43333  __Pyx_INCREF(function);
43334  __Pyx_DECREF_SET(__pyx_t_2, function);
43335  }
43336  }
43337  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
43338  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
43339  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6531, __pyx_L1_error)
43340  __Pyx_GOTREF(__pyx_t_1);
43341  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
43342  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
43343  PyObject* sequence = __pyx_t_1;
43344  Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
43345  if (unlikely(size != 3)) {
43346  if (size > 3) __Pyx_RaiseTooManyValuesError(3);
43347  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
43348  __PYX_ERR(0, 6531, __pyx_L1_error)
43349  }
43350  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
43351  if (likely(PyTuple_CheckExact(sequence))) {
43352  __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
43353  __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1);
43354  __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2);
43355  } else {
43356  __pyx_t_2 = PyList_GET_ITEM(sequence, 0);
43357  __pyx_t_3 = PyList_GET_ITEM(sequence, 1);
43358  __pyx_t_4 = PyList_GET_ITEM(sequence, 2);
43359  }
43360  __Pyx_INCREF(__pyx_t_2);
43361  __Pyx_INCREF(__pyx_t_3);
43362  __Pyx_INCREF(__pyx_t_4);
43363  #else
43364  __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6531, __pyx_L1_error)
43365  __Pyx_GOTREF(__pyx_t_2);
43366  __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6531, __pyx_L1_error)
43367  __Pyx_GOTREF(__pyx_t_3);
43368  __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6531, __pyx_L1_error)
43369  __Pyx_GOTREF(__pyx_t_4);
43370  #endif
43371  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
43372  } else {
43373  Py_ssize_t index = -1;
43374  __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6531, __pyx_L1_error)
43375  __Pyx_GOTREF(__pyx_t_5);
43376  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
43377  __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext;
43378  index = 0; __pyx_t_2 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
43379  __Pyx_GOTREF(__pyx_t_2);
43380  index = 1; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
43381  __Pyx_GOTREF(__pyx_t_3);
43382  index = 2; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed;
43383  __Pyx_GOTREF(__pyx_t_4);
43384  if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 3) < 0) __PYX_ERR(0, 6531, __pyx_L1_error)
43385  __pyx_t_6 = NULL;
43386  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
43387  goto __pyx_L4_unpacking_done;
43388  __pyx_L3_unpacking_failed:;
43389  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
43390  __pyx_t_6 = NULL;
43391  if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
43392  __PYX_ERR(0, 6531, __pyx_L1_error)
43393  __pyx_L4_unpacking_done:;
43394  }
43395  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 6531, __pyx_L1_error)
43396  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 6531, __pyx_L1_error)
43397  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 6531, __pyx_L1_error)
43398  __pyx_v_rowptr_dummy = ((PyArrayObject *)__pyx_t_2);
43399  __pyx_t_2 = 0;
43400  __pyx_v_colind_dummy = ((PyArrayObject *)__pyx_t_3);
43401  __pyx_t_3 = 0;
43402  __pyx_v_jac_array = ((PyArrayObject *)__pyx_t_4);
43403  __pyx_t_4 = 0;
43404 
43405  /* "cfemIntegrals.pyx":6532
43406  * cdef np.ndarray rowptr_dummy, colind_dummy, jac_array
43407  * (rowptr_dummy,colind_dummy,jac_array) = jac.getCSRrepresentation()
43408  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundaries.shape[0] # <<<<<<<<<<<<<<
43409  * cdef int nQuadraturePoints_elementBoundary = grad_w.shape[1]
43410  * cdef int nDOF_test_element = grad_w.shape[2]
43411  */
43412  __pyx_v_nExteriorElementBoundaries_global = (__pyx_v_exteriorElementBoundaries->dimensions[0]);
43413 
43414  /* "cfemIntegrals.pyx":6533
43415  * (rowptr_dummy,colind_dummy,jac_array) = jac.getCSRrepresentation()
43416  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundaries.shape[0]
43417  * cdef int nQuadraturePoints_elementBoundary = grad_w.shape[1] # <<<<<<<<<<<<<<
43418  * cdef int nDOF_test_element = grad_w.shape[2]
43419  * cdef int nDOF_trial_element = v.shape[2]
43420  */
43421  __pyx_v_nQuadraturePoints_elementBoundary = (__pyx_v_grad_w->dimensions[1]);
43422 
43423  /* "cfemIntegrals.pyx":6534
43424  * cdef int nExteriorElementBoundaries_global = exteriorElementBoundaries.shape[0]
43425  * cdef int nQuadraturePoints_elementBoundary = grad_w.shape[1]
43426  * cdef int nDOF_test_element = grad_w.shape[2] # <<<<<<<<<<<<<<
43427  * cdef int nDOF_trial_element = v.shape[2]
43428  * cdef int nSpace = n.shape[2]
43429  */
43430  __pyx_v_nDOF_test_element = (__pyx_v_grad_w->dimensions[2]);
43431 
43432  /* "cfemIntegrals.pyx":6535
43433  * cdef int nQuadraturePoints_elementBoundary = grad_w.shape[1]
43434  * cdef int nDOF_test_element = grad_w.shape[2]
43435  * cdef int nDOF_trial_element = v.shape[2] # <<<<<<<<<<<<<<
43436  * cdef int nSpace = n.shape[2]
43437  * cupdateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_CSR_sd(nExteriorElementBoundaries_global,
43438  */
43439  __pyx_v_nDOF_trial_element = (__pyx_v_v->dimensions[2]);
43440 
43441  /* "cfemIntegrals.pyx":6536
43442  * cdef int nDOF_test_element = grad_w.shape[2]
43443  * cdef int nDOF_trial_element = v.shape[2]
43444  * cdef int nSpace = n.shape[2] # <<<<<<<<<<<<<<
43445  * cupdateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_CSR_sd(nExteriorElementBoundaries_global,
43446  * nQuadraturePoints_elementBoundary,
43447  */
43448  __pyx_v_nSpace = (__pyx_v_n->dimensions[2]);
43449 
43450  /* "cfemIntegrals.pyx":6537
43451  * cdef int nDOF_trial_element = v.shape[2]
43452  * cdef int nSpace = n.shape[2]
43453  * cupdateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_CSR_sd(nExteriorElementBoundaries_global, # <<<<<<<<<<<<<<
43454  * nQuadraturePoints_elementBoundary,
43455  * nDOF_test_element,
43456  */
43457  updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_CSR_sd(__pyx_v_nExteriorElementBoundaries_global, __pyx_v_nQuadraturePoints_elementBoundary, __pyx_v_nDOF_test_element, __pyx_v_nDOF_trial_element, __pyx_v_nSpace, ((int *)__pyx_v_rowptr->data), ((int *)__pyx_v_colind->data), __pyx_v_offset_r, __pyx_v_stride_r, __pyx_v_offset_u, __pyx_v_stride_u, __pyx_v_nFreeVDOF_global, ((int *)__pyx_v_exteriorElementBoundaries->data), ((int *)__pyx_v_elementBoundaryElements->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundaries->data), ((int *)__pyx_v_nFreeDOF_element_r->data), ((int *)__pyx_v_freeLocal_r->data), ((int *)__pyx_v_freeGlobal_r->data), ((int *)__pyx_v_nFreeDOF_element_u->data), ((int *)__pyx_v_freeLocal_u->data), ((int *)__pyx_v_freeGlobal_u->data), ((int *)__pyx_v_csrRowIndeces_ru->data), ((int *)__pyx_v_csrColumnOffsets_eb_ru->data), ((int *)__pyx_v_isDOFBoundary->data), __pyx_v_sigma, ((double *)__pyx_v_v->data), ((double *)__pyx_v_n->data), ((double *)__pyx_v_a->data), ((double *)__pyx_v_grad_w->data), ((double *)__pyx_v_dS->data), ((double *)__pyx_v_jac_array->data));
43458 
43459  /* "cfemIntegrals.pyx":6504
43460  * <double*> dS.data,
43461  * <double*> jac_array.data)
43462  * def updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_CSR_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
43463  * np.ndarray colind,
43464  * int offset_r,
43465  */
43466 
43467  /* function exit code */
43468  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
43469  goto __pyx_L0;
43470  __pyx_L1_error:;
43471  __Pyx_XDECREF(__pyx_t_1);
43472  __Pyx_XDECREF(__pyx_t_2);
43473  __Pyx_XDECREF(__pyx_t_3);
43474  __Pyx_XDECREF(__pyx_t_4);
43475  __Pyx_XDECREF(__pyx_t_5);
43476  __Pyx_AddTraceback("cfemIntegrals.updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_CSR_sd", __pyx_clineno, __pyx_lineno, __pyx_filename);
43477  __pyx_r = NULL;
43478  __pyx_L0:;
43479  __Pyx_XDECREF((PyObject *)__pyx_v_rowptr_dummy);
43480  __Pyx_XDECREF((PyObject *)__pyx_v_colind_dummy);
43481  __Pyx_XDECREF((PyObject *)__pyx_v_jac_array);
43482  __Pyx_XGIVEREF(__pyx_r);
43483  __Pyx_RefNannyFinishContext();
43484  return __pyx_r;
43485 }
43486 
43487 /* "cfemIntegrals.pyx":6568
43488  * <double*> dS.data,
43489  * <double*> jac_array.data)
43490  * def update_f_movingDomain(np.ndarray xt, # <<<<<<<<<<<<<<
43491  * np.ndarray m,
43492  * np.ndarray f):
43493  */
43494 
43495 /* Python wrapper */
43496 static PyObject *__pyx_pw_13cfemIntegrals_369update_f_movingDomain(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
43497 static PyMethodDef __pyx_mdef_13cfemIntegrals_369update_f_movingDomain = {"update_f_movingDomain", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_369update_f_movingDomain, METH_VARARGS|METH_KEYWORDS, 0};
43498 static PyObject *__pyx_pw_13cfemIntegrals_369update_f_movingDomain(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
43499  PyArrayObject *__pyx_v_xt = 0;
43500  PyArrayObject *__pyx_v_m = 0;
43501  PyArrayObject *__pyx_v_f = 0;
43502  int __pyx_lineno = 0;
43503  const char *__pyx_filename = NULL;
43504  int __pyx_clineno = 0;
43505  PyObject *__pyx_r = 0;
43506  __Pyx_RefNannyDeclarations
43507  __Pyx_RefNannySetupContext("update_f_movingDomain (wrapper)", 0);
43508  {
43509  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_xt,&__pyx_n_s_m,&__pyx_n_s_f,0};
43510  PyObject* values[3] = {0,0,0};
43511  if (unlikely(__pyx_kwds)) {
43512  Py_ssize_t kw_args;
43513  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
43514  switch (pos_args) {
43515  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
43516  CYTHON_FALLTHROUGH;
43517  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
43518  CYTHON_FALLTHROUGH;
43519  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
43520  CYTHON_FALLTHROUGH;
43521  case 0: break;
43522  default: goto __pyx_L5_argtuple_error;
43523  }
43524  kw_args = PyDict_Size(__pyx_kwds);
43525  switch (pos_args) {
43526  case 0:
43527  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xt)) != 0)) kw_args--;
43528  else goto __pyx_L5_argtuple_error;
43529  CYTHON_FALLTHROUGH;
43530  case 1:
43531  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
43532  else {
43533  __Pyx_RaiseArgtupleInvalid("update_f_movingDomain", 1, 3, 3, 1); __PYX_ERR(0, 6568, __pyx_L3_error)
43534  }
43535  CYTHON_FALLTHROUGH;
43536  case 2:
43537  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_f)) != 0)) kw_args--;
43538  else {
43539  __Pyx_RaiseArgtupleInvalid("update_f_movingDomain", 1, 3, 3, 2); __PYX_ERR(0, 6568, __pyx_L3_error)
43540  }
43541  }
43542  if (unlikely(kw_args > 0)) {
43543  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "update_f_movingDomain") < 0)) __PYX_ERR(0, 6568, __pyx_L3_error)
43544  }
43545  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
43546  goto __pyx_L5_argtuple_error;
43547  } else {
43548  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
43549  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
43550  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
43551  }
43552  __pyx_v_xt = ((PyArrayObject *)values[0]);
43553  __pyx_v_m = ((PyArrayObject *)values[1]);
43554  __pyx_v_f = ((PyArrayObject *)values[2]);
43555  }
43556  goto __pyx_L4_argument_unpacking_done;
43557  __pyx_L5_argtuple_error:;
43558  __Pyx_RaiseArgtupleInvalid("update_f_movingDomain", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6568, __pyx_L3_error)
43559  __pyx_L3_error:;
43560  __Pyx_AddTraceback("cfemIntegrals.update_f_movingDomain", __pyx_clineno, __pyx_lineno, __pyx_filename);
43561  __Pyx_RefNannyFinishContext();
43562  return NULL;
43563  __pyx_L4_argument_unpacking_done:;
43564  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xt), __pyx_ptype_5numpy_ndarray, 1, "xt", 0))) __PYX_ERR(0, 6568, __pyx_L1_error)
43565  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_m), __pyx_ptype_5numpy_ndarray, 1, "m", 0))) __PYX_ERR(0, 6569, __pyx_L1_error)
43566  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_f), __pyx_ptype_5numpy_ndarray, 1, "f", 0))) __PYX_ERR(0, 6570, __pyx_L1_error)
43567  __pyx_r = __pyx_pf_13cfemIntegrals_368update_f_movingDomain(__pyx_self, __pyx_v_xt, __pyx_v_m, __pyx_v_f);
43568 
43569  /* function exit code */
43570  goto __pyx_L0;
43571  __pyx_L1_error:;
43572  __pyx_r = NULL;
43573  __pyx_L0:;
43574  __Pyx_RefNannyFinishContext();
43575  return __pyx_r;
43576 }
43577 
43578 static PyObject *__pyx_pf_13cfemIntegrals_368update_f_movingDomain(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_xt, PyArrayObject *__pyx_v_m, PyArrayObject *__pyx_v_f) {
43579  PyObject *__pyx_r = NULL;
43580  __Pyx_RefNannyDeclarations
43581  __Pyx_RefNannySetupContext("update_f_movingDomain", 0);
43582 
43583  /* "cfemIntegrals.pyx":6571
43584  * np.ndarray m,
43585  * np.ndarray f):
43586  * if m.ndim == 2: # <<<<<<<<<<<<<<
43587  * cupdate_f_movingDomain_q(f.shape[0],
43588  * f.shape[1],
43589  */
43590  switch (__pyx_v_m->nd) {
43591  case 2:
43592 
43593  /* "cfemIntegrals.pyx":6572
43594  * np.ndarray f):
43595  * if m.ndim == 2:
43596  * cupdate_f_movingDomain_q(f.shape[0], # <<<<<<<<<<<<<<
43597  * f.shape[1],
43598  * f.shape[2],
43599  */
43600  update_f_movingDomain_q((__pyx_v_f->dimensions[0]), (__pyx_v_f->dimensions[1]), (__pyx_v_f->dimensions[2]), ((double *)__pyx_v_xt->data), ((double *)__pyx_v_m->data), ((double *)__pyx_v_f->data));
43601 
43602  /* "cfemIntegrals.pyx":6571
43603  * np.ndarray m,
43604  * np.ndarray f):
43605  * if m.ndim == 2: # <<<<<<<<<<<<<<
43606  * cupdate_f_movingDomain_q(f.shape[0],
43607  * f.shape[1],
43608  */
43609  break;
43610  case 3:
43611 
43612  /* "cfemIntegrals.pyx":6579
43613  * <double*> f.data)
43614  * elif m.ndim == 3:
43615  * cupdate_f_movingDomain_ebq(f.shape[0], # <<<<<<<<<<<<<<
43616  * f.shape[1],
43617  * f.shape[2],
43618  */
43619  update_f_movingDomain_ebq((__pyx_v_f->dimensions[0]), (__pyx_v_f->dimensions[1]), (__pyx_v_f->dimensions[2]), (__pyx_v_f->dimensions[3]), ((double *)__pyx_v_xt->data), ((double *)__pyx_v_m->data), ((double *)__pyx_v_f->data));
43620 
43621  /* "cfemIntegrals.pyx":6578
43622  * <double*> m.data,
43623  * <double*> f.data)
43624  * elif m.ndim == 3: # <<<<<<<<<<<<<<
43625  * cupdate_f_movingDomain_ebq(f.shape[0],
43626  * f.shape[1],
43627  */
43628  break;
43629  default: break;
43630  }
43631 
43632  /* "cfemIntegrals.pyx":6568
43633  * <double*> dS.data,
43634  * <double*> jac_array.data)
43635  * def update_f_movingDomain(np.ndarray xt, # <<<<<<<<<<<<<<
43636  * np.ndarray m,
43637  * np.ndarray f):
43638  */
43639 
43640  /* function exit code */
43641  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
43642  __Pyx_XGIVEREF(__pyx_r);
43643  __Pyx_RefNannyFinishContext();
43644  return __pyx_r;
43645 }
43646 
43647 /* "cfemIntegrals.pyx":6586
43648  * <double*> m.data,
43649  * <double*> f.data)
43650  * def update_f_movingDomain_constantMass(np.ndarray xt, # <<<<<<<<<<<<<<
43651  * np.ndarray f):
43652  * if f.ndim == 3:
43653  */
43654 
43655 /* Python wrapper */
43656 static PyObject *__pyx_pw_13cfemIntegrals_371update_f_movingDomain_constantMass(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
43657 static PyMethodDef __pyx_mdef_13cfemIntegrals_371update_f_movingDomain_constantMass = {"update_f_movingDomain_constantMass", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_371update_f_movingDomain_constantMass, METH_VARARGS|METH_KEYWORDS, 0};
43658 static PyObject *__pyx_pw_13cfemIntegrals_371update_f_movingDomain_constantMass(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
43659  PyArrayObject *__pyx_v_xt = 0;
43660  PyArrayObject *__pyx_v_f = 0;
43661  int __pyx_lineno = 0;
43662  const char *__pyx_filename = NULL;
43663  int __pyx_clineno = 0;
43664  PyObject *__pyx_r = 0;
43665  __Pyx_RefNannyDeclarations
43666  __Pyx_RefNannySetupContext("update_f_movingDomain_constantMass (wrapper)", 0);
43667  {
43668  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_xt,&__pyx_n_s_f,0};
43669  PyObject* values[2] = {0,0};
43670  if (unlikely(__pyx_kwds)) {
43671  Py_ssize_t kw_args;
43672  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
43673  switch (pos_args) {
43674  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
43675  CYTHON_FALLTHROUGH;
43676  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
43677  CYTHON_FALLTHROUGH;
43678  case 0: break;
43679  default: goto __pyx_L5_argtuple_error;
43680  }
43681  kw_args = PyDict_Size(__pyx_kwds);
43682  switch (pos_args) {
43683  case 0:
43684  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xt)) != 0)) kw_args--;
43685  else goto __pyx_L5_argtuple_error;
43686  CYTHON_FALLTHROUGH;
43687  case 1:
43688  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_f)) != 0)) kw_args--;
43689  else {
43690  __Pyx_RaiseArgtupleInvalid("update_f_movingDomain_constantMass", 1, 2, 2, 1); __PYX_ERR(0, 6586, __pyx_L3_error)
43691  }
43692  }
43693  if (unlikely(kw_args > 0)) {
43694  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "update_f_movingDomain_constantMass") < 0)) __PYX_ERR(0, 6586, __pyx_L3_error)
43695  }
43696  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
43697  goto __pyx_L5_argtuple_error;
43698  } else {
43699  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
43700  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
43701  }
43702  __pyx_v_xt = ((PyArrayObject *)values[0]);
43703  __pyx_v_f = ((PyArrayObject *)values[1]);
43704  }
43705  goto __pyx_L4_argument_unpacking_done;
43706  __pyx_L5_argtuple_error:;
43707  __Pyx_RaiseArgtupleInvalid("update_f_movingDomain_constantMass", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6586, __pyx_L3_error)
43708  __pyx_L3_error:;
43709  __Pyx_AddTraceback("cfemIntegrals.update_f_movingDomain_constantMass", __pyx_clineno, __pyx_lineno, __pyx_filename);
43710  __Pyx_RefNannyFinishContext();
43711  return NULL;
43712  __pyx_L4_argument_unpacking_done:;
43713  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xt), __pyx_ptype_5numpy_ndarray, 1, "xt", 0))) __PYX_ERR(0, 6586, __pyx_L1_error)
43714  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_f), __pyx_ptype_5numpy_ndarray, 1, "f", 0))) __PYX_ERR(0, 6587, __pyx_L1_error)
43715  __pyx_r = __pyx_pf_13cfemIntegrals_370update_f_movingDomain_constantMass(__pyx_self, __pyx_v_xt, __pyx_v_f);
43716 
43717  /* function exit code */
43718  goto __pyx_L0;
43719  __pyx_L1_error:;
43720  __pyx_r = NULL;
43721  __pyx_L0:;
43722  __Pyx_RefNannyFinishContext();
43723  return __pyx_r;
43724 }
43725 
43726 static PyObject *__pyx_pf_13cfemIntegrals_370update_f_movingDomain_constantMass(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_xt, PyArrayObject *__pyx_v_f) {
43727  PyObject *__pyx_r = NULL;
43728  __Pyx_RefNannyDeclarations
43729  __Pyx_RefNannySetupContext("update_f_movingDomain_constantMass", 0);
43730 
43731  /* "cfemIntegrals.pyx":6588
43732  * def update_f_movingDomain_constantMass(np.ndarray xt,
43733  * np.ndarray f):
43734  * if f.ndim == 3: # <<<<<<<<<<<<<<
43735  * cupdate_f_movingDomain_constantMass_q(f.shape[0],
43736  * f.shape[1],
43737  */
43738  switch (__pyx_v_f->nd) {
43739  case 3:
43740 
43741  /* "cfemIntegrals.pyx":6589
43742  * np.ndarray f):
43743  * if f.ndim == 3:
43744  * cupdate_f_movingDomain_constantMass_q(f.shape[0], # <<<<<<<<<<<<<<
43745  * f.shape[1],
43746  * f.shape[2],
43747  */
43748  update_f_movingDomain_constantMass_q((__pyx_v_f->dimensions[0]), (__pyx_v_f->dimensions[1]), (__pyx_v_f->dimensions[2]), ((double *)__pyx_v_xt->data), ((double *)__pyx_v_f->data));
43749 
43750  /* "cfemIntegrals.pyx":6588
43751  * def update_f_movingDomain_constantMass(np.ndarray xt,
43752  * np.ndarray f):
43753  * if f.ndim == 3: # <<<<<<<<<<<<<<
43754  * cupdate_f_movingDomain_constantMass_q(f.shape[0],
43755  * f.shape[1],
43756  */
43757  break;
43758  case 4:
43759 
43760  /* "cfemIntegrals.pyx":6595
43761  * <double*> f.data)
43762  * elif f.ndim == 4:
43763  * cupdate_f_movingDomain_constantMass_ebq(f.shape[0], # <<<<<<<<<<<<<<
43764  * f.shape[1],
43765  * f.shape[2],
43766  */
43767  update_f_movingDomain_constantMass_ebq((__pyx_v_f->dimensions[0]), (__pyx_v_f->dimensions[1]), (__pyx_v_f->dimensions[2]), (__pyx_v_f->dimensions[3]), ((double *)__pyx_v_xt->data), ((double *)__pyx_v_f->data));
43768 
43769  /* "cfemIntegrals.pyx":6594
43770  * <double*> xt.data,
43771  * <double*> f.data)
43772  * elif f.ndim == 4: # <<<<<<<<<<<<<<
43773  * cupdate_f_movingDomain_constantMass_ebq(f.shape[0],
43774  * f.shape[1],
43775  */
43776  break;
43777  default: break;
43778  }
43779 
43780  /* "cfemIntegrals.pyx":6586
43781  * <double*> m.data,
43782  * <double*> f.data)
43783  * def update_f_movingDomain_constantMass(np.ndarray xt, # <<<<<<<<<<<<<<
43784  * np.ndarray f):
43785  * if f.ndim == 3:
43786  */
43787 
43788  /* function exit code */
43789  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
43790  __Pyx_XGIVEREF(__pyx_r);
43791  __Pyx_RefNannyFinishContext();
43792  return __pyx_r;
43793 }
43794 
43795 /* "cfemIntegrals.pyx":6601
43796  * <double*> xt.data,
43797  * <double*> f.data)
43798  * def updateStress_weak(np.ndarray sigma, # <<<<<<<<<<<<<<
43799  * np.ndarray grad_w_dV,
43800  * np.ndarray weak_residual_x,
43801  */
43802 
43803 /* Python wrapper */
43804 static PyObject *__pyx_pw_13cfemIntegrals_373updateStress_weak(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
43805 static PyMethodDef __pyx_mdef_13cfemIntegrals_373updateStress_weak = {"updateStress_weak", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_373updateStress_weak, METH_VARARGS|METH_KEYWORDS, 0};
43806 static PyObject *__pyx_pw_13cfemIntegrals_373updateStress_weak(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
43807  PyArrayObject *__pyx_v_sigma = 0;
43808  PyArrayObject *__pyx_v_grad_w_dV = 0;
43809  PyArrayObject *__pyx_v_weak_residual_x = 0;
43810  PyArrayObject *__pyx_v_weak_residual_y = 0;
43811  PyArrayObject *__pyx_v_weak_residual_z = 0;
43812  int __pyx_lineno = 0;
43813  const char *__pyx_filename = NULL;
43814  int __pyx_clineno = 0;
43815  PyObject *__pyx_r = 0;
43816  __Pyx_RefNannyDeclarations
43817  __Pyx_RefNannySetupContext("updateStress_weak (wrapper)", 0);
43818  {
43819  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sigma,&__pyx_n_s_grad_w_dV,&__pyx_n_s_weak_residual_x,&__pyx_n_s_weak_residual_y,&__pyx_n_s_weak_residual_z,0};
43820  PyObject* values[5] = {0,0,0,0,0};
43821  if (unlikely(__pyx_kwds)) {
43822  Py_ssize_t kw_args;
43823  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
43824  switch (pos_args) {
43825  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
43826  CYTHON_FALLTHROUGH;
43827  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
43828  CYTHON_FALLTHROUGH;
43829  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
43830  CYTHON_FALLTHROUGH;
43831  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
43832  CYTHON_FALLTHROUGH;
43833  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
43834  CYTHON_FALLTHROUGH;
43835  case 0: break;
43836  default: goto __pyx_L5_argtuple_error;
43837  }
43838  kw_args = PyDict_Size(__pyx_kwds);
43839  switch (pos_args) {
43840  case 0:
43841  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sigma)) != 0)) kw_args--;
43842  else goto __pyx_L5_argtuple_error;
43843  CYTHON_FALLTHROUGH;
43844  case 1:
43845  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_w_dV)) != 0)) kw_args--;
43846  else {
43847  __Pyx_RaiseArgtupleInvalid("updateStress_weak", 1, 5, 5, 1); __PYX_ERR(0, 6601, __pyx_L3_error)
43848  }
43849  CYTHON_FALLTHROUGH;
43850  case 2:
43851  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weak_residual_x)) != 0)) kw_args--;
43852  else {
43853  __Pyx_RaiseArgtupleInvalid("updateStress_weak", 1, 5, 5, 2); __PYX_ERR(0, 6601, __pyx_L3_error)
43854  }
43855  CYTHON_FALLTHROUGH;
43856  case 3:
43857  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weak_residual_y)) != 0)) kw_args--;
43858  else {
43859  __Pyx_RaiseArgtupleInvalid("updateStress_weak", 1, 5, 5, 3); __PYX_ERR(0, 6601, __pyx_L3_error)
43860  }
43861  CYTHON_FALLTHROUGH;
43862  case 4:
43863  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weak_residual_z)) != 0)) kw_args--;
43864  else {
43865  __Pyx_RaiseArgtupleInvalid("updateStress_weak", 1, 5, 5, 4); __PYX_ERR(0, 6601, __pyx_L3_error)
43866  }
43867  }
43868  if (unlikely(kw_args > 0)) {
43869  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateStress_weak") < 0)) __PYX_ERR(0, 6601, __pyx_L3_error)
43870  }
43871  } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
43872  goto __pyx_L5_argtuple_error;
43873  } else {
43874  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
43875  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
43876  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
43877  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
43878  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
43879  }
43880  __pyx_v_sigma = ((PyArrayObject *)values[0]);
43881  __pyx_v_grad_w_dV = ((PyArrayObject *)values[1]);
43882  __pyx_v_weak_residual_x = ((PyArrayObject *)values[2]);
43883  __pyx_v_weak_residual_y = ((PyArrayObject *)values[3]);
43884  __pyx_v_weak_residual_z = ((PyArrayObject *)values[4]);
43885  }
43886  goto __pyx_L4_argument_unpacking_done;
43887  __pyx_L5_argtuple_error:;
43888  __Pyx_RaiseArgtupleInvalid("updateStress_weak", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6601, __pyx_L3_error)
43889  __pyx_L3_error:;
43890  __Pyx_AddTraceback("cfemIntegrals.updateStress_weak", __pyx_clineno, __pyx_lineno, __pyx_filename);
43891  __Pyx_RefNannyFinishContext();
43892  return NULL;
43893  __pyx_L4_argument_unpacking_done:;
43894  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sigma), __pyx_ptype_5numpy_ndarray, 1, "sigma", 0))) __PYX_ERR(0, 6601, __pyx_L1_error)
43895  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_w_dV), __pyx_ptype_5numpy_ndarray, 1, "grad_w_dV", 0))) __PYX_ERR(0, 6602, __pyx_L1_error)
43896  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_weak_residual_x), __pyx_ptype_5numpy_ndarray, 1, "weak_residual_x", 0))) __PYX_ERR(0, 6603, __pyx_L1_error)
43897  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_weak_residual_y), __pyx_ptype_5numpy_ndarray, 1, "weak_residual_y", 0))) __PYX_ERR(0, 6604, __pyx_L1_error)
43898  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_weak_residual_z), __pyx_ptype_5numpy_ndarray, 1, "weak_residual_z", 0))) __PYX_ERR(0, 6605, __pyx_L1_error)
43899  __pyx_r = __pyx_pf_13cfemIntegrals_372updateStress_weak(__pyx_self, __pyx_v_sigma, __pyx_v_grad_w_dV, __pyx_v_weak_residual_x, __pyx_v_weak_residual_y, __pyx_v_weak_residual_z);
43900 
43901  /* function exit code */
43902  goto __pyx_L0;
43903  __pyx_L1_error:;
43904  __pyx_r = NULL;
43905  __pyx_L0:;
43906  __Pyx_RefNannyFinishContext();
43907  return __pyx_r;
43908 }
43909 
43910 static PyObject *__pyx_pf_13cfemIntegrals_372updateStress_weak(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_sigma, PyArrayObject *__pyx_v_grad_w_dV, PyArrayObject *__pyx_v_weak_residual_x, PyArrayObject *__pyx_v_weak_residual_y, PyArrayObject *__pyx_v_weak_residual_z) {
43911  int __pyx_v_nElements_global;
43912  int __pyx_v_nQuadraturePoints_element;
43913  int __pyx_v_nDOF_test_element;
43914  int __pyx_v_nSpace;
43915  PyObject *__pyx_r = NULL;
43916  __Pyx_RefNannyDeclarations
43917  __Pyx_RefNannySetupContext("updateStress_weak", 0);
43918 
43919  /* "cfemIntegrals.pyx":6606
43920  * np.ndarray weak_residual_y,
43921  * np.ndarray weak_residual_z):
43922  * cdef int nElements_global = grad_w_dV.shape[0] # <<<<<<<<<<<<<<
43923  * cdef int nQuadraturePoints_element = grad_w_dV.shape[1]
43924  * cdef int nDOF_test_element = grad_w_dV.shape[2]
43925  */
43926  __pyx_v_nElements_global = (__pyx_v_grad_w_dV->dimensions[0]);
43927 
43928  /* "cfemIntegrals.pyx":6607
43929  * np.ndarray weak_residual_z):
43930  * cdef int nElements_global = grad_w_dV.shape[0]
43931  * cdef int nQuadraturePoints_element = grad_w_dV.shape[1] # <<<<<<<<<<<<<<
43932  * cdef int nDOF_test_element = grad_w_dV.shape[2]
43933  * cdef int nSpace = grad_w_dV.shape[3]
43934  */
43935  __pyx_v_nQuadraturePoints_element = (__pyx_v_grad_w_dV->dimensions[1]);
43936 
43937  /* "cfemIntegrals.pyx":6608
43938  * cdef int nElements_global = grad_w_dV.shape[0]
43939  * cdef int nQuadraturePoints_element = grad_w_dV.shape[1]
43940  * cdef int nDOF_test_element = grad_w_dV.shape[2] # <<<<<<<<<<<<<<
43941  * cdef int nSpace = grad_w_dV.shape[3]
43942  * cupdateStress_weak(nElements_global,
43943  */
43944  __pyx_v_nDOF_test_element = (__pyx_v_grad_w_dV->dimensions[2]);
43945 
43946  /* "cfemIntegrals.pyx":6609
43947  * cdef int nQuadraturePoints_element = grad_w_dV.shape[1]
43948  * cdef int nDOF_test_element = grad_w_dV.shape[2]
43949  * cdef int nSpace = grad_w_dV.shape[3] # <<<<<<<<<<<<<<
43950  * cupdateStress_weak(nElements_global,
43951  * nQuadraturePoints_element,
43952  */
43953  __pyx_v_nSpace = (__pyx_v_grad_w_dV->dimensions[3]);
43954 
43955  /* "cfemIntegrals.pyx":6610
43956  * cdef int nDOF_test_element = grad_w_dV.shape[2]
43957  * cdef int nSpace = grad_w_dV.shape[3]
43958  * cupdateStress_weak(nElements_global, # <<<<<<<<<<<<<<
43959  * nQuadraturePoints_element,
43960  * nDOF_test_element,
43961  */
43962  updateStress_weak(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_test_element, __pyx_v_nSpace, ((double *)__pyx_v_sigma->data), ((double *)__pyx_v_grad_w_dV->data), ((double *)__pyx_v_weak_residual_x->data), ((double *)__pyx_v_weak_residual_y->data), ((double *)__pyx_v_weak_residual_z->data));
43963 
43964  /* "cfemIntegrals.pyx":6601
43965  * <double*> xt.data,
43966  * <double*> f.data)
43967  * def updateStress_weak(np.ndarray sigma, # <<<<<<<<<<<<<<
43968  * np.ndarray grad_w_dV,
43969  * np.ndarray weak_residual_x,
43970  */
43971 
43972  /* function exit code */
43973  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
43974  __Pyx_XGIVEREF(__pyx_r);
43975  __Pyx_RefNannyFinishContext();
43976  return __pyx_r;
43977 }
43978 
43979 /* "cfemIntegrals.pyx":6619
43980  * <double*> weak_residual_y.data,
43981  * <double*> weak_residual_z.data)
43982  * def updateStressJacobian_weak(np.ndarray dsigma_xx, # <<<<<<<<<<<<<<
43983  * np.ndarray dsigma_xy,
43984  * np.ndarray dsigma_xz,
43985  */
43986 
43987 /* Python wrapper */
43988 static PyObject *__pyx_pw_13cfemIntegrals_375updateStressJacobian_weak(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
43989 static PyMethodDef __pyx_mdef_13cfemIntegrals_375updateStressJacobian_weak = {"updateStressJacobian_weak", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_375updateStressJacobian_weak, METH_VARARGS|METH_KEYWORDS, 0};
43990 static PyObject *__pyx_pw_13cfemIntegrals_375updateStressJacobian_weak(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
43991  PyArrayObject *__pyx_v_dsigma_xx = 0;
43992  PyArrayObject *__pyx_v_dsigma_xy = 0;
43993  PyArrayObject *__pyx_v_dsigma_xz = 0;
43994  PyArrayObject *__pyx_v_dsigma_yx = 0;
43995  PyArrayObject *__pyx_v_dsigma_yy = 0;
43996  PyArrayObject *__pyx_v_dsigma_yz = 0;
43997  PyArrayObject *__pyx_v_dsigma_zx = 0;
43998  PyArrayObject *__pyx_v_dsigma_zy = 0;
43999  PyArrayObject *__pyx_v_dsigma_zz = 0;
44000  PyArrayObject *__pyx_v_grad_v = 0;
44001  PyArrayObject *__pyx_v_grad_w_dV = 0;
44002  PyArrayObject *__pyx_v_jacobian_weak_residual_xx = 0;
44003  PyArrayObject *__pyx_v_jacobian_weak_residual_xy = 0;
44004  PyArrayObject *__pyx_v_jacobian_weak_residual_xz = 0;
44005  PyArrayObject *__pyx_v_jacobian_weak_residual_yx = 0;
44006  PyArrayObject *__pyx_v_jacobian_weak_residual_yy = 0;
44007  PyArrayObject *__pyx_v_jacobian_weak_residual_yz = 0;
44008  PyArrayObject *__pyx_v_jacobian_weak_residual_zx = 0;
44009  PyArrayObject *__pyx_v_jacobian_weak_residual_zy = 0;
44010  PyArrayObject *__pyx_v_jacobian_weak_residual_zz = 0;
44011  int __pyx_lineno = 0;
44012  const char *__pyx_filename = NULL;
44013  int __pyx_clineno = 0;
44014  PyObject *__pyx_r = 0;
44015  __Pyx_RefNannyDeclarations
44016  __Pyx_RefNannySetupContext("updateStressJacobian_weak (wrapper)", 0);
44017  {
44018  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dsigma_xx,&__pyx_n_s_dsigma_xy,&__pyx_n_s_dsigma_xz,&__pyx_n_s_dsigma_yx,&__pyx_n_s_dsigma_yy,&__pyx_n_s_dsigma_yz,&__pyx_n_s_dsigma_zx,&__pyx_n_s_dsigma_zy,&__pyx_n_s_dsigma_zz,&__pyx_n_s_grad_v,&__pyx_n_s_grad_w_dV,&__pyx_n_s_jacobian_weak_residual_xx,&__pyx_n_s_jacobian_weak_residual_xy,&__pyx_n_s_jacobian_weak_residual_xz,&__pyx_n_s_jacobian_weak_residual_yx,&__pyx_n_s_jacobian_weak_residual_yy,&__pyx_n_s_jacobian_weak_residual_yz,&__pyx_n_s_jacobian_weak_residual_zx,&__pyx_n_s_jacobian_weak_residual_zy,&__pyx_n_s_jacobian_weak_residual_zz,0};
44019  PyObject* values[20] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
44020  if (unlikely(__pyx_kwds)) {
44021  Py_ssize_t kw_args;
44022  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
44023  switch (pos_args) {
44024  case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
44025  CYTHON_FALLTHROUGH;
44026  case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
44027  CYTHON_FALLTHROUGH;
44028  case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
44029  CYTHON_FALLTHROUGH;
44030  case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
44031  CYTHON_FALLTHROUGH;
44032  case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
44033  CYTHON_FALLTHROUGH;
44034  case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
44035  CYTHON_FALLTHROUGH;
44036  case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
44037  CYTHON_FALLTHROUGH;
44038  case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
44039  CYTHON_FALLTHROUGH;
44040  case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
44041  CYTHON_FALLTHROUGH;
44042  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
44043  CYTHON_FALLTHROUGH;
44044  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
44045  CYTHON_FALLTHROUGH;
44046  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
44047  CYTHON_FALLTHROUGH;
44048  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
44049  CYTHON_FALLTHROUGH;
44050  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
44051  CYTHON_FALLTHROUGH;
44052  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
44053  CYTHON_FALLTHROUGH;
44054  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
44055  CYTHON_FALLTHROUGH;
44056  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
44057  CYTHON_FALLTHROUGH;
44058  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
44059  CYTHON_FALLTHROUGH;
44060  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
44061  CYTHON_FALLTHROUGH;
44062  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
44063  CYTHON_FALLTHROUGH;
44064  case 0: break;
44065  default: goto __pyx_L5_argtuple_error;
44066  }
44067  kw_args = PyDict_Size(__pyx_kwds);
44068  switch (pos_args) {
44069  case 0:
44070  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsigma_xx)) != 0)) kw_args--;
44071  else goto __pyx_L5_argtuple_error;
44072  CYTHON_FALLTHROUGH;
44073  case 1:
44074  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsigma_xy)) != 0)) kw_args--;
44075  else {
44076  __Pyx_RaiseArgtupleInvalid("updateStressJacobian_weak", 1, 20, 20, 1); __PYX_ERR(0, 6619, __pyx_L3_error)
44077  }
44078  CYTHON_FALLTHROUGH;
44079  case 2:
44080  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsigma_xz)) != 0)) kw_args--;
44081  else {
44082  __Pyx_RaiseArgtupleInvalid("updateStressJacobian_weak", 1, 20, 20, 2); __PYX_ERR(0, 6619, __pyx_L3_error)
44083  }
44084  CYTHON_FALLTHROUGH;
44085  case 3:
44086  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsigma_yx)) != 0)) kw_args--;
44087  else {
44088  __Pyx_RaiseArgtupleInvalid("updateStressJacobian_weak", 1, 20, 20, 3); __PYX_ERR(0, 6619, __pyx_L3_error)
44089  }
44090  CYTHON_FALLTHROUGH;
44091  case 4:
44092  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsigma_yy)) != 0)) kw_args--;
44093  else {
44094  __Pyx_RaiseArgtupleInvalid("updateStressJacobian_weak", 1, 20, 20, 4); __PYX_ERR(0, 6619, __pyx_L3_error)
44095  }
44096  CYTHON_FALLTHROUGH;
44097  case 5:
44098  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsigma_yz)) != 0)) kw_args--;
44099  else {
44100  __Pyx_RaiseArgtupleInvalid("updateStressJacobian_weak", 1, 20, 20, 5); __PYX_ERR(0, 6619, __pyx_L3_error)
44101  }
44102  CYTHON_FALLTHROUGH;
44103  case 6:
44104  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsigma_zx)) != 0)) kw_args--;
44105  else {
44106  __Pyx_RaiseArgtupleInvalid("updateStressJacobian_weak", 1, 20, 20, 6); __PYX_ERR(0, 6619, __pyx_L3_error)
44107  }
44108  CYTHON_FALLTHROUGH;
44109  case 7:
44110  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsigma_zy)) != 0)) kw_args--;
44111  else {
44112  __Pyx_RaiseArgtupleInvalid("updateStressJacobian_weak", 1, 20, 20, 7); __PYX_ERR(0, 6619, __pyx_L3_error)
44113  }
44114  CYTHON_FALLTHROUGH;
44115  case 8:
44116  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsigma_zz)) != 0)) kw_args--;
44117  else {
44118  __Pyx_RaiseArgtupleInvalid("updateStressJacobian_weak", 1, 20, 20, 8); __PYX_ERR(0, 6619, __pyx_L3_error)
44119  }
44120  CYTHON_FALLTHROUGH;
44121  case 9:
44122  if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_v)) != 0)) kw_args--;
44123  else {
44124  __Pyx_RaiseArgtupleInvalid("updateStressJacobian_weak", 1, 20, 20, 9); __PYX_ERR(0, 6619, __pyx_L3_error)
44125  }
44126  CYTHON_FALLTHROUGH;
44127  case 10:
44128  if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_w_dV)) != 0)) kw_args--;
44129  else {
44130  __Pyx_RaiseArgtupleInvalid("updateStressJacobian_weak", 1, 20, 20, 10); __PYX_ERR(0, 6619, __pyx_L3_error)
44131  }
44132  CYTHON_FALLTHROUGH;
44133  case 11:
44134  if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jacobian_weak_residual_xx)) != 0)) kw_args--;
44135  else {
44136  __Pyx_RaiseArgtupleInvalid("updateStressJacobian_weak", 1, 20, 20, 11); __PYX_ERR(0, 6619, __pyx_L3_error)
44137  }
44138  CYTHON_FALLTHROUGH;
44139  case 12:
44140  if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jacobian_weak_residual_xy)) != 0)) kw_args--;
44141  else {
44142  __Pyx_RaiseArgtupleInvalid("updateStressJacobian_weak", 1, 20, 20, 12); __PYX_ERR(0, 6619, __pyx_L3_error)
44143  }
44144  CYTHON_FALLTHROUGH;
44145  case 13:
44146  if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jacobian_weak_residual_xz)) != 0)) kw_args--;
44147  else {
44148  __Pyx_RaiseArgtupleInvalid("updateStressJacobian_weak", 1, 20, 20, 13); __PYX_ERR(0, 6619, __pyx_L3_error)
44149  }
44150  CYTHON_FALLTHROUGH;
44151  case 14:
44152  if (likely((values[14] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jacobian_weak_residual_yx)) != 0)) kw_args--;
44153  else {
44154  __Pyx_RaiseArgtupleInvalid("updateStressJacobian_weak", 1, 20, 20, 14); __PYX_ERR(0, 6619, __pyx_L3_error)
44155  }
44156  CYTHON_FALLTHROUGH;
44157  case 15:
44158  if (likely((values[15] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jacobian_weak_residual_yy)) != 0)) kw_args--;
44159  else {
44160  __Pyx_RaiseArgtupleInvalid("updateStressJacobian_weak", 1, 20, 20, 15); __PYX_ERR(0, 6619, __pyx_L3_error)
44161  }
44162  CYTHON_FALLTHROUGH;
44163  case 16:
44164  if (likely((values[16] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jacobian_weak_residual_yz)) != 0)) kw_args--;
44165  else {
44166  __Pyx_RaiseArgtupleInvalid("updateStressJacobian_weak", 1, 20, 20, 16); __PYX_ERR(0, 6619, __pyx_L3_error)
44167  }
44168  CYTHON_FALLTHROUGH;
44169  case 17:
44170  if (likely((values[17] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jacobian_weak_residual_zx)) != 0)) kw_args--;
44171  else {
44172  __Pyx_RaiseArgtupleInvalid("updateStressJacobian_weak", 1, 20, 20, 17); __PYX_ERR(0, 6619, __pyx_L3_error)
44173  }
44174  CYTHON_FALLTHROUGH;
44175  case 18:
44176  if (likely((values[18] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jacobian_weak_residual_zy)) != 0)) kw_args--;
44177  else {
44178  __Pyx_RaiseArgtupleInvalid("updateStressJacobian_weak", 1, 20, 20, 18); __PYX_ERR(0, 6619, __pyx_L3_error)
44179  }
44180  CYTHON_FALLTHROUGH;
44181  case 19:
44182  if (likely((values[19] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jacobian_weak_residual_zz)) != 0)) kw_args--;
44183  else {
44184  __Pyx_RaiseArgtupleInvalid("updateStressJacobian_weak", 1, 20, 20, 19); __PYX_ERR(0, 6619, __pyx_L3_error)
44185  }
44186  }
44187  if (unlikely(kw_args > 0)) {
44188  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateStressJacobian_weak") < 0)) __PYX_ERR(0, 6619, __pyx_L3_error)
44189  }
44190  } else if (PyTuple_GET_SIZE(__pyx_args) != 20) {
44191  goto __pyx_L5_argtuple_error;
44192  } else {
44193  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
44194  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
44195  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
44196  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
44197  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
44198  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
44199  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
44200  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
44201  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
44202  values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
44203  values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
44204  values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
44205  values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
44206  values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
44207  values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
44208  values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
44209  values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
44210  values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
44211  values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
44212  values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
44213  }
44214  __pyx_v_dsigma_xx = ((PyArrayObject *)values[0]);
44215  __pyx_v_dsigma_xy = ((PyArrayObject *)values[1]);
44216  __pyx_v_dsigma_xz = ((PyArrayObject *)values[2]);
44217  __pyx_v_dsigma_yx = ((PyArrayObject *)values[3]);
44218  __pyx_v_dsigma_yy = ((PyArrayObject *)values[4]);
44219  __pyx_v_dsigma_yz = ((PyArrayObject *)values[5]);
44220  __pyx_v_dsigma_zx = ((PyArrayObject *)values[6]);
44221  __pyx_v_dsigma_zy = ((PyArrayObject *)values[7]);
44222  __pyx_v_dsigma_zz = ((PyArrayObject *)values[8]);
44223  __pyx_v_grad_v = ((PyArrayObject *)values[9]);
44224  __pyx_v_grad_w_dV = ((PyArrayObject *)values[10]);
44225  __pyx_v_jacobian_weak_residual_xx = ((PyArrayObject *)values[11]);
44226  __pyx_v_jacobian_weak_residual_xy = ((PyArrayObject *)values[12]);
44227  __pyx_v_jacobian_weak_residual_xz = ((PyArrayObject *)values[13]);
44228  __pyx_v_jacobian_weak_residual_yx = ((PyArrayObject *)values[14]);
44229  __pyx_v_jacobian_weak_residual_yy = ((PyArrayObject *)values[15]);
44230  __pyx_v_jacobian_weak_residual_yz = ((PyArrayObject *)values[16]);
44231  __pyx_v_jacobian_weak_residual_zx = ((PyArrayObject *)values[17]);
44232  __pyx_v_jacobian_weak_residual_zy = ((PyArrayObject *)values[18]);
44233  __pyx_v_jacobian_weak_residual_zz = ((PyArrayObject *)values[19]);
44234  }
44235  goto __pyx_L4_argument_unpacking_done;
44236  __pyx_L5_argtuple_error:;
44237  __Pyx_RaiseArgtupleInvalid("updateStressJacobian_weak", 1, 20, 20, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6619, __pyx_L3_error)
44238  __pyx_L3_error:;
44239  __Pyx_AddTraceback("cfemIntegrals.updateStressJacobian_weak", __pyx_clineno, __pyx_lineno, __pyx_filename);
44240  __Pyx_RefNannyFinishContext();
44241  return NULL;
44242  __pyx_L4_argument_unpacking_done:;
44243  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsigma_xx), __pyx_ptype_5numpy_ndarray, 1, "dsigma_xx", 0))) __PYX_ERR(0, 6619, __pyx_L1_error)
44244  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsigma_xy), __pyx_ptype_5numpy_ndarray, 1, "dsigma_xy", 0))) __PYX_ERR(0, 6620, __pyx_L1_error)
44245  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsigma_xz), __pyx_ptype_5numpy_ndarray, 1, "dsigma_xz", 0))) __PYX_ERR(0, 6621, __pyx_L1_error)
44246  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsigma_yx), __pyx_ptype_5numpy_ndarray, 1, "dsigma_yx", 0))) __PYX_ERR(0, 6622, __pyx_L1_error)
44247  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsigma_yy), __pyx_ptype_5numpy_ndarray, 1, "dsigma_yy", 0))) __PYX_ERR(0, 6623, __pyx_L1_error)
44248  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsigma_yz), __pyx_ptype_5numpy_ndarray, 1, "dsigma_yz", 0))) __PYX_ERR(0, 6624, __pyx_L1_error)
44249  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsigma_zx), __pyx_ptype_5numpy_ndarray, 1, "dsigma_zx", 0))) __PYX_ERR(0, 6625, __pyx_L1_error)
44250  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsigma_zy), __pyx_ptype_5numpy_ndarray, 1, "dsigma_zy", 0))) __PYX_ERR(0, 6626, __pyx_L1_error)
44251  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsigma_zz), __pyx_ptype_5numpy_ndarray, 1, "dsigma_zz", 0))) __PYX_ERR(0, 6627, __pyx_L1_error)
44252  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_v), __pyx_ptype_5numpy_ndarray, 1, "grad_v", 0))) __PYX_ERR(0, 6628, __pyx_L1_error)
44253  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_w_dV), __pyx_ptype_5numpy_ndarray, 1, "grad_w_dV", 0))) __PYX_ERR(0, 6629, __pyx_L1_error)
44254  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_jacobian_weak_residual_xx), __pyx_ptype_5numpy_ndarray, 1, "jacobian_weak_residual_xx", 0))) __PYX_ERR(0, 6630, __pyx_L1_error)
44255  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_jacobian_weak_residual_xy), __pyx_ptype_5numpy_ndarray, 1, "jacobian_weak_residual_xy", 0))) __PYX_ERR(0, 6631, __pyx_L1_error)
44256  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_jacobian_weak_residual_xz), __pyx_ptype_5numpy_ndarray, 1, "jacobian_weak_residual_xz", 0))) __PYX_ERR(0, 6632, __pyx_L1_error)
44257  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_jacobian_weak_residual_yx), __pyx_ptype_5numpy_ndarray, 1, "jacobian_weak_residual_yx", 0))) __PYX_ERR(0, 6633, __pyx_L1_error)
44258  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_jacobian_weak_residual_yy), __pyx_ptype_5numpy_ndarray, 1, "jacobian_weak_residual_yy", 0))) __PYX_ERR(0, 6634, __pyx_L1_error)
44259  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_jacobian_weak_residual_yz), __pyx_ptype_5numpy_ndarray, 1, "jacobian_weak_residual_yz", 0))) __PYX_ERR(0, 6635, __pyx_L1_error)
44260  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_jacobian_weak_residual_zx), __pyx_ptype_5numpy_ndarray, 1, "jacobian_weak_residual_zx", 0))) __PYX_ERR(0, 6636, __pyx_L1_error)
44261  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_jacobian_weak_residual_zy), __pyx_ptype_5numpy_ndarray, 1, "jacobian_weak_residual_zy", 0))) __PYX_ERR(0, 6637, __pyx_L1_error)
44262  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_jacobian_weak_residual_zz), __pyx_ptype_5numpy_ndarray, 1, "jacobian_weak_residual_zz", 0))) __PYX_ERR(0, 6638, __pyx_L1_error)
44263  __pyx_r = __pyx_pf_13cfemIntegrals_374updateStressJacobian_weak(__pyx_self, __pyx_v_dsigma_xx, __pyx_v_dsigma_xy, __pyx_v_dsigma_xz, __pyx_v_dsigma_yx, __pyx_v_dsigma_yy, __pyx_v_dsigma_yz, __pyx_v_dsigma_zx, __pyx_v_dsigma_zy, __pyx_v_dsigma_zz, __pyx_v_grad_v, __pyx_v_grad_w_dV, __pyx_v_jacobian_weak_residual_xx, __pyx_v_jacobian_weak_residual_xy, __pyx_v_jacobian_weak_residual_xz, __pyx_v_jacobian_weak_residual_yx, __pyx_v_jacobian_weak_residual_yy, __pyx_v_jacobian_weak_residual_yz, __pyx_v_jacobian_weak_residual_zx, __pyx_v_jacobian_weak_residual_zy, __pyx_v_jacobian_weak_residual_zz);
44264 
44265  /* function exit code */
44266  goto __pyx_L0;
44267  __pyx_L1_error:;
44268  __pyx_r = NULL;
44269  __pyx_L0:;
44270  __Pyx_RefNannyFinishContext();
44271  return __pyx_r;
44272 }
44273 
44274 static PyObject *__pyx_pf_13cfemIntegrals_374updateStressJacobian_weak(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dsigma_xx, PyArrayObject *__pyx_v_dsigma_xy, PyArrayObject *__pyx_v_dsigma_xz, PyArrayObject *__pyx_v_dsigma_yx, PyArrayObject *__pyx_v_dsigma_yy, PyArrayObject *__pyx_v_dsigma_yz, PyArrayObject *__pyx_v_dsigma_zx, PyArrayObject *__pyx_v_dsigma_zy, PyArrayObject *__pyx_v_dsigma_zz, PyArrayObject *__pyx_v_grad_v, PyArrayObject *__pyx_v_grad_w_dV, PyArrayObject *__pyx_v_jacobian_weak_residual_xx, PyArrayObject *__pyx_v_jacobian_weak_residual_xy, PyArrayObject *__pyx_v_jacobian_weak_residual_xz, PyArrayObject *__pyx_v_jacobian_weak_residual_yx, PyArrayObject *__pyx_v_jacobian_weak_residual_yy, PyArrayObject *__pyx_v_jacobian_weak_residual_yz, PyArrayObject *__pyx_v_jacobian_weak_residual_zx, PyArrayObject *__pyx_v_jacobian_weak_residual_zy, PyArrayObject *__pyx_v_jacobian_weak_residual_zz) {
44275  int __pyx_v_nElements_global;
44276  int __pyx_v_nQuadraturePoints_element;
44277  int __pyx_v_nDOF_trial_element;
44278  int __pyx_v_nDOF_test_element;
44279  int __pyx_v_nSpace;
44280  PyObject *__pyx_r = NULL;
44281  __Pyx_RefNannyDeclarations
44282  __Pyx_RefNannySetupContext("updateStressJacobian_weak", 0);
44283 
44284  /* "cfemIntegrals.pyx":6639
44285  * np.ndarray jacobian_weak_residual_zy,
44286  * np.ndarray jacobian_weak_residual_zz):
44287  * cdef int nElements_global = grad_w_dV.shape[0] # <<<<<<<<<<<<<<
44288  * cdef int nQuadraturePoints_element = grad_w_dV.shape[1]
44289  * cdef int nDOF_trial_element = grad_w_dV.shape[2]
44290  */
44291  __pyx_v_nElements_global = (__pyx_v_grad_w_dV->dimensions[0]);
44292 
44293  /* "cfemIntegrals.pyx":6640
44294  * np.ndarray jacobian_weak_residual_zz):
44295  * cdef int nElements_global = grad_w_dV.shape[0]
44296  * cdef int nQuadraturePoints_element = grad_w_dV.shape[1] # <<<<<<<<<<<<<<
44297  * cdef int nDOF_trial_element = grad_w_dV.shape[2]
44298  * cdef int nDOF_test_element = grad_w_dV.shape[2]
44299  */
44300  __pyx_v_nQuadraturePoints_element = (__pyx_v_grad_w_dV->dimensions[1]);
44301 
44302  /* "cfemIntegrals.pyx":6641
44303  * cdef int nElements_global = grad_w_dV.shape[0]
44304  * cdef int nQuadraturePoints_element = grad_w_dV.shape[1]
44305  * cdef int nDOF_trial_element = grad_w_dV.shape[2] # <<<<<<<<<<<<<<
44306  * cdef int nDOF_test_element = grad_w_dV.shape[2]
44307  * cdef int nSpace = grad_w_dV.shape[3]
44308  */
44309  __pyx_v_nDOF_trial_element = (__pyx_v_grad_w_dV->dimensions[2]);
44310 
44311  /* "cfemIntegrals.pyx":6642
44312  * cdef int nQuadraturePoints_element = grad_w_dV.shape[1]
44313  * cdef int nDOF_trial_element = grad_w_dV.shape[2]
44314  * cdef int nDOF_test_element = grad_w_dV.shape[2] # <<<<<<<<<<<<<<
44315  * cdef int nSpace = grad_w_dV.shape[3]
44316  * cupdateStressJacobian_weak(nElements_global,
44317  */
44318  __pyx_v_nDOF_test_element = (__pyx_v_grad_w_dV->dimensions[2]);
44319 
44320  /* "cfemIntegrals.pyx":6643
44321  * cdef int nDOF_trial_element = grad_w_dV.shape[2]
44322  * cdef int nDOF_test_element = grad_w_dV.shape[2]
44323  * cdef int nSpace = grad_w_dV.shape[3] # <<<<<<<<<<<<<<
44324  * cupdateStressJacobian_weak(nElements_global,
44325  * nQuadraturePoints_element,
44326  */
44327  __pyx_v_nSpace = (__pyx_v_grad_w_dV->dimensions[3]);
44328 
44329  /* "cfemIntegrals.pyx":6644
44330  * cdef int nDOF_test_element = grad_w_dV.shape[2]
44331  * cdef int nSpace = grad_w_dV.shape[3]
44332  * cupdateStressJacobian_weak(nElements_global, # <<<<<<<<<<<<<<
44333  * nQuadraturePoints_element,
44334  * nDOF_trial_element,
44335  */
44336  updateStressJacobian_weak(__pyx_v_nElements_global, __pyx_v_nQuadraturePoints_element, __pyx_v_nDOF_trial_element, __pyx_v_nDOF_test_element, __pyx_v_nSpace, ((double *)__pyx_v_dsigma_xx->data), ((double *)__pyx_v_dsigma_xy->data), ((double *)__pyx_v_dsigma_xz->data), ((double *)__pyx_v_dsigma_yx->data), ((double *)__pyx_v_dsigma_yy->data), ((double *)__pyx_v_dsigma_yz->data), ((double *)__pyx_v_dsigma_zx->data), ((double *)__pyx_v_dsigma_zy->data), ((double *)__pyx_v_dsigma_zz->data), ((double *)__pyx_v_grad_v->data), ((double *)__pyx_v_grad_w_dV->data), ((double *)__pyx_v_jacobian_weak_residual_xx->data), ((double *)__pyx_v_jacobian_weak_residual_xy->data), ((double *)__pyx_v_jacobian_weak_residual_xz->data), ((double *)__pyx_v_jacobian_weak_residual_yx->data), ((double *)__pyx_v_jacobian_weak_residual_yy->data), ((double *)__pyx_v_jacobian_weak_residual_yz->data), ((double *)__pyx_v_jacobian_weak_residual_zx->data), ((double *)__pyx_v_jacobian_weak_residual_zy->data), ((double *)__pyx_v_jacobian_weak_residual_zz->data));
44337 
44338  /* "cfemIntegrals.pyx":6619
44339  * <double*> weak_residual_y.data,
44340  * <double*> weak_residual_z.data)
44341  * def updateStressJacobian_weak(np.ndarray dsigma_xx, # <<<<<<<<<<<<<<
44342  * np.ndarray dsigma_xy,
44343  * np.ndarray dsigma_xz,
44344  */
44345 
44346  /* function exit code */
44347  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
44348  __Pyx_XGIVEREF(__pyx_r);
44349  __Pyx_RefNannyFinishContext();
44350  return __pyx_r;
44351 }
44352 
44353 /* "cfemIntegrals.pyx":6669
44354  * <double*> jacobian_weak_residual_zy.data,
44355  * <double*> jacobian_weak_residual_zz.data)
44356  * def projectFromNodalInterpolationConditions(int dim_dof, # <<<<<<<<<<<<<<
44357  * np.ndarray l2g,
44358  * np.ndarray functional_map_element,
44359  */
44360 
44361 /* Python wrapper */
44362 static PyObject *__pyx_pw_13cfemIntegrals_377projectFromNodalInterpolationConditions(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
44363 static PyMethodDef __pyx_mdef_13cfemIntegrals_377projectFromNodalInterpolationConditions = {"projectFromNodalInterpolationConditions", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_377projectFromNodalInterpolationConditions, METH_VARARGS|METH_KEYWORDS, 0};
44364 static PyObject *__pyx_pw_13cfemIntegrals_377projectFromNodalInterpolationConditions(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
44365  int __pyx_v_dim_dof;
44366  PyArrayObject *__pyx_v_l2g = 0;
44367  PyArrayObject *__pyx_v_functional_map_element = 0;
44368  PyArrayObject *__pyx_v_interpolationValues = 0;
44369  PyArrayObject *__pyx_v_dofs = 0;
44370  int __pyx_lineno = 0;
44371  const char *__pyx_filename = NULL;
44372  int __pyx_clineno = 0;
44373  PyObject *__pyx_r = 0;
44374  __Pyx_RefNannyDeclarations
44375  __Pyx_RefNannySetupContext("projectFromNodalInterpolationConditions (wrapper)", 0);
44376  {
44377  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dim_dof,&__pyx_n_s_l2g,&__pyx_n_s_functional_map_element,&__pyx_n_s_interpolationValues,&__pyx_n_s_dofs,0};
44378  PyObject* values[5] = {0,0,0,0,0};
44379  if (unlikely(__pyx_kwds)) {
44380  Py_ssize_t kw_args;
44381  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
44382  switch (pos_args) {
44383  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
44384  CYTHON_FALLTHROUGH;
44385  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
44386  CYTHON_FALLTHROUGH;
44387  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
44388  CYTHON_FALLTHROUGH;
44389  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
44390  CYTHON_FALLTHROUGH;
44391  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
44392  CYTHON_FALLTHROUGH;
44393  case 0: break;
44394  default: goto __pyx_L5_argtuple_error;
44395  }
44396  kw_args = PyDict_Size(__pyx_kwds);
44397  switch (pos_args) {
44398  case 0:
44399  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dim_dof)) != 0)) kw_args--;
44400  else goto __pyx_L5_argtuple_error;
44401  CYTHON_FALLTHROUGH;
44402  case 1:
44403  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_l2g)) != 0)) kw_args--;
44404  else {
44405  __Pyx_RaiseArgtupleInvalid("projectFromNodalInterpolationConditions", 1, 5, 5, 1); __PYX_ERR(0, 6669, __pyx_L3_error)
44406  }
44407  CYTHON_FALLTHROUGH;
44408  case 2:
44409  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_functional_map_element)) != 0)) kw_args--;
44410  else {
44411  __Pyx_RaiseArgtupleInvalid("projectFromNodalInterpolationConditions", 1, 5, 5, 2); __PYX_ERR(0, 6669, __pyx_L3_error)
44412  }
44413  CYTHON_FALLTHROUGH;
44414  case 3:
44415  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_interpolationValues)) != 0)) kw_args--;
44416  else {
44417  __Pyx_RaiseArgtupleInvalid("projectFromNodalInterpolationConditions", 1, 5, 5, 3); __PYX_ERR(0, 6669, __pyx_L3_error)
44418  }
44419  CYTHON_FALLTHROUGH;
44420  case 4:
44421  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dofs)) != 0)) kw_args--;
44422  else {
44423  __Pyx_RaiseArgtupleInvalid("projectFromNodalInterpolationConditions", 1, 5, 5, 4); __PYX_ERR(0, 6669, __pyx_L3_error)
44424  }
44425  }
44426  if (unlikely(kw_args > 0)) {
44427  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "projectFromNodalInterpolationConditions") < 0)) __PYX_ERR(0, 6669, __pyx_L3_error)
44428  }
44429  } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
44430  goto __pyx_L5_argtuple_error;
44431  } else {
44432  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
44433  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
44434  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
44435  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
44436  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
44437  }
44438  __pyx_v_dim_dof = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_dim_dof == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6669, __pyx_L3_error)
44439  __pyx_v_l2g = ((PyArrayObject *)values[1]);
44440  __pyx_v_functional_map_element = ((PyArrayObject *)values[2]);
44441  __pyx_v_interpolationValues = ((PyArrayObject *)values[3]);
44442  __pyx_v_dofs = ((PyArrayObject *)values[4]);
44443  }
44444  goto __pyx_L4_argument_unpacking_done;
44445  __pyx_L5_argtuple_error:;
44446  __Pyx_RaiseArgtupleInvalid("projectFromNodalInterpolationConditions", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6669, __pyx_L3_error)
44447  __pyx_L3_error:;
44448  __Pyx_AddTraceback("cfemIntegrals.projectFromNodalInterpolationConditions", __pyx_clineno, __pyx_lineno, __pyx_filename);
44449  __Pyx_RefNannyFinishContext();
44450  return NULL;
44451  __pyx_L4_argument_unpacking_done:;
44452  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_l2g), __pyx_ptype_5numpy_ndarray, 1, "l2g", 0))) __PYX_ERR(0, 6670, __pyx_L1_error)
44453  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_functional_map_element), __pyx_ptype_5numpy_ndarray, 1, "functional_map_element", 0))) __PYX_ERR(0, 6671, __pyx_L1_error)
44454  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_interpolationValues), __pyx_ptype_5numpy_ndarray, 1, "interpolationValues", 0))) __PYX_ERR(0, 6672, __pyx_L1_error)
44455  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dofs), __pyx_ptype_5numpy_ndarray, 1, "dofs", 0))) __PYX_ERR(0, 6673, __pyx_L1_error)
44456  __pyx_r = __pyx_pf_13cfemIntegrals_376projectFromNodalInterpolationConditions(__pyx_self, __pyx_v_dim_dof, __pyx_v_l2g, __pyx_v_functional_map_element, __pyx_v_interpolationValues, __pyx_v_dofs);
44457 
44458  /* function exit code */
44459  goto __pyx_L0;
44460  __pyx_L1_error:;
44461  __pyx_r = NULL;
44462  __pyx_L0:;
44463  __Pyx_RefNannyFinishContext();
44464  return __pyx_r;
44465 }
44466 
44467 static PyObject *__pyx_pf_13cfemIntegrals_376projectFromNodalInterpolationConditions(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_dim_dof, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_functional_map_element, PyArrayObject *__pyx_v_interpolationValues, PyArrayObject *__pyx_v_dofs) {
44468  int __pyx_v_nElements_global;
44469  int __pyx_v_nDOF_element;
44470  PyObject *__pyx_r = NULL;
44471  __Pyx_RefNannyDeclarations
44472  __Pyx_RefNannySetupContext("projectFromNodalInterpolationConditions", 0);
44473 
44474  /* "cfemIntegrals.pyx":6674
44475  * np.ndarray interpolationValues,
44476  * np.ndarray dofs):
44477  * cdef int nElements_global = l2g.shape[0] # <<<<<<<<<<<<<<
44478  * cdef int nDOF_element = l2g.shape[1]
44479  * cprojectFromNodalInterpolationConditions(nElements_global,
44480  */
44481  __pyx_v_nElements_global = (__pyx_v_l2g->dimensions[0]);
44482 
44483  /* "cfemIntegrals.pyx":6675
44484  * np.ndarray dofs):
44485  * cdef int nElements_global = l2g.shape[0]
44486  * cdef int nDOF_element = l2g.shape[1] # <<<<<<<<<<<<<<
44487  * cprojectFromNodalInterpolationConditions(nElements_global,
44488  * nDOF_element,
44489  */
44490  __pyx_v_nDOF_element = (__pyx_v_l2g->dimensions[1]);
44491 
44492  /* "cfemIntegrals.pyx":6676
44493  * cdef int nElements_global = l2g.shape[0]
44494  * cdef int nDOF_element = l2g.shape[1]
44495  * cprojectFromNodalInterpolationConditions(nElements_global, # <<<<<<<<<<<<<<
44496  * nDOF_element,
44497  * dim_dof,
44498  */
44499  projectFromNodalInterpolationConditions(__pyx_v_nElements_global, __pyx_v_nDOF_element, __pyx_v_dim_dof, ((int *)__pyx_v_l2g->data), ((int *)__pyx_v_functional_map_element->data), ((double *)__pyx_v_interpolationValues->data), ((double *)__pyx_v_dofs->data));
44500 
44501  /* "cfemIntegrals.pyx":6669
44502  * <double*> jacobian_weak_residual_zy.data,
44503  * <double*> jacobian_weak_residual_zz.data)
44504  * def projectFromNodalInterpolationConditions(int dim_dof, # <<<<<<<<<<<<<<
44505  * np.ndarray l2g,
44506  * np.ndarray functional_map_element,
44507  */
44508 
44509  /* function exit code */
44510  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
44511  __Pyx_XGIVEREF(__pyx_r);
44512  __Pyx_RefNannyFinishContext();
44513  return __pyx_r;
44514 }
44515 
44516 /* "cfemIntegrals.pyx":6683
44517  * <double*> interpolationValues.data,
44518  * <double*> dofs.data)
44519  * def calculateVelocityQuadrature_MixedForm2_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
44520  * np.ndarray colind,
44521  * np.ndarray qa,
44522  */
44523 
44524 /* Python wrapper */
44525 static PyObject *__pyx_pw_13cfemIntegrals_379calculateVelocityQuadrature_MixedForm2_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
44526 static PyMethodDef __pyx_mdef_13cfemIntegrals_379calculateVelocityQuadrature_MixedForm2_sd = {"calculateVelocityQuadrature_MixedForm2_sd", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_379calculateVelocityQuadrature_MixedForm2_sd, METH_VARARGS|METH_KEYWORDS, 0};
44527 static PyObject *__pyx_pw_13cfemIntegrals_379calculateVelocityQuadrature_MixedForm2_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
44528  PyArrayObject *__pyx_v_rowptr = 0;
44529  PyArrayObject *__pyx_v_colind = 0;
44530  PyArrayObject *__pyx_v_qa = 0;
44531  PyArrayObject *__pyx_v_qw_dV = 0;
44532  PyArrayObject *__pyx_v_b = 0;
44533  PyArrayObject *__pyx_v_v = 0;
44534  PyArrayObject *__pyx_v_V = 0;
44535  PyArrayObject *__pyx_v_qv = 0;
44536  PyArrayObject *__pyx_v_qV = 0;
44537  int __pyx_lineno = 0;
44538  const char *__pyx_filename = NULL;
44539  int __pyx_clineno = 0;
44540  PyObject *__pyx_r = 0;
44541  __Pyx_RefNannyDeclarations
44542  __Pyx_RefNannySetupContext("calculateVelocityQuadrature_MixedForm2_sd (wrapper)", 0);
44543  {
44544  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rowptr,&__pyx_n_s_colind,&__pyx_n_s_qa,&__pyx_n_s_qw_dV,&__pyx_n_s_b,&__pyx_n_s_v,&__pyx_n_s_V,&__pyx_n_s_qv,&__pyx_n_s_qV,0};
44545  PyObject* values[9] = {0,0,0,0,0,0,0,0,0};
44546  if (unlikely(__pyx_kwds)) {
44547  Py_ssize_t kw_args;
44548  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
44549  switch (pos_args) {
44550  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
44551  CYTHON_FALLTHROUGH;
44552  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
44553  CYTHON_FALLTHROUGH;
44554  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
44555  CYTHON_FALLTHROUGH;
44556  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
44557  CYTHON_FALLTHROUGH;
44558  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
44559  CYTHON_FALLTHROUGH;
44560  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
44561  CYTHON_FALLTHROUGH;
44562  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
44563  CYTHON_FALLTHROUGH;
44564  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
44565  CYTHON_FALLTHROUGH;
44566  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
44567  CYTHON_FALLTHROUGH;
44568  case 0: break;
44569  default: goto __pyx_L5_argtuple_error;
44570  }
44571  kw_args = PyDict_Size(__pyx_kwds);
44572  switch (pos_args) {
44573  case 0:
44574  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rowptr)) != 0)) kw_args--;
44575  else goto __pyx_L5_argtuple_error;
44576  CYTHON_FALLTHROUGH;
44577  case 1:
44578  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_colind)) != 0)) kw_args--;
44579  else {
44580  __Pyx_RaiseArgtupleInvalid("calculateVelocityQuadrature_MixedForm2_sd", 1, 9, 9, 1); __PYX_ERR(0, 6683, __pyx_L3_error)
44581  }
44582  CYTHON_FALLTHROUGH;
44583  case 2:
44584  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_qa)) != 0)) kw_args--;
44585  else {
44586  __Pyx_RaiseArgtupleInvalid("calculateVelocityQuadrature_MixedForm2_sd", 1, 9, 9, 2); __PYX_ERR(0, 6683, __pyx_L3_error)
44587  }
44588  CYTHON_FALLTHROUGH;
44589  case 3:
44590  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_qw_dV)) != 0)) kw_args--;
44591  else {
44592  __Pyx_RaiseArgtupleInvalid("calculateVelocityQuadrature_MixedForm2_sd", 1, 9, 9, 3); __PYX_ERR(0, 6683, __pyx_L3_error)
44593  }
44594  CYTHON_FALLTHROUGH;
44595  case 4:
44596  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--;
44597  else {
44598  __Pyx_RaiseArgtupleInvalid("calculateVelocityQuadrature_MixedForm2_sd", 1, 9, 9, 4); __PYX_ERR(0, 6683, __pyx_L3_error)
44599  }
44600  CYTHON_FALLTHROUGH;
44601  case 5:
44602  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
44603  else {
44604  __Pyx_RaiseArgtupleInvalid("calculateVelocityQuadrature_MixedForm2_sd", 1, 9, 9, 5); __PYX_ERR(0, 6683, __pyx_L3_error)
44605  }
44606  CYTHON_FALLTHROUGH;
44607  case 6:
44608  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_V)) != 0)) kw_args--;
44609  else {
44610  __Pyx_RaiseArgtupleInvalid("calculateVelocityQuadrature_MixedForm2_sd", 1, 9, 9, 6); __PYX_ERR(0, 6683, __pyx_L3_error)
44611  }
44612  CYTHON_FALLTHROUGH;
44613  case 7:
44614  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_qv)) != 0)) kw_args--;
44615  else {
44616  __Pyx_RaiseArgtupleInvalid("calculateVelocityQuadrature_MixedForm2_sd", 1, 9, 9, 7); __PYX_ERR(0, 6683, __pyx_L3_error)
44617  }
44618  CYTHON_FALLTHROUGH;
44619  case 8:
44620  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_qV)) != 0)) kw_args--;
44621  else {
44622  __Pyx_RaiseArgtupleInvalid("calculateVelocityQuadrature_MixedForm2_sd", 1, 9, 9, 8); __PYX_ERR(0, 6683, __pyx_L3_error)
44623  }
44624  }
44625  if (unlikely(kw_args > 0)) {
44626  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateVelocityQuadrature_MixedForm2_sd") < 0)) __PYX_ERR(0, 6683, __pyx_L3_error)
44627  }
44628  } else if (PyTuple_GET_SIZE(__pyx_args) != 9) {
44629  goto __pyx_L5_argtuple_error;
44630  } else {
44631  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
44632  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
44633  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
44634  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
44635  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
44636  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
44637  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
44638  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
44639  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
44640  }
44641  __pyx_v_rowptr = ((PyArrayObject *)values[0]);
44642  __pyx_v_colind = ((PyArrayObject *)values[1]);
44643  __pyx_v_qa = ((PyArrayObject *)values[2]);
44644  __pyx_v_qw_dV = ((PyArrayObject *)values[3]);
44645  __pyx_v_b = ((PyArrayObject *)values[4]);
44646  __pyx_v_v = ((PyArrayObject *)values[5]);
44647  __pyx_v_V = ((PyArrayObject *)values[6]);
44648  __pyx_v_qv = ((PyArrayObject *)values[7]);
44649  __pyx_v_qV = ((PyArrayObject *)values[8]);
44650  }
44651  goto __pyx_L4_argument_unpacking_done;
44652  __pyx_L5_argtuple_error:;
44653  __Pyx_RaiseArgtupleInvalid("calculateVelocityQuadrature_MixedForm2_sd", 1, 9, 9, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6683, __pyx_L3_error)
44654  __pyx_L3_error:;
44655  __Pyx_AddTraceback("cfemIntegrals.calculateVelocityQuadrature_MixedForm2_sd", __pyx_clineno, __pyx_lineno, __pyx_filename);
44656  __Pyx_RefNannyFinishContext();
44657  return NULL;
44658  __pyx_L4_argument_unpacking_done:;
44659  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rowptr), __pyx_ptype_5numpy_ndarray, 1, "rowptr", 0))) __PYX_ERR(0, 6683, __pyx_L1_error)
44660  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_colind), __pyx_ptype_5numpy_ndarray, 1, "colind", 0))) __PYX_ERR(0, 6684, __pyx_L1_error)
44661  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_qa), __pyx_ptype_5numpy_ndarray, 1, "qa", 0))) __PYX_ERR(0, 6685, __pyx_L1_error)
44662  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_qw_dV), __pyx_ptype_5numpy_ndarray, 1, "qw_dV", 0))) __PYX_ERR(0, 6686, __pyx_L1_error)
44663  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_b), __pyx_ptype_5numpy_ndarray, 1, "b", 0))) __PYX_ERR(0, 6687, __pyx_L1_error)
44664  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), __pyx_ptype_5numpy_ndarray, 1, "v", 0))) __PYX_ERR(0, 6688, __pyx_L1_error)
44665  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_V), __pyx_ptype_5numpy_ndarray, 1, "V", 0))) __PYX_ERR(0, 6689, __pyx_L1_error)
44666  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_qv), __pyx_ptype_5numpy_ndarray, 1, "qv", 0))) __PYX_ERR(0, 6690, __pyx_L1_error)
44667  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_qV), __pyx_ptype_5numpy_ndarray, 1, "qV", 0))) __PYX_ERR(0, 6691, __pyx_L1_error)
44668  __pyx_r = __pyx_pf_13cfemIntegrals_378calculateVelocityQuadrature_MixedForm2_sd(__pyx_self, __pyx_v_rowptr, __pyx_v_colind, __pyx_v_qa, __pyx_v_qw_dV, __pyx_v_b, __pyx_v_v, __pyx_v_V, __pyx_v_qv, __pyx_v_qV);
44669 
44670  /* function exit code */
44671  goto __pyx_L0;
44672  __pyx_L1_error:;
44673  __pyx_r = NULL;
44674  __pyx_L0:;
44675  __Pyx_RefNannyFinishContext();
44676  return __pyx_r;
44677 }
44678 
44679 static PyObject *__pyx_pf_13cfemIntegrals_378calculateVelocityQuadrature_MixedForm2_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_qa, PyArrayObject *__pyx_v_qw_dV, PyArrayObject *__pyx_v_b, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_V, PyArrayObject *__pyx_v_qv, PyArrayObject *__pyx_v_qV) {
44680  PyObject *__pyx_r = NULL;
44681  __Pyx_RefNannyDeclarations
44682  __Pyx_RefNannySetupContext("calculateVelocityQuadrature_MixedForm2_sd", 0);
44683 
44684  /* "cfemIntegrals.pyx":6692
44685  * np.ndarray qv,
44686  * np.ndarray qV):
44687  * cccalculateVelocityQuadrature_MixedForm2_sd(v.shape[0], # <<<<<<<<<<<<<<
44688  * v.shape[1],
44689  * v.shape[2],
44690  */
44691  calculateVelocityQuadrature_MixedForm2_sd((__pyx_v_v->dimensions[0]), (__pyx_v_v->dimensions[1]), (__pyx_v_v->dimensions[2]), (__pyx_v_v->dimensions[3]), (__pyx_v_b->dimensions[1]), (__pyx_v_qv->dimensions[1]), ((int *)__pyx_v_rowptr->data), ((int *)__pyx_v_colind->data), ((double *)__pyx_v_qa->data), ((double *)__pyx_v_qw_dV->data), ((double *)__pyx_v_b->data), ((double *)__pyx_v_v->data), ((double *)__pyx_v_V->data), ((double *)__pyx_v_qv->data), ((double *)__pyx_v_qV->data));
44692 
44693  /* "cfemIntegrals.pyx":6683
44694  * <double*> interpolationValues.data,
44695  * <double*> dofs.data)
44696  * def calculateVelocityQuadrature_MixedForm2_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
44697  * np.ndarray colind,
44698  * np.ndarray qa,
44699  */
44700 
44701  /* function exit code */
44702  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
44703  __Pyx_XGIVEREF(__pyx_r);
44704  __Pyx_RefNannyFinishContext();
44705  return __pyx_r;
44706 }
44707 
44708 /* "cfemIntegrals.pyx":6708
44709  * <double*> qV.data)
44710  *
44711  * def updateDiffusion_MixedForm_weak_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
44712  * np.ndarray colind,
44713  * np.ndarray a,
44714  */
44715 
44716 /* Python wrapper */
44717 static PyObject *__pyx_pw_13cfemIntegrals_381updateDiffusion_MixedForm_weak_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
44718 static PyMethodDef __pyx_mdef_13cfemIntegrals_381updateDiffusion_MixedForm_weak_sd = {"updateDiffusion_MixedForm_weak_sd", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_381updateDiffusion_MixedForm_weak_sd, METH_VARARGS|METH_KEYWORDS, 0};
44719 static PyObject *__pyx_pw_13cfemIntegrals_381updateDiffusion_MixedForm_weak_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
44720  PyArrayObject *__pyx_v_rowptr = 0;
44721  PyArrayObject *__pyx_v_colind = 0;
44722  PyArrayObject *__pyx_v_a = 0;
44723  PyArrayObject *__pyx_v_qV = 0;
44724  PyArrayObject *__pyx_v_grad_w_dV = 0;
44725  PyArrayObject *__pyx_v_velocity = 0;
44726  PyArrayObject *__pyx_v_residual = 0;
44727  int __pyx_v_rho_split;
44728  int __pyx_lineno = 0;
44729  const char *__pyx_filename = NULL;
44730  int __pyx_clineno = 0;
44731  PyObject *__pyx_r = 0;
44732  __Pyx_RefNannyDeclarations
44733  __Pyx_RefNannySetupContext("updateDiffusion_MixedForm_weak_sd (wrapper)", 0);
44734  {
44735  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rowptr,&__pyx_n_s_colind,&__pyx_n_s_a,&__pyx_n_s_qV,&__pyx_n_s_grad_w_dV,&__pyx_n_s_velocity,&__pyx_n_s_residual,&__pyx_n_s_rho_split,0};
44736  PyObject* values[8] = {0,0,0,0,0,0,0,0};
44737  if (unlikely(__pyx_kwds)) {
44738  Py_ssize_t kw_args;
44739  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
44740  switch (pos_args) {
44741  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
44742  CYTHON_FALLTHROUGH;
44743  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
44744  CYTHON_FALLTHROUGH;
44745  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
44746  CYTHON_FALLTHROUGH;
44747  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
44748  CYTHON_FALLTHROUGH;
44749  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
44750  CYTHON_FALLTHROUGH;
44751  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
44752  CYTHON_FALLTHROUGH;
44753  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
44754  CYTHON_FALLTHROUGH;
44755  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
44756  CYTHON_FALLTHROUGH;
44757  case 0: break;
44758  default: goto __pyx_L5_argtuple_error;
44759  }
44760  kw_args = PyDict_Size(__pyx_kwds);
44761  switch (pos_args) {
44762  case 0:
44763  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rowptr)) != 0)) kw_args--;
44764  else goto __pyx_L5_argtuple_error;
44765  CYTHON_FALLTHROUGH;
44766  case 1:
44767  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_colind)) != 0)) kw_args--;
44768  else {
44769  __Pyx_RaiseArgtupleInvalid("updateDiffusion_MixedForm_weak_sd", 1, 8, 8, 1); __PYX_ERR(0, 6708, __pyx_L3_error)
44770  }
44771  CYTHON_FALLTHROUGH;
44772  case 2:
44773  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
44774  else {
44775  __Pyx_RaiseArgtupleInvalid("updateDiffusion_MixedForm_weak_sd", 1, 8, 8, 2); __PYX_ERR(0, 6708, __pyx_L3_error)
44776  }
44777  CYTHON_FALLTHROUGH;
44778  case 3:
44779  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_qV)) != 0)) kw_args--;
44780  else {
44781  __Pyx_RaiseArgtupleInvalid("updateDiffusion_MixedForm_weak_sd", 1, 8, 8, 3); __PYX_ERR(0, 6708, __pyx_L3_error)
44782  }
44783  CYTHON_FALLTHROUGH;
44784  case 4:
44785  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_w_dV)) != 0)) kw_args--;
44786  else {
44787  __Pyx_RaiseArgtupleInvalid("updateDiffusion_MixedForm_weak_sd", 1, 8, 8, 4); __PYX_ERR(0, 6708, __pyx_L3_error)
44788  }
44789  CYTHON_FALLTHROUGH;
44790  case 5:
44791  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_velocity)) != 0)) kw_args--;
44792  else {
44793  __Pyx_RaiseArgtupleInvalid("updateDiffusion_MixedForm_weak_sd", 1, 8, 8, 5); __PYX_ERR(0, 6708, __pyx_L3_error)
44794  }
44795  CYTHON_FALLTHROUGH;
44796  case 6:
44797  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_residual)) != 0)) kw_args--;
44798  else {
44799  __Pyx_RaiseArgtupleInvalid("updateDiffusion_MixedForm_weak_sd", 1, 8, 8, 6); __PYX_ERR(0, 6708, __pyx_L3_error)
44800  }
44801  CYTHON_FALLTHROUGH;
44802  case 7:
44803  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rho_split)) != 0)) kw_args--;
44804  else {
44805  __Pyx_RaiseArgtupleInvalid("updateDiffusion_MixedForm_weak_sd", 1, 8, 8, 7); __PYX_ERR(0, 6708, __pyx_L3_error)
44806  }
44807  }
44808  if (unlikely(kw_args > 0)) {
44809  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateDiffusion_MixedForm_weak_sd") < 0)) __PYX_ERR(0, 6708, __pyx_L3_error)
44810  }
44811  } else if (PyTuple_GET_SIZE(__pyx_args) != 8) {
44812  goto __pyx_L5_argtuple_error;
44813  } else {
44814  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
44815  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
44816  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
44817  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
44818  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
44819  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
44820  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
44821  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
44822  }
44823  __pyx_v_rowptr = ((PyArrayObject *)values[0]);
44824  __pyx_v_colind = ((PyArrayObject *)values[1]);
44825  __pyx_v_a = ((PyArrayObject *)values[2]);
44826  __pyx_v_qV = ((PyArrayObject *)values[3]);
44827  __pyx_v_grad_w_dV = ((PyArrayObject *)values[4]);
44828  __pyx_v_velocity = ((PyArrayObject *)values[5]);
44829  __pyx_v_residual = ((PyArrayObject *)values[6]);
44830  __pyx_v_rho_split = __Pyx_PyInt_As_int(values[7]); if (unlikely((__pyx_v_rho_split == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6715, __pyx_L3_error)
44831  }
44832  goto __pyx_L4_argument_unpacking_done;
44833  __pyx_L5_argtuple_error:;
44834  __Pyx_RaiseArgtupleInvalid("updateDiffusion_MixedForm_weak_sd", 1, 8, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6708, __pyx_L3_error)
44835  __pyx_L3_error:;
44836  __Pyx_AddTraceback("cfemIntegrals.updateDiffusion_MixedForm_weak_sd", __pyx_clineno, __pyx_lineno, __pyx_filename);
44837  __Pyx_RefNannyFinishContext();
44838  return NULL;
44839  __pyx_L4_argument_unpacking_done:;
44840  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rowptr), __pyx_ptype_5numpy_ndarray, 1, "rowptr", 0))) __PYX_ERR(0, 6708, __pyx_L1_error)
44841  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_colind), __pyx_ptype_5numpy_ndarray, 1, "colind", 0))) __PYX_ERR(0, 6709, __pyx_L1_error)
44842  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1, "a", 0))) __PYX_ERR(0, 6710, __pyx_L1_error)
44843  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_qV), __pyx_ptype_5numpy_ndarray, 1, "qV", 0))) __PYX_ERR(0, 6711, __pyx_L1_error)
44844  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_w_dV), __pyx_ptype_5numpy_ndarray, 1, "grad_w_dV", 0))) __PYX_ERR(0, 6712, __pyx_L1_error)
44845  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_velocity), __pyx_ptype_5numpy_ndarray, 1, "velocity", 0))) __PYX_ERR(0, 6713, __pyx_L1_error)
44846  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_residual), __pyx_ptype_5numpy_ndarray, 1, "residual", 0))) __PYX_ERR(0, 6714, __pyx_L1_error)
44847  __pyx_r = __pyx_pf_13cfemIntegrals_380updateDiffusion_MixedForm_weak_sd(__pyx_self, __pyx_v_rowptr, __pyx_v_colind, __pyx_v_a, __pyx_v_qV, __pyx_v_grad_w_dV, __pyx_v_velocity, __pyx_v_residual, __pyx_v_rho_split);
44848 
44849  /* function exit code */
44850  goto __pyx_L0;
44851  __pyx_L1_error:;
44852  __pyx_r = NULL;
44853  __pyx_L0:;
44854  __Pyx_RefNannyFinishContext();
44855  return __pyx_r;
44856 }
44857 
44858 static PyObject *__pyx_pf_13cfemIntegrals_380updateDiffusion_MixedForm_weak_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_qV, PyArrayObject *__pyx_v_grad_w_dV, PyArrayObject *__pyx_v_velocity, PyArrayObject *__pyx_v_residual, int __pyx_v_rho_split) {
44859  PyObject *__pyx_r = NULL;
44860  __Pyx_RefNannyDeclarations
44861  __Pyx_RefNannySetupContext("updateDiffusion_MixedForm_weak_sd", 0);
44862 
44863  /* "cfemIntegrals.pyx":6716
44864  * np.ndarray residual,
44865  * int rho_split):
44866  * cupdateDiffusion_MixedForm_weak_sd(grad_w_dV.shape[0], # <<<<<<<<<<<<<<
44867  * grad_w_dV.shape[1],
44868  * grad_w_dV.shape[2],
44869  */
44870  updateDiffusion_MixedForm_weak_sd((__pyx_v_grad_w_dV->dimensions[0]), (__pyx_v_grad_w_dV->dimensions[1]), (__pyx_v_grad_w_dV->dimensions[2]), (__pyx_v_grad_w_dV->dimensions[3]), __pyx_v_rho_split, ((int *)__pyx_v_rowptr->data), ((int *)__pyx_v_colind->data), ((double *)__pyx_v_a->data), ((double *)__pyx_v_qV->data), ((double *)__pyx_v_grad_w_dV->data), ((double *)__pyx_v_velocity->data), ((double *)__pyx_v_residual->data));
44871 
44872  /* "cfemIntegrals.pyx":6708
44873  * <double*> qV.data)
44874  *
44875  * def updateDiffusion_MixedForm_weak_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
44876  * np.ndarray colind,
44877  * np.ndarray a,
44878  */
44879 
44880  /* function exit code */
44881  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
44882  __Pyx_XGIVEREF(__pyx_r);
44883  __Pyx_RefNannyFinishContext();
44884  return __pyx_r;
44885 }
44886 
44887 /* "cfemIntegrals.pyx":6729
44888  * <double*> residual.data)
44889  *
44890  * def calculateVelocityQuadrature_MixedForm2_Jacobian_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
44891  * np.ndarray colind,
44892  * np.ndarray qa,
44893  */
44894 
44895 /* Python wrapper */
44896 static PyObject *__pyx_pw_13cfemIntegrals_383calculateVelocityQuadrature_MixedForm2_Jacobian_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
44897 static PyMethodDef __pyx_mdef_13cfemIntegrals_383calculateVelocityQuadrature_MixedForm2_Jacobian_sd = {"calculateVelocityQuadrature_MixedForm2_Jacobian_sd", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_383calculateVelocityQuadrature_MixedForm2_Jacobian_sd, METH_VARARGS|METH_KEYWORDS, 0};
44898 static PyObject *__pyx_pw_13cfemIntegrals_383calculateVelocityQuadrature_MixedForm2_Jacobian_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
44899  PyArrayObject *__pyx_v_rowptr = 0;
44900  PyArrayObject *__pyx_v_colind = 0;
44901  PyArrayObject *__pyx_v_qa = 0;
44902  PyArrayObject *__pyx_v_qw_dV = 0;
44903  PyArrayObject *__pyx_v_db = 0;
44904  PyArrayObject *__pyx_v_db_eb = 0;
44905  PyArrayObject *__pyx_v_v = 0;
44906  PyArrayObject *__pyx_v_DV = 0;
44907  PyArrayObject *__pyx_v_DV_eb = 0;
44908  PyArrayObject *__pyx_v_qv = 0;
44909  PyArrayObject *__pyx_v_qDV = 0;
44910  PyArrayObject *__pyx_v_qDV_eb = 0;
44911  int __pyx_lineno = 0;
44912  const char *__pyx_filename = NULL;
44913  int __pyx_clineno = 0;
44914  PyObject *__pyx_r = 0;
44915  __Pyx_RefNannyDeclarations
44916  __Pyx_RefNannySetupContext("calculateVelocityQuadrature_MixedForm2_Jacobian_sd (wrapper)", 0);
44917  {
44918  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rowptr,&__pyx_n_s_colind,&__pyx_n_s_qa,&__pyx_n_s_qw_dV,&__pyx_n_s_db,&__pyx_n_s_db_eb,&__pyx_n_s_v,&__pyx_n_s_DV,&__pyx_n_s_DV_eb,&__pyx_n_s_qv,&__pyx_n_s_qDV,&__pyx_n_s_qDV_eb,0};
44919  PyObject* values[12] = {0,0,0,0,0,0,0,0,0,0,0,0};
44920  if (unlikely(__pyx_kwds)) {
44921  Py_ssize_t kw_args;
44922  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
44923  switch (pos_args) {
44924  case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
44925  CYTHON_FALLTHROUGH;
44926  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
44927  CYTHON_FALLTHROUGH;
44928  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
44929  CYTHON_FALLTHROUGH;
44930  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
44931  CYTHON_FALLTHROUGH;
44932  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
44933  CYTHON_FALLTHROUGH;
44934  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
44935  CYTHON_FALLTHROUGH;
44936  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
44937  CYTHON_FALLTHROUGH;
44938  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
44939  CYTHON_FALLTHROUGH;
44940  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
44941  CYTHON_FALLTHROUGH;
44942  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
44943  CYTHON_FALLTHROUGH;
44944  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
44945  CYTHON_FALLTHROUGH;
44946  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
44947  CYTHON_FALLTHROUGH;
44948  case 0: break;
44949  default: goto __pyx_L5_argtuple_error;
44950  }
44951  kw_args = PyDict_Size(__pyx_kwds);
44952  switch (pos_args) {
44953  case 0:
44954  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rowptr)) != 0)) kw_args--;
44955  else goto __pyx_L5_argtuple_error;
44956  CYTHON_FALLTHROUGH;
44957  case 1:
44958  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_colind)) != 0)) kw_args--;
44959  else {
44960  __Pyx_RaiseArgtupleInvalid("calculateVelocityQuadrature_MixedForm2_Jacobian_sd", 1, 12, 12, 1); __PYX_ERR(0, 6729, __pyx_L3_error)
44961  }
44962  CYTHON_FALLTHROUGH;
44963  case 2:
44964  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_qa)) != 0)) kw_args--;
44965  else {
44966  __Pyx_RaiseArgtupleInvalid("calculateVelocityQuadrature_MixedForm2_Jacobian_sd", 1, 12, 12, 2); __PYX_ERR(0, 6729, __pyx_L3_error)
44967  }
44968  CYTHON_FALLTHROUGH;
44969  case 3:
44970  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_qw_dV)) != 0)) kw_args--;
44971  else {
44972  __Pyx_RaiseArgtupleInvalid("calculateVelocityQuadrature_MixedForm2_Jacobian_sd", 1, 12, 12, 3); __PYX_ERR(0, 6729, __pyx_L3_error)
44973  }
44974  CYTHON_FALLTHROUGH;
44975  case 4:
44976  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_db)) != 0)) kw_args--;
44977  else {
44978  __Pyx_RaiseArgtupleInvalid("calculateVelocityQuadrature_MixedForm2_Jacobian_sd", 1, 12, 12, 4); __PYX_ERR(0, 6729, __pyx_L3_error)
44979  }
44980  CYTHON_FALLTHROUGH;
44981  case 5:
44982  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_db_eb)) != 0)) kw_args--;
44983  else {
44984  __Pyx_RaiseArgtupleInvalid("calculateVelocityQuadrature_MixedForm2_Jacobian_sd", 1, 12, 12, 5); __PYX_ERR(0, 6729, __pyx_L3_error)
44985  }
44986  CYTHON_FALLTHROUGH;
44987  case 6:
44988  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
44989  else {
44990  __Pyx_RaiseArgtupleInvalid("calculateVelocityQuadrature_MixedForm2_Jacobian_sd", 1, 12, 12, 6); __PYX_ERR(0, 6729, __pyx_L3_error)
44991  }
44992  CYTHON_FALLTHROUGH;
44993  case 7:
44994  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_DV)) != 0)) kw_args--;
44995  else {
44996  __Pyx_RaiseArgtupleInvalid("calculateVelocityQuadrature_MixedForm2_Jacobian_sd", 1, 12, 12, 7); __PYX_ERR(0, 6729, __pyx_L3_error)
44997  }
44998  CYTHON_FALLTHROUGH;
44999  case 8:
45000  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_DV_eb)) != 0)) kw_args--;
45001  else {
45002  __Pyx_RaiseArgtupleInvalid("calculateVelocityQuadrature_MixedForm2_Jacobian_sd", 1, 12, 12, 8); __PYX_ERR(0, 6729, __pyx_L3_error)
45003  }
45004  CYTHON_FALLTHROUGH;
45005  case 9:
45006  if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_qv)) != 0)) kw_args--;
45007  else {
45008  __Pyx_RaiseArgtupleInvalid("calculateVelocityQuadrature_MixedForm2_Jacobian_sd", 1, 12, 12, 9); __PYX_ERR(0, 6729, __pyx_L3_error)
45009  }
45010  CYTHON_FALLTHROUGH;
45011  case 10:
45012  if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_qDV)) != 0)) kw_args--;
45013  else {
45014  __Pyx_RaiseArgtupleInvalid("calculateVelocityQuadrature_MixedForm2_Jacobian_sd", 1, 12, 12, 10); __PYX_ERR(0, 6729, __pyx_L3_error)
45015  }
45016  CYTHON_FALLTHROUGH;
45017  case 11:
45018  if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_qDV_eb)) != 0)) kw_args--;
45019  else {
45020  __Pyx_RaiseArgtupleInvalid("calculateVelocityQuadrature_MixedForm2_Jacobian_sd", 1, 12, 12, 11); __PYX_ERR(0, 6729, __pyx_L3_error)
45021  }
45022  }
45023  if (unlikely(kw_args > 0)) {
45024  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateVelocityQuadrature_MixedForm2_Jacobian_sd") < 0)) __PYX_ERR(0, 6729, __pyx_L3_error)
45025  }
45026  } else if (PyTuple_GET_SIZE(__pyx_args) != 12) {
45027  goto __pyx_L5_argtuple_error;
45028  } else {
45029  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
45030  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
45031  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
45032  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
45033  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
45034  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
45035  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
45036  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
45037  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
45038  values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
45039  values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
45040  values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
45041  }
45042  __pyx_v_rowptr = ((PyArrayObject *)values[0]);
45043  __pyx_v_colind = ((PyArrayObject *)values[1]);
45044  __pyx_v_qa = ((PyArrayObject *)values[2]);
45045  __pyx_v_qw_dV = ((PyArrayObject *)values[3]);
45046  __pyx_v_db = ((PyArrayObject *)values[4]);
45047  __pyx_v_db_eb = ((PyArrayObject *)values[5]);
45048  __pyx_v_v = ((PyArrayObject *)values[6]);
45049  __pyx_v_DV = ((PyArrayObject *)values[7]);
45050  __pyx_v_DV_eb = ((PyArrayObject *)values[8]);
45051  __pyx_v_qv = ((PyArrayObject *)values[9]);
45052  __pyx_v_qDV = ((PyArrayObject *)values[10]);
45053  __pyx_v_qDV_eb = ((PyArrayObject *)values[11]);
45054  }
45055  goto __pyx_L4_argument_unpacking_done;
45056  __pyx_L5_argtuple_error:;
45057  __Pyx_RaiseArgtupleInvalid("calculateVelocityQuadrature_MixedForm2_Jacobian_sd", 1, 12, 12, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6729, __pyx_L3_error)
45058  __pyx_L3_error:;
45059  __Pyx_AddTraceback("cfemIntegrals.calculateVelocityQuadrature_MixedForm2_Jacobian_sd", __pyx_clineno, __pyx_lineno, __pyx_filename);
45060  __Pyx_RefNannyFinishContext();
45061  return NULL;
45062  __pyx_L4_argument_unpacking_done:;
45063  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rowptr), __pyx_ptype_5numpy_ndarray, 1, "rowptr", 0))) __PYX_ERR(0, 6729, __pyx_L1_error)
45064  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_colind), __pyx_ptype_5numpy_ndarray, 1, "colind", 0))) __PYX_ERR(0, 6730, __pyx_L1_error)
45065  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_qa), __pyx_ptype_5numpy_ndarray, 1, "qa", 0))) __PYX_ERR(0, 6731, __pyx_L1_error)
45066  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_qw_dV), __pyx_ptype_5numpy_ndarray, 1, "qw_dV", 0))) __PYX_ERR(0, 6732, __pyx_L1_error)
45067  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_db), __pyx_ptype_5numpy_ndarray, 1, "db", 0))) __PYX_ERR(0, 6733, __pyx_L1_error)
45068  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_db_eb), __pyx_ptype_5numpy_ndarray, 1, "db_eb", 0))) __PYX_ERR(0, 6734, __pyx_L1_error)
45069  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), __pyx_ptype_5numpy_ndarray, 1, "v", 0))) __PYX_ERR(0, 6735, __pyx_L1_error)
45070  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_DV), __pyx_ptype_5numpy_ndarray, 1, "DV", 0))) __PYX_ERR(0, 6736, __pyx_L1_error)
45071  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_DV_eb), __pyx_ptype_5numpy_ndarray, 1, "DV_eb", 0))) __PYX_ERR(0, 6737, __pyx_L1_error)
45072  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_qv), __pyx_ptype_5numpy_ndarray, 1, "qv", 0))) __PYX_ERR(0, 6738, __pyx_L1_error)
45073  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_qDV), __pyx_ptype_5numpy_ndarray, 1, "qDV", 0))) __PYX_ERR(0, 6739, __pyx_L1_error)
45074  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_qDV_eb), __pyx_ptype_5numpy_ndarray, 1, "qDV_eb", 0))) __PYX_ERR(0, 6740, __pyx_L1_error)
45075  __pyx_r = __pyx_pf_13cfemIntegrals_382calculateVelocityQuadrature_MixedForm2_Jacobian_sd(__pyx_self, __pyx_v_rowptr, __pyx_v_colind, __pyx_v_qa, __pyx_v_qw_dV, __pyx_v_db, __pyx_v_db_eb, __pyx_v_v, __pyx_v_DV, __pyx_v_DV_eb, __pyx_v_qv, __pyx_v_qDV, __pyx_v_qDV_eb);
45076 
45077  /* function exit code */
45078  goto __pyx_L0;
45079  __pyx_L1_error:;
45080  __pyx_r = NULL;
45081  __pyx_L0:;
45082  __Pyx_RefNannyFinishContext();
45083  return __pyx_r;
45084 }
45085 
45086 static PyObject *__pyx_pf_13cfemIntegrals_382calculateVelocityQuadrature_MixedForm2_Jacobian_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_qa, PyArrayObject *__pyx_v_qw_dV, PyArrayObject *__pyx_v_db, PyArrayObject *__pyx_v_db_eb, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_DV, PyArrayObject *__pyx_v_DV_eb, PyArrayObject *__pyx_v_qv, PyArrayObject *__pyx_v_qDV, PyArrayObject *__pyx_v_qDV_eb) {
45087  PyObject *__pyx_r = NULL;
45088  __Pyx_RefNannyDeclarations
45089  __Pyx_RefNannySetupContext("calculateVelocityQuadrature_MixedForm2_Jacobian_sd", 0);
45090 
45091  /* "cfemIntegrals.pyx":6741
45092  * np.ndarray qDV,
45093  * np.ndarray qDV_eb):
45094  * ccalculateVelocityQuadrature_MixedForm2_Jacobian_sd(v.shape[0], # <<<<<<<<<<<<<<
45095  * v.shape[1],
45096  * v.shape[2],
45097  */
45098  calculateVelocityQuadrature_MixedForm2_Jacobian_sd((__pyx_v_v->dimensions[0]), (__pyx_v_v->dimensions[1]), (__pyx_v_v->dimensions[2]), (__pyx_v_v->dimensions[3]), (__pyx_v_db->dimensions[1]), (__pyx_v_qv->dimensions[1]), ((int *)__pyx_v_rowptr->data), ((int *)__pyx_v_colind->data), ((double *)__pyx_v_qa->data), ((double *)__pyx_v_qw_dV->data), ((double *)__pyx_v_db->data), ((double *)__pyx_v_db_eb->data), ((double *)__pyx_v_v->data), ((double *)__pyx_v_DV->data), ((double *)__pyx_v_DV_eb->data), ((double *)__pyx_v_qv->data), ((double *)__pyx_v_qDV->data), ((double *)__pyx_v_qDV_eb->data));
45099 
45100  /* "cfemIntegrals.pyx":6729
45101  * <double*> residual.data)
45102  *
45103  * def calculateVelocityQuadrature_MixedForm2_Jacobian_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
45104  * np.ndarray colind,
45105  * np.ndarray qa,
45106  */
45107 
45108  /* function exit code */
45109  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
45110  __Pyx_XGIVEREF(__pyx_r);
45111  __Pyx_RefNannyFinishContext();
45112  return __pyx_r;
45113 }
45114 
45115 /* "cfemIntegrals.pyx":6759
45116  * <double*> qDV.data,
45117  * <double*> qDV_eb.data)
45118  * def updateDiffusionJacobian_MixedForm_weak_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
45119  * np.ndarray colind,
45120  * np.ndarray a,
45121  */
45122 
45123 /* Python wrapper */
45124 static PyObject *__pyx_pw_13cfemIntegrals_385updateDiffusionJacobian_MixedForm_weak_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
45125 static PyMethodDef __pyx_mdef_13cfemIntegrals_385updateDiffusionJacobian_MixedForm_weak_sd = {"updateDiffusionJacobian_MixedForm_weak_sd", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13cfemIntegrals_385updateDiffusionJacobian_MixedForm_weak_sd, METH_VARARGS|METH_KEYWORDS, 0};
45126 static PyObject *__pyx_pw_13cfemIntegrals_385updateDiffusionJacobian_MixedForm_weak_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
45127  PyArrayObject *__pyx_v_rowptr = 0;
45128  PyArrayObject *__pyx_v_colind = 0;
45129  PyArrayObject *__pyx_v_a = 0;
45130  PyArrayObject *__pyx_v_da = 0;
45131  PyArrayObject *__pyx_v_qV = 0;
45132  PyArrayObject *__pyx_v_qDV = 0;
45133  PyArrayObject *__pyx_v_qDV_eb = 0;
45134  PyArrayObject *__pyx_v_grad_w_dV = 0;
45135  PyArrayObject *__pyx_v_v = 0;
45136  PyArrayObject *__pyx_v_jacobian = 0;
45137  PyArrayObject *__pyx_v_jacobian_eb = 0;
45138  int __pyx_lineno = 0;
45139  const char *__pyx_filename = NULL;
45140  int __pyx_clineno = 0;
45141  PyObject *__pyx_r = 0;
45142  __Pyx_RefNannyDeclarations
45143  __Pyx_RefNannySetupContext("updateDiffusionJacobian_MixedForm_weak_sd (wrapper)", 0);
45144  {
45145  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rowptr,&__pyx_n_s_colind,&__pyx_n_s_a,&__pyx_n_s_da,&__pyx_n_s_qV,&__pyx_n_s_qDV,&__pyx_n_s_qDV_eb,&__pyx_n_s_grad_w_dV,&__pyx_n_s_v,&__pyx_n_s_jacobian,&__pyx_n_s_jacobian_eb,0};
45146  PyObject* values[11] = {0,0,0,0,0,0,0,0,0,0,0};
45147  if (unlikely(__pyx_kwds)) {
45148  Py_ssize_t kw_args;
45149  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
45150  switch (pos_args) {
45151  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
45152  CYTHON_FALLTHROUGH;
45153  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
45154  CYTHON_FALLTHROUGH;
45155  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
45156  CYTHON_FALLTHROUGH;
45157  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
45158  CYTHON_FALLTHROUGH;
45159  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
45160  CYTHON_FALLTHROUGH;
45161  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
45162  CYTHON_FALLTHROUGH;
45163  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
45164  CYTHON_FALLTHROUGH;
45165  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
45166  CYTHON_FALLTHROUGH;
45167  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
45168  CYTHON_FALLTHROUGH;
45169  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
45170  CYTHON_FALLTHROUGH;
45171  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
45172  CYTHON_FALLTHROUGH;
45173  case 0: break;
45174  default: goto __pyx_L5_argtuple_error;
45175  }
45176  kw_args = PyDict_Size(__pyx_kwds);
45177  switch (pos_args) {
45178  case 0:
45179  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rowptr)) != 0)) kw_args--;
45180  else goto __pyx_L5_argtuple_error;
45181  CYTHON_FALLTHROUGH;
45182  case 1:
45183  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_colind)) != 0)) kw_args--;
45184  else {
45185  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_MixedForm_weak_sd", 1, 11, 11, 1); __PYX_ERR(0, 6759, __pyx_L3_error)
45186  }
45187  CYTHON_FALLTHROUGH;
45188  case 2:
45189  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
45190  else {
45191  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_MixedForm_weak_sd", 1, 11, 11, 2); __PYX_ERR(0, 6759, __pyx_L3_error)
45192  }
45193  CYTHON_FALLTHROUGH;
45194  case 3:
45195  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_da)) != 0)) kw_args--;
45196  else {
45197  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_MixedForm_weak_sd", 1, 11, 11, 3); __PYX_ERR(0, 6759, __pyx_L3_error)
45198  }
45199  CYTHON_FALLTHROUGH;
45200  case 4:
45201  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_qV)) != 0)) kw_args--;
45202  else {
45203  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_MixedForm_weak_sd", 1, 11, 11, 4); __PYX_ERR(0, 6759, __pyx_L3_error)
45204  }
45205  CYTHON_FALLTHROUGH;
45206  case 5:
45207  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_qDV)) != 0)) kw_args--;
45208  else {
45209  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_MixedForm_weak_sd", 1, 11, 11, 5); __PYX_ERR(0, 6759, __pyx_L3_error)
45210  }
45211  CYTHON_FALLTHROUGH;
45212  case 6:
45213  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_qDV_eb)) != 0)) kw_args--;
45214  else {
45215  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_MixedForm_weak_sd", 1, 11, 11, 6); __PYX_ERR(0, 6759, __pyx_L3_error)
45216  }
45217  CYTHON_FALLTHROUGH;
45218  case 7:
45219  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_w_dV)) != 0)) kw_args--;
45220  else {
45221  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_MixedForm_weak_sd", 1, 11, 11, 7); __PYX_ERR(0, 6759, __pyx_L3_error)
45222  }
45223  CYTHON_FALLTHROUGH;
45224  case 8:
45225  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
45226  else {
45227  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_MixedForm_weak_sd", 1, 11, 11, 8); __PYX_ERR(0, 6759, __pyx_L3_error)
45228  }
45229  CYTHON_FALLTHROUGH;
45230  case 9:
45231  if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jacobian)) != 0)) kw_args--;
45232  else {
45233  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_MixedForm_weak_sd", 1, 11, 11, 9); __PYX_ERR(0, 6759, __pyx_L3_error)
45234  }
45235  CYTHON_FALLTHROUGH;
45236  case 10:
45237  if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jacobian_eb)) != 0)) kw_args--;
45238  else {
45239  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_MixedForm_weak_sd", 1, 11, 11, 10); __PYX_ERR(0, 6759, __pyx_L3_error)
45240  }
45241  }
45242  if (unlikely(kw_args > 0)) {
45243  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateDiffusionJacobian_MixedForm_weak_sd") < 0)) __PYX_ERR(0, 6759, __pyx_L3_error)
45244  }
45245  } else if (PyTuple_GET_SIZE(__pyx_args) != 11) {
45246  goto __pyx_L5_argtuple_error;
45247  } else {
45248  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
45249  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
45250  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
45251  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
45252  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
45253  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
45254  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
45255  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
45256  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
45257  values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
45258  values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
45259  }
45260  __pyx_v_rowptr = ((PyArrayObject *)values[0]);
45261  __pyx_v_colind = ((PyArrayObject *)values[1]);
45262  __pyx_v_a = ((PyArrayObject *)values[2]);
45263  __pyx_v_da = ((PyArrayObject *)values[3]);
45264  __pyx_v_qV = ((PyArrayObject *)values[4]);
45265  __pyx_v_qDV = ((PyArrayObject *)values[5]);
45266  __pyx_v_qDV_eb = ((PyArrayObject *)values[6]);
45267  __pyx_v_grad_w_dV = ((PyArrayObject *)values[7]);
45268  __pyx_v_v = ((PyArrayObject *)values[8]);
45269  __pyx_v_jacobian = ((PyArrayObject *)values[9]);
45270  __pyx_v_jacobian_eb = ((PyArrayObject *)values[10]);
45271  }
45272  goto __pyx_L4_argument_unpacking_done;
45273  __pyx_L5_argtuple_error:;
45274  __Pyx_RaiseArgtupleInvalid("updateDiffusionJacobian_MixedForm_weak_sd", 1, 11, 11, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6759, __pyx_L3_error)
45275  __pyx_L3_error:;
45276  __Pyx_AddTraceback("cfemIntegrals.updateDiffusionJacobian_MixedForm_weak_sd", __pyx_clineno, __pyx_lineno, __pyx_filename);
45277  __Pyx_RefNannyFinishContext();
45278  return NULL;
45279  __pyx_L4_argument_unpacking_done:;
45280  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rowptr), __pyx_ptype_5numpy_ndarray, 1, "rowptr", 0))) __PYX_ERR(0, 6759, __pyx_L1_error)
45281  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_colind), __pyx_ptype_5numpy_ndarray, 1, "colind", 0))) __PYX_ERR(0, 6760, __pyx_L1_error)
45282  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1, "a", 0))) __PYX_ERR(0, 6761, __pyx_L1_error)
45283  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_da), __pyx_ptype_5numpy_ndarray, 1, "da", 0))) __PYX_ERR(0, 6762, __pyx_L1_error)
45284  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_qV), __pyx_ptype_5numpy_ndarray, 1, "qV", 0))) __PYX_ERR(0, 6763, __pyx_L1_error)
45285  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_qDV), __pyx_ptype_5numpy_ndarray, 1, "qDV", 0))) __PYX_ERR(0, 6764, __pyx_L1_error)
45286  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_qDV_eb), __pyx_ptype_5numpy_ndarray, 1, "qDV_eb", 0))) __PYX_ERR(0, 6765, __pyx_L1_error)
45287  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_w_dV), __pyx_ptype_5numpy_ndarray, 1, "grad_w_dV", 0))) __PYX_ERR(0, 6766, __pyx_L1_error)
45288  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), __pyx_ptype_5numpy_ndarray, 1, "v", 0))) __PYX_ERR(0, 6767, __pyx_L1_error)
45289  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_jacobian), __pyx_ptype_5numpy_ndarray, 1, "jacobian", 0))) __PYX_ERR(0, 6768, __pyx_L1_error)
45290  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_jacobian_eb), __pyx_ptype_5numpy_ndarray, 1, "jacobian_eb", 0))) __PYX_ERR(0, 6769, __pyx_L1_error)
45291  __pyx_r = __pyx_pf_13cfemIntegrals_384updateDiffusionJacobian_MixedForm_weak_sd(__pyx_self, __pyx_v_rowptr, __pyx_v_colind, __pyx_v_a, __pyx_v_da, __pyx_v_qV, __pyx_v_qDV, __pyx_v_qDV_eb, __pyx_v_grad_w_dV, __pyx_v_v, __pyx_v_jacobian, __pyx_v_jacobian_eb);
45292 
45293  /* function exit code */
45294  goto __pyx_L0;
45295  __pyx_L1_error:;
45296  __pyx_r = NULL;
45297  __pyx_L0:;
45298  __Pyx_RefNannyFinishContext();
45299  return __pyx_r;
45300 }
45301 
45302 static PyObject *__pyx_pf_13cfemIntegrals_384updateDiffusionJacobian_MixedForm_weak_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_da, PyArrayObject *__pyx_v_qV, PyArrayObject *__pyx_v_qDV, PyArrayObject *__pyx_v_qDV_eb, PyArrayObject *__pyx_v_grad_w_dV, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_jacobian, PyArrayObject *__pyx_v_jacobian_eb) {
45303  PyObject *__pyx_r = NULL;
45304  __Pyx_RefNannyDeclarations
45305  __Pyx_RefNannySetupContext("updateDiffusionJacobian_MixedForm_weak_sd", 0);
45306 
45307  /* "cfemIntegrals.pyx":6770
45308  * np.ndarray jacobian,
45309  * np.ndarray jacobian_eb):
45310  * cupdateDiffusionJacobian_MixedForm_weak_sd(qDV_eb.shape[0], # <<<<<<<<<<<<<<
45311  * qDV_eb.shape[1],
45312  * qDV_eb.shape[2],
45313  */
45314  updateDiffusionJacobian_MixedForm_weak_sd((__pyx_v_qDV_eb->dimensions[0]), (__pyx_v_qDV_eb->dimensions[1]), (__pyx_v_qDV_eb->dimensions[2]), (__pyx_v_qDV_eb->dimensions[3]), (__pyx_v_grad_w_dV->dimensions[2]), (__pyx_v_grad_w_dV->dimensions[3]), ((int *)__pyx_v_rowptr->data), ((int *)__pyx_v_colind->data), ((double *)__pyx_v_a->data), ((double *)__pyx_v_da->data), ((double *)__pyx_v_qV->data), ((double *)__pyx_v_qDV->data), ((double *)__pyx_v_qDV_eb->data), ((double *)__pyx_v_grad_w_dV->data), ((double *)__pyx_v_v->data), ((double *)__pyx_v_jacobian->data), ((double *)__pyx_v_jacobian_eb->data));
45315 
45316  /* "cfemIntegrals.pyx":6759
45317  * <double*> qDV.data,
45318  * <double*> qDV_eb.data)
45319  * def updateDiffusionJacobian_MixedForm_weak_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
45320  * np.ndarray colind,
45321  * np.ndarray a,
45322  */
45323 
45324  /* function exit code */
45325  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
45326  __Pyx_XGIVEREF(__pyx_r);
45327  __Pyx_RefNannyFinishContext();
45328  return __pyx_r;
45329 }
45330 
45331 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":735
45332  * ctypedef npy_cdouble complex_t
45333  *
45334  * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
45335  * return PyArray_MultiIterNew(1, <void*>a)
45336  *
45337  */
45338 
45339 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
45340  PyObject *__pyx_r = NULL;
45341  __Pyx_RefNannyDeclarations
45342  PyObject *__pyx_t_1 = NULL;
45343  int __pyx_lineno = 0;
45344  const char *__pyx_filename = NULL;
45345  int __pyx_clineno = 0;
45346  __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0);
45347 
45348  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":736
45349  *
45350  * cdef inline object PyArray_MultiIterNew1(a):
45351  * return PyArray_MultiIterNew(1, <void*>a) # <<<<<<<<<<<<<<
45352  *
45353  * cdef inline object PyArray_MultiIterNew2(a, b):
45354  */
45355  __Pyx_XDECREF(__pyx_r);
45356  __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 736, __pyx_L1_error)
45357  __Pyx_GOTREF(__pyx_t_1);
45358  __pyx_r = __pyx_t_1;
45359  __pyx_t_1 = 0;
45360  goto __pyx_L0;
45361 
45362  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":735
45363  * ctypedef npy_cdouble complex_t
45364  *
45365  * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
45366  * return PyArray_MultiIterNew(1, <void*>a)
45367  *
45368  */
45369 
45370  /* function exit code */
45371  __pyx_L1_error:;
45372  __Pyx_XDECREF(__pyx_t_1);
45373  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename);
45374  __pyx_r = 0;
45375  __pyx_L0:;
45376  __Pyx_XGIVEREF(__pyx_r);
45377  __Pyx_RefNannyFinishContext();
45378  return __pyx_r;
45379 }
45380 
45381 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":738
45382  * return PyArray_MultiIterNew(1, <void*>a)
45383  *
45384  * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
45385  * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
45386  *
45387  */
45388 
45389 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
45390  PyObject *__pyx_r = NULL;
45391  __Pyx_RefNannyDeclarations
45392  PyObject *__pyx_t_1 = NULL;
45393  int __pyx_lineno = 0;
45394  const char *__pyx_filename = NULL;
45395  int __pyx_clineno = 0;
45396  __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0);
45397 
45398  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":739
45399  *
45400  * cdef inline object PyArray_MultiIterNew2(a, b):
45401  * return PyArray_MultiIterNew(2, <void*>a, <void*>b) # <<<<<<<<<<<<<<
45402  *
45403  * cdef inline object PyArray_MultiIterNew3(a, b, c):
45404  */
45405  __Pyx_XDECREF(__pyx_r);
45406  __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 739, __pyx_L1_error)
45407  __Pyx_GOTREF(__pyx_t_1);
45408  __pyx_r = __pyx_t_1;
45409  __pyx_t_1 = 0;
45410  goto __pyx_L0;
45411 
45412  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":738
45413  * return PyArray_MultiIterNew(1, <void*>a)
45414  *
45415  * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
45416  * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
45417  *
45418  */
45419 
45420  /* function exit code */
45421  __pyx_L1_error:;
45422  __Pyx_XDECREF(__pyx_t_1);
45423  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename);
45424  __pyx_r = 0;
45425  __pyx_L0:;
45426  __Pyx_XGIVEREF(__pyx_r);
45427  __Pyx_RefNannyFinishContext();
45428  return __pyx_r;
45429 }
45430 
45431 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":741
45432  * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
45433  *
45434  * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
45435  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
45436  *
45437  */
45438 
45439 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
45440  PyObject *__pyx_r = NULL;
45441  __Pyx_RefNannyDeclarations
45442  PyObject *__pyx_t_1 = NULL;
45443  int __pyx_lineno = 0;
45444  const char *__pyx_filename = NULL;
45445  int __pyx_clineno = 0;
45446  __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0);
45447 
45448  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":742
45449  *
45450  * cdef inline object PyArray_MultiIterNew3(a, b, c):
45451  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c) # <<<<<<<<<<<<<<
45452  *
45453  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
45454  */
45455  __Pyx_XDECREF(__pyx_r);
45456  __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 742, __pyx_L1_error)
45457  __Pyx_GOTREF(__pyx_t_1);
45458  __pyx_r = __pyx_t_1;
45459  __pyx_t_1 = 0;
45460  goto __pyx_L0;
45461 
45462  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":741
45463  * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
45464  *
45465  * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
45466  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
45467  *
45468  */
45469 
45470  /* function exit code */
45471  __pyx_L1_error:;
45472  __Pyx_XDECREF(__pyx_t_1);
45473  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename);
45474  __pyx_r = 0;
45475  __pyx_L0:;
45476  __Pyx_XGIVEREF(__pyx_r);
45477  __Pyx_RefNannyFinishContext();
45478  return __pyx_r;
45479 }
45480 
45481 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":744
45482  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
45483  *
45484  * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
45485  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
45486  *
45487  */
45488 
45489 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) {
45490  PyObject *__pyx_r = NULL;
45491  __Pyx_RefNannyDeclarations
45492  PyObject *__pyx_t_1 = NULL;
45493  int __pyx_lineno = 0;
45494  const char *__pyx_filename = NULL;
45495  int __pyx_clineno = 0;
45496  __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0);
45497 
45498  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":745
45499  *
45500  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
45501  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d) # <<<<<<<<<<<<<<
45502  *
45503  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
45504  */
45505  __Pyx_XDECREF(__pyx_r);
45506  __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 745, __pyx_L1_error)
45507  __Pyx_GOTREF(__pyx_t_1);
45508  __pyx_r = __pyx_t_1;
45509  __pyx_t_1 = 0;
45510  goto __pyx_L0;
45511 
45512  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":744
45513  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
45514  *
45515  * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
45516  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
45517  *
45518  */
45519 
45520  /* function exit code */
45521  __pyx_L1_error:;
45522  __Pyx_XDECREF(__pyx_t_1);
45523  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename);
45524  __pyx_r = 0;
45525  __pyx_L0:;
45526  __Pyx_XGIVEREF(__pyx_r);
45527  __Pyx_RefNannyFinishContext();
45528  return __pyx_r;
45529 }
45530 
45531 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":747
45532  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
45533  *
45534  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
45535  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
45536  *
45537  */
45538 
45539 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) {
45540  PyObject *__pyx_r = NULL;
45541  __Pyx_RefNannyDeclarations
45542  PyObject *__pyx_t_1 = NULL;
45543  int __pyx_lineno = 0;
45544  const char *__pyx_filename = NULL;
45545  int __pyx_clineno = 0;
45546  __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0);
45547 
45548  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":748
45549  *
45550  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
45551  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e) # <<<<<<<<<<<<<<
45552  *
45553  * cdef inline tuple PyDataType_SHAPE(dtype d):
45554  */
45555  __Pyx_XDECREF(__pyx_r);
45556  __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 748, __pyx_L1_error)
45557  __Pyx_GOTREF(__pyx_t_1);
45558  __pyx_r = __pyx_t_1;
45559  __pyx_t_1 = 0;
45560  goto __pyx_L0;
45561 
45562  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":747
45563  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
45564  *
45565  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
45566  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
45567  *
45568  */
45569 
45570  /* function exit code */
45571  __pyx_L1_error:;
45572  __Pyx_XDECREF(__pyx_t_1);
45573  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename);
45574  __pyx_r = 0;
45575  __pyx_L0:;
45576  __Pyx_XGIVEREF(__pyx_r);
45577  __Pyx_RefNannyFinishContext();
45578  return __pyx_r;
45579 }
45580 
45581 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":750
45582  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
45583  *
45584  * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<<
45585  * if PyDataType_HASSUBARRAY(d):
45586  * return <tuple>d.subarray.shape
45587  */
45588 
45589 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) {
45590  PyObject *__pyx_r = NULL;
45591  __Pyx_RefNannyDeclarations
45592  int __pyx_t_1;
45593  __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0);
45594 
45595  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":751
45596  *
45597  * cdef inline tuple PyDataType_SHAPE(dtype d):
45598  * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<<
45599  * return <tuple>d.subarray.shape
45600  * else:
45601  */
45602  __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0);
45603  if (__pyx_t_1) {
45604 
45605  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":752
45606  * cdef inline tuple PyDataType_SHAPE(dtype d):
45607  * if PyDataType_HASSUBARRAY(d):
45608  * return <tuple>d.subarray.shape # <<<<<<<<<<<<<<
45609  * else:
45610  * return ()
45611  */
45612  __Pyx_XDECREF(__pyx_r);
45613  __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape));
45614  __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape);
45615  goto __pyx_L0;
45616 
45617  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":751
45618  *
45619  * cdef inline tuple PyDataType_SHAPE(dtype d):
45620  * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<<
45621  * return <tuple>d.subarray.shape
45622  * else:
45623  */
45624  }
45625 
45626  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":754
45627  * return <tuple>d.subarray.shape
45628  * else:
45629  * return () # <<<<<<<<<<<<<<
45630  *
45631  *
45632  */
45633  /*else*/ {
45634  __Pyx_XDECREF(__pyx_r);
45635  __Pyx_INCREF(__pyx_empty_tuple);
45636  __pyx_r = __pyx_empty_tuple;
45637  goto __pyx_L0;
45638  }
45639 
45640  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":750
45641  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
45642  *
45643  * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<<
45644  * if PyDataType_HASSUBARRAY(d):
45645  * return <tuple>d.subarray.shape
45646  */
45647 
45648  /* function exit code */
45649  __pyx_L0:;
45650  __Pyx_XGIVEREF(__pyx_r);
45651  __Pyx_RefNannyFinishContext();
45652  return __pyx_r;
45653 }
45654 
45655 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":929
45656  * int _import_umath() except -1
45657  *
45658  * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
45659  * Py_INCREF(base) # important to do this before stealing the reference below!
45660  * PyArray_SetBaseObject(arr, base)
45661  */
45662 
45663 static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
45664  __Pyx_RefNannyDeclarations
45665  __Pyx_RefNannySetupContext("set_array_base", 0);
45666 
45667  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":930
45668  *
45669  * cdef inline void set_array_base(ndarray arr, object base):
45670  * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<<
45671  * PyArray_SetBaseObject(arr, base)
45672  *
45673  */
45674  Py_INCREF(__pyx_v_base);
45675 
45676  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":931
45677  * cdef inline void set_array_base(ndarray arr, object base):
45678  * Py_INCREF(base) # important to do this before stealing the reference below!
45679  * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<<
45680  *
45681  * cdef inline object get_array_base(ndarray arr):
45682  */
45683  (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base));
45684 
45685  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":929
45686  * int _import_umath() except -1
45687  *
45688  * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
45689  * Py_INCREF(base) # important to do this before stealing the reference below!
45690  * PyArray_SetBaseObject(arr, base)
45691  */
45692 
45693  /* function exit code */
45694  __Pyx_RefNannyFinishContext();
45695 }
45696 
45697 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":933
45698  * PyArray_SetBaseObject(arr, base)
45699  *
45700  * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
45701  * base = PyArray_BASE(arr)
45702  * if base is NULL:
45703  */
45704 
45705 static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
45706  PyObject *__pyx_v_base;
45707  PyObject *__pyx_r = NULL;
45708  __Pyx_RefNannyDeclarations
45709  int __pyx_t_1;
45710  __Pyx_RefNannySetupContext("get_array_base", 0);
45711 
45712  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":934
45713  *
45714  * cdef inline object get_array_base(ndarray arr):
45715  * base = PyArray_BASE(arr) # <<<<<<<<<<<<<<
45716  * if base is NULL:
45717  * return None
45718  */
45719  __pyx_v_base = PyArray_BASE(__pyx_v_arr);
45720 
45721  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":935
45722  * cdef inline object get_array_base(ndarray arr):
45723  * base = PyArray_BASE(arr)
45724  * if base is NULL: # <<<<<<<<<<<<<<
45725  * return None
45726  * return <object>base
45727  */
45728  __pyx_t_1 = ((__pyx_v_base == NULL) != 0);
45729  if (__pyx_t_1) {
45730 
45731  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":936
45732  * base = PyArray_BASE(arr)
45733  * if base is NULL:
45734  * return None # <<<<<<<<<<<<<<
45735  * return <object>base
45736  *
45737  */
45738  __Pyx_XDECREF(__pyx_r);
45739  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
45740  goto __pyx_L0;
45741 
45742  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":935
45743  * cdef inline object get_array_base(ndarray arr):
45744  * base = PyArray_BASE(arr)
45745  * if base is NULL: # <<<<<<<<<<<<<<
45746  * return None
45747  * return <object>base
45748  */
45749  }
45750 
45751  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":937
45752  * if base is NULL:
45753  * return None
45754  * return <object>base # <<<<<<<<<<<<<<
45755  *
45756  * # Versions of the import_* functions which are more suitable for
45757  */
45758  __Pyx_XDECREF(__pyx_r);
45759  __Pyx_INCREF(((PyObject *)__pyx_v_base));
45760  __pyx_r = ((PyObject *)__pyx_v_base);
45761  goto __pyx_L0;
45762 
45763  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":933
45764  * PyArray_SetBaseObject(arr, base)
45765  *
45766  * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
45767  * base = PyArray_BASE(arr)
45768  * if base is NULL:
45769  */
45770 
45771  /* function exit code */
45772  __pyx_L0:;
45773  __Pyx_XGIVEREF(__pyx_r);
45774  __Pyx_RefNannyFinishContext();
45775  return __pyx_r;
45776 }
45777 
45778 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":941
45779  * # Versions of the import_* functions which are more suitable for
45780  * # Cython code.
45781  * cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
45782  * try:
45783  * __pyx_import_array()
45784  */
45785 
45786 static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
45787  int __pyx_r;
45788  __Pyx_RefNannyDeclarations
45789  PyObject *__pyx_t_1 = NULL;
45790  PyObject *__pyx_t_2 = NULL;
45791  PyObject *__pyx_t_3 = NULL;
45792  int __pyx_t_4;
45793  PyObject *__pyx_t_5 = NULL;
45794  PyObject *__pyx_t_6 = NULL;
45795  PyObject *__pyx_t_7 = NULL;
45796  PyObject *__pyx_t_8 = NULL;
45797  int __pyx_lineno = 0;
45798  const char *__pyx_filename = NULL;
45799  int __pyx_clineno = 0;
45800  __Pyx_RefNannySetupContext("import_array", 0);
45801 
45802  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":942
45803  * # Cython code.
45804  * cdef inline int import_array() except -1:
45805  * try: # <<<<<<<<<<<<<<
45806  * __pyx_import_array()
45807  * except Exception:
45808  */
45809  {
45810  __Pyx_PyThreadState_declare
45811  __Pyx_PyThreadState_assign
45812  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
45813  __Pyx_XGOTREF(__pyx_t_1);
45814  __Pyx_XGOTREF(__pyx_t_2);
45815  __Pyx_XGOTREF(__pyx_t_3);
45816  /*try:*/ {
45817 
45818  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":943
45819  * cdef inline int import_array() except -1:
45820  * try:
45821  * __pyx_import_array() # <<<<<<<<<<<<<<
45822  * except Exception:
45823  * raise ImportError("numpy.core.multiarray failed to import")
45824  */
45825  __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 943, __pyx_L3_error)
45826 
45827  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":942
45828  * # Cython code.
45829  * cdef inline int import_array() except -1:
45830  * try: # <<<<<<<<<<<<<<
45831  * __pyx_import_array()
45832  * except Exception:
45833  */
45834  }
45835  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
45836  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
45837  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
45838  goto __pyx_L8_try_end;
45839  __pyx_L3_error:;
45840 
45841  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":944
45842  * try:
45843  * __pyx_import_array()
45844  * except Exception: # <<<<<<<<<<<<<<
45845  * raise ImportError("numpy.core.multiarray failed to import")
45846  *
45847  */
45848  __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
45849  if (__pyx_t_4) {
45850  __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
45851  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 944, __pyx_L5_except_error)
45852  __Pyx_GOTREF(__pyx_t_5);
45853  __Pyx_GOTREF(__pyx_t_6);
45854  __Pyx_GOTREF(__pyx_t_7);
45855 
45856  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":945
45857  * __pyx_import_array()
45858  * except Exception:
45859  * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<<
45860  *
45861  * cdef inline int import_umath() except -1:
45862  */
45863  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 945, __pyx_L5_except_error)
45864  __Pyx_GOTREF(__pyx_t_8);
45865  __Pyx_Raise(__pyx_t_8, 0, 0, 0);
45866  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
45867  __PYX_ERR(1, 945, __pyx_L5_except_error)
45868  }
45869  goto __pyx_L5_except_error;
45870  __pyx_L5_except_error:;
45871 
45872  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":942
45873  * # Cython code.
45874  * cdef inline int import_array() except -1:
45875  * try: # <<<<<<<<<<<<<<
45876  * __pyx_import_array()
45877  * except Exception:
45878  */
45879  __Pyx_XGIVEREF(__pyx_t_1);
45880  __Pyx_XGIVEREF(__pyx_t_2);
45881  __Pyx_XGIVEREF(__pyx_t_3);
45882  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
45883  goto __pyx_L1_error;
45884  __pyx_L8_try_end:;
45885  }
45886 
45887  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":941
45888  * # Versions of the import_* functions which are more suitable for
45889  * # Cython code.
45890  * cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
45891  * try:
45892  * __pyx_import_array()
45893  */
45894 
45895  /* function exit code */
45896  __pyx_r = 0;
45897  goto __pyx_L0;
45898  __pyx_L1_error:;
45899  __Pyx_XDECREF(__pyx_t_5);
45900  __Pyx_XDECREF(__pyx_t_6);
45901  __Pyx_XDECREF(__pyx_t_7);
45902  __Pyx_XDECREF(__pyx_t_8);
45903  __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
45904  __pyx_r = -1;
45905  __pyx_L0:;
45906  __Pyx_RefNannyFinishContext();
45907  return __pyx_r;
45908 }
45909 
45910 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":947
45911  * raise ImportError("numpy.core.multiarray failed to import")
45912  *
45913  * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
45914  * try:
45915  * _import_umath()
45916  */
45917 
45918 static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
45919  int __pyx_r;
45920  __Pyx_RefNannyDeclarations
45921  PyObject *__pyx_t_1 = NULL;
45922  PyObject *__pyx_t_2 = NULL;
45923  PyObject *__pyx_t_3 = NULL;
45924  int __pyx_t_4;
45925  PyObject *__pyx_t_5 = NULL;
45926  PyObject *__pyx_t_6 = NULL;
45927  PyObject *__pyx_t_7 = NULL;
45928  PyObject *__pyx_t_8 = NULL;
45929  int __pyx_lineno = 0;
45930  const char *__pyx_filename = NULL;
45931  int __pyx_clineno = 0;
45932  __Pyx_RefNannySetupContext("import_umath", 0);
45933 
45934  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":948
45935  *
45936  * cdef inline int import_umath() except -1:
45937  * try: # <<<<<<<<<<<<<<
45938  * _import_umath()
45939  * except Exception:
45940  */
45941  {
45942  __Pyx_PyThreadState_declare
45943  __Pyx_PyThreadState_assign
45944  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
45945  __Pyx_XGOTREF(__pyx_t_1);
45946  __Pyx_XGOTREF(__pyx_t_2);
45947  __Pyx_XGOTREF(__pyx_t_3);
45948  /*try:*/ {
45949 
45950  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":949
45951  * cdef inline int import_umath() except -1:
45952  * try:
45953  * _import_umath() # <<<<<<<<<<<<<<
45954  * except Exception:
45955  * raise ImportError("numpy.core.umath failed to import")
45956  */
45957  __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 949, __pyx_L3_error)
45958 
45959  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":948
45960  *
45961  * cdef inline int import_umath() except -1:
45962  * try: # <<<<<<<<<<<<<<
45963  * _import_umath()
45964  * except Exception:
45965  */
45966  }
45967  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
45968  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
45969  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
45970  goto __pyx_L8_try_end;
45971  __pyx_L3_error:;
45972 
45973  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":950
45974  * try:
45975  * _import_umath()
45976  * except Exception: # <<<<<<<<<<<<<<
45977  * raise ImportError("numpy.core.umath failed to import")
45978  *
45979  */
45980  __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
45981  if (__pyx_t_4) {
45982  __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
45983  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 950, __pyx_L5_except_error)
45984  __Pyx_GOTREF(__pyx_t_5);
45985  __Pyx_GOTREF(__pyx_t_6);
45986  __Pyx_GOTREF(__pyx_t_7);
45987 
45988  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":951
45989  * _import_umath()
45990  * except Exception:
45991  * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
45992  *
45993  * cdef inline int import_ufunc() except -1:
45994  */
45995  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 951, __pyx_L5_except_error)
45996  __Pyx_GOTREF(__pyx_t_8);
45997  __Pyx_Raise(__pyx_t_8, 0, 0, 0);
45998  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
45999  __PYX_ERR(1, 951, __pyx_L5_except_error)
46000  }
46001  goto __pyx_L5_except_error;
46002  __pyx_L5_except_error:;
46003 
46004  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":948
46005  *
46006  * cdef inline int import_umath() except -1:
46007  * try: # <<<<<<<<<<<<<<
46008  * _import_umath()
46009  * except Exception:
46010  */
46011  __Pyx_XGIVEREF(__pyx_t_1);
46012  __Pyx_XGIVEREF(__pyx_t_2);
46013  __Pyx_XGIVEREF(__pyx_t_3);
46014  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
46015  goto __pyx_L1_error;
46016  __pyx_L8_try_end:;
46017  }
46018 
46019  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":947
46020  * raise ImportError("numpy.core.multiarray failed to import")
46021  *
46022  * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
46023  * try:
46024  * _import_umath()
46025  */
46026 
46027  /* function exit code */
46028  __pyx_r = 0;
46029  goto __pyx_L0;
46030  __pyx_L1_error:;
46031  __Pyx_XDECREF(__pyx_t_5);
46032  __Pyx_XDECREF(__pyx_t_6);
46033  __Pyx_XDECREF(__pyx_t_7);
46034  __Pyx_XDECREF(__pyx_t_8);
46035  __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
46036  __pyx_r = -1;
46037  __pyx_L0:;
46038  __Pyx_RefNannyFinishContext();
46039  return __pyx_r;
46040 }
46041 
46042 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":953
46043  * raise ImportError("numpy.core.umath failed to import")
46044  *
46045  * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
46046  * try:
46047  * _import_umath()
46048  */
46049 
46050 static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
46051  int __pyx_r;
46052  __Pyx_RefNannyDeclarations
46053  PyObject *__pyx_t_1 = NULL;
46054  PyObject *__pyx_t_2 = NULL;
46055  PyObject *__pyx_t_3 = NULL;
46056  int __pyx_t_4;
46057  PyObject *__pyx_t_5 = NULL;
46058  PyObject *__pyx_t_6 = NULL;
46059  PyObject *__pyx_t_7 = NULL;
46060  PyObject *__pyx_t_8 = NULL;
46061  int __pyx_lineno = 0;
46062  const char *__pyx_filename = NULL;
46063  int __pyx_clineno = 0;
46064  __Pyx_RefNannySetupContext("import_ufunc", 0);
46065 
46066  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":954
46067  *
46068  * cdef inline int import_ufunc() except -1:
46069  * try: # <<<<<<<<<<<<<<
46070  * _import_umath()
46071  * except Exception:
46072  */
46073  {
46074  __Pyx_PyThreadState_declare
46075  __Pyx_PyThreadState_assign
46076  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
46077  __Pyx_XGOTREF(__pyx_t_1);
46078  __Pyx_XGOTREF(__pyx_t_2);
46079  __Pyx_XGOTREF(__pyx_t_3);
46080  /*try:*/ {
46081 
46082  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":955
46083  * cdef inline int import_ufunc() except -1:
46084  * try:
46085  * _import_umath() # <<<<<<<<<<<<<<
46086  * except Exception:
46087  * raise ImportError("numpy.core.umath failed to import")
46088  */
46089  __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 955, __pyx_L3_error)
46090 
46091  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":954
46092  *
46093  * cdef inline int import_ufunc() except -1:
46094  * try: # <<<<<<<<<<<<<<
46095  * _import_umath()
46096  * except Exception:
46097  */
46098  }
46099  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
46100  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
46101  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
46102  goto __pyx_L8_try_end;
46103  __pyx_L3_error:;
46104 
46105  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":956
46106  * try:
46107  * _import_umath()
46108  * except Exception: # <<<<<<<<<<<<<<
46109  * raise ImportError("numpy.core.umath failed to import")
46110  *
46111  */
46112  __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
46113  if (__pyx_t_4) {
46114  __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
46115  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 956, __pyx_L5_except_error)
46116  __Pyx_GOTREF(__pyx_t_5);
46117  __Pyx_GOTREF(__pyx_t_6);
46118  __Pyx_GOTREF(__pyx_t_7);
46119 
46120  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":957
46121  * _import_umath()
46122  * except Exception:
46123  * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
46124  *
46125  * cdef extern from *:
46126  */
46127  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 957, __pyx_L5_except_error)
46128  __Pyx_GOTREF(__pyx_t_8);
46129  __Pyx_Raise(__pyx_t_8, 0, 0, 0);
46130  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
46131  __PYX_ERR(1, 957, __pyx_L5_except_error)
46132  }
46133  goto __pyx_L5_except_error;
46134  __pyx_L5_except_error:;
46135 
46136  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":954
46137  *
46138  * cdef inline int import_ufunc() except -1:
46139  * try: # <<<<<<<<<<<<<<
46140  * _import_umath()
46141  * except Exception:
46142  */
46143  __Pyx_XGIVEREF(__pyx_t_1);
46144  __Pyx_XGIVEREF(__pyx_t_2);
46145  __Pyx_XGIVEREF(__pyx_t_3);
46146  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
46147  goto __pyx_L1_error;
46148  __pyx_L8_try_end:;
46149  }
46150 
46151  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":953
46152  * raise ImportError("numpy.core.umath failed to import")
46153  *
46154  * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
46155  * try:
46156  * _import_umath()
46157  */
46158 
46159  /* function exit code */
46160  __pyx_r = 0;
46161  goto __pyx_L0;
46162  __pyx_L1_error:;
46163  __Pyx_XDECREF(__pyx_t_5);
46164  __Pyx_XDECREF(__pyx_t_6);
46165  __Pyx_XDECREF(__pyx_t_7);
46166  __Pyx_XDECREF(__pyx_t_8);
46167  __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
46168  __pyx_r = -1;
46169  __pyx_L0:;
46170  __Pyx_RefNannyFinishContext();
46171  return __pyx_r;
46172 }
46173 
46174 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":967
46175  *
46176  *
46177  * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<<
46178  * """
46179  * Cython equivalent of `isinstance(obj, np.timedelta64)`
46180  */
46181 
46182 static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) {
46183  int __pyx_r;
46184  __Pyx_RefNannyDeclarations
46185  __Pyx_RefNannySetupContext("is_timedelta64_object", 0);
46186 
46187  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":979
46188  * bool
46189  * """
46190  * return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type) # <<<<<<<<<<<<<<
46191  *
46192  *
46193  */
46194  __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type));
46195  goto __pyx_L0;
46196 
46197  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":967
46198  *
46199  *
46200  * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<<
46201  * """
46202  * Cython equivalent of `isinstance(obj, np.timedelta64)`
46203  */
46204 
46205  /* function exit code */
46206  __pyx_L0:;
46207  __Pyx_RefNannyFinishContext();
46208  return __pyx_r;
46209 }
46210 
46211 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":982
46212  *
46213  *
46214  * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<<
46215  * """
46216  * Cython equivalent of `isinstance(obj, np.datetime64)`
46217  */
46218 
46219 static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) {
46220  int __pyx_r;
46221  __Pyx_RefNannyDeclarations
46222  __Pyx_RefNannySetupContext("is_datetime64_object", 0);
46223 
46224  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":994
46225  * bool
46226  * """
46227  * return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type) # <<<<<<<<<<<<<<
46228  *
46229  *
46230  */
46231  __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type));
46232  goto __pyx_L0;
46233 
46234  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":982
46235  *
46236  *
46237  * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<<
46238  * """
46239  * Cython equivalent of `isinstance(obj, np.datetime64)`
46240  */
46241 
46242  /* function exit code */
46243  __pyx_L0:;
46244  __Pyx_RefNannyFinishContext();
46245  return __pyx_r;
46246 }
46247 
46248 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":997
46249  *
46250  *
46251  * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<<
46252  * """
46253  * returns the int64 value underlying scalar numpy datetime64 object
46254  */
46255 
46256 static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) {
46257  npy_datetime __pyx_r;
46258 
46259  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":1004
46260  * also needed. That can be found using `get_datetime64_unit`.
46261  * """
46262  * return (<PyDatetimeScalarObject*>obj).obval # <<<<<<<<<<<<<<
46263  *
46264  *
46265  */
46266  __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval;
46267  goto __pyx_L0;
46268 
46269  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":997
46270  *
46271  *
46272  * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<<
46273  * """
46274  * returns the int64 value underlying scalar numpy datetime64 object
46275  */
46276 
46277  /* function exit code */
46278  __pyx_L0:;
46279  return __pyx_r;
46280 }
46281 
46282 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":1007
46283  *
46284  *
46285  * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<<
46286  * """
46287  * returns the int64 value underlying scalar numpy timedelta64 object
46288  */
46289 
46290 static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) {
46291  npy_timedelta __pyx_r;
46292 
46293  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":1011
46294  * returns the int64 value underlying scalar numpy timedelta64 object
46295  * """
46296  * return (<PyTimedeltaScalarObject*>obj).obval # <<<<<<<<<<<<<<
46297  *
46298  *
46299  */
46300  __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval;
46301  goto __pyx_L0;
46302 
46303  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":1007
46304  *
46305  *
46306  * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<<
46307  * """
46308  * returns the int64 value underlying scalar numpy timedelta64 object
46309  */
46310 
46311  /* function exit code */
46312  __pyx_L0:;
46313  return __pyx_r;
46314 }
46315 
46316 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":1014
46317  *
46318  *
46319  * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<<
46320  * """
46321  * returns the unit part of the dtype for a numpy datetime64 object.
46322  */
46323 
46324 static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) {
46325  NPY_DATETIMEUNIT __pyx_r;
46326 
46327  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":1018
46328  * returns the unit part of the dtype for a numpy datetime64 object.
46329  * """
46330  * return <NPY_DATETIMEUNIT>(<PyDatetimeScalarObject*>obj).obmeta.base # <<<<<<<<<<<<<<
46331  */
46332  __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base);
46333  goto __pyx_L0;
46334 
46335  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":1014
46336  *
46337  *
46338  * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<<
46339  * """
46340  * returns the unit part of the dtype for a numpy datetime64 object.
46341  */
46342 
46343  /* function exit code */
46344  __pyx_L0:;
46345  return __pyx_r;
46346 }
46347 
46348 static PyMethodDef __pyx_methods[] = {
46349  {0, 0, 0, 0}
46350 };
46351 
46352 #if PY_MAJOR_VERSION >= 3
46353 #if CYTHON_PEP489_MULTI_PHASE_INIT
46354 static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
46355 static int __pyx_pymod_exec_cfemIntegrals(PyObject* module); /*proto*/
46356 static PyModuleDef_Slot __pyx_moduledef_slots[] = {
46357  {Py_mod_create, (void*)__pyx_pymod_create},
46358  {Py_mod_exec, (void*)__pyx_pymod_exec_cfemIntegrals},
46359  {0, NULL}
46360 };
46361 #endif
46362 
46363 static struct PyModuleDef __pyx_moduledef = {
46364  PyModuleDef_HEAD_INIT,
46365  "cfemIntegrals",
46366  0, /* m_doc */
46367  #if CYTHON_PEP489_MULTI_PHASE_INIT
46368  0, /* m_size */
46369  #else
46370  -1, /* m_size */
46371  #endif
46372  __pyx_methods /* m_methods */,
46373  #if CYTHON_PEP489_MULTI_PHASE_INIT
46374  __pyx_moduledef_slots, /* m_slots */
46375  #else
46376  NULL, /* m_reload */
46377  #endif
46378  NULL, /* m_traverse */
46379  NULL, /* m_clear */
46380  NULL /* m_free */
46381 };
46382 #endif
46383 #ifndef CYTHON_SMALL_CODE
46384 #if defined(__clang__)
46385  #define CYTHON_SMALL_CODE
46386 #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
46387  #define CYTHON_SMALL_CODE __attribute__((cold))
46388 #else
46389  #define CYTHON_SMALL_CODE
46390 #endif
46391 #endif
46392 
46393 static __Pyx_StringTabEntry __pyx_string_tab[] = {
46394  {&__pyx_n_s_A_inv, __pyx_k_A_inv, sizeof(__pyx_k_A_inv), 0, 0, 1, 1},
46395  {&__pyx_n_s_DV, __pyx_k_DV, sizeof(__pyx_k_DV), 0, 0, 1, 1},
46396  {&__pyx_n_s_DV_eb, __pyx_k_DV_eb, sizeof(__pyx_k_DV_eb), 0, 0, 1, 1},
46397  {&__pyx_n_s_F, __pyx_k_F, sizeof(__pyx_k_F), 0, 0, 1, 1},
46398  {&__pyx_n_s_H, __pyx_k_H, sizeof(__pyx_k_H), 0, 0, 1, 1},
46399  {&__pyx_n_s_Hess_phi, __pyx_k_Hess_phi, sizeof(__pyx_k_Hess_phi), 0, 0, 1, 1},
46400  {&__pyx_n_s_Hess_v, __pyx_k_Hess_v, sizeof(__pyx_k_Hess_v), 0, 0, 1, 1},
46401  {&__pyx_n_s_Hess_w, __pyx_k_Hess_w, sizeof(__pyx_k_Hess_w), 0, 0, 1, 1},
46402  {&__pyx_n_s_Hess_w_dV, __pyx_k_Hess_w_dV, sizeof(__pyx_k_Hess_w_dV), 0, 0, 1, 1},
46403  {&__pyx_n_s_Hessian_psi, __pyx_k_Hessian_psi, sizeof(__pyx_k_Hessian_psi), 0, 0, 1, 1},
46404  {&__pyx_n_s_Hessian_u, __pyx_k_Hessian_u, sizeof(__pyx_k_Hessian_u), 0, 0, 1, 1},
46405  {&__pyx_n_s_Hessian_v, __pyx_k_Hessian_v, sizeof(__pyx_k_Hessian_v), 0, 0, 1, 1},
46406  {&__pyx_n_s_Hessian_vArray, __pyx_k_Hessian_vArray, sizeof(__pyx_k_Hessian_vArray), 0, 0, 1, 1},
46407  {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
46408  {&__pyx_n_s_Lstar_w_dV, __pyx_k_Lstar_w_dV, sizeof(__pyx_k_Lstar_w_dV), 0, 0, 1, 1},
46409  {&__pyx_n_s_V, __pyx_k_V, sizeof(__pyx_k_V), 0, 0, 1, 1},
46410  {&__pyx_n_s_a, __pyx_k_a, sizeof(__pyx_k_a), 0, 0, 1, 1},
46411  {&__pyx_n_s_abs_det_J, __pyx_k_abs_det_J, sizeof(__pyx_k_abs_det_J), 0, 0, 1, 1},
46412  {&__pyx_n_s_abs_det_jac, __pyx_k_abs_det_jac, sizeof(__pyx_k_abs_det_jac), 0, 0, 1, 1},
46413  {&__pyx_n_s_b, __pyx_k_b, sizeof(__pyx_k_b), 0, 0, 1, 1},
46414  {&__pyx_n_s_boundaryJacobians, __pyx_k_boundaryJacobians, sizeof(__pyx_k_boundaryJacobians), 0, 0, 1, 1},
46415  {&__pyx_n_s_boundaryNormals, __pyx_k_boundaryNormals, sizeof(__pyx_k_boundaryNormals), 0, 0, 1, 1},
46416  {&__pyx_n_s_calculateCFLADR, __pyx_k_calculateCFLADR, sizeof(__pyx_k_calculateCFLADR), 0, 0, 1, 1},
46417  {&__pyx_n_s_calculateCFLADR2speeds, __pyx_k_calculateCFLADR2speeds, sizeof(__pyx_k_calculateCFLADR2speeds), 0, 0, 1, 1},
46418  {&__pyx_n_s_calculateConservationFluxPWL, __pyx_k_calculateConservationFluxPWL, sizeof(__pyx_k_calculateConservationFluxPWL), 0, 0, 1, 1},
46419  {&__pyx_n_s_calculateConservationJacobianPWL, __pyx_k_calculateConservationJacobianPWL, sizeof(__pyx_k_calculateConservationJacobianPWL), 0, 0, 1, 1},
46420  {&__pyx_n_s_calculateConservationResidual, __pyx_k_calculateConservationResidual, sizeof(__pyx_k_calculateConservationResidual), 0, 0, 1, 1},
46421  {&__pyx_n_s_calculateConservationResidualDG, __pyx_k_calculateConservationResidualDG, sizeof(__pyx_k_calculateConservationResidualDG), 0, 0, 1, 1},
46422  {&__pyx_n_s_calculateConservationResidualGlo, __pyx_k_calculateConservationResidualGlo, sizeof(__pyx_k_calculateConservationResidualGlo), 0, 0, 1, 1},
46423  {&__pyx_n_s_calculateConservationResidualPWL, __pyx_k_calculateConservationResidualPWL, sizeof(__pyx_k_calculateConservationResidualPWL), 0, 0, 1, 1},
46424  {&__pyx_n_s_calculateDimensionlessNumbersADR, __pyx_k_calculateDimensionlessNumbersADR, sizeof(__pyx_k_calculateDimensionlessNumbersADR), 0, 0, 1, 1},
46425  {&__pyx_n_s_calculateDimensionlessNumbersADR_2, __pyx_k_calculateDimensionlessNumbersADR_2, sizeof(__pyx_k_calculateDimensionlessNumbersADR_2), 0, 0, 1, 1},
46426  {&__pyx_n_s_calculateElementBoundaryIntegrat, __pyx_k_calculateElementBoundaryIntegrat, sizeof(__pyx_k_calculateElementBoundaryIntegrat), 0, 0, 1, 1},
46427  {&__pyx_n_s_calculateExteriorElementBoundary, __pyx_k_calculateExteriorElementBoundary, sizeof(__pyx_k_calculateExteriorElementBoundary), 0, 0, 1, 1},
46428  {&__pyx_n_s_calculateExteriorElementBoundary_2, __pyx_k_calculateExteriorElementBoundary_2, sizeof(__pyx_k_calculateExteriorElementBoundary_2), 0, 0, 1, 1},
46429  {&__pyx_n_s_calculateExteriorElementBoundary_3, __pyx_k_calculateExteriorElementBoundary_3, sizeof(__pyx_k_calculateExteriorElementBoundary_3), 0, 0, 1, 1},
46430  {&__pyx_n_s_calculateExteriorElementBoundary_4, __pyx_k_calculateExteriorElementBoundary_4, sizeof(__pyx_k_calculateExteriorElementBoundary_4), 0, 0, 1, 1},
46431  {&__pyx_n_s_calculateExteriorNumericalTrace, __pyx_k_calculateExteriorNumericalTrace, sizeof(__pyx_k_calculateExteriorNumericalTrace), 0, 0, 1, 1},
46432  {&__pyx_n_s_calculateFiniteElementFunctionGr, __pyx_k_calculateFiniteElementFunctionGr, sizeof(__pyx_k_calculateFiniteElementFunctionGr), 0, 0, 1, 1},
46433  {&__pyx_n_s_calculateFiniteElementFunctionGr_2, __pyx_k_calculateFiniteElementFunctionGr_2, sizeof(__pyx_k_calculateFiniteElementFunctionGr_2), 0, 0, 1, 1},
46434  {&__pyx_n_s_calculateFiniteElementFunctionGr_3, __pyx_k_calculateFiniteElementFunctionGr_3, sizeof(__pyx_k_calculateFiniteElementFunctionGr_3), 0, 0, 1, 1},
46435  {&__pyx_n_s_calculateFiniteElementFunctionGr_4, __pyx_k_calculateFiniteElementFunctionGr_4, sizeof(__pyx_k_calculateFiniteElementFunctionGr_4), 0, 0, 1, 1},
46436  {&__pyx_n_s_calculateFiniteElementFunctionHe, __pyx_k_calculateFiniteElementFunctionHe, sizeof(__pyx_k_calculateFiniteElementFunctionHe), 0, 0, 1, 1},
46437  {&__pyx_n_s_calculateFiniteElementFunctionVa, __pyx_k_calculateFiniteElementFunctionVa, sizeof(__pyx_k_calculateFiniteElementFunctionVa), 0, 0, 1, 1},
46438  {&__pyx_n_s_calculateFiniteElementFunctionVa_2, __pyx_k_calculateFiniteElementFunctionVa_2, sizeof(__pyx_k_calculateFiniteElementFunctionVa_2), 0, 0, 1, 1},
46439  {&__pyx_n_s_calculateFiniteElementFunctionVa_3, __pyx_k_calculateFiniteElementFunctionVa_3, sizeof(__pyx_k_calculateFiniteElementFunctionVa_3), 0, 0, 1, 1},
46440  {&__pyx_n_s_calculateFlowVelocity, __pyx_k_calculateFlowVelocity, sizeof(__pyx_k_calculateFlowVelocity), 0, 0, 1, 1},
46441  {&__pyx_n_s_calculateGlobalExteriorElementBo, __pyx_k_calculateGlobalExteriorElementBo, sizeof(__pyx_k_calculateGlobalExteriorElementBo), 0, 0, 1, 1},
46442  {&__pyx_n_s_calculateGradShape_X_weightedGra, __pyx_k_calculateGradShape_X_weightedGra, sizeof(__pyx_k_calculateGradShape_X_weightedGra), 0, 0, 1, 1},
46443  {&__pyx_n_s_calculateGradShape_X_weightedSha, __pyx_k_calculateGradShape_X_weightedSha, sizeof(__pyx_k_calculateGradShape_X_weightedSha), 0, 0, 1, 1},
46444  {&__pyx_n_s_calculateGradShape_X_weightedSha_2, __pyx_k_calculateGradShape_X_weightedSha_2, sizeof(__pyx_k_calculateGradShape_X_weightedSha_2), 0, 0, 1, 1},
46445  {&__pyx_n_s_calculateGradShape_X_weightedSha_3, __pyx_k_calculateGradShape_X_weightedSha_3, sizeof(__pyx_k_calculateGradShape_X_weightedSha_3), 0, 0, 1, 1},
46446  {&__pyx_n_s_calculateIntegrationWeights, __pyx_k_calculateIntegrationWeights, sizeof(__pyx_k_calculateIntegrationWeights), 0, 0, 1, 1},
46447  {&__pyx_n_s_calculateInteriorElementBoundary, __pyx_k_calculateInteriorElementBoundary, sizeof(__pyx_k_calculateInteriorElementBoundary), 0, 0, 1, 1},
46448  {&__pyx_n_s_calculateInteriorElementBoundary_2, __pyx_k_calculateInteriorElementBoundary_2, sizeof(__pyx_k_calculateInteriorElementBoundary_2), 0, 0, 1, 1},
46449  {&__pyx_n_s_calculateInteriorNumericalTrace, __pyx_k_calculateInteriorNumericalTrace, sizeof(__pyx_k_calculateInteriorNumericalTrace), 0, 0, 1, 1},
46450  {&__pyx_n_s_calculateScalarScalarProduct, __pyx_k_calculateScalarScalarProduct, sizeof(__pyx_k_calculateScalarScalarProduct), 0, 0, 1, 1},
46451  {&__pyx_n_s_calculateShape_X_weightedGradSha, __pyx_k_calculateShape_X_weightedGradSha, sizeof(__pyx_k_calculateShape_X_weightedGradSha), 0, 0, 1, 1},
46452  {&__pyx_n_s_calculateShape_X_weightedShape, __pyx_k_calculateShape_X_weightedShape, sizeof(__pyx_k_calculateShape_X_weightedShape), 0, 0, 1, 1},
46453  {&__pyx_n_s_calculateShape_X_weightedShapeGl, __pyx_k_calculateShape_X_weightedShapeGl, sizeof(__pyx_k_calculateShape_X_weightedShapeGl), 0, 0, 1, 1},
46454  {&__pyx_n_s_calculateShape_X_weightedShapeTr, __pyx_k_calculateShape_X_weightedShapeTr, sizeof(__pyx_k_calculateShape_X_weightedShapeTr), 0, 0, 1, 1},
46455  {&__pyx_n_s_calculateTensorScalarProduct, __pyx_k_calculateTensorScalarProduct, sizeof(__pyx_k_calculateTensorScalarProduct), 0, 0, 1, 1},
46456  {&__pyx_n_s_calculateVectorScalarProduct, __pyx_k_calculateVectorScalarProduct, sizeof(__pyx_k_calculateVectorScalarProduct), 0, 0, 1, 1},
46457  {&__pyx_n_s_calculateVelocityProjectionMatri, __pyx_k_calculateVelocityProjectionMatri, sizeof(__pyx_k_calculateVelocityProjectionMatri), 0, 0, 1, 1},
46458  {&__pyx_n_s_calculateVelocityQuadrature_Mixe, __pyx_k_calculateVelocityQuadrature_Mixe, sizeof(__pyx_k_calculateVelocityQuadrature_Mixe), 0, 0, 1, 1},
46459  {&__pyx_n_s_calculateVelocityQuadrature_Mixe_2, __pyx_k_calculateVelocityQuadrature_Mixe_2, sizeof(__pyx_k_calculateVelocityQuadrature_Mixe_2), 0, 0, 1, 1},
46460  {&__pyx_n_s_calculateVelocityQuadrature_Mixe_3, __pyx_k_calculateVelocityQuadrature_Mixe_3, sizeof(__pyx_k_calculateVelocityQuadrature_Mixe_3), 0, 0, 1, 1},
46461  {&__pyx_n_s_calculateVelocityQuadrature_Mixe_4, __pyx_k_calculateVelocityQuadrature_Mixe_4, sizeof(__pyx_k_calculateVelocityQuadrature_Mixe_4), 0, 0, 1, 1},
46462  {&__pyx_n_s_calculateWeightedShape, __pyx_k_calculateWeightedShape, sizeof(__pyx_k_calculateWeightedShape), 0, 0, 1, 1},
46463  {&__pyx_n_s_calculateWeightedShapeGlobalExte, __pyx_k_calculateWeightedShapeGlobalExte, sizeof(__pyx_k_calculateWeightedShapeGlobalExte), 0, 0, 1, 1},
46464  {&__pyx_n_s_calculateWeightedShapeGradients, __pyx_k_calculateWeightedShapeGradients, sizeof(__pyx_k_calculateWeightedShapeGradients), 0, 0, 1, 1},
46465  {&__pyx_n_s_calculateWeightedShapeHessians, __pyx_k_calculateWeightedShapeHessians, sizeof(__pyx_k_calculateWeightedShapeHessians), 0, 0, 1, 1},
46466  {&__pyx_n_s_calculateWeightedShapeTrace, __pyx_k_calculateWeightedShapeTrace, sizeof(__pyx_k_calculateWeightedShapeTrace), 0, 0, 1, 1},
46467  {&__pyx_n_s_cfemIntegrals, __pyx_k_cfemIntegrals, sizeof(__pyx_k_cfemIntegrals), 0, 0, 1, 1},
46468  {&__pyx_n_s_cfl, __pyx_k_cfl, sizeof(__pyx_k_cfl), 0, 0, 1, 1},
46469  {&__pyx_n_s_checkElementBoundaryAndExteriorE, __pyx_k_checkElementBoundaryAndExteriorE, sizeof(__pyx_k_checkElementBoundaryAndExteriorE), 0, 0, 1, 1},
46470  {&__pyx_n_s_checkGlobalElementBoundaryAndExt, __pyx_k_checkGlobalElementBoundaryAndExt, sizeof(__pyx_k_checkGlobalElementBoundaryAndExt), 0, 0, 1, 1},
46471  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
46472  {&__pyx_n_s_colind, __pyx_k_colind, sizeof(__pyx_k_colind), 0, 0, 1, 1},
46473  {&__pyx_n_s_colind_dummy, __pyx_k_colind_dummy, sizeof(__pyx_k_colind_dummy), 0, 0, 1, 1},
46474  {&__pyx_n_s_computeC0P1InterpolantDGP0, __pyx_k_computeC0P1InterpolantDGP0, sizeof(__pyx_k_computeC0P1InterpolantDGP0), 0, 0, 1, 1},
46475  {&__pyx_n_s_computeC0P1InterpolantDGP12, __pyx_k_computeC0P1InterpolantDGP12, sizeof(__pyx_k_computeC0P1InterpolantDGP12), 0, 0, 1, 1},
46476  {&__pyx_n_s_computeC0P1InterpolantNCP1, __pyx_k_computeC0P1InterpolantNCP1, sizeof(__pyx_k_computeC0P1InterpolantNCP1), 0, 0, 1, 1},
46477  {&__pyx_n_s_computeDiffusiveTimeStepLimit, __pyx_k_computeDiffusiveTimeStepLimit, sizeof(__pyx_k_computeDiffusiveTimeStepLimit), 0, 0, 1, 1},
46478  {&__pyx_n_s_conservationResidual, __pyx_k_conservationResidual, sizeof(__pyx_k_conservationResidual), 0, 0, 1, 1},
46479  {&__pyx_n_s_copyBetweenFreeUnknownsAndGlobal, __pyx_k_copyBetweenFreeUnknownsAndGlobal, sizeof(__pyx_k_copyBetweenFreeUnknownsAndGlobal), 0, 0, 1, 1},
46480  {&__pyx_n_s_copyExteriorElementBoundaryValue, __pyx_k_copyExteriorElementBoundaryValue, sizeof(__pyx_k_copyExteriorElementBoundaryValue), 0, 0, 1, 1},
46481  {&__pyx_n_s_copyExteriorElementBoundaryValue_2, __pyx_k_copyExteriorElementBoundaryValue_2, sizeof(__pyx_k_copyExteriorElementBoundaryValue_2), 0, 0, 1, 1},
46482  {&__pyx_n_s_copyExteriorElementBoundaryValue_3, __pyx_k_copyExteriorElementBoundaryValue_3, sizeof(__pyx_k_copyExteriorElementBoundaryValue_3), 0, 0, 1, 1},
46483  {&__pyx_n_s_copyExteriorElementBoundaryValue_4, __pyx_k_copyExteriorElementBoundaryValue_4, sizeof(__pyx_k_copyExteriorElementBoundaryValue_4), 0, 0, 1, 1},
46484  {&__pyx_n_s_copyGlobalElementBoundaryVelocit, __pyx_k_copyGlobalElementBoundaryVelocit, sizeof(__pyx_k_copyGlobalElementBoundaryVelocit), 0, 0, 1, 1},
46485  {&__pyx_n_s_copyLeftElementBoundaryInfo, __pyx_k_copyLeftElementBoundaryInfo, sizeof(__pyx_k_copyLeftElementBoundaryInfo), 0, 0, 1, 1},
46486  {&__pyx_n_s_csrColumnOffsets_eb_eNebN_ru, __pyx_k_csrColumnOffsets_eb_eNebN_ru, sizeof(__pyx_k_csrColumnOffsets_eb_eNebN_ru), 0, 0, 1, 1},
46487  {&__pyx_n_s_csrColumnOffsets_eb_ru, __pyx_k_csrColumnOffsets_eb_ru, sizeof(__pyx_k_csrColumnOffsets_eb_ru), 0, 0, 1, 1},
46488  {&__pyx_n_s_csrColumnOffsets_ru, __pyx_k_csrColumnOffsets_ru, sizeof(__pyx_k_csrColumnOffsets_ru), 0, 0, 1, 1},
46489  {&__pyx_n_s_csrRowIndeces_ru, __pyx_k_csrRowIndeces_ru, sizeof(__pyx_k_csrRowIndeces_ru), 0, 0, 1, 1},
46490  {&__pyx_n_s_dH, __pyx_k_dH, sizeof(__pyx_k_dH), 0, 0, 1, 1},
46491  {&__pyx_n_s_dS, __pyx_k_dS, sizeof(__pyx_k_dS), 0, 0, 1, 1},
46492  {&__pyx_n_s_dSR, __pyx_k_dSR, sizeof(__pyx_k_dSR), 0, 0, 1, 1},
46493  {&__pyx_n_s_dS_u, __pyx_k_dS_u, sizeof(__pyx_k_dS_u), 0, 0, 1, 1},
46494  {&__pyx_n_s_dV, __pyx_k_dV, sizeof(__pyx_k_dV), 0, 0, 1, 1},
46495  {&__pyx_n_s_dVR, __pyx_k_dVR, sizeof(__pyx_k_dVR), 0, 0, 1, 1},
46496  {&__pyx_n_s_dX, __pyx_k_dX, sizeof(__pyx_k_dX), 0, 0, 1, 1},
46497  {&__pyx_n_s_da, __pyx_k_da, sizeof(__pyx_k_da), 0, 0, 1, 1},
46498  {&__pyx_n_s_db, __pyx_k_db, sizeof(__pyx_k_db), 0, 0, 1, 1},
46499  {&__pyx_n_s_db_eb, __pyx_k_db_eb, sizeof(__pyx_k_db_eb), 0, 0, 1, 1},
46500  {&__pyx_n_s_derror, __pyx_k_derror, sizeof(__pyx_k_derror), 0, 0, 1, 1},
46501  {&__pyx_n_s_df, __pyx_k_df, sizeof(__pyx_k_df), 0, 0, 1, 1},
46502  {&__pyx_n_s_df1, __pyx_k_df1, sizeof(__pyx_k_df1), 0, 0, 1, 1},
46503  {&__pyx_n_s_df2, __pyx_k_df2, sizeof(__pyx_k_df2), 0, 0, 1, 1},
46504  {&__pyx_n_s_dim_dof, __pyx_k_dim_dof, sizeof(__pyx_k_dim_dof), 0, 0, 1, 1},
46505  {&__pyx_n_s_dm, __pyx_k_dm, sizeof(__pyx_k_dm), 0, 0, 1, 1},
46506  {&__pyx_n_s_dmt, __pyx_k_dmt, sizeof(__pyx_k_dmt), 0, 0, 1, 1},
46507  {&__pyx_n_s_dof, __pyx_k_dof, sizeof(__pyx_k_dof), 0, 0, 1, 1},
46508  {&__pyx_n_s_dofs, __pyx_k_dofs, sizeof(__pyx_k_dofs), 0, 0, 1, 1},
46509  {&__pyx_n_s_dphi, __pyx_k_dphi, sizeof(__pyx_k_dphi), 0, 0, 1, 1},
46510  {&__pyx_n_s_dphi_trace_left, __pyx_k_dphi_trace_left, sizeof(__pyx_k_dphi_trace_left), 0, 0, 1, 1},
46511  {&__pyx_n_s_dphi_trace_right, __pyx_k_dphi_trace_right, sizeof(__pyx_k_dphi_trace_right), 0, 0, 1, 1},
46512  {&__pyx_n_s_dr, __pyx_k_dr, sizeof(__pyx_k_dr), 0, 0, 1, 1},
46513  {&__pyx_n_s_dsigma_xx, __pyx_k_dsigma_xx, sizeof(__pyx_k_dsigma_xx), 0, 0, 1, 1},
46514  {&__pyx_n_s_dsigma_xy, __pyx_k_dsigma_xy, sizeof(__pyx_k_dsigma_xy), 0, 0, 1, 1},
46515  {&__pyx_n_s_dsigma_xz, __pyx_k_dsigma_xz, sizeof(__pyx_k_dsigma_xz), 0, 0, 1, 1},
46516  {&__pyx_n_s_dsigma_yx, __pyx_k_dsigma_yx, sizeof(__pyx_k_dsigma_yx), 0, 0, 1, 1},
46517  {&__pyx_n_s_dsigma_yy, __pyx_k_dsigma_yy, sizeof(__pyx_k_dsigma_yy), 0, 0, 1, 1},
46518  {&__pyx_n_s_dsigma_yz, __pyx_k_dsigma_yz, sizeof(__pyx_k_dsigma_yz), 0, 0, 1, 1},
46519  {&__pyx_n_s_dsigma_zx, __pyx_k_dsigma_zx, sizeof(__pyx_k_dsigma_zx), 0, 0, 1, 1},
46520  {&__pyx_n_s_dsigma_zy, __pyx_k_dsigma_zy, sizeof(__pyx_k_dsigma_zy), 0, 0, 1, 1},
46521  {&__pyx_n_s_dsigma_zz, __pyx_k_dsigma_zz, sizeof(__pyx_k_dsigma_zz), 0, 0, 1, 1},
46522  {&__pyx_n_s_dstrong_residual, __pyx_k_dstrong_residual, sizeof(__pyx_k_dstrong_residual), 0, 0, 1, 1},
46523  {&__pyx_n_s_ebq_global_val, __pyx_k_ebq_global_val, sizeof(__pyx_k_ebq_global_val), 0, 0, 1, 1},
46524  {&__pyx_n_s_ebq_val, __pyx_k_ebq_val, sizeof(__pyx_k_ebq_val), 0, 0, 1, 1},
46525  {&__pyx_n_s_ebqe_val, __pyx_k_ebqe_val, sizeof(__pyx_k_ebqe_val), 0, 0, 1, 1},
46526  {&__pyx_n_s_elementBoundaryElements, __pyx_k_elementBoundaryElements, sizeof(__pyx_k_elementBoundaryElements), 0, 0, 1, 1},
46527  {&__pyx_n_s_elementBoundaryElementsArray, __pyx_k_elementBoundaryElementsArray, sizeof(__pyx_k_elementBoundaryElementsArray), 0, 0, 1, 1},
46528  {&__pyx_n_s_elementBoundaryFluxJacobian, __pyx_k_elementBoundaryFluxJacobian, sizeof(__pyx_k_elementBoundaryFluxJacobian), 0, 0, 1, 1},
46529  {&__pyx_n_s_elementBoundaryFluxJacobian_2sid, __pyx_k_elementBoundaryFluxJacobian_2sid, sizeof(__pyx_k_elementBoundaryFluxJacobian_2sid), 0, 0, 1, 1},
46530  {&__pyx_n_s_elementBoundaryFluxJacobian_eb, __pyx_k_elementBoundaryFluxJacobian_eb, sizeof(__pyx_k_elementBoundaryFluxJacobian_eb), 0, 0, 1, 1},
46531  {&__pyx_n_s_elementBoundaryLocalElementBound, __pyx_k_elementBoundaryLocalElementBound, sizeof(__pyx_k_elementBoundaryLocalElementBound), 0, 0, 1, 1},
46532  {&__pyx_n_s_elementBoundaryLocalElementBound_2, __pyx_k_elementBoundaryLocalElementBound_2, sizeof(__pyx_k_elementBoundaryLocalElementBound_2), 0, 0, 1, 1},
46533  {&__pyx_n_s_elementBoundaryMaterialTypes, __pyx_k_elementBoundaryMaterialTypes, sizeof(__pyx_k_elementBoundaryMaterialTypes), 0, 0, 1, 1},
46534  {&__pyx_n_s_elementDiameter, __pyx_k_elementDiameter, sizeof(__pyx_k_elementDiameter), 0, 0, 1, 1},
46535  {&__pyx_n_s_elementJacobian, __pyx_k_elementJacobian, sizeof(__pyx_k_elementJacobian), 0, 0, 1, 1},
46536  {&__pyx_n_s_elementJacobian_eb, __pyx_k_elementJacobian_eb, sizeof(__pyx_k_elementJacobian_eb), 0, 0, 1, 1},
46537  {&__pyx_n_s_elementNeighbors, __pyx_k_elementNeighbors, sizeof(__pyx_k_elementNeighbors), 0, 0, 1, 1},
46538  {&__pyx_n_s_elementNodes, __pyx_k_elementNodes, sizeof(__pyx_k_elementNodes), 0, 0, 1, 1},
46539  {&__pyx_n_s_elementNodesArray, __pyx_k_elementNodesArray, sizeof(__pyx_k_elementNodesArray), 0, 0, 1, 1},
46540  {&__pyx_n_s_elementResidual, __pyx_k_elementResidual, sizeof(__pyx_k_elementResidual), 0, 0, 1, 1},
46541  {&__pyx_n_s_elementSpatialResidual, __pyx_k_elementSpatialResidual, sizeof(__pyx_k_elementSpatialResidual), 0, 0, 1, 1},
46542  {&__pyx_n_s_end, __pyx_k_end, sizeof(__pyx_k_end), 0, 0, 1, 1},
46543  {&__pyx_n_s_epsFact, __pyx_k_epsFact, sizeof(__pyx_k_epsFact), 0, 0, 1, 1},
46544  {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1},
46545  {&__pyx_kp_s_error_copyFromFreeToGlobal, __pyx_k_error_copyFromFreeToGlobal, sizeof(__pyx_k_error_copyFromFreeToGlobal), 0, 0, 1, 0},
46546  {&__pyx_kp_s_error_in_getJacobianValuesTrace, __pyx_k_error_in_getJacobianValuesTrace, sizeof(__pyx_k_error_in_getJacobianValuesTrace), 0, 0, 1, 0},
46547  {&__pyx_kp_s_error_in_getJacobianValues_jacob, __pyx_k_error_in_getJacobianValues_jacob, sizeof(__pyx_k_error_in_getJacobianValues_jacob), 0, 0, 1, 0},
46548  {&__pyx_n_s_estimate_mt, __pyx_k_estimate_mt, sizeof(__pyx_k_estimate_mt), 0, 0, 1, 1},
46549  {&__pyx_n_s_estimate_mt_lowmem, __pyx_k_estimate_mt_lowmem, sizeof(__pyx_k_estimate_mt_lowmem), 0, 0, 1, 1},
46550  {&__pyx_n_s_exteriorElementBoundaries, __pyx_k_exteriorElementBoundaries, sizeof(__pyx_k_exteriorElementBoundaries), 0, 0, 1, 1},
46551  {&__pyx_n_s_exteriorElementBoundariesArray, __pyx_k_exteriorElementBoundariesArray, sizeof(__pyx_k_exteriorElementBoundariesArray), 0, 0, 1, 1},
46552  {&__pyx_n_s_f, __pyx_k_f, sizeof(__pyx_k_f), 0, 0, 1, 1},
46553  {&__pyx_n_s_file, __pyx_k_file, sizeof(__pyx_k_file), 0, 0, 1, 1},
46554  {&__pyx_n_s_firstBadIndex, __pyx_k_firstBadIndex, sizeof(__pyx_k_firstBadIndex), 0, 0, 1, 1},
46555  {&__pyx_n_s_flag, __pyx_k_flag, sizeof(__pyx_k_flag), 0, 0, 1, 1},
46556  {&__pyx_n_s_flux, __pyx_k_flux, sizeof(__pyx_k_flux), 0, 0, 1, 1},
46557  {&__pyx_n_s_fluxDomainBoundaryIntegral, __pyx_k_fluxDomainBoundaryIntegral, sizeof(__pyx_k_fluxDomainBoundaryIntegral), 0, 0, 1, 1},
46558  {&__pyx_n_s_fluxDomainBoundaryIntegralFromVe, __pyx_k_fluxDomainBoundaryIntegralFromVe, sizeof(__pyx_k_fluxDomainBoundaryIntegralFromVe), 0, 0, 1, 1},
46559  {&__pyx_n_s_fluxElementBoundaries, __pyx_k_fluxElementBoundaries, sizeof(__pyx_k_fluxElementBoundaries), 0, 0, 1, 1},
46560  {&__pyx_n_s_freeDOFids, __pyx_k_freeDOFids, sizeof(__pyx_k_freeDOFids), 0, 0, 1, 1},
46561  {&__pyx_n_s_freeGlobal_r, __pyx_k_freeGlobal_r, sizeof(__pyx_k_freeGlobal_r), 0, 0, 1, 1},
46562  {&__pyx_n_s_freeGlobal_u, __pyx_k_freeGlobal_u, sizeof(__pyx_k_freeGlobal_u), 0, 0, 1, 1},
46563  {&__pyx_n_s_freeLocal_r, __pyx_k_freeLocal_r, sizeof(__pyx_k_freeLocal_r), 0, 0, 1, 1},
46564  {&__pyx_n_s_freeLocal_u, __pyx_k_freeLocal_u, sizeof(__pyx_k_freeLocal_u), 0, 0, 1, 1},
46565  {&__pyx_n_s_free_u, __pyx_k_free_u, sizeof(__pyx_k_free_u), 0, 0, 1, 1},
46566  {&__pyx_n_s_functional_map_element, __pyx_k_functional_map_element, sizeof(__pyx_k_functional_map_element), 0, 0, 1, 1},
46567  {&__pyx_n_s_getCSRrepresentation, __pyx_k_getCSRrepresentation, sizeof(__pyx_k_getCSRrepresentation), 0, 0, 1, 1},
46568  {&__pyx_n_s_getPermutationsGlobal, __pyx_k_getPermutationsGlobal, sizeof(__pyx_k_getPermutationsGlobal), 0, 0, 1, 1},
46569  {&__pyx_n_s_globalDOFids, __pyx_k_globalDOFids, sizeof(__pyx_k_globalDOFids), 0, 0, 1, 1},
46570  {&__pyx_n_s_globalJacobian, __pyx_k_globalJacobian, sizeof(__pyx_k_globalJacobian), 0, 0, 1, 1},
46571  {&__pyx_n_s_globalJacobian_array, __pyx_k_globalJacobian_array, sizeof(__pyx_k_globalJacobian_array), 0, 0, 1, 1},
46572  {&__pyx_n_s_globalResidual, __pyx_k_globalResidual, sizeof(__pyx_k_globalResidual), 0, 0, 1, 1},
46573  {&__pyx_n_s_grad_phi, __pyx_k_grad_phi, sizeof(__pyx_k_grad_phi), 0, 0, 1, 1},
46574  {&__pyx_n_s_grad_phi_X_grad_w_dV, __pyx_k_grad_phi_X_grad_w_dV, sizeof(__pyx_k_grad_phi_X_grad_w_dV), 0, 0, 1, 1},
46575  {&__pyx_n_s_grad_psi, __pyx_k_grad_psi, sizeof(__pyx_k_grad_psi), 0, 0, 1, 1},
46576  {&__pyx_n_s_grad_u, __pyx_k_grad_u, sizeof(__pyx_k_grad_u), 0, 0, 1, 1},
46577  {&__pyx_n_s_grad_u_X_grad_w_dV, __pyx_k_grad_u_X_grad_w_dV, sizeof(__pyx_k_grad_u_X_grad_w_dV), 0, 0, 1, 1},
46578  {&__pyx_n_s_grad_v, __pyx_k_grad_v, sizeof(__pyx_k_grad_v), 0, 0, 1, 1},
46579  {&__pyx_n_s_grad_vArray, __pyx_k_grad_vArray, sizeof(__pyx_k_grad_vArray), 0, 0, 1, 1},
46580  {&__pyx_n_s_grad_v_X_grad_w_dV, __pyx_k_grad_v_X_grad_w_dV, sizeof(__pyx_k_grad_v_X_grad_w_dV), 0, 0, 1, 1},
46581  {&__pyx_n_s_grad_v_X_w_dS, __pyx_k_grad_v_X_w_dS, sizeof(__pyx_k_grad_v_X_w_dS), 0, 0, 1, 1},
46582  {&__pyx_n_s_grad_v_X_w_dV, __pyx_k_grad_v_X_w_dV, sizeof(__pyx_k_grad_v_X_w_dV), 0, 0, 1, 1},
46583  {&__pyx_n_s_grad_w, __pyx_k_grad_w, sizeof(__pyx_k_grad_w), 0, 0, 1, 1},
46584  {&__pyx_n_s_grad_w_dV, __pyx_k_grad_w_dV, sizeof(__pyx_k_grad_w_dV), 0, 0, 1, 1},
46585  {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
46586  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
46587  {&__pyx_n_s_interiorElementBoundaries, __pyx_k_interiorElementBoundaries, sizeof(__pyx_k_interiorElementBoundaries), 0, 0, 1, 1},
46588  {&__pyx_n_s_interiorElementBoundariesArray, __pyx_k_interiorElementBoundariesArray, sizeof(__pyx_k_interiorElementBoundariesArray), 0, 0, 1, 1},
46589  {&__pyx_n_s_internalNodes, __pyx_k_internalNodes, sizeof(__pyx_k_internalNodes), 0, 0, 1, 1},
46590  {&__pyx_n_s_interpolationValues, __pyx_k_interpolationValues, sizeof(__pyx_k_interpolationValues), 0, 0, 1, 1},
46591  {&__pyx_n_s_inverseJacobian, __pyx_k_inverseJacobian, sizeof(__pyx_k_inverseJacobian), 0, 0, 1, 1},
46592  {&__pyx_n_s_inverseJacobianArray, __pyx_k_inverseJacobianArray, sizeof(__pyx_k_inverseJacobianArray), 0, 0, 1, 1},
46593  {&__pyx_n_s_isDOFBoundary, __pyx_k_isDOFBoundary, sizeof(__pyx_k_isDOFBoundary), 0, 0, 1, 1},
46594  {&__pyx_n_s_jac, __pyx_k_jac, sizeof(__pyx_k_jac), 0, 0, 1, 1},
46595  {&__pyx_n_s_jacIndex, __pyx_k_jacIndex, sizeof(__pyx_k_jacIndex), 0, 0, 1, 1},
46596  {&__pyx_n_s_jac_array, __pyx_k_jac_array, sizeof(__pyx_k_jac_array), 0, 0, 1, 1},
46597  {&__pyx_n_s_jacobian, __pyx_k_jacobian, sizeof(__pyx_k_jacobian), 0, 0, 1, 1},
46598  {&__pyx_n_s_jacobianArray, __pyx_k_jacobianArray, sizeof(__pyx_k_jacobianArray), 0, 0, 1, 1},
46599  {&__pyx_n_s_jacobianDeterminantArray, __pyx_k_jacobianDeterminantArray, sizeof(__pyx_k_jacobianDeterminantArray), 0, 0, 1, 1},
46600  {&__pyx_n_s_jacobianInverseArray, __pyx_k_jacobianInverseArray, sizeof(__pyx_k_jacobianInverseArray), 0, 0, 1, 1},
46601  {&__pyx_n_s_jacobian_eb, __pyx_k_jacobian_eb, sizeof(__pyx_k_jacobian_eb), 0, 0, 1, 1},
46602  {&__pyx_n_s_jacobian_weak_residual, __pyx_k_jacobian_weak_residual, sizeof(__pyx_k_jacobian_weak_residual), 0, 0, 1, 1},
46603  {&__pyx_n_s_jacobian_weak_residual_eb, __pyx_k_jacobian_weak_residual_eb, sizeof(__pyx_k_jacobian_weak_residual_eb), 0, 0, 1, 1},
46604  {&__pyx_n_s_jacobian_weak_residual_xx, __pyx_k_jacobian_weak_residual_xx, sizeof(__pyx_k_jacobian_weak_residual_xx), 0, 0, 1, 1},
46605  {&__pyx_n_s_jacobian_weak_residual_xy, __pyx_k_jacobian_weak_residual_xy, sizeof(__pyx_k_jacobian_weak_residual_xy), 0, 0, 1, 1},
46606  {&__pyx_n_s_jacobian_weak_residual_xz, __pyx_k_jacobian_weak_residual_xz, sizeof(__pyx_k_jacobian_weak_residual_xz), 0, 0, 1, 1},
46607  {&__pyx_n_s_jacobian_weak_residual_yx, __pyx_k_jacobian_weak_residual_yx, sizeof(__pyx_k_jacobian_weak_residual_yx), 0, 0, 1, 1},
46608  {&__pyx_n_s_jacobian_weak_residual_yy, __pyx_k_jacobian_weak_residual_yy, sizeof(__pyx_k_jacobian_weak_residual_yy), 0, 0, 1, 1},
46609  {&__pyx_n_s_jacobian_weak_residual_yz, __pyx_k_jacobian_weak_residual_yz, sizeof(__pyx_k_jacobian_weak_residual_yz), 0, 0, 1, 1},
46610  {&__pyx_n_s_jacobian_weak_residual_zx, __pyx_k_jacobian_weak_residual_zx, sizeof(__pyx_k_jacobian_weak_residual_zx), 0, 0, 1, 1},
46611  {&__pyx_n_s_jacobian_weak_residual_zy, __pyx_k_jacobian_weak_residual_zy, sizeof(__pyx_k_jacobian_weak_residual_zy), 0, 0, 1, 1},
46612  {&__pyx_n_s_jacobian_weak_residual_zz, __pyx_k_jacobian_weak_residual_zz, sizeof(__pyx_k_jacobian_weak_residual_zz), 0, 0, 1, 1},
46613  {&__pyx_n_s_l2g, __pyx_k_l2g, sizeof(__pyx_k_l2g), 0, 0, 1, 1},
46614  {&__pyx_n_s_loadBoundaryFluxIntoGlobalElemen, __pyx_k_loadBoundaryFluxIntoGlobalElemen, sizeof(__pyx_k_loadBoundaryFluxIntoGlobalElemen), 0, 0, 1, 1},
46615  {&__pyx_n_s_m, __pyx_k_m, sizeof(__pyx_k_m), 0, 0, 1, 1},
46616  {&__pyx_n_s_mAverage, __pyx_k_mAverage, sizeof(__pyx_k_mAverage), 0, 0, 1, 1},
46617  {&__pyx_n_s_mJump, __pyx_k_mJump, sizeof(__pyx_k_mJump), 0, 0, 1, 1},
46618  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
46619  {&__pyx_n_s_metricTensorArray, __pyx_k_metricTensorArray, sizeof(__pyx_k_metricTensorArray), 0, 0, 1, 1},
46620  {&__pyx_n_s_metricTensorDeterminantSqrtArray, __pyx_k_metricTensorDeterminantSqrtArray, sizeof(__pyx_k_metricTensorDeterminantSqrtArray), 0, 0, 1, 1},
46621  {&__pyx_n_s_mom_flux_vec_u, __pyx_k_mom_flux_vec_u, sizeof(__pyx_k_mom_flux_vec_u), 0, 0, 1, 1},
46622  {&__pyx_n_s_mom_flux_vec_v, __pyx_k_mom_flux_vec_v, sizeof(__pyx_k_mom_flux_vec_v), 0, 0, 1, 1},
46623  {&__pyx_n_s_mom_flux_vec_w, __pyx_k_mom_flux_vec_w, sizeof(__pyx_k_mom_flux_vec_w), 0, 0, 1, 1},
46624  {&__pyx_n_s_mt, __pyx_k_mt, sizeof(__pyx_k_mt), 0, 0, 1, 1},
46625  {&__pyx_n_s_n, __pyx_k_n, sizeof(__pyx_k_n), 0, 0, 1, 1},
46626  {&__pyx_n_s_nComponents, __pyx_k_nComponents, sizeof(__pyx_k_nComponents), 0, 0, 1, 1},
46627  {&__pyx_n_s_nDOF2set, __pyx_k_nDOF2set, sizeof(__pyx_k_nDOF2set), 0, 0, 1, 1},
46628  {&__pyx_n_s_nDOF_element, __pyx_k_nDOF_element, sizeof(__pyx_k_nDOF_element), 0, 0, 1, 1},
46629  {&__pyx_n_s_nDOF_test_element, __pyx_k_nDOF_test_element, sizeof(__pyx_k_nDOF_test_element), 0, 0, 1, 1},
46630  {&__pyx_n_s_nDOF_trial_element, __pyx_k_nDOF_trial_element, sizeof(__pyx_k_nDOF_trial_element), 0, 0, 1, 1},
46631  {&__pyx_n_s_nElementBoundaries_element, __pyx_k_nElementBoundaries_element, sizeof(__pyx_k_nElementBoundaries_element), 0, 0, 1, 1},
46632  {&__pyx_n_s_nElementBoundaries_global, __pyx_k_nElementBoundaries_global, sizeof(__pyx_k_nElementBoundaries_global), 0, 0, 1, 1},
46633  {&__pyx_n_s_nElementBoundaries_owned, __pyx_k_nElementBoundaries_owned, sizeof(__pyx_k_nElementBoundaries_owned), 0, 0, 1, 1},
46634  {&__pyx_n_s_nElementBoundaryQuadraturePoints, __pyx_k_nElementBoundaryQuadraturePoints, sizeof(__pyx_k_nElementBoundaryQuadraturePoints), 0, 0, 1, 1},
46635  {&__pyx_n_s_nElements_global, __pyx_k_nElements_global, sizeof(__pyx_k_nElements_global), 0, 0, 1, 1},
46636  {&__pyx_n_s_nElements_node, __pyx_k_nElements_node, sizeof(__pyx_k_nElements_node), 0, 0, 1, 1},
46637  {&__pyx_n_s_nExteriorElementBoundaries, __pyx_k_nExteriorElementBoundaries, sizeof(__pyx_k_nExteriorElementBoundaries), 0, 0, 1, 1},
46638  {&__pyx_n_s_nExteriorElementBoundaries_globa, __pyx_k_nExteriorElementBoundaries_globa, sizeof(__pyx_k_nExteriorElementBoundaries_globa), 0, 0, 1, 1},
46639  {&__pyx_n_s_nFreeDOF_element_r, __pyx_k_nFreeDOF_element_r, sizeof(__pyx_k_nFreeDOF_element_r), 0, 0, 1, 1},
46640  {&__pyx_n_s_nFreeDOF_element_u, __pyx_k_nFreeDOF_element_u, sizeof(__pyx_k_nFreeDOF_element_u), 0, 0, 1, 1},
46641  {&__pyx_n_s_nFreeVDOF_global, __pyx_k_nFreeVDOF_global, sizeof(__pyx_k_nFreeVDOF_global), 0, 0, 1, 1},
46642  {&__pyx_n_s_nInteriorElementBoundaries_globa, __pyx_k_nInteriorElementBoundaries_globa, sizeof(__pyx_k_nInteriorElementBoundaries_globa), 0, 0, 1, 1},
46643  {&__pyx_n_s_nNodes_element, __pyx_k_nNodes_element, sizeof(__pyx_k_nNodes_element), 0, 0, 1, 1},
46644  {&__pyx_n_s_nNodes_global, __pyx_k_nNodes_global, sizeof(__pyx_k_nNodes_global), 0, 0, 1, 1},
46645  {&__pyx_n_s_nNodes_internal, __pyx_k_nNodes_internal, sizeof(__pyx_k_nNodes_internal), 0, 0, 1, 1},
46646  {&__pyx_n_s_nNonzeros, __pyx_k_nNonzeros, sizeof(__pyx_k_nNonzeros), 0, 0, 1, 1},
46647  {&__pyx_n_s_nQuadraturePoints_element, __pyx_k_nQuadraturePoints_element, sizeof(__pyx_k_nQuadraturePoints_element), 0, 0, 1, 1},
46648  {&__pyx_n_s_nQuadraturePoints_elementBoundar, __pyx_k_nQuadraturePoints_elementBoundar, sizeof(__pyx_k_nQuadraturePoints_elementBoundar), 0, 0, 1, 1},
46649  {&__pyx_n_s_nSpace, __pyx_k_nSpace, sizeof(__pyx_k_nSpace), 0, 0, 1, 1},
46650  {&__pyx_n_s_nSpace_global, __pyx_k_nSpace_global, sizeof(__pyx_k_nSpace_global), 0, 0, 1, 1},
46651  {&__pyx_n_s_nValueArray, __pyx_k_nValueArray, sizeof(__pyx_k_nValueArray), 0, 0, 1, 1},
46652  {&__pyx_n_s_nValuesPerQuadraturePoint, __pyx_k_nValuesPerQuadraturePoint, sizeof(__pyx_k_nValuesPerQuadraturePoint), 0, 0, 1, 1},
46653  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
46654  {&__pyx_n_s_nd, __pyx_k_nd, sizeof(__pyx_k_nd), 0, 0, 1, 1},
46655  {&__pyx_n_s_ng, __pyx_k_ng, sizeof(__pyx_k_ng), 0, 0, 1, 1},
46656  {&__pyx_n_s_nodalAverage, __pyx_k_nodalAverage, sizeof(__pyx_k_nodalAverage), 0, 0, 1, 1},
46657  {&__pyx_n_s_nodeArray, __pyx_k_nodeArray, sizeof(__pyx_k_nodeArray), 0, 0, 1, 1},
46658  {&__pyx_n_s_nodeElementOffsets, __pyx_k_nodeElementOffsets, sizeof(__pyx_k_nodeElementOffsets), 0, 0, 1, 1},
46659  {&__pyx_n_s_nodeElementsArray, __pyx_k_nodeElementsArray, sizeof(__pyx_k_nodeElementsArray), 0, 0, 1, 1},
46660  {&__pyx_n_s_nodeStarElementNeighbors, __pyx_k_nodeStarElementNeighbors, sizeof(__pyx_k_nodeStarElementNeighbors), 0, 0, 1, 1},
46661  {&__pyx_n_s_nodeStarElements, __pyx_k_nodeStarElements, sizeof(__pyx_k_nodeStarElements), 0, 0, 1, 1},
46662  {&__pyx_n_s_nodeStarJacobianOffsets, __pyx_k_nodeStarJacobianOffsets, sizeof(__pyx_k_nodeStarJacobianOffsets), 0, 0, 1, 1},
46663  {&__pyx_n_s_nodeStarOffsets, __pyx_k_nodeStarOffsets, sizeof(__pyx_k_nodeStarOffsets), 0, 0, 1, 1},
46664  {&__pyx_n_s_normal, __pyx_k_normal, sizeof(__pyx_k_normal), 0, 0, 1, 1},
46665  {&__pyx_kp_s_not_recognized_quitting, __pyx_k_not_recognized_quitting, sizeof(__pyx_k_not_recognized_quitting), 0, 0, 1, 0},
46666  {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1},
46667  {&__pyx_n_s_numDiff, __pyx_k_numDiff, sizeof(__pyx_k_numDiff), 0, 0, 1, 1},
46668  {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1},
46669  {&__pyx_kp_s_numpy_core_multiarray_failed_to, __pyx_k_numpy_core_multiarray_failed_to, sizeof(__pyx_k_numpy_core_multiarray_failed_to), 0, 0, 1, 0},
46670  {&__pyx_kp_s_numpy_core_umath_failed_to_impor, __pyx_k_numpy_core_umath_failed_to_impor, sizeof(__pyx_k_numpy_core_umath_failed_to_impor), 0, 0, 1, 0},
46671  {&__pyx_n_s_offset, __pyx_k_offset, sizeof(__pyx_k_offset), 0, 0, 1, 1},
46672  {&__pyx_n_s_offset_r, __pyx_k_offset_r, sizeof(__pyx_k_offset_r), 0, 0, 1, 1},
46673  {&__pyx_n_s_offset_u, __pyx_k_offset_u, sizeof(__pyx_k_offset_u), 0, 0, 1, 1},
46674  {&__pyx_n_s_output, __pyx_k_output, sizeof(__pyx_k_output), 0, 0, 1, 1},
46675  {&__pyx_n_s_p, __pyx_k_p, sizeof(__pyx_k_p), 0, 0, 1, 1},
46676  {&__pyx_n_s_parametricFiniteElementSpace_get, __pyx_k_parametricFiniteElementSpace_get, sizeof(__pyx_k_parametricFiniteElementSpace_get), 0, 0, 1, 1},
46677  {&__pyx_n_s_parametricFiniteElementSpace_get_2, __pyx_k_parametricFiniteElementSpace_get_2, sizeof(__pyx_k_parametricFiniteElementSpace_get_2), 0, 0, 1, 1},
46678  {&__pyx_n_s_parametricFiniteElementSpace_get_3, __pyx_k_parametricFiniteElementSpace_get_3, sizeof(__pyx_k_parametricFiniteElementSpace_get_3), 0, 0, 1, 1},
46679  {&__pyx_n_s_parametricFiniteElementSpace_get_4, __pyx_k_parametricFiniteElementSpace_get_4, sizeof(__pyx_k_parametricFiniteElementSpace_get_4), 0, 0, 1, 1},
46680  {&__pyx_n_s_parametricFiniteElementSpace_get_5, __pyx_k_parametricFiniteElementSpace_get_5, sizeof(__pyx_k_parametricFiniteElementSpace_get_5), 0, 0, 1, 1},
46681  {&__pyx_n_s_parametricFiniteElementSpace_get_6, __pyx_k_parametricFiniteElementSpace_get_6, sizeof(__pyx_k_parametricFiniteElementSpace_get_6), 0, 0, 1, 1},
46682  {&__pyx_n_s_parametricFiniteElementSpace_get_7, __pyx_k_parametricFiniteElementSpace_get_7, sizeof(__pyx_k_parametricFiniteElementSpace_get_7), 0, 0, 1, 1},
46683  {&__pyx_n_s_parametricMaps_getInverseValues, __pyx_k_parametricMaps_getInverseValues, sizeof(__pyx_k_parametricMaps_getInverseValues), 0, 0, 1, 1},
46684  {&__pyx_n_s_parametricMaps_getInverseValuesG, __pyx_k_parametricMaps_getInverseValuesG, sizeof(__pyx_k_parametricMaps_getInverseValuesG), 0, 0, 1, 1},
46685  {&__pyx_n_s_parametricMaps_getInverseValuesT, __pyx_k_parametricMaps_getInverseValuesT, sizeof(__pyx_k_parametricMaps_getInverseValuesT), 0, 0, 1, 1},
46686  {&__pyx_n_s_parametricMaps_getJacobianValues, __pyx_k_parametricMaps_getJacobianValues, sizeof(__pyx_k_parametricMaps_getJacobianValues), 0, 0, 1, 1},
46687  {&__pyx_n_s_parametricMaps_getJacobianValues_2, __pyx_k_parametricMaps_getJacobianValues_2, sizeof(__pyx_k_parametricMaps_getJacobianValues_2), 0, 0, 1, 1},
46688  {&__pyx_n_s_parametricMaps_getJacobianValues_3, __pyx_k_parametricMaps_getJacobianValues_3, sizeof(__pyx_k_parametricMaps_getJacobianValues_3), 0, 0, 1, 1},
46689  {&__pyx_n_s_parametricMaps_getJacobianValues_4, __pyx_k_parametricMaps_getJacobianValues_4, sizeof(__pyx_k_parametricMaps_getJacobianValues_4), 0, 0, 1, 1},
46690  {&__pyx_n_s_parametricMaps_getPermutations, __pyx_k_parametricMaps_getPermutations, sizeof(__pyx_k_parametricMaps_getPermutations), 0, 0, 1, 1},
46691  {&__pyx_n_s_parametricMaps_getPermutationsGl, __pyx_k_parametricMaps_getPermutationsGl, sizeof(__pyx_k_parametricMaps_getPermutationsGl), 0, 0, 1, 1},
46692  {&__pyx_n_s_parametricMaps_getValues, __pyx_k_parametricMaps_getValues, sizeof(__pyx_k_parametricMaps_getValues), 0, 0, 1, 1},
46693  {&__pyx_n_s_parametricMaps_getValuesGlobalEx, __pyx_k_parametricMaps_getValuesGlobalEx, sizeof(__pyx_k_parametricMaps_getValuesGlobalEx), 0, 0, 1, 1},
46694  {&__pyx_n_s_parametricMaps_getValuesTrace, __pyx_k_parametricMaps_getValuesTrace, sizeof(__pyx_k_parametricMaps_getValuesTrace), 0, 0, 1, 1},
46695  {&__pyx_n_s_pe, __pyx_k_pe, sizeof(__pyx_k_pe), 0, 0, 1, 1},
46696  {&__pyx_n_s_permutations, __pyx_k_permutations, sizeof(__pyx_k_permutations), 0, 0, 1, 1},
46697  {&__pyx_n_s_phi, __pyx_k_phi, sizeof(__pyx_k_phi), 0, 0, 1, 1},
46698  {&__pyx_n_s_phi_bc, __pyx_k_phi_bc, sizeof(__pyx_k_phi_bc), 0, 0, 1, 1},
46699  {&__pyx_n_s_phi_trace, __pyx_k_phi_trace, sizeof(__pyx_k_phi_trace), 0, 0, 1, 1},
46700  {&__pyx_n_s_print, __pyx_k_print, sizeof(__pyx_k_print), 0, 0, 1, 1},
46701  {&__pyx_n_s_projectFromNodalInterpolationCon, __pyx_k_projectFromNodalInterpolationCon, sizeof(__pyx_k_projectFromNodalInterpolationCon), 0, 0, 1, 1},
46702  {&__pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_k_proteus_cfemIntegrals_pyx, sizeof(__pyx_k_proteus_cfemIntegrals_pyx), 0, 0, 1, 0},
46703  {&__pyx_n_s_psi, __pyx_k_psi, sizeof(__pyx_k_psi), 0, 0, 1, 1},
46704  {&__pyx_n_s_qDV, __pyx_k_qDV, sizeof(__pyx_k_qDV), 0, 0, 1, 1},
46705  {&__pyx_n_s_qDV_eb, __pyx_k_qDV_eb, sizeof(__pyx_k_qDV_eb), 0, 0, 1, 1},
46706  {&__pyx_n_s_qV, __pyx_k_qV, sizeof(__pyx_k_qV), 0, 0, 1, 1},
46707  {&__pyx_n_s_qa, __pyx_k_qa, sizeof(__pyx_k_qa), 0, 0, 1, 1},
46708  {&__pyx_n_s_qv, __pyx_k_qv, sizeof(__pyx_k_qv), 0, 0, 1, 1},
46709  {&__pyx_n_s_qw_dV, __pyx_k_qw_dV, sizeof(__pyx_k_qw_dV), 0, 0, 1, 1},
46710  {&__pyx_n_s_r, __pyx_k_r, sizeof(__pyx_k_r), 0, 0, 1, 1},
46711  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
46712  {&__pyx_n_s_referenceWeights, __pyx_k_referenceWeights, sizeof(__pyx_k_referenceWeights), 0, 0, 1, 1},
46713  {&__pyx_n_s_residual, __pyx_k_residual, sizeof(__pyx_k_residual), 0, 0, 1, 1},
46714  {&__pyx_n_s_rho_split, __pyx_k_rho_split, sizeof(__pyx_k_rho_split), 0, 0, 1, 1},
46715  {&__pyx_n_s_rowptr, __pyx_k_rowptr, sizeof(__pyx_k_rowptr), 0, 0, 1, 1},
46716  {&__pyx_n_s_rowptr_dummy, __pyx_k_rowptr_dummy, sizeof(__pyx_k_rowptr_dummy), 0, 0, 1, 1},
46717  {&__pyx_n_s_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 0, 1, 1},
46718  {&__pyx_n_s_s1, __pyx_k_s1, sizeof(__pyx_k_s1), 0, 0, 1, 1},
46719  {&__pyx_n_s_s2, __pyx_k_s2, sizeof(__pyx_k_s2), 0, 0, 1, 1},
46720  {&__pyx_n_s_sResult, __pyx_k_sResult, sizeof(__pyx_k_sResult), 0, 0, 1, 1},
46721  {&__pyx_n_s_scalarDomainIntegral, __pyx_k_scalarDomainIntegral, sizeof(__pyx_k_scalarDomainIntegral), 0, 0, 1, 1},
46722  {&__pyx_n_s_scalarHeavisideDomainIntegral, __pyx_k_scalarHeavisideDomainIntegral, sizeof(__pyx_k_scalarHeavisideDomainIntegral), 0, 0, 1, 1},
46723  {&__pyx_n_s_scalarSmoothedHeavisideDomainInt, __pyx_k_scalarSmoothedHeavisideDomainInt, sizeof(__pyx_k_scalarSmoothedHeavisideDomainInt), 0, 0, 1, 1},
46724  {&__pyx_n_s_setExteriorGlobalElementBoundary, __pyx_k_setExteriorGlobalElementBoundary, sizeof(__pyx_k_setExteriorGlobalElementBoundary), 0, 0, 1, 1},
46725  {&__pyx_n_s_sigma, __pyx_k_sigma, sizeof(__pyx_k_sigma), 0, 0, 1, 1},
46726  {&__pyx_n_s_sqrt_det_g, __pyx_k_sqrt_det_g, sizeof(__pyx_k_sqrt_det_g), 0, 0, 1, 1},
46727  {&__pyx_n_s_starJ, __pyx_k_starJ, sizeof(__pyx_k_starJ), 0, 0, 1, 1},
46728  {&__pyx_n_s_starJacobian, __pyx_k_starJacobian, sizeof(__pyx_k_starJacobian), 0, 0, 1, 1},
46729  {&__pyx_n_s_starR, __pyx_k_starR, sizeof(__pyx_k_starR), 0, 0, 1, 1},
46730  {&__pyx_n_s_starU, __pyx_k_starU, sizeof(__pyx_k_starU), 0, 0, 1, 1},
46731  {&__pyx_n_s_stride, __pyx_k_stride, sizeof(__pyx_k_stride), 0, 0, 1, 1},
46732  {&__pyx_n_s_stride_r, __pyx_k_stride_r, sizeof(__pyx_k_stride_r), 0, 0, 1, 1},
46733  {&__pyx_n_s_stride_u, __pyx_k_stride_u, sizeof(__pyx_k_stride_u), 0, 0, 1, 1},
46734  {&__pyx_n_s_strong_residual, __pyx_k_strong_residual, sizeof(__pyx_k_strong_residual), 0, 0, 1, 1},
46735  {&__pyx_n_s_t, __pyx_k_t, sizeof(__pyx_k_t), 0, 0, 1, 1},
46736  {&__pyx_n_s_tResult, __pyx_k_tResult, sizeof(__pyx_k_tResult), 0, 0, 1, 1},
46737  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
46738  {&__pyx_n_s_tolerance, __pyx_k_tolerance, sizeof(__pyx_k_tolerance), 0, 0, 1, 1},
46739  {&__pyx_n_s_u, __pyx_k_u, sizeof(__pyx_k_u), 0, 0, 1, 1},
46740  {&__pyx_n_s_ub, __pyx_k_ub, sizeof(__pyx_k_ub), 0, 0, 1, 1},
46741  {&__pyx_n_s_unitNormalArray, __pyx_k_unitNormalArray, sizeof(__pyx_k_unitNormalArray), 0, 0, 1, 1},
46742  {&__pyx_n_s_updateAddJacobian_CSR, __pyx_k_updateAddJacobian_CSR, sizeof(__pyx_k_updateAddJacobian_CSR), 0, 0, 1, 1},
46743  {&__pyx_n_s_updateAdvectionJacobian_strong, __pyx_k_updateAdvectionJacobian_strong, sizeof(__pyx_k_updateAdvectionJacobian_strong), 0, 0, 1, 1},
46744  {&__pyx_n_s_updateAdvectionJacobian_weak, __pyx_k_updateAdvectionJacobian_weak, sizeof(__pyx_k_updateAdvectionJacobian_weak), 0, 0, 1, 1},
46745  {&__pyx_n_s_updateAdvectionJacobian_weak_low, __pyx_k_updateAdvectionJacobian_weak_low, sizeof(__pyx_k_updateAdvectionJacobian_weak_low), 0, 0, 1, 1},
46746  {&__pyx_n_s_updateAdvection_adjoint, __pyx_k_updateAdvection_adjoint, sizeof(__pyx_k_updateAdvection_adjoint), 0, 0, 1, 1},
46747  {&__pyx_n_s_updateAdvection_strong, __pyx_k_updateAdvection_strong, sizeof(__pyx_k_updateAdvection_strong), 0, 0, 1, 1},
46748  {&__pyx_n_s_updateAdvection_weak, __pyx_k_updateAdvection_weak, sizeof(__pyx_k_updateAdvection_weak), 0, 0, 1, 1},
46749  {&__pyx_n_s_updateCoef, __pyx_k_updateCoef, sizeof(__pyx_k_updateCoef), 0, 0, 1, 1},
46750  {&__pyx_n_s_updateDiffusion2_adjoint, __pyx_k_updateDiffusion2_adjoint, sizeof(__pyx_k_updateDiffusion2_adjoint), 0, 0, 1, 1},
46751  {&__pyx_n_s_updateDiffusion2_adjoint_sd, __pyx_k_updateDiffusion2_adjoint_sd, sizeof(__pyx_k_updateDiffusion2_adjoint_sd), 0, 0, 1, 1},
46752  {&__pyx_n_s_updateDiffusion2_strong, __pyx_k_updateDiffusion2_strong, sizeof(__pyx_k_updateDiffusion2_strong), 0, 0, 1, 1},
46753  {&__pyx_n_s_updateDiffusion2_strong_sd, __pyx_k_updateDiffusion2_strong_sd, sizeof(__pyx_k_updateDiffusion2_strong_sd), 0, 0, 1, 1},
46754  {&__pyx_n_s_updateDiffusionJacobian2_strong, __pyx_k_updateDiffusionJacobian2_strong, sizeof(__pyx_k_updateDiffusionJacobian2_strong), 0, 0, 1, 1},
46755  {&__pyx_n_s_updateDiffusionJacobian2_strong_2, __pyx_k_updateDiffusionJacobian2_strong_2, sizeof(__pyx_k_updateDiffusionJacobian2_strong_2), 0, 0, 1, 1},
46756  {&__pyx_n_s_updateDiffusionJacobian_MixedFor, __pyx_k_updateDiffusionJacobian_MixedFor, sizeof(__pyx_k_updateDiffusionJacobian_MixedFor), 0, 0, 1, 1},
46757  {&__pyx_n_s_updateDiffusionJacobian_MixedFor_2, __pyx_k_updateDiffusionJacobian_MixedFor_2, sizeof(__pyx_k_updateDiffusionJacobian_MixedFor_2), 0, 0, 1, 1},
46758  {&__pyx_n_s_updateDiffusionJacobian_strong, __pyx_k_updateDiffusionJacobian_strong, sizeof(__pyx_k_updateDiffusionJacobian_strong), 0, 0, 1, 1},
46759  {&__pyx_n_s_updateDiffusionJacobian_strong_s, __pyx_k_updateDiffusionJacobian_strong_s, sizeof(__pyx_k_updateDiffusionJacobian_strong_s), 0, 0, 1, 1},
46760  {&__pyx_n_s_updateDiffusionJacobian_weak, __pyx_k_updateDiffusionJacobian_weak, sizeof(__pyx_k_updateDiffusionJacobian_weak), 0, 0, 1, 1},
46761  {&__pyx_n_s_updateDiffusionJacobian_weak_low, __pyx_k_updateDiffusionJacobian_weak_low, sizeof(__pyx_k_updateDiffusionJacobian_weak_low), 0, 0, 1, 1},
46762  {&__pyx_n_s_updateDiffusionJacobian_weak_sd, __pyx_k_updateDiffusionJacobian_weak_sd, sizeof(__pyx_k_updateDiffusionJacobian_weak_sd), 0, 0, 1, 1},
46763  {&__pyx_n_s_updateDiffusion_MixedForm_weak, __pyx_k_updateDiffusion_MixedForm_weak, sizeof(__pyx_k_updateDiffusion_MixedForm_weak), 0, 0, 1, 1},
46764  {&__pyx_n_s_updateDiffusion_MixedForm_weak_s, __pyx_k_updateDiffusion_MixedForm_weak_s, sizeof(__pyx_k_updateDiffusion_MixedForm_weak_s), 0, 0, 1, 1},
46765  {&__pyx_n_s_updateDiffusion_adjoint, __pyx_k_updateDiffusion_adjoint, sizeof(__pyx_k_updateDiffusion_adjoint), 0, 0, 1, 1},
46766  {&__pyx_n_s_updateDiffusion_adjoint_sd, __pyx_k_updateDiffusion_adjoint_sd, sizeof(__pyx_k_updateDiffusion_adjoint_sd), 0, 0, 1, 1},
46767  {&__pyx_n_s_updateDiffusion_strong, __pyx_k_updateDiffusion_strong, sizeof(__pyx_k_updateDiffusion_strong), 0, 0, 1, 1},
46768  {&__pyx_n_s_updateDiffusion_strong_sd, __pyx_k_updateDiffusion_strong_sd, sizeof(__pyx_k_updateDiffusion_strong_sd), 0, 0, 1, 1},
46769  {&__pyx_n_s_updateDiffusion_weak, __pyx_k_updateDiffusion_weak, sizeof(__pyx_k_updateDiffusion_weak), 0, 0, 1, 1},
46770  {&__pyx_n_s_updateDiffusion_weak_lowmem, __pyx_k_updateDiffusion_weak_lowmem, sizeof(__pyx_k_updateDiffusion_weak_lowmem), 0, 0, 1, 1},
46771  {&__pyx_n_s_updateDiffusion_weak_sd, __pyx_k_updateDiffusion_weak_sd, sizeof(__pyx_k_updateDiffusion_weak_sd), 0, 0, 1, 1},
46772  {&__pyx_n_s_updateExteriorElementBoundaryAdv, __pyx_k_updateExteriorElementBoundaryAdv, sizeof(__pyx_k_updateExteriorElementBoundaryAdv), 0, 0, 1, 1},
46773  {&__pyx_n_s_updateExteriorElementBoundaryDif, __pyx_k_updateExteriorElementBoundaryDif, sizeof(__pyx_k_updateExteriorElementBoundaryDif), 0, 0, 1, 1},
46774  {&__pyx_n_s_updateExteriorElementBoundaryDif_2, __pyx_k_updateExteriorElementBoundaryDif_2, sizeof(__pyx_k_updateExteriorElementBoundaryDif_2), 0, 0, 1, 1},
46775  {&__pyx_n_s_updateExteriorElementBoundaryDif_3, __pyx_k_updateExteriorElementBoundaryDif_3, sizeof(__pyx_k_updateExteriorElementBoundaryDif_3), 0, 0, 1, 1},
46776  {&__pyx_n_s_updateExteriorElementBoundaryDif_4, __pyx_k_updateExteriorElementBoundaryDif_4, sizeof(__pyx_k_updateExteriorElementBoundaryDif_4), 0, 0, 1, 1},
46777  {&__pyx_n_s_updateExteriorElementBoundaryFlu, __pyx_k_updateExteriorElementBoundaryFlu, sizeof(__pyx_k_updateExteriorElementBoundaryFlu), 0, 0, 1, 1},
46778  {&__pyx_n_s_updateExteriorElementBoundarySho, __pyx_k_updateExteriorElementBoundarySho, sizeof(__pyx_k_updateExteriorElementBoundarySho), 0, 0, 1, 1},
46779  {&__pyx_n_s_updateExteriorElementBoundary_Mi, __pyx_k_updateExteriorElementBoundary_Mi, sizeof(__pyx_k_updateExteriorElementBoundary_Mi), 0, 0, 1, 1},
46780  {&__pyx_n_s_updateExteriorElementBoundary_Mi_2, __pyx_k_updateExteriorElementBoundary_Mi_2, sizeof(__pyx_k_updateExteriorElementBoundary_Mi_2), 0, 0, 1, 1},
46781  {&__pyx_n_s_updateFluxValues, __pyx_k_updateFluxValues, sizeof(__pyx_k_updateFluxValues), 0, 0, 1, 1},
46782  {&__pyx_n_s_updateGlobalJacobianFromElementJ, __pyx_k_updateGlobalJacobianFromElementJ, sizeof(__pyx_k_updateGlobalJacobianFromElementJ), 0, 0, 1, 1},
46783  {&__pyx_n_s_updateGlobalJacobianFromElementJ_2, __pyx_k_updateGlobalJacobianFromElementJ_2, sizeof(__pyx_k_updateGlobalJacobianFromElementJ_2), 0, 0, 1, 1},
46784  {&__pyx_n_s_updateGlobalJacobianFromElementJ_3, __pyx_k_updateGlobalJacobianFromElementJ_3, sizeof(__pyx_k_updateGlobalJacobianFromElementJ_3), 0, 0, 1, 1},
46785  {&__pyx_n_s_updateGlobalJacobianFromElementJ_4, __pyx_k_updateGlobalJacobianFromElementJ_4, sizeof(__pyx_k_updateGlobalJacobianFromElementJ_4), 0, 0, 1, 1},
46786  {&__pyx_n_s_updateGlobalJacobianFromExterior, __pyx_k_updateGlobalJacobianFromExterior, sizeof(__pyx_k_updateGlobalJacobianFromExterior), 0, 0, 1, 1},
46787  {&__pyx_n_s_updateGlobalJacobianFromExterior_2, __pyx_k_updateGlobalJacobianFromExterior_2, sizeof(__pyx_k_updateGlobalJacobianFromExterior_2), 0, 0, 1, 1},
46788  {&__pyx_n_s_updateGlobalJacobianFromExterior_3, __pyx_k_updateGlobalJacobianFromExterior_3, sizeof(__pyx_k_updateGlobalJacobianFromExterior_3), 0, 0, 1, 1},
46789  {&__pyx_n_s_updateGlobalJacobianFromExterior_4, __pyx_k_updateGlobalJacobianFromExterior_4, sizeof(__pyx_k_updateGlobalJacobianFromExterior_4), 0, 0, 1, 1},
46790  {&__pyx_n_s_updateGlobalJacobianFromExterior_5, __pyx_k_updateGlobalJacobianFromExterior_5, sizeof(__pyx_k_updateGlobalJacobianFromExterior_5), 0, 0, 1, 1},
46791  {&__pyx_n_s_updateGlobalJacobianFromExterior_6, __pyx_k_updateGlobalJacobianFromExterior_6, sizeof(__pyx_k_updateGlobalJacobianFromExterior_6), 0, 0, 1, 1},
46792  {&__pyx_n_s_updateGlobalJacobianFromExterior_7, __pyx_k_updateGlobalJacobianFromExterior_7, sizeof(__pyx_k_updateGlobalJacobianFromExterior_7), 0, 0, 1, 1},
46793  {&__pyx_n_s_updateGlobalJacobianFromInterior, __pyx_k_updateGlobalJacobianFromInterior, sizeof(__pyx_k_updateGlobalJacobianFromInterior), 0, 0, 1, 1},
46794  {&__pyx_n_s_updateGlobalJacobianFromInterior_2, __pyx_k_updateGlobalJacobianFromInterior_2, sizeof(__pyx_k_updateGlobalJacobianFromInterior_2), 0, 0, 1, 1},
46795  {&__pyx_n_s_updateGlobalJacobianFromInterior_3, __pyx_k_updateGlobalJacobianFromInterior_3, sizeof(__pyx_k_updateGlobalJacobianFromInterior_3), 0, 0, 1, 1},
46796  {&__pyx_n_s_updateGlobalJacobianFromInterior_4, __pyx_k_updateGlobalJacobianFromInterior_4, sizeof(__pyx_k_updateGlobalJacobianFromInterior_4), 0, 0, 1, 1},
46797  {&__pyx_n_s_updateGlobalJacobianFromInterior_5, __pyx_k_updateGlobalJacobianFromInterior_5, sizeof(__pyx_k_updateGlobalJacobianFromInterior_5), 0, 0, 1, 1},
46798  {&__pyx_n_s_updateGlobalJacobianFromInterior_6, __pyx_k_updateGlobalJacobianFromInterior_6, sizeof(__pyx_k_updateGlobalJacobianFromInterior_6), 0, 0, 1, 1},
46799  {&__pyx_n_s_updateGlobalJacobianFromInterior_7, __pyx_k_updateGlobalJacobianFromInterior_7, sizeof(__pyx_k_updateGlobalJacobianFromInterior_7), 0, 0, 1, 1},
46800  {&__pyx_n_s_updateGlobalJacobianFromInterior_8, __pyx_k_updateGlobalJacobianFromInterior_8, sizeof(__pyx_k_updateGlobalJacobianFromInterior_8), 0, 0, 1, 1},
46801  {&__pyx_n_s_updateGlobalJacobianFromInterior_9, __pyx_k_updateGlobalJacobianFromInterior_9, sizeof(__pyx_k_updateGlobalJacobianFromInterior_9), 0, 0, 1, 1},
46802  {&__pyx_n_s_updateGlobalResidualFromElementR, __pyx_k_updateGlobalResidualFromElementR, sizeof(__pyx_k_updateGlobalResidualFromElementR), 0, 0, 1, 1},
46803  {&__pyx_n_s_updateHamiltonianJacobian_strong, __pyx_k_updateHamiltonianJacobian_strong, sizeof(__pyx_k_updateHamiltonianJacobian_strong), 0, 0, 1, 1},
46804  {&__pyx_n_s_updateHamiltonianJacobian_weak, __pyx_k_updateHamiltonianJacobian_weak, sizeof(__pyx_k_updateHamiltonianJacobian_weak), 0, 0, 1, 1},
46805  {&__pyx_n_s_updateHamiltonianJacobian_weak_l, __pyx_k_updateHamiltonianJacobian_weak_l, sizeof(__pyx_k_updateHamiltonianJacobian_weak_l), 0, 0, 1, 1},
46806  {&__pyx_n_s_updateHamiltonian_adjoint, __pyx_k_updateHamiltonian_adjoint, sizeof(__pyx_k_updateHamiltonian_adjoint), 0, 0, 1, 1},
46807  {&__pyx_n_s_updateHamiltonian_strong, __pyx_k_updateHamiltonian_strong, sizeof(__pyx_k_updateHamiltonian_strong), 0, 0, 1, 1},
46808  {&__pyx_n_s_updateHamiltonian_weak, __pyx_k_updateHamiltonian_weak, sizeof(__pyx_k_updateHamiltonian_weak), 0, 0, 1, 1},
46809  {&__pyx_n_s_updateInteriorElementBoundaryAdv, __pyx_k_updateInteriorElementBoundaryAdv, sizeof(__pyx_k_updateInteriorElementBoundaryAdv), 0, 0, 1, 1},
46810  {&__pyx_n_s_updateInteriorElementBoundaryDif, __pyx_k_updateInteriorElementBoundaryDif, sizeof(__pyx_k_updateInteriorElementBoundaryDif), 0, 0, 1, 1},
46811  {&__pyx_n_s_updateInteriorElementBoundaryDif_2, __pyx_k_updateInteriorElementBoundaryDif_2, sizeof(__pyx_k_updateInteriorElementBoundaryDif_2), 0, 0, 1, 1},
46812  {&__pyx_n_s_updateInteriorElementBoundaryDif_3, __pyx_k_updateInteriorElementBoundaryDif_3, sizeof(__pyx_k_updateInteriorElementBoundaryDif_3), 0, 0, 1, 1},
46813  {&__pyx_n_s_updateInteriorElementBoundaryDif_4, __pyx_k_updateInteriorElementBoundaryDif_4, sizeof(__pyx_k_updateInteriorElementBoundaryDif_4), 0, 0, 1, 1},
46814  {&__pyx_n_s_updateInteriorElementBoundaryFlu, __pyx_k_updateInteriorElementBoundaryFlu, sizeof(__pyx_k_updateInteriorElementBoundaryFlu), 0, 0, 1, 1},
46815  {&__pyx_n_s_updateInteriorElementBoundarySho, __pyx_k_updateInteriorElementBoundarySho, sizeof(__pyx_k_updateInteriorElementBoundarySho), 0, 0, 1, 1},
46816  {&__pyx_n_s_updateInteriorElementBoundary_Mi, __pyx_k_updateInteriorElementBoundary_Mi, sizeof(__pyx_k_updateInteriorElementBoundary_Mi), 0, 0, 1, 1},
46817  {&__pyx_n_s_updateInteriorElementBoundary_Mi_2, __pyx_k_updateInteriorElementBoundary_Mi_2, sizeof(__pyx_k_updateInteriorElementBoundary_Mi_2), 0, 0, 1, 1},
46818  {&__pyx_n_s_updateInteriorTwoSidedElementBou, __pyx_k_updateInteriorTwoSidedElementBou, sizeof(__pyx_k_updateInteriorTwoSidedElementBou), 0, 0, 1, 1},
46819  {&__pyx_n_s_updateMassJacobian_strong, __pyx_k_updateMassJacobian_strong, sizeof(__pyx_k_updateMassJacobian_strong), 0, 0, 1, 1},
46820  {&__pyx_n_s_updateMassJacobian_weak, __pyx_k_updateMassJacobian_weak, sizeof(__pyx_k_updateMassJacobian_weak), 0, 0, 1, 1},
46821  {&__pyx_n_s_updateMassJacobian_weak_lowmem, __pyx_k_updateMassJacobian_weak_lowmem, sizeof(__pyx_k_updateMassJacobian_weak_lowmem), 0, 0, 1, 1},
46822  {&__pyx_n_s_updateMass_adjoint, __pyx_k_updateMass_adjoint, sizeof(__pyx_k_updateMass_adjoint), 0, 0, 1, 1},
46823  {&__pyx_n_s_updateMass_strong, __pyx_k_updateMass_strong, sizeof(__pyx_k_updateMass_strong), 0, 0, 1, 1},
46824  {&__pyx_n_s_updateMass_weak, __pyx_k_updateMass_weak, sizeof(__pyx_k_updateMass_weak), 0, 0, 1, 1},
46825  {&__pyx_n_s_updateNumericalDiffusion, __pyx_k_updateNumericalDiffusion, sizeof(__pyx_k_updateNumericalDiffusion), 0, 0, 1, 1},
46826  {&__pyx_n_s_updateNumericalDiffusionJacobian, __pyx_k_updateNumericalDiffusionJacobian, sizeof(__pyx_k_updateNumericalDiffusionJacobian), 0, 0, 1, 1},
46827  {&__pyx_n_s_updateNumericalDiffusionJacobian_2, __pyx_k_updateNumericalDiffusionJacobian_2, sizeof(__pyx_k_updateNumericalDiffusionJacobian_2), 0, 0, 1, 1},
46828  {&__pyx_n_s_updateNumericalDiffusion_lowmem, __pyx_k_updateNumericalDiffusion_lowmem, sizeof(__pyx_k_updateNumericalDiffusion_lowmem), 0, 0, 1, 1},
46829  {&__pyx_n_s_updatePotential_MixedForm_weak, __pyx_k_updatePotential_MixedForm_weak, sizeof(__pyx_k_updatePotential_MixedForm_weak), 0, 0, 1, 1},
46830  {&__pyx_n_s_updatePotential_MixedForm_weakJa, __pyx_k_updatePotential_MixedForm_weakJa, sizeof(__pyx_k_updatePotential_MixedForm_weakJa), 0, 0, 1, 1},
46831  {&__pyx_n_s_updateReactionJacobian_strong, __pyx_k_updateReactionJacobian_strong, sizeof(__pyx_k_updateReactionJacobian_strong), 0, 0, 1, 1},
46832  {&__pyx_n_s_updateReactionJacobian_weak, __pyx_k_updateReactionJacobian_weak, sizeof(__pyx_k_updateReactionJacobian_weak), 0, 0, 1, 1},
46833  {&__pyx_n_s_updateReactionJacobian_weak_lowm, __pyx_k_updateReactionJacobian_weak_lowm, sizeof(__pyx_k_updateReactionJacobian_weak_lowm), 0, 0, 1, 1},
46834  {&__pyx_n_s_updateReaction_adjoint, __pyx_k_updateReaction_adjoint, sizeof(__pyx_k_updateReaction_adjoint), 0, 0, 1, 1},
46835  {&__pyx_n_s_updateReaction_strong, __pyx_k_updateReaction_strong, sizeof(__pyx_k_updateReaction_strong), 0, 0, 1, 1},
46836  {&__pyx_n_s_updateReaction_weak, __pyx_k_updateReaction_weak, sizeof(__pyx_k_updateReaction_weak), 0, 0, 1, 1},
46837  {&__pyx_n_s_updateStressJacobian_weak, __pyx_k_updateStressJacobian_weak, sizeof(__pyx_k_updateStressJacobian_weak), 0, 0, 1, 1},
46838  {&__pyx_n_s_updateStress_weak, __pyx_k_updateStress_weak, sizeof(__pyx_k_updateStress_weak), 0, 0, 1, 1},
46839  {&__pyx_n_s_updateSubgridError, __pyx_k_updateSubgridError, sizeof(__pyx_k_updateSubgridError), 0, 0, 1, 1},
46840  {&__pyx_n_s_updateSubgridErrorJacobian, __pyx_k_updateSubgridErrorJacobian, sizeof(__pyx_k_updateSubgridErrorJacobian), 0, 0, 1, 1},
46841  {&__pyx_n_s_update_f_movingDomain, __pyx_k_update_f_movingDomain, sizeof(__pyx_k_update_f_movingDomain), 0, 0, 1, 1},
46842  {&__pyx_n_s_update_f_movingDomain_constantMa, __pyx_k_update_f_movingDomain_constantMa, sizeof(__pyx_k_update_f_movingDomain_constantMa), 0, 0, 1, 1},
46843  {&__pyx_n_s_v, __pyx_k_v, sizeof(__pyx_k_v), 0, 0, 1, 1},
46844  {&__pyx_n_s_vArray, __pyx_k_vArray, sizeof(__pyx_k_vArray), 0, 0, 1, 1},
46845  {&__pyx_n_s_vAverage, __pyx_k_vAverage, sizeof(__pyx_k_vAverage), 0, 0, 1, 1},
46846  {&__pyx_n_s_vConservative, __pyx_k_vConservative, sizeof(__pyx_k_vConservative), 0, 0, 1, 1},
46847  {&__pyx_n_s_vConservative_element, __pyx_k_vConservative_element, sizeof(__pyx_k_vConservative_element), 0, 0, 1, 1},
46848  {&__pyx_n_s_vJump, __pyx_k_vJump, sizeof(__pyx_k_vJump), 0, 0, 1, 1},
46849  {&__pyx_n_s_vResult, __pyx_k_vResult, sizeof(__pyx_k_vResult), 0, 0, 1, 1},
46850  {&__pyx_n_s_vXw_dV, __pyx_k_vXw_dV, sizeof(__pyx_k_vXw_dV), 0, 0, 1, 1},
46851  {&__pyx_n_s_v_X_grad_w_dV, __pyx_k_v_X_grad_w_dV, sizeof(__pyx_k_v_X_grad_w_dV), 0, 0, 1, 1},
46852  {&__pyx_n_s_v_X_w_dS, __pyx_k_v_X_w_dS, sizeof(__pyx_k_v_X_w_dS), 0, 0, 1, 1},
46853  {&__pyx_n_s_v_X_w_dV, __pyx_k_v_X_w_dV, sizeof(__pyx_k_v_X_w_dV), 0, 0, 1, 1},
46854  {&__pyx_n_s_v_out, __pyx_k_v_out, sizeof(__pyx_k_v_out), 0, 0, 1, 1},
46855  {&__pyx_n_s_val, __pyx_k_val, sizeof(__pyx_k_val), 0, 0, 1, 1},
46856  {&__pyx_n_s_velocity, __pyx_k_velocity, sizeof(__pyx_k_velocity), 0, 0, 1, 1},
46857  {&__pyx_n_s_velocityBoundary_element, __pyx_k_velocityBoundary_element, sizeof(__pyx_k_velocityBoundary_element), 0, 0, 1, 1},
46858  {&__pyx_n_s_velocityBoundary_global, __pyx_k_velocityBoundary_global, sizeof(__pyx_k_velocityBoundary_global), 0, 0, 1, 1},
46859  {&__pyx_n_s_vn_in, __pyx_k_vn_in, sizeof(__pyx_k_vn_in), 0, 0, 1, 1},
46860  {&__pyx_n_s_w, __pyx_k_w, sizeof(__pyx_k_w), 0, 0, 1, 1},
46861  {&__pyx_n_s_w_dS, __pyx_k_w_dS, sizeof(__pyx_k_w_dS), 0, 0, 1, 1},
46862  {&__pyx_n_s_w_dV, __pyx_k_w_dV, sizeof(__pyx_k_w_dV), 0, 0, 1, 1},
46863  {&__pyx_n_s_weak_residual, __pyx_k_weak_residual, sizeof(__pyx_k_weak_residual), 0, 0, 1, 1},
46864  {&__pyx_n_s_weak_residual_x, __pyx_k_weak_residual_x, sizeof(__pyx_k_weak_residual_x), 0, 0, 1, 1},
46865  {&__pyx_n_s_weak_residual_y, __pyx_k_weak_residual_y, sizeof(__pyx_k_weak_residual_y), 0, 0, 1, 1},
46866  {&__pyx_n_s_weak_residual_z, __pyx_k_weak_residual_z, sizeof(__pyx_k_weak_residual_z), 0, 0, 1, 1},
46867  {&__pyx_n_s_weights, __pyx_k_weights, sizeof(__pyx_k_weights), 0, 0, 1, 1},
46868  {&__pyx_n_s_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 0, 1, 1},
46869  {&__pyx_n_s_xArray, __pyx_k_xArray, sizeof(__pyx_k_xArray), 0, 0, 1, 1},
46870  {&__pyx_n_s_xArrayNew, __pyx_k_xArrayNew, sizeof(__pyx_k_xArrayNew), 0, 0, 1, 1},
46871  {&__pyx_n_s_xg, __pyx_k_xg, sizeof(__pyx_k_xg), 0, 0, 1, 1},
46872  {&__pyx_n_s_xiArray, __pyx_k_xiArray, sizeof(__pyx_k_xiArray), 0, 0, 1, 1},
46873  {&__pyx_n_s_xt, __pyx_k_xt, sizeof(__pyx_k_xt), 0, 0, 1, 1},
46874  {&__pyx_n_s_xtArray, __pyx_k_xtArray, sizeof(__pyx_k_xtArray), 0, 0, 1, 1},
46875  {&__pyx_n_s_zeroJacobian_CSR, __pyx_k_zeroJacobian_CSR, sizeof(__pyx_k_zeroJacobian_CSR), 0, 0, 1, 1},
46876  {0, 0, 0, 0, 0, 0, 0}
46877 };
46878 static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
46879  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 2593, __pyx_L1_error)
46880  __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(1, 945, __pyx_L1_error)
46881  return 0;
46882  __pyx_L1_error:;
46883  return -1;
46884 }
46885 
46886 static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
46887  __Pyx_RefNannyDeclarations
46888  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
46889 
46890  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":945
46891  * __pyx_import_array()
46892  * except Exception:
46893  * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<<
46894  *
46895  * cdef inline int import_umath() except -1:
46896  */
46897  __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple_)) __PYX_ERR(1, 945, __pyx_L1_error)
46898  __Pyx_GOTREF(__pyx_tuple_);
46899  __Pyx_GIVEREF(__pyx_tuple_);
46900 
46901  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":951
46902  * _import_umath()
46903  * except Exception:
46904  * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
46905  *
46906  * cdef inline int import_ufunc() except -1:
46907  */
46908  __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(1, 951, __pyx_L1_error)
46909  __Pyx_GOTREF(__pyx_tuple__2);
46910  __Pyx_GIVEREF(__pyx_tuple__2);
46911 
46912  /* "cfemIntegrals.pyx":2296
46913  * double* jacobian_weak_residual,
46914  * double* jacobian_weak_residual_eb)
46915  * def parametricFiniteElementSpace_getHessianValues(np.ndarray Hessian_psi, # <<<<<<<<<<<<<<
46916  * np.ndarray inverseJacobianArray,
46917  * np.ndarray Hessian_vArray):
46918  */
46919  __pyx_tuple__3 = PyTuple_Pack(7, __pyx_n_s_Hessian_psi, __pyx_n_s_inverseJacobianArray, __pyx_n_s_Hessian_vArray, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_element, __pyx_n_s_nSpace_global); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 2296, __pyx_L1_error)
46920  __Pyx_GOTREF(__pyx_tuple__3);
46921  __Pyx_GIVEREF(__pyx_tuple__3);
46922  __pyx_codeobj__4 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__3, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_parametricFiniteElementSpace_get, 2296, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__4)) __PYX_ERR(0, 2296, __pyx_L1_error)
46923 
46924  /* "cfemIntegrals.pyx":2310
46925  * <double*> inverseJacobianArray.data,
46926  * <double*> Hessian_vArray.data)
46927  * def updateDiffusion2_strong(np.ndarray a, # <<<<<<<<<<<<<<
46928  * np.ndarray Hess_phi,
46929  * np.ndarray strong_residual):
46930  */
46931  __pyx_tuple__5 = PyTuple_Pack(6, __pyx_n_s_a, __pyx_n_s_Hess_phi, __pyx_n_s_strong_residual, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 2310, __pyx_L1_error)
46932  __Pyx_GOTREF(__pyx_tuple__5);
46933  __Pyx_GIVEREF(__pyx_tuple__5);
46934  __pyx_codeobj__6 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__5, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateDiffusion2_strong, 2310, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__6)) __PYX_ERR(0, 2310, __pyx_L1_error)
46935 
46936  /* "cfemIntegrals.pyx":2322
46937  * <double*> Hess_phi.data,
46938  * <double*> strong_residual.data)
46939  * def updateDiffusion2_strong_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
46940  * np.ndarray colind,
46941  * np.ndarray a,
46942  */
46943  __pyx_tuple__7 = PyTuple_Pack(8, __pyx_n_s_rowptr, __pyx_n_s_colind, __pyx_n_s_a, __pyx_n_s_Hess_phi, __pyx_n_s_strong_residual, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 2322, __pyx_L1_error)
46944  __Pyx_GOTREF(__pyx_tuple__7);
46945  __Pyx_GIVEREF(__pyx_tuple__7);
46946  __pyx_codeobj__8 = (PyObject*)__Pyx_PyCode_New(5, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__7, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateDiffusion2_strong_sd, 2322, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__8)) __PYX_ERR(0, 2322, __pyx_L1_error)
46947 
46948  /* "cfemIntegrals.pyx":2338
46949  * <double*> Hess_phi.data,
46950  * <double*> strong_residual.data)
46951  * def updateDiffusionJacobian2_strong(np.ndarray l2g, # <<<<<<<<<<<<<<
46952  * np.ndarray a,
46953  * np.ndarray da,
46954  */
46955  __pyx_tuple__9 = PyTuple_Pack(12, __pyx_n_s_l2g, __pyx_n_s_a, __pyx_n_s_da, __pyx_n_s_v, __pyx_n_s_Hess_phi, __pyx_n_s_dphi, __pyx_n_s_Hess_v, __pyx_n_s_dstrong_residual, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_trial_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 2338, __pyx_L1_error)
46956  __Pyx_GOTREF(__pyx_tuple__9);
46957  __Pyx_GIVEREF(__pyx_tuple__9);
46958  __pyx_codeobj__10 = (PyObject*)__Pyx_PyCode_New(8, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__9, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateDiffusionJacobian2_strong, 2338, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__10)) __PYX_ERR(0, 2338, __pyx_L1_error)
46959 
46960  /* "cfemIntegrals.pyx":2362
46961  * <double*> Hess_v.data,
46962  * <double*> dstrong_residual.data)
46963  * def updateDiffusionJacobian2_strong_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
46964  * np.ndarray colind,
46965  * np.ndarray l2g,
46966  */
46967  __pyx_tuple__11 = PyTuple_Pack(14, __pyx_n_s_rowptr, __pyx_n_s_colind, __pyx_n_s_l2g, __pyx_n_s_a, __pyx_n_s_da, __pyx_n_s_v, __pyx_n_s_Hess_phi, __pyx_n_s_dphi, __pyx_n_s_Hess_v, __pyx_n_s_dstrong_residual, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_trial_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 2362, __pyx_L1_error)
46968  __Pyx_GOTREF(__pyx_tuple__11);
46969  __Pyx_GIVEREF(__pyx_tuple__11);
46970  __pyx_codeobj__12 = (PyObject*)__Pyx_PyCode_New(10, 0, 14, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__11, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateDiffusionJacobian2_strong_2, 2362, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__12)) __PYX_ERR(0, 2362, __pyx_L1_error)
46971 
46972  /* "cfemIntegrals.pyx":2390
46973  * <double*> Hess_v.data,
46974  * <double*> dstrong_residual.data)
46975  * def updateDiffusion2_adjoint(np.ndarray a, # <<<<<<<<<<<<<<
46976  * np.ndarray Hess_w_dV,
46977  * np.ndarray Lstar_w_dV):
46978  */
46979  __pyx_tuple__13 = PyTuple_Pack(7, __pyx_n_s_a, __pyx_n_s_Hess_w_dV, __pyx_n_s_Lstar_w_dV, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_test_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 2390, __pyx_L1_error)
46980  __Pyx_GOTREF(__pyx_tuple__13);
46981  __Pyx_GIVEREF(__pyx_tuple__13);
46982  __pyx_codeobj__14 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__13, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateDiffusion2_adjoint, 2390, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__14)) __PYX_ERR(0, 2390, __pyx_L1_error)
46983 
46984  /* "cfemIntegrals.pyx":2404
46985  * <double*> Hess_w_dV.data,
46986  * <double*> Lstar_w_dV.data)
46987  * def updateDiffusion2_adjoint_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
46988  * np.ndarray colind,
46989  * np.ndarray a,
46990  */
46991  __pyx_tuple__15 = PyTuple_Pack(9, __pyx_n_s_rowptr, __pyx_n_s_colind, __pyx_n_s_a, __pyx_n_s_Hess_w_dV, __pyx_n_s_Lstar_w_dV, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_test_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 2404, __pyx_L1_error)
46992  __Pyx_GOTREF(__pyx_tuple__15);
46993  __Pyx_GIVEREF(__pyx_tuple__15);
46994  __pyx_codeobj__16 = (PyObject*)__Pyx_PyCode_New(5, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__15, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateDiffusion2_adjoint_sd, 2404, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__16)) __PYX_ERR(0, 2404, __pyx_L1_error)
46995 
46996  /* "cfemIntegrals.pyx":2422
46997  * <double*> Hess_w_dV.data,
46998  * <double*> Lstar_w_dV.data)
46999  * def calculateWeightedShapeHessians(np.ndarray dVR, # <<<<<<<<<<<<<<
47000  * np.ndarray abs_det_jac,
47001  * np.ndarray Hess_w,
47002  */
47003  __pyx_tuple__17 = PyTuple_Pack(8, __pyx_n_s_dVR, __pyx_n_s_abs_det_jac, __pyx_n_s_Hess_w, __pyx_n_s_Hess_w_dV, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_test_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 2422, __pyx_L1_error)
47004  __Pyx_GOTREF(__pyx_tuple__17);
47005  __Pyx_GIVEREF(__pyx_tuple__17);
47006  __pyx_codeobj__18 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__17, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_calculateWeightedShapeHessians, 2422, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__18)) __PYX_ERR(0, 2422, __pyx_L1_error)
47007 
47008  /* "cfemIntegrals.pyx":2438
47009  * <double*> Hess_w.data,
47010  * <double*> Hess_w_dV.data)
47011  * def calculateFiniteElementFunctionHessianValues(np.ndarray l2g, # <<<<<<<<<<<<<<
47012  * np.ndarray dof,
47013  * np.ndarray Hessian_v,
47014  */
47015  __pyx_tuple__19 = PyTuple_Pack(10, __pyx_n_s_l2g, __pyx_n_s_dof, __pyx_n_s_Hessian_v, __pyx_n_s_Hessian_u, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_trial_element, __pyx_n_s_nComponents, __pyx_n_s_nSpace, __pyx_n_s_nd); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 2438, __pyx_L1_error)
47016  __Pyx_GOTREF(__pyx_tuple__19);
47017  __Pyx_GIVEREF(__pyx_tuple__19);
47018  __pyx_codeobj__20 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__19, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_calculateFiniteElementFunctionHe, 2438, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__20)) __PYX_ERR(0, 2438, __pyx_L1_error)
47019 
47020  /* "cfemIntegrals.pyx":2463
47021  * <double*> Hessian_v.data,
47022  * <double*> Hessian_u.data)
47023  * def updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_CSR(np.ndarray interiorElementBoundaries, # <<<<<<<<<<<<<<
47024  * np.ndarray elementBoundaryElements,
47025  * np.ndarray elementBoundaryLocalElementBoundaries,
47026  */
47027  __pyx_tuple__21 = PyTuple_Pack(20, __pyx_n_s_interiorElementBoundaries, __pyx_n_s_elementBoundaryElements, __pyx_n_s_elementBoundaryLocalElementBound, __pyx_n_s_nFreeDOF_element_r, __pyx_n_s_freeLocal_r, __pyx_n_s_nFreeDOF_element_u, __pyx_n_s_freeLocal_u, __pyx_n_s_csrRowIndeces_ru, __pyx_n_s_csrColumnOffsets_eb_ru, __pyx_n_s_elementBoundaryFluxJacobian_2sid, __pyx_n_s_w_dS, __pyx_n_s_jac, __pyx_n_s_rowptr, __pyx_n_s_colind, __pyx_n_s_jac_array, __pyx_n_s_nInteriorElementBoundaries_globa, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nQuadraturePoints_elementBoundar, __pyx_n_s_nDOF_test_element, __pyx_n_s_nDOF_trial_element); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 2463, __pyx_L1_error)
47028  __Pyx_GOTREF(__pyx_tuple__21);
47029  __Pyx_GIVEREF(__pyx_tuple__21);
47030  __pyx_codeobj__22 = (PyObject*)__Pyx_PyCode_New(12, 0, 20, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__21, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateGlobalJacobianFromInterior, 2463, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__22)) __PYX_ERR(0, 2463, __pyx_L1_error)
47031 
47032  /* "cfemIntegrals.pyx":2499
47033  * <double*> w_dS.data,
47034  * <double*> jac_array.data)
47035  * def updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_dense(int offset_r, # <<<<<<<<<<<<<<
47036  * int stride_r,
47037  * int offset_u,
47038  */
47039  __pyx_tuple__23 = PyTuple_Pack(22, __pyx_n_s_offset_r, __pyx_n_s_stride_r, __pyx_n_s_offset_u, __pyx_n_s_stride_u, __pyx_n_s_nFreeVDOF_global, __pyx_n_s_interiorElementBoundaries, __pyx_n_s_elementBoundaryElements, __pyx_n_s_elementBoundaryLocalElementBound, __pyx_n_s_nFreeDOF_element_r, __pyx_n_s_freeLocal_r, __pyx_n_s_freeGlobal_r, __pyx_n_s_nFreeDOF_element_u, __pyx_n_s_freeLocal_u, __pyx_n_s_freeGlobal_u, __pyx_n_s_elementBoundaryFluxJacobian_2sid, __pyx_n_s_w_dS, __pyx_n_s_jac, __pyx_n_s_nInteriorElementBoundaries_globa, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nQuadraturePoints_elementBoundar, __pyx_n_s_nDOF_test_element, __pyx_n_s_nDOF_trial_element); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 2499, __pyx_L1_error)
47040  __Pyx_GOTREF(__pyx_tuple__23);
47041  __Pyx_GIVEREF(__pyx_tuple__23);
47042  __pyx_codeobj__24 = (PyObject*)__Pyx_PyCode_New(17, 0, 22, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateGlobalJacobianFromInterior_2, 2499, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__24)) __PYX_ERR(0, 2499, __pyx_L1_error)
47043 
47044  /* "cfemIntegrals.pyx":2543
47045  * <double*> w_dS.data,
47046  * <double*> jac.data)
47047  * def updateInteriorTwoSidedElementBoundaryFlux(np.ndarray interiorElementBoundaries, # <<<<<<<<<<<<<<
47048  * np.ndarray elementBoundaryElements,
47049  * np.ndarray elementBoundaryLocalElementBoundaries,
47050  */
47051  __pyx_tuple__25 = PyTuple_Pack(10, __pyx_n_s_interiorElementBoundaries, __pyx_n_s_elementBoundaryElements, __pyx_n_s_elementBoundaryLocalElementBound, __pyx_n_s_flux, __pyx_n_s_w_dS, __pyx_n_s_residual, __pyx_n_s_nInteriorElementBoundaries_globa, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nQuadraturePoints_elementBoundar, __pyx_n_s_nDOF_test_element); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 2543, __pyx_L1_error)
47052  __Pyx_GOTREF(__pyx_tuple__25);
47053  __Pyx_GIVEREF(__pyx_tuple__25);
47054  __pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(6, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateInteriorTwoSidedElementBou, 2543, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__26)) __PYX_ERR(0, 2543, __pyx_L1_error)
47055 
47056  /* "cfemIntegrals.pyx":2563
47057  * <double*> w_dS.data,
47058  * <double*> residual.data)
47059  * def calculateCFLADR2speeds(np.ndarray elementDiameter, # <<<<<<<<<<<<<<
47060  * np.ndarray dm,
47061  * np.ndarray df1,
47062  */
47063  __pyx_tuple__27 = PyTuple_Pack(8, __pyx_n_s_elementDiameter, __pyx_n_s_dm, __pyx_n_s_df1, __pyx_n_s_df2, __pyx_n_s_cfl, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 2563, __pyx_L1_error)
47064  __Pyx_GOTREF(__pyx_tuple__27);
47065  __Pyx_GIVEREF(__pyx_tuple__27);
47066  __pyx_codeobj__28 = (PyObject*)__Pyx_PyCode_New(5, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_calculateCFLADR2speeds, 2563, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__28)) __PYX_ERR(0, 2563, __pyx_L1_error)
47067 
47068  /* "cfemIntegrals.pyx":2579
47069  * <double*> df2.data,
47070  * <double*> cfl.data)
47071  * def checkElementBoundaryAndExteriorElementBoundaryArraysSame(double tolerance, # <<<<<<<<<<<<<<
47072  * np.ndarray exteriorElementBoundariesArray,
47073  * np.ndarray elementBoundaryElementsArray,
47074  */
47075  __pyx_tuple__29 = PyTuple_Pack(14, __pyx_n_s_tolerance, __pyx_n_s_exteriorElementBoundariesArray, __pyx_n_s_elementBoundaryElementsArray, __pyx_n_s_elementBoundaryLocalElementBound_2, __pyx_n_s_ebq_val, __pyx_n_s_ebqe_val, __pyx_n_s_firstBadIndex, __pyx_n_s_output, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nExteriorElementBoundaries_globa, __pyx_n_s_nQuadraturePoints_elementBoundar, __pyx_n_s_nValuesPerQuadraturePoint, __pyx_n_s_nd, __pyx_n_s_i); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 2579, __pyx_L1_error)
47076  __Pyx_GOTREF(__pyx_tuple__29);
47077  __Pyx_GIVEREF(__pyx_tuple__29);
47078  __pyx_codeobj__30 = (PyObject*)__Pyx_PyCode_New(7, 0, 14, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__29, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_checkElementBoundaryAndExteriorE, 2579, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__30)) __PYX_ERR(0, 2579, __pyx_L1_error)
47079 
47080  /* "cfemIntegrals.pyx":2607
47081  * <int*> firstBadIndex.data)
47082  * return output
47083  * def checkGlobalElementBoundaryAndExteriorElementBoundaryArraysSame(double tolerance, # <<<<<<<<<<<<<<
47084  * np.ndarray exteriorElementBoundariesArray,
47085  * np.ndarray elementBoundaryElementsArray,
47086  */
47087  __pyx_tuple__31 = PyTuple_Pack(13, __pyx_n_s_tolerance, __pyx_n_s_exteriorElementBoundariesArray, __pyx_n_s_elementBoundaryElementsArray, __pyx_n_s_elementBoundaryLocalElementBound_2, __pyx_n_s_ebq_global_val, __pyx_n_s_ebqe_val, __pyx_n_s_firstBadIndex, __pyx_n_s_output, __pyx_n_s_nExteriorElementBoundaries_globa, __pyx_n_s_nQuadraturePoints_elementBoundar, __pyx_n_s_nValuesPerQuadraturePoint, __pyx_n_s_nd, __pyx_n_s_i); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 2607, __pyx_L1_error)
47088  __Pyx_GOTREF(__pyx_tuple__31);
47089  __Pyx_GIVEREF(__pyx_tuple__31);
47090  __pyx_codeobj__32 = (PyObject*)__Pyx_PyCode_New(7, 0, 13, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__31, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_checkGlobalElementBoundaryAndExt, 2607, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__32)) __PYX_ERR(0, 2607, __pyx_L1_error)
47091 
47092  /* "cfemIntegrals.pyx":2632
47093  * <double*> ebqe_val.data,
47094  * <int*> firstBadIndex.data)
47095  * def calculateExteriorElementBoundaryStress3D(np.ndarray elementBoundaryMaterialTypes, # <<<<<<<<<<<<<<
47096  * np.ndarray exteriorElementBoundaries,
47097  * np.ndarray elementBoundaryElements,
47098  */
47099  __pyx_tuple__33 = PyTuple_Pack(13, __pyx_n_s_elementBoundaryMaterialTypes, __pyx_n_s_exteriorElementBoundaries, __pyx_n_s_elementBoundaryElements, __pyx_n_s_elementBoundaryLocalElementBound, __pyx_n_s_p, __pyx_n_s_mom_flux_vec_u, __pyx_n_s_mom_flux_vec_v, __pyx_n_s_mom_flux_vec_w, __pyx_n_s_dS, __pyx_n_s_n, __pyx_n_s_F, __pyx_n_s_nExteriorElementBoundaries_globa, __pyx_n_s_nQuadraturePoints_elementBoundar); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 2632, __pyx_L1_error)
47100  __Pyx_GOTREF(__pyx_tuple__33);
47101  __Pyx_GIVEREF(__pyx_tuple__33);
47102  __pyx_codeobj__34 = (PyObject*)__Pyx_PyCode_New(11, 0, 13, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__33, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_calculateExteriorElementBoundary, 2632, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__34)) __PYX_ERR(0, 2632, __pyx_L1_error)
47103 
47104  /* "cfemIntegrals.pyx":2658
47105  * <double*> n.data,
47106  * <double*> F.data)
47107  * def calculateExteriorElementBoundaryStress2D(np.ndarray elementBoundaryMaterialTypes, # <<<<<<<<<<<<<<
47108  * np.ndarray exteriorElementBoundaries,
47109  * np.ndarray elementBoundaryElements,
47110  */
47111  __pyx_tuple__35 = PyTuple_Pack(12, __pyx_n_s_elementBoundaryMaterialTypes, __pyx_n_s_exteriorElementBoundaries, __pyx_n_s_elementBoundaryElements, __pyx_n_s_elementBoundaryLocalElementBound, __pyx_n_s_p, __pyx_n_s_mom_flux_vec_u, __pyx_n_s_mom_flux_vec_v, __pyx_n_s_dS, __pyx_n_s_n, __pyx_n_s_F, __pyx_n_s_nExteriorElementBoundaries_globa, __pyx_n_s_nQuadraturePoints_elementBoundar); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 2658, __pyx_L1_error)
47112  __Pyx_GOTREF(__pyx_tuple__35);
47113  __Pyx_GIVEREF(__pyx_tuple__35);
47114  __pyx_codeobj__36 = (PyObject*)__Pyx_PyCode_New(10, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__35, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_calculateExteriorElementBoundary_2, 2658, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__36)) __PYX_ERR(0, 2658, __pyx_L1_error)
47115 
47116  /* "cfemIntegrals.pyx":2682
47117  * <double*> n.data,
47118  * <double*> F.data)
47119  * def copyLeftElementBoundaryInfo(np.ndarray elementBoundaryElementsArray, # <<<<<<<<<<<<<<
47120  * np.ndarray elementBoundaryLocalElementBoundariesArray,
47121  * np.ndarray exteriorElementBoundariesArray,
47122  */
47123  __pyx_tuple__37 = PyTuple_Pack(13, __pyx_n_s_elementBoundaryElementsArray, __pyx_n_s_elementBoundaryLocalElementBound_2, __pyx_n_s_exteriorElementBoundariesArray, __pyx_n_s_interiorElementBoundariesArray, __pyx_n_s_x, __pyx_n_s_n, __pyx_n_s_xg, __pyx_n_s_ng, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nElementBoundaryQuadraturePoints, __pyx_n_s_nSpace_global, __pyx_n_s_nExteriorElementBoundaries_globa, __pyx_n_s_nInteriorElementBoundaries_globa); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 2682, __pyx_L1_error)
47124  __Pyx_GOTREF(__pyx_tuple__37);
47125  __Pyx_GIVEREF(__pyx_tuple__37);
47126  __pyx_codeobj__38 = (PyObject*)__Pyx_PyCode_New(8, 0, 13, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_copyLeftElementBoundaryInfo, 2682, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__38)) __PYX_ERR(0, 2682, __pyx_L1_error)
47127 
47128  /* "cfemIntegrals.pyx":2708
47129  * <double*>xg.data,
47130  * <double*>ng.data)
47131  * def parametricFiniteElementSpace_getValues(np.ndarray psi, # <<<<<<<<<<<<<<
47132  * np.ndarray vArray):
47133  * cdef int nElements_global = vArray.shape[0]
47134  */
47135  __pyx_tuple__39 = PyTuple_Pack(5, __pyx_n_s_psi, __pyx_n_s_vArray, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_element); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 2708, __pyx_L1_error)
47136  __Pyx_GOTREF(__pyx_tuple__39);
47137  __Pyx_GIVEREF(__pyx_tuple__39);
47138  __pyx_codeobj__40 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_parametricFiniteElementSpace_get_2, 2708, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__40)) __PYX_ERR(0, 2708, __pyx_L1_error)
47139 
47140  /* "cfemIntegrals.pyx":2718
47141  * <double*>psi.data,
47142  * <double*>vArray.data)
47143  * def parametricFiniteElementSpace_getValuesTrace(np.ndarray psi, # <<<<<<<<<<<<<<
47144  * np.ndarray permutations,
47145  * np.ndarray vArray):
47146  */
47147  __pyx_tuple__41 = PyTuple_Pack(7, __pyx_n_s_psi, __pyx_n_s_permutations, __pyx_n_s_vArray, __pyx_n_s_nElements_global, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nElementBoundaryQuadraturePoints, __pyx_n_s_nDOF_element); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 2718, __pyx_L1_error)
47148  __Pyx_GOTREF(__pyx_tuple__41);
47149  __Pyx_GIVEREF(__pyx_tuple__41);
47150  __pyx_codeobj__42 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_parametricFiniteElementSpace_get_3, 2718, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__42)) __PYX_ERR(0, 2718, __pyx_L1_error)
47151 
47152  /* "cfemIntegrals.pyx":2732
47153  * <int *>permutations.data,
47154  * <double*>vArray.data)
47155  * def parametricFiniteElementSpace_getGradientValues(np.ndarray grad_psi, # <<<<<<<<<<<<<<
47156  * np.ndarray inverseJacobianArray,
47157  * np.ndarray grad_vArray):
47158  */
47159  __pyx_tuple__43 = PyTuple_Pack(7, __pyx_n_s_grad_psi, __pyx_n_s_inverseJacobianArray, __pyx_n_s_grad_vArray, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_element, __pyx_n_s_nSpace_global); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 2732, __pyx_L1_error)
47160  __Pyx_GOTREF(__pyx_tuple__43);
47161  __Pyx_GIVEREF(__pyx_tuple__43);
47162  __pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__43, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_parametricFiniteElementSpace_get_4, 2732, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__44)) __PYX_ERR(0, 2732, __pyx_L1_error)
47163 
47164  /* "cfemIntegrals.pyx":2746
47165  * <double*>inverseJacobianArray.data,
47166  * <double*>grad_vArray.data)
47167  * def parametricFiniteElementSpace_getGradientValuesTrace(np.ndarray grad_psi, # <<<<<<<<<<<<<<
47168  * np.ndarray permutations,
47169  * np.ndarray inverseJacobianArray,
47170  */
47171  __pyx_tuple__45 = PyTuple_Pack(9, __pyx_n_s_grad_psi, __pyx_n_s_permutations, __pyx_n_s_inverseJacobianArray, __pyx_n_s_grad_vArray, __pyx_n_s_nElements_global, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nElementBoundaryQuadraturePoints, __pyx_n_s_nDOF_element, __pyx_n_s_nSpace_global); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 2746, __pyx_L1_error)
47172  __Pyx_GOTREF(__pyx_tuple__45);
47173  __Pyx_GIVEREF(__pyx_tuple__45);
47174  __pyx_codeobj__46 = (PyObject*)__Pyx_PyCode_New(4, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__45, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_parametricFiniteElementSpace_get_5, 2746, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__46)) __PYX_ERR(0, 2746, __pyx_L1_error)
47175 
47176  /* "cfemIntegrals.pyx":2764
47177  * <double*>inverseJacobianArray.data,
47178  * <double*>grad_vArray.data)
47179  * def parametricMaps_getPermutations(np.ndarray xiArray, # <<<<<<<<<<<<<<
47180  * np.ndarray permutations):
47181  * cdef int nElements_global = xiArray.shape[0]
47182  */
47183  __pyx_tuple__47 = PyTuple_Pack(6, __pyx_n_s_xiArray, __pyx_n_s_permutations, __pyx_n_s_nElements_global, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nElementBoundaryQuadraturePoints, __pyx_n_s_nSpace_global); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(0, 2764, __pyx_L1_error)
47184  __Pyx_GOTREF(__pyx_tuple__47);
47185  __Pyx_GIVEREF(__pyx_tuple__47);
47186  __pyx_codeobj__48 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__47, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_parametricMaps_getPermutations, 2764, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__48)) __PYX_ERR(0, 2764, __pyx_L1_error)
47187 
47188  /* "cfemIntegrals.pyx":2776
47189  * <double*>xiArray.data,
47190  * <int *>permutations.data)
47191  * def parametricMaps_getPermutationsGlobalExterior(np.ndarray exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
47192  * np.ndarray elementBoundaryElementsArray,
47193  * np.ndarray elementBoundaryLocalElementBoundariesArray,
47194  */
47195  __pyx_tuple__49 = PyTuple_Pack(8, __pyx_n_s_exteriorElementBoundariesArray, __pyx_n_s_elementBoundaryElementsArray, __pyx_n_s_elementBoundaryLocalElementBound_2, __pyx_n_s_xiArray, __pyx_n_s_permutations, __pyx_n_s_nElementBoundaryQuadraturePoints, __pyx_n_s_nSpace_global, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 2776, __pyx_L1_error)
47196  __Pyx_GOTREF(__pyx_tuple__49);
47197  __Pyx_GIVEREF(__pyx_tuple__49);
47198  __pyx_codeobj__50 = (PyObject*)__Pyx_PyCode_New(5, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__49, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_parametricMaps_getPermutationsGl, 2776, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__50)) __PYX_ERR(0, 2776, __pyx_L1_error)
47199 
47200  /* "cfemIntegrals.pyx":2792
47201  * <double*> xiArray.data,
47202  * <int*> permutations.data)
47203  * def getPermutationsGlobal(np.ndarray xArray, # <<<<<<<<<<<<<<
47204  * np.ndarray xArrayNew,
47205  * np.ndarray permutations):
47206  */
47207  __pyx_tuple__51 = PyTuple_Pack(5, __pyx_n_s_xArray, __pyx_n_s_xArrayNew, __pyx_n_s_permutations, __pyx_n_s_nElementBoundaries_global, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 2792, __pyx_L1_error)
47208  __Pyx_GOTREF(__pyx_tuple__51);
47209  __Pyx_GIVEREF(__pyx_tuple__51);
47210  __pyx_codeobj__52 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__51, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_getPermutationsGlobal, 2792, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__52)) __PYX_ERR(0, 2792, __pyx_L1_error)
47211 
47212  /* "cfemIntegrals.pyx":2802
47213  * <double*> xArrayNew.data,
47214  * <int*> permutations.data)
47215  * def parametricMaps_getValues(np.ndarray psi, # <<<<<<<<<<<<<<
47216  * np.ndarray l2g,
47217  * np.ndarray nodeArray,
47218  */
47219  __pyx_tuple__53 = PyTuple_Pack(8, __pyx_n_s_psi, __pyx_n_s_l2g, __pyx_n_s_nodeArray, __pyx_n_s_xArray, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_element, __pyx_n_s_nSpace_global); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(0, 2802, __pyx_L1_error)
47220  __Pyx_GOTREF(__pyx_tuple__53);
47221  __Pyx_GIVEREF(__pyx_tuple__53);
47222  __pyx_codeobj__54 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__53, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_parametricMaps_getValues, 2802, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__54)) __PYX_ERR(0, 2802, __pyx_L1_error)
47223 
47224  /* "cfemIntegrals.pyx":2818
47225  * <double*>nodeArray.data,
47226  * <double*>xArray.data)
47227  * def parametricMaps_getValuesTrace(np.ndarray psi, # <<<<<<<<<<<<<<
47228  * np.ndarray l2g,
47229  * np.ndarray nodeArray,
47230  */
47231  __pyx_tuple__55 = PyTuple_Pack(9, __pyx_n_s_psi, __pyx_n_s_l2g, __pyx_n_s_nodeArray, __pyx_n_s_xArray, __pyx_n_s_nElements_global, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_element, __pyx_n_s_nSpace_global); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(0, 2818, __pyx_L1_error)
47232  __Pyx_GOTREF(__pyx_tuple__55);
47233  __Pyx_GIVEREF(__pyx_tuple__55);
47234  __pyx_codeobj__56 = (PyObject*)__Pyx_PyCode_New(4, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__55, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_parametricMaps_getValuesTrace, 2818, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__56)) __PYX_ERR(0, 2818, __pyx_L1_error)
47235 
47236  /* "cfemIntegrals.pyx":2836
47237  * <double*>nodeArray.data,
47238  * <double*>xArray.data)
47239  * def parametricMaps_getInverseValues(np.ndarray inverseJacobian, # <<<<<<<<<<<<<<
47240  * np.ndarray l2g,
47241  * np.ndarray nodeArray,
47242  */
47243  __pyx_tuple__57 = PyTuple_Pack(9, __pyx_n_s_inverseJacobian, __pyx_n_s_l2g, __pyx_n_s_nodeArray, __pyx_n_s_xArray, __pyx_n_s_xiArray, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_element, __pyx_n_s_nSpace_global); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(0, 2836, __pyx_L1_error)
47244  __Pyx_GOTREF(__pyx_tuple__57);
47245  __Pyx_GIVEREF(__pyx_tuple__57);
47246  __pyx_codeobj__58 = (PyObject*)__Pyx_PyCode_New(5, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__57, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_parametricMaps_getInverseValues, 2836, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__58)) __PYX_ERR(0, 2836, __pyx_L1_error)
47247 
47248  /* "cfemIntegrals.pyx":2854
47249  * <double*>xArray.data,
47250  * <double*>xiArray.data)
47251  * def parametricMaps_getInverseValuesTrace(np.ndarray inverseJacobian, # <<<<<<<<<<<<<<
47252  * np.ndarray l2g,
47253  * np.ndarray nodeArray,
47254  */
47255  __pyx_tuple__59 = PyTuple_Pack(10, __pyx_n_s_inverseJacobian, __pyx_n_s_l2g, __pyx_n_s_nodeArray, __pyx_n_s_xArray, __pyx_n_s_xiArray, __pyx_n_s_nElements_global, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nElementBoundaryQuadraturePoints, __pyx_n_s_nDOF_element, __pyx_n_s_nSpace_global); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(0, 2854, __pyx_L1_error)
47256  __Pyx_GOTREF(__pyx_tuple__59);
47257  __Pyx_GIVEREF(__pyx_tuple__59);
47258  __pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(5, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_parametricMaps_getInverseValuesT, 2854, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) __PYX_ERR(0, 2854, __pyx_L1_error)
47259 
47260  /* "cfemIntegrals.pyx":2874
47261  * <double*>xArray.data,
47262  * <double*>xiArray.data)
47263  * def parametricMaps_getJacobianValues(np.ndarray grad_psi, # <<<<<<<<<<<<<<
47264  * np.ndarray l2g,
47265  * np.ndarray nodeArray,
47266  */
47267  __pyx_tuple__61 = PyTuple_Pack(7, __pyx_n_s_grad_psi, __pyx_n_s_l2g, __pyx_n_s_nodeArray, __pyx_n_s_jacobianArray, __pyx_n_s_jacobianDeterminantArray, __pyx_n_s_jacobianInverseArray, __pyx_n_s_nd); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(0, 2874, __pyx_L1_error)
47268  __Pyx_GOTREF(__pyx_tuple__61);
47269  __Pyx_GIVEREF(__pyx_tuple__61);
47270  __pyx_codeobj__62 = (PyObject*)__Pyx_PyCode_New(6, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__61, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_parametricMaps_getJacobianValues, 2874, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__62)) __PYX_ERR(0, 2874, __pyx_L1_error)
47271 
47272  /* "cfemIntegrals.pyx":2913
47273  * else:
47274  * print("error in getJacobianValues...jacobian not sized properly")
47275  * def parametricMaps_getJacobianValuesTrace(np.ndarray grad_psi, # <<<<<<<<<<<<<<
47276  * np.ndarray boundaryNormals,
47277  * np.ndarray boundaryJacobians,
47278  */
47279  __pyx_tuple__63 = PyTuple_Pack(10, __pyx_n_s_grad_psi, __pyx_n_s_boundaryNormals, __pyx_n_s_boundaryJacobians, __pyx_n_s_l2g, __pyx_n_s_nodeArray, __pyx_n_s_jacobianInverseArray, __pyx_n_s_metricTensorArray, __pyx_n_s_metricTensorDeterminantSqrtArray, __pyx_n_s_unitNormalArray, __pyx_n_s_nd); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(0, 2913, __pyx_L1_error)
47280  __Pyx_GOTREF(__pyx_tuple__63);
47281  __Pyx_GIVEREF(__pyx_tuple__63);
47282  __pyx_codeobj__64 = (PyObject*)__Pyx_PyCode_New(9, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__63, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_parametricMaps_getJacobianValues_2, 2913, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__64)) __PYX_ERR(0, 2913, __pyx_L1_error)
47283 
47284  /* "cfemIntegrals.pyx":2967
47285  * else:
47286  * print("error in getJacobianValuesTrace...jacobianInverse not sized properly")
47287  * def updateMass_weak(np.ndarray mt, # <<<<<<<<<<<<<<
47288  * np.ndarray w_dV,
47289  * np.ndarray weak_residual):
47290  */
47291  __pyx_tuple__65 = PyTuple_Pack(6, __pyx_n_s_mt, __pyx_n_s_w_dV, __pyx_n_s_weak_residual, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_test_element); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(0, 2967, __pyx_L1_error)
47292  __Pyx_GOTREF(__pyx_tuple__65);
47293  __Pyx_GIVEREF(__pyx_tuple__65);
47294  __pyx_codeobj__66 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__65, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateMass_weak, 2967, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__66)) __PYX_ERR(0, 2967, __pyx_L1_error)
47295 
47296  /* "cfemIntegrals.pyx":2979
47297  * <double*>w_dV.data,
47298  * <double*>weak_residual.data)
47299  * def updateMassJacobian_weak(np.ndarray dmt, # <<<<<<<<<<<<<<
47300  * np.ndarray v_X_w_dV,
47301  * np.ndarray jacobian_weak_residual):
47302  */
47303  __pyx_tuple__67 = PyTuple_Pack(7, __pyx_n_s_dmt, __pyx_n_s_v_X_w_dV, __pyx_n_s_jacobian_weak_residual, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_trial_element, __pyx_n_s_nDOF_test_element); if (unlikely(!__pyx_tuple__67)) __PYX_ERR(0, 2979, __pyx_L1_error)
47304  __Pyx_GOTREF(__pyx_tuple__67);
47305  __Pyx_GIVEREF(__pyx_tuple__67);
47306  __pyx_codeobj__68 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__67, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateMassJacobian_weak, 2979, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__68)) __PYX_ERR(0, 2979, __pyx_L1_error)
47307 
47308  /* "cfemIntegrals.pyx":2993
47309  * <double*>v_X_w_dV.data,
47310  * <double*>jacobian_weak_residual.data)
47311  * def updateMassJacobian_weak_lowmem(np.ndarray dmt, # <<<<<<<<<<<<<<
47312  * np.ndarray v,
47313  * np.ndarray w_dV,
47314  */
47315  __pyx_tuple__69 = PyTuple_Pack(8, __pyx_n_s_dmt, __pyx_n_s_v, __pyx_n_s_w_dV, __pyx_n_s_jacobian_weak_residual, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_trial_element, __pyx_n_s_nDOF_test_element); if (unlikely(!__pyx_tuple__69)) __PYX_ERR(0, 2993, __pyx_L1_error)
47316  __Pyx_GOTREF(__pyx_tuple__69);
47317  __Pyx_GIVEREF(__pyx_tuple__69);
47318  __pyx_codeobj__70 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__69, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateMassJacobian_weak_lowmem, 2993, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__70)) __PYX_ERR(0, 2993, __pyx_L1_error)
47319 
47320  /* "cfemIntegrals.pyx":3009
47321  * <double*> w_dV.data,
47322  * <double*> jacobian_weak_residual.data)
47323  * def updateMass_strong(np.ndarray mt, # <<<<<<<<<<<<<<
47324  * np.ndarray strong_residual):
47325  * cdef int nElements_global = mt.shape[0]
47326  */
47327  __pyx_tuple__71 = PyTuple_Pack(4, __pyx_n_s_mt, __pyx_n_s_strong_residual, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element); if (unlikely(!__pyx_tuple__71)) __PYX_ERR(0, 3009, __pyx_L1_error)
47328  __Pyx_GOTREF(__pyx_tuple__71);
47329  __Pyx_GIVEREF(__pyx_tuple__71);
47330  __pyx_codeobj__72 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__71, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateMass_strong, 3009, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__72)) __PYX_ERR(0, 3009, __pyx_L1_error)
47331 
47332  /* "cfemIntegrals.pyx":3017
47333  * <double*>mt.data,
47334  * <double*>strong_residual.data)
47335  * def updateMassJacobian_strong(np.ndarray dmt, # <<<<<<<<<<<<<<
47336  * np.ndarray v,
47337  * np.ndarray dstrong_residual):
47338  */
47339  __pyx_tuple__73 = PyTuple_Pack(6, __pyx_n_s_dmt, __pyx_n_s_v, __pyx_n_s_dstrong_residual, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_trial_element); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(0, 3017, __pyx_L1_error)
47340  __Pyx_GOTREF(__pyx_tuple__73);
47341  __Pyx_GIVEREF(__pyx_tuple__73);
47342  __pyx_codeobj__74 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__73, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateMassJacobian_strong, 3017, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__74)) __PYX_ERR(0, 3017, __pyx_L1_error)
47343 
47344  /* "cfemIntegrals.pyx":3029
47345  * <double*>v.data,
47346  * <double*>dstrong_residual.data)
47347  * def updateMass_adjoint(np.ndarray dmt, # <<<<<<<<<<<<<<
47348  * np.ndarray w_dV,
47349  * np.ndarray Lstar_w_dV):
47350  */
47351  __pyx_tuple__75 = PyTuple_Pack(6, __pyx_n_s_dmt, __pyx_n_s_w_dV, __pyx_n_s_Lstar_w_dV, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_test_element); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(0, 3029, __pyx_L1_error)
47352  __Pyx_GOTREF(__pyx_tuple__75);
47353  __Pyx_GIVEREF(__pyx_tuple__75);
47354  __pyx_codeobj__76 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__75, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateMass_adjoint, 3029, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__76)) __PYX_ERR(0, 3029, __pyx_L1_error)
47355 
47356  /* "cfemIntegrals.pyx":3041
47357  * <double*>w_dV.data,
47358  * <double*>Lstar_w_dV.data)
47359  * def updateAdvection_weak(np.ndarray f, # <<<<<<<<<<<<<<
47360  * np.ndarray grad_w_dV,
47361  * np.ndarray weak_residual):
47362  */
47363  __pyx_tuple__77 = PyTuple_Pack(7, __pyx_n_s_f, __pyx_n_s_grad_w_dV, __pyx_n_s_weak_residual, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_test_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(0, 3041, __pyx_L1_error)
47364  __Pyx_GOTREF(__pyx_tuple__77);
47365  __Pyx_GIVEREF(__pyx_tuple__77);
47366  __pyx_codeobj__78 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__77, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateAdvection_weak, 3041, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__78)) __PYX_ERR(0, 3041, __pyx_L1_error)
47367 
47368  /* "cfemIntegrals.pyx":3055
47369  * <double*>grad_w_dV.data,
47370  * <double*>weak_residual.data)
47371  * def updateAdvectionJacobian_weak(np.ndarray df, # <<<<<<<<<<<<<<
47372  * np.ndarray v_X_grad_w_dV,
47373  * np.ndarray jacobian_weak_residual):
47374  */
47375  __pyx_tuple__79 = PyTuple_Pack(8, __pyx_n_s_df, __pyx_n_s_v_X_grad_w_dV, __pyx_n_s_jacobian_weak_residual, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_trial_element, __pyx_n_s_nDOF_test_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(0, 3055, __pyx_L1_error)
47376  __Pyx_GOTREF(__pyx_tuple__79);
47377  __Pyx_GIVEREF(__pyx_tuple__79);
47378  __pyx_codeobj__80 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__79, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateAdvectionJacobian_weak, 3055, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__80)) __PYX_ERR(0, 3055, __pyx_L1_error)
47379 
47380  /* "cfemIntegrals.pyx":3071
47381  * <double*>v_X_grad_w_dV.data,
47382  * <double*>jacobian_weak_residual.data)
47383  * def updateAdvectionJacobian_weak_lowmem(np.ndarray df, # <<<<<<<<<<<<<<
47384  * np.ndarray v,
47385  * np.ndarray grad_w_dV,
47386  */
47387  __pyx_tuple__81 = PyTuple_Pack(9, __pyx_n_s_df, __pyx_n_s_v, __pyx_n_s_grad_w_dV, __pyx_n_s_jacobian_weak_residual, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_trial_element, __pyx_n_s_nDOF_test_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(0, 3071, __pyx_L1_error)
47388  __Pyx_GOTREF(__pyx_tuple__81);
47389  __Pyx_GIVEREF(__pyx_tuple__81);
47390  __pyx_codeobj__82 = (PyObject*)__Pyx_PyCode_New(4, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__81, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateAdvectionJacobian_weak_low, 3071, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__82)) __PYX_ERR(0, 3071, __pyx_L1_error)
47391 
47392  /* "cfemIntegrals.pyx":3089
47393  * <double*> grad_w_dV.data,
47394  * <double*> jacobian_weak_residual.data)
47395  * def updateAdvection_strong(np.ndarray df, # <<<<<<<<<<<<<<
47396  * np.ndarray grad_u,
47397  * np.ndarray strong_residual):
47398  */
47399  __pyx_tuple__83 = PyTuple_Pack(6, __pyx_n_s_df, __pyx_n_s_grad_u, __pyx_n_s_strong_residual, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__83)) __PYX_ERR(0, 3089, __pyx_L1_error)
47400  __Pyx_GOTREF(__pyx_tuple__83);
47401  __Pyx_GIVEREF(__pyx_tuple__83);
47402  __pyx_codeobj__84 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__83, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateAdvection_strong, 3089, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__84)) __PYX_ERR(0, 3089, __pyx_L1_error)
47403 
47404  /* "cfemIntegrals.pyx":3101
47405  * <double*>grad_u.data,
47406  * <double*>strong_residual.data)
47407  * def updateAdvectionJacobian_strong(np.ndarray df, # <<<<<<<<<<<<<<
47408  * np.ndarray grad_v,
47409  * np.ndarray dstrong_residual):
47410  */
47411  __pyx_tuple__85 = PyTuple_Pack(7, __pyx_n_s_df, __pyx_n_s_grad_v, __pyx_n_s_dstrong_residual, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_trial_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(0, 3101, __pyx_L1_error)
47412  __Pyx_GOTREF(__pyx_tuple__85);
47413  __Pyx_GIVEREF(__pyx_tuple__85);
47414  __pyx_codeobj__86 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__85, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateAdvectionJacobian_strong, 3101, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__86)) __PYX_ERR(0, 3101, __pyx_L1_error)
47415 
47416  /* "cfemIntegrals.pyx":3115
47417  * <double*>grad_v.data,
47418  * <double*>dstrong_residual.data)
47419  * def updateAdvection_adjoint(np.ndarray df, # <<<<<<<<<<<<<<
47420  * np.ndarray grad_w_dV,
47421  * np.ndarray Lstar_w_dV):
47422  */
47423  __pyx_tuple__87 = PyTuple_Pack(7, __pyx_n_s_df, __pyx_n_s_grad_w_dV, __pyx_n_s_Lstar_w_dV, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_test_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__87)) __PYX_ERR(0, 3115, __pyx_L1_error)
47424  __Pyx_GOTREF(__pyx_tuple__87);
47425  __Pyx_GIVEREF(__pyx_tuple__87);
47426  __pyx_codeobj__88 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__87, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateAdvection_adjoint, 3115, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__88)) __PYX_ERR(0, 3115, __pyx_L1_error)
47427 
47428  /* "cfemIntegrals.pyx":3129
47429  * <double*>grad_w_dV.data,
47430  * <double*>Lstar_w_dV.data)
47431  * def updateHamiltonian_weak(np.ndarray H, # <<<<<<<<<<<<<<
47432  * np.ndarray w_dV,
47433  * np.ndarray weak_residual):
47434  */
47435  __pyx_tuple__89 = PyTuple_Pack(6, __pyx_n_s_H, __pyx_n_s_w_dV, __pyx_n_s_weak_residual, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_test_element); if (unlikely(!__pyx_tuple__89)) __PYX_ERR(0, 3129, __pyx_L1_error)
47436  __Pyx_GOTREF(__pyx_tuple__89);
47437  __Pyx_GIVEREF(__pyx_tuple__89);
47438  __pyx_codeobj__90 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__89, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateHamiltonian_weak, 3129, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__90)) __PYX_ERR(0, 3129, __pyx_L1_error)
47439 
47440  /* "cfemIntegrals.pyx":3141
47441  * <double*>w_dV.data,
47442  * <double*>weak_residual.data)
47443  * def updateHamiltonianJacobian_weak(np.ndarray dH, # <<<<<<<<<<<<<<
47444  * np.ndarray grad_v_X_w_dV,
47445  * np.ndarray jacobian_weak_residual):
47446  */
47447  __pyx_tuple__91 = PyTuple_Pack(8, __pyx_n_s_dH, __pyx_n_s_grad_v_X_w_dV, __pyx_n_s_jacobian_weak_residual, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_trial_element, __pyx_n_s_nDOF_test_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__91)) __PYX_ERR(0, 3141, __pyx_L1_error)
47448  __Pyx_GOTREF(__pyx_tuple__91);
47449  __Pyx_GIVEREF(__pyx_tuple__91);
47450  __pyx_codeobj__92 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__91, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateHamiltonianJacobian_weak, 3141, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__92)) __PYX_ERR(0, 3141, __pyx_L1_error)
47451 
47452  /* "cfemIntegrals.pyx":3157
47453  * <double*>grad_v_X_w_dV.data,
47454  * <double*>jacobian_weak_residual.data)
47455  * def updateHamiltonianJacobian_weak_lowmem(np.ndarray dH, # <<<<<<<<<<<<<<
47456  * np.ndarray grad_v,
47457  * np.ndarray w_dV,
47458  */
47459  __pyx_tuple__93 = PyTuple_Pack(9, __pyx_n_s_dH, __pyx_n_s_grad_v, __pyx_n_s_w_dV, __pyx_n_s_jacobian_weak_residual, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_trial_element, __pyx_n_s_nDOF_test_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__93)) __PYX_ERR(0, 3157, __pyx_L1_error)
47460  __Pyx_GOTREF(__pyx_tuple__93);
47461  __Pyx_GIVEREF(__pyx_tuple__93);
47462  __pyx_codeobj__94 = (PyObject*)__Pyx_PyCode_New(4, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__93, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateHamiltonianJacobian_weak_l, 3157, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__94)) __PYX_ERR(0, 3157, __pyx_L1_error)
47463 
47464  /* "cfemIntegrals.pyx":3175
47465  * <double*> w_dV.data,
47466  * <double*> jacobian_weak_residual.data)
47467  * def updateHamiltonian_strong(np.ndarray dH, # <<<<<<<<<<<<<<
47468  * np.ndarray grad_u,
47469  * np.ndarray strong_residual):
47470  */
47471  __pyx_tuple__95 = PyTuple_Pack(6, __pyx_n_s_dH, __pyx_n_s_grad_u, __pyx_n_s_strong_residual, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__95)) __PYX_ERR(0, 3175, __pyx_L1_error)
47472  __Pyx_GOTREF(__pyx_tuple__95);
47473  __Pyx_GIVEREF(__pyx_tuple__95);
47474  __pyx_codeobj__96 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__95, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateHamiltonian_strong, 3175, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__96)) __PYX_ERR(0, 3175, __pyx_L1_error)
47475 
47476  /* "cfemIntegrals.pyx":3187
47477  * <double*>grad_u.data,
47478  * <double*>strong_residual.data)
47479  * def updateHamiltonianJacobian_strong(np.ndarray dH, # <<<<<<<<<<<<<<
47480  * np.ndarray grad_v,
47481  * np.ndarray dstrong_residual):
47482  */
47483  __pyx_tuple__97 = PyTuple_Pack(7, __pyx_n_s_dH, __pyx_n_s_grad_v, __pyx_n_s_dstrong_residual, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_trial_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__97)) __PYX_ERR(0, 3187, __pyx_L1_error)
47484  __Pyx_GOTREF(__pyx_tuple__97);
47485  __Pyx_GIVEREF(__pyx_tuple__97);
47486  __pyx_codeobj__98 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__97, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateHamiltonianJacobian_strong, 3187, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__98)) __PYX_ERR(0, 3187, __pyx_L1_error)
47487 
47488  /* "cfemIntegrals.pyx":3201
47489  * <double*>grad_v.data,
47490  * <double*>dstrong_residual.data)
47491  * def updateHamiltonian_adjoint(np.ndarray dH, # <<<<<<<<<<<<<<
47492  * np.ndarray grad_w_dV,
47493  * np.ndarray Lstar_w_dV):
47494  */
47495  __pyx_tuple__99 = PyTuple_Pack(7, __pyx_n_s_dH, __pyx_n_s_grad_w_dV, __pyx_n_s_Lstar_w_dV, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_test_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__99)) __PYX_ERR(0, 3201, __pyx_L1_error)
47496  __Pyx_GOTREF(__pyx_tuple__99);
47497  __Pyx_GIVEREF(__pyx_tuple__99);
47498  __pyx_codeobj__100 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__99, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateHamiltonian_adjoint, 3201, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__100)) __PYX_ERR(0, 3201, __pyx_L1_error)
47499 
47500  /* "cfemIntegrals.pyx":3215
47501  * <double*>grad_w_dV.data,
47502  * <double*>Lstar_w_dV.data)
47503  * def updateDiffusion_weak(np.ndarray a, # <<<<<<<<<<<<<<
47504  * np.ndarray grad_phi_X_grad_w_dV,
47505  * np.ndarray weak_residual):
47506  */
47507  __pyx_tuple__101 = PyTuple_Pack(7, __pyx_n_s_a, __pyx_n_s_grad_phi_X_grad_w_dV, __pyx_n_s_weak_residual, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_test_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__101)) __PYX_ERR(0, 3215, __pyx_L1_error)
47508  __Pyx_GOTREF(__pyx_tuple__101);
47509  __Pyx_GIVEREF(__pyx_tuple__101);
47510  __pyx_codeobj__102 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__101, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateDiffusion_weak, 3215, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__102)) __PYX_ERR(0, 3215, __pyx_L1_error)
47511 
47512  /* "cfemIntegrals.pyx":3229
47513  * <double*>grad_phi_X_grad_w_dV.data,
47514  * <double*>weak_residual.data)
47515  * def updateDiffusion_weak_lowmem(np.ndarray a, # <<<<<<<<<<<<<<
47516  * np.ndarray grad_phi,
47517  * np.ndarray grad_w_dV,
47518  */
47519  __pyx_tuple__103 = PyTuple_Pack(8, __pyx_n_s_a, __pyx_n_s_grad_phi, __pyx_n_s_grad_w_dV, __pyx_n_s_weak_residual, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_test_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__103)) __PYX_ERR(0, 3229, __pyx_L1_error)
47520  __Pyx_GOTREF(__pyx_tuple__103);
47521  __Pyx_GIVEREF(__pyx_tuple__103);
47522  __pyx_codeobj__104 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__103, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateDiffusion_weak_lowmem, 3229, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__104)) __PYX_ERR(0, 3229, __pyx_L1_error)
47523 
47524  /* "cfemIntegrals.pyx":3245
47525  * <double*> grad_w_dV.data,
47526  * <double*> weak_residual.data)
47527  * def updateDiffusion_weak_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
47528  * np.ndarray colind,
47529  * np.ndarray a,
47530  */
47531  __pyx_tuple__105 = PyTuple_Pack(10, __pyx_n_s_rowptr, __pyx_n_s_colind, __pyx_n_s_a, __pyx_n_s_grad_phi, __pyx_n_s_grad_w_dV, __pyx_n_s_weak_residual, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_test_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__105)) __PYX_ERR(0, 3245, __pyx_L1_error)
47532  __Pyx_GOTREF(__pyx_tuple__105);
47533  __Pyx_GIVEREF(__pyx_tuple__105);
47534  __pyx_codeobj__106 = (PyObject*)__Pyx_PyCode_New(6, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__105, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateDiffusion_weak_sd, 3245, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__106)) __PYX_ERR(0, 3245, __pyx_L1_error)
47535 
47536  /* "cfemIntegrals.pyx":3265
47537  * <double*> grad_w_dV.data,
47538  * <double*> weak_residual.data)
47539  * def updateDiffusionJacobian_weak(np.ndarray l2g, # <<<<<<<<<<<<<<
47540  * np.ndarray a,
47541  * np.ndarray da,
47542  */
47543  __pyx_tuple__107 = PyTuple_Pack(13, __pyx_n_s_l2g, __pyx_n_s_a, __pyx_n_s_da, __pyx_n_s_grad_phi_X_grad_w_dV, __pyx_n_s_dphi, __pyx_n_s_v, __pyx_n_s_grad_v_X_grad_w_dV, __pyx_n_s_jacobian_weak_residual, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_trial_element, __pyx_n_s_nDOF_test_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__107)) __PYX_ERR(0, 3265, __pyx_L1_error)
47544  __Pyx_GOTREF(__pyx_tuple__107);
47545  __Pyx_GIVEREF(__pyx_tuple__107);
47546  __pyx_codeobj__108 = (PyObject*)__Pyx_PyCode_New(8, 0, 13, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__107, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateDiffusionJacobian_weak, 3265, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__108)) __PYX_ERR(0, 3265, __pyx_L1_error)
47547 
47548  /* "cfemIntegrals.pyx":3291
47549  * <double*>grad_v_X_grad_w_dV.data,
47550  * <double*>jacobian_weak_residual.data)
47551  * def updateDiffusionJacobian_weak_lowmem(np.ndarray l2g, # <<<<<<<<<<<<<<
47552  * np.ndarray a,
47553  * np.ndarray da,
47554  */
47555  __pyx_tuple__109 = PyTuple_Pack(14, __pyx_n_s_l2g, __pyx_n_s_a, __pyx_n_s_da, __pyx_n_s_grad_phi, __pyx_n_s_grad_w_dV, __pyx_n_s_dphi, __pyx_n_s_v, __pyx_n_s_grad_v, __pyx_n_s_jacobian_weak_residual, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_trial_element, __pyx_n_s_nDOF_test_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__109)) __PYX_ERR(0, 3291, __pyx_L1_error)
47556  __Pyx_GOTREF(__pyx_tuple__109);
47557  __Pyx_GIVEREF(__pyx_tuple__109);
47558  __pyx_codeobj__110 = (PyObject*)__Pyx_PyCode_New(9, 0, 14, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__109, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateDiffusionJacobian_weak_low, 3291, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__110)) __PYX_ERR(0, 3291, __pyx_L1_error)
47559 
47560  /* "cfemIntegrals.pyx":3319
47561  * <double*> grad_v.data,
47562  * <double*> jacobian_weak_residual.data)
47563  * def updateDiffusionJacobian_weak_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
47564  * np.ndarray colind,
47565  * np.ndarray l2g,
47566  */
47567  __pyx_tuple__111 = PyTuple_Pack(16, __pyx_n_s_rowptr, __pyx_n_s_colind, __pyx_n_s_l2g, __pyx_n_s_a, __pyx_n_s_da, __pyx_n_s_grad_phi, __pyx_n_s_grad_w_dV, __pyx_n_s_dphi, __pyx_n_s_v, __pyx_n_s_grad_v, __pyx_n_s_jacobian_weak_residual, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_trial_element, __pyx_n_s_nDOF_test_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__111)) __PYX_ERR(0, 3319, __pyx_L1_error)
47568  __Pyx_GOTREF(__pyx_tuple__111);
47569  __Pyx_GIVEREF(__pyx_tuple__111);
47570  __pyx_codeobj__112 = (PyObject*)__Pyx_PyCode_New(11, 0, 16, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__111, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateDiffusionJacobian_weak_sd, 3319, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__112)) __PYX_ERR(0, 3319, __pyx_L1_error)
47571 
47572  /* "cfemIntegrals.pyx":3351
47573  * <double*> grad_v.data,
47574  * <double*> jacobian_weak_residual.data)
47575  * def updateDiffusion_strong(np.ndarray da, # <<<<<<<<<<<<<<
47576  * np.ndarray grad_phi,
47577  * np.ndarray grad_u,
47578  */
47579  __pyx_tuple__113 = PyTuple_Pack(7, __pyx_n_s_da, __pyx_n_s_grad_phi, __pyx_n_s_grad_u, __pyx_n_s_strong_residual, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__113)) __PYX_ERR(0, 3351, __pyx_L1_error)
47580  __Pyx_GOTREF(__pyx_tuple__113);
47581  __Pyx_GIVEREF(__pyx_tuple__113);
47582  __pyx_codeobj__114 = (PyObject*)__Pyx_PyCode_New(4, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__113, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateDiffusion_strong, 3351, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__114)) __PYX_ERR(0, 3351, __pyx_L1_error)
47583 
47584  /* "cfemIntegrals.pyx":3365
47585  * <double*>grad_u.data,
47586  * <double*>strong_residual.data)
47587  * def updateDiffusion_strong_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
47588  * np.ndarray colind,
47589  * np.ndarray da,
47590  */
47591  __pyx_tuple__115 = PyTuple_Pack(9, __pyx_n_s_rowptr, __pyx_n_s_colind, __pyx_n_s_da, __pyx_n_s_grad_phi, __pyx_n_s_grad_u, __pyx_n_s_strong_residual, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__115)) __PYX_ERR(0, 3365, __pyx_L1_error)
47592  __Pyx_GOTREF(__pyx_tuple__115);
47593  __Pyx_GIVEREF(__pyx_tuple__115);
47594  __pyx_codeobj__116 = (PyObject*)__Pyx_PyCode_New(6, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__115, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateDiffusion_strong_sd, 3365, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__116)) __PYX_ERR(0, 3365, __pyx_L1_error)
47595 
47596  /* "cfemIntegrals.pyx":3383
47597  * <double*> grad_u.data,
47598  * <double*> strong_residual.data)
47599  * def updateDiffusionJacobian_strong(np.ndarray l2g, # <<<<<<<<<<<<<<
47600  * np.ndarray da,
47601  * np.ndarray dphi,
47602  */
47603  __pyx_tuple__117 = PyTuple_Pack(11, __pyx_n_s_l2g, __pyx_n_s_da, __pyx_n_s_dphi, __pyx_n_s_grad_phi, __pyx_n_s_grad_u, __pyx_n_s_grad_v, __pyx_n_s_dstrong_residual, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_trial_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__117)) __PYX_ERR(0, 3383, __pyx_L1_error)
47604  __Pyx_GOTREF(__pyx_tuple__117);
47605  __Pyx_GIVEREF(__pyx_tuple__117);
47606  __pyx_codeobj__118 = (PyObject*)__Pyx_PyCode_New(7, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__117, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateDiffusionJacobian_strong, 3383, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__118)) __PYX_ERR(0, 3383, __pyx_L1_error)
47607 
47608  /* "cfemIntegrals.pyx":3405
47609  * <double*>grad_v.data,
47610  * <double*>dstrong_residual.data)
47611  * def updateDiffusionJacobian_strong_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
47612  * np.ndarray colind,
47613  * np.ndarray l2g,
47614  */
47615  __pyx_tuple__119 = PyTuple_Pack(13, __pyx_n_s_rowptr, __pyx_n_s_colind, __pyx_n_s_l2g, __pyx_n_s_da, __pyx_n_s_dphi, __pyx_n_s_grad_phi, __pyx_n_s_grad_u, __pyx_n_s_grad_v, __pyx_n_s_dstrong_residual, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_trial_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__119)) __PYX_ERR(0, 3405, __pyx_L1_error)
47616  __Pyx_GOTREF(__pyx_tuple__119);
47617  __Pyx_GIVEREF(__pyx_tuple__119);
47618  __pyx_codeobj__120 = (PyObject*)__Pyx_PyCode_New(9, 0, 13, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__119, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateDiffusionJacobian_strong_s, 3405, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__120)) __PYX_ERR(0, 3405, __pyx_L1_error)
47619 
47620  /* "cfemIntegrals.pyx":3431
47621  * <double*> grad_v.data,
47622  * <double*> dstrong_residual.data)
47623  * def updateDiffusion_adjoint(np.ndarray da, # <<<<<<<<<<<<<<
47624  * np.ndarray grad_phi,
47625  * np.ndarray grad_w_dV,
47626  */
47627  __pyx_tuple__121 = PyTuple_Pack(8, __pyx_n_s_da, __pyx_n_s_grad_phi, __pyx_n_s_grad_w_dV, __pyx_n_s_Lstar_w_dV, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_test_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__121)) __PYX_ERR(0, 3431, __pyx_L1_error)
47628  __Pyx_GOTREF(__pyx_tuple__121);
47629  __Pyx_GIVEREF(__pyx_tuple__121);
47630  __pyx_codeobj__122 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__121, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateDiffusion_adjoint, 3431, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__122)) __PYX_ERR(0, 3431, __pyx_L1_error)
47631 
47632  /* "cfemIntegrals.pyx":3447
47633  * <double*>grad_w_dV.data,
47634  * <double*>Lstar_w_dV.data)
47635  * def updateDiffusion_adjoint_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
47636  * np.ndarray colind,
47637  * np.ndarray da,
47638  */
47639  __pyx_tuple__123 = PyTuple_Pack(10, __pyx_n_s_rowptr, __pyx_n_s_colind, __pyx_n_s_da, __pyx_n_s_grad_phi, __pyx_n_s_grad_w_dV, __pyx_n_s_Lstar_w_dV, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_test_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__123)) __PYX_ERR(0, 3447, __pyx_L1_error)
47640  __Pyx_GOTREF(__pyx_tuple__123);
47641  __Pyx_GIVEREF(__pyx_tuple__123);
47642  __pyx_codeobj__124 = (PyObject*)__Pyx_PyCode_New(6, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__123, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateDiffusion_adjoint_sd, 3447, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__124)) __PYX_ERR(0, 3447, __pyx_L1_error)
47643 
47644  /* "cfemIntegrals.pyx":3467
47645  * <double*> grad_w_dV.data,
47646  * <double*> Lstar_w_dV.data)
47647  * def updateReaction_weak(np.ndarray r, # <<<<<<<<<<<<<<
47648  * np.ndarray w_dV,
47649  * np.ndarray weak_residual):
47650  */
47651  __pyx_tuple__125 = PyTuple_Pack(6, __pyx_n_s_r, __pyx_n_s_w_dV, __pyx_n_s_weak_residual, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_test_element); if (unlikely(!__pyx_tuple__125)) __PYX_ERR(0, 3467, __pyx_L1_error)
47652  __Pyx_GOTREF(__pyx_tuple__125);
47653  __Pyx_GIVEREF(__pyx_tuple__125);
47654  __pyx_codeobj__126 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__125, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateReaction_weak, 3467, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__126)) __PYX_ERR(0, 3467, __pyx_L1_error)
47655 
47656  /* "cfemIntegrals.pyx":3479
47657  * <double*>w_dV.data,
47658  * <double*>weak_residual.data)
47659  * def updateReactionJacobian_weak(np.ndarray dr, # <<<<<<<<<<<<<<
47660  * np.ndarray v_X_w_dV,
47661  * np.ndarray jacobian_weak_residual):
47662  */
47663  __pyx_tuple__127 = PyTuple_Pack(7, __pyx_n_s_dr, __pyx_n_s_v_X_w_dV, __pyx_n_s_jacobian_weak_residual, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_trial_element, __pyx_n_s_nDOF_test_element); if (unlikely(!__pyx_tuple__127)) __PYX_ERR(0, 3479, __pyx_L1_error)
47664  __Pyx_GOTREF(__pyx_tuple__127);
47665  __Pyx_GIVEREF(__pyx_tuple__127);
47666  __pyx_codeobj__128 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__127, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateReactionJacobian_weak, 3479, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__128)) __PYX_ERR(0, 3479, __pyx_L1_error)
47667 
47668  /* "cfemIntegrals.pyx":3493
47669  * <double*>v_X_w_dV.data,
47670  * <double*>jacobian_weak_residual.data)
47671  * def updateReactionJacobian_weak_lowmem(np.ndarray dr, # <<<<<<<<<<<<<<
47672  * np.ndarray v,
47673  * np.ndarray w_dV,
47674  */
47675  __pyx_tuple__129 = PyTuple_Pack(8, __pyx_n_s_dr, __pyx_n_s_v, __pyx_n_s_w_dV, __pyx_n_s_jacobian_weak_residual, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_trial_element, __pyx_n_s_nDOF_test_element); if (unlikely(!__pyx_tuple__129)) __PYX_ERR(0, 3493, __pyx_L1_error)
47676  __Pyx_GOTREF(__pyx_tuple__129);
47677  __Pyx_GIVEREF(__pyx_tuple__129);
47678  __pyx_codeobj__130 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__129, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateReactionJacobian_weak_lowm, 3493, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__130)) __PYX_ERR(0, 3493, __pyx_L1_error)
47679 
47680  /* "cfemIntegrals.pyx":3509
47681  * <double*> w_dV.data,
47682  * <double*> jacobian_weak_residual.data)
47683  * def updateReaction_strong(np.ndarray r, # <<<<<<<<<<<<<<
47684  * np.ndarray strong_residual):
47685  * cdef int nElements_global = r.shape[0]
47686  */
47687  __pyx_tuple__131 = PyTuple_Pack(4, __pyx_n_s_r, __pyx_n_s_strong_residual, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element); if (unlikely(!__pyx_tuple__131)) __PYX_ERR(0, 3509, __pyx_L1_error)
47688  __Pyx_GOTREF(__pyx_tuple__131);
47689  __Pyx_GIVEREF(__pyx_tuple__131);
47690  __pyx_codeobj__132 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__131, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateReaction_strong, 3509, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__132)) __PYX_ERR(0, 3509, __pyx_L1_error)
47691 
47692  /* "cfemIntegrals.pyx":3517
47693  * <double*>r.data,
47694  * <double*>strong_residual.data)
47695  * def updateReactionJacobian_strong(np.ndarray dr, # <<<<<<<<<<<<<<
47696  * np.ndarray v,
47697  * np.ndarray dstrong_residual):
47698  */
47699  __pyx_tuple__133 = PyTuple_Pack(6, __pyx_n_s_dr, __pyx_n_s_v, __pyx_n_s_dstrong_residual, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_trial_element); if (unlikely(!__pyx_tuple__133)) __PYX_ERR(0, 3517, __pyx_L1_error)
47700  __Pyx_GOTREF(__pyx_tuple__133);
47701  __Pyx_GIVEREF(__pyx_tuple__133);
47702  __pyx_codeobj__134 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__133, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateReactionJacobian_strong, 3517, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__134)) __PYX_ERR(0, 3517, __pyx_L1_error)
47703 
47704  /* "cfemIntegrals.pyx":3529
47705  * <double*>v.data,
47706  * <double*>dstrong_residual.data)
47707  * def updateReaction_adjoint(np.ndarray dr, # <<<<<<<<<<<<<<
47708  * np.ndarray w_dV,
47709  * np.ndarray Lstar_w_dV):
47710  */
47711  __pyx_tuple__135 = PyTuple_Pack(6, __pyx_n_s_dr, __pyx_n_s_w_dV, __pyx_n_s_Lstar_w_dV, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_test_element); if (unlikely(!__pyx_tuple__135)) __PYX_ERR(0, 3529, __pyx_L1_error)
47712  __Pyx_GOTREF(__pyx_tuple__135);
47713  __Pyx_GIVEREF(__pyx_tuple__135);
47714  __pyx_codeobj__136 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__135, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateReaction_adjoint, 3529, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__136)) __PYX_ERR(0, 3529, __pyx_L1_error)
47715 
47716  /* "cfemIntegrals.pyx":3541
47717  * <double*>w_dV.data,
47718  * <double*>Lstar_w_dV.data)
47719  * def updateSubgridError(np.ndarray error, # <<<<<<<<<<<<<<
47720  * np.ndarray Lstar_w_dV,
47721  * np.ndarray weak_residual):
47722  */
47723  __pyx_tuple__137 = PyTuple_Pack(6, __pyx_n_s_error, __pyx_n_s_Lstar_w_dV, __pyx_n_s_weak_residual, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_test_element); if (unlikely(!__pyx_tuple__137)) __PYX_ERR(0, 3541, __pyx_L1_error)
47724  __Pyx_GOTREF(__pyx_tuple__137);
47725  __Pyx_GIVEREF(__pyx_tuple__137);
47726  __pyx_codeobj__138 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__137, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateSubgridError, 3541, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__138)) __PYX_ERR(0, 3541, __pyx_L1_error)
47727 
47728  /* "cfemIntegrals.pyx":3553
47729  * <double*>Lstar_w_dV.data,
47730  * <double*>weak_residual.data)
47731  * def updateSubgridErrorJacobian(np.ndarray derror, # <<<<<<<<<<<<<<
47732  * np.ndarray Lstar_w_dV,
47733  * np.ndarray jacobian_weak_residual):
47734  */
47735  __pyx_tuple__139 = PyTuple_Pack(7, __pyx_n_s_derror, __pyx_n_s_Lstar_w_dV, __pyx_n_s_jacobian_weak_residual, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_trial_element, __pyx_n_s_nDOF_test_element); if (unlikely(!__pyx_tuple__139)) __PYX_ERR(0, 3553, __pyx_L1_error)
47736  __Pyx_GOTREF(__pyx_tuple__139);
47737  __Pyx_GIVEREF(__pyx_tuple__139);
47738  __pyx_codeobj__140 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__139, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateSubgridErrorJacobian, 3553, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__140)) __PYX_ERR(0, 3553, __pyx_L1_error)
47739 
47740  /* "cfemIntegrals.pyx":3567
47741  * <double*>Lstar_w_dV.data,
47742  * <double*>jacobian_weak_residual.data)
47743  * def updateNumericalDiffusion(np.ndarray numDiff, # <<<<<<<<<<<<<<
47744  * np.ndarray grad_u_X_grad_w_dV,
47745  * np.ndarray weak_residual):
47746  */
47747  __pyx_tuple__141 = PyTuple_Pack(7, __pyx_n_s_numDiff, __pyx_n_s_grad_u_X_grad_w_dV, __pyx_n_s_weak_residual, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_test_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__141)) __PYX_ERR(0, 3567, __pyx_L1_error)
47748  __Pyx_GOTREF(__pyx_tuple__141);
47749  __Pyx_GIVEREF(__pyx_tuple__141);
47750  __pyx_codeobj__142 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__141, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateNumericalDiffusion, 3567, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__142)) __PYX_ERR(0, 3567, __pyx_L1_error)
47751 
47752  /* "cfemIntegrals.pyx":3581
47753  * <double*>grad_u_X_grad_w_dV.data,
47754  * <double*>weak_residual.data)
47755  * def updateNumericalDiffusion_lowmem(np.ndarray numDiff, # <<<<<<<<<<<<<<
47756  * np.ndarray grad_u,
47757  * np.ndarray grad_w_dV,
47758  */
47759  __pyx_tuple__143 = PyTuple_Pack(8, __pyx_n_s_numDiff, __pyx_n_s_grad_u, __pyx_n_s_grad_w_dV, __pyx_n_s_weak_residual, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_test_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__143)) __PYX_ERR(0, 3581, __pyx_L1_error)
47760  __Pyx_GOTREF(__pyx_tuple__143);
47761  __Pyx_GIVEREF(__pyx_tuple__143);
47762  __pyx_codeobj__144 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__143, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateNumericalDiffusion_lowmem, 3581, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__144)) __PYX_ERR(0, 3581, __pyx_L1_error)
47763 
47764  /* "cfemIntegrals.pyx":3597
47765  * <double*> grad_w_dV.data,
47766  * <double*> weak_residual.data)
47767  * def updateNumericalDiffusionJacobian(np.ndarray numDiff, # <<<<<<<<<<<<<<
47768  * np.ndarray grad_v_X_grad_w_dV,
47769  * np.ndarray jacobian_weak_residual):
47770  */
47771  __pyx_tuple__145 = PyTuple_Pack(8, __pyx_n_s_numDiff, __pyx_n_s_grad_v_X_grad_w_dV, __pyx_n_s_jacobian_weak_residual, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_trial_element, __pyx_n_s_nDOF_test_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__145)) __PYX_ERR(0, 3597, __pyx_L1_error)
47772  __Pyx_GOTREF(__pyx_tuple__145);
47773  __Pyx_GIVEREF(__pyx_tuple__145);
47774  __pyx_codeobj__146 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__145, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateNumericalDiffusionJacobian, 3597, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__146)) __PYX_ERR(0, 3597, __pyx_L1_error)
47775 
47776  /* "cfemIntegrals.pyx":3613
47777  * <double*>grad_v_X_grad_w_dV.data,
47778  * <double*>jacobian_weak_residual.data)
47779  * def updateNumericalDiffusionJacobian_lowmem(np.ndarray numDiff, # <<<<<<<<<<<<<<
47780  * np.ndarray grad_v,
47781  * np.ndarray grad_w_dV,
47782  */
47783  __pyx_tuple__147 = PyTuple_Pack(9, __pyx_n_s_numDiff, __pyx_n_s_grad_v, __pyx_n_s_grad_w_dV, __pyx_n_s_jacobian_weak_residual, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_trial_element, __pyx_n_s_nDOF_test_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__147)) __PYX_ERR(0, 3613, __pyx_L1_error)
47784  __Pyx_GOTREF(__pyx_tuple__147);
47785  __Pyx_GIVEREF(__pyx_tuple__147);
47786  __pyx_codeobj__148 = (PyObject*)__Pyx_PyCode_New(4, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__147, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateNumericalDiffusionJacobian_2, 3613, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__148)) __PYX_ERR(0, 3613, __pyx_L1_error)
47787 
47788  /* "cfemIntegrals.pyx":3631
47789  * <double*> grad_w_dV.data,
47790  * <double*> jacobian_weak_residual.data)
47791  * def calculateScalarScalarProduct(np.ndarray s1, # <<<<<<<<<<<<<<
47792  * np.ndarray s2,
47793  * np.ndarray sResult):
47794  */
47795  __pyx_tuple__149 = PyTuple_Pack(5, __pyx_n_s_s1, __pyx_n_s_s2, __pyx_n_s_sResult, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element); if (unlikely(!__pyx_tuple__149)) __PYX_ERR(0, 3631, __pyx_L1_error)
47796  __Pyx_GOTREF(__pyx_tuple__149);
47797  __Pyx_GIVEREF(__pyx_tuple__149);
47798  __pyx_codeobj__150 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__149, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_calculateScalarScalarProduct, 3631, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__150)) __PYX_ERR(0, 3631, __pyx_L1_error)
47799 
47800  /* "cfemIntegrals.pyx":3641
47801  * <double*>s2.data,
47802  * <double*>sResult.data)
47803  * def calculateVectorScalarProduct(np.ndarray v, # <<<<<<<<<<<<<<
47804  * np.ndarray s,
47805  * np.ndarray vResult):
47806  */
47807  __pyx_tuple__151 = PyTuple_Pack(6, __pyx_n_s_v, __pyx_n_s_s, __pyx_n_s_vResult, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__151)) __PYX_ERR(0, 3641, __pyx_L1_error)
47808  __Pyx_GOTREF(__pyx_tuple__151);
47809  __Pyx_GIVEREF(__pyx_tuple__151);
47810  __pyx_codeobj__152 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__151, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_calculateVectorScalarProduct, 3641, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__152)) __PYX_ERR(0, 3641, __pyx_L1_error)
47811 
47812  /* "cfemIntegrals.pyx":3653
47813  * <double*>s.data,
47814  * <double*>vResult.data)
47815  * def calculateTensorScalarProduct(np.ndarray t, # <<<<<<<<<<<<<<
47816  * np.ndarray s,
47817  * np.ndarray tResult):
47818  */
47819  __pyx_tuple__153 = PyTuple_Pack(6, __pyx_n_s_t, __pyx_n_s_s, __pyx_n_s_tResult, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__153)) __PYX_ERR(0, 3653, __pyx_L1_error)
47820  __Pyx_GOTREF(__pyx_tuple__153);
47821  __Pyx_GIVEREF(__pyx_tuple__153);
47822  __pyx_codeobj__154 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__153, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_calculateTensorScalarProduct, 3653, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__154)) __PYX_ERR(0, 3653, __pyx_L1_error)
47823 
47824  /* "cfemIntegrals.pyx":3665
47825  * <double*>s.data,
47826  * <double*>tResult.data)
47827  * def updateInteriorElementBoundaryFlux(np.ndarray interiorElementBoundaries, # <<<<<<<<<<<<<<
47828  * np.ndarray elementBoundaryElements,
47829  * np.ndarray elementBoundaryLocalElementBoundaries,
47830  */
47831  __pyx_tuple__155 = PyTuple_Pack(10, __pyx_n_s_interiorElementBoundaries, __pyx_n_s_elementBoundaryElements, __pyx_n_s_elementBoundaryLocalElementBound, __pyx_n_s_flux, __pyx_n_s_w_dS, __pyx_n_s_residual, __pyx_n_s_nInteriorElementBoundaries_globa, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nQuadraturePoints_elementBoundar, __pyx_n_s_nDOF_test_element); if (unlikely(!__pyx_tuple__155)) __PYX_ERR(0, 3665, __pyx_L1_error)
47832  __Pyx_GOTREF(__pyx_tuple__155);
47833  __Pyx_GIVEREF(__pyx_tuple__155);
47834  __pyx_codeobj__156 = (PyObject*)__Pyx_PyCode_New(6, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__155, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateInteriorElementBoundaryFlu, 3665, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__156)) __PYX_ERR(0, 3665, __pyx_L1_error)
47835 
47836  /* "cfemIntegrals.pyx":3685
47837  * <double*>w_dS.data,
47838  * <double*>residual.data)
47839  * def updateExteriorElementBoundaryFlux(np.ndarray exteriorElementBoundaries, # <<<<<<<<<<<<<<
47840  * np.ndarray elementBoundaryElements,
47841  * np.ndarray elementBoundaryLocalElementBoundaries,
47842  */
47843  __pyx_tuple__157 = PyTuple_Pack(7, __pyx_n_s_exteriorElementBoundaries, __pyx_n_s_elementBoundaryElements, __pyx_n_s_elementBoundaryLocalElementBound, __pyx_n_s_flux, __pyx_n_s_w_dS, __pyx_n_s_residual, __pyx_n_s_nd); if (unlikely(!__pyx_tuple__157)) __PYX_ERR(0, 3685, __pyx_L1_error)
47844  __Pyx_GOTREF(__pyx_tuple__157);
47845  __Pyx_GIVEREF(__pyx_tuple__157);
47846  __pyx_codeobj__158 = (PyObject*)__Pyx_PyCode_New(6, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__157, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateExteriorElementBoundaryFlu, 3685, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__158)) __PYX_ERR(0, 3685, __pyx_L1_error)
47847 
47848  /* "cfemIntegrals.pyx":3713
47849  * <double*> w_dS.data,
47850  * <double*> residual.data)
47851  * def updateGlobalResidualFromElementResidual(int offset_r, # <<<<<<<<<<<<<<
47852  * int stride_r,
47853  * np.ndarray nFreeDOF_element_r,
47854  */
47855  __pyx_tuple__159 = PyTuple_Pack(9, __pyx_n_s_offset_r, __pyx_n_s_stride_r, __pyx_n_s_nFreeDOF_element_r, __pyx_n_s_freeLocal_r, __pyx_n_s_freeGlobal_r, __pyx_n_s_elementResidual, __pyx_n_s_globalResidual, __pyx_n_s_nElements_global, __pyx_n_s_nDOF_test_element); if (unlikely(!__pyx_tuple__159)) __PYX_ERR(0, 3713, __pyx_L1_error)
47856  __Pyx_GOTREF(__pyx_tuple__159);
47857  __Pyx_GIVEREF(__pyx_tuple__159);
47858  __pyx_codeobj__160 = (PyObject*)__Pyx_PyCode_New(7, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__159, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateGlobalResidualFromElementR, 3713, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__160)) __PYX_ERR(0, 3713, __pyx_L1_error)
47859 
47860  /* "cfemIntegrals.pyx":3731
47861  * <double*>elementResidual.data,
47862  * <double*>globalResidual.data)
47863  * def updateGlobalJacobianFromElementJacobian_dense(int offset_r, # <<<<<<<<<<<<<<
47864  * int stride_r,
47865  * int offset_u,
47866  */
47867  __pyx_tuple__161 = PyTuple_Pack(16, __pyx_n_s_offset_r, __pyx_n_s_stride_r, __pyx_n_s_offset_u, __pyx_n_s_stride_u, __pyx_n_s_nFreeVDOF_global, __pyx_n_s_nFreeDOF_element_r, __pyx_n_s_freeLocal_r, __pyx_n_s_freeGlobal_r, __pyx_n_s_nFreeDOF_element_u, __pyx_n_s_freeLocal_u, __pyx_n_s_freeGlobal_u, __pyx_n_s_elementJacobian, __pyx_n_s_globalJacobian, __pyx_n_s_nElements_global, __pyx_n_s_nDOF_test_element, __pyx_n_s_nDOF_trial_element); if (unlikely(!__pyx_tuple__161)) __PYX_ERR(0, 3731, __pyx_L1_error)
47868  __Pyx_GOTREF(__pyx_tuple__161);
47869  __Pyx_GIVEREF(__pyx_tuple__161);
47870  __pyx_codeobj__162 = (PyObject*)__Pyx_PyCode_New(13, 0, 16, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__161, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateGlobalJacobianFromElementJ, 3731, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__162)) __PYX_ERR(0, 3731, __pyx_L1_error)
47871 
47872  /* "cfemIntegrals.pyx":3763
47873  * <double*>elementJacobian.data,
47874  * <double*>globalJacobian.data)
47875  * def updateGlobalJacobianFromElementJacobian_eb_dense(np.ndarray elementNeighbors, # <<<<<<<<<<<<<<
47876  * int offset_r,
47877  * int stride_r,
47878  */
47879  __pyx_tuple__163 = PyTuple_Pack(18, __pyx_n_s_elementNeighbors, __pyx_n_s_offset_r, __pyx_n_s_stride_r, __pyx_n_s_offset_u, __pyx_n_s_stride_u, __pyx_n_s_nFreeVDOF_global, __pyx_n_s_nFreeDOF_element_r, __pyx_n_s_freeLocal_r, __pyx_n_s_freeGlobal_r, __pyx_n_s_nFreeDOF_element_u, __pyx_n_s_freeLocal_u, __pyx_n_s_freeGlobal_u, __pyx_n_s_elementJacobian_eb, __pyx_n_s_globalJacobian, __pyx_n_s_nElements_global, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nDOF_test_element, __pyx_n_s_nDOF_trial_element); if (unlikely(!__pyx_tuple__163)) __PYX_ERR(0, 3763, __pyx_L1_error)
47880  __Pyx_GOTREF(__pyx_tuple__163);
47881  __Pyx_GIVEREF(__pyx_tuple__163);
47882  __pyx_codeobj__164 = (PyObject*)__Pyx_PyCode_New(14, 0, 18, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__163, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateGlobalJacobianFromElementJ_2, 3763, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__164)) __PYX_ERR(0, 3763, __pyx_L1_error)
47883 
47884  /* "cfemIntegrals.pyx":3799
47885  * <double*>elementJacobian_eb.data,
47886  * <double*>globalJacobian.data)
47887  * def updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_dense(int offset_r, # <<<<<<<<<<<<<<
47888  * int stride_r,
47889  * int offset_u,
47890  */
47891  __pyx_tuple__165 = PyTuple_Pack(22, __pyx_n_s_offset_r, __pyx_n_s_stride_r, __pyx_n_s_offset_u, __pyx_n_s_stride_u, __pyx_n_s_nFreeVDOF_global, __pyx_n_s_interiorElementBoundaries, __pyx_n_s_elementBoundaryElements, __pyx_n_s_elementBoundaryLocalElementBound, __pyx_n_s_nFreeDOF_element_r, __pyx_n_s_freeLocal_r, __pyx_n_s_freeGlobal_r, __pyx_n_s_nFreeDOF_element_u, __pyx_n_s_freeLocal_u, __pyx_n_s_freeGlobal_u, __pyx_n_s_elementBoundaryFluxJacobian, __pyx_n_s_w_dS, __pyx_n_s_jac, __pyx_n_s_nInteriorElementBoundaries_globa, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nQuadraturePoints_elementBoundar, __pyx_n_s_nDOF_test_element, __pyx_n_s_nDOF_trial_element); if (unlikely(!__pyx_tuple__165)) __PYX_ERR(0, 3799, __pyx_L1_error)
47892  __Pyx_GOTREF(__pyx_tuple__165);
47893  __Pyx_GIVEREF(__pyx_tuple__165);
47894  __pyx_codeobj__166 = (PyObject*)__Pyx_PyCode_New(17, 0, 22, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__165, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateGlobalJacobianFromInterior_3, 3799, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__166)) __PYX_ERR(0, 3799, __pyx_L1_error)
47895 
47896  /* "cfemIntegrals.pyx":3843
47897  * <double*>w_dS.data,
47898  * <double*>jac.data)
47899  * def updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_dense(np.ndarray elementNeighbors, # <<<<<<<<<<<<<<
47900  * int nElements_global,
47901  * int offset_r,
47902  */
47903  __pyx_tuple__167 = PyTuple_Pack(24, __pyx_n_s_elementNeighbors, __pyx_n_s_nElements_global, __pyx_n_s_offset_r, __pyx_n_s_stride_r, __pyx_n_s_offset_u, __pyx_n_s_stride_u, __pyx_n_s_nFreeVDOF_global, __pyx_n_s_interiorElementBoundaries, __pyx_n_s_elementBoundaryElements, __pyx_n_s_elementBoundaryLocalElementBound, __pyx_n_s_nFreeDOF_element_r, __pyx_n_s_freeLocal_r, __pyx_n_s_freeGlobal_r, __pyx_n_s_nFreeDOF_element_u, __pyx_n_s_freeLocal_u, __pyx_n_s_freeGlobal_u, __pyx_n_s_elementBoundaryFluxJacobian_eb, __pyx_n_s_w_dS, __pyx_n_s_jac, __pyx_n_s_nInteriorElementBoundaries_globa, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nQuadraturePoints_elementBoundar, __pyx_n_s_nDOF_test_element, __pyx_n_s_nDOF_trial_element); if (unlikely(!__pyx_tuple__167)) __PYX_ERR(0, 3843, __pyx_L1_error)
47904  __Pyx_GOTREF(__pyx_tuple__167);
47905  __Pyx_GIVEREF(__pyx_tuple__167);
47906  __pyx_codeobj__168 = (PyObject*)__Pyx_PyCode_New(19, 0, 24, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__167, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateGlobalJacobianFromInterior_4, 3843, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__168)) __PYX_ERR(0, 3843, __pyx_L1_error)
47907 
47908  /* "cfemIntegrals.pyx":3891
47909  * <double*>w_dS.data,
47910  * <double*>jac.data)
47911  * def updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_dense(int offset_r, # <<<<<<<<<<<<<<
47912  * int stride_r,
47913  * int offset_u,
47914  */
47915  __pyx_tuple__169 = PyTuple_Pack(18, __pyx_n_s_offset_r, __pyx_n_s_stride_r, __pyx_n_s_offset_u, __pyx_n_s_stride_u, __pyx_n_s_nFreeVDOF_global, __pyx_n_s_exteriorElementBoundaries, __pyx_n_s_elementBoundaryElements, __pyx_n_s_elementBoundaryLocalElementBound, __pyx_n_s_nFreeDOF_element_r, __pyx_n_s_freeLocal_r, __pyx_n_s_freeGlobal_r, __pyx_n_s_nFreeDOF_element_u, __pyx_n_s_freeLocal_u, __pyx_n_s_freeGlobal_u, __pyx_n_s_elementBoundaryFluxJacobian, __pyx_n_s_w_dS, __pyx_n_s_jac, __pyx_n_s_nd); if (unlikely(!__pyx_tuple__169)) __PYX_ERR(0, 3891, __pyx_L1_error)
47916  __Pyx_GOTREF(__pyx_tuple__169);
47917  __Pyx_GIVEREF(__pyx_tuple__169);
47918  __pyx_codeobj__170 = (PyObject*)__Pyx_PyCode_New(17, 0, 18, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__169, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateGlobalJacobianFromExterior, 3891, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__170)) __PYX_ERR(0, 3891, __pyx_L1_error)
47919 
47920  /* "cfemIntegrals.pyx":3956
47921  * <double*> w_dS.data,
47922  * <double*> jac.data)
47923  * def updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_dense(np.ndarray elementNeighbors, # <<<<<<<<<<<<<<
47924  * int nElements_global,
47925  * int nExteriorElementBoundaries_global,
47926  */
47927  __pyx_tuple__171 = PyTuple_Pack(24, __pyx_n_s_elementNeighbors, __pyx_n_s_nElements_global, __pyx_n_s_nExteriorElementBoundaries_globa, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nQuadraturePoints_elementBoundar, __pyx_n_s_nDOF_test_element, __pyx_n_s_nDOF_trial_element, __pyx_n_s_offset_r, __pyx_n_s_stride_r, __pyx_n_s_offset_u, __pyx_n_s_stride_u, __pyx_n_s_nFreeVDOF_global, __pyx_n_s_exteriorElementBoundaries, __pyx_n_s_elementBoundaryElements, __pyx_n_s_elementBoundaryLocalElementBound, __pyx_n_s_nFreeDOF_element_r, __pyx_n_s_freeLocal_r, __pyx_n_s_freeGlobal_r, __pyx_n_s_nFreeDOF_element_u, __pyx_n_s_freeLocal_u, __pyx_n_s_freeGlobal_u, __pyx_n_s_elementBoundaryFluxJacobian_eb, __pyx_n_s_w_dS, __pyx_n_s_jac); if (unlikely(!__pyx_tuple__171)) __PYX_ERR(0, 3956, __pyx_L1_error)
47928  __Pyx_GOTREF(__pyx_tuple__171);
47929  __Pyx_GIVEREF(__pyx_tuple__171);
47930  __pyx_codeobj__172 = (PyObject*)__Pyx_PyCode_New(24, 0, 24, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__171, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateGlobalJacobianFromExterior_2, 3956, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__172)) __PYX_ERR(0, 3956, __pyx_L1_error)
47931 
47932  /* "cfemIntegrals.pyx":4030
47933  * <double*> w_dS.data,
47934  * <double*> jac.data)
47935  * def updateGlobalJacobianFromElementJacobian_CSR(np.ndarray nFreeDOF_element_r, # <<<<<<<<<<<<<<
47936  * np.ndarray freeLocal_r,
47937  * np.ndarray nFreeDOF_element_u,
47938  */
47939  __pyx_tuple__173 = PyTuple_Pack(14, __pyx_n_s_nFreeDOF_element_r, __pyx_n_s_freeLocal_r, __pyx_n_s_nFreeDOF_element_u, __pyx_n_s_freeLocal_u, __pyx_n_s_csrRowIndeces_ru, __pyx_n_s_csrColumnOffsets_ru, __pyx_n_s_elementJacobian, __pyx_n_s_globalJacobian, __pyx_n_s_rowptr, __pyx_n_s_colind, __pyx_n_s_globalJacobian_array, __pyx_n_s_nElements_global, __pyx_n_s_nDOF_test_element, __pyx_n_s_nDOF_trial_element); if (unlikely(!__pyx_tuple__173)) __PYX_ERR(0, 4030, __pyx_L1_error)
47940  __Pyx_GOTREF(__pyx_tuple__173);
47941  __Pyx_GIVEREF(__pyx_tuple__173);
47942  __pyx_codeobj__174 = (PyObject*)__Pyx_PyCode_New(8, 0, 14, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__173, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateGlobalJacobianFromElementJ_3, 4030, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__174)) __PYX_ERR(0, 4030, __pyx_L1_error)
47943 
47944  /* "cfemIntegrals.pyx":4054
47945  * <double*>elementJacobian.data,
47946  * <double*>globalJacobian_array.data)
47947  * def updateGlobalJacobianFromElementJacobian_eb_CSR(np.ndarray elementNeighbors, # <<<<<<<<<<<<<<
47948  * np.ndarray nFreeDOF_element_r,
47949  * np.ndarray freeLocal_r,
47950  */
47951  __pyx_tuple__175 = PyTuple_Pack(16, __pyx_n_s_elementNeighbors, __pyx_n_s_nFreeDOF_element_r, __pyx_n_s_freeLocal_r, __pyx_n_s_nFreeDOF_element_u, __pyx_n_s_freeLocal_u, __pyx_n_s_csrRowIndeces_ru, __pyx_n_s_csrColumnOffsets_eb_ru, __pyx_n_s_elementJacobian_eb, __pyx_n_s_globalJacobian, __pyx_n_s_rowptr, __pyx_n_s_colind, __pyx_n_s_globalJacobian_array, __pyx_n_s_nElements_global, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nDOF_test_element, __pyx_n_s_nDOF_trial_element); if (unlikely(!__pyx_tuple__175)) __PYX_ERR(0, 4054, __pyx_L1_error)
47952  __Pyx_GOTREF(__pyx_tuple__175);
47953  __Pyx_GIVEREF(__pyx_tuple__175);
47954  __pyx_codeobj__176 = (PyObject*)__Pyx_PyCode_New(9, 0, 16, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__175, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateGlobalJacobianFromElementJ_4, 4054, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__176)) __PYX_ERR(0, 4054, __pyx_L1_error)
47955 
47956  /* "cfemIntegrals.pyx":4082
47957  * <double*>elementJacobian_eb.data,
47958  * <double*>globalJacobian_array.data)
47959  * def updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_CSR(np.ndarray interiorElementBoundaries, # <<<<<<<<<<<<<<
47960  * np.ndarray elementBoundaryElements,
47961  * np.ndarray elementBoundaryLocalElementBoundaries,
47962  */
47963  __pyx_tuple__177 = PyTuple_Pack(20, __pyx_n_s_interiorElementBoundaries, __pyx_n_s_elementBoundaryElements, __pyx_n_s_elementBoundaryLocalElementBound, __pyx_n_s_nFreeDOF_element_r, __pyx_n_s_freeLocal_r, __pyx_n_s_nFreeDOF_element_u, __pyx_n_s_freeLocal_u, __pyx_n_s_csrRowIndeces_ru, __pyx_n_s_csrColumnOffsets_eb_ru, __pyx_n_s_elementBoundaryFluxJacobian, __pyx_n_s_w_dS, __pyx_n_s_jac, __pyx_n_s_rowptr, __pyx_n_s_colind, __pyx_n_s_jac_array, __pyx_n_s_nInteriorElementBoundaries_globa, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nQuadraturePoints_elementBoundar, __pyx_n_s_nDOF_test_element, __pyx_n_s_nDOF_trial_element); if (unlikely(!__pyx_tuple__177)) __PYX_ERR(0, 4082, __pyx_L1_error)
47964  __Pyx_GOTREF(__pyx_tuple__177);
47965  __Pyx_GIVEREF(__pyx_tuple__177);
47966  __pyx_codeobj__178 = (PyObject*)__Pyx_PyCode_New(12, 0, 20, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__177, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateGlobalJacobianFromInterior_5, 4082, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__178)) __PYX_ERR(0, 4082, __pyx_L1_error)
47967 
47968  /* "cfemIntegrals.pyx":4118
47969  * <double*>w_dS.data,
47970  * <double*>jac_array.data)
47971  * def updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_CSR(np.ndarray exteriorElementBoundaries, # <<<<<<<<<<<<<<
47972  * np.ndarray elementBoundaryElements,
47973  * np.ndarray elementBoundaryLocalElementBoundaries,
47974  */
47975  __pyx_tuple__179 = PyTuple_Pack(16, __pyx_n_s_exteriorElementBoundaries, __pyx_n_s_elementBoundaryElements, __pyx_n_s_elementBoundaryLocalElementBound, __pyx_n_s_nFreeDOF_element_r, __pyx_n_s_freeLocal_r, __pyx_n_s_nFreeDOF_element_u, __pyx_n_s_freeLocal_u, __pyx_n_s_csrRowIndeces_ru, __pyx_n_s_csrColumnOffsets_eb_ru, __pyx_n_s_elementBoundaryFluxJacobian, __pyx_n_s_w_dS, __pyx_n_s_jac, __pyx_n_s_rowptr, __pyx_n_s_colind, __pyx_n_s_jac_array, __pyx_n_s_nd); if (unlikely(!__pyx_tuple__179)) __PYX_ERR(0, 4118, __pyx_L1_error)
47976  __Pyx_GOTREF(__pyx_tuple__179);
47977  __Pyx_GIVEREF(__pyx_tuple__179);
47978  __pyx_codeobj__180 = (PyObject*)__Pyx_PyCode_New(12, 0, 16, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__179, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateGlobalJacobianFromExterior_3, 4118, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__180)) __PYX_ERR(0, 4118, __pyx_L1_error)
47979 
47980  /* "cfemIntegrals.pyx":4170
47981  * <double*> w_dS.data,
47982  * <double*> jac_array.data)
47983  * def updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_CSR(np.ndarray elementNeighbors, # <<<<<<<<<<<<<<
47984  * np.ndarray interiorElementBoundaries,
47985  * np.ndarray elementBoundaryElements,
47986  */
47987  __pyx_tuple__181 = PyTuple_Pack(21, __pyx_n_s_elementNeighbors, __pyx_n_s_interiorElementBoundaries, __pyx_n_s_elementBoundaryElements, __pyx_n_s_elementBoundaryLocalElementBound, __pyx_n_s_nFreeDOF_element_r, __pyx_n_s_freeLocal_r, __pyx_n_s_nFreeDOF_element_u, __pyx_n_s_freeLocal_u, __pyx_n_s_csrRowIndeces_ru, __pyx_n_s_csrColumnOffsets_eb_eNebN_ru, __pyx_n_s_elementBoundaryFluxJacobian_eb, __pyx_n_s_w_dS, __pyx_n_s_jac, __pyx_n_s_rowptr, __pyx_n_s_colind, __pyx_n_s_jac_array, __pyx_n_s_nInteriorElementBoundaries_globa, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nQuadraturePoints_elementBoundar, __pyx_n_s_nDOF_test_element, __pyx_n_s_nDOF_trial_element); if (unlikely(!__pyx_tuple__181)) __PYX_ERR(0, 4170, __pyx_L1_error)
47988  __Pyx_GOTREF(__pyx_tuple__181);
47989  __Pyx_GIVEREF(__pyx_tuple__181);
47990  __pyx_codeobj__182 = (PyObject*)__Pyx_PyCode_New(13, 0, 21, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__181, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateGlobalJacobianFromInterior_6, 4170, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__182)) __PYX_ERR(0, 4170, __pyx_L1_error)
47991 
47992  /* "cfemIntegrals.pyx":4208
47993  * <double*>w_dS.data,
47994  * <double*>jac_array.data)
47995  * def updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_CSR(np.ndarray elementNeighbors, # <<<<<<<<<<<<<<
47996  * np.ndarray exteriorElementBoundaries,
47997  * np.ndarray elementBoundaryElements,
47998  */
47999  __pyx_tuple__183 = PyTuple_Pack(16, __pyx_n_s_elementNeighbors, __pyx_n_s_exteriorElementBoundaries, __pyx_n_s_elementBoundaryElements, __pyx_n_s_elementBoundaryLocalElementBound, __pyx_n_s_nFreeDOF_element_r, __pyx_n_s_freeLocal_r, __pyx_n_s_nFreeDOF_element_u, __pyx_n_s_freeLocal_u, __pyx_n_s_csrRowIndeces_ru, __pyx_n_s_csrColumnOffsets_eb_eNebN_ru, __pyx_n_s_elementBoundaryFluxJacobian_eb, __pyx_n_s_w_dS, __pyx_n_s_jac, __pyx_n_s_rowptr, __pyx_n_s_colind, __pyx_n_s_jac_array); if (unlikely(!__pyx_tuple__183)) __PYX_ERR(0, 4208, __pyx_L1_error)
48000  __Pyx_GOTREF(__pyx_tuple__183);
48001  __Pyx_GIVEREF(__pyx_tuple__183);
48002  __pyx_codeobj__184 = (PyObject*)__Pyx_PyCode_New(13, 0, 16, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__183, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateGlobalJacobianFromExterior_4, 4208, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__184)) __PYX_ERR(0, 4208, __pyx_L1_error)
48003 
48004  /* "cfemIntegrals.pyx":4261
48005  * <double*> w_dS.data,
48006  * <double*> jac_array.data)
48007  * def calculateWeightedShape(np.ndarray dVR, # <<<<<<<<<<<<<<
48008  * np.ndarray abs_det_jac,
48009  * np.ndarray w,
48010  */
48011  __pyx_tuple__185 = PyTuple_Pack(7, __pyx_n_s_dVR, __pyx_n_s_abs_det_jac, __pyx_n_s_w, __pyx_n_s_w_dV, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_test_element); if (unlikely(!__pyx_tuple__185)) __PYX_ERR(0, 4261, __pyx_L1_error)
48012  __Pyx_GOTREF(__pyx_tuple__185);
48013  __Pyx_GIVEREF(__pyx_tuple__185);
48014  __pyx_codeobj__186 = (PyObject*)__Pyx_PyCode_New(4, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__185, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_calculateWeightedShape, 4261, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__186)) __PYX_ERR(0, 4261, __pyx_L1_error)
48015 
48016  /* "cfemIntegrals.pyx":4275
48017  * <double*>w.data,
48018  * <double*>w_dV.data)
48019  * def calculateWeightedShapeGradients(np.ndarray dVR, # <<<<<<<<<<<<<<
48020  * np.ndarray abs_det_jac,
48021  * np.ndarray grad_w,
48022  */
48023  __pyx_tuple__187 = PyTuple_Pack(8, __pyx_n_s_dVR, __pyx_n_s_abs_det_jac, __pyx_n_s_grad_w, __pyx_n_s_grad_w_dV, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_test_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__187)) __PYX_ERR(0, 4275, __pyx_L1_error)
48024  __Pyx_GOTREF(__pyx_tuple__187);
48025  __Pyx_GIVEREF(__pyx_tuple__187);
48026  __pyx_codeobj__188 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__187, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_calculateWeightedShapeGradients, 4275, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__188)) __PYX_ERR(0, 4275, __pyx_L1_error)
48027 
48028  /* "cfemIntegrals.pyx":4291
48029  * <double*>grad_w.data,
48030  * <double*>grad_w_dV.data)
48031  * def calculateShape_X_weightedShape(np.ndarray v, # <<<<<<<<<<<<<<
48032  * np.ndarray w_dV,
48033  * np.ndarray v_X_w_dV):
48034  */
48035  __pyx_tuple__189 = PyTuple_Pack(7, __pyx_n_s_v, __pyx_n_s_w_dV, __pyx_n_s_v_X_w_dV, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_trial_element, __pyx_n_s_nDOF_test_element); if (unlikely(!__pyx_tuple__189)) __PYX_ERR(0, 4291, __pyx_L1_error)
48036  __Pyx_GOTREF(__pyx_tuple__189);
48037  __Pyx_GIVEREF(__pyx_tuple__189);
48038  __pyx_codeobj__190 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__189, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_calculateShape_X_weightedShape, 4291, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__190)) __PYX_ERR(0, 4291, __pyx_L1_error)
48039 
48040  /* "cfemIntegrals.pyx":4305
48041  * <double*>w_dV.data,
48042  * <double*>v_X_w_dV.data)
48043  * def calculateShape_X_weightedGradShape(np.ndarray v, # <<<<<<<<<<<<<<
48044  * np.ndarray grad_w_dV,
48045  * np.ndarray v_X_grad_w_dV):
48046  */
48047  __pyx_tuple__191 = PyTuple_Pack(8, __pyx_n_s_v, __pyx_n_s_grad_w_dV, __pyx_n_s_v_X_grad_w_dV, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_trial_element, __pyx_n_s_nDOF_test_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__191)) __PYX_ERR(0, 4305, __pyx_L1_error)
48048  __Pyx_GOTREF(__pyx_tuple__191);
48049  __Pyx_GIVEREF(__pyx_tuple__191);
48050  __pyx_codeobj__192 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__191, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_calculateShape_X_weightedGradSha, 4305, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__192)) __PYX_ERR(0, 4305, __pyx_L1_error)
48051 
48052  /* "cfemIntegrals.pyx":4321
48053  * <double*>grad_w_dV.data,
48054  * <double*>v_X_grad_w_dV.data)
48055  * def calculateGradShape_X_weightedShape(np.ndarray grad_v, # <<<<<<<<<<<<<<
48056  * np.ndarray w_dV,
48057  * np.ndarray grad_v_X_w_dV):
48058  */
48059  __pyx_tuple__193 = PyTuple_Pack(8, __pyx_n_s_grad_v, __pyx_n_s_w_dV, __pyx_n_s_grad_v_X_w_dV, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_trial_element, __pyx_n_s_nDOF_test_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__193)) __PYX_ERR(0, 4321, __pyx_L1_error)
48060  __Pyx_GOTREF(__pyx_tuple__193);
48061  __Pyx_GIVEREF(__pyx_tuple__193);
48062  __pyx_codeobj__194 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__193, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_calculateGradShape_X_weightedSha, 4321, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__194)) __PYX_ERR(0, 4321, __pyx_L1_error)
48063 
48064  /* "cfemIntegrals.pyx":4337
48065  * <double*>w_dV.data,
48066  * <double*>grad_v_X_w_dV.data)
48067  * def calculateGradShape_X_weightedGradShape(np.ndarray grad_v, # <<<<<<<<<<<<<<
48068  * np.ndarray grad_w_dV,
48069  * np.ndarray grad_v_X_grad_w_dV):
48070  */
48071  __pyx_tuple__195 = PyTuple_Pack(8, __pyx_n_s_grad_v, __pyx_n_s_grad_w_dV, __pyx_n_s_grad_v_X_grad_w_dV, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_trial_element, __pyx_n_s_nDOF_test_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__195)) __PYX_ERR(0, 4337, __pyx_L1_error)
48072  __Pyx_GOTREF(__pyx_tuple__195);
48073  __Pyx_GIVEREF(__pyx_tuple__195);
48074  __pyx_codeobj__196 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__195, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_calculateGradShape_X_weightedGra, 4337, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__196)) __PYX_ERR(0, 4337, __pyx_L1_error)
48075 
48076  /* "cfemIntegrals.pyx":4353
48077  * <double*>grad_w_dV.data,
48078  * <double*>grad_v_X_grad_w_dV.data)
48079  * def calculateWeightedShapeTrace(np.ndarray dSR, # <<<<<<<<<<<<<<
48080  * np.ndarray sqrt_det_g,
48081  * np.ndarray w,
48082  */
48083  __pyx_tuple__197 = PyTuple_Pack(8, __pyx_n_s_dSR, __pyx_n_s_sqrt_det_g, __pyx_n_s_w, __pyx_n_s_w_dS, __pyx_n_s_nElements_global, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nElementBoundaryQuadraturePoints, __pyx_n_s_nDOF_test_element); if (unlikely(!__pyx_tuple__197)) __PYX_ERR(0, 4353, __pyx_L1_error)
48084  __Pyx_GOTREF(__pyx_tuple__197);
48085  __Pyx_GIVEREF(__pyx_tuple__197);
48086  __pyx_codeobj__198 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__197, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_calculateWeightedShapeTrace, 4353, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__198)) __PYX_ERR(0, 4353, __pyx_L1_error)
48087 
48088  /* "cfemIntegrals.pyx":4369
48089  * <double*>w.data,
48090  * <double*>w_dS.data)
48091  * def calculateShape_X_weightedShapeTrace(np.ndarray v, # <<<<<<<<<<<<<<
48092  * np.ndarray w_dS,
48093  * np.ndarray v_X_w_dS):
48094  */
48095  __pyx_tuple__199 = PyTuple_Pack(8, __pyx_n_s_v, __pyx_n_s_w_dS, __pyx_n_s_v_X_w_dS, __pyx_n_s_nElements_global, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nElementBoundaryQuadraturePoints, __pyx_n_s_nDOF_trial_element, __pyx_n_s_nDOF_test_element); if (unlikely(!__pyx_tuple__199)) __PYX_ERR(0, 4369, __pyx_L1_error)
48096  __Pyx_GOTREF(__pyx_tuple__199);
48097  __Pyx_GIVEREF(__pyx_tuple__199);
48098  __pyx_codeobj__200 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__199, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_calculateShape_X_weightedShapeTr, 4369, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__200)) __PYX_ERR(0, 4369, __pyx_L1_error)
48099 
48100  /* "cfemIntegrals.pyx":4385
48101  * <double*>w_dS.data,
48102  * <double*>v_X_w_dS.data)
48103  * def calculateGradShape_X_weightedShapeTrace(np.ndarray grad_v, # <<<<<<<<<<<<<<
48104  * np.ndarray w_dS,
48105  * np.ndarray grad_v_X_w_dS):
48106  */
48107  __pyx_tuple__201 = PyTuple_Pack(9, __pyx_n_s_grad_v, __pyx_n_s_w_dS, __pyx_n_s_grad_v_X_w_dS, __pyx_n_s_nElements_global, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nElementBoundaryQuadraturePoints, __pyx_n_s_nDOF_trial_element, __pyx_n_s_nDOF_test_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__201)) __PYX_ERR(0, 4385, __pyx_L1_error)
48108  __Pyx_GOTREF(__pyx_tuple__201);
48109  __Pyx_GIVEREF(__pyx_tuple__201);
48110  __pyx_codeobj__202 = (PyObject*)__Pyx_PyCode_New(3, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__201, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_calculateGradShape_X_weightedSha_2, 4385, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__202)) __PYX_ERR(0, 4385, __pyx_L1_error)
48111 
48112  /* "cfemIntegrals.pyx":4403
48113  * <double*>w_dS.data,
48114  * <double*>grad_v_X_w_dS.data)
48115  * def calculateIntegrationWeights(np.ndarray abs_det_J, # <<<<<<<<<<<<<<
48116  * np.ndarray referenceWeights,
48117  * np.ndarray weights):
48118  */
48119  __pyx_tuple__203 = PyTuple_Pack(5, __pyx_n_s_abs_det_J, __pyx_n_s_referenceWeights, __pyx_n_s_weights, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element); if (unlikely(!__pyx_tuple__203)) __PYX_ERR(0, 4403, __pyx_L1_error)
48120  __Pyx_GOTREF(__pyx_tuple__203);
48121  __Pyx_GIVEREF(__pyx_tuple__203);
48122  __pyx_codeobj__204 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__203, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_calculateIntegrationWeights, 4403, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__204)) __PYX_ERR(0, 4403, __pyx_L1_error)
48123 
48124  /* "cfemIntegrals.pyx":4413
48125  * <double*>referenceWeights.data,
48126  * <double*>weights.data)
48127  * def calculateElementBoundaryIntegrationWeights(np.ndarray sqrt_det_g, # <<<<<<<<<<<<<<
48128  * np.ndarray referenceWeights,
48129  * np.ndarray weights):
48130  */
48131  __pyx_tuple__205 = PyTuple_Pack(6, __pyx_n_s_sqrt_det_g, __pyx_n_s_referenceWeights, __pyx_n_s_weights, __pyx_n_s_nElements_global, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nQuadraturePoints_elementBoundar); if (unlikely(!__pyx_tuple__205)) __PYX_ERR(0, 4413, __pyx_L1_error)
48132  __Pyx_GOTREF(__pyx_tuple__205);
48133  __Pyx_GIVEREF(__pyx_tuple__205);
48134  __pyx_codeobj__206 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__205, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_calculateElementBoundaryIntegrat, 4413, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__206)) __PYX_ERR(0, 4413, __pyx_L1_error)
48135 
48136  /* "cfemIntegrals.pyx":4425
48137  * <double*>referenceWeights.data,
48138  * <double*>weights.data)
48139  * def calculateFiniteElementFunctionValues(np.ndarray l2g, # <<<<<<<<<<<<<<
48140  * np.ndarray dof,
48141  * np.ndarray v,
48142  */
48143  __pyx_tuple__207 = PyTuple_Pack(9, __pyx_n_s_l2g, __pyx_n_s_dof, __pyx_n_s_v, __pyx_n_s_u, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_trial_element, __pyx_n_s_nd, __pyx_n_s_nComponents); if (unlikely(!__pyx_tuple__207)) __PYX_ERR(0, 4425, __pyx_L1_error)
48144  __Pyx_GOTREF(__pyx_tuple__207);
48145  __Pyx_GIVEREF(__pyx_tuple__207);
48146  __pyx_codeobj__208 = (PyObject*)__Pyx_PyCode_New(4, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__207, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_calculateFiniteElementFunctionVa, 4425, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__208)) __PYX_ERR(0, 4425, __pyx_L1_error)
48147 
48148  /* "cfemIntegrals.pyx":4446
48149  * <double*>v.data,
48150  * <double*>u.data)
48151  * def calculateFiniteElementFunctionGradientValues(np.ndarray l2g, # <<<<<<<<<<<<<<
48152  * np.ndarray dof,
48153  * np.ndarray grad_v,
48154  */
48155  __pyx_tuple__209 = PyTuple_Pack(10, __pyx_n_s_l2g, __pyx_n_s_dof, __pyx_n_s_grad_v, __pyx_n_s_grad_u, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_trial_element, __pyx_n_s_nd, __pyx_n_s_nComponents, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__209)) __PYX_ERR(0, 4446, __pyx_L1_error)
48156  __Pyx_GOTREF(__pyx_tuple__209);
48157  __Pyx_GIVEREF(__pyx_tuple__209);
48158  __pyx_codeobj__210 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__209, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_calculateFiniteElementFunctionGr, 4446, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__210)) __PYX_ERR(0, 4446, __pyx_L1_error)
48159 
48160  /* "cfemIntegrals.pyx":4470
48161  * <double*>grad_v.data,
48162  * <double*>grad_u.data)
48163  * def calculateFiniteElementFunctionGradientTensorValues(np.ndarray l2g, # <<<<<<<<<<<<<<
48164  * np.ndarray dof,
48165  * np.ndarray grad_v_X_grad_w_dV,
48166  */
48167  __pyx_tuple__211 = PyTuple_Pack(10, __pyx_n_s_l2g, __pyx_n_s_dof, __pyx_n_s_grad_v_X_grad_w_dV, __pyx_n_s_grad_u_X_grad_w_dV, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_trial_element, __pyx_n_s_nDOF_test_element, __pyx_n_s_nComponents, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__211)) __PYX_ERR(0, 4470, __pyx_L1_error)
48168  __Pyx_GOTREF(__pyx_tuple__211);
48169  __Pyx_GIVEREF(__pyx_tuple__211);
48170  __pyx_codeobj__212 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__211, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_calculateFiniteElementFunctionGr_2, 4470, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__212)) __PYX_ERR(0, 4470, __pyx_L1_error)
48171 
48172  /* "cfemIntegrals.pyx":4496
48173  * <double*>grad_v_X_grad_w_dV.data,
48174  * <double*>grad_u_X_grad_w_dV.data)
48175  * def calculateFiniteElementFunctionValuesTrace(np.ndarray l2g, # <<<<<<<<<<<<<<
48176  * np.ndarray dof,
48177  * np.ndarray v,
48178  */
48179  __pyx_tuple__213 = PyTuple_Pack(10, __pyx_n_s_l2g, __pyx_n_s_dof, __pyx_n_s_v, __pyx_n_s_u, __pyx_n_s_nElements_global, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nQuadraturePoints_elementBoundar, __pyx_n_s_nDOF_trial_element, __pyx_n_s_nComponents, __pyx_n_s_nd); if (unlikely(!__pyx_tuple__213)) __PYX_ERR(0, 4496, __pyx_L1_error)
48180  __Pyx_GOTREF(__pyx_tuple__213);
48181  __Pyx_GIVEREF(__pyx_tuple__213);
48182  __pyx_codeobj__214 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__213, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_calculateFiniteElementFunctionVa_2, 4496, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__214)) __PYX_ERR(0, 4496, __pyx_L1_error)
48183 
48184  /* "cfemIntegrals.pyx":4519
48185  * <double*>v.data,
48186  * <double*>u.data)
48187  * def calculateFiniteElementFunctionGradientValuesTrace(np.ndarray l2g, # <<<<<<<<<<<<<<
48188  * np.ndarray dof,
48189  * np.ndarray grad_v,
48190  */
48191  __pyx_tuple__215 = PyTuple_Pack(11, __pyx_n_s_l2g, __pyx_n_s_dof, __pyx_n_s_grad_v, __pyx_n_s_grad_u, __pyx_n_s_nElements_global, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nQuadraturePoints_elementBoundar, __pyx_n_s_nDOF_trial_element, __pyx_n_s_nComponents, __pyx_n_s_nSpace, __pyx_n_s_nd); if (unlikely(!__pyx_tuple__215)) __PYX_ERR(0, 4519, __pyx_L1_error)
48192  __Pyx_GOTREF(__pyx_tuple__215);
48193  __Pyx_GIVEREF(__pyx_tuple__215);
48194  __pyx_codeobj__216 = (PyObject*)__Pyx_PyCode_New(4, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__215, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_calculateFiniteElementFunctionGr_3, 4519, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__216)) __PYX_ERR(0, 4519, __pyx_L1_error)
48195 
48196  /* "cfemIntegrals.pyx":4546
48197  * <double*>grad_v.data,
48198  * <double*>grad_u.data)
48199  * def calculateFlowVelocity(np.ndarray f, # <<<<<<<<<<<<<<
48200  * np.ndarray a,
48201  * np.ndarray grad_phi,
48202  */
48203  __pyx_tuple__217 = PyTuple_Pack(7, __pyx_n_s_f, __pyx_n_s_a, __pyx_n_s_grad_phi, __pyx_n_s_v, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__217)) __PYX_ERR(0, 4546, __pyx_L1_error)
48204  __Pyx_GOTREF(__pyx_tuple__217);
48205  __Pyx_GIVEREF(__pyx_tuple__217);
48206  __pyx_codeobj__218 = (PyObject*)__Pyx_PyCode_New(4, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__217, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_calculateFlowVelocity, 4546, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__218)) __PYX_ERR(0, 4546, __pyx_L1_error)
48207 
48208  /* "cfemIntegrals.pyx":4560
48209  * <double*>grad_phi.data,
48210  * <double*>v.data)
48211  * def updateAddJacobian_CSR(int jacIndex, # <<<<<<<<<<<<<<
48212  * double val,
48213  * jac):
48214  */
48215  __pyx_tuple__219 = PyTuple_Pack(6, __pyx_n_s_jacIndex, __pyx_n_s_val, __pyx_n_s_jac, __pyx_n_s_rowptr, __pyx_n_s_colind, __pyx_n_s_jac_array); if (unlikely(!__pyx_tuple__219)) __PYX_ERR(0, 4560, __pyx_L1_error)
48216  __Pyx_GOTREF(__pyx_tuple__219);
48217  __Pyx_GIVEREF(__pyx_tuple__219);
48218  __pyx_codeobj__220 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__219, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateAddJacobian_CSR, 4560, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__220)) __PYX_ERR(0, 4560, __pyx_L1_error)
48219 
48220  /* "cfemIntegrals.pyx":4568
48221  * val,
48222  * <double*>jac_array.data)
48223  * def zeroJacobian_CSR(int nNonzeros, # <<<<<<<<<<<<<<
48224  * jac):
48225  * cdef np.ndarray rowptr, colind, jac_array
48226  */
48227  __pyx_tuple__221 = PyTuple_Pack(5, __pyx_n_s_nNonzeros, __pyx_n_s_jac, __pyx_n_s_rowptr, __pyx_n_s_colind, __pyx_n_s_jac_array); if (unlikely(!__pyx_tuple__221)) __PYX_ERR(0, 4568, __pyx_L1_error)
48228  __Pyx_GOTREF(__pyx_tuple__221);
48229  __Pyx_GIVEREF(__pyx_tuple__221);
48230  __pyx_codeobj__222 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__221, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_zeroJacobian_CSR, 4568, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__222)) __PYX_ERR(0, 4568, __pyx_L1_error)
48231 
48232  /* "cfemIntegrals.pyx":4574
48233  * czeroJacobian_CSR(nNonzeros,
48234  * <double*>jac_array.data)
48235  * def calculateInteriorElementBoundaryVelocities(int nInteriorElementBoundaries_global, # <<<<<<<<<<<<<<
48236  * int nElementBoundaries_element,
48237  * int nQuadraturePoints_elementBoundary,
48238  */
48239  __pyx_tuple__223 = PyTuple_Pack(15, __pyx_n_s_nInteriorElementBoundaries_globa, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nQuadraturePoints_elementBoundar, __pyx_n_s_nSpace, __pyx_n_s_interiorElementBoundaries, __pyx_n_s_elementBoundaryElements, __pyx_n_s_elementBoundaryLocalElementBound, __pyx_n_s_m, __pyx_n_s_a, __pyx_n_s_grad_phi, __pyx_n_s_f, __pyx_n_s_vAverage, __pyx_n_s_vJump, __pyx_n_s_mAverage, __pyx_n_s_mJump); if (unlikely(!__pyx_tuple__223)) __PYX_ERR(0, 4574, __pyx_L1_error)
48240  __Pyx_GOTREF(__pyx_tuple__223);
48241  __Pyx_GIVEREF(__pyx_tuple__223);
48242  __pyx_codeobj__224 = (PyObject*)__Pyx_PyCode_New(15, 0, 15, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__223, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_calculateInteriorElementBoundary, 4574, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__224)) __PYX_ERR(0, 4574, __pyx_L1_error)
48243 
48244  /* "cfemIntegrals.pyx":4604
48245  * <double*>mAverage.data,
48246  * <double*>mJump.data)
48247  * def calculateExteriorElementBoundaryVelocities(int nExteriorElementBoundaries_global, # <<<<<<<<<<<<<<
48248  * int nElementBoundaries_element,
48249  * int nQuadraturePoints_elementBoundary,
48250  */
48251  __pyx_tuple__225 = PyTuple_Pack(15, __pyx_n_s_nExteriorElementBoundaries_globa, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nQuadraturePoints_elementBoundar, __pyx_n_s_nSpace, __pyx_n_s_exteriorElementBoundaries, __pyx_n_s_elementBoundaryElements, __pyx_n_s_elementBoundaryLocalElementBound, __pyx_n_s_m, __pyx_n_s_a, __pyx_n_s_grad_phi, __pyx_n_s_f, __pyx_n_s_vAverage, __pyx_n_s_vJump, __pyx_n_s_mAverage, __pyx_n_s_mJump); if (unlikely(!__pyx_tuple__225)) __PYX_ERR(0, 4604, __pyx_L1_error)
48252  __Pyx_GOTREF(__pyx_tuple__225);
48253  __Pyx_GIVEREF(__pyx_tuple__225);
48254  __pyx_codeobj__226 = (PyObject*)__Pyx_PyCode_New(15, 0, 15, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__225, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_calculateExteriorElementBoundary_3, 4604, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__226)) __PYX_ERR(0, 4604, __pyx_L1_error)
48255 
48256  /* "cfemIntegrals.pyx":4634
48257  * <double*>mAverage.data,
48258  * <double*>mJump.data)
48259  * def calculateConservationResidualPWL(int nElements_global, # <<<<<<<<<<<<<<
48260  * int nInteriorElementBoundaries_global,
48261  * int nExteriorElementBoundaries_global,
48262  */
48263  __pyx_tuple__227 = PyTuple_Pack(26, __pyx_n_s_nElements_global, __pyx_n_s_nInteriorElementBoundaries_globa, __pyx_n_s_nExteriorElementBoundaries_globa, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nQuadraturePoints_elementBoundar, __pyx_n_s_nNodes_element, __pyx_n_s_nSpace, __pyx_n_s_interiorElementBoundaries, __pyx_n_s_exteriorElementBoundaries, __pyx_n_s_elementBoundaryElements, __pyx_n_s_elementBoundaryLocalElementBound, __pyx_n_s_elementNodes, __pyx_n_s_nodeStarElements, __pyx_n_s_nodeStarElementNeighbors, __pyx_n_s_nodeStarOffsets, __pyx_n_s_nElements_node, __pyx_n_s_elementResidual, __pyx_n_s_vAverage, __pyx_n_s_starU, __pyx_n_s_dX, __pyx_n_s_w, __pyx_n_s_normal, __pyx_n_s_conservationResidual, __pyx_n_s_starR, __pyx_n_s_vConservative, __pyx_n_s_vConservative_element); if (unlikely(!__pyx_tuple__227)) __PYX_ERR(0, 4634, __pyx_L1_error)
48264  __Pyx_GOTREF(__pyx_tuple__227);
48265  __Pyx_GIVEREF(__pyx_tuple__227);
48266  __pyx_codeobj__228 = (PyObject*)__Pyx_PyCode_New(26, 0, 26, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__227, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_calculateConservationResidualPWL, 4634, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__228)) __PYX_ERR(0, 4634, __pyx_L1_error)
48267 
48268  /* "cfemIntegrals.pyx":4686
48269  * <double*>vConservative.data,
48270  * <double*>vConservative_element.data)
48271  * def calculateConservationJacobianPWL(int nNodes_global, # <<<<<<<<<<<<<<
48272  * int nNodes_internal,
48273  * int nElements_global,
48274  */
48275  __pyx_tuple__229 = PyTuple_Pack(23, __pyx_n_s_nNodes_global, __pyx_n_s_nNodes_internal, __pyx_n_s_nElements_global, __pyx_n_s_nInteriorElementBoundaries_globa, __pyx_n_s_nExteriorElementBoundaries_globa, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nQuadraturePoints_elementBoundar, __pyx_n_s_nNodes_element, __pyx_n_s_nSpace, __pyx_n_s_interiorElementBoundaries, __pyx_n_s_exteriorElementBoundaries, __pyx_n_s_elementBoundaryElements, __pyx_n_s_elementBoundaryLocalElementBound, __pyx_n_s_elementNodes, __pyx_n_s_nodeStarElements, __pyx_n_s_nodeStarElementNeighbors, __pyx_n_s_nodeStarOffsets, __pyx_n_s_nodeStarJacobianOffsets, __pyx_n_s_nElements_node, __pyx_n_s_internalNodes, __pyx_n_s_w, __pyx_n_s_normal, __pyx_n_s_starJacobian); if (unlikely(!__pyx_tuple__229)) __PYX_ERR(0, 4686, __pyx_L1_error)
48276  __Pyx_GOTREF(__pyx_tuple__229);
48277  __Pyx_GIVEREF(__pyx_tuple__229);
48278  __pyx_codeobj__230 = (PyObject*)__Pyx_PyCode_New(23, 0, 23, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__229, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_calculateConservationJacobianPWL, 4686, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__230)) __PYX_ERR(0, 4686, __pyx_L1_error)
48279 
48280  /* "cfemIntegrals.pyx":4732
48281  * <double*>normal.data,
48282  * <double*>starJacobian.data)
48283  * def calculateConservationFluxPWL(int nNodes_global, # <<<<<<<<<<<<<<
48284  * int nNodes_internal,
48285  * np.ndarray nElements_node,
48286  */
48287  __pyx_tuple__231 = PyTuple_Pack(9, __pyx_n_s_nNodes_global, __pyx_n_s_nNodes_internal, __pyx_n_s_nElements_node, __pyx_n_s_nodeStarOffsets, __pyx_n_s_nodeStarJacobianOffsets, __pyx_n_s_internalNodes, __pyx_n_s_starR, __pyx_n_s_starJ, __pyx_n_s_starU); if (unlikely(!__pyx_tuple__231)) __PYX_ERR(0, 4732, __pyx_L1_error)
48288  __Pyx_GOTREF(__pyx_tuple__231);
48289  __Pyx_GIVEREF(__pyx_tuple__231);
48290  __pyx_codeobj__232 = (PyObject*)__Pyx_PyCode_New(9, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__231, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_calculateConservationFluxPWL, 4732, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__232)) __PYX_ERR(0, 4732, __pyx_L1_error)
48291 
48292  /* "cfemIntegrals.pyx":4750
48293  * <double*>starJ.data,
48294  * <double*>starU.data)
48295  * def setExteriorGlobalElementBoundaryVelocityValues(int updateFluxValues, # <<<<<<<<<<<<<<
48296  * int nExteriorElementBoundaries_global,
48297  * int nQuadraturePoints_elementBoundary,
48298  */
48299  __pyx_tuple__233 = PyTuple_Pack(10, __pyx_n_s_updateFluxValues, __pyx_n_s_nExteriorElementBoundaries_globa, __pyx_n_s_nQuadraturePoints_elementBoundar, __pyx_n_s_nSpace, __pyx_n_s_exteriorElementBoundaries, __pyx_n_s_elementBoundaryElements, __pyx_n_s_elementBoundaryLocalElementBound, __pyx_n_s_n, __pyx_n_s_vn_in, __pyx_n_s_v_out); if (unlikely(!__pyx_tuple__233)) __PYX_ERR(0, 4750, __pyx_L1_error)
48300  __Pyx_GOTREF(__pyx_tuple__233);
48301  __Pyx_GIVEREF(__pyx_tuple__233);
48302  __pyx_codeobj__234 = (PyObject*)__Pyx_PyCode_New(10, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__233, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_setExteriorGlobalElementBoundary, 4750, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__234)) __PYX_ERR(0, 4750, __pyx_L1_error)
48303 
48304  /* "cfemIntegrals.pyx":4770
48305  * <double*>vn_in.data,
48306  * <double*>v_out.data)
48307  * def calculateDimensionlessNumbersADR(int nElements_global, # <<<<<<<<<<<<<<
48308  * int nQuadraturePoints_element,
48309  * int nSpace,
48310  */
48311  __pyx_tuple__235 = PyTuple_Pack(12, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nSpace, __pyx_n_s_elementDiameter, __pyx_n_s_df, __pyx_n_s_a, __pyx_n_s_dphi, __pyx_n_s_dr, __pyx_n_s_dmt, __pyx_n_s_pe, __pyx_n_s_cfl, __pyx_n_s_computeDiffusiveTimeStepLimit); if (unlikely(!__pyx_tuple__235)) __PYX_ERR(0, 4770, __pyx_L1_error)
48312  __Pyx_GOTREF(__pyx_tuple__235);
48313  __Pyx_GIVEREF(__pyx_tuple__235);
48314  __pyx_codeobj__236 = (PyObject*)__Pyx_PyCode_New(11, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__235, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_calculateDimensionlessNumbersADR, 4770, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__236)) __PYX_ERR(0, 4770, __pyx_L1_error)
48315 
48316  /* "cfemIntegrals.pyx":4794
48317  * <double*>pe.data,
48318  * <double*>cfl.data)
48319  * def calculateDimensionlessNumbersADR_sd(int nElements_global, # <<<<<<<<<<<<<<
48320  * int nQuadraturePoints_element,
48321  * int nSpace,
48322  */
48323  __pyx_tuple__237 = PyTuple_Pack(14, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nSpace, __pyx_n_s_rowptr, __pyx_n_s_colind, __pyx_n_s_elementDiameter, __pyx_n_s_df, __pyx_n_s_a, __pyx_n_s_dphi, __pyx_n_s_dr, __pyx_n_s_dmt, __pyx_n_s_pe, __pyx_n_s_cfl, __pyx_n_s_computeDiffusiveTimeStepLimit); if (unlikely(!__pyx_tuple__237)) __PYX_ERR(0, 4794, __pyx_L1_error)
48324  __Pyx_GOTREF(__pyx_tuple__237);
48325  __Pyx_GIVEREF(__pyx_tuple__237);
48326  __pyx_codeobj__238 = (PyObject*)__Pyx_PyCode_New(13, 0, 14, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__237, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_calculateDimensionlessNumbersADR_2, 4794, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__238)) __PYX_ERR(0, 4794, __pyx_L1_error)
48327 
48328  /* "cfemIntegrals.pyx":4822
48329  * <double*> pe.data,
48330  * <double*> cfl.data)
48331  * def calculateCFLADR(np.ndarray elementDiameter, # <<<<<<<<<<<<<<
48332  * np.ndarray dm,
48333  * np.ndarray df,
48334  */
48335  __pyx_tuple__239 = PyTuple_Pack(7, __pyx_n_s_elementDiameter, __pyx_n_s_dm, __pyx_n_s_df, __pyx_n_s_cfl, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__239)) __PYX_ERR(0, 4822, __pyx_L1_error)
48336  __Pyx_GOTREF(__pyx_tuple__239);
48337  __Pyx_GIVEREF(__pyx_tuple__239);
48338  __pyx_codeobj__240 = (PyObject*)__Pyx_PyCode_New(4, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__239, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_calculateCFLADR, 4822, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__240)) __PYX_ERR(0, 4822, __pyx_L1_error)
48339 
48340  /* "cfemIntegrals.pyx":4836
48341  * <double*>df.data,
48342  * <double*>cfl.data)
48343  * def updateInteriorElementBoundaryDiffusiveVelocity(np.ndarray interiorElementBoundaries, # <<<<<<<<<<<<<<
48344  * np.ndarray elementBoundaryElements,
48345  * np.ndarray elementBoundaryLocalElementBoundaries,
48346  */
48347  __pyx_tuple__241 = PyTuple_Pack(10, __pyx_n_s_interiorElementBoundaries, __pyx_n_s_elementBoundaryElements, __pyx_n_s_elementBoundaryLocalElementBound, __pyx_n_s_a, __pyx_n_s_grad_phi, __pyx_n_s_velocity, __pyx_n_s_nInteriorElementBoundaries_globa, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nQuadraturePoints_elementBoundar, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__241)) __PYX_ERR(0, 4836, __pyx_L1_error)
48348  __Pyx_GOTREF(__pyx_tuple__241);
48349  __Pyx_GIVEREF(__pyx_tuple__241);
48350  __pyx_codeobj__242 = (PyObject*)__Pyx_PyCode_New(6, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateInteriorElementBoundaryDif, 4836, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__242)) __PYX_ERR(0, 4836, __pyx_L1_error)
48351 
48352  /* "cfemIntegrals.pyx":4856
48353  * <double*>grad_phi.data,
48354  * <double*>velocity.data)
48355  * def updateInteriorElementBoundaryDiffusiveVelocity_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
48356  * np.ndarray colind,
48357  * np.ndarray interiorElementBoundaries,
48358  */
48359  __pyx_tuple__243 = PyTuple_Pack(12, __pyx_n_s_rowptr, __pyx_n_s_colind, __pyx_n_s_interiorElementBoundaries, __pyx_n_s_elementBoundaryElements, __pyx_n_s_elementBoundaryLocalElementBound, __pyx_n_s_a, __pyx_n_s_grad_phi, __pyx_n_s_velocity, __pyx_n_s_nInteriorElementBoundaries_globa, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nQuadraturePoints_elementBoundar, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__243)) __PYX_ERR(0, 4856, __pyx_L1_error)
48360  __Pyx_GOTREF(__pyx_tuple__243);
48361  __Pyx_GIVEREF(__pyx_tuple__243);
48362  __pyx_codeobj__244 = (PyObject*)__Pyx_PyCode_New(8, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__243, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateInteriorElementBoundaryDif_2, 4856, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__244)) __PYX_ERR(0, 4856, __pyx_L1_error)
48363 
48364  /* "cfemIntegrals.pyx":4880
48365  * <double*> grad_phi.data,
48366  * <double*> velocity.data)
48367  * def updateExteriorElementBoundaryDiffusiveVelocity(np.ndarray exteriorElementBoundaries, # <<<<<<<<<<<<<<
48368  * np.ndarray elementBoundaryElements,
48369  * np.ndarray elementBoundaryLocalElementBoundaries,
48370  */
48371  __pyx_tuple__245 = PyTuple_Pack(7, __pyx_n_s_exteriorElementBoundaries, __pyx_n_s_elementBoundaryElements, __pyx_n_s_elementBoundaryLocalElementBound, __pyx_n_s_a, __pyx_n_s_grad_phi, __pyx_n_s_velocity, __pyx_n_s_nd); if (unlikely(!__pyx_tuple__245)) __PYX_ERR(0, 4880, __pyx_L1_error)
48372  __Pyx_GOTREF(__pyx_tuple__245);
48373  __Pyx_GIVEREF(__pyx_tuple__245);
48374  __pyx_codeobj__246 = (PyObject*)__Pyx_PyCode_New(6, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__245, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateExteriorElementBoundaryDif, 4880, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__246)) __PYX_ERR(0, 4880, __pyx_L1_error)
48375 
48376  /* "cfemIntegrals.pyx":4910
48377  * <double*> grad_phi.data,
48378  * <double*> velocity.data)
48379  * def updateExteriorElementBoundaryDiffusiveVelocity_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
48380  * np.ndarray colind,
48381  * np.ndarray exteriorElementBoundaries,
48382  */
48383  __pyx_tuple__247 = PyTuple_Pack(12, __pyx_n_s_rowptr, __pyx_n_s_colind, __pyx_n_s_exteriorElementBoundaries, __pyx_n_s_elementBoundaryElements, __pyx_n_s_elementBoundaryLocalElementBound, __pyx_n_s_a, __pyx_n_s_grad_phi, __pyx_n_s_velocity, __pyx_n_s_nExteriorElementBoundaries_globa, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nQuadraturePoints_elementBoundar, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__247)) __PYX_ERR(0, 4910, __pyx_L1_error)
48384  __Pyx_GOTREF(__pyx_tuple__247);
48385  __Pyx_GIVEREF(__pyx_tuple__247);
48386  __pyx_codeobj__248 = (PyObject*)__Pyx_PyCode_New(8, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__247, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateExteriorElementBoundaryDif_2, 4910, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__248)) __PYX_ERR(0, 4910, __pyx_L1_error)
48387 
48388  /* "cfemIntegrals.pyx":4934
48389  * <double*> grad_phi.data,
48390  * <double*> velocity.data)
48391  * def updateInteriorElementBoundaryAdvectiveVelocity(np.ndarray interiorElementBoundaries, # <<<<<<<<<<<<<<
48392  * np.ndarray elementBoundaryElements,
48393  * np.ndarray elementBoundaryLocalElementBoundaries,
48394  */
48395  __pyx_tuple__249 = PyTuple_Pack(9, __pyx_n_s_interiorElementBoundaries, __pyx_n_s_elementBoundaryElements, __pyx_n_s_elementBoundaryLocalElementBound, __pyx_n_s_f, __pyx_n_s_velocity, __pyx_n_s_nInteriorElementBoundaries_globa, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nQuadraturePoints_elementBoundar, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__249)) __PYX_ERR(0, 4934, __pyx_L1_error)
48396  __Pyx_GOTREF(__pyx_tuple__249);
48397  __Pyx_GIVEREF(__pyx_tuple__249);
48398  __pyx_codeobj__250 = (PyObject*)__Pyx_PyCode_New(5, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__249, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateInteriorElementBoundaryAdv, 4934, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__250)) __PYX_ERR(0, 4934, __pyx_L1_error)
48399 
48400  /* "cfemIntegrals.pyx":4952
48401  * <double*>f.data,
48402  * <double*>velocity.data)
48403  * def updateExteriorElementBoundaryAdvectiveVelocity(np.ndarray exteriorElementBoundaries, # <<<<<<<<<<<<<<
48404  * np.ndarray elementBoundaryElements,
48405  * np.ndarray elementBoundaryLocalElementBoundaries,
48406  */
48407  __pyx_tuple__251 = PyTuple_Pack(6, __pyx_n_s_exteriorElementBoundaries, __pyx_n_s_elementBoundaryElements, __pyx_n_s_elementBoundaryLocalElementBound, __pyx_n_s_f, __pyx_n_s_velocity, __pyx_n_s_nd); if (unlikely(!__pyx_tuple__251)) __PYX_ERR(0, 4952, __pyx_L1_error)
48408  __Pyx_GOTREF(__pyx_tuple__251);
48409  __Pyx_GIVEREF(__pyx_tuple__251);
48410  __pyx_codeobj__252 = (PyObject*)__Pyx_PyCode_New(5, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__251, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateExteriorElementBoundaryAdv, 4952, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__252)) __PYX_ERR(0, 4952, __pyx_L1_error)
48411 
48412  /* "cfemIntegrals.pyx":4979
48413  * <double*> f.data,
48414  * <double*> velocity.data)
48415  * def updateInteriorElementBoundaryShockCapturingVelocity(np.ndarray interiorElementBoundaries, # <<<<<<<<<<<<<<
48416  * np.ndarray elementBoundaryElements,
48417  * np.ndarray elementBoundaryLocalElementBoundaries,
48418  */
48419  __pyx_tuple__253 = PyTuple_Pack(11, __pyx_n_s_interiorElementBoundaries, __pyx_n_s_elementBoundaryElements, __pyx_n_s_elementBoundaryLocalElementBound, __pyx_n_s_numDiff, __pyx_n_s_grad_u, __pyx_n_s_velocity, __pyx_n_s_nInteriorElementBoundaries_globa, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nQuadraturePoints_elementBoundar, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__253)) __PYX_ERR(0, 4979, __pyx_L1_error)
48420  __Pyx_GOTREF(__pyx_tuple__253);
48421  __Pyx_GIVEREF(__pyx_tuple__253);
48422  __pyx_codeobj__254 = (PyObject*)__Pyx_PyCode_New(6, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__253, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateInteriorElementBoundarySho, 4979, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__254)) __PYX_ERR(0, 4979, __pyx_L1_error)
48423 
48424  /* "cfemIntegrals.pyx":5001
48425  * <double*>grad_u.data,
48426  * <double*>velocity.data)
48427  * def updateExteriorElementBoundaryShockCapturingVelocity(np.ndarray exteriorElementBoundaries, # <<<<<<<<<<<<<<
48428  * np.ndarray elementBoundaryElements,
48429  * np.ndarray elementBoundaryLocalElementBoundaries,
48430  */
48431  __pyx_tuple__255 = PyTuple_Pack(6, __pyx_n_s_exteriorElementBoundaries, __pyx_n_s_elementBoundaryElements, __pyx_n_s_elementBoundaryLocalElementBound, __pyx_n_s_numDiff, __pyx_n_s_grad_u, __pyx_n_s_velocity); if (unlikely(!__pyx_tuple__255)) __PYX_ERR(0, 5001, __pyx_L1_error)
48432  __Pyx_GOTREF(__pyx_tuple__255);
48433  __Pyx_GIVEREF(__pyx_tuple__255);
48434  __pyx_codeobj__256 = (PyObject*)__Pyx_PyCode_New(6, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__255, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateExteriorElementBoundarySho, 5001, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__256)) __PYX_ERR(0, 5001, __pyx_L1_error)
48435 
48436  /* "cfemIntegrals.pyx":5031
48437  * <double*> grad_u.data,
48438  * <double*> velocity.data)
48439  * def calculateInteriorElementBoundaryAverageVelocity(np.ndarray interiorElementBoundaries, # <<<<<<<<<<<<<<
48440  * np.ndarray elementBoundaryElements,
48441  * np.ndarray elementBoundaryLocalElementBoundaries,
48442  */
48443  __pyx_tuple__257 = PyTuple_Pack(9, __pyx_n_s_interiorElementBoundaries, __pyx_n_s_elementBoundaryElements, __pyx_n_s_elementBoundaryLocalElementBound, __pyx_n_s_v, __pyx_n_s_vAverage, __pyx_n_s_nInteriorElementBoundaries_globa, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nQuadraturePoints_elementBoundar, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__257)) __PYX_ERR(0, 5031, __pyx_L1_error)
48444  __Pyx_GOTREF(__pyx_tuple__257);
48445  __Pyx_GIVEREF(__pyx_tuple__257);
48446  __pyx_codeobj__258 = (PyObject*)__Pyx_PyCode_New(5, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__257, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_calculateInteriorElementBoundary_2, 5031, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__258)) __PYX_ERR(0, 5031, __pyx_L1_error)
48447 
48448  /* "cfemIntegrals.pyx":5049
48449  * <double*>v.data,
48450  * <double*>vAverage.data)
48451  * def calculateExteriorElementBoundaryAverageVelocity(np.ndarray exteriorElementBoundaries, # <<<<<<<<<<<<<<
48452  * np.ndarray elementBoundaryElements,
48453  * np.ndarray elementBoundaryLocalElementBoundaries,
48454  */
48455  __pyx_tuple__259 = PyTuple_Pack(9, __pyx_n_s_exteriorElementBoundaries, __pyx_n_s_elementBoundaryElements, __pyx_n_s_elementBoundaryLocalElementBound, __pyx_n_s_v, __pyx_n_s_vAverage, __pyx_n_s_nExteriorElementBoundaries_globa, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nQuadraturePoints_elementBoundar, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__259)) __PYX_ERR(0, 5049, __pyx_L1_error)
48456  __Pyx_GOTREF(__pyx_tuple__259);
48457  __Pyx_GIVEREF(__pyx_tuple__259);
48458  __pyx_codeobj__260 = (PyObject*)__Pyx_PyCode_New(5, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__259, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_calculateExteriorElementBoundary_4, 5049, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__260)) __PYX_ERR(0, 5049, __pyx_L1_error)
48459 
48460  /* "cfemIntegrals.pyx":5067
48461  * <double*>v.data,
48462  * <double*>vAverage.data)
48463  * def calculateConservationResidualDG(np.ndarray elementResidual, # <<<<<<<<<<<<<<
48464  * np.ndarray conservationResidual):
48465  * cdef int nElements_global = elementResidual.shape[0]
48466  */
48467  __pyx_tuple__261 = PyTuple_Pack(4, __pyx_n_s_elementResidual, __pyx_n_s_conservationResidual, __pyx_n_s_nElements_global, __pyx_n_s_nDOF_test_element); if (unlikely(!__pyx_tuple__261)) __PYX_ERR(0, 5067, __pyx_L1_error)
48468  __Pyx_GOTREF(__pyx_tuple__261);
48469  __Pyx_GIVEREF(__pyx_tuple__261);
48470  __pyx_codeobj__262 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__261, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_calculateConservationResidualDG, 5067, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__262)) __PYX_ERR(0, 5067, __pyx_L1_error)
48471 
48472  /* "cfemIntegrals.pyx":5075
48473  * <double*>elementResidual.data,
48474  * <double*>conservationResidual.data)
48475  * def calculateConservationResidual(np.ndarray n, # <<<<<<<<<<<<<<
48476  * np.ndarray dS_u,
48477  * np.ndarray elementResidual,
48478  */
48479  __pyx_tuple__263 = PyTuple_Pack(10, __pyx_n_s_n, __pyx_n_s_dS_u, __pyx_n_s_elementResidual, __pyx_n_s_velocity, __pyx_n_s_conservationResidual, __pyx_n_s_nElements_global, __pyx_n_s_nDOF_test_element, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nQuadraturePoints_elementBoundar, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__263)) __PYX_ERR(0, 5075, __pyx_L1_error)
48480  __Pyx_GOTREF(__pyx_tuple__263);
48481  __Pyx_GIVEREF(__pyx_tuple__263);
48482  __pyx_codeobj__264 = (PyObject*)__Pyx_PyCode_New(5, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__263, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_calculateConservationResidual, 5075, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__264)) __PYX_ERR(0, 5075, __pyx_L1_error)
48483 
48484  /* "cfemIntegrals.pyx":5095
48485  * <double*>velocity.data,
48486  * <double*>conservationResidual.data)
48487  * def calculateConservationResidualGlobalBoundaries(int nElements_global, # <<<<<<<<<<<<<<
48488  * int nInteriorElementBoundaries_global,
48489  * int nExteriorElementBoundaries_global,
48490  */
48491  __pyx_tuple__265 = PyTuple_Pack(16, __pyx_n_s_nElements_global, __pyx_n_s_nInteriorElementBoundaries_globa, __pyx_n_s_nExteriorElementBoundaries_globa, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nQuadraturePoints_elementBoundar, __pyx_n_s_nNodes_element, __pyx_n_s_nSpace, __pyx_n_s_interiorElementBoundaries, __pyx_n_s_exteriorElementBoundaries, __pyx_n_s_elementBoundaryElements, __pyx_n_s_elementBoundaryLocalElementBound, __pyx_n_s_dS, __pyx_n_s_normal, __pyx_n_s_elementResidual, __pyx_n_s_velocity, __pyx_n_s_conservationResidual); if (unlikely(!__pyx_tuple__265)) __PYX_ERR(0, 5095, __pyx_L1_error)
48492  __Pyx_GOTREF(__pyx_tuple__265);
48493  __Pyx_GIVEREF(__pyx_tuple__265);
48494  __pyx_codeobj__266 = (PyObject*)__Pyx_PyCode_New(16, 0, 16, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__265, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_calculateConservationResidualGlo, 5095, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__266)) __PYX_ERR(0, 5095, __pyx_L1_error)
48495 
48496  /* "cfemIntegrals.pyx":5127
48497  * <double*>velocity.data,
48498  * <double*>conservationResidual.data)
48499  * def copyGlobalElementBoundaryVelocityToElementBoundary(np.ndarray interiorElementBoundaries, # <<<<<<<<<<<<<<
48500  * np.ndarray exteriorElementBoundaries,
48501  * np.ndarray elementBoundaryElementsArray,
48502  */
48503  __pyx_tuple__267 = PyTuple_Pack(13, __pyx_n_s_interiorElementBoundaries, __pyx_n_s_exteriorElementBoundaries, __pyx_n_s_elementBoundaryElementsArray, __pyx_n_s_elementBoundaryLocalElementBound_2, __pyx_n_s_velocityBoundary_global, __pyx_n_s_velocityBoundary_element, __pyx_n_s_nElements_global, __pyx_n_s_nInteriorElementBoundaries_globa, __pyx_n_s_nExteriorElementBoundaries_globa, __pyx_n_s_nElementBoundaries_global, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nQuadraturePoints_elementBoundar, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__267)) __PYX_ERR(0, 5127, __pyx_L1_error)
48504  __Pyx_GOTREF(__pyx_tuple__267);
48505  __Pyx_GIVEREF(__pyx_tuple__267);
48506  __pyx_codeobj__268 = (PyObject*)__Pyx_PyCode_New(6, 0, 13, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__267, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_copyGlobalElementBoundaryVelocit, 5127, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__268)) __PYX_ERR(0, 5127, __pyx_L1_error)
48507 
48508  /* "cfemIntegrals.pyx":5153
48509  * <double*>velocityBoundary_global.data,
48510  * <double*>velocityBoundary_element.data)
48511  * def loadBoundaryFluxIntoGlobalElementBoundaryVelocity(np.ndarray exteriorElementBoundaries, # <<<<<<<<<<<<<<
48512  * np.ndarray fluxElementBoundaries,
48513  * np.ndarray normal,
48514  */
48515  __pyx_tuple__269 = PyTuple_Pack(9, __pyx_n_s_exteriorElementBoundaries, __pyx_n_s_fluxElementBoundaries, __pyx_n_s_normal, __pyx_n_s_flux, __pyx_n_s_updateCoef, __pyx_n_s_velocity, __pyx_n_s_nExteriorElementBoundaries_globa, __pyx_n_s_nQuadraturePoints_elementBoundar, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__269)) __PYX_ERR(0, 5153, __pyx_L1_error)
48516  __Pyx_GOTREF(__pyx_tuple__269);
48517  __Pyx_GIVEREF(__pyx_tuple__269);
48518  __pyx_codeobj__270 = (PyObject*)__Pyx_PyCode_New(6, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__269, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_loadBoundaryFluxIntoGlobalElemen, 5153, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__270)) __PYX_ERR(0, 5153, __pyx_L1_error)
48519 
48520  /* "cfemIntegrals.pyx":5171
48521  * updateCoef,
48522  * <double*>velocity.data)
48523  * def calculateInteriorNumericalTrace_Potential(np.ndarray interiorElementBoundaries, # <<<<<<<<<<<<<<
48524  * np.ndarray elementBoundaryElements,
48525  * np.ndarray elementBoundaryLocalElementBoundaries,
48526  */
48527  __pyx_tuple__271 = PyTuple_Pack(11, __pyx_n_s_interiorElementBoundaries, __pyx_n_s_elementBoundaryElements, __pyx_n_s_elementBoundaryLocalElementBound, __pyx_n_s_phi, __pyx_n_s_dphi, __pyx_n_s_phi_trace, __pyx_n_s_dphi_trace_left, __pyx_n_s_dphi_trace_right, __pyx_n_s_nInteriorElementBoundaries_globa, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nQuadraturePoints_elementBoundar); if (unlikely(!__pyx_tuple__271)) __PYX_ERR(0, 5171, __pyx_L1_error)
48528  __Pyx_GOTREF(__pyx_tuple__271);
48529  __Pyx_GIVEREF(__pyx_tuple__271);
48530  __pyx_codeobj__272 = (PyObject*)__Pyx_PyCode_New(8, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__271, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_calculateInteriorNumericalTrace, 5171, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__272)) __PYX_ERR(0, 5171, __pyx_L1_error)
48531 
48532  /* "cfemIntegrals.pyx":5193
48533  * <double*>dphi_trace_left.data,
48534  * <double*>dphi_trace_right.data)
48535  * def calculateExteriorNumericalTrace_Potential(np.ndarray isDOFBoundary, # <<<<<<<<<<<<<<
48536  * np.ndarray exteriorElementBoundaries,
48537  * np.ndarray elementBoundaryElements,
48538  */
48539  __pyx_tuple__273 = PyTuple_Pack(12, __pyx_n_s_isDOFBoundary, __pyx_n_s_exteriorElementBoundaries, __pyx_n_s_elementBoundaryElements, __pyx_n_s_elementBoundaryLocalElementBound, __pyx_n_s_phi_bc, __pyx_n_s_phi, __pyx_n_s_dphi, __pyx_n_s_phi_trace, __pyx_n_s_dphi_trace_left, __pyx_n_s_nExteriorElementBoundaries_globa, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nQuadraturePoints_elementBoundar); if (unlikely(!__pyx_tuple__273)) __PYX_ERR(0, 5193, __pyx_L1_error)
48540  __Pyx_GOTREF(__pyx_tuple__273);
48541  __Pyx_GIVEREF(__pyx_tuple__273);
48542  __pyx_codeobj__274 = (PyObject*)__Pyx_PyCode_New(9, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__273, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_calculateExteriorNumericalTrace, 5193, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__274)) __PYX_ERR(0, 5193, __pyx_L1_error)
48543 
48544  /* "cfemIntegrals.pyx":5217
48545  * <double*>phi_trace.data,
48546  * <double*>dphi_trace_left.data)
48547  * def updateInteriorElementBoundary_MixedForm_weak(np.ndarray interiorElementBoundaries, # <<<<<<<<<<<<<<
48548  * np.ndarray elementBoundaryElements,
48549  * np.ndarray elementBoundaryLocalElementBoundaries,
48550  */
48551  __pyx_tuple__275 = PyTuple_Pack(12, __pyx_n_s_interiorElementBoundaries, __pyx_n_s_elementBoundaryElements, __pyx_n_s_elementBoundaryLocalElementBound, __pyx_n_s_n, __pyx_n_s_phi_trace, __pyx_n_s_w_dS, __pyx_n_s_b, __pyx_n_s_nInteriorElementBoundaries_globa, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nQuadraturePoints_elementBoundar, __pyx_n_s_nDOF_test_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__275)) __PYX_ERR(0, 5217, __pyx_L1_error)
48552  __Pyx_GOTREF(__pyx_tuple__275);
48553  __Pyx_GIVEREF(__pyx_tuple__275);
48554  __pyx_codeobj__276 = (PyObject*)__Pyx_PyCode_New(7, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__275, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateInteriorElementBoundary_Mi, 5217, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__276)) __PYX_ERR(0, 5217, __pyx_L1_error)
48555 
48556  /* "cfemIntegrals.pyx":5241
48557  * <double*>w_dS.data,
48558  * <double*>b.data)
48559  * def updateInteriorElementBoundary_MixedForm_weakJacobian(np.ndarray interiorElementBoundaries, # <<<<<<<<<<<<<<
48560  * np.ndarray elementBoundaryElements,
48561  * np.ndarray elementBoundaryLocalElementBoundaries,
48562  */
48563  __pyx_tuple__277 = PyTuple_Pack(15, __pyx_n_s_interiorElementBoundaries, __pyx_n_s_elementBoundaryElements, __pyx_n_s_elementBoundaryLocalElementBound, __pyx_n_s_n, __pyx_n_s_dphi_trace_left, __pyx_n_s_dphi_trace_right, __pyx_n_s_v, __pyx_n_s_w_dS, __pyx_n_s_db, __pyx_n_s_db_eb, __pyx_n_s_nInteriorElementBoundaries_globa, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nQuadraturePoints_elementBoundar, __pyx_n_s_nDOF_test_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__277)) __PYX_ERR(0, 5241, __pyx_L1_error)
48564  __Pyx_GOTREF(__pyx_tuple__277);
48565  __Pyx_GIVEREF(__pyx_tuple__277);
48566  __pyx_codeobj__278 = (PyObject*)__Pyx_PyCode_New(10, 0, 15, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__277, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateInteriorElementBoundary_Mi_2, 5241, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__278)) __PYX_ERR(0, 5241, __pyx_L1_error)
48567 
48568  /* "cfemIntegrals.pyx":5271
48569  * <double*>db.data,
48570  * <double*>db_eb.data)
48571  * def updateExteriorElementBoundary_MixedForm_weak(np.ndarray exteriorElementBoundaries, # <<<<<<<<<<<<<<
48572  * np.ndarray elementBoundaryElements,
48573  * np.ndarray elementBoundaryLocalElementBoundaries,
48574  */
48575  __pyx_tuple__279 = PyTuple_Pack(12, __pyx_n_s_exteriorElementBoundaries, __pyx_n_s_elementBoundaryElements, __pyx_n_s_elementBoundaryLocalElementBound, __pyx_n_s_n, __pyx_n_s_phi_trace, __pyx_n_s_w_dS, __pyx_n_s_b, __pyx_n_s_nExteriorElementBoundaries_globa, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nQuadraturePoints_elementBoundar, __pyx_n_s_nDOF_test_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__279)) __PYX_ERR(0, 5271, __pyx_L1_error)
48576  __Pyx_GOTREF(__pyx_tuple__279);
48577  __Pyx_GIVEREF(__pyx_tuple__279);
48578  __pyx_codeobj__280 = (PyObject*)__Pyx_PyCode_New(7, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__279, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateExteriorElementBoundary_Mi, 5271, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__280)) __PYX_ERR(0, 5271, __pyx_L1_error)
48579 
48580  /* "cfemIntegrals.pyx":5295
48581  * <double*>w_dS.data,
48582  * <double*>b.data)
48583  * def updateExteriorElementBoundary_MixedForm_weakJacobian(np.ndarray exteriorElementBoundaries, # <<<<<<<<<<<<<<
48584  * np.ndarray elementBoundaryElements,
48585  * np.ndarray elementBoundaryLocalElementBoundaries,
48586  */
48587  __pyx_tuple__281 = PyTuple_Pack(14, __pyx_n_s_exteriorElementBoundaries, __pyx_n_s_elementBoundaryElements, __pyx_n_s_elementBoundaryLocalElementBound, __pyx_n_s_n, __pyx_n_s_dphi_trace_left, __pyx_n_s_v, __pyx_n_s_w_dS, __pyx_n_s_db, __pyx_n_s_db_eb, __pyx_n_s_nExteriorElementBoundaries_globa, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nQuadraturePoints_elementBoundar, __pyx_n_s_nDOF_test_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__281)) __PYX_ERR(0, 5295, __pyx_L1_error)
48588  __Pyx_GOTREF(__pyx_tuple__281);
48589  __Pyx_GIVEREF(__pyx_tuple__281);
48590  __pyx_codeobj__282 = (PyObject*)__Pyx_PyCode_New(9, 0, 14, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__281, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateExteriorElementBoundary_Mi_2, 5295, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__282)) __PYX_ERR(0, 5295, __pyx_L1_error)
48591 
48592  /* "cfemIntegrals.pyx":5323
48593  * <double*>db.data,
48594  * <double*>db_eb.data)
48595  * def updatePotential_MixedForm_weak(np.ndarray phi, # <<<<<<<<<<<<<<
48596  * np.ndarray grad_w_dV,
48597  * np.ndarray b):
48598  */
48599  __pyx_tuple__283 = PyTuple_Pack(7, __pyx_n_s_phi, __pyx_n_s_grad_w_dV, __pyx_n_s_b, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_test_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__283)) __PYX_ERR(0, 5323, __pyx_L1_error)
48600  __Pyx_GOTREF(__pyx_tuple__283);
48601  __Pyx_GIVEREF(__pyx_tuple__283);
48602  __pyx_codeobj__284 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updatePotential_MixedForm_weak, 5323, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__284)) __PYX_ERR(0, 5323, __pyx_L1_error)
48603 
48604  /* "cfemIntegrals.pyx":5337
48605  * <double*>grad_w_dV.data,
48606  * <double*>b.data)
48607  * def updatePotential_MixedForm_weakJacobian(np.ndarray dphi, # <<<<<<<<<<<<<<
48608  * np.ndarray v,
48609  * np.ndarray grad_w_dV,
48610  */
48611  __pyx_tuple__285 = PyTuple_Pack(8, __pyx_n_s_dphi, __pyx_n_s_v, __pyx_n_s_grad_w_dV, __pyx_n_s_db, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_test_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__285)) __PYX_ERR(0, 5337, __pyx_L1_error)
48612  __Pyx_GOTREF(__pyx_tuple__285);
48613  __Pyx_GIVEREF(__pyx_tuple__285);
48614  __pyx_codeobj__286 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__285, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updatePotential_MixedForm_weakJa, 5337, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__286)) __PYX_ERR(0, 5337, __pyx_L1_error)
48615 
48616  /* "cfemIntegrals.pyx":5353
48617  * <double*>grad_w_dV.data,
48618  * <double*>db.data)
48619  * def calculateVelocityQuadrature_MixedForm(np.ndarray A_inv, # <<<<<<<<<<<<<<
48620  * np.ndarray b,
48621  * np.ndarray v,
48622  */
48623  __pyx_tuple__287 = PyTuple_Pack(12, __pyx_n_s_A_inv, __pyx_n_s_b, __pyx_n_s_v, __pyx_n_s_V, __pyx_n_s_qv, __pyx_n_s_qV, __pyx_n_s_nElements_global, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nElementBoundaryQuadraturePoints, __pyx_n_s_nDOF_element, __pyx_n_s_nSpace, __pyx_n_s_nQuadraturePoints_element); if (unlikely(!__pyx_tuple__287)) __PYX_ERR(0, 5353, __pyx_L1_error)
48624  __Pyx_GOTREF(__pyx_tuple__287);
48625  __Pyx_GIVEREF(__pyx_tuple__287);
48626  __pyx_codeobj__288 = (PyObject*)__Pyx_PyCode_New(6, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__287, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_calculateVelocityQuadrature_Mixe, 5353, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__288)) __PYX_ERR(0, 5353, __pyx_L1_error)
48627 
48628  /* "cfemIntegrals.pyx":5377
48629  * <double*>qv.data,
48630  * <double*>qV.data)
48631  * def calculateVelocityQuadrature_MixedForm_Jacobian(np.ndarray A_inv, # <<<<<<<<<<<<<<
48632  * np.ndarray db,
48633  * np.ndarray db_eb,
48634  */
48635  __pyx_tuple__289 = PyTuple_Pack(15, __pyx_n_s_A_inv, __pyx_n_s_db, __pyx_n_s_db_eb, __pyx_n_s_v, __pyx_n_s_DV, __pyx_n_s_DV_eb, __pyx_n_s_qv, __pyx_n_s_qDV, __pyx_n_s_qDV_eb, __pyx_n_s_nElements_global, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nElementBoundaryQuadraturePoints, __pyx_n_s_nDOF_element, __pyx_n_s_nSpace, __pyx_n_s_nQuadraturePoints_element); if (unlikely(!__pyx_tuple__289)) __PYX_ERR(0, 5377, __pyx_L1_error)
48636  __Pyx_GOTREF(__pyx_tuple__289);
48637  __Pyx_GIVEREF(__pyx_tuple__289);
48638  __pyx_codeobj__290 = (PyObject*)__Pyx_PyCode_New(9, 0, 15, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__289, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_calculateVelocityQuadrature_Mixe_2, 5377, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__290)) __PYX_ERR(0, 5377, __pyx_L1_error)
48639 
48640  /* "cfemIntegrals.pyx":5407
48641  * <double*>qDV.data,
48642  * <double*>qDV_eb.data)
48643  * def calculateVelocityProjectionMatrixLDG(np.ndarray vXw_dV, # <<<<<<<<<<<<<<
48644  * np.ndarray A_inv):
48645  * cdef int nElements_global = vXw_dV.shape[0]
48646  */
48647  __pyx_tuple__291 = PyTuple_Pack(5, __pyx_n_s_vXw_dV, __pyx_n_s_A_inv, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_element); if (unlikely(!__pyx_tuple__291)) __PYX_ERR(0, 5407, __pyx_L1_error)
48648  __Pyx_GOTREF(__pyx_tuple__291);
48649  __Pyx_GIVEREF(__pyx_tuple__291);
48650  __pyx_codeobj__292 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__291, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_calculateVelocityProjectionMatri, 5407, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__292)) __PYX_ERR(0, 5407, __pyx_L1_error)
48651 
48652  /* "cfemIntegrals.pyx":5417
48653  * <double*>vXw_dV.data,
48654  * <double*>A_inv.data)
48655  * def updateDiffusion_MixedForm_weak(np.ndarray a, # <<<<<<<<<<<<<<
48656  * np.ndarray qV,
48657  * np.ndarray grad_w_dV,
48658  */
48659  __pyx_tuple__293 = PyTuple_Pack(8, __pyx_n_s_a, __pyx_n_s_qV, __pyx_n_s_grad_w_dV, __pyx_n_s_weak_residual, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_test_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__293)) __PYX_ERR(0, 5417, __pyx_L1_error)
48660  __Pyx_GOTREF(__pyx_tuple__293);
48661  __Pyx_GIVEREF(__pyx_tuple__293);
48662  __pyx_codeobj__294 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__293, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateDiffusion_MixedForm_weak, 5417, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__294)) __PYX_ERR(0, 5417, __pyx_L1_error)
48663 
48664  /* "cfemIntegrals.pyx":5433
48665  * <double*>grad_w_dV.data,
48666  * <double*>weak_residual.data)
48667  * def updateDiffusionJacobian_MixedForm_weak(np.ndarray a, # <<<<<<<<<<<<<<
48668  * np.ndarray da,
48669  * np.ndarray qV,
48670  */
48671  __pyx_tuple__295 = PyTuple_Pack(15, __pyx_n_s_a, __pyx_n_s_da, __pyx_n_s_qV, __pyx_n_s_qDV, __pyx_n_s_qDV_eb, __pyx_n_s_grad_w_dV, __pyx_n_s_v, __pyx_n_s_jacobian_weak_residual, __pyx_n_s_jacobian_weak_residual_eb, __pyx_n_s_nElements_global, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_trial_element, __pyx_n_s_nDOF_test_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__295)) __PYX_ERR(0, 5433, __pyx_L1_error)
48672  __Pyx_GOTREF(__pyx_tuple__295);
48673  __Pyx_GIVEREF(__pyx_tuple__295);
48674  __pyx_codeobj__296 = (PyObject*)__Pyx_PyCode_New(9, 0, 15, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__295, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateDiffusionJacobian_MixedFor, 5433, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__296)) __PYX_ERR(0, 5433, __pyx_L1_error)
48675 
48676  /* "cfemIntegrals.pyx":5463
48677  * <double*>jacobian_weak_residual.data,
48678  * <double*>jacobian_weak_residual_eb.data)
48679  * def estimate_mt(np.ndarray v, # <<<<<<<<<<<<<<
48680  * np.ndarray vXw_dV,
48681  * np.ndarray elementSpatialResidual,
48682  */
48683  __pyx_tuple__297 = PyTuple_Pack(7, __pyx_n_s_v, __pyx_n_s_vXw_dV, __pyx_n_s_elementSpatialResidual, __pyx_n_s_mt, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_element); if (unlikely(!__pyx_tuple__297)) __PYX_ERR(0, 5463, __pyx_L1_error)
48684  __Pyx_GOTREF(__pyx_tuple__297);
48685  __Pyx_GIVEREF(__pyx_tuple__297);
48686  __pyx_codeobj__298 = (PyObject*)__Pyx_PyCode_New(4, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__297, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_estimate_mt, 5463, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__298)) __PYX_ERR(0, 5463, __pyx_L1_error)
48687 
48688  /* "cfemIntegrals.pyx":5477
48689  * <double*>elementSpatialResidual.data,
48690  * <double*>mt.data)
48691  * def estimate_mt_lowmem(np.ndarray v, # <<<<<<<<<<<<<<
48692  * np.ndarray w_dV,
48693  * np.ndarray elementSpatialResidual,
48694  */
48695  __pyx_tuple__299 = PyTuple_Pack(7, __pyx_n_s_v, __pyx_n_s_w_dV, __pyx_n_s_elementSpatialResidual, __pyx_n_s_mt, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_element); if (unlikely(!__pyx_tuple__299)) __PYX_ERR(0, 5477, __pyx_L1_error)
48696  __Pyx_GOTREF(__pyx_tuple__299);
48697  __Pyx_GIVEREF(__pyx_tuple__299);
48698  __pyx_codeobj__300 = (PyObject*)__Pyx_PyCode_New(4, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__299, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_estimate_mt_lowmem, 5477, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__300)) __PYX_ERR(0, 5477, __pyx_L1_error)
48699 
48700  /* "cfemIntegrals.pyx":5491
48701  * <double*> elementSpatialResidual.data,
48702  * <double*> mt.data)
48703  * def scalarDomainIntegral(np.ndarray dV, # <<<<<<<<<<<<<<
48704  * np.ndarray nValueArray,
48705  * int nElements_global):
48706  */
48707  __pyx_tuple__301 = PyTuple_Pack(5, __pyx_n_s_dV, __pyx_n_s_nValueArray, __pyx_n_s_nElements_global, __pyx_n_s_output, __pyx_n_s_nQuadraturePoints_element); if (unlikely(!__pyx_tuple__301)) __PYX_ERR(0, 5491, __pyx_L1_error)
48708  __Pyx_GOTREF(__pyx_tuple__301);
48709  __Pyx_GIVEREF(__pyx_tuple__301);
48710  __pyx_codeobj__302 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__301, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_scalarDomainIntegral, 5491, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__302)) __PYX_ERR(0, 5491, __pyx_L1_error)
48711 
48712  /* "cfemIntegrals.pyx":5501
48713  * <double*> nValueArray.data)
48714  * return output
48715  * def scalarHeavisideDomainIntegral(int nElements_global, # <<<<<<<<<<<<<<
48716  * int nQuadraturePoints_element,
48717  * np.ndarray dV,
48718  */
48719  __pyx_tuple__303 = PyTuple_Pack(5, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_dV, __pyx_n_s_nValueArray, __pyx_n_s_output); if (unlikely(!__pyx_tuple__303)) __PYX_ERR(0, 5501, __pyx_L1_error)
48720  __Pyx_GOTREF(__pyx_tuple__303);
48721  __Pyx_GIVEREF(__pyx_tuple__303);
48722  __pyx_codeobj__304 = (PyObject*)__Pyx_PyCode_New(4, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__303, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_scalarHeavisideDomainIntegral, 5501, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__304)) __PYX_ERR(0, 5501, __pyx_L1_error)
48723 
48724  /* "cfemIntegrals.pyx":5511
48725  * <double*> nValueArray.data)
48726  * return output
48727  * def scalarSmoothedHeavisideDomainIntegral(double epsFact, # <<<<<<<<<<<<<<
48728  * np.ndarray elementDiameter,
48729  * np.ndarray dV,
48730  */
48731  __pyx_tuple__305 = PyTuple_Pack(7, __pyx_n_s_epsFact, __pyx_n_s_elementDiameter, __pyx_n_s_dV, __pyx_n_s_nValueArray, __pyx_n_s_nElements_global, __pyx_n_s_output, __pyx_n_s_nQuadraturePoints_element); if (unlikely(!__pyx_tuple__305)) __PYX_ERR(0, 5511, __pyx_L1_error)
48732  __Pyx_GOTREF(__pyx_tuple__305);
48733  __Pyx_GIVEREF(__pyx_tuple__305);
48734  __pyx_codeobj__306 = (PyObject*)__Pyx_PyCode_New(5, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__305, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_scalarSmoothedHeavisideDomainInt, 5511, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__306)) __PYX_ERR(0, 5511, __pyx_L1_error)
48735 
48736  /* "cfemIntegrals.pyx":5525
48737  * <double*> nValueArray.data)
48738  * return output
48739  * def fluxDomainBoundaryIntegral(int nElementBoundaries_owned, # <<<<<<<<<<<<<<
48740  * np.ndarray flag,
48741  * np.ndarray exteriorElementBoundariesArray,
48742  */
48743  __pyx_tuple__307 = PyTuple_Pack(8, __pyx_n_s_nElementBoundaries_owned, __pyx_n_s_flag, __pyx_n_s_exteriorElementBoundariesArray, __pyx_n_s_dS, __pyx_n_s_nValueArray, __pyx_n_s_nExteriorElementBoundaries, __pyx_n_s_nQuadraturePoints_elementBoundar, __pyx_n_s_output); if (unlikely(!__pyx_tuple__307)) __PYX_ERR(0, 5525, __pyx_L1_error)
48744  __Pyx_GOTREF(__pyx_tuple__307);
48745  __Pyx_GIVEREF(__pyx_tuple__307);
48746  __pyx_codeobj__308 = (PyObject*)__Pyx_PyCode_New(5, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__307, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_fluxDomainBoundaryIntegral, 5525, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__308)) __PYX_ERR(0, 5525, __pyx_L1_error)
48747 
48748  /* "cfemIntegrals.pyx":5541
48749  * <double*> nValueArray.data)
48750  * return output
48751  * def fluxDomainBoundaryIntegralFromVector(int nElementBoundaries_owned, # <<<<<<<<<<<<<<
48752  * np.ndarray flag,
48753  * np.ndarray exteriorElementBoundaries,
48754  */
48755  __pyx_tuple__309 = PyTuple_Pack(10, __pyx_n_s_nElementBoundaries_owned, __pyx_n_s_flag, __pyx_n_s_exteriorElementBoundaries, __pyx_n_s_dS, __pyx_n_s_nValueArray, __pyx_n_s_normal, __pyx_n_s_output, __pyx_n_s_nExteriorElementBoundaries, __pyx_n_s_nQuadraturePoints_elementBoundar, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__309)) __PYX_ERR(0, 5541, __pyx_L1_error)
48756  __Pyx_GOTREF(__pyx_tuple__309);
48757  __Pyx_GIVEREF(__pyx_tuple__309);
48758  __pyx_codeobj__310 = (PyObject*)__Pyx_PyCode_New(6, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__309, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_fluxDomainBoundaryIntegralFromVe, 5541, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__310)) __PYX_ERR(0, 5541, __pyx_L1_error)
48759 
48760  /* "cfemIntegrals.pyx":5561
48761  * <double*> normal.data)
48762  * return output
48763  * def copyExteriorElementBoundaryValuesFromElementBoundaryValues(np.ndarray exteriorElementBoundaries, # <<<<<<<<<<<<<<
48764  * np.ndarray elementBoundaryElements,
48765  * np.ndarray elementBoundaryLocalElementBoundaries,
48766  */
48767  __pyx_tuple__311 = PyTuple_Pack(12, __pyx_n_s_exteriorElementBoundaries, __pyx_n_s_elementBoundaryElements, __pyx_n_s_elementBoundaryLocalElementBound, __pyx_n_s_ebq_val, __pyx_n_s_ebqe_val, __pyx_n_s_nExteriorElementBoundaries_globa, __pyx_n_s_nElements_global, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nQuadraturePoints_elementBoundar, __pyx_n_s_nValuesPerQuadraturePoint, __pyx_n_s_nd, __pyx_n_s_i); if (unlikely(!__pyx_tuple__311)) __PYX_ERR(0, 5561, __pyx_L1_error)
48768  __Pyx_GOTREF(__pyx_tuple__311);
48769  __Pyx_GIVEREF(__pyx_tuple__311);
48770  __pyx_codeobj__312 = (PyObject*)__Pyx_PyCode_New(5, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__311, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_copyExteriorElementBoundaryValue, 5561, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__312)) __PYX_ERR(0, 5561, __pyx_L1_error)
48771 
48772  /* "cfemIntegrals.pyx":5585
48773  * <double*> ebq_val.data,
48774  * <double*> ebqe_val.data)
48775  * def copyExteriorElementBoundaryValuesToElementBoundaryValues(np.ndarray exteriorElementBoundaries, # <<<<<<<<<<<<<<
48776  * np.ndarray elementBoundaryElements,
48777  * np.ndarray elementBoundaryLocalElementBoundaries,
48778  */
48779  __pyx_tuple__313 = PyTuple_Pack(12, __pyx_n_s_exteriorElementBoundaries, __pyx_n_s_elementBoundaryElements, __pyx_n_s_elementBoundaryLocalElementBound, __pyx_n_s_ebqe_val, __pyx_n_s_ebq_val, __pyx_n_s_nExteriorElementBoundaries_globa, __pyx_n_s_nElements_global, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nQuadraturePoints_elementBoundar, __pyx_n_s_nValuesPerQuadraturePoint, __pyx_n_s_nd, __pyx_n_s_i); if (unlikely(!__pyx_tuple__313)) __PYX_ERR(0, 5585, __pyx_L1_error)
48780  __Pyx_GOTREF(__pyx_tuple__313);
48781  __Pyx_GIVEREF(__pyx_tuple__313);
48782  __pyx_codeobj__314 = (PyObject*)__Pyx_PyCode_New(5, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__313, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_copyExteriorElementBoundaryValue_2, 5585, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__314)) __PYX_ERR(0, 5585, __pyx_L1_error)
48783 
48784  /* "cfemIntegrals.pyx":5609
48785  * <double*> ebqe_val.data,
48786  * <double*> ebq_val.data)
48787  * def copyExteriorElementBoundaryValuesToGlobalElementBoundaryValues(np.ndarray exteriorElementBoundaries, # <<<<<<<<<<<<<<
48788  * np.ndarray elementBoundaryElements,
48789  * np.ndarray elementBoundaryLocalElementBoundaries,
48790  */
48791  __pyx_tuple__315 = PyTuple_Pack(10, __pyx_n_s_exteriorElementBoundaries, __pyx_n_s_elementBoundaryElements, __pyx_n_s_elementBoundaryLocalElementBound, __pyx_n_s_ebqe_val, __pyx_n_s_ebq_global_val, __pyx_n_s_nExteriorElementBoundaries_globa, __pyx_n_s_nQuadraturePoints_elementBoundar, __pyx_n_s_nValuesPerQuadraturePoint, __pyx_n_s_nd, __pyx_n_s_i); if (unlikely(!__pyx_tuple__315)) __PYX_ERR(0, 5609, __pyx_L1_error)
48792  __Pyx_GOTREF(__pyx_tuple__315);
48793  __Pyx_GIVEREF(__pyx_tuple__315);
48794  __pyx_codeobj__316 = (PyObject*)__Pyx_PyCode_New(5, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__315, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_copyExteriorElementBoundaryValue_3, 5609, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__316)) __PYX_ERR(0, 5609, __pyx_L1_error)
48795 
48796  /* "cfemIntegrals.pyx":5629
48797  * <double*> ebqe_val.data,
48798  * <double*> ebq_global_val.data)
48799  * def copyExteriorElementBoundaryValuesFromGlobalElementBoundaryValues(np.ndarray exteriorElementBoundaries, # <<<<<<<<<<<<<<
48800  * np.ndarray elementBoundaryElements,
48801  * np.ndarray elementBoundaryLocalElementBoundaries,
48802  */
48803  __pyx_tuple__317 = PyTuple_Pack(10, __pyx_n_s_exteriorElementBoundaries, __pyx_n_s_elementBoundaryElements, __pyx_n_s_elementBoundaryLocalElementBound, __pyx_n_s_ebq_global_val, __pyx_n_s_ebqe_val, __pyx_n_s_nExteriorElementBoundaries_globa, __pyx_n_s_nQuadraturePoints_elementBoundar, __pyx_n_s_nValuesPerQuadraturePoint, __pyx_n_s_nd, __pyx_n_s_i); if (unlikely(!__pyx_tuple__317)) __PYX_ERR(0, 5629, __pyx_L1_error)
48804  __Pyx_GOTREF(__pyx_tuple__317);
48805  __Pyx_GIVEREF(__pyx_tuple__317);
48806  __pyx_codeobj__318 = (PyObject*)__Pyx_PyCode_New(5, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__317, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_copyExteriorElementBoundaryValue_4, 5629, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__318)) __PYX_ERR(0, 5629, __pyx_L1_error)
48807 
48808  /* "cfemIntegrals.pyx":5649
48809  * <double*> ebq_global_val.data,
48810  * <double*> ebqe_val.data)
48811  * def computeC0P1InterpolantDGP0(np.ndarray elementNodesArray, # <<<<<<<<<<<<<<
48812  * np.ndarray nodeElementOffsets,
48813  * np.ndarray nodeElementsArray,
48814  */
48815  __pyx_tuple__319 = PyTuple_Pack(11, __pyx_n_s_elementNodesArray, __pyx_n_s_nodeElementOffsets, __pyx_n_s_nodeElementsArray, __pyx_n_s_l2g, __pyx_n_s_dof, __pyx_n_s_nodalAverage, __pyx_n_s_dim_dof, __pyx_n_s_nElements_global, __pyx_n_s_nNodes_global, __pyx_n_s_nNodes_element, __pyx_n_s_nDOF_element); if (unlikely(!__pyx_tuple__319)) __PYX_ERR(0, 5649, __pyx_L1_error)
48816  __Pyx_GOTREF(__pyx_tuple__319);
48817  __Pyx_GIVEREF(__pyx_tuple__319);
48818  __pyx_codeobj__320 = (PyObject*)__Pyx_PyCode_New(7, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__319, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_computeC0P1InterpolantDGP0, 5649, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__320)) __PYX_ERR(0, 5649, __pyx_L1_error)
48819 
48820  /* "cfemIntegrals.pyx":5671
48821  * <double*> dof.data,
48822  * <double*> nodalAverage.data)
48823  * def computeC0P1InterpolantNCP1(int dim_dof, # <<<<<<<<<<<<<<
48824  * np.ndarray elementNodesArray,
48825  * np.ndarray nodeElementOffsets,
48826  */
48827  __pyx_tuple__321 = PyTuple_Pack(11, __pyx_n_s_dim_dof, __pyx_n_s_elementNodesArray, __pyx_n_s_nodeElementOffsets, __pyx_n_s_nodeElementsArray, __pyx_n_s_l2g, __pyx_n_s_dof, __pyx_n_s_nodalAverage, __pyx_n_s_nElements_global, __pyx_n_s_nNodes_global, __pyx_n_s_nNodes_element, __pyx_n_s_nDOF_element); if (unlikely(!__pyx_tuple__321)) __PYX_ERR(0, 5671, __pyx_L1_error)
48828  __Pyx_GOTREF(__pyx_tuple__321);
48829  __Pyx_GIVEREF(__pyx_tuple__321);
48830  __pyx_codeobj__322 = (PyObject*)__Pyx_PyCode_New(7, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__321, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_computeC0P1InterpolantNCP1, 5671, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__322)) __PYX_ERR(0, 5671, __pyx_L1_error)
48831 
48832  /* "cfemIntegrals.pyx":5693
48833  * <double*> dof.data,
48834  * <double*> nodalAverage.data)
48835  * def computeC0P1InterpolantDGP12(int dim_dof, # <<<<<<<<<<<<<<
48836  * np.ndarray elementNodesArray,
48837  * np.ndarray nodeElementOffsets,
48838  */
48839  __pyx_tuple__323 = PyTuple_Pack(11, __pyx_n_s_dim_dof, __pyx_n_s_elementNodesArray, __pyx_n_s_nodeElementOffsets, __pyx_n_s_nodeElementsArray, __pyx_n_s_l2g, __pyx_n_s_dof, __pyx_n_s_nodalAverage, __pyx_n_s_nElements_global, __pyx_n_s_nNodes_global, __pyx_n_s_nNodes_element, __pyx_n_s_nDOF_element); if (unlikely(!__pyx_tuple__323)) __PYX_ERR(0, 5693, __pyx_L1_error)
48840  __Pyx_GOTREF(__pyx_tuple__323);
48841  __Pyx_GIVEREF(__pyx_tuple__323);
48842  __pyx_codeobj__324 = (PyObject*)__Pyx_PyCode_New(7, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__323, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_computeC0P1InterpolantDGP12, 5693, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__324)) __PYX_ERR(0, 5693, __pyx_L1_error)
48843 
48844  /* "cfemIntegrals.pyx":5715
48845  * <double*> dof.data,
48846  * <double*> nodalAverage.data)
48847  * def parametricFiniteElementSpace_getValuesGlobalExteriorTrace(np.ndarray exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
48848  * np.ndarray elementBoundaryElementsArray,
48849  * np.ndarray elementBoundaryLocalElementBoundariesArray,
48850  */
48851  __pyx_tuple__325 = PyTuple_Pack(9, __pyx_n_s_exteriorElementBoundariesArray, __pyx_n_s_elementBoundaryElementsArray, __pyx_n_s_elementBoundaryLocalElementBound_2, __pyx_n_s_psi, __pyx_n_s_vArray, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nElementBoundaryQuadraturePoints, __pyx_n_s_nDOF_element, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_tuple__325)) __PYX_ERR(0, 5715, __pyx_L1_error)
48852  __Pyx_GOTREF(__pyx_tuple__325);
48853  __Pyx_GIVEREF(__pyx_tuple__325);
48854  __pyx_codeobj__326 = (PyObject*)__Pyx_PyCode_New(5, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__325, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_parametricFiniteElementSpace_get_6, 5715, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__326)) __PYX_ERR(0, 5715, __pyx_L1_error)
48855 
48856  /* "cfemIntegrals.pyx":5733
48857  * <double*> psi.data,
48858  * <double*> vArray.data)
48859  * def parametricFiniteElementSpace_getGradientValuesGlobalExteriorTrace(np.ndarray exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
48860  * np.ndarray elementBoundaryElementsArray,
48861  * np.ndarray elementBoundaryLocalElementBoundariesArray,
48862  */
48863  __pyx_tuple__327 = PyTuple_Pack(11, __pyx_n_s_exteriorElementBoundariesArray, __pyx_n_s_elementBoundaryElementsArray, __pyx_n_s_elementBoundaryLocalElementBound_2, __pyx_n_s_grad_psi, __pyx_n_s_inverseJacobianArray, __pyx_n_s_grad_vArray, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nElementBoundaryQuadraturePoints, __pyx_n_s_nDOF_element, __pyx_n_s_nSpace_global, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_tuple__327)) __PYX_ERR(0, 5733, __pyx_L1_error)
48864  __Pyx_GOTREF(__pyx_tuple__327);
48865  __Pyx_GIVEREF(__pyx_tuple__327);
48866  __pyx_codeobj__328 = (PyObject*)__Pyx_PyCode_New(6, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__327, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_parametricFiniteElementSpace_get_7, 5733, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__328)) __PYX_ERR(0, 5733, __pyx_L1_error)
48867 
48868  /* "cfemIntegrals.pyx":5755
48869  * <double*> inverseJacobianArray.data,
48870  * <double*> grad_vArray.data)
48871  * def parametricMaps_getValuesGlobalExteriorTrace(np.ndarray exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
48872  * np.ndarray elementBoundaryElementsArray,
48873  * np.ndarray elementBoundaryLocalElementBoundariesArray,
48874  */
48875  __pyx_tuple__329 = PyTuple_Pack(11, __pyx_n_s_exteriorElementBoundariesArray, __pyx_n_s_elementBoundaryElementsArray, __pyx_n_s_elementBoundaryLocalElementBound_2, __pyx_n_s_psi, __pyx_n_s_l2g, __pyx_n_s_nodeArray, __pyx_n_s_xArray, __pyx_n_s_nQuadraturePoints_elementBoundar, __pyx_n_s_nDOF_element, __pyx_n_s_nSpace_global, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_tuple__329)) __PYX_ERR(0, 5755, __pyx_L1_error)
48876  __Pyx_GOTREF(__pyx_tuple__329);
48877  __Pyx_GIVEREF(__pyx_tuple__329);
48878  __pyx_codeobj__330 = (PyObject*)__Pyx_PyCode_New(7, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__329, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_parametricMaps_getValuesGlobalEx, 5755, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__330)) __PYX_ERR(0, 5755, __pyx_L1_error)
48879 
48880  /* "cfemIntegrals.pyx":5777
48881  * <double*> nodeArray.data,
48882  * <double*> xArray.data)
48883  * def parametricMaps_getInverseValuesGlobalExteriorTrace(np.ndarray exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
48884  * np.ndarray elementBoundaryElementsArray,
48885  * np.ndarray elementBoundaryLocalElementBoundariesArray,
48886  */
48887  __pyx_tuple__331 = PyTuple_Pack(12, __pyx_n_s_exteriorElementBoundariesArray, __pyx_n_s_elementBoundaryElementsArray, __pyx_n_s_elementBoundaryLocalElementBound_2, __pyx_n_s_inverseJacobian, __pyx_n_s_l2g, __pyx_n_s_nodeArray, __pyx_n_s_xArray, __pyx_n_s_xiArray, __pyx_n_s_nElementBoundaryQuadraturePoints, __pyx_n_s_nDOF_element, __pyx_n_s_nSpace_global, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_tuple__331)) __PYX_ERR(0, 5777, __pyx_L1_error)
48888  __Pyx_GOTREF(__pyx_tuple__331);
48889  __Pyx_GIVEREF(__pyx_tuple__331);
48890  __pyx_codeobj__332 = (PyObject*)__Pyx_PyCode_New(8, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__331, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_parametricMaps_getInverseValuesG, 5777, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__332)) __PYX_ERR(0, 5777, __pyx_L1_error)
48891 
48892  /* "cfemIntegrals.pyx":5801
48893  * <double*> xArray.data,
48894  * <double*> xiArray.data)
48895  * def parametricMaps_getJacobianValuesGlobalExteriorTrace(np.ndarray exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
48896  * np.ndarray elementBoundaryElementsArray,
48897  * np.ndarray elementBoundaryLocalElementBoundariesArray,
48898  */
48899  __pyx_tuple__333 = PyTuple_Pack(13, __pyx_n_s_exteriorElementBoundariesArray, __pyx_n_s_elementBoundaryElementsArray, __pyx_n_s_elementBoundaryLocalElementBound_2, __pyx_n_s_grad_psi, __pyx_n_s_boundaryNormals, __pyx_n_s_boundaryJacobians, __pyx_n_s_l2g, __pyx_n_s_nodeArray, __pyx_n_s_jacobianInverseArray, __pyx_n_s_metricTensorArray, __pyx_n_s_metricTensorDeterminantSqrtArray, __pyx_n_s_unitNormalArray, __pyx_n_s_nd); if (unlikely(!__pyx_tuple__333)) __PYX_ERR(0, 5801, __pyx_L1_error)
48900  __Pyx_GOTREF(__pyx_tuple__333);
48901  __Pyx_GIVEREF(__pyx_tuple__333);
48902  __pyx_codeobj__334 = (PyObject*)__Pyx_PyCode_New(12, 0, 13, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__333, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_parametricMaps_getJacobianValues_3, 5801, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__334)) __PYX_ERR(0, 5801, __pyx_L1_error)
48903 
48904  /* "cfemIntegrals.pyx":5864
48905  * else:
48906  * print("error in getJacobianValuesTrace...jacobianInverse not sized properly")
48907  * def parametricMaps_getJacobianValuesGlobalExteriorTrace_movingDomain(np.ndarray exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
48908  * np.ndarray elementBoundaryElementsArray,
48909  * np.ndarray elementBoundaryLocalElementBoundariesArray,
48910  */
48911  __pyx_tuple__335 = PyTuple_Pack(14, __pyx_n_s_exteriorElementBoundariesArray, __pyx_n_s_elementBoundaryElementsArray, __pyx_n_s_elementBoundaryLocalElementBound_2, __pyx_n_s_xtArray, __pyx_n_s_grad_psi, __pyx_n_s_boundaryNormals, __pyx_n_s_boundaryJacobians, __pyx_n_s_l2g, __pyx_n_s_nodeArray, __pyx_n_s_jacobianInverseArray, __pyx_n_s_metricTensorArray, __pyx_n_s_metricTensorDeterminantSqrtArray, __pyx_n_s_unitNormalArray, __pyx_n_s_nd); if (unlikely(!__pyx_tuple__335)) __PYX_ERR(0, 5864, __pyx_L1_error)
48912  __Pyx_GOTREF(__pyx_tuple__335);
48913  __Pyx_GIVEREF(__pyx_tuple__335);
48914  __pyx_codeobj__336 = (PyObject*)__Pyx_PyCode_New(13, 0, 14, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__335, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_parametricMaps_getJacobianValues_4, 5864, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__336)) __PYX_ERR(0, 5864, __pyx_L1_error)
48915 
48916  /* "cfemIntegrals.pyx":5929
48917  * else:
48918  * print("error in getJacobianValuesTrace...jacobianInverse not sized properly")
48919  * def calculateWeightedShapeGlobalExteriorTrace(np.ndarray exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
48920  * np.ndarray elementBoundaryElementsArray,
48921  * np.ndarray elementBoundaryLocalElementBoundariesArray,
48922  */
48923  __pyx_tuple__337 = PyTuple_Pack(10, __pyx_n_s_exteriorElementBoundariesArray, __pyx_n_s_elementBoundaryElementsArray, __pyx_n_s_elementBoundaryLocalElementBound_2, __pyx_n_s_dSR, __pyx_n_s_sqrt_det_g, __pyx_n_s_w, __pyx_n_s_w_dS, __pyx_n_s_nElementBoundaryQuadraturePoints, __pyx_n_s_nDOF_test_element, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_tuple__337)) __PYX_ERR(0, 5929, __pyx_L1_error)
48924  __Pyx_GOTREF(__pyx_tuple__337);
48925  __Pyx_GIVEREF(__pyx_tuple__337);
48926  __pyx_codeobj__338 = (PyObject*)__Pyx_PyCode_New(7, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__337, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_calculateWeightedShapeGlobalExte, 5929, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__338)) __PYX_ERR(0, 5929, __pyx_L1_error)
48927 
48928  /* "cfemIntegrals.pyx":5949
48929  * <double*> w.data,
48930  * <double*> w_dS.data)
48931  * def calculateShape_X_weightedShapeGlobalExteriorTrace(np.ndarray exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
48932  * np.ndarray elementBoundaryElementsArray,
48933  * np.ndarray elementBoundaryLocalElementBoundariesArray,
48934  */
48935  __pyx_tuple__339 = PyTuple_Pack(10, __pyx_n_s_exteriorElementBoundariesArray, __pyx_n_s_elementBoundaryElementsArray, __pyx_n_s_elementBoundaryLocalElementBound_2, __pyx_n_s_v, __pyx_n_s_w_dS, __pyx_n_s_v_X_w_dS, __pyx_n_s_nElementBoundaryQuadraturePoints, __pyx_n_s_nDOF_trial_element, __pyx_n_s_nDOF_test_element, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_tuple__339)) __PYX_ERR(0, 5949, __pyx_L1_error)
48936  __Pyx_GOTREF(__pyx_tuple__339);
48937  __Pyx_GIVEREF(__pyx_tuple__339);
48938  __pyx_codeobj__340 = (PyObject*)__Pyx_PyCode_New(6, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__339, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_calculateShape_X_weightedShapeGl, 5949, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__340)) __PYX_ERR(0, 5949, __pyx_L1_error)
48939 
48940  /* "cfemIntegrals.pyx":5969
48941  * <double*> w_dS.data,
48942  * <double*> v_X_w_dS.data)
48943  * def calculateGradShape_X_weightedShapeGlobalExteriorTrace(np.ndarray exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
48944  * np.ndarray elementBoundaryElementsArray,
48945  * np.ndarray elementBoundaryLocalElementBoundariesArray,
48946  */
48947  __pyx_tuple__341 = PyTuple_Pack(11, __pyx_n_s_exteriorElementBoundariesArray, __pyx_n_s_elementBoundaryElementsArray, __pyx_n_s_elementBoundaryLocalElementBound_2, __pyx_n_s_grad_v, __pyx_n_s_w_dS, __pyx_n_s_grad_v_X_w_dS, __pyx_n_s_nElementBoundaryQuadraturePoints, __pyx_n_s_nDOF_trial_element, __pyx_n_s_nDOF_test_element, __pyx_n_s_nSpace, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_tuple__341)) __PYX_ERR(0, 5969, __pyx_L1_error)
48948  __Pyx_GOTREF(__pyx_tuple__341);
48949  __Pyx_GIVEREF(__pyx_tuple__341);
48950  __pyx_codeobj__342 = (PyObject*)__Pyx_PyCode_New(6, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__341, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_calculateGradShape_X_weightedSha_3, 5969, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__342)) __PYX_ERR(0, 5969, __pyx_L1_error)
48951 
48952  /* "cfemIntegrals.pyx":5991
48953  * <double*> w_dS.data,
48954  * <double*> grad_v_X_w_dS.data)
48955  * def calculateGlobalExteriorElementBoundaryIntegrationWeights(int nQuadraturePoints_elementBoundary, # <<<<<<<<<<<<<<
48956  * int nExteriorElementBoundaries_global,
48957  * np.ndarray sqrt_det_g,
48958  */
48959  __pyx_tuple__343 = PyTuple_Pack(5, __pyx_n_s_nQuadraturePoints_elementBoundar, __pyx_n_s_nExteriorElementBoundaries_globa, __pyx_n_s_sqrt_det_g, __pyx_n_s_referenceWeights, __pyx_n_s_weights); if (unlikely(!__pyx_tuple__343)) __PYX_ERR(0, 5991, __pyx_L1_error)
48960  __Pyx_GOTREF(__pyx_tuple__343);
48961  __Pyx_GIVEREF(__pyx_tuple__343);
48962  __pyx_codeobj__344 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__343, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_calculateGlobalExteriorElementBo, 5991, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__344)) __PYX_ERR(0, 5991, __pyx_L1_error)
48963 
48964  /* "cfemIntegrals.pyx":6001
48965  * <double*> referenceWeights.data,
48966  * <double*> weights.data)
48967  * def calculateFiniteElementFunctionValuesGlobalExteriorTrace(np.ndarray exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
48968  * np.ndarray elementBoundaryElementsArray,
48969  * np.ndarray elementBoundaryLocalElementBoundariesArray,
48970  */
48971  __pyx_tuple__345 = PyTuple_Pack(12, __pyx_n_s_exteriorElementBoundariesArray, __pyx_n_s_elementBoundaryElementsArray, __pyx_n_s_elementBoundaryLocalElementBound_2, __pyx_n_s_l2g, __pyx_n_s_dof, __pyx_n_s_v, __pyx_n_s_u, __pyx_n_s_nQuadraturePoints_elementBoundar, __pyx_n_s_nDOF_trial_element, __pyx_n_s_nExteriorElementBoundaries_globa, __pyx_n_s_nComponents, __pyx_n_s_nd); if (unlikely(!__pyx_tuple__345)) __PYX_ERR(0, 6001, __pyx_L1_error)
48972  __Pyx_GOTREF(__pyx_tuple__345);
48973  __Pyx_GIVEREF(__pyx_tuple__345);
48974  __pyx_codeobj__346 = (PyObject*)__Pyx_PyCode_New(7, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__345, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_calculateFiniteElementFunctionVa_3, 6001, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__346)) __PYX_ERR(0, 6001, __pyx_L1_error)
48975 
48976  /* "cfemIntegrals.pyx":6028
48977  * <double*> v.data,
48978  * <double*> u.data)
48979  * def calculateFiniteElementFunctionGradientValuesGlobalExteriorTrace(np.ndarray exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
48980  * np.ndarray elementBoundaryElementsArray,
48981  * np.ndarray elementBoundaryLocalElementBoundariesArray,
48982  */
48983  __pyx_tuple__347 = PyTuple_Pack(13, __pyx_n_s_exteriorElementBoundariesArray, __pyx_n_s_elementBoundaryElementsArray, __pyx_n_s_elementBoundaryLocalElementBound_2, __pyx_n_s_l2g, __pyx_n_s_dof, __pyx_n_s_grad_v, __pyx_n_s_grad_u, __pyx_n_s_nQuadraturePoints_elementBoundar, __pyx_n_s_nDOF_trial_element, __pyx_n_s_nExteriorElementBoundaries_globa, __pyx_n_s_nComponents, __pyx_n_s_nSpace, __pyx_n_s_nd); if (unlikely(!__pyx_tuple__347)) __PYX_ERR(0, 6028, __pyx_L1_error)
48984  __Pyx_GOTREF(__pyx_tuple__347);
48985  __Pyx_GIVEREF(__pyx_tuple__347);
48986  __pyx_codeobj__348 = (PyObject*)__Pyx_PyCode_New(7, 0, 13, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__347, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_calculateFiniteElementFunctionGr_4, 6028, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__348)) __PYX_ERR(0, 6028, __pyx_L1_error)
48987 
48988  /* "cfemIntegrals.pyx":6059
48989  * <double*> grad_v.data,
48990  * <double*> grad_u.data)
48991  * def copyBetweenFreeUnknownsAndGlobalUnknowns(int nDOF2set, # <<<<<<<<<<<<<<
48992  * int offset,
48993  * int stride,
48994  */
48995  __pyx_tuple__349 = PyTuple_Pack(7, __pyx_n_s_nDOF2set, __pyx_n_s_offset, __pyx_n_s_stride, __pyx_n_s_globalDOFids, __pyx_n_s_freeDOFids, __pyx_n_s_free_u, __pyx_n_s_u); if (unlikely(!__pyx_tuple__349)) __PYX_ERR(0, 6059, __pyx_L1_error)
48996  __Pyx_GOTREF(__pyx_tuple__349);
48997  __Pyx_GIVEREF(__pyx_tuple__349);
48998  __pyx_codeobj__350 = (PyObject*)__Pyx_PyCode_New(7, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__349, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_copyBetweenFreeUnknownsAndGlobal, 6059, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__350)) __PYX_ERR(0, 6059, __pyx_L1_error)
48999 
49000  /* "cfemIntegrals.pyx":6084
49001  * else:
49002  * print("error copyFromFreeToGlobal = ", nDOF2set, " not recognized quitting\n")
49003  * def updateInteriorElementBoundaryDiffusionAdjoint(np.ndarray interiorElementBoundaries, # <<<<<<<<<<<<<<
49004  * np.ndarray elementBoundaryElements,
49005  * np.ndarray elementBoundaryLocalElementBoundaries,
49006  */
49007  __pyx_tuple__351 = PyTuple_Pack(15, __pyx_n_s_interiorElementBoundaries, __pyx_n_s_elementBoundaryElements, __pyx_n_s_elementBoundaryLocalElementBound, __pyx_n_s_sigma, __pyx_n_s_u, __pyx_n_s_n, __pyx_n_s_a, __pyx_n_s_grad_w, __pyx_n_s_dS, __pyx_n_s_residual, __pyx_n_s_nInteriorElementBoundaries_globa, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nQuadraturePoints_elementBoundar, __pyx_n_s_nDOF_test_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__351)) __PYX_ERR(0, 6084, __pyx_L1_error)
49008  __Pyx_GOTREF(__pyx_tuple__351);
49009  __Pyx_GIVEREF(__pyx_tuple__351);
49010  __pyx_codeobj__352 = (PyObject*)__Pyx_PyCode_New(10, 0, 15, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__351, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateInteriorElementBoundaryDif_3, 6084, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__352)) __PYX_ERR(0, 6084, __pyx_L1_error)
49011 
49012  /* "cfemIntegrals.pyx":6114
49013  * <double*> dS.data,
49014  * <double*> residual.data)
49015  * def updateExteriorElementBoundaryDiffusionAdjoint(np.ndarray isDOFBoundary, # <<<<<<<<<<<<<<
49016  * np.ndarray exteriorElementBoundaries,
49017  * np.ndarray elementBoundaryElements,
49018  */
49019  __pyx_tuple__353 = PyTuple_Pack(16, __pyx_n_s_isDOFBoundary, __pyx_n_s_exteriorElementBoundaries, __pyx_n_s_elementBoundaryElements, __pyx_n_s_elementBoundaryLocalElementBound, __pyx_n_s_sigma, __pyx_n_s_u, __pyx_n_s_ub, __pyx_n_s_n, __pyx_n_s_a, __pyx_n_s_grad_w, __pyx_n_s_dS, __pyx_n_s_residual, __pyx_n_s_nExteriorElementBoundaries_globa, __pyx_n_s_nQuadraturePoints_elementBoundar, __pyx_n_s_nDOF_test_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__353)) __PYX_ERR(0, 6114, __pyx_L1_error)
49020  __Pyx_GOTREF(__pyx_tuple__353);
49021  __Pyx_GIVEREF(__pyx_tuple__353);
49022  __pyx_codeobj__354 = (PyObject*)__Pyx_PyCode_New(12, 0, 16, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__353, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateExteriorElementBoundaryDif_3, 6114, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__354)) __PYX_ERR(0, 6114, __pyx_L1_error)
49023 
49024  /* "cfemIntegrals.pyx":6146
49025  * <double*> dS.data,
49026  * <double*> residual.data)
49027  * def updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense(int offset_r, # <<<<<<<<<<<<<<
49028  * int stride_r,
49029  * int offset_u,
49030  */
49031  __pyx_tuple__355 = PyTuple_Pack(27, __pyx_n_s_offset_r, __pyx_n_s_stride_r, __pyx_n_s_offset_u, __pyx_n_s_stride_u, __pyx_n_s_nFreeVDOF_global, __pyx_n_s_interiorElementBoundaries, __pyx_n_s_elementBoundaryElements, __pyx_n_s_elementBoundaryLocalElementBound, __pyx_n_s_nFreeDOF_element_r, __pyx_n_s_freeLocal_r, __pyx_n_s_freeGlobal_r, __pyx_n_s_nFreeDOF_element_u, __pyx_n_s_freeLocal_u, __pyx_n_s_freeGlobal_u, __pyx_n_s_sigma, __pyx_n_s_v, __pyx_n_s_n, __pyx_n_s_a, __pyx_n_s_grad_w, __pyx_n_s_dS, __pyx_n_s_jac, __pyx_n_s_nInteriorElementBoundaries_globa, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nQuadraturePoints_elementBoundar, __pyx_n_s_nDOF_test_element, __pyx_n_s_nDOF_trial_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__355)) __PYX_ERR(0, 6146, __pyx_L1_error)
49032  __Pyx_GOTREF(__pyx_tuple__355);
49033  __Pyx_GIVEREF(__pyx_tuple__355);
49034  __pyx_codeobj__356 = (PyObject*)__Pyx_PyCode_New(21, 0, 27, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__355, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateGlobalJacobianFromInterior_7, 6146, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__356)) __PYX_ERR(0, 6146, __pyx_L1_error)
49035 
49036  /* "cfemIntegrals.pyx":6200
49037  * <double*> dS.data,
49038  * <double*> jac.data)
49039  * def updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense(int offset_r, # <<<<<<<<<<<<<<
49040  * int stride_r,
49041  * int offset_u,
49042  */
49043  __pyx_tuple__357 = PyTuple_Pack(27, __pyx_n_s_offset_r, __pyx_n_s_stride_r, __pyx_n_s_offset_u, __pyx_n_s_stride_u, __pyx_n_s_nFreeVDOF_global, __pyx_n_s_exteriorElementBoundaries, __pyx_n_s_elementBoundaryElements, __pyx_n_s_elementBoundaryLocalElementBound, __pyx_n_s_nFreeDOF_element_r, __pyx_n_s_freeLocal_r, __pyx_n_s_freeGlobal_r, __pyx_n_s_nFreeDOF_element_u, __pyx_n_s_freeLocal_u, __pyx_n_s_freeGlobal_u, __pyx_n_s_isDOFBoundary, __pyx_n_s_sigma, __pyx_n_s_v, __pyx_n_s_n, __pyx_n_s_a, __pyx_n_s_grad_w, __pyx_n_s_dS, __pyx_n_s_jac, __pyx_n_s_nExteriorElementBoundaries_globa, __pyx_n_s_nQuadraturePoints_elementBoundar, __pyx_n_s_nDOF_test_element, __pyx_n_s_nDOF_trial_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__357)) __PYX_ERR(0, 6200, __pyx_L1_error)
49044  __Pyx_GOTREF(__pyx_tuple__357);
49045  __Pyx_GIVEREF(__pyx_tuple__357);
49046  __pyx_codeobj__358 = (PyObject*)__Pyx_PyCode_New(22, 0, 27, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__357, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateGlobalJacobianFromExterior_5, 6200, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__358)) __PYX_ERR(0, 6200, __pyx_L1_error)
49047 
49048  /* "cfemIntegrals.pyx":6254
49049  * <double*> dS.data,
49050  * <double*> jac.data)
49051  * def updateInteriorElementBoundaryDiffusionAdjoint_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
49052  * np.ndarray colind,
49053  * np.ndarray interiorElementBoundaries,
49054  */
49055  __pyx_tuple__359 = PyTuple_Pack(17, __pyx_n_s_rowptr, __pyx_n_s_colind, __pyx_n_s_interiorElementBoundaries, __pyx_n_s_elementBoundaryElements, __pyx_n_s_elementBoundaryLocalElementBound, __pyx_n_s_sigma, __pyx_n_s_u, __pyx_n_s_n, __pyx_n_s_a, __pyx_n_s_grad_w, __pyx_n_s_dS, __pyx_n_s_residual, __pyx_n_s_nInteriorElementBoundaries_globa, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nQuadraturePoints_elementBoundar, __pyx_n_s_nDOF_test_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__359)) __PYX_ERR(0, 6254, __pyx_L1_error)
49056  __Pyx_GOTREF(__pyx_tuple__359);
49057  __Pyx_GIVEREF(__pyx_tuple__359);
49058  __pyx_codeobj__360 = (PyObject*)__Pyx_PyCode_New(12, 0, 17, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__359, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateInteriorElementBoundaryDif_4, 6254, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__360)) __PYX_ERR(0, 6254, __pyx_L1_error)
49059 
49060  /* "cfemIntegrals.pyx":6288
49061  * <double*> dS.data,
49062  * <double*> residual.data)
49063  * def updateExteriorElementBoundaryDiffusionAdjoint_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
49064  * np.ndarray colind,
49065  * np.ndarray isDOFBoundary,
49066  */
49067  __pyx_tuple__361 = PyTuple_Pack(18, __pyx_n_s_rowptr, __pyx_n_s_colind, __pyx_n_s_isDOFBoundary, __pyx_n_s_exteriorElementBoundaries, __pyx_n_s_elementBoundaryElements, __pyx_n_s_elementBoundaryLocalElementBound, __pyx_n_s_sigma, __pyx_n_s_u, __pyx_n_s_ub, __pyx_n_s_n, __pyx_n_s_a, __pyx_n_s_grad_w, __pyx_n_s_dS, __pyx_n_s_residual, __pyx_n_s_nExteriorElementBoundaries_globa, __pyx_n_s_nQuadraturePoints_elementBoundar, __pyx_n_s_nDOF_test_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__361)) __PYX_ERR(0, 6288, __pyx_L1_error)
49068  __Pyx_GOTREF(__pyx_tuple__361);
49069  __Pyx_GIVEREF(__pyx_tuple__361);
49070  __pyx_codeobj__362 = (PyObject*)__Pyx_PyCode_New(14, 0, 18, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__361, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateExteriorElementBoundaryDif_4, 6288, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__362)) __PYX_ERR(0, 6288, __pyx_L1_error)
49071 
49072  /* "cfemIntegrals.pyx":6324
49073  * <double*> dS.data,
49074  * <double*> residual.data)
49075  * def updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
49076  * np.ndarray colind,
49077  * int offset_r,
49078  */
49079  __pyx_tuple__363 = PyTuple_Pack(29, __pyx_n_s_rowptr, __pyx_n_s_colind, __pyx_n_s_offset_r, __pyx_n_s_stride_r, __pyx_n_s_offset_u, __pyx_n_s_stride_u, __pyx_n_s_nFreeVDOF_global, __pyx_n_s_interiorElementBoundaries, __pyx_n_s_elementBoundaryElements, __pyx_n_s_elementBoundaryLocalElementBound, __pyx_n_s_nFreeDOF_element_r, __pyx_n_s_freeLocal_r, __pyx_n_s_freeGlobal_r, __pyx_n_s_nFreeDOF_element_u, __pyx_n_s_freeLocal_u, __pyx_n_s_freeGlobal_u, __pyx_n_s_sigma, __pyx_n_s_v, __pyx_n_s_n, __pyx_n_s_a, __pyx_n_s_grad_w, __pyx_n_s_dS, __pyx_n_s_jac, __pyx_n_s_nInteriorElementBoundaries_globa, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nQuadraturePoints_elementBoundar, __pyx_n_s_nDOF_test_element, __pyx_n_s_nDOF_trial_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__363)) __PYX_ERR(0, 6324, __pyx_L1_error)
49080  __Pyx_GOTREF(__pyx_tuple__363);
49081  __Pyx_GIVEREF(__pyx_tuple__363);
49082  __pyx_codeobj__364 = (PyObject*)__Pyx_PyCode_New(23, 0, 29, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__363, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateGlobalJacobianFromInterior_8, 6324, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__364)) __PYX_ERR(0, 6324, __pyx_L1_error)
49083 
49084  /* "cfemIntegrals.pyx":6382
49085  * <double*> dS.data,
49086  * <double*> jac.data)
49087  * def updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
49088  * np.ndarray colind,
49089  * int offset_r,
49090  */
49091  __pyx_tuple__365 = PyTuple_Pack(29, __pyx_n_s_rowptr, __pyx_n_s_colind, __pyx_n_s_offset_r, __pyx_n_s_stride_r, __pyx_n_s_offset_u, __pyx_n_s_stride_u, __pyx_n_s_nFreeVDOF_global, __pyx_n_s_exteriorElementBoundaries, __pyx_n_s_elementBoundaryElements, __pyx_n_s_elementBoundaryLocalElementBound, __pyx_n_s_nFreeDOF_element_r, __pyx_n_s_freeLocal_r, __pyx_n_s_freeGlobal_r, __pyx_n_s_nFreeDOF_element_u, __pyx_n_s_freeLocal_u, __pyx_n_s_freeGlobal_u, __pyx_n_s_isDOFBoundary, __pyx_n_s_sigma, __pyx_n_s_v, __pyx_n_s_n, __pyx_n_s_a, __pyx_n_s_grad_w, __pyx_n_s_dS, __pyx_n_s_jac, __pyx_n_s_nExteriorElementBoundaries_globa, __pyx_n_s_nQuadraturePoints_elementBoundar, __pyx_n_s_nDOF_test_element, __pyx_n_s_nDOF_trial_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__365)) __PYX_ERR(0, 6382, __pyx_L1_error)
49092  __Pyx_GOTREF(__pyx_tuple__365);
49093  __Pyx_GIVEREF(__pyx_tuple__365);
49094  __pyx_codeobj__366 = (PyObject*)__Pyx_PyCode_New(24, 0, 29, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__365, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateGlobalJacobianFromExterior_6, 6382, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__366)) __PYX_ERR(0, 6382, __pyx_L1_error)
49095 
49096  /* "cfemIntegrals.pyx":6440
49097  * <double*> dS.data,
49098  * <double*> jac.data)
49099  * def updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_CSR_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
49100  * np.ndarray colind,
49101  * int offset_r,
49102  */
49103  __pyx_tuple__367 = PyTuple_Pack(34, __pyx_n_s_rowptr, __pyx_n_s_colind, __pyx_n_s_offset_r, __pyx_n_s_stride_r, __pyx_n_s_offset_u, __pyx_n_s_stride_u, __pyx_n_s_nFreeVDOF_global, __pyx_n_s_interiorElementBoundaries, __pyx_n_s_elementBoundaryElements, __pyx_n_s_elementBoundaryLocalElementBound, __pyx_n_s_nFreeDOF_element_r, __pyx_n_s_freeLocal_r, __pyx_n_s_freeGlobal_r, __pyx_n_s_nFreeDOF_element_u, __pyx_n_s_freeLocal_u, __pyx_n_s_freeGlobal_u, __pyx_n_s_csrRowIndeces_ru, __pyx_n_s_csrColumnOffsets_eb_ru, __pyx_n_s_sigma, __pyx_n_s_v, __pyx_n_s_n, __pyx_n_s_a, __pyx_n_s_grad_w, __pyx_n_s_dS, __pyx_n_s_jac, __pyx_n_s_rowptr_dummy, __pyx_n_s_colind_dummy, __pyx_n_s_jac_array, __pyx_n_s_nInteriorElementBoundaries_globa, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nQuadraturePoints_elementBoundar, __pyx_n_s_nDOF_test_element, __pyx_n_s_nDOF_trial_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__367)) __PYX_ERR(0, 6440, __pyx_L1_error)
49104  __Pyx_GOTREF(__pyx_tuple__367);
49105  __Pyx_GIVEREF(__pyx_tuple__367);
49106  __pyx_codeobj__368 = (PyObject*)__Pyx_PyCode_New(25, 0, 34, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__367, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateGlobalJacobianFromInterior_9, 6440, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__368)) __PYX_ERR(0, 6440, __pyx_L1_error)
49107 
49108  /* "cfemIntegrals.pyx":6504
49109  * <double*> dS.data,
49110  * <double*> jac_array.data)
49111  * def updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_CSR_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
49112  * np.ndarray colind,
49113  * int offset_r,
49114  */
49115  __pyx_tuple__369 = PyTuple_Pack(34, __pyx_n_s_rowptr, __pyx_n_s_colind, __pyx_n_s_offset_r, __pyx_n_s_stride_r, __pyx_n_s_offset_u, __pyx_n_s_stride_u, __pyx_n_s_nFreeVDOF_global, __pyx_n_s_exteriorElementBoundaries, __pyx_n_s_elementBoundaryElements, __pyx_n_s_elementBoundaryLocalElementBound, __pyx_n_s_nFreeDOF_element_r, __pyx_n_s_freeLocal_r, __pyx_n_s_freeGlobal_r, __pyx_n_s_nFreeDOF_element_u, __pyx_n_s_freeLocal_u, __pyx_n_s_freeGlobal_u, __pyx_n_s_csrRowIndeces_ru, __pyx_n_s_csrColumnOffsets_eb_ru, __pyx_n_s_isDOFBoundary, __pyx_n_s_sigma, __pyx_n_s_v, __pyx_n_s_n, __pyx_n_s_a, __pyx_n_s_grad_w, __pyx_n_s_dS, __pyx_n_s_jac, __pyx_n_s_rowptr_dummy, __pyx_n_s_colind_dummy, __pyx_n_s_jac_array, __pyx_n_s_nExteriorElementBoundaries_globa, __pyx_n_s_nQuadraturePoints_elementBoundar, __pyx_n_s_nDOF_test_element, __pyx_n_s_nDOF_trial_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__369)) __PYX_ERR(0, 6504, __pyx_L1_error)
49116  __Pyx_GOTREF(__pyx_tuple__369);
49117  __Pyx_GIVEREF(__pyx_tuple__369);
49118  __pyx_codeobj__370 = (PyObject*)__Pyx_PyCode_New(26, 0, 34, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__369, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateGlobalJacobianFromExterior_7, 6504, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__370)) __PYX_ERR(0, 6504, __pyx_L1_error)
49119 
49120  /* "cfemIntegrals.pyx":6568
49121  * <double*> dS.data,
49122  * <double*> jac_array.data)
49123  * def update_f_movingDomain(np.ndarray xt, # <<<<<<<<<<<<<<
49124  * np.ndarray m,
49125  * np.ndarray f):
49126  */
49127  __pyx_tuple__371 = PyTuple_Pack(3, __pyx_n_s_xt, __pyx_n_s_m, __pyx_n_s_f); if (unlikely(!__pyx_tuple__371)) __PYX_ERR(0, 6568, __pyx_L1_error)
49128  __Pyx_GOTREF(__pyx_tuple__371);
49129  __Pyx_GIVEREF(__pyx_tuple__371);
49130  __pyx_codeobj__372 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__371, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_update_f_movingDomain, 6568, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__372)) __PYX_ERR(0, 6568, __pyx_L1_error)
49131 
49132  /* "cfemIntegrals.pyx":6586
49133  * <double*> m.data,
49134  * <double*> f.data)
49135  * def update_f_movingDomain_constantMass(np.ndarray xt, # <<<<<<<<<<<<<<
49136  * np.ndarray f):
49137  * if f.ndim == 3:
49138  */
49139  __pyx_tuple__373 = PyTuple_Pack(2, __pyx_n_s_xt, __pyx_n_s_f); if (unlikely(!__pyx_tuple__373)) __PYX_ERR(0, 6586, __pyx_L1_error)
49140  __Pyx_GOTREF(__pyx_tuple__373);
49141  __Pyx_GIVEREF(__pyx_tuple__373);
49142  __pyx_codeobj__374 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__373, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_update_f_movingDomain_constantMa, 6586, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__374)) __PYX_ERR(0, 6586, __pyx_L1_error)
49143 
49144  /* "cfemIntegrals.pyx":6601
49145  * <double*> xt.data,
49146  * <double*> f.data)
49147  * def updateStress_weak(np.ndarray sigma, # <<<<<<<<<<<<<<
49148  * np.ndarray grad_w_dV,
49149  * np.ndarray weak_residual_x,
49150  */
49151  __pyx_tuple__375 = PyTuple_Pack(9, __pyx_n_s_sigma, __pyx_n_s_grad_w_dV, __pyx_n_s_weak_residual_x, __pyx_n_s_weak_residual_y, __pyx_n_s_weak_residual_z, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_test_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__375)) __PYX_ERR(0, 6601, __pyx_L1_error)
49152  __Pyx_GOTREF(__pyx_tuple__375);
49153  __Pyx_GIVEREF(__pyx_tuple__375);
49154  __pyx_codeobj__376 = (PyObject*)__Pyx_PyCode_New(5, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__375, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateStress_weak, 6601, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__376)) __PYX_ERR(0, 6601, __pyx_L1_error)
49155 
49156  /* "cfemIntegrals.pyx":6619
49157  * <double*> weak_residual_y.data,
49158  * <double*> weak_residual_z.data)
49159  * def updateStressJacobian_weak(np.ndarray dsigma_xx, # <<<<<<<<<<<<<<
49160  * np.ndarray dsigma_xy,
49161  * np.ndarray dsigma_xz,
49162  */
49163  __pyx_tuple__377 = PyTuple_Pack(25, __pyx_n_s_dsigma_xx, __pyx_n_s_dsigma_xy, __pyx_n_s_dsigma_xz, __pyx_n_s_dsigma_yx, __pyx_n_s_dsigma_yy, __pyx_n_s_dsigma_yz, __pyx_n_s_dsigma_zx, __pyx_n_s_dsigma_zy, __pyx_n_s_dsigma_zz, __pyx_n_s_grad_v, __pyx_n_s_grad_w_dV, __pyx_n_s_jacobian_weak_residual_xx, __pyx_n_s_jacobian_weak_residual_xy, __pyx_n_s_jacobian_weak_residual_xz, __pyx_n_s_jacobian_weak_residual_yx, __pyx_n_s_jacobian_weak_residual_yy, __pyx_n_s_jacobian_weak_residual_yz, __pyx_n_s_jacobian_weak_residual_zx, __pyx_n_s_jacobian_weak_residual_zy, __pyx_n_s_jacobian_weak_residual_zz, __pyx_n_s_nElements_global, __pyx_n_s_nQuadraturePoints_element, __pyx_n_s_nDOF_trial_element, __pyx_n_s_nDOF_test_element, __pyx_n_s_nSpace); if (unlikely(!__pyx_tuple__377)) __PYX_ERR(0, 6619, __pyx_L1_error)
49164  __Pyx_GOTREF(__pyx_tuple__377);
49165  __Pyx_GIVEREF(__pyx_tuple__377);
49166  __pyx_codeobj__378 = (PyObject*)__Pyx_PyCode_New(20, 0, 25, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__377, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateStressJacobian_weak, 6619, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__378)) __PYX_ERR(0, 6619, __pyx_L1_error)
49167 
49168  /* "cfemIntegrals.pyx":6669
49169  * <double*> jacobian_weak_residual_zy.data,
49170  * <double*> jacobian_weak_residual_zz.data)
49171  * def projectFromNodalInterpolationConditions(int dim_dof, # <<<<<<<<<<<<<<
49172  * np.ndarray l2g,
49173  * np.ndarray functional_map_element,
49174  */
49175  __pyx_tuple__379 = PyTuple_Pack(7, __pyx_n_s_dim_dof, __pyx_n_s_l2g, __pyx_n_s_functional_map_element, __pyx_n_s_interpolationValues, __pyx_n_s_dofs, __pyx_n_s_nElements_global, __pyx_n_s_nDOF_element); if (unlikely(!__pyx_tuple__379)) __PYX_ERR(0, 6669, __pyx_L1_error)
49176  __Pyx_GOTREF(__pyx_tuple__379);
49177  __Pyx_GIVEREF(__pyx_tuple__379);
49178  __pyx_codeobj__380 = (PyObject*)__Pyx_PyCode_New(5, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__379, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_projectFromNodalInterpolationCon, 6669, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__380)) __PYX_ERR(0, 6669, __pyx_L1_error)
49179 
49180  /* "cfemIntegrals.pyx":6683
49181  * <double*> interpolationValues.data,
49182  * <double*> dofs.data)
49183  * def calculateVelocityQuadrature_MixedForm2_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
49184  * np.ndarray colind,
49185  * np.ndarray qa,
49186  */
49187  __pyx_tuple__381 = PyTuple_Pack(9, __pyx_n_s_rowptr, __pyx_n_s_colind, __pyx_n_s_qa, __pyx_n_s_qw_dV, __pyx_n_s_b, __pyx_n_s_v, __pyx_n_s_V, __pyx_n_s_qv, __pyx_n_s_qV); if (unlikely(!__pyx_tuple__381)) __PYX_ERR(0, 6683, __pyx_L1_error)
49188  __Pyx_GOTREF(__pyx_tuple__381);
49189  __Pyx_GIVEREF(__pyx_tuple__381);
49190  __pyx_codeobj__382 = (PyObject*)__Pyx_PyCode_New(9, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__381, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_calculateVelocityQuadrature_Mixe_3, 6683, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__382)) __PYX_ERR(0, 6683, __pyx_L1_error)
49191 
49192  /* "cfemIntegrals.pyx":6708
49193  * <double*> qV.data)
49194  *
49195  * def updateDiffusion_MixedForm_weak_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
49196  * np.ndarray colind,
49197  * np.ndarray a,
49198  */
49199  __pyx_tuple__383 = PyTuple_Pack(8, __pyx_n_s_rowptr, __pyx_n_s_colind, __pyx_n_s_a, __pyx_n_s_qV, __pyx_n_s_grad_w_dV, __pyx_n_s_velocity, __pyx_n_s_residual, __pyx_n_s_rho_split); if (unlikely(!__pyx_tuple__383)) __PYX_ERR(0, 6708, __pyx_L1_error)
49200  __Pyx_GOTREF(__pyx_tuple__383);
49201  __Pyx_GIVEREF(__pyx_tuple__383);
49202  __pyx_codeobj__384 = (PyObject*)__Pyx_PyCode_New(8, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__383, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateDiffusion_MixedForm_weak_s, 6708, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__384)) __PYX_ERR(0, 6708, __pyx_L1_error)
49203 
49204  /* "cfemIntegrals.pyx":6729
49205  * <double*> residual.data)
49206  *
49207  * def calculateVelocityQuadrature_MixedForm2_Jacobian_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
49208  * np.ndarray colind,
49209  * np.ndarray qa,
49210  */
49211  __pyx_tuple__385 = PyTuple_Pack(12, __pyx_n_s_rowptr, __pyx_n_s_colind, __pyx_n_s_qa, __pyx_n_s_qw_dV, __pyx_n_s_db, __pyx_n_s_db_eb, __pyx_n_s_v, __pyx_n_s_DV, __pyx_n_s_DV_eb, __pyx_n_s_qv, __pyx_n_s_qDV, __pyx_n_s_qDV_eb); if (unlikely(!__pyx_tuple__385)) __PYX_ERR(0, 6729, __pyx_L1_error)
49212  __Pyx_GOTREF(__pyx_tuple__385);
49213  __Pyx_GIVEREF(__pyx_tuple__385);
49214  __pyx_codeobj__386 = (PyObject*)__Pyx_PyCode_New(12, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__385, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_calculateVelocityQuadrature_Mixe_4, 6729, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__386)) __PYX_ERR(0, 6729, __pyx_L1_error)
49215 
49216  /* "cfemIntegrals.pyx":6759
49217  * <double*> qDV.data,
49218  * <double*> qDV_eb.data)
49219  * def updateDiffusionJacobian_MixedForm_weak_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
49220  * np.ndarray colind,
49221  * np.ndarray a,
49222  */
49223  __pyx_tuple__387 = PyTuple_Pack(11, __pyx_n_s_rowptr, __pyx_n_s_colind, __pyx_n_s_a, __pyx_n_s_da, __pyx_n_s_qV, __pyx_n_s_qDV, __pyx_n_s_qDV_eb, __pyx_n_s_grad_w_dV, __pyx_n_s_v, __pyx_n_s_jacobian, __pyx_n_s_jacobian_eb); if (unlikely(!__pyx_tuple__387)) __PYX_ERR(0, 6759, __pyx_L1_error)
49224  __Pyx_GOTREF(__pyx_tuple__387);
49225  __Pyx_GIVEREF(__pyx_tuple__387);
49226  __pyx_codeobj__388 = (PyObject*)__Pyx_PyCode_New(11, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__387, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cfemIntegrals_pyx, __pyx_n_s_updateDiffusionJacobian_MixedFor_2, 6759, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__388)) __PYX_ERR(0, 6759, __pyx_L1_error)
49227  __Pyx_RefNannyFinishContext();
49228  return 0;
49229  __pyx_L1_error:;
49230  __Pyx_RefNannyFinishContext();
49231  return -1;
49232 }
49233 
49234 static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
49235  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
49236  return 0;
49237  __pyx_L1_error:;
49238  return -1;
49239 }
49240 
49241 static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
49242 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
49243 static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
49244 static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
49245 static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
49246 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
49247 static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/
49248 
49249 static int __Pyx_modinit_global_init_code(void) {
49250  __Pyx_RefNannyDeclarations
49251  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
49252  /*--- Global init code ---*/
49253  __Pyx_RefNannyFinishContext();
49254  return 0;
49255 }
49256 
49257 static int __Pyx_modinit_variable_export_code(void) {
49258  __Pyx_RefNannyDeclarations
49259  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
49260  /*--- Variable export code ---*/
49261  __Pyx_RefNannyFinishContext();
49262  return 0;
49263 }
49264 
49265 static int __Pyx_modinit_function_export_code(void) {
49266  __Pyx_RefNannyDeclarations
49267  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
49268  /*--- Function export code ---*/
49269  __Pyx_RefNannyFinishContext();
49270  return 0;
49271 }
49272 
49273 static int __Pyx_modinit_type_init_code(void) {
49274  __Pyx_RefNannyDeclarations
49275  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
49276  /*--- Type init code ---*/
49277  __Pyx_RefNannyFinishContext();
49278  return 0;
49279 }
49280 
49281 static int __Pyx_modinit_type_import_code(void) {
49282  __Pyx_RefNannyDeclarations
49283  PyObject *__pyx_t_1 = NULL;
49284  int __pyx_lineno = 0;
49285  const char *__pyx_filename = NULL;
49286  int __pyx_clineno = 0;
49287  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
49288  /*--- Type import code ---*/
49289  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 9, __pyx_L1_error)
49290  __Pyx_GOTREF(__pyx_t_1);
49291  __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type",
49292  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
49293  sizeof(PyTypeObject),
49294  #else
49295  sizeof(PyHeapTypeObject),
49296  #endif
49297  __Pyx_ImportType_CheckSize_Warn);
49298  if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(2, 9, __pyx_L1_error)
49299  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
49300  __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 200, __pyx_L1_error)
49301  __Pyx_GOTREF(__pyx_t_1);
49302  __pyx_ptype_5numpy_dtype = __Pyx_ImportType(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __Pyx_ImportType_CheckSize_Ignore);
49303  if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(1, 200, __pyx_L1_error)
49304  __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Ignore);
49305  if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(1, 223, __pyx_L1_error)
49306  __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Ignore);
49307  if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(1, 227, __pyx_L1_error)
49308  __pyx_ptype_5numpy_ndarray = __Pyx_ImportType(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __Pyx_ImportType_CheckSize_Ignore);
49309  if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(1, 239, __pyx_L1_error)
49310  __pyx_ptype_5numpy_generic = __Pyx_ImportType(__pyx_t_1, "numpy", "generic", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
49311  if (!__pyx_ptype_5numpy_generic) __PYX_ERR(1, 771, __pyx_L1_error)
49312  __pyx_ptype_5numpy_number = __Pyx_ImportType(__pyx_t_1, "numpy", "number", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
49313  if (!__pyx_ptype_5numpy_number) __PYX_ERR(1, 773, __pyx_L1_error)
49314  __pyx_ptype_5numpy_integer = __Pyx_ImportType(__pyx_t_1, "numpy", "integer", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
49315  if (!__pyx_ptype_5numpy_integer) __PYX_ERR(1, 775, __pyx_L1_error)
49316  __pyx_ptype_5numpy_signedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "signedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
49317  if (!__pyx_ptype_5numpy_signedinteger) __PYX_ERR(1, 777, __pyx_L1_error)
49318  __pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "unsignedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
49319  if (!__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(1, 779, __pyx_L1_error)
49320  __pyx_ptype_5numpy_inexact = __Pyx_ImportType(__pyx_t_1, "numpy", "inexact", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
49321  if (!__pyx_ptype_5numpy_inexact) __PYX_ERR(1, 781, __pyx_L1_error)
49322  __pyx_ptype_5numpy_floating = __Pyx_ImportType(__pyx_t_1, "numpy", "floating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
49323  if (!__pyx_ptype_5numpy_floating) __PYX_ERR(1, 783, __pyx_L1_error)
49324  __pyx_ptype_5numpy_complexfloating = __Pyx_ImportType(__pyx_t_1, "numpy", "complexfloating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
49325  if (!__pyx_ptype_5numpy_complexfloating) __PYX_ERR(1, 785, __pyx_L1_error)
49326  __pyx_ptype_5numpy_flexible = __Pyx_ImportType(__pyx_t_1, "numpy", "flexible", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
49327  if (!__pyx_ptype_5numpy_flexible) __PYX_ERR(1, 787, __pyx_L1_error)
49328  __pyx_ptype_5numpy_character = __Pyx_ImportType(__pyx_t_1, "numpy", "character", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
49329  if (!__pyx_ptype_5numpy_character) __PYX_ERR(1, 789, __pyx_L1_error)
49330  __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Ignore);
49331  if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(1, 827, __pyx_L1_error)
49332  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
49333  __Pyx_RefNannyFinishContext();
49334  return 0;
49335  __pyx_L1_error:;
49336  __Pyx_XDECREF(__pyx_t_1);
49337  __Pyx_RefNannyFinishContext();
49338  return -1;
49339 }
49340 
49341 static int __Pyx_modinit_variable_import_code(void) {
49342  __Pyx_RefNannyDeclarations
49343  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
49344  /*--- Variable import code ---*/
49345  __Pyx_RefNannyFinishContext();
49346  return 0;
49347 }
49348 
49349 static int __Pyx_modinit_function_import_code(void) {
49350  __Pyx_RefNannyDeclarations
49351  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
49352  /*--- Function import code ---*/
49353  __Pyx_RefNannyFinishContext();
49354  return 0;
49355 }
49356 
49357 
49358 #ifndef CYTHON_NO_PYINIT_EXPORT
49359 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
49360 #elif PY_MAJOR_VERSION < 3
49361 #ifdef __cplusplus
49362 #define __Pyx_PyMODINIT_FUNC extern "C" void
49363 #else
49364 #define __Pyx_PyMODINIT_FUNC void
49365 #endif
49366 #else
49367 #ifdef __cplusplus
49368 #define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
49369 #else
49370 #define __Pyx_PyMODINIT_FUNC PyObject *
49371 #endif
49372 #endif
49373 
49374 
49375 #if PY_MAJOR_VERSION < 3
49376 __Pyx_PyMODINIT_FUNC initcfemIntegrals(void) CYTHON_SMALL_CODE; /*proto*/
49377 __Pyx_PyMODINIT_FUNC initcfemIntegrals(void)
49378 #else
49379 __Pyx_PyMODINIT_FUNC PyInit_cfemIntegrals(void) CYTHON_SMALL_CODE; /*proto*/
49380 __Pyx_PyMODINIT_FUNC PyInit_cfemIntegrals(void)
49381 #if CYTHON_PEP489_MULTI_PHASE_INIT
49382 {
49383  return PyModuleDef_Init(&__pyx_moduledef);
49384 }
49385 static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
49386  #if PY_VERSION_HEX >= 0x030700A1
49387  static PY_INT64_T main_interpreter_id = -1;
49388  PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
49389  if (main_interpreter_id == -1) {
49390  main_interpreter_id = current_id;
49391  return (unlikely(current_id == -1)) ? -1 : 0;
49392  } else if (unlikely(main_interpreter_id != current_id))
49393  #else
49394  static PyInterpreterState *main_interpreter = NULL;
49395  PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
49396  if (!main_interpreter) {
49397  main_interpreter = current_interpreter;
49398  } else if (unlikely(main_interpreter != current_interpreter))
49399  #endif
49400  {
49401  PyErr_SetString(
49402  PyExc_ImportError,
49403  "Interpreter change detected - this module can only be loaded into one interpreter per process.");
49404  return -1;
49405  }
49406  return 0;
49407 }
49408 static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) {
49409  PyObject *value = PyObject_GetAttrString(spec, from_name);
49410  int result = 0;
49411  if (likely(value)) {
49412  if (allow_none || value != Py_None) {
49413  result = PyDict_SetItemString(moddict, to_name, value);
49414  }
49415  Py_DECREF(value);
49416  } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
49417  PyErr_Clear();
49418  } else {
49419  result = -1;
49420  }
49421  return result;
49422 }
49423 static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
49424  PyObject *module = NULL, *moddict, *modname;
49425  if (__Pyx_check_single_interpreter())
49426  return NULL;
49427  if (__pyx_m)
49428  return __Pyx_NewRef(__pyx_m);
49429  modname = PyObject_GetAttrString(spec, "name");
49430  if (unlikely(!modname)) goto bad;
49431  module = PyModule_NewObject(modname);
49432  Py_DECREF(modname);
49433  if (unlikely(!module)) goto bad;
49434  moddict = PyModule_GetDict(module);
49435  if (unlikely(!moddict)) goto bad;
49436  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
49437  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
49438  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
49439  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
49440  return module;
49441 bad:
49442  Py_XDECREF(module);
49443  return NULL;
49444 }
49445 
49446 
49447 static CYTHON_SMALL_CODE int __pyx_pymod_exec_cfemIntegrals(PyObject *__pyx_pyinit_module)
49448 #endif
49449 #endif
49450 {
49451  PyObject *__pyx_t_1 = NULL;
49452  int __pyx_lineno = 0;
49453  const char *__pyx_filename = NULL;
49454  int __pyx_clineno = 0;
49455  __Pyx_RefNannyDeclarations
49456  #if CYTHON_PEP489_MULTI_PHASE_INIT
49457  if (__pyx_m) {
49458  if (__pyx_m == __pyx_pyinit_module) return 0;
49459  PyErr_SetString(PyExc_RuntimeError, "Module 'cfemIntegrals' has already been imported. Re-initialisation is not supported.");
49460  return -1;
49461  }
49462  #elif PY_MAJOR_VERSION >= 3
49463  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
49464  #endif
49465  #if CYTHON_REFNANNY
49466 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
49467 if (!__Pyx_RefNanny) {
49468  PyErr_Clear();
49469  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
49470  if (!__Pyx_RefNanny)
49471  Py_FatalError("failed to import 'refnanny' module");
49472 }
49473 #endif
49474  __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_cfemIntegrals(void)", 0);
49475  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
49476  #ifdef __Pxy_PyFrame_Initialize_Offsets
49477  __Pxy_PyFrame_Initialize_Offsets();
49478  #endif
49479  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
49480  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
49481  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
49482  #ifdef __Pyx_CyFunction_USED
49483  if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
49484  #endif
49485  #ifdef __Pyx_FusedFunction_USED
49486  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
49487  #endif
49488  #ifdef __Pyx_Coroutine_USED
49489  if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
49490  #endif
49491  #ifdef __Pyx_Generator_USED
49492  if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
49493  #endif
49494  #ifdef __Pyx_AsyncGen_USED
49495  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
49496  #endif
49497  #ifdef __Pyx_StopAsyncIteration_USED
49498  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
49499  #endif
49500  /*--- Library function declarations ---*/
49501  /*--- Threads initialization code ---*/
49502  #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
49503  PyEval_InitThreads();
49504  #endif
49505  /*--- Module creation code ---*/
49506  #if CYTHON_PEP489_MULTI_PHASE_INIT
49507  __pyx_m = __pyx_pyinit_module;
49508  Py_INCREF(__pyx_m);
49509  #else
49510  #if PY_MAJOR_VERSION < 3
49511  __pyx_m = Py_InitModule4("cfemIntegrals", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
49512  #else
49513  __pyx_m = PyModule_Create(&__pyx_moduledef);
49514  #endif
49515  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
49516  #endif
49517  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
49518  Py_INCREF(__pyx_d);
49519  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
49520  Py_INCREF(__pyx_b);
49521  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
49522  Py_INCREF(__pyx_cython_runtime);
49523  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
49524  /*--- Initialize various global constants etc. ---*/
49525  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
49526  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
49527  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
49528  #endif
49529  if (__pyx_module_is_main_cfemIntegrals) {
49530  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
49531  }
49532  #if PY_MAJOR_VERSION >= 3
49533  {
49534  PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
49535  if (!PyDict_GetItemString(modules, "cfemIntegrals")) {
49536  if (unlikely(PyDict_SetItemString(modules, "cfemIntegrals", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
49537  }
49538  }
49539  #endif
49540  /*--- Builtin init code ---*/
49541  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
49542  /*--- Constants init code ---*/
49543  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
49544  /*--- Global type/function init code ---*/
49545  (void)__Pyx_modinit_global_init_code();
49546  (void)__Pyx_modinit_variable_export_code();
49547  (void)__Pyx_modinit_function_export_code();
49548  (void)__Pyx_modinit_type_init_code();
49549  if (unlikely(__Pyx_modinit_type_import_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
49550  (void)__Pyx_modinit_variable_import_code();
49551  (void)__Pyx_modinit_function_import_code();
49552  /*--- Execution code ---*/
49553  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
49554  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
49555  #endif
49556 
49557  /* "cfemIntegrals.pyx":2
49558  * # A type of -*- python -*- file
49559  * import numpy as np # <<<<<<<<<<<<<<
49560  * cimport numpy as np
49561  *
49562  */
49563  __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
49564  __Pyx_GOTREF(__pyx_t_1);
49565  if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) __PYX_ERR(0, 2, __pyx_L1_error)
49566  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
49567 
49568  /* "cfemIntegrals.pyx":2296
49569  * double* jacobian_weak_residual,
49570  * double* jacobian_weak_residual_eb)
49571  * def parametricFiniteElementSpace_getHessianValues(np.ndarray Hessian_psi, # <<<<<<<<<<<<<<
49572  * np.ndarray inverseJacobianArray,
49573  * np.ndarray Hessian_vArray):
49574  */
49575  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_1parametricFiniteElementSpace_getHessianValues, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2296, __pyx_L1_error)
49576  __Pyx_GOTREF(__pyx_t_1);
49577  if (PyDict_SetItem(__pyx_d, __pyx_n_s_parametricFiniteElementSpace_get, __pyx_t_1) < 0) __PYX_ERR(0, 2296, __pyx_L1_error)
49578  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
49579 
49580  /* "cfemIntegrals.pyx":2310
49581  * <double*> inverseJacobianArray.data,
49582  * <double*> Hessian_vArray.data)
49583  * def updateDiffusion2_strong(np.ndarray a, # <<<<<<<<<<<<<<
49584  * np.ndarray Hess_phi,
49585  * np.ndarray strong_residual):
49586  */
49587  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_3updateDiffusion2_strong, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2310, __pyx_L1_error)
49588  __Pyx_GOTREF(__pyx_t_1);
49589  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateDiffusion2_strong, __pyx_t_1) < 0) __PYX_ERR(0, 2310, __pyx_L1_error)
49590  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
49591 
49592  /* "cfemIntegrals.pyx":2322
49593  * <double*> Hess_phi.data,
49594  * <double*> strong_residual.data)
49595  * def updateDiffusion2_strong_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
49596  * np.ndarray colind,
49597  * np.ndarray a,
49598  */
49599  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_5updateDiffusion2_strong_sd, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2322, __pyx_L1_error)
49600  __Pyx_GOTREF(__pyx_t_1);
49601  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateDiffusion2_strong_sd, __pyx_t_1) < 0) __PYX_ERR(0, 2322, __pyx_L1_error)
49602  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
49603 
49604  /* "cfemIntegrals.pyx":2338
49605  * <double*> Hess_phi.data,
49606  * <double*> strong_residual.data)
49607  * def updateDiffusionJacobian2_strong(np.ndarray l2g, # <<<<<<<<<<<<<<
49608  * np.ndarray a,
49609  * np.ndarray da,
49610  */
49611  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_7updateDiffusionJacobian2_strong, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2338, __pyx_L1_error)
49612  __Pyx_GOTREF(__pyx_t_1);
49613  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateDiffusionJacobian2_strong, __pyx_t_1) < 0) __PYX_ERR(0, 2338, __pyx_L1_error)
49614  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
49615 
49616  /* "cfemIntegrals.pyx":2362
49617  * <double*> Hess_v.data,
49618  * <double*> dstrong_residual.data)
49619  * def updateDiffusionJacobian2_strong_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
49620  * np.ndarray colind,
49621  * np.ndarray l2g,
49622  */
49623  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_9updateDiffusionJacobian2_strong_sd, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2362, __pyx_L1_error)
49624  __Pyx_GOTREF(__pyx_t_1);
49625  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateDiffusionJacobian2_strong_2, __pyx_t_1) < 0) __PYX_ERR(0, 2362, __pyx_L1_error)
49626  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
49627 
49628  /* "cfemIntegrals.pyx":2390
49629  * <double*> Hess_v.data,
49630  * <double*> dstrong_residual.data)
49631  * def updateDiffusion2_adjoint(np.ndarray a, # <<<<<<<<<<<<<<
49632  * np.ndarray Hess_w_dV,
49633  * np.ndarray Lstar_w_dV):
49634  */
49635  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_11updateDiffusion2_adjoint, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2390, __pyx_L1_error)
49636  __Pyx_GOTREF(__pyx_t_1);
49637  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateDiffusion2_adjoint, __pyx_t_1) < 0) __PYX_ERR(0, 2390, __pyx_L1_error)
49638  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
49639 
49640  /* "cfemIntegrals.pyx":2404
49641  * <double*> Hess_w_dV.data,
49642  * <double*> Lstar_w_dV.data)
49643  * def updateDiffusion2_adjoint_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
49644  * np.ndarray colind,
49645  * np.ndarray a,
49646  */
49647  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_13updateDiffusion2_adjoint_sd, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2404, __pyx_L1_error)
49648  __Pyx_GOTREF(__pyx_t_1);
49649  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateDiffusion2_adjoint_sd, __pyx_t_1) < 0) __PYX_ERR(0, 2404, __pyx_L1_error)
49650  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
49651 
49652  /* "cfemIntegrals.pyx":2422
49653  * <double*> Hess_w_dV.data,
49654  * <double*> Lstar_w_dV.data)
49655  * def calculateWeightedShapeHessians(np.ndarray dVR, # <<<<<<<<<<<<<<
49656  * np.ndarray abs_det_jac,
49657  * np.ndarray Hess_w,
49658  */
49659  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_15calculateWeightedShapeHessians, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2422, __pyx_L1_error)
49660  __Pyx_GOTREF(__pyx_t_1);
49661  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateWeightedShapeHessians, __pyx_t_1) < 0) __PYX_ERR(0, 2422, __pyx_L1_error)
49662  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
49663 
49664  /* "cfemIntegrals.pyx":2438
49665  * <double*> Hess_w.data,
49666  * <double*> Hess_w_dV.data)
49667  * def calculateFiniteElementFunctionHessianValues(np.ndarray l2g, # <<<<<<<<<<<<<<
49668  * np.ndarray dof,
49669  * np.ndarray Hessian_v,
49670  */
49671  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_17calculateFiniteElementFunctionHessianValues, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2438, __pyx_L1_error)
49672  __Pyx_GOTREF(__pyx_t_1);
49673  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateFiniteElementFunctionHe, __pyx_t_1) < 0) __PYX_ERR(0, 2438, __pyx_L1_error)
49674  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
49675 
49676  /* "cfemIntegrals.pyx":2463
49677  * <double*> Hessian_v.data,
49678  * <double*> Hessian_u.data)
49679  * def updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_CSR(np.ndarray interiorElementBoundaries, # <<<<<<<<<<<<<<
49680  * np.ndarray elementBoundaryElements,
49681  * np.ndarray elementBoundaryLocalElementBoundaries,
49682  */
49683  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_19updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_CSR, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2463, __pyx_L1_error)
49684  __Pyx_GOTREF(__pyx_t_1);
49685  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateGlobalJacobianFromInterior, __pyx_t_1) < 0) __PYX_ERR(0, 2463, __pyx_L1_error)
49686  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
49687 
49688  /* "cfemIntegrals.pyx":2499
49689  * <double*> w_dS.data,
49690  * <double*> jac_array.data)
49691  * def updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_dense(int offset_r, # <<<<<<<<<<<<<<
49692  * int stride_r,
49693  * int offset_u,
49694  */
49695  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_21updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_dense, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2499, __pyx_L1_error)
49696  __Pyx_GOTREF(__pyx_t_1);
49697  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateGlobalJacobianFromInterior_2, __pyx_t_1) < 0) __PYX_ERR(0, 2499, __pyx_L1_error)
49698  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
49699 
49700  /* "cfemIntegrals.pyx":2543
49701  * <double*> w_dS.data,
49702  * <double*> jac.data)
49703  * def updateInteriorTwoSidedElementBoundaryFlux(np.ndarray interiorElementBoundaries, # <<<<<<<<<<<<<<
49704  * np.ndarray elementBoundaryElements,
49705  * np.ndarray elementBoundaryLocalElementBoundaries,
49706  */
49707  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_23updateInteriorTwoSidedElementBoundaryFlux, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2543, __pyx_L1_error)
49708  __Pyx_GOTREF(__pyx_t_1);
49709  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateInteriorTwoSidedElementBou, __pyx_t_1) < 0) __PYX_ERR(0, 2543, __pyx_L1_error)
49710  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
49711 
49712  /* "cfemIntegrals.pyx":2563
49713  * <double*> w_dS.data,
49714  * <double*> residual.data)
49715  * def calculateCFLADR2speeds(np.ndarray elementDiameter, # <<<<<<<<<<<<<<
49716  * np.ndarray dm,
49717  * np.ndarray df1,
49718  */
49719  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_25calculateCFLADR2speeds, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2563, __pyx_L1_error)
49720  __Pyx_GOTREF(__pyx_t_1);
49721  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateCFLADR2speeds, __pyx_t_1) < 0) __PYX_ERR(0, 2563, __pyx_L1_error)
49722  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
49723 
49724  /* "cfemIntegrals.pyx":2579
49725  * <double*> df2.data,
49726  * <double*> cfl.data)
49727  * def checkElementBoundaryAndExteriorElementBoundaryArraysSame(double tolerance, # <<<<<<<<<<<<<<
49728  * np.ndarray exteriorElementBoundariesArray,
49729  * np.ndarray elementBoundaryElementsArray,
49730  */
49731  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_27checkElementBoundaryAndExteriorElementBoundaryArraysSame, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2579, __pyx_L1_error)
49732  __Pyx_GOTREF(__pyx_t_1);
49733  if (PyDict_SetItem(__pyx_d, __pyx_n_s_checkElementBoundaryAndExteriorE, __pyx_t_1) < 0) __PYX_ERR(0, 2579, __pyx_L1_error)
49734  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
49735 
49736  /* "cfemIntegrals.pyx":2607
49737  * <int*> firstBadIndex.data)
49738  * return output
49739  * def checkGlobalElementBoundaryAndExteriorElementBoundaryArraysSame(double tolerance, # <<<<<<<<<<<<<<
49740  * np.ndarray exteriorElementBoundariesArray,
49741  * np.ndarray elementBoundaryElementsArray,
49742  */
49743  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_29checkGlobalElementBoundaryAndExteriorElementBoundaryArraysSame, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2607, __pyx_L1_error)
49744  __Pyx_GOTREF(__pyx_t_1);
49745  if (PyDict_SetItem(__pyx_d, __pyx_n_s_checkGlobalElementBoundaryAndExt, __pyx_t_1) < 0) __PYX_ERR(0, 2607, __pyx_L1_error)
49746  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
49747 
49748  /* "cfemIntegrals.pyx":2632
49749  * <double*> ebqe_val.data,
49750  * <int*> firstBadIndex.data)
49751  * def calculateExteriorElementBoundaryStress3D(np.ndarray elementBoundaryMaterialTypes, # <<<<<<<<<<<<<<
49752  * np.ndarray exteriorElementBoundaries,
49753  * np.ndarray elementBoundaryElements,
49754  */
49755  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_31calculateExteriorElementBoundaryStress3D, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2632, __pyx_L1_error)
49756  __Pyx_GOTREF(__pyx_t_1);
49757  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateExteriorElementBoundary, __pyx_t_1) < 0) __PYX_ERR(0, 2632, __pyx_L1_error)
49758  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
49759 
49760  /* "cfemIntegrals.pyx":2658
49761  * <double*> n.data,
49762  * <double*> F.data)
49763  * def calculateExteriorElementBoundaryStress2D(np.ndarray elementBoundaryMaterialTypes, # <<<<<<<<<<<<<<
49764  * np.ndarray exteriorElementBoundaries,
49765  * np.ndarray elementBoundaryElements,
49766  */
49767  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_33calculateExteriorElementBoundaryStress2D, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2658, __pyx_L1_error)
49768  __Pyx_GOTREF(__pyx_t_1);
49769  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateExteriorElementBoundary_2, __pyx_t_1) < 0) __PYX_ERR(0, 2658, __pyx_L1_error)
49770  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
49771 
49772  /* "cfemIntegrals.pyx":2682
49773  * <double*> n.data,
49774  * <double*> F.data)
49775  * def copyLeftElementBoundaryInfo(np.ndarray elementBoundaryElementsArray, # <<<<<<<<<<<<<<
49776  * np.ndarray elementBoundaryLocalElementBoundariesArray,
49777  * np.ndarray exteriorElementBoundariesArray,
49778  */
49779  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_35copyLeftElementBoundaryInfo, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2682, __pyx_L1_error)
49780  __Pyx_GOTREF(__pyx_t_1);
49781  if (PyDict_SetItem(__pyx_d, __pyx_n_s_copyLeftElementBoundaryInfo, __pyx_t_1) < 0) __PYX_ERR(0, 2682, __pyx_L1_error)
49782  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
49783 
49784  /* "cfemIntegrals.pyx":2708
49785  * <double*>xg.data,
49786  * <double*>ng.data)
49787  * def parametricFiniteElementSpace_getValues(np.ndarray psi, # <<<<<<<<<<<<<<
49788  * np.ndarray vArray):
49789  * cdef int nElements_global = vArray.shape[0]
49790  */
49791  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_37parametricFiniteElementSpace_getValues, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2708, __pyx_L1_error)
49792  __Pyx_GOTREF(__pyx_t_1);
49793  if (PyDict_SetItem(__pyx_d, __pyx_n_s_parametricFiniteElementSpace_get_2, __pyx_t_1) < 0) __PYX_ERR(0, 2708, __pyx_L1_error)
49794  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
49795 
49796  /* "cfemIntegrals.pyx":2718
49797  * <double*>psi.data,
49798  * <double*>vArray.data)
49799  * def parametricFiniteElementSpace_getValuesTrace(np.ndarray psi, # <<<<<<<<<<<<<<
49800  * np.ndarray permutations,
49801  * np.ndarray vArray):
49802  */
49803  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_39parametricFiniteElementSpace_getValuesTrace, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2718, __pyx_L1_error)
49804  __Pyx_GOTREF(__pyx_t_1);
49805  if (PyDict_SetItem(__pyx_d, __pyx_n_s_parametricFiniteElementSpace_get_3, __pyx_t_1) < 0) __PYX_ERR(0, 2718, __pyx_L1_error)
49806  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
49807 
49808  /* "cfemIntegrals.pyx":2732
49809  * <int *>permutations.data,
49810  * <double*>vArray.data)
49811  * def parametricFiniteElementSpace_getGradientValues(np.ndarray grad_psi, # <<<<<<<<<<<<<<
49812  * np.ndarray inverseJacobianArray,
49813  * np.ndarray grad_vArray):
49814  */
49815  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_41parametricFiniteElementSpace_getGradientValues, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2732, __pyx_L1_error)
49816  __Pyx_GOTREF(__pyx_t_1);
49817  if (PyDict_SetItem(__pyx_d, __pyx_n_s_parametricFiniteElementSpace_get_4, __pyx_t_1) < 0) __PYX_ERR(0, 2732, __pyx_L1_error)
49818  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
49819 
49820  /* "cfemIntegrals.pyx":2746
49821  * <double*>inverseJacobianArray.data,
49822  * <double*>grad_vArray.data)
49823  * def parametricFiniteElementSpace_getGradientValuesTrace(np.ndarray grad_psi, # <<<<<<<<<<<<<<
49824  * np.ndarray permutations,
49825  * np.ndarray inverseJacobianArray,
49826  */
49827  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_43parametricFiniteElementSpace_getGradientValuesTrace, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2746, __pyx_L1_error)
49828  __Pyx_GOTREF(__pyx_t_1);
49829  if (PyDict_SetItem(__pyx_d, __pyx_n_s_parametricFiniteElementSpace_get_5, __pyx_t_1) < 0) __PYX_ERR(0, 2746, __pyx_L1_error)
49830  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
49831 
49832  /* "cfemIntegrals.pyx":2764
49833  * <double*>inverseJacobianArray.data,
49834  * <double*>grad_vArray.data)
49835  * def parametricMaps_getPermutations(np.ndarray xiArray, # <<<<<<<<<<<<<<
49836  * np.ndarray permutations):
49837  * cdef int nElements_global = xiArray.shape[0]
49838  */
49839  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_45parametricMaps_getPermutations, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2764, __pyx_L1_error)
49840  __Pyx_GOTREF(__pyx_t_1);
49841  if (PyDict_SetItem(__pyx_d, __pyx_n_s_parametricMaps_getPermutations, __pyx_t_1) < 0) __PYX_ERR(0, 2764, __pyx_L1_error)
49842  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
49843 
49844  /* "cfemIntegrals.pyx":2776
49845  * <double*>xiArray.data,
49846  * <int *>permutations.data)
49847  * def parametricMaps_getPermutationsGlobalExterior(np.ndarray exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
49848  * np.ndarray elementBoundaryElementsArray,
49849  * np.ndarray elementBoundaryLocalElementBoundariesArray,
49850  */
49851  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_47parametricMaps_getPermutationsGlobalExterior, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2776, __pyx_L1_error)
49852  __Pyx_GOTREF(__pyx_t_1);
49853  if (PyDict_SetItem(__pyx_d, __pyx_n_s_parametricMaps_getPermutationsGl, __pyx_t_1) < 0) __PYX_ERR(0, 2776, __pyx_L1_error)
49854  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
49855 
49856  /* "cfemIntegrals.pyx":2792
49857  * <double*> xiArray.data,
49858  * <int*> permutations.data)
49859  * def getPermutationsGlobal(np.ndarray xArray, # <<<<<<<<<<<<<<
49860  * np.ndarray xArrayNew,
49861  * np.ndarray permutations):
49862  */
49863  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_49getPermutationsGlobal, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2792, __pyx_L1_error)
49864  __Pyx_GOTREF(__pyx_t_1);
49865  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getPermutationsGlobal, __pyx_t_1) < 0) __PYX_ERR(0, 2792, __pyx_L1_error)
49866  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
49867 
49868  /* "cfemIntegrals.pyx":2802
49869  * <double*> xArrayNew.data,
49870  * <int*> permutations.data)
49871  * def parametricMaps_getValues(np.ndarray psi, # <<<<<<<<<<<<<<
49872  * np.ndarray l2g,
49873  * np.ndarray nodeArray,
49874  */
49875  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_51parametricMaps_getValues, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2802, __pyx_L1_error)
49876  __Pyx_GOTREF(__pyx_t_1);
49877  if (PyDict_SetItem(__pyx_d, __pyx_n_s_parametricMaps_getValues, __pyx_t_1) < 0) __PYX_ERR(0, 2802, __pyx_L1_error)
49878  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
49879 
49880  /* "cfemIntegrals.pyx":2818
49881  * <double*>nodeArray.data,
49882  * <double*>xArray.data)
49883  * def parametricMaps_getValuesTrace(np.ndarray psi, # <<<<<<<<<<<<<<
49884  * np.ndarray l2g,
49885  * np.ndarray nodeArray,
49886  */
49887  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_53parametricMaps_getValuesTrace, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2818, __pyx_L1_error)
49888  __Pyx_GOTREF(__pyx_t_1);
49889  if (PyDict_SetItem(__pyx_d, __pyx_n_s_parametricMaps_getValuesTrace, __pyx_t_1) < 0) __PYX_ERR(0, 2818, __pyx_L1_error)
49890  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
49891 
49892  /* "cfemIntegrals.pyx":2836
49893  * <double*>nodeArray.data,
49894  * <double*>xArray.data)
49895  * def parametricMaps_getInverseValues(np.ndarray inverseJacobian, # <<<<<<<<<<<<<<
49896  * np.ndarray l2g,
49897  * np.ndarray nodeArray,
49898  */
49899  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_55parametricMaps_getInverseValues, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2836, __pyx_L1_error)
49900  __Pyx_GOTREF(__pyx_t_1);
49901  if (PyDict_SetItem(__pyx_d, __pyx_n_s_parametricMaps_getInverseValues, __pyx_t_1) < 0) __PYX_ERR(0, 2836, __pyx_L1_error)
49902  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
49903 
49904  /* "cfemIntegrals.pyx":2854
49905  * <double*>xArray.data,
49906  * <double*>xiArray.data)
49907  * def parametricMaps_getInverseValuesTrace(np.ndarray inverseJacobian, # <<<<<<<<<<<<<<
49908  * np.ndarray l2g,
49909  * np.ndarray nodeArray,
49910  */
49911  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_57parametricMaps_getInverseValuesTrace, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2854, __pyx_L1_error)
49912  __Pyx_GOTREF(__pyx_t_1);
49913  if (PyDict_SetItem(__pyx_d, __pyx_n_s_parametricMaps_getInverseValuesT, __pyx_t_1) < 0) __PYX_ERR(0, 2854, __pyx_L1_error)
49914  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
49915 
49916  /* "cfemIntegrals.pyx":2874
49917  * <double*>xArray.data,
49918  * <double*>xiArray.data)
49919  * def parametricMaps_getJacobianValues(np.ndarray grad_psi, # <<<<<<<<<<<<<<
49920  * np.ndarray l2g,
49921  * np.ndarray nodeArray,
49922  */
49923  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_59parametricMaps_getJacobianValues, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2874, __pyx_L1_error)
49924  __Pyx_GOTREF(__pyx_t_1);
49925  if (PyDict_SetItem(__pyx_d, __pyx_n_s_parametricMaps_getJacobianValues, __pyx_t_1) < 0) __PYX_ERR(0, 2874, __pyx_L1_error)
49926  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
49927 
49928  /* "cfemIntegrals.pyx":2913
49929  * else:
49930  * print("error in getJacobianValues...jacobian not sized properly")
49931  * def parametricMaps_getJacobianValuesTrace(np.ndarray grad_psi, # <<<<<<<<<<<<<<
49932  * np.ndarray boundaryNormals,
49933  * np.ndarray boundaryJacobians,
49934  */
49935  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_61parametricMaps_getJacobianValuesTrace, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2913, __pyx_L1_error)
49936  __Pyx_GOTREF(__pyx_t_1);
49937  if (PyDict_SetItem(__pyx_d, __pyx_n_s_parametricMaps_getJacobianValues_2, __pyx_t_1) < 0) __PYX_ERR(0, 2913, __pyx_L1_error)
49938  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
49939 
49940  /* "cfemIntegrals.pyx":2967
49941  * else:
49942  * print("error in getJacobianValuesTrace...jacobianInverse not sized properly")
49943  * def updateMass_weak(np.ndarray mt, # <<<<<<<<<<<<<<
49944  * np.ndarray w_dV,
49945  * np.ndarray weak_residual):
49946  */
49947  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_63updateMass_weak, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2967, __pyx_L1_error)
49948  __Pyx_GOTREF(__pyx_t_1);
49949  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateMass_weak, __pyx_t_1) < 0) __PYX_ERR(0, 2967, __pyx_L1_error)
49950  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
49951 
49952  /* "cfemIntegrals.pyx":2979
49953  * <double*>w_dV.data,
49954  * <double*>weak_residual.data)
49955  * def updateMassJacobian_weak(np.ndarray dmt, # <<<<<<<<<<<<<<
49956  * np.ndarray v_X_w_dV,
49957  * np.ndarray jacobian_weak_residual):
49958  */
49959  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_65updateMassJacobian_weak, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2979, __pyx_L1_error)
49960  __Pyx_GOTREF(__pyx_t_1);
49961  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateMassJacobian_weak, __pyx_t_1) < 0) __PYX_ERR(0, 2979, __pyx_L1_error)
49962  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
49963 
49964  /* "cfemIntegrals.pyx":2993
49965  * <double*>v_X_w_dV.data,
49966  * <double*>jacobian_weak_residual.data)
49967  * def updateMassJacobian_weak_lowmem(np.ndarray dmt, # <<<<<<<<<<<<<<
49968  * np.ndarray v,
49969  * np.ndarray w_dV,
49970  */
49971  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_67updateMassJacobian_weak_lowmem, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2993, __pyx_L1_error)
49972  __Pyx_GOTREF(__pyx_t_1);
49973  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateMassJacobian_weak_lowmem, __pyx_t_1) < 0) __PYX_ERR(0, 2993, __pyx_L1_error)
49974  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
49975 
49976  /* "cfemIntegrals.pyx":3009
49977  * <double*> w_dV.data,
49978  * <double*> jacobian_weak_residual.data)
49979  * def updateMass_strong(np.ndarray mt, # <<<<<<<<<<<<<<
49980  * np.ndarray strong_residual):
49981  * cdef int nElements_global = mt.shape[0]
49982  */
49983  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_69updateMass_strong, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3009, __pyx_L1_error)
49984  __Pyx_GOTREF(__pyx_t_1);
49985  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateMass_strong, __pyx_t_1) < 0) __PYX_ERR(0, 3009, __pyx_L1_error)
49986  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
49987 
49988  /* "cfemIntegrals.pyx":3017
49989  * <double*>mt.data,
49990  * <double*>strong_residual.data)
49991  * def updateMassJacobian_strong(np.ndarray dmt, # <<<<<<<<<<<<<<
49992  * np.ndarray v,
49993  * np.ndarray dstrong_residual):
49994  */
49995  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_71updateMassJacobian_strong, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3017, __pyx_L1_error)
49996  __Pyx_GOTREF(__pyx_t_1);
49997  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateMassJacobian_strong, __pyx_t_1) < 0) __PYX_ERR(0, 3017, __pyx_L1_error)
49998  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
49999 
50000  /* "cfemIntegrals.pyx":3029
50001  * <double*>v.data,
50002  * <double*>dstrong_residual.data)
50003  * def updateMass_adjoint(np.ndarray dmt, # <<<<<<<<<<<<<<
50004  * np.ndarray w_dV,
50005  * np.ndarray Lstar_w_dV):
50006  */
50007  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_73updateMass_adjoint, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3029, __pyx_L1_error)
50008  __Pyx_GOTREF(__pyx_t_1);
50009  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateMass_adjoint, __pyx_t_1) < 0) __PYX_ERR(0, 3029, __pyx_L1_error)
50010  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50011 
50012  /* "cfemIntegrals.pyx":3041
50013  * <double*>w_dV.data,
50014  * <double*>Lstar_w_dV.data)
50015  * def updateAdvection_weak(np.ndarray f, # <<<<<<<<<<<<<<
50016  * np.ndarray grad_w_dV,
50017  * np.ndarray weak_residual):
50018  */
50019  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_75updateAdvection_weak, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3041, __pyx_L1_error)
50020  __Pyx_GOTREF(__pyx_t_1);
50021  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateAdvection_weak, __pyx_t_1) < 0) __PYX_ERR(0, 3041, __pyx_L1_error)
50022  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50023 
50024  /* "cfemIntegrals.pyx":3055
50025  * <double*>grad_w_dV.data,
50026  * <double*>weak_residual.data)
50027  * def updateAdvectionJacobian_weak(np.ndarray df, # <<<<<<<<<<<<<<
50028  * np.ndarray v_X_grad_w_dV,
50029  * np.ndarray jacobian_weak_residual):
50030  */
50031  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_77updateAdvectionJacobian_weak, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3055, __pyx_L1_error)
50032  __Pyx_GOTREF(__pyx_t_1);
50033  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateAdvectionJacobian_weak, __pyx_t_1) < 0) __PYX_ERR(0, 3055, __pyx_L1_error)
50034  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50035 
50036  /* "cfemIntegrals.pyx":3071
50037  * <double*>v_X_grad_w_dV.data,
50038  * <double*>jacobian_weak_residual.data)
50039  * def updateAdvectionJacobian_weak_lowmem(np.ndarray df, # <<<<<<<<<<<<<<
50040  * np.ndarray v,
50041  * np.ndarray grad_w_dV,
50042  */
50043  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_79updateAdvectionJacobian_weak_lowmem, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3071, __pyx_L1_error)
50044  __Pyx_GOTREF(__pyx_t_1);
50045  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateAdvectionJacobian_weak_low, __pyx_t_1) < 0) __PYX_ERR(0, 3071, __pyx_L1_error)
50046  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50047 
50048  /* "cfemIntegrals.pyx":3089
50049  * <double*> grad_w_dV.data,
50050  * <double*> jacobian_weak_residual.data)
50051  * def updateAdvection_strong(np.ndarray df, # <<<<<<<<<<<<<<
50052  * np.ndarray grad_u,
50053  * np.ndarray strong_residual):
50054  */
50055  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_81updateAdvection_strong, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3089, __pyx_L1_error)
50056  __Pyx_GOTREF(__pyx_t_1);
50057  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateAdvection_strong, __pyx_t_1) < 0) __PYX_ERR(0, 3089, __pyx_L1_error)
50058  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50059 
50060  /* "cfemIntegrals.pyx":3101
50061  * <double*>grad_u.data,
50062  * <double*>strong_residual.data)
50063  * def updateAdvectionJacobian_strong(np.ndarray df, # <<<<<<<<<<<<<<
50064  * np.ndarray grad_v,
50065  * np.ndarray dstrong_residual):
50066  */
50067  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_83updateAdvectionJacobian_strong, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3101, __pyx_L1_error)
50068  __Pyx_GOTREF(__pyx_t_1);
50069  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateAdvectionJacobian_strong, __pyx_t_1) < 0) __PYX_ERR(0, 3101, __pyx_L1_error)
50070  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50071 
50072  /* "cfemIntegrals.pyx":3115
50073  * <double*>grad_v.data,
50074  * <double*>dstrong_residual.data)
50075  * def updateAdvection_adjoint(np.ndarray df, # <<<<<<<<<<<<<<
50076  * np.ndarray grad_w_dV,
50077  * np.ndarray Lstar_w_dV):
50078  */
50079  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_85updateAdvection_adjoint, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3115, __pyx_L1_error)
50080  __Pyx_GOTREF(__pyx_t_1);
50081  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateAdvection_adjoint, __pyx_t_1) < 0) __PYX_ERR(0, 3115, __pyx_L1_error)
50082  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50083 
50084  /* "cfemIntegrals.pyx":3129
50085  * <double*>grad_w_dV.data,
50086  * <double*>Lstar_w_dV.data)
50087  * def updateHamiltonian_weak(np.ndarray H, # <<<<<<<<<<<<<<
50088  * np.ndarray w_dV,
50089  * np.ndarray weak_residual):
50090  */
50091  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_87updateHamiltonian_weak, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3129, __pyx_L1_error)
50092  __Pyx_GOTREF(__pyx_t_1);
50093  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateHamiltonian_weak, __pyx_t_1) < 0) __PYX_ERR(0, 3129, __pyx_L1_error)
50094  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50095 
50096  /* "cfemIntegrals.pyx":3141
50097  * <double*>w_dV.data,
50098  * <double*>weak_residual.data)
50099  * def updateHamiltonianJacobian_weak(np.ndarray dH, # <<<<<<<<<<<<<<
50100  * np.ndarray grad_v_X_w_dV,
50101  * np.ndarray jacobian_weak_residual):
50102  */
50103  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_89updateHamiltonianJacobian_weak, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3141, __pyx_L1_error)
50104  __Pyx_GOTREF(__pyx_t_1);
50105  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateHamiltonianJacobian_weak, __pyx_t_1) < 0) __PYX_ERR(0, 3141, __pyx_L1_error)
50106  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50107 
50108  /* "cfemIntegrals.pyx":3157
50109  * <double*>grad_v_X_w_dV.data,
50110  * <double*>jacobian_weak_residual.data)
50111  * def updateHamiltonianJacobian_weak_lowmem(np.ndarray dH, # <<<<<<<<<<<<<<
50112  * np.ndarray grad_v,
50113  * np.ndarray w_dV,
50114  */
50115  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_91updateHamiltonianJacobian_weak_lowmem, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3157, __pyx_L1_error)
50116  __Pyx_GOTREF(__pyx_t_1);
50117  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateHamiltonianJacobian_weak_l, __pyx_t_1) < 0) __PYX_ERR(0, 3157, __pyx_L1_error)
50118  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50119 
50120  /* "cfemIntegrals.pyx":3175
50121  * <double*> w_dV.data,
50122  * <double*> jacobian_weak_residual.data)
50123  * def updateHamiltonian_strong(np.ndarray dH, # <<<<<<<<<<<<<<
50124  * np.ndarray grad_u,
50125  * np.ndarray strong_residual):
50126  */
50127  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_93updateHamiltonian_strong, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3175, __pyx_L1_error)
50128  __Pyx_GOTREF(__pyx_t_1);
50129  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateHamiltonian_strong, __pyx_t_1) < 0) __PYX_ERR(0, 3175, __pyx_L1_error)
50130  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50131 
50132  /* "cfemIntegrals.pyx":3187
50133  * <double*>grad_u.data,
50134  * <double*>strong_residual.data)
50135  * def updateHamiltonianJacobian_strong(np.ndarray dH, # <<<<<<<<<<<<<<
50136  * np.ndarray grad_v,
50137  * np.ndarray dstrong_residual):
50138  */
50139  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_95updateHamiltonianJacobian_strong, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3187, __pyx_L1_error)
50140  __Pyx_GOTREF(__pyx_t_1);
50141  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateHamiltonianJacobian_strong, __pyx_t_1) < 0) __PYX_ERR(0, 3187, __pyx_L1_error)
50142  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50143 
50144  /* "cfemIntegrals.pyx":3201
50145  * <double*>grad_v.data,
50146  * <double*>dstrong_residual.data)
50147  * def updateHamiltonian_adjoint(np.ndarray dH, # <<<<<<<<<<<<<<
50148  * np.ndarray grad_w_dV,
50149  * np.ndarray Lstar_w_dV):
50150  */
50151  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_97updateHamiltonian_adjoint, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3201, __pyx_L1_error)
50152  __Pyx_GOTREF(__pyx_t_1);
50153  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateHamiltonian_adjoint, __pyx_t_1) < 0) __PYX_ERR(0, 3201, __pyx_L1_error)
50154  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50155 
50156  /* "cfemIntegrals.pyx":3215
50157  * <double*>grad_w_dV.data,
50158  * <double*>Lstar_w_dV.data)
50159  * def updateDiffusion_weak(np.ndarray a, # <<<<<<<<<<<<<<
50160  * np.ndarray grad_phi_X_grad_w_dV,
50161  * np.ndarray weak_residual):
50162  */
50163  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_99updateDiffusion_weak, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3215, __pyx_L1_error)
50164  __Pyx_GOTREF(__pyx_t_1);
50165  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateDiffusion_weak, __pyx_t_1) < 0) __PYX_ERR(0, 3215, __pyx_L1_error)
50166  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50167 
50168  /* "cfemIntegrals.pyx":3229
50169  * <double*>grad_phi_X_grad_w_dV.data,
50170  * <double*>weak_residual.data)
50171  * def updateDiffusion_weak_lowmem(np.ndarray a, # <<<<<<<<<<<<<<
50172  * np.ndarray grad_phi,
50173  * np.ndarray grad_w_dV,
50174  */
50175  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_101updateDiffusion_weak_lowmem, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3229, __pyx_L1_error)
50176  __Pyx_GOTREF(__pyx_t_1);
50177  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateDiffusion_weak_lowmem, __pyx_t_1) < 0) __PYX_ERR(0, 3229, __pyx_L1_error)
50178  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50179 
50180  /* "cfemIntegrals.pyx":3245
50181  * <double*> grad_w_dV.data,
50182  * <double*> weak_residual.data)
50183  * def updateDiffusion_weak_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
50184  * np.ndarray colind,
50185  * np.ndarray a,
50186  */
50187  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_103updateDiffusion_weak_sd, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3245, __pyx_L1_error)
50188  __Pyx_GOTREF(__pyx_t_1);
50189  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateDiffusion_weak_sd, __pyx_t_1) < 0) __PYX_ERR(0, 3245, __pyx_L1_error)
50190  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50191 
50192  /* "cfemIntegrals.pyx":3265
50193  * <double*> grad_w_dV.data,
50194  * <double*> weak_residual.data)
50195  * def updateDiffusionJacobian_weak(np.ndarray l2g, # <<<<<<<<<<<<<<
50196  * np.ndarray a,
50197  * np.ndarray da,
50198  */
50199  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_105updateDiffusionJacobian_weak, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3265, __pyx_L1_error)
50200  __Pyx_GOTREF(__pyx_t_1);
50201  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateDiffusionJacobian_weak, __pyx_t_1) < 0) __PYX_ERR(0, 3265, __pyx_L1_error)
50202  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50203 
50204  /* "cfemIntegrals.pyx":3291
50205  * <double*>grad_v_X_grad_w_dV.data,
50206  * <double*>jacobian_weak_residual.data)
50207  * def updateDiffusionJacobian_weak_lowmem(np.ndarray l2g, # <<<<<<<<<<<<<<
50208  * np.ndarray a,
50209  * np.ndarray da,
50210  */
50211  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_107updateDiffusionJacobian_weak_lowmem, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3291, __pyx_L1_error)
50212  __Pyx_GOTREF(__pyx_t_1);
50213  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateDiffusionJacobian_weak_low, __pyx_t_1) < 0) __PYX_ERR(0, 3291, __pyx_L1_error)
50214  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50215 
50216  /* "cfemIntegrals.pyx":3319
50217  * <double*> grad_v.data,
50218  * <double*> jacobian_weak_residual.data)
50219  * def updateDiffusionJacobian_weak_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
50220  * np.ndarray colind,
50221  * np.ndarray l2g,
50222  */
50223  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_109updateDiffusionJacobian_weak_sd, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3319, __pyx_L1_error)
50224  __Pyx_GOTREF(__pyx_t_1);
50225  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateDiffusionJacobian_weak_sd, __pyx_t_1) < 0) __PYX_ERR(0, 3319, __pyx_L1_error)
50226  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50227 
50228  /* "cfemIntegrals.pyx":3351
50229  * <double*> grad_v.data,
50230  * <double*> jacobian_weak_residual.data)
50231  * def updateDiffusion_strong(np.ndarray da, # <<<<<<<<<<<<<<
50232  * np.ndarray grad_phi,
50233  * np.ndarray grad_u,
50234  */
50235  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_111updateDiffusion_strong, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3351, __pyx_L1_error)
50236  __Pyx_GOTREF(__pyx_t_1);
50237  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateDiffusion_strong, __pyx_t_1) < 0) __PYX_ERR(0, 3351, __pyx_L1_error)
50238  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50239 
50240  /* "cfemIntegrals.pyx":3365
50241  * <double*>grad_u.data,
50242  * <double*>strong_residual.data)
50243  * def updateDiffusion_strong_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
50244  * np.ndarray colind,
50245  * np.ndarray da,
50246  */
50247  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_113updateDiffusion_strong_sd, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3365, __pyx_L1_error)
50248  __Pyx_GOTREF(__pyx_t_1);
50249  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateDiffusion_strong_sd, __pyx_t_1) < 0) __PYX_ERR(0, 3365, __pyx_L1_error)
50250  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50251 
50252  /* "cfemIntegrals.pyx":3383
50253  * <double*> grad_u.data,
50254  * <double*> strong_residual.data)
50255  * def updateDiffusionJacobian_strong(np.ndarray l2g, # <<<<<<<<<<<<<<
50256  * np.ndarray da,
50257  * np.ndarray dphi,
50258  */
50259  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_115updateDiffusionJacobian_strong, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3383, __pyx_L1_error)
50260  __Pyx_GOTREF(__pyx_t_1);
50261  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateDiffusionJacobian_strong, __pyx_t_1) < 0) __PYX_ERR(0, 3383, __pyx_L1_error)
50262  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50263 
50264  /* "cfemIntegrals.pyx":3405
50265  * <double*>grad_v.data,
50266  * <double*>dstrong_residual.data)
50267  * def updateDiffusionJacobian_strong_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
50268  * np.ndarray colind,
50269  * np.ndarray l2g,
50270  */
50271  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_117updateDiffusionJacobian_strong_sd, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3405, __pyx_L1_error)
50272  __Pyx_GOTREF(__pyx_t_1);
50273  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateDiffusionJacobian_strong_s, __pyx_t_1) < 0) __PYX_ERR(0, 3405, __pyx_L1_error)
50274  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50275 
50276  /* "cfemIntegrals.pyx":3431
50277  * <double*> grad_v.data,
50278  * <double*> dstrong_residual.data)
50279  * def updateDiffusion_adjoint(np.ndarray da, # <<<<<<<<<<<<<<
50280  * np.ndarray grad_phi,
50281  * np.ndarray grad_w_dV,
50282  */
50283  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_119updateDiffusion_adjoint, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3431, __pyx_L1_error)
50284  __Pyx_GOTREF(__pyx_t_1);
50285  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateDiffusion_adjoint, __pyx_t_1) < 0) __PYX_ERR(0, 3431, __pyx_L1_error)
50286  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50287 
50288  /* "cfemIntegrals.pyx":3447
50289  * <double*>grad_w_dV.data,
50290  * <double*>Lstar_w_dV.data)
50291  * def updateDiffusion_adjoint_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
50292  * np.ndarray colind,
50293  * np.ndarray da,
50294  */
50295  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_121updateDiffusion_adjoint_sd, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3447, __pyx_L1_error)
50296  __Pyx_GOTREF(__pyx_t_1);
50297  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateDiffusion_adjoint_sd, __pyx_t_1) < 0) __PYX_ERR(0, 3447, __pyx_L1_error)
50298  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50299 
50300  /* "cfemIntegrals.pyx":3467
50301  * <double*> grad_w_dV.data,
50302  * <double*> Lstar_w_dV.data)
50303  * def updateReaction_weak(np.ndarray r, # <<<<<<<<<<<<<<
50304  * np.ndarray w_dV,
50305  * np.ndarray weak_residual):
50306  */
50307  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_123updateReaction_weak, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3467, __pyx_L1_error)
50308  __Pyx_GOTREF(__pyx_t_1);
50309  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateReaction_weak, __pyx_t_1) < 0) __PYX_ERR(0, 3467, __pyx_L1_error)
50310  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50311 
50312  /* "cfemIntegrals.pyx":3479
50313  * <double*>w_dV.data,
50314  * <double*>weak_residual.data)
50315  * def updateReactionJacobian_weak(np.ndarray dr, # <<<<<<<<<<<<<<
50316  * np.ndarray v_X_w_dV,
50317  * np.ndarray jacobian_weak_residual):
50318  */
50319  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_125updateReactionJacobian_weak, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3479, __pyx_L1_error)
50320  __Pyx_GOTREF(__pyx_t_1);
50321  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateReactionJacobian_weak, __pyx_t_1) < 0) __PYX_ERR(0, 3479, __pyx_L1_error)
50322  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50323 
50324  /* "cfemIntegrals.pyx":3493
50325  * <double*>v_X_w_dV.data,
50326  * <double*>jacobian_weak_residual.data)
50327  * def updateReactionJacobian_weak_lowmem(np.ndarray dr, # <<<<<<<<<<<<<<
50328  * np.ndarray v,
50329  * np.ndarray w_dV,
50330  */
50331  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_127updateReactionJacobian_weak_lowmem, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3493, __pyx_L1_error)
50332  __Pyx_GOTREF(__pyx_t_1);
50333  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateReactionJacobian_weak_lowm, __pyx_t_1) < 0) __PYX_ERR(0, 3493, __pyx_L1_error)
50334  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50335 
50336  /* "cfemIntegrals.pyx":3509
50337  * <double*> w_dV.data,
50338  * <double*> jacobian_weak_residual.data)
50339  * def updateReaction_strong(np.ndarray r, # <<<<<<<<<<<<<<
50340  * np.ndarray strong_residual):
50341  * cdef int nElements_global = r.shape[0]
50342  */
50343  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_129updateReaction_strong, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3509, __pyx_L1_error)
50344  __Pyx_GOTREF(__pyx_t_1);
50345  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateReaction_strong, __pyx_t_1) < 0) __PYX_ERR(0, 3509, __pyx_L1_error)
50346  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50347 
50348  /* "cfemIntegrals.pyx":3517
50349  * <double*>r.data,
50350  * <double*>strong_residual.data)
50351  * def updateReactionJacobian_strong(np.ndarray dr, # <<<<<<<<<<<<<<
50352  * np.ndarray v,
50353  * np.ndarray dstrong_residual):
50354  */
50355  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_131updateReactionJacobian_strong, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3517, __pyx_L1_error)
50356  __Pyx_GOTREF(__pyx_t_1);
50357  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateReactionJacobian_strong, __pyx_t_1) < 0) __PYX_ERR(0, 3517, __pyx_L1_error)
50358  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50359 
50360  /* "cfemIntegrals.pyx":3529
50361  * <double*>v.data,
50362  * <double*>dstrong_residual.data)
50363  * def updateReaction_adjoint(np.ndarray dr, # <<<<<<<<<<<<<<
50364  * np.ndarray w_dV,
50365  * np.ndarray Lstar_w_dV):
50366  */
50367  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_133updateReaction_adjoint, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3529, __pyx_L1_error)
50368  __Pyx_GOTREF(__pyx_t_1);
50369  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateReaction_adjoint, __pyx_t_1) < 0) __PYX_ERR(0, 3529, __pyx_L1_error)
50370  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50371 
50372  /* "cfemIntegrals.pyx":3541
50373  * <double*>w_dV.data,
50374  * <double*>Lstar_w_dV.data)
50375  * def updateSubgridError(np.ndarray error, # <<<<<<<<<<<<<<
50376  * np.ndarray Lstar_w_dV,
50377  * np.ndarray weak_residual):
50378  */
50379  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_135updateSubgridError, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3541, __pyx_L1_error)
50380  __Pyx_GOTREF(__pyx_t_1);
50381  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateSubgridError, __pyx_t_1) < 0) __PYX_ERR(0, 3541, __pyx_L1_error)
50382  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50383 
50384  /* "cfemIntegrals.pyx":3553
50385  * <double*>Lstar_w_dV.data,
50386  * <double*>weak_residual.data)
50387  * def updateSubgridErrorJacobian(np.ndarray derror, # <<<<<<<<<<<<<<
50388  * np.ndarray Lstar_w_dV,
50389  * np.ndarray jacobian_weak_residual):
50390  */
50391  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_137updateSubgridErrorJacobian, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3553, __pyx_L1_error)
50392  __Pyx_GOTREF(__pyx_t_1);
50393  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateSubgridErrorJacobian, __pyx_t_1) < 0) __PYX_ERR(0, 3553, __pyx_L1_error)
50394  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50395 
50396  /* "cfemIntegrals.pyx":3567
50397  * <double*>Lstar_w_dV.data,
50398  * <double*>jacobian_weak_residual.data)
50399  * def updateNumericalDiffusion(np.ndarray numDiff, # <<<<<<<<<<<<<<
50400  * np.ndarray grad_u_X_grad_w_dV,
50401  * np.ndarray weak_residual):
50402  */
50403  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_139updateNumericalDiffusion, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3567, __pyx_L1_error)
50404  __Pyx_GOTREF(__pyx_t_1);
50405  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateNumericalDiffusion, __pyx_t_1) < 0) __PYX_ERR(0, 3567, __pyx_L1_error)
50406  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50407 
50408  /* "cfemIntegrals.pyx":3581
50409  * <double*>grad_u_X_grad_w_dV.data,
50410  * <double*>weak_residual.data)
50411  * def updateNumericalDiffusion_lowmem(np.ndarray numDiff, # <<<<<<<<<<<<<<
50412  * np.ndarray grad_u,
50413  * np.ndarray grad_w_dV,
50414  */
50415  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_141updateNumericalDiffusion_lowmem, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3581, __pyx_L1_error)
50416  __Pyx_GOTREF(__pyx_t_1);
50417  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateNumericalDiffusion_lowmem, __pyx_t_1) < 0) __PYX_ERR(0, 3581, __pyx_L1_error)
50418  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50419 
50420  /* "cfemIntegrals.pyx":3597
50421  * <double*> grad_w_dV.data,
50422  * <double*> weak_residual.data)
50423  * def updateNumericalDiffusionJacobian(np.ndarray numDiff, # <<<<<<<<<<<<<<
50424  * np.ndarray grad_v_X_grad_w_dV,
50425  * np.ndarray jacobian_weak_residual):
50426  */
50427  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_143updateNumericalDiffusionJacobian, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3597, __pyx_L1_error)
50428  __Pyx_GOTREF(__pyx_t_1);
50429  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateNumericalDiffusionJacobian, __pyx_t_1) < 0) __PYX_ERR(0, 3597, __pyx_L1_error)
50430  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50431 
50432  /* "cfemIntegrals.pyx":3613
50433  * <double*>grad_v_X_grad_w_dV.data,
50434  * <double*>jacobian_weak_residual.data)
50435  * def updateNumericalDiffusionJacobian_lowmem(np.ndarray numDiff, # <<<<<<<<<<<<<<
50436  * np.ndarray grad_v,
50437  * np.ndarray grad_w_dV,
50438  */
50439  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_145updateNumericalDiffusionJacobian_lowmem, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3613, __pyx_L1_error)
50440  __Pyx_GOTREF(__pyx_t_1);
50441  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateNumericalDiffusionJacobian_2, __pyx_t_1) < 0) __PYX_ERR(0, 3613, __pyx_L1_error)
50442  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50443 
50444  /* "cfemIntegrals.pyx":3631
50445  * <double*> grad_w_dV.data,
50446  * <double*> jacobian_weak_residual.data)
50447  * def calculateScalarScalarProduct(np.ndarray s1, # <<<<<<<<<<<<<<
50448  * np.ndarray s2,
50449  * np.ndarray sResult):
50450  */
50451  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_147calculateScalarScalarProduct, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3631, __pyx_L1_error)
50452  __Pyx_GOTREF(__pyx_t_1);
50453  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateScalarScalarProduct, __pyx_t_1) < 0) __PYX_ERR(0, 3631, __pyx_L1_error)
50454  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50455 
50456  /* "cfemIntegrals.pyx":3641
50457  * <double*>s2.data,
50458  * <double*>sResult.data)
50459  * def calculateVectorScalarProduct(np.ndarray v, # <<<<<<<<<<<<<<
50460  * np.ndarray s,
50461  * np.ndarray vResult):
50462  */
50463  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_149calculateVectorScalarProduct, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3641, __pyx_L1_error)
50464  __Pyx_GOTREF(__pyx_t_1);
50465  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateVectorScalarProduct, __pyx_t_1) < 0) __PYX_ERR(0, 3641, __pyx_L1_error)
50466  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50467 
50468  /* "cfemIntegrals.pyx":3653
50469  * <double*>s.data,
50470  * <double*>vResult.data)
50471  * def calculateTensorScalarProduct(np.ndarray t, # <<<<<<<<<<<<<<
50472  * np.ndarray s,
50473  * np.ndarray tResult):
50474  */
50475  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_151calculateTensorScalarProduct, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3653, __pyx_L1_error)
50476  __Pyx_GOTREF(__pyx_t_1);
50477  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateTensorScalarProduct, __pyx_t_1) < 0) __PYX_ERR(0, 3653, __pyx_L1_error)
50478  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50479 
50480  /* "cfemIntegrals.pyx":3665
50481  * <double*>s.data,
50482  * <double*>tResult.data)
50483  * def updateInteriorElementBoundaryFlux(np.ndarray interiorElementBoundaries, # <<<<<<<<<<<<<<
50484  * np.ndarray elementBoundaryElements,
50485  * np.ndarray elementBoundaryLocalElementBoundaries,
50486  */
50487  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_153updateInteriorElementBoundaryFlux, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3665, __pyx_L1_error)
50488  __Pyx_GOTREF(__pyx_t_1);
50489  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateInteriorElementBoundaryFlu, __pyx_t_1) < 0) __PYX_ERR(0, 3665, __pyx_L1_error)
50490  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50491 
50492  /* "cfemIntegrals.pyx":3685
50493  * <double*>w_dS.data,
50494  * <double*>residual.data)
50495  * def updateExteriorElementBoundaryFlux(np.ndarray exteriorElementBoundaries, # <<<<<<<<<<<<<<
50496  * np.ndarray elementBoundaryElements,
50497  * np.ndarray elementBoundaryLocalElementBoundaries,
50498  */
50499  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_155updateExteriorElementBoundaryFlux, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3685, __pyx_L1_error)
50500  __Pyx_GOTREF(__pyx_t_1);
50501  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateExteriorElementBoundaryFlu, __pyx_t_1) < 0) __PYX_ERR(0, 3685, __pyx_L1_error)
50502  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50503 
50504  /* "cfemIntegrals.pyx":3713
50505  * <double*> w_dS.data,
50506  * <double*> residual.data)
50507  * def updateGlobalResidualFromElementResidual(int offset_r, # <<<<<<<<<<<<<<
50508  * int stride_r,
50509  * np.ndarray nFreeDOF_element_r,
50510  */
50511  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_157updateGlobalResidualFromElementResidual, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3713, __pyx_L1_error)
50512  __Pyx_GOTREF(__pyx_t_1);
50513  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateGlobalResidualFromElementR, __pyx_t_1) < 0) __PYX_ERR(0, 3713, __pyx_L1_error)
50514  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50515 
50516  /* "cfemIntegrals.pyx":3731
50517  * <double*>elementResidual.data,
50518  * <double*>globalResidual.data)
50519  * def updateGlobalJacobianFromElementJacobian_dense(int offset_r, # <<<<<<<<<<<<<<
50520  * int stride_r,
50521  * int offset_u,
50522  */
50523  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_159updateGlobalJacobianFromElementJacobian_dense, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3731, __pyx_L1_error)
50524  __Pyx_GOTREF(__pyx_t_1);
50525  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateGlobalJacobianFromElementJ, __pyx_t_1) < 0) __PYX_ERR(0, 3731, __pyx_L1_error)
50526  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50527 
50528  /* "cfemIntegrals.pyx":3763
50529  * <double*>elementJacobian.data,
50530  * <double*>globalJacobian.data)
50531  * def updateGlobalJacobianFromElementJacobian_eb_dense(np.ndarray elementNeighbors, # <<<<<<<<<<<<<<
50532  * int offset_r,
50533  * int stride_r,
50534  */
50535  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_161updateGlobalJacobianFromElementJacobian_eb_dense, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3763, __pyx_L1_error)
50536  __Pyx_GOTREF(__pyx_t_1);
50537  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateGlobalJacobianFromElementJ_2, __pyx_t_1) < 0) __PYX_ERR(0, 3763, __pyx_L1_error)
50538  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50539 
50540  /* "cfemIntegrals.pyx":3799
50541  * <double*>elementJacobian_eb.data,
50542  * <double*>globalJacobian.data)
50543  * def updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_dense(int offset_r, # <<<<<<<<<<<<<<
50544  * int stride_r,
50545  * int offset_u,
50546  */
50547  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_163updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_dense, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3799, __pyx_L1_error)
50548  __Pyx_GOTREF(__pyx_t_1);
50549  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateGlobalJacobianFromInterior_3, __pyx_t_1) < 0) __PYX_ERR(0, 3799, __pyx_L1_error)
50550  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50551 
50552  /* "cfemIntegrals.pyx":3843
50553  * <double*>w_dS.data,
50554  * <double*>jac.data)
50555  * def updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_dense(np.ndarray elementNeighbors, # <<<<<<<<<<<<<<
50556  * int nElements_global,
50557  * int offset_r,
50558  */
50559  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_165updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_dense, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3843, __pyx_L1_error)
50560  __Pyx_GOTREF(__pyx_t_1);
50561  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateGlobalJacobianFromInterior_4, __pyx_t_1) < 0) __PYX_ERR(0, 3843, __pyx_L1_error)
50562  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50563 
50564  /* "cfemIntegrals.pyx":3891
50565  * <double*>w_dS.data,
50566  * <double*>jac.data)
50567  * def updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_dense(int offset_r, # <<<<<<<<<<<<<<
50568  * int stride_r,
50569  * int offset_u,
50570  */
50571  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_167updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_dense, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3891, __pyx_L1_error)
50572  __Pyx_GOTREF(__pyx_t_1);
50573  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateGlobalJacobianFromExterior, __pyx_t_1) < 0) __PYX_ERR(0, 3891, __pyx_L1_error)
50574  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50575 
50576  /* "cfemIntegrals.pyx":3956
50577  * <double*> w_dS.data,
50578  * <double*> jac.data)
50579  * def updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_dense(np.ndarray elementNeighbors, # <<<<<<<<<<<<<<
50580  * int nElements_global,
50581  * int nExteriorElementBoundaries_global,
50582  */
50583  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_169updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_dense, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3956, __pyx_L1_error)
50584  __Pyx_GOTREF(__pyx_t_1);
50585  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateGlobalJacobianFromExterior_2, __pyx_t_1) < 0) __PYX_ERR(0, 3956, __pyx_L1_error)
50586  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50587 
50588  /* "cfemIntegrals.pyx":4030
50589  * <double*> w_dS.data,
50590  * <double*> jac.data)
50591  * def updateGlobalJacobianFromElementJacobian_CSR(np.ndarray nFreeDOF_element_r, # <<<<<<<<<<<<<<
50592  * np.ndarray freeLocal_r,
50593  * np.ndarray nFreeDOF_element_u,
50594  */
50595  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_171updateGlobalJacobianFromElementJacobian_CSR, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4030, __pyx_L1_error)
50596  __Pyx_GOTREF(__pyx_t_1);
50597  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateGlobalJacobianFromElementJ_3, __pyx_t_1) < 0) __PYX_ERR(0, 4030, __pyx_L1_error)
50598  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50599 
50600  /* "cfemIntegrals.pyx":4054
50601  * <double*>elementJacobian.data,
50602  * <double*>globalJacobian_array.data)
50603  * def updateGlobalJacobianFromElementJacobian_eb_CSR(np.ndarray elementNeighbors, # <<<<<<<<<<<<<<
50604  * np.ndarray nFreeDOF_element_r,
50605  * np.ndarray freeLocal_r,
50606  */
50607  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_173updateGlobalJacobianFromElementJacobian_eb_CSR, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4054, __pyx_L1_error)
50608  __Pyx_GOTREF(__pyx_t_1);
50609  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateGlobalJacobianFromElementJ_4, __pyx_t_1) < 0) __PYX_ERR(0, 4054, __pyx_L1_error)
50610  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50611 
50612  /* "cfemIntegrals.pyx":4082
50613  * <double*>elementJacobian_eb.data,
50614  * <double*>globalJacobian_array.data)
50615  * def updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_CSR(np.ndarray interiorElementBoundaries, # <<<<<<<<<<<<<<
50616  * np.ndarray elementBoundaryElements,
50617  * np.ndarray elementBoundaryLocalElementBoundaries,
50618  */
50619  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_175updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_CSR, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4082, __pyx_L1_error)
50620  __Pyx_GOTREF(__pyx_t_1);
50621  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateGlobalJacobianFromInterior_5, __pyx_t_1) < 0) __PYX_ERR(0, 4082, __pyx_L1_error)
50622  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50623 
50624  /* "cfemIntegrals.pyx":4118
50625  * <double*>w_dS.data,
50626  * <double*>jac_array.data)
50627  * def updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_CSR(np.ndarray exteriorElementBoundaries, # <<<<<<<<<<<<<<
50628  * np.ndarray elementBoundaryElements,
50629  * np.ndarray elementBoundaryLocalElementBoundaries,
50630  */
50631  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_177updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_CSR, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4118, __pyx_L1_error)
50632  __Pyx_GOTREF(__pyx_t_1);
50633  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateGlobalJacobianFromExterior_3, __pyx_t_1) < 0) __PYX_ERR(0, 4118, __pyx_L1_error)
50634  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50635 
50636  /* "cfemIntegrals.pyx":4170
50637  * <double*> w_dS.data,
50638  * <double*> jac_array.data)
50639  * def updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_CSR(np.ndarray elementNeighbors, # <<<<<<<<<<<<<<
50640  * np.ndarray interiorElementBoundaries,
50641  * np.ndarray elementBoundaryElements,
50642  */
50643  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_179updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_CSR, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4170, __pyx_L1_error)
50644  __Pyx_GOTREF(__pyx_t_1);
50645  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateGlobalJacobianFromInterior_6, __pyx_t_1) < 0) __PYX_ERR(0, 4170, __pyx_L1_error)
50646  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50647 
50648  /* "cfemIntegrals.pyx":4208
50649  * <double*>w_dS.data,
50650  * <double*>jac_array.data)
50651  * def updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_CSR(np.ndarray elementNeighbors, # <<<<<<<<<<<<<<
50652  * np.ndarray exteriorElementBoundaries,
50653  * np.ndarray elementBoundaryElements,
50654  */
50655  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_181updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_CSR, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4208, __pyx_L1_error)
50656  __Pyx_GOTREF(__pyx_t_1);
50657  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateGlobalJacobianFromExterior_4, __pyx_t_1) < 0) __PYX_ERR(0, 4208, __pyx_L1_error)
50658  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50659 
50660  /* "cfemIntegrals.pyx":4261
50661  * <double*> w_dS.data,
50662  * <double*> jac_array.data)
50663  * def calculateWeightedShape(np.ndarray dVR, # <<<<<<<<<<<<<<
50664  * np.ndarray abs_det_jac,
50665  * np.ndarray w,
50666  */
50667  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_183calculateWeightedShape, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4261, __pyx_L1_error)
50668  __Pyx_GOTREF(__pyx_t_1);
50669  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateWeightedShape, __pyx_t_1) < 0) __PYX_ERR(0, 4261, __pyx_L1_error)
50670  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50671 
50672  /* "cfemIntegrals.pyx":4275
50673  * <double*>w.data,
50674  * <double*>w_dV.data)
50675  * def calculateWeightedShapeGradients(np.ndarray dVR, # <<<<<<<<<<<<<<
50676  * np.ndarray abs_det_jac,
50677  * np.ndarray grad_w,
50678  */
50679  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_185calculateWeightedShapeGradients, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4275, __pyx_L1_error)
50680  __Pyx_GOTREF(__pyx_t_1);
50681  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateWeightedShapeGradients, __pyx_t_1) < 0) __PYX_ERR(0, 4275, __pyx_L1_error)
50682  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50683 
50684  /* "cfemIntegrals.pyx":4291
50685  * <double*>grad_w.data,
50686  * <double*>grad_w_dV.data)
50687  * def calculateShape_X_weightedShape(np.ndarray v, # <<<<<<<<<<<<<<
50688  * np.ndarray w_dV,
50689  * np.ndarray v_X_w_dV):
50690  */
50691  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_187calculateShape_X_weightedShape, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4291, __pyx_L1_error)
50692  __Pyx_GOTREF(__pyx_t_1);
50693  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateShape_X_weightedShape, __pyx_t_1) < 0) __PYX_ERR(0, 4291, __pyx_L1_error)
50694  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50695 
50696  /* "cfemIntegrals.pyx":4305
50697  * <double*>w_dV.data,
50698  * <double*>v_X_w_dV.data)
50699  * def calculateShape_X_weightedGradShape(np.ndarray v, # <<<<<<<<<<<<<<
50700  * np.ndarray grad_w_dV,
50701  * np.ndarray v_X_grad_w_dV):
50702  */
50703  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_189calculateShape_X_weightedGradShape, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4305, __pyx_L1_error)
50704  __Pyx_GOTREF(__pyx_t_1);
50705  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateShape_X_weightedGradSha, __pyx_t_1) < 0) __PYX_ERR(0, 4305, __pyx_L1_error)
50706  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50707 
50708  /* "cfemIntegrals.pyx":4321
50709  * <double*>grad_w_dV.data,
50710  * <double*>v_X_grad_w_dV.data)
50711  * def calculateGradShape_X_weightedShape(np.ndarray grad_v, # <<<<<<<<<<<<<<
50712  * np.ndarray w_dV,
50713  * np.ndarray grad_v_X_w_dV):
50714  */
50715  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_191calculateGradShape_X_weightedShape, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4321, __pyx_L1_error)
50716  __Pyx_GOTREF(__pyx_t_1);
50717  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateGradShape_X_weightedSha, __pyx_t_1) < 0) __PYX_ERR(0, 4321, __pyx_L1_error)
50718  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50719 
50720  /* "cfemIntegrals.pyx":4337
50721  * <double*>w_dV.data,
50722  * <double*>grad_v_X_w_dV.data)
50723  * def calculateGradShape_X_weightedGradShape(np.ndarray grad_v, # <<<<<<<<<<<<<<
50724  * np.ndarray grad_w_dV,
50725  * np.ndarray grad_v_X_grad_w_dV):
50726  */
50727  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_193calculateGradShape_X_weightedGradShape, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4337, __pyx_L1_error)
50728  __Pyx_GOTREF(__pyx_t_1);
50729  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateGradShape_X_weightedGra, __pyx_t_1) < 0) __PYX_ERR(0, 4337, __pyx_L1_error)
50730  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50731 
50732  /* "cfemIntegrals.pyx":4353
50733  * <double*>grad_w_dV.data,
50734  * <double*>grad_v_X_grad_w_dV.data)
50735  * def calculateWeightedShapeTrace(np.ndarray dSR, # <<<<<<<<<<<<<<
50736  * np.ndarray sqrt_det_g,
50737  * np.ndarray w,
50738  */
50739  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_195calculateWeightedShapeTrace, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4353, __pyx_L1_error)
50740  __Pyx_GOTREF(__pyx_t_1);
50741  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateWeightedShapeTrace, __pyx_t_1) < 0) __PYX_ERR(0, 4353, __pyx_L1_error)
50742  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50743 
50744  /* "cfemIntegrals.pyx":4369
50745  * <double*>w.data,
50746  * <double*>w_dS.data)
50747  * def calculateShape_X_weightedShapeTrace(np.ndarray v, # <<<<<<<<<<<<<<
50748  * np.ndarray w_dS,
50749  * np.ndarray v_X_w_dS):
50750  */
50751  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_197calculateShape_X_weightedShapeTrace, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4369, __pyx_L1_error)
50752  __Pyx_GOTREF(__pyx_t_1);
50753  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateShape_X_weightedShapeTr, __pyx_t_1) < 0) __PYX_ERR(0, 4369, __pyx_L1_error)
50754  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50755 
50756  /* "cfemIntegrals.pyx":4385
50757  * <double*>w_dS.data,
50758  * <double*>v_X_w_dS.data)
50759  * def calculateGradShape_X_weightedShapeTrace(np.ndarray grad_v, # <<<<<<<<<<<<<<
50760  * np.ndarray w_dS,
50761  * np.ndarray grad_v_X_w_dS):
50762  */
50763  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_199calculateGradShape_X_weightedShapeTrace, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4385, __pyx_L1_error)
50764  __Pyx_GOTREF(__pyx_t_1);
50765  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateGradShape_X_weightedSha_2, __pyx_t_1) < 0) __PYX_ERR(0, 4385, __pyx_L1_error)
50766  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50767 
50768  /* "cfemIntegrals.pyx":4403
50769  * <double*>w_dS.data,
50770  * <double*>grad_v_X_w_dS.data)
50771  * def calculateIntegrationWeights(np.ndarray abs_det_J, # <<<<<<<<<<<<<<
50772  * np.ndarray referenceWeights,
50773  * np.ndarray weights):
50774  */
50775  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_201calculateIntegrationWeights, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4403, __pyx_L1_error)
50776  __Pyx_GOTREF(__pyx_t_1);
50777  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateIntegrationWeights, __pyx_t_1) < 0) __PYX_ERR(0, 4403, __pyx_L1_error)
50778  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50779 
50780  /* "cfemIntegrals.pyx":4413
50781  * <double*>referenceWeights.data,
50782  * <double*>weights.data)
50783  * def calculateElementBoundaryIntegrationWeights(np.ndarray sqrt_det_g, # <<<<<<<<<<<<<<
50784  * np.ndarray referenceWeights,
50785  * np.ndarray weights):
50786  */
50787  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_203calculateElementBoundaryIntegrationWeights, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4413, __pyx_L1_error)
50788  __Pyx_GOTREF(__pyx_t_1);
50789  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateElementBoundaryIntegrat, __pyx_t_1) < 0) __PYX_ERR(0, 4413, __pyx_L1_error)
50790  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50791 
50792  /* "cfemIntegrals.pyx":4425
50793  * <double*>referenceWeights.data,
50794  * <double*>weights.data)
50795  * def calculateFiniteElementFunctionValues(np.ndarray l2g, # <<<<<<<<<<<<<<
50796  * np.ndarray dof,
50797  * np.ndarray v,
50798  */
50799  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_205calculateFiniteElementFunctionValues, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4425, __pyx_L1_error)
50800  __Pyx_GOTREF(__pyx_t_1);
50801  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateFiniteElementFunctionVa, __pyx_t_1) < 0) __PYX_ERR(0, 4425, __pyx_L1_error)
50802  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50803 
50804  /* "cfemIntegrals.pyx":4446
50805  * <double*>v.data,
50806  * <double*>u.data)
50807  * def calculateFiniteElementFunctionGradientValues(np.ndarray l2g, # <<<<<<<<<<<<<<
50808  * np.ndarray dof,
50809  * np.ndarray grad_v,
50810  */
50811  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_207calculateFiniteElementFunctionGradientValues, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4446, __pyx_L1_error)
50812  __Pyx_GOTREF(__pyx_t_1);
50813  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateFiniteElementFunctionGr, __pyx_t_1) < 0) __PYX_ERR(0, 4446, __pyx_L1_error)
50814  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50815 
50816  /* "cfemIntegrals.pyx":4470
50817  * <double*>grad_v.data,
50818  * <double*>grad_u.data)
50819  * def calculateFiniteElementFunctionGradientTensorValues(np.ndarray l2g, # <<<<<<<<<<<<<<
50820  * np.ndarray dof,
50821  * np.ndarray grad_v_X_grad_w_dV,
50822  */
50823  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_209calculateFiniteElementFunctionGradientTensorValues, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4470, __pyx_L1_error)
50824  __Pyx_GOTREF(__pyx_t_1);
50825  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateFiniteElementFunctionGr_2, __pyx_t_1) < 0) __PYX_ERR(0, 4470, __pyx_L1_error)
50826  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50827 
50828  /* "cfemIntegrals.pyx":4496
50829  * <double*>grad_v_X_grad_w_dV.data,
50830  * <double*>grad_u_X_grad_w_dV.data)
50831  * def calculateFiniteElementFunctionValuesTrace(np.ndarray l2g, # <<<<<<<<<<<<<<
50832  * np.ndarray dof,
50833  * np.ndarray v,
50834  */
50835  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_211calculateFiniteElementFunctionValuesTrace, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4496, __pyx_L1_error)
50836  __Pyx_GOTREF(__pyx_t_1);
50837  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateFiniteElementFunctionVa_2, __pyx_t_1) < 0) __PYX_ERR(0, 4496, __pyx_L1_error)
50838  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50839 
50840  /* "cfemIntegrals.pyx":4519
50841  * <double*>v.data,
50842  * <double*>u.data)
50843  * def calculateFiniteElementFunctionGradientValuesTrace(np.ndarray l2g, # <<<<<<<<<<<<<<
50844  * np.ndarray dof,
50845  * np.ndarray grad_v,
50846  */
50847  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_213calculateFiniteElementFunctionGradientValuesTrace, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4519, __pyx_L1_error)
50848  __Pyx_GOTREF(__pyx_t_1);
50849  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateFiniteElementFunctionGr_3, __pyx_t_1) < 0) __PYX_ERR(0, 4519, __pyx_L1_error)
50850  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50851 
50852  /* "cfemIntegrals.pyx":4546
50853  * <double*>grad_v.data,
50854  * <double*>grad_u.data)
50855  * def calculateFlowVelocity(np.ndarray f, # <<<<<<<<<<<<<<
50856  * np.ndarray a,
50857  * np.ndarray grad_phi,
50858  */
50859  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_215calculateFlowVelocity, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4546, __pyx_L1_error)
50860  __Pyx_GOTREF(__pyx_t_1);
50861  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateFlowVelocity, __pyx_t_1) < 0) __PYX_ERR(0, 4546, __pyx_L1_error)
50862  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50863 
50864  /* "cfemIntegrals.pyx":4560
50865  * <double*>grad_phi.data,
50866  * <double*>v.data)
50867  * def updateAddJacobian_CSR(int jacIndex, # <<<<<<<<<<<<<<
50868  * double val,
50869  * jac):
50870  */
50871  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_217updateAddJacobian_CSR, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4560, __pyx_L1_error)
50872  __Pyx_GOTREF(__pyx_t_1);
50873  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateAddJacobian_CSR, __pyx_t_1) < 0) __PYX_ERR(0, 4560, __pyx_L1_error)
50874  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50875 
50876  /* "cfemIntegrals.pyx":4568
50877  * val,
50878  * <double*>jac_array.data)
50879  * def zeroJacobian_CSR(int nNonzeros, # <<<<<<<<<<<<<<
50880  * jac):
50881  * cdef np.ndarray rowptr, colind, jac_array
50882  */
50883  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_219zeroJacobian_CSR, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4568, __pyx_L1_error)
50884  __Pyx_GOTREF(__pyx_t_1);
50885  if (PyDict_SetItem(__pyx_d, __pyx_n_s_zeroJacobian_CSR, __pyx_t_1) < 0) __PYX_ERR(0, 4568, __pyx_L1_error)
50886  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50887 
50888  /* "cfemIntegrals.pyx":4574
50889  * czeroJacobian_CSR(nNonzeros,
50890  * <double*>jac_array.data)
50891  * def calculateInteriorElementBoundaryVelocities(int nInteriorElementBoundaries_global, # <<<<<<<<<<<<<<
50892  * int nElementBoundaries_element,
50893  * int nQuadraturePoints_elementBoundary,
50894  */
50895  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_221calculateInteriorElementBoundaryVelocities, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4574, __pyx_L1_error)
50896  __Pyx_GOTREF(__pyx_t_1);
50897  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateInteriorElementBoundary, __pyx_t_1) < 0) __PYX_ERR(0, 4574, __pyx_L1_error)
50898  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50899 
50900  /* "cfemIntegrals.pyx":4604
50901  * <double*>mAverage.data,
50902  * <double*>mJump.data)
50903  * def calculateExteriorElementBoundaryVelocities(int nExteriorElementBoundaries_global, # <<<<<<<<<<<<<<
50904  * int nElementBoundaries_element,
50905  * int nQuadraturePoints_elementBoundary,
50906  */
50907  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_223calculateExteriorElementBoundaryVelocities, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4604, __pyx_L1_error)
50908  __Pyx_GOTREF(__pyx_t_1);
50909  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateExteriorElementBoundary_3, __pyx_t_1) < 0) __PYX_ERR(0, 4604, __pyx_L1_error)
50910  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50911 
50912  /* "cfemIntegrals.pyx":4634
50913  * <double*>mAverage.data,
50914  * <double*>mJump.data)
50915  * def calculateConservationResidualPWL(int nElements_global, # <<<<<<<<<<<<<<
50916  * int nInteriorElementBoundaries_global,
50917  * int nExteriorElementBoundaries_global,
50918  */
50919  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_225calculateConservationResidualPWL, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4634, __pyx_L1_error)
50920  __Pyx_GOTREF(__pyx_t_1);
50921  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateConservationResidualPWL, __pyx_t_1) < 0) __PYX_ERR(0, 4634, __pyx_L1_error)
50922  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50923 
50924  /* "cfemIntegrals.pyx":4686
50925  * <double*>vConservative.data,
50926  * <double*>vConservative_element.data)
50927  * def calculateConservationJacobianPWL(int nNodes_global, # <<<<<<<<<<<<<<
50928  * int nNodes_internal,
50929  * int nElements_global,
50930  */
50931  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_227calculateConservationJacobianPWL, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4686, __pyx_L1_error)
50932  __Pyx_GOTREF(__pyx_t_1);
50933  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateConservationJacobianPWL, __pyx_t_1) < 0) __PYX_ERR(0, 4686, __pyx_L1_error)
50934  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50935 
50936  /* "cfemIntegrals.pyx":4732
50937  * <double*>normal.data,
50938  * <double*>starJacobian.data)
50939  * def calculateConservationFluxPWL(int nNodes_global, # <<<<<<<<<<<<<<
50940  * int nNodes_internal,
50941  * np.ndarray nElements_node,
50942  */
50943  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_229calculateConservationFluxPWL, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4732, __pyx_L1_error)
50944  __Pyx_GOTREF(__pyx_t_1);
50945  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateConservationFluxPWL, __pyx_t_1) < 0) __PYX_ERR(0, 4732, __pyx_L1_error)
50946  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50947 
50948  /* "cfemIntegrals.pyx":4750
50949  * <double*>starJ.data,
50950  * <double*>starU.data)
50951  * def setExteriorGlobalElementBoundaryVelocityValues(int updateFluxValues, # <<<<<<<<<<<<<<
50952  * int nExteriorElementBoundaries_global,
50953  * int nQuadraturePoints_elementBoundary,
50954  */
50955  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_231setExteriorGlobalElementBoundaryVelocityValues, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4750, __pyx_L1_error)
50956  __Pyx_GOTREF(__pyx_t_1);
50957  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setExteriorGlobalElementBoundary, __pyx_t_1) < 0) __PYX_ERR(0, 4750, __pyx_L1_error)
50958  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50959 
50960  /* "cfemIntegrals.pyx":4770
50961  * <double*>vn_in.data,
50962  * <double*>v_out.data)
50963  * def calculateDimensionlessNumbersADR(int nElements_global, # <<<<<<<<<<<<<<
50964  * int nQuadraturePoints_element,
50965  * int nSpace,
50966  */
50967  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_233calculateDimensionlessNumbersADR, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4770, __pyx_L1_error)
50968  __Pyx_GOTREF(__pyx_t_1);
50969  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateDimensionlessNumbersADR, __pyx_t_1) < 0) __PYX_ERR(0, 4770, __pyx_L1_error)
50970  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50971 
50972  /* "cfemIntegrals.pyx":4794
50973  * <double*>pe.data,
50974  * <double*>cfl.data)
50975  * def calculateDimensionlessNumbersADR_sd(int nElements_global, # <<<<<<<<<<<<<<
50976  * int nQuadraturePoints_element,
50977  * int nSpace,
50978  */
50979  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_235calculateDimensionlessNumbersADR_sd, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4794, __pyx_L1_error)
50980  __Pyx_GOTREF(__pyx_t_1);
50981  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateDimensionlessNumbersADR_2, __pyx_t_1) < 0) __PYX_ERR(0, 4794, __pyx_L1_error)
50982  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50983 
50984  /* "cfemIntegrals.pyx":4822
50985  * <double*> pe.data,
50986  * <double*> cfl.data)
50987  * def calculateCFLADR(np.ndarray elementDiameter, # <<<<<<<<<<<<<<
50988  * np.ndarray dm,
50989  * np.ndarray df,
50990  */
50991  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_237calculateCFLADR, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4822, __pyx_L1_error)
50992  __Pyx_GOTREF(__pyx_t_1);
50993  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateCFLADR, __pyx_t_1) < 0) __PYX_ERR(0, 4822, __pyx_L1_error)
50994  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50995 
50996  /* "cfemIntegrals.pyx":4836
50997  * <double*>df.data,
50998  * <double*>cfl.data)
50999  * def updateInteriorElementBoundaryDiffusiveVelocity(np.ndarray interiorElementBoundaries, # <<<<<<<<<<<<<<
51000  * np.ndarray elementBoundaryElements,
51001  * np.ndarray elementBoundaryLocalElementBoundaries,
51002  */
51003  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_239updateInteriorElementBoundaryDiffusiveVelocity, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4836, __pyx_L1_error)
51004  __Pyx_GOTREF(__pyx_t_1);
51005  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateInteriorElementBoundaryDif, __pyx_t_1) < 0) __PYX_ERR(0, 4836, __pyx_L1_error)
51006  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51007 
51008  /* "cfemIntegrals.pyx":4856
51009  * <double*>grad_phi.data,
51010  * <double*>velocity.data)
51011  * def updateInteriorElementBoundaryDiffusiveVelocity_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
51012  * np.ndarray colind,
51013  * np.ndarray interiorElementBoundaries,
51014  */
51015  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_241updateInteriorElementBoundaryDiffusiveVelocity_sd, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4856, __pyx_L1_error)
51016  __Pyx_GOTREF(__pyx_t_1);
51017  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateInteriorElementBoundaryDif_2, __pyx_t_1) < 0) __PYX_ERR(0, 4856, __pyx_L1_error)
51018  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51019 
51020  /* "cfemIntegrals.pyx":4880
51021  * <double*> grad_phi.data,
51022  * <double*> velocity.data)
51023  * def updateExteriorElementBoundaryDiffusiveVelocity(np.ndarray exteriorElementBoundaries, # <<<<<<<<<<<<<<
51024  * np.ndarray elementBoundaryElements,
51025  * np.ndarray elementBoundaryLocalElementBoundaries,
51026  */
51027  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_243updateExteriorElementBoundaryDiffusiveVelocity, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4880, __pyx_L1_error)
51028  __Pyx_GOTREF(__pyx_t_1);
51029  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateExteriorElementBoundaryDif, __pyx_t_1) < 0) __PYX_ERR(0, 4880, __pyx_L1_error)
51030  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51031 
51032  /* "cfemIntegrals.pyx":4910
51033  * <double*> grad_phi.data,
51034  * <double*> velocity.data)
51035  * def updateExteriorElementBoundaryDiffusiveVelocity_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
51036  * np.ndarray colind,
51037  * np.ndarray exteriorElementBoundaries,
51038  */
51039  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_245updateExteriorElementBoundaryDiffusiveVelocity_sd, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4910, __pyx_L1_error)
51040  __Pyx_GOTREF(__pyx_t_1);
51041  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateExteriorElementBoundaryDif_2, __pyx_t_1) < 0) __PYX_ERR(0, 4910, __pyx_L1_error)
51042  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51043 
51044  /* "cfemIntegrals.pyx":4934
51045  * <double*> grad_phi.data,
51046  * <double*> velocity.data)
51047  * def updateInteriorElementBoundaryAdvectiveVelocity(np.ndarray interiorElementBoundaries, # <<<<<<<<<<<<<<
51048  * np.ndarray elementBoundaryElements,
51049  * np.ndarray elementBoundaryLocalElementBoundaries,
51050  */
51051  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_247updateInteriorElementBoundaryAdvectiveVelocity, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4934, __pyx_L1_error)
51052  __Pyx_GOTREF(__pyx_t_1);
51053  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateInteriorElementBoundaryAdv, __pyx_t_1) < 0) __PYX_ERR(0, 4934, __pyx_L1_error)
51054  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51055 
51056  /* "cfemIntegrals.pyx":4952
51057  * <double*>f.data,
51058  * <double*>velocity.data)
51059  * def updateExteriorElementBoundaryAdvectiveVelocity(np.ndarray exteriorElementBoundaries, # <<<<<<<<<<<<<<
51060  * np.ndarray elementBoundaryElements,
51061  * np.ndarray elementBoundaryLocalElementBoundaries,
51062  */
51063  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_249updateExteriorElementBoundaryAdvectiveVelocity, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4952, __pyx_L1_error)
51064  __Pyx_GOTREF(__pyx_t_1);
51065  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateExteriorElementBoundaryAdv, __pyx_t_1) < 0) __PYX_ERR(0, 4952, __pyx_L1_error)
51066  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51067 
51068  /* "cfemIntegrals.pyx":4979
51069  * <double*> f.data,
51070  * <double*> velocity.data)
51071  * def updateInteriorElementBoundaryShockCapturingVelocity(np.ndarray interiorElementBoundaries, # <<<<<<<<<<<<<<
51072  * np.ndarray elementBoundaryElements,
51073  * np.ndarray elementBoundaryLocalElementBoundaries,
51074  */
51075  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_251updateInteriorElementBoundaryShockCapturingVelocity, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4979, __pyx_L1_error)
51076  __Pyx_GOTREF(__pyx_t_1);
51077  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateInteriorElementBoundarySho, __pyx_t_1) < 0) __PYX_ERR(0, 4979, __pyx_L1_error)
51078  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51079 
51080  /* "cfemIntegrals.pyx":5001
51081  * <double*>grad_u.data,
51082  * <double*>velocity.data)
51083  * def updateExteriorElementBoundaryShockCapturingVelocity(np.ndarray exteriorElementBoundaries, # <<<<<<<<<<<<<<
51084  * np.ndarray elementBoundaryElements,
51085  * np.ndarray elementBoundaryLocalElementBoundaries,
51086  */
51087  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_253updateExteriorElementBoundaryShockCapturingVelocity, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5001, __pyx_L1_error)
51088  __Pyx_GOTREF(__pyx_t_1);
51089  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateExteriorElementBoundarySho, __pyx_t_1) < 0) __PYX_ERR(0, 5001, __pyx_L1_error)
51090  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51091 
51092  /* "cfemIntegrals.pyx":5031
51093  * <double*> grad_u.data,
51094  * <double*> velocity.data)
51095  * def calculateInteriorElementBoundaryAverageVelocity(np.ndarray interiorElementBoundaries, # <<<<<<<<<<<<<<
51096  * np.ndarray elementBoundaryElements,
51097  * np.ndarray elementBoundaryLocalElementBoundaries,
51098  */
51099  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_255calculateInteriorElementBoundaryAverageVelocity, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5031, __pyx_L1_error)
51100  __Pyx_GOTREF(__pyx_t_1);
51101  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateInteriorElementBoundary_2, __pyx_t_1) < 0) __PYX_ERR(0, 5031, __pyx_L1_error)
51102  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51103 
51104  /* "cfemIntegrals.pyx":5049
51105  * <double*>v.data,
51106  * <double*>vAverage.data)
51107  * def calculateExteriorElementBoundaryAverageVelocity(np.ndarray exteriorElementBoundaries, # <<<<<<<<<<<<<<
51108  * np.ndarray elementBoundaryElements,
51109  * np.ndarray elementBoundaryLocalElementBoundaries,
51110  */
51111  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_257calculateExteriorElementBoundaryAverageVelocity, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5049, __pyx_L1_error)
51112  __Pyx_GOTREF(__pyx_t_1);
51113  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateExteriorElementBoundary_4, __pyx_t_1) < 0) __PYX_ERR(0, 5049, __pyx_L1_error)
51114  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51115 
51116  /* "cfemIntegrals.pyx":5067
51117  * <double*>v.data,
51118  * <double*>vAverage.data)
51119  * def calculateConservationResidualDG(np.ndarray elementResidual, # <<<<<<<<<<<<<<
51120  * np.ndarray conservationResidual):
51121  * cdef int nElements_global = elementResidual.shape[0]
51122  */
51123  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_259calculateConservationResidualDG, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5067, __pyx_L1_error)
51124  __Pyx_GOTREF(__pyx_t_1);
51125  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateConservationResidualDG, __pyx_t_1) < 0) __PYX_ERR(0, 5067, __pyx_L1_error)
51126  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51127 
51128  /* "cfemIntegrals.pyx":5075
51129  * <double*>elementResidual.data,
51130  * <double*>conservationResidual.data)
51131  * def calculateConservationResidual(np.ndarray n, # <<<<<<<<<<<<<<
51132  * np.ndarray dS_u,
51133  * np.ndarray elementResidual,
51134  */
51135  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_261calculateConservationResidual, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5075, __pyx_L1_error)
51136  __Pyx_GOTREF(__pyx_t_1);
51137  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateConservationResidual, __pyx_t_1) < 0) __PYX_ERR(0, 5075, __pyx_L1_error)
51138  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51139 
51140  /* "cfemIntegrals.pyx":5095
51141  * <double*>velocity.data,
51142  * <double*>conservationResidual.data)
51143  * def calculateConservationResidualGlobalBoundaries(int nElements_global, # <<<<<<<<<<<<<<
51144  * int nInteriorElementBoundaries_global,
51145  * int nExteriorElementBoundaries_global,
51146  */
51147  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_263calculateConservationResidualGlobalBoundaries, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5095, __pyx_L1_error)
51148  __Pyx_GOTREF(__pyx_t_1);
51149  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateConservationResidualGlo, __pyx_t_1) < 0) __PYX_ERR(0, 5095, __pyx_L1_error)
51150  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51151 
51152  /* "cfemIntegrals.pyx":5127
51153  * <double*>velocity.data,
51154  * <double*>conservationResidual.data)
51155  * def copyGlobalElementBoundaryVelocityToElementBoundary(np.ndarray interiorElementBoundaries, # <<<<<<<<<<<<<<
51156  * np.ndarray exteriorElementBoundaries,
51157  * np.ndarray elementBoundaryElementsArray,
51158  */
51159  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_265copyGlobalElementBoundaryVelocityToElementBoundary, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5127, __pyx_L1_error)
51160  __Pyx_GOTREF(__pyx_t_1);
51161  if (PyDict_SetItem(__pyx_d, __pyx_n_s_copyGlobalElementBoundaryVelocit, __pyx_t_1) < 0) __PYX_ERR(0, 5127, __pyx_L1_error)
51162  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51163 
51164  /* "cfemIntegrals.pyx":5153
51165  * <double*>velocityBoundary_global.data,
51166  * <double*>velocityBoundary_element.data)
51167  * def loadBoundaryFluxIntoGlobalElementBoundaryVelocity(np.ndarray exteriorElementBoundaries, # <<<<<<<<<<<<<<
51168  * np.ndarray fluxElementBoundaries,
51169  * np.ndarray normal,
51170  */
51171  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_267loadBoundaryFluxIntoGlobalElementBoundaryVelocity, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5153, __pyx_L1_error)
51172  __Pyx_GOTREF(__pyx_t_1);
51173  if (PyDict_SetItem(__pyx_d, __pyx_n_s_loadBoundaryFluxIntoGlobalElemen, __pyx_t_1) < 0) __PYX_ERR(0, 5153, __pyx_L1_error)
51174  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51175 
51176  /* "cfemIntegrals.pyx":5171
51177  * updateCoef,
51178  * <double*>velocity.data)
51179  * def calculateInteriorNumericalTrace_Potential(np.ndarray interiorElementBoundaries, # <<<<<<<<<<<<<<
51180  * np.ndarray elementBoundaryElements,
51181  * np.ndarray elementBoundaryLocalElementBoundaries,
51182  */
51183  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_269calculateInteriorNumericalTrace_Potential, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5171, __pyx_L1_error)
51184  __Pyx_GOTREF(__pyx_t_1);
51185  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateInteriorNumericalTrace, __pyx_t_1) < 0) __PYX_ERR(0, 5171, __pyx_L1_error)
51186  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51187 
51188  /* "cfemIntegrals.pyx":5193
51189  * <double*>dphi_trace_left.data,
51190  * <double*>dphi_trace_right.data)
51191  * def calculateExteriorNumericalTrace_Potential(np.ndarray isDOFBoundary, # <<<<<<<<<<<<<<
51192  * np.ndarray exteriorElementBoundaries,
51193  * np.ndarray elementBoundaryElements,
51194  */
51195  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_271calculateExteriorNumericalTrace_Potential, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5193, __pyx_L1_error)
51196  __Pyx_GOTREF(__pyx_t_1);
51197  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateExteriorNumericalTrace, __pyx_t_1) < 0) __PYX_ERR(0, 5193, __pyx_L1_error)
51198  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51199 
51200  /* "cfemIntegrals.pyx":5217
51201  * <double*>phi_trace.data,
51202  * <double*>dphi_trace_left.data)
51203  * def updateInteriorElementBoundary_MixedForm_weak(np.ndarray interiorElementBoundaries, # <<<<<<<<<<<<<<
51204  * np.ndarray elementBoundaryElements,
51205  * np.ndarray elementBoundaryLocalElementBoundaries,
51206  */
51207  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_273updateInteriorElementBoundary_MixedForm_weak, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5217, __pyx_L1_error)
51208  __Pyx_GOTREF(__pyx_t_1);
51209  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateInteriorElementBoundary_Mi, __pyx_t_1) < 0) __PYX_ERR(0, 5217, __pyx_L1_error)
51210  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51211 
51212  /* "cfemIntegrals.pyx":5241
51213  * <double*>w_dS.data,
51214  * <double*>b.data)
51215  * def updateInteriorElementBoundary_MixedForm_weakJacobian(np.ndarray interiorElementBoundaries, # <<<<<<<<<<<<<<
51216  * np.ndarray elementBoundaryElements,
51217  * np.ndarray elementBoundaryLocalElementBoundaries,
51218  */
51219  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_275updateInteriorElementBoundary_MixedForm_weakJacobian, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5241, __pyx_L1_error)
51220  __Pyx_GOTREF(__pyx_t_1);
51221  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateInteriorElementBoundary_Mi_2, __pyx_t_1) < 0) __PYX_ERR(0, 5241, __pyx_L1_error)
51222  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51223 
51224  /* "cfemIntegrals.pyx":5271
51225  * <double*>db.data,
51226  * <double*>db_eb.data)
51227  * def updateExteriorElementBoundary_MixedForm_weak(np.ndarray exteriorElementBoundaries, # <<<<<<<<<<<<<<
51228  * np.ndarray elementBoundaryElements,
51229  * np.ndarray elementBoundaryLocalElementBoundaries,
51230  */
51231  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_277updateExteriorElementBoundary_MixedForm_weak, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5271, __pyx_L1_error)
51232  __Pyx_GOTREF(__pyx_t_1);
51233  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateExteriorElementBoundary_Mi, __pyx_t_1) < 0) __PYX_ERR(0, 5271, __pyx_L1_error)
51234  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51235 
51236  /* "cfemIntegrals.pyx":5295
51237  * <double*>w_dS.data,
51238  * <double*>b.data)
51239  * def updateExteriorElementBoundary_MixedForm_weakJacobian(np.ndarray exteriorElementBoundaries, # <<<<<<<<<<<<<<
51240  * np.ndarray elementBoundaryElements,
51241  * np.ndarray elementBoundaryLocalElementBoundaries,
51242  */
51243  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_279updateExteriorElementBoundary_MixedForm_weakJacobian, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5295, __pyx_L1_error)
51244  __Pyx_GOTREF(__pyx_t_1);
51245  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateExteriorElementBoundary_Mi_2, __pyx_t_1) < 0) __PYX_ERR(0, 5295, __pyx_L1_error)
51246  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51247 
51248  /* "cfemIntegrals.pyx":5323
51249  * <double*>db.data,
51250  * <double*>db_eb.data)
51251  * def updatePotential_MixedForm_weak(np.ndarray phi, # <<<<<<<<<<<<<<
51252  * np.ndarray grad_w_dV,
51253  * np.ndarray b):
51254  */
51255  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_281updatePotential_MixedForm_weak, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5323, __pyx_L1_error)
51256  __Pyx_GOTREF(__pyx_t_1);
51257  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updatePotential_MixedForm_weak, __pyx_t_1) < 0) __PYX_ERR(0, 5323, __pyx_L1_error)
51258  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51259 
51260  /* "cfemIntegrals.pyx":5337
51261  * <double*>grad_w_dV.data,
51262  * <double*>b.data)
51263  * def updatePotential_MixedForm_weakJacobian(np.ndarray dphi, # <<<<<<<<<<<<<<
51264  * np.ndarray v,
51265  * np.ndarray grad_w_dV,
51266  */
51267  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_283updatePotential_MixedForm_weakJacobian, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5337, __pyx_L1_error)
51268  __Pyx_GOTREF(__pyx_t_1);
51269  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updatePotential_MixedForm_weakJa, __pyx_t_1) < 0) __PYX_ERR(0, 5337, __pyx_L1_error)
51270  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51271 
51272  /* "cfemIntegrals.pyx":5353
51273  * <double*>grad_w_dV.data,
51274  * <double*>db.data)
51275  * def calculateVelocityQuadrature_MixedForm(np.ndarray A_inv, # <<<<<<<<<<<<<<
51276  * np.ndarray b,
51277  * np.ndarray v,
51278  */
51279  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_285calculateVelocityQuadrature_MixedForm, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5353, __pyx_L1_error)
51280  __Pyx_GOTREF(__pyx_t_1);
51281  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateVelocityQuadrature_Mixe, __pyx_t_1) < 0) __PYX_ERR(0, 5353, __pyx_L1_error)
51282  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51283 
51284  /* "cfemIntegrals.pyx":5377
51285  * <double*>qv.data,
51286  * <double*>qV.data)
51287  * def calculateVelocityQuadrature_MixedForm_Jacobian(np.ndarray A_inv, # <<<<<<<<<<<<<<
51288  * np.ndarray db,
51289  * np.ndarray db_eb,
51290  */
51291  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_287calculateVelocityQuadrature_MixedForm_Jacobian, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5377, __pyx_L1_error)
51292  __Pyx_GOTREF(__pyx_t_1);
51293  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateVelocityQuadrature_Mixe_2, __pyx_t_1) < 0) __PYX_ERR(0, 5377, __pyx_L1_error)
51294  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51295 
51296  /* "cfemIntegrals.pyx":5407
51297  * <double*>qDV.data,
51298  * <double*>qDV_eb.data)
51299  * def calculateVelocityProjectionMatrixLDG(np.ndarray vXw_dV, # <<<<<<<<<<<<<<
51300  * np.ndarray A_inv):
51301  * cdef int nElements_global = vXw_dV.shape[0]
51302  */
51303  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_289calculateVelocityProjectionMatrixLDG, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5407, __pyx_L1_error)
51304  __Pyx_GOTREF(__pyx_t_1);
51305  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateVelocityProjectionMatri, __pyx_t_1) < 0) __PYX_ERR(0, 5407, __pyx_L1_error)
51306  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51307 
51308  /* "cfemIntegrals.pyx":5417
51309  * <double*>vXw_dV.data,
51310  * <double*>A_inv.data)
51311  * def updateDiffusion_MixedForm_weak(np.ndarray a, # <<<<<<<<<<<<<<
51312  * np.ndarray qV,
51313  * np.ndarray grad_w_dV,
51314  */
51315  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_291updateDiffusion_MixedForm_weak, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5417, __pyx_L1_error)
51316  __Pyx_GOTREF(__pyx_t_1);
51317  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateDiffusion_MixedForm_weak, __pyx_t_1) < 0) __PYX_ERR(0, 5417, __pyx_L1_error)
51318  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51319 
51320  /* "cfemIntegrals.pyx":5433
51321  * <double*>grad_w_dV.data,
51322  * <double*>weak_residual.data)
51323  * def updateDiffusionJacobian_MixedForm_weak(np.ndarray a, # <<<<<<<<<<<<<<
51324  * np.ndarray da,
51325  * np.ndarray qV,
51326  */
51327  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_293updateDiffusionJacobian_MixedForm_weak, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5433, __pyx_L1_error)
51328  __Pyx_GOTREF(__pyx_t_1);
51329  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateDiffusionJacobian_MixedFor, __pyx_t_1) < 0) __PYX_ERR(0, 5433, __pyx_L1_error)
51330  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51331 
51332  /* "cfemIntegrals.pyx":5463
51333  * <double*>jacobian_weak_residual.data,
51334  * <double*>jacobian_weak_residual_eb.data)
51335  * def estimate_mt(np.ndarray v, # <<<<<<<<<<<<<<
51336  * np.ndarray vXw_dV,
51337  * np.ndarray elementSpatialResidual,
51338  */
51339  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_295estimate_mt, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5463, __pyx_L1_error)
51340  __Pyx_GOTREF(__pyx_t_1);
51341  if (PyDict_SetItem(__pyx_d, __pyx_n_s_estimate_mt, __pyx_t_1) < 0) __PYX_ERR(0, 5463, __pyx_L1_error)
51342  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51343 
51344  /* "cfemIntegrals.pyx":5477
51345  * <double*>elementSpatialResidual.data,
51346  * <double*>mt.data)
51347  * def estimate_mt_lowmem(np.ndarray v, # <<<<<<<<<<<<<<
51348  * np.ndarray w_dV,
51349  * np.ndarray elementSpatialResidual,
51350  */
51351  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_297estimate_mt_lowmem, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5477, __pyx_L1_error)
51352  __Pyx_GOTREF(__pyx_t_1);
51353  if (PyDict_SetItem(__pyx_d, __pyx_n_s_estimate_mt_lowmem, __pyx_t_1) < 0) __PYX_ERR(0, 5477, __pyx_L1_error)
51354  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51355 
51356  /* "cfemIntegrals.pyx":5491
51357  * <double*> elementSpatialResidual.data,
51358  * <double*> mt.data)
51359  * def scalarDomainIntegral(np.ndarray dV, # <<<<<<<<<<<<<<
51360  * np.ndarray nValueArray,
51361  * int nElements_global):
51362  */
51363  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_299scalarDomainIntegral, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5491, __pyx_L1_error)
51364  __Pyx_GOTREF(__pyx_t_1);
51365  if (PyDict_SetItem(__pyx_d, __pyx_n_s_scalarDomainIntegral, __pyx_t_1) < 0) __PYX_ERR(0, 5491, __pyx_L1_error)
51366  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51367 
51368  /* "cfemIntegrals.pyx":5501
51369  * <double*> nValueArray.data)
51370  * return output
51371  * def scalarHeavisideDomainIntegral(int nElements_global, # <<<<<<<<<<<<<<
51372  * int nQuadraturePoints_element,
51373  * np.ndarray dV,
51374  */
51375  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_301scalarHeavisideDomainIntegral, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5501, __pyx_L1_error)
51376  __Pyx_GOTREF(__pyx_t_1);
51377  if (PyDict_SetItem(__pyx_d, __pyx_n_s_scalarHeavisideDomainIntegral, __pyx_t_1) < 0) __PYX_ERR(0, 5501, __pyx_L1_error)
51378  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51379 
51380  /* "cfemIntegrals.pyx":5511
51381  * <double*> nValueArray.data)
51382  * return output
51383  * def scalarSmoothedHeavisideDomainIntegral(double epsFact, # <<<<<<<<<<<<<<
51384  * np.ndarray elementDiameter,
51385  * np.ndarray dV,
51386  */
51387  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_303scalarSmoothedHeavisideDomainIntegral, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5511, __pyx_L1_error)
51388  __Pyx_GOTREF(__pyx_t_1);
51389  if (PyDict_SetItem(__pyx_d, __pyx_n_s_scalarSmoothedHeavisideDomainInt, __pyx_t_1) < 0) __PYX_ERR(0, 5511, __pyx_L1_error)
51390  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51391 
51392  /* "cfemIntegrals.pyx":5525
51393  * <double*> nValueArray.data)
51394  * return output
51395  * def fluxDomainBoundaryIntegral(int nElementBoundaries_owned, # <<<<<<<<<<<<<<
51396  * np.ndarray flag,
51397  * np.ndarray exteriorElementBoundariesArray,
51398  */
51399  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_305fluxDomainBoundaryIntegral, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5525, __pyx_L1_error)
51400  __Pyx_GOTREF(__pyx_t_1);
51401  if (PyDict_SetItem(__pyx_d, __pyx_n_s_fluxDomainBoundaryIntegral, __pyx_t_1) < 0) __PYX_ERR(0, 5525, __pyx_L1_error)
51402  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51403 
51404  /* "cfemIntegrals.pyx":5541
51405  * <double*> nValueArray.data)
51406  * return output
51407  * def fluxDomainBoundaryIntegralFromVector(int nElementBoundaries_owned, # <<<<<<<<<<<<<<
51408  * np.ndarray flag,
51409  * np.ndarray exteriorElementBoundaries,
51410  */
51411  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_307fluxDomainBoundaryIntegralFromVector, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5541, __pyx_L1_error)
51412  __Pyx_GOTREF(__pyx_t_1);
51413  if (PyDict_SetItem(__pyx_d, __pyx_n_s_fluxDomainBoundaryIntegralFromVe, __pyx_t_1) < 0) __PYX_ERR(0, 5541, __pyx_L1_error)
51414  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51415 
51416  /* "cfemIntegrals.pyx":5561
51417  * <double*> normal.data)
51418  * return output
51419  * def copyExteriorElementBoundaryValuesFromElementBoundaryValues(np.ndarray exteriorElementBoundaries, # <<<<<<<<<<<<<<
51420  * np.ndarray elementBoundaryElements,
51421  * np.ndarray elementBoundaryLocalElementBoundaries,
51422  */
51423  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_309copyExteriorElementBoundaryValuesFromElementBoundaryValues, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5561, __pyx_L1_error)
51424  __Pyx_GOTREF(__pyx_t_1);
51425  if (PyDict_SetItem(__pyx_d, __pyx_n_s_copyExteriorElementBoundaryValue, __pyx_t_1) < 0) __PYX_ERR(0, 5561, __pyx_L1_error)
51426  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51427 
51428  /* "cfemIntegrals.pyx":5585
51429  * <double*> ebq_val.data,
51430  * <double*> ebqe_val.data)
51431  * def copyExteriorElementBoundaryValuesToElementBoundaryValues(np.ndarray exteriorElementBoundaries, # <<<<<<<<<<<<<<
51432  * np.ndarray elementBoundaryElements,
51433  * np.ndarray elementBoundaryLocalElementBoundaries,
51434  */
51435  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_311copyExteriorElementBoundaryValuesToElementBoundaryValues, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5585, __pyx_L1_error)
51436  __Pyx_GOTREF(__pyx_t_1);
51437  if (PyDict_SetItem(__pyx_d, __pyx_n_s_copyExteriorElementBoundaryValue_2, __pyx_t_1) < 0) __PYX_ERR(0, 5585, __pyx_L1_error)
51438  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51439 
51440  /* "cfemIntegrals.pyx":5609
51441  * <double*> ebqe_val.data,
51442  * <double*> ebq_val.data)
51443  * def copyExteriorElementBoundaryValuesToGlobalElementBoundaryValues(np.ndarray exteriorElementBoundaries, # <<<<<<<<<<<<<<
51444  * np.ndarray elementBoundaryElements,
51445  * np.ndarray elementBoundaryLocalElementBoundaries,
51446  */
51447  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_313copyExteriorElementBoundaryValuesToGlobalElementBoundaryValues, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5609, __pyx_L1_error)
51448  __Pyx_GOTREF(__pyx_t_1);
51449  if (PyDict_SetItem(__pyx_d, __pyx_n_s_copyExteriorElementBoundaryValue_3, __pyx_t_1) < 0) __PYX_ERR(0, 5609, __pyx_L1_error)
51450  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51451 
51452  /* "cfemIntegrals.pyx":5629
51453  * <double*> ebqe_val.data,
51454  * <double*> ebq_global_val.data)
51455  * def copyExteriorElementBoundaryValuesFromGlobalElementBoundaryValues(np.ndarray exteriorElementBoundaries, # <<<<<<<<<<<<<<
51456  * np.ndarray elementBoundaryElements,
51457  * np.ndarray elementBoundaryLocalElementBoundaries,
51458  */
51459  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_315copyExteriorElementBoundaryValuesFromGlobalElementBoundaryValues, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5629, __pyx_L1_error)
51460  __Pyx_GOTREF(__pyx_t_1);
51461  if (PyDict_SetItem(__pyx_d, __pyx_n_s_copyExteriorElementBoundaryValue_4, __pyx_t_1) < 0) __PYX_ERR(0, 5629, __pyx_L1_error)
51462  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51463 
51464  /* "cfemIntegrals.pyx":5649
51465  * <double*> ebq_global_val.data,
51466  * <double*> ebqe_val.data)
51467  * def computeC0P1InterpolantDGP0(np.ndarray elementNodesArray, # <<<<<<<<<<<<<<
51468  * np.ndarray nodeElementOffsets,
51469  * np.ndarray nodeElementsArray,
51470  */
51471  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_317computeC0P1InterpolantDGP0, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5649, __pyx_L1_error)
51472  __Pyx_GOTREF(__pyx_t_1);
51473  if (PyDict_SetItem(__pyx_d, __pyx_n_s_computeC0P1InterpolantDGP0, __pyx_t_1) < 0) __PYX_ERR(0, 5649, __pyx_L1_error)
51474  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51475 
51476  /* "cfemIntegrals.pyx":5671
51477  * <double*> dof.data,
51478  * <double*> nodalAverage.data)
51479  * def computeC0P1InterpolantNCP1(int dim_dof, # <<<<<<<<<<<<<<
51480  * np.ndarray elementNodesArray,
51481  * np.ndarray nodeElementOffsets,
51482  */
51483  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_319computeC0P1InterpolantNCP1, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5671, __pyx_L1_error)
51484  __Pyx_GOTREF(__pyx_t_1);
51485  if (PyDict_SetItem(__pyx_d, __pyx_n_s_computeC0P1InterpolantNCP1, __pyx_t_1) < 0) __PYX_ERR(0, 5671, __pyx_L1_error)
51486  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51487 
51488  /* "cfemIntegrals.pyx":5693
51489  * <double*> dof.data,
51490  * <double*> nodalAverage.data)
51491  * def computeC0P1InterpolantDGP12(int dim_dof, # <<<<<<<<<<<<<<
51492  * np.ndarray elementNodesArray,
51493  * np.ndarray nodeElementOffsets,
51494  */
51495  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_321computeC0P1InterpolantDGP12, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5693, __pyx_L1_error)
51496  __Pyx_GOTREF(__pyx_t_1);
51497  if (PyDict_SetItem(__pyx_d, __pyx_n_s_computeC0P1InterpolantDGP12, __pyx_t_1) < 0) __PYX_ERR(0, 5693, __pyx_L1_error)
51498  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51499 
51500  /* "cfemIntegrals.pyx":5715
51501  * <double*> dof.data,
51502  * <double*> nodalAverage.data)
51503  * def parametricFiniteElementSpace_getValuesGlobalExteriorTrace(np.ndarray exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
51504  * np.ndarray elementBoundaryElementsArray,
51505  * np.ndarray elementBoundaryLocalElementBoundariesArray,
51506  */
51507  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_323parametricFiniteElementSpace_getValuesGlobalExteriorTrace, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5715, __pyx_L1_error)
51508  __Pyx_GOTREF(__pyx_t_1);
51509  if (PyDict_SetItem(__pyx_d, __pyx_n_s_parametricFiniteElementSpace_get_6, __pyx_t_1) < 0) __PYX_ERR(0, 5715, __pyx_L1_error)
51510  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51511 
51512  /* "cfemIntegrals.pyx":5733
51513  * <double*> psi.data,
51514  * <double*> vArray.data)
51515  * def parametricFiniteElementSpace_getGradientValuesGlobalExteriorTrace(np.ndarray exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
51516  * np.ndarray elementBoundaryElementsArray,
51517  * np.ndarray elementBoundaryLocalElementBoundariesArray,
51518  */
51519  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_325parametricFiniteElementSpace_getGradientValuesGlobalExteriorTrace, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5733, __pyx_L1_error)
51520  __Pyx_GOTREF(__pyx_t_1);
51521  if (PyDict_SetItem(__pyx_d, __pyx_n_s_parametricFiniteElementSpace_get_7, __pyx_t_1) < 0) __PYX_ERR(0, 5733, __pyx_L1_error)
51522  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51523 
51524  /* "cfemIntegrals.pyx":5755
51525  * <double*> inverseJacobianArray.data,
51526  * <double*> grad_vArray.data)
51527  * def parametricMaps_getValuesGlobalExteriorTrace(np.ndarray exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
51528  * np.ndarray elementBoundaryElementsArray,
51529  * np.ndarray elementBoundaryLocalElementBoundariesArray,
51530  */
51531  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_327parametricMaps_getValuesGlobalExteriorTrace, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5755, __pyx_L1_error)
51532  __Pyx_GOTREF(__pyx_t_1);
51533  if (PyDict_SetItem(__pyx_d, __pyx_n_s_parametricMaps_getValuesGlobalEx, __pyx_t_1) < 0) __PYX_ERR(0, 5755, __pyx_L1_error)
51534  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51535 
51536  /* "cfemIntegrals.pyx":5777
51537  * <double*> nodeArray.data,
51538  * <double*> xArray.data)
51539  * def parametricMaps_getInverseValuesGlobalExteriorTrace(np.ndarray exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
51540  * np.ndarray elementBoundaryElementsArray,
51541  * np.ndarray elementBoundaryLocalElementBoundariesArray,
51542  */
51543  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_329parametricMaps_getInverseValuesGlobalExteriorTrace, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5777, __pyx_L1_error)
51544  __Pyx_GOTREF(__pyx_t_1);
51545  if (PyDict_SetItem(__pyx_d, __pyx_n_s_parametricMaps_getInverseValuesG, __pyx_t_1) < 0) __PYX_ERR(0, 5777, __pyx_L1_error)
51546  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51547 
51548  /* "cfemIntegrals.pyx":5801
51549  * <double*> xArray.data,
51550  * <double*> xiArray.data)
51551  * def parametricMaps_getJacobianValuesGlobalExteriorTrace(np.ndarray exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
51552  * np.ndarray elementBoundaryElementsArray,
51553  * np.ndarray elementBoundaryLocalElementBoundariesArray,
51554  */
51555  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_331parametricMaps_getJacobianValuesGlobalExteriorTrace, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5801, __pyx_L1_error)
51556  __Pyx_GOTREF(__pyx_t_1);
51557  if (PyDict_SetItem(__pyx_d, __pyx_n_s_parametricMaps_getJacobianValues_3, __pyx_t_1) < 0) __PYX_ERR(0, 5801, __pyx_L1_error)
51558  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51559 
51560  /* "cfemIntegrals.pyx":5864
51561  * else:
51562  * print("error in getJacobianValuesTrace...jacobianInverse not sized properly")
51563  * def parametricMaps_getJacobianValuesGlobalExteriorTrace_movingDomain(np.ndarray exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
51564  * np.ndarray elementBoundaryElementsArray,
51565  * np.ndarray elementBoundaryLocalElementBoundariesArray,
51566  */
51567  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_333parametricMaps_getJacobianValuesGlobalExteriorTrace_movingDomain, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5864, __pyx_L1_error)
51568  __Pyx_GOTREF(__pyx_t_1);
51569  if (PyDict_SetItem(__pyx_d, __pyx_n_s_parametricMaps_getJacobianValues_4, __pyx_t_1) < 0) __PYX_ERR(0, 5864, __pyx_L1_error)
51570  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51571 
51572  /* "cfemIntegrals.pyx":5929
51573  * else:
51574  * print("error in getJacobianValuesTrace...jacobianInverse not sized properly")
51575  * def calculateWeightedShapeGlobalExteriorTrace(np.ndarray exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
51576  * np.ndarray elementBoundaryElementsArray,
51577  * np.ndarray elementBoundaryLocalElementBoundariesArray,
51578  */
51579  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_335calculateWeightedShapeGlobalExteriorTrace, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5929, __pyx_L1_error)
51580  __Pyx_GOTREF(__pyx_t_1);
51581  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateWeightedShapeGlobalExte, __pyx_t_1) < 0) __PYX_ERR(0, 5929, __pyx_L1_error)
51582  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51583 
51584  /* "cfemIntegrals.pyx":5949
51585  * <double*> w.data,
51586  * <double*> w_dS.data)
51587  * def calculateShape_X_weightedShapeGlobalExteriorTrace(np.ndarray exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
51588  * np.ndarray elementBoundaryElementsArray,
51589  * np.ndarray elementBoundaryLocalElementBoundariesArray,
51590  */
51591  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_337calculateShape_X_weightedShapeGlobalExteriorTrace, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5949, __pyx_L1_error)
51592  __Pyx_GOTREF(__pyx_t_1);
51593  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateShape_X_weightedShapeGl, __pyx_t_1) < 0) __PYX_ERR(0, 5949, __pyx_L1_error)
51594  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51595 
51596  /* "cfemIntegrals.pyx":5969
51597  * <double*> w_dS.data,
51598  * <double*> v_X_w_dS.data)
51599  * def calculateGradShape_X_weightedShapeGlobalExteriorTrace(np.ndarray exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
51600  * np.ndarray elementBoundaryElementsArray,
51601  * np.ndarray elementBoundaryLocalElementBoundariesArray,
51602  */
51603  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_339calculateGradShape_X_weightedShapeGlobalExteriorTrace, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5969, __pyx_L1_error)
51604  __Pyx_GOTREF(__pyx_t_1);
51605  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateGradShape_X_weightedSha_3, __pyx_t_1) < 0) __PYX_ERR(0, 5969, __pyx_L1_error)
51606  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51607 
51608  /* "cfemIntegrals.pyx":5991
51609  * <double*> w_dS.data,
51610  * <double*> grad_v_X_w_dS.data)
51611  * def calculateGlobalExteriorElementBoundaryIntegrationWeights(int nQuadraturePoints_elementBoundary, # <<<<<<<<<<<<<<
51612  * int nExteriorElementBoundaries_global,
51613  * np.ndarray sqrt_det_g,
51614  */
51615  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_341calculateGlobalExteriorElementBoundaryIntegrationWeights, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5991, __pyx_L1_error)
51616  __Pyx_GOTREF(__pyx_t_1);
51617  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateGlobalExteriorElementBo, __pyx_t_1) < 0) __PYX_ERR(0, 5991, __pyx_L1_error)
51618  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51619 
51620  /* "cfemIntegrals.pyx":6001
51621  * <double*> referenceWeights.data,
51622  * <double*> weights.data)
51623  * def calculateFiniteElementFunctionValuesGlobalExteriorTrace(np.ndarray exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
51624  * np.ndarray elementBoundaryElementsArray,
51625  * np.ndarray elementBoundaryLocalElementBoundariesArray,
51626  */
51627  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_343calculateFiniteElementFunctionValuesGlobalExteriorTrace, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6001, __pyx_L1_error)
51628  __Pyx_GOTREF(__pyx_t_1);
51629  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateFiniteElementFunctionVa_3, __pyx_t_1) < 0) __PYX_ERR(0, 6001, __pyx_L1_error)
51630  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51631 
51632  /* "cfemIntegrals.pyx":6028
51633  * <double*> v.data,
51634  * <double*> u.data)
51635  * def calculateFiniteElementFunctionGradientValuesGlobalExteriorTrace(np.ndarray exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
51636  * np.ndarray elementBoundaryElementsArray,
51637  * np.ndarray elementBoundaryLocalElementBoundariesArray,
51638  */
51639  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_345calculateFiniteElementFunctionGradientValuesGlobalExteriorTrace, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6028, __pyx_L1_error)
51640  __Pyx_GOTREF(__pyx_t_1);
51641  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateFiniteElementFunctionGr_4, __pyx_t_1) < 0) __PYX_ERR(0, 6028, __pyx_L1_error)
51642  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51643 
51644  /* "cfemIntegrals.pyx":6059
51645  * <double*> grad_v.data,
51646  * <double*> grad_u.data)
51647  * def copyBetweenFreeUnknownsAndGlobalUnknowns(int nDOF2set, # <<<<<<<<<<<<<<
51648  * int offset,
51649  * int stride,
51650  */
51651  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_347copyBetweenFreeUnknownsAndGlobalUnknowns, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6059, __pyx_L1_error)
51652  __Pyx_GOTREF(__pyx_t_1);
51653  if (PyDict_SetItem(__pyx_d, __pyx_n_s_copyBetweenFreeUnknownsAndGlobal, __pyx_t_1) < 0) __PYX_ERR(0, 6059, __pyx_L1_error)
51654  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51655 
51656  /* "cfemIntegrals.pyx":6084
51657  * else:
51658  * print("error copyFromFreeToGlobal = ", nDOF2set, " not recognized quitting\n")
51659  * def updateInteriorElementBoundaryDiffusionAdjoint(np.ndarray interiorElementBoundaries, # <<<<<<<<<<<<<<
51660  * np.ndarray elementBoundaryElements,
51661  * np.ndarray elementBoundaryLocalElementBoundaries,
51662  */
51663  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_349updateInteriorElementBoundaryDiffusionAdjoint, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6084, __pyx_L1_error)
51664  __Pyx_GOTREF(__pyx_t_1);
51665  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateInteriorElementBoundaryDif_3, __pyx_t_1) < 0) __PYX_ERR(0, 6084, __pyx_L1_error)
51666  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51667 
51668  /* "cfemIntegrals.pyx":6114
51669  * <double*> dS.data,
51670  * <double*> residual.data)
51671  * def updateExteriorElementBoundaryDiffusionAdjoint(np.ndarray isDOFBoundary, # <<<<<<<<<<<<<<
51672  * np.ndarray exteriorElementBoundaries,
51673  * np.ndarray elementBoundaryElements,
51674  */
51675  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_351updateExteriorElementBoundaryDiffusionAdjoint, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6114, __pyx_L1_error)
51676  __Pyx_GOTREF(__pyx_t_1);
51677  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateExteriorElementBoundaryDif_3, __pyx_t_1) < 0) __PYX_ERR(0, 6114, __pyx_L1_error)
51678  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51679 
51680  /* "cfemIntegrals.pyx":6146
51681  * <double*> dS.data,
51682  * <double*> residual.data)
51683  * def updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense(int offset_r, # <<<<<<<<<<<<<<
51684  * int stride_r,
51685  * int offset_u,
51686  */
51687  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_353updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6146, __pyx_L1_error)
51688  __Pyx_GOTREF(__pyx_t_1);
51689  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateGlobalJacobianFromInterior_7, __pyx_t_1) < 0) __PYX_ERR(0, 6146, __pyx_L1_error)
51690  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51691 
51692  /* "cfemIntegrals.pyx":6200
51693  * <double*> dS.data,
51694  * <double*> jac.data)
51695  * def updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense(int offset_r, # <<<<<<<<<<<<<<
51696  * int stride_r,
51697  * int offset_u,
51698  */
51699  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_355updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6200, __pyx_L1_error)
51700  __Pyx_GOTREF(__pyx_t_1);
51701  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateGlobalJacobianFromExterior_5, __pyx_t_1) < 0) __PYX_ERR(0, 6200, __pyx_L1_error)
51702  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51703 
51704  /* "cfemIntegrals.pyx":6254
51705  * <double*> dS.data,
51706  * <double*> jac.data)
51707  * def updateInteriorElementBoundaryDiffusionAdjoint_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
51708  * np.ndarray colind,
51709  * np.ndarray interiorElementBoundaries,
51710  */
51711  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_357updateInteriorElementBoundaryDiffusionAdjoint_sd, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6254, __pyx_L1_error)
51712  __Pyx_GOTREF(__pyx_t_1);
51713  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateInteriorElementBoundaryDif_4, __pyx_t_1) < 0) __PYX_ERR(0, 6254, __pyx_L1_error)
51714  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51715 
51716  /* "cfemIntegrals.pyx":6288
51717  * <double*> dS.data,
51718  * <double*> residual.data)
51719  * def updateExteriorElementBoundaryDiffusionAdjoint_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
51720  * np.ndarray colind,
51721  * np.ndarray isDOFBoundary,
51722  */
51723  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_359updateExteriorElementBoundaryDiffusionAdjoint_sd, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6288, __pyx_L1_error)
51724  __Pyx_GOTREF(__pyx_t_1);
51725  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateExteriorElementBoundaryDif_4, __pyx_t_1) < 0) __PYX_ERR(0, 6288, __pyx_L1_error)
51726  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51727 
51728  /* "cfemIntegrals.pyx":6324
51729  * <double*> dS.data,
51730  * <double*> residual.data)
51731  * def updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
51732  * np.ndarray colind,
51733  * int offset_r,
51734  */
51735  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_361updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense_sd, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6324, __pyx_L1_error)
51736  __Pyx_GOTREF(__pyx_t_1);
51737  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateGlobalJacobianFromInterior_8, __pyx_t_1) < 0) __PYX_ERR(0, 6324, __pyx_L1_error)
51738  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51739 
51740  /* "cfemIntegrals.pyx":6382
51741  * <double*> dS.data,
51742  * <double*> jac.data)
51743  * def updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
51744  * np.ndarray colind,
51745  * int offset_r,
51746  */
51747  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_363updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense_sd, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6382, __pyx_L1_error)
51748  __Pyx_GOTREF(__pyx_t_1);
51749  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateGlobalJacobianFromExterior_6, __pyx_t_1) < 0) __PYX_ERR(0, 6382, __pyx_L1_error)
51750  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51751 
51752  /* "cfemIntegrals.pyx":6440
51753  * <double*> dS.data,
51754  * <double*> jac.data)
51755  * def updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_CSR_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
51756  * np.ndarray colind,
51757  * int offset_r,
51758  */
51759  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_365updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_CSR_sd, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6440, __pyx_L1_error)
51760  __Pyx_GOTREF(__pyx_t_1);
51761  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateGlobalJacobianFromInterior_9, __pyx_t_1) < 0) __PYX_ERR(0, 6440, __pyx_L1_error)
51762  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51763 
51764  /* "cfemIntegrals.pyx":6504
51765  * <double*> dS.data,
51766  * <double*> jac_array.data)
51767  * def updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_CSR_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
51768  * np.ndarray colind,
51769  * int offset_r,
51770  */
51771  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_367updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_CSR_sd, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6504, __pyx_L1_error)
51772  __Pyx_GOTREF(__pyx_t_1);
51773  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateGlobalJacobianFromExterior_7, __pyx_t_1) < 0) __PYX_ERR(0, 6504, __pyx_L1_error)
51774  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51775 
51776  /* "cfemIntegrals.pyx":6568
51777  * <double*> dS.data,
51778  * <double*> jac_array.data)
51779  * def update_f_movingDomain(np.ndarray xt, # <<<<<<<<<<<<<<
51780  * np.ndarray m,
51781  * np.ndarray f):
51782  */
51783  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_369update_f_movingDomain, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6568, __pyx_L1_error)
51784  __Pyx_GOTREF(__pyx_t_1);
51785  if (PyDict_SetItem(__pyx_d, __pyx_n_s_update_f_movingDomain, __pyx_t_1) < 0) __PYX_ERR(0, 6568, __pyx_L1_error)
51786  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51787 
51788  /* "cfemIntegrals.pyx":6586
51789  * <double*> m.data,
51790  * <double*> f.data)
51791  * def update_f_movingDomain_constantMass(np.ndarray xt, # <<<<<<<<<<<<<<
51792  * np.ndarray f):
51793  * if f.ndim == 3:
51794  */
51795  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_371update_f_movingDomain_constantMass, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6586, __pyx_L1_error)
51796  __Pyx_GOTREF(__pyx_t_1);
51797  if (PyDict_SetItem(__pyx_d, __pyx_n_s_update_f_movingDomain_constantMa, __pyx_t_1) < 0) __PYX_ERR(0, 6586, __pyx_L1_error)
51798  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51799 
51800  /* "cfemIntegrals.pyx":6601
51801  * <double*> xt.data,
51802  * <double*> f.data)
51803  * def updateStress_weak(np.ndarray sigma, # <<<<<<<<<<<<<<
51804  * np.ndarray grad_w_dV,
51805  * np.ndarray weak_residual_x,
51806  */
51807  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_373updateStress_weak, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6601, __pyx_L1_error)
51808  __Pyx_GOTREF(__pyx_t_1);
51809  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateStress_weak, __pyx_t_1) < 0) __PYX_ERR(0, 6601, __pyx_L1_error)
51810  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51811 
51812  /* "cfemIntegrals.pyx":6619
51813  * <double*> weak_residual_y.data,
51814  * <double*> weak_residual_z.data)
51815  * def updateStressJacobian_weak(np.ndarray dsigma_xx, # <<<<<<<<<<<<<<
51816  * np.ndarray dsigma_xy,
51817  * np.ndarray dsigma_xz,
51818  */
51819  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_375updateStressJacobian_weak, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6619, __pyx_L1_error)
51820  __Pyx_GOTREF(__pyx_t_1);
51821  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateStressJacobian_weak, __pyx_t_1) < 0) __PYX_ERR(0, 6619, __pyx_L1_error)
51822  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51823 
51824  /* "cfemIntegrals.pyx":6669
51825  * <double*> jacobian_weak_residual_zy.data,
51826  * <double*> jacobian_weak_residual_zz.data)
51827  * def projectFromNodalInterpolationConditions(int dim_dof, # <<<<<<<<<<<<<<
51828  * np.ndarray l2g,
51829  * np.ndarray functional_map_element,
51830  */
51831  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_377projectFromNodalInterpolationConditions, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6669, __pyx_L1_error)
51832  __Pyx_GOTREF(__pyx_t_1);
51833  if (PyDict_SetItem(__pyx_d, __pyx_n_s_projectFromNodalInterpolationCon, __pyx_t_1) < 0) __PYX_ERR(0, 6669, __pyx_L1_error)
51834  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51835 
51836  /* "cfemIntegrals.pyx":6683
51837  * <double*> interpolationValues.data,
51838  * <double*> dofs.data)
51839  * def calculateVelocityQuadrature_MixedForm2_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
51840  * np.ndarray colind,
51841  * np.ndarray qa,
51842  */
51843  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_379calculateVelocityQuadrature_MixedForm2_sd, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6683, __pyx_L1_error)
51844  __Pyx_GOTREF(__pyx_t_1);
51845  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateVelocityQuadrature_Mixe_3, __pyx_t_1) < 0) __PYX_ERR(0, 6683, __pyx_L1_error)
51846  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51847 
51848  /* "cfemIntegrals.pyx":6708
51849  * <double*> qV.data)
51850  *
51851  * def updateDiffusion_MixedForm_weak_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
51852  * np.ndarray colind,
51853  * np.ndarray a,
51854  */
51855  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_381updateDiffusion_MixedForm_weak_sd, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6708, __pyx_L1_error)
51856  __Pyx_GOTREF(__pyx_t_1);
51857  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateDiffusion_MixedForm_weak_s, __pyx_t_1) < 0) __PYX_ERR(0, 6708, __pyx_L1_error)
51858  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51859 
51860  /* "cfemIntegrals.pyx":6729
51861  * <double*> residual.data)
51862  *
51863  * def calculateVelocityQuadrature_MixedForm2_Jacobian_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
51864  * np.ndarray colind,
51865  * np.ndarray qa,
51866  */
51867  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_383calculateVelocityQuadrature_MixedForm2_Jacobian_sd, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6729, __pyx_L1_error)
51868  __Pyx_GOTREF(__pyx_t_1);
51869  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateVelocityQuadrature_Mixe_4, __pyx_t_1) < 0) __PYX_ERR(0, 6729, __pyx_L1_error)
51870  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51871 
51872  /* "cfemIntegrals.pyx":6759
51873  * <double*> qDV.data,
51874  * <double*> qDV_eb.data)
51875  * def updateDiffusionJacobian_MixedForm_weak_sd(np.ndarray rowptr, # <<<<<<<<<<<<<<
51876  * np.ndarray colind,
51877  * np.ndarray a,
51878  */
51879  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13cfemIntegrals_385updateDiffusionJacobian_MixedForm_weak_sd, NULL, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6759, __pyx_L1_error)
51880  __Pyx_GOTREF(__pyx_t_1);
51881  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateDiffusionJacobian_MixedFor_2, __pyx_t_1) < 0) __PYX_ERR(0, 6759, __pyx_L1_error)
51882  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51883 
51884  /* "cfemIntegrals.pyx":1
51885  * # A type of -*- python -*- file # <<<<<<<<<<<<<<
51886  * import numpy as np
51887  * cimport numpy as np
51888  */
51889  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
51890  __Pyx_GOTREF(__pyx_t_1);
51891  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
51892  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51893 
51894  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":1014
51895  *
51896  *
51897  * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<<
51898  * """
51899  * returns the unit part of the dtype for a numpy datetime64 object.
51900  */
51901 
51902  /*--- Wrapped vars code ---*/
51903 
51904  goto __pyx_L0;
51905  __pyx_L1_error:;
51906  __Pyx_XDECREF(__pyx_t_1);
51907  if (__pyx_m) {
51908  if (__pyx_d) {
51909  __Pyx_AddTraceback("init cfemIntegrals", __pyx_clineno, __pyx_lineno, __pyx_filename);
51910  }
51911  Py_CLEAR(__pyx_m);
51912  } else if (!PyErr_Occurred()) {
51913  PyErr_SetString(PyExc_ImportError, "init cfemIntegrals");
51914  }
51915  __pyx_L0:;
51916  __Pyx_RefNannyFinishContext();
51917  #if CYTHON_PEP489_MULTI_PHASE_INIT
51918  return (__pyx_m != NULL) ? 0 : -1;
51919  #elif PY_MAJOR_VERSION >= 3
51920  return __pyx_m;
51921  #else
51922  return;
51923  #endif
51924 }
51925 
51926 /* --- Runtime support code --- */
51927 /* Refnanny */
51928 #if CYTHON_REFNANNY
51929 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
51930  PyObject *m = NULL, *p = NULL;
51931  void *r = NULL;
51932  m = PyImport_ImportModule(modname);
51933  if (!m) goto end;
51934  p = PyObject_GetAttrString(m, "RefNannyAPI");
51935  if (!p) goto end;
51936  r = PyLong_AsVoidPtr(p);
51937 end:
51938  Py_XDECREF(p);
51939  Py_XDECREF(m);
51940  return (__Pyx_RefNannyAPIStruct *)r;
51941 }
51942 #endif
51943 
51944 /* PyObjectGetAttrStr */
51945 #if CYTHON_USE_TYPE_SLOTS
51946 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
51947  PyTypeObject* tp = Py_TYPE(obj);
51948  if (likely(tp->tp_getattro))
51949  return tp->tp_getattro(obj, attr_name);
51950 #if PY_MAJOR_VERSION < 3
51951  if (likely(tp->tp_getattr))
51952  return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
51953 #endif
51954  return PyObject_GetAttr(obj, attr_name);
51955 }
51956 #endif
51957 
51958 /* GetBuiltinName */
51959 static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
51960  PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
51961  if (unlikely(!result)) {
51962  PyErr_Format(PyExc_NameError,
51963 #if PY_MAJOR_VERSION >= 3
51964  "name '%U' is not defined", name);
51965 #else
51966  "name '%.200s' is not defined", PyString_AS_STRING(name));
51967 #endif
51968  }
51969  return result;
51970 }
51971 
51972 /* RaiseArgTupleInvalid */
51973 static void __Pyx_RaiseArgtupleInvalid(
51974  const char* func_name,
51975  int exact,
51976  Py_ssize_t num_min,
51977  Py_ssize_t num_max,
51978  Py_ssize_t num_found)
51979 {
51980  Py_ssize_t num_expected;
51981  const char *more_or_less;
51982  if (num_found < num_min) {
51983  num_expected = num_min;
51984  more_or_less = "at least";
51985  } else {
51986  num_expected = num_max;
51987  more_or_less = "at most";
51988  }
51989  if (exact) {
51990  more_or_less = "exactly";
51991  }
51992  PyErr_Format(PyExc_TypeError,
51993  "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
51994  func_name, more_or_less, num_expected,
51995  (num_expected == 1) ? "" : "s", num_found);
51996 }
51997 
51998 /* RaiseDoubleKeywords */
51999 static void __Pyx_RaiseDoubleKeywordsError(
52000  const char* func_name,
52001  PyObject* kw_name)
52002 {
52003  PyErr_Format(PyExc_TypeError,
52004  #if PY_MAJOR_VERSION >= 3
52005  "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
52006  #else
52007  "%s() got multiple values for keyword argument '%s'", func_name,
52008  PyString_AsString(kw_name));
52009  #endif
52010 }
52011 
52012 /* ParseKeywords */
52013 static int __Pyx_ParseOptionalKeywords(
52014  PyObject *kwds,
52015  PyObject **argnames[],
52016  PyObject *kwds2,
52017  PyObject *values[],
52018  Py_ssize_t num_pos_args,
52019  const char* function_name)
52020 {
52021  PyObject *key = 0, *value = 0;
52022  Py_ssize_t pos = 0;
52023  PyObject*** name;
52024  PyObject*** first_kw_arg = argnames + num_pos_args;
52025  while (PyDict_Next(kwds, &pos, &key, &value)) {
52026  name = first_kw_arg;
52027  while (*name && (**name != key)) name++;
52028  if (*name) {
52029  values[name-argnames] = value;
52030  continue;
52031  }
52032  name = first_kw_arg;
52033  #if PY_MAJOR_VERSION < 3
52034  if (likely(PyString_Check(key))) {
52035  while (*name) {
52036  if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
52037  && _PyString_Eq(**name, key)) {
52038  values[name-argnames] = value;
52039  break;
52040  }
52041  name++;
52042  }
52043  if (*name) continue;
52044  else {
52045  PyObject*** argname = argnames;
52046  while (argname != first_kw_arg) {
52047  if ((**argname == key) || (
52048  (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
52049  && _PyString_Eq(**argname, key))) {
52050  goto arg_passed_twice;
52051  }
52052  argname++;
52053  }
52054  }
52055  } else
52056  #endif
52057  if (likely(PyUnicode_Check(key))) {
52058  while (*name) {
52059  int cmp = (**name == key) ? 0 :
52060  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
52061  (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
52062  #endif
52063  PyUnicode_Compare(**name, key);
52064  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
52065  if (cmp == 0) {
52066  values[name-argnames] = value;
52067  break;
52068  }
52069  name++;
52070  }
52071  if (*name) continue;
52072  else {
52073  PyObject*** argname = argnames;
52074  while (argname != first_kw_arg) {
52075  int cmp = (**argname == key) ? 0 :
52076  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
52077  (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
52078  #endif
52079  PyUnicode_Compare(**argname, key);
52080  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
52081  if (cmp == 0) goto arg_passed_twice;
52082  argname++;
52083  }
52084  }
52085  } else
52086  goto invalid_keyword_type;
52087  if (kwds2) {
52088  if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
52089  } else {
52090  goto invalid_keyword;
52091  }
52092  }
52093  return 0;
52094 arg_passed_twice:
52095  __Pyx_RaiseDoubleKeywordsError(function_name, key);
52096  goto bad;
52097 invalid_keyword_type:
52098  PyErr_Format(PyExc_TypeError,
52099  "%.200s() keywords must be strings", function_name);
52100  goto bad;
52101 invalid_keyword:
52102  PyErr_Format(PyExc_TypeError,
52103  #if PY_MAJOR_VERSION < 3
52104  "%.200s() got an unexpected keyword argument '%.200s'",
52105  function_name, PyString_AsString(key));
52106  #else
52107  "%s() got an unexpected keyword argument '%U'",
52108  function_name, key);
52109  #endif
52110 bad:
52111  return -1;
52112 }
52113 
52114 /* ArgTypeTest */
52115 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
52116 {
52117  if (unlikely(!type)) {
52118  PyErr_SetString(PyExc_SystemError, "Missing type object");
52119  return 0;
52120  }
52121  else if (exact) {
52122  #if PY_MAJOR_VERSION == 2
52123  if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
52124  #endif
52125  }
52126  else {
52127  if (likely(__Pyx_TypeCheck(obj, type))) return 1;
52128  }
52129  PyErr_Format(PyExc_TypeError,
52130  "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
52131  name, type->tp_name, Py_TYPE(obj)->tp_name);
52132  return 0;
52133 }
52134 
52135 /* PyFunctionFastCall */
52136 #if CYTHON_FAST_PYCALL
52137 static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
52138  PyObject *globals) {
52139  PyFrameObject *f;
52140  PyThreadState *tstate = __Pyx_PyThreadState_Current;
52141  PyObject **fastlocals;
52142  Py_ssize_t i;
52143  PyObject *result;
52144  assert(globals != NULL);
52145  /* XXX Perhaps we should create a specialized
52146  PyFrame_New() that doesn't take locals, but does
52147  take builtins without sanity checking them.
52148  */
52149  assert(tstate != NULL);
52150  f = PyFrame_New(tstate, co, globals, NULL);
52151  if (f == NULL) {
52152  return NULL;
52153  }
52154  fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
52155  for (i = 0; i < na; i++) {
52156  Py_INCREF(*args);
52157  fastlocals[i] = *args++;
52158  }
52159  result = PyEval_EvalFrameEx(f,0);
52160  ++tstate->recursion_depth;
52161  Py_DECREF(f);
52162  --tstate->recursion_depth;
52163  return result;
52164 }
52165 #if 1 || PY_VERSION_HEX < 0x030600B1
52166 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
52167  PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
52168  PyObject *globals = PyFunction_GET_GLOBALS(func);
52169  PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
52170  PyObject *closure;
52171 #if PY_MAJOR_VERSION >= 3
52172  PyObject *kwdefs;
52173 #endif
52174  PyObject *kwtuple, **k;
52175  PyObject **d;
52176  Py_ssize_t nd;
52177  Py_ssize_t nk;
52178  PyObject *result;
52179  assert(kwargs == NULL || PyDict_Check(kwargs));
52180  nk = kwargs ? PyDict_Size(kwargs) : 0;
52181  if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
52182  return NULL;
52183  }
52184  if (
52185 #if PY_MAJOR_VERSION >= 3
52186  co->co_kwonlyargcount == 0 &&
52187 #endif
52188  likely(kwargs == NULL || nk == 0) &&
52189  co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
52190  if (argdefs == NULL && co->co_argcount == nargs) {
52191  result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
52192  goto done;
52193  }
52194  else if (nargs == 0 && argdefs != NULL
52195  && co->co_argcount == Py_SIZE(argdefs)) {
52196  /* function called with no arguments, but all parameters have
52197  a default value: use default values as arguments .*/
52198  args = &PyTuple_GET_ITEM(argdefs, 0);
52199  result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
52200  goto done;
52201  }
52202  }
52203  if (kwargs != NULL) {
52204  Py_ssize_t pos, i;
52205  kwtuple = PyTuple_New(2 * nk);
52206  if (kwtuple == NULL) {
52207  result = NULL;
52208  goto done;
52209  }
52210  k = &PyTuple_GET_ITEM(kwtuple, 0);
52211  pos = i = 0;
52212  while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
52213  Py_INCREF(k[i]);
52214  Py_INCREF(k[i+1]);
52215  i += 2;
52216  }
52217  nk = i / 2;
52218  }
52219  else {
52220  kwtuple = NULL;
52221  k = NULL;
52222  }
52223  closure = PyFunction_GET_CLOSURE(func);
52224 #if PY_MAJOR_VERSION >= 3
52225  kwdefs = PyFunction_GET_KW_DEFAULTS(func);
52226 #endif
52227  if (argdefs != NULL) {
52228  d = &PyTuple_GET_ITEM(argdefs, 0);
52229  nd = Py_SIZE(argdefs);
52230  }
52231  else {
52232  d = NULL;
52233  nd = 0;
52234  }
52235 #if PY_MAJOR_VERSION >= 3
52236  result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
52237  args, (int)nargs,
52238  k, (int)nk,
52239  d, (int)nd, kwdefs, closure);
52240 #else
52241  result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
52242  args, (int)nargs,
52243  k, (int)nk,
52244  d, (int)nd, closure);
52245 #endif
52246  Py_XDECREF(kwtuple);
52247 done:
52248  Py_LeaveRecursiveCall();
52249  return result;
52250 }
52251 #endif
52252 #endif
52253 
52254 /* PyObjectCall */
52255 #if CYTHON_COMPILING_IN_CPYTHON
52256 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
52257  PyObject *result;
52258  ternaryfunc call = Py_TYPE(func)->tp_call;
52259  if (unlikely(!call))
52260  return PyObject_Call(func, arg, kw);
52261  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
52262  return NULL;
52263  result = (*call)(func, arg, kw);
52264  Py_LeaveRecursiveCall();
52265  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
52266  PyErr_SetString(
52267  PyExc_SystemError,
52268  "NULL result without error in PyObject_Call");
52269  }
52270  return result;
52271 }
52272 #endif
52273 
52274 /* PyObjectCallMethO */
52275 #if CYTHON_COMPILING_IN_CPYTHON
52276 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
52277  PyObject *self, *result;
52278  PyCFunction cfunc;
52279  cfunc = PyCFunction_GET_FUNCTION(func);
52280  self = PyCFunction_GET_SELF(func);
52281  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
52282  return NULL;
52283  result = cfunc(self, arg);
52284  Py_LeaveRecursiveCall();
52285  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
52286  PyErr_SetString(
52287  PyExc_SystemError,
52288  "NULL result without error in PyObject_Call");
52289  }
52290  return result;
52291 }
52292 #endif
52293 
52294 /* PyObjectCallNoArg */
52295 #if CYTHON_COMPILING_IN_CPYTHON
52296 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
52297 #if CYTHON_FAST_PYCALL
52298  if (PyFunction_Check(func)) {
52299  return __Pyx_PyFunction_FastCall(func, NULL, 0);
52300  }
52301 #endif
52302 #ifdef __Pyx_CyFunction_USED
52303  if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func)))
52304 #else
52305  if (likely(PyCFunction_Check(func)))
52306 #endif
52307  {
52308  if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
52309  return __Pyx_PyObject_CallMethO(func, NULL);
52310  }
52311  }
52312  return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
52313 }
52314 #endif
52315 
52316 /* PyCFunctionFastCall */
52317 #if CYTHON_FAST_PYCCALL
52318 static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
52319  PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
52320  PyCFunction meth = PyCFunction_GET_FUNCTION(func);
52321  PyObject *self = PyCFunction_GET_SELF(func);
52322  int flags = PyCFunction_GET_FLAGS(func);
52323  assert(PyCFunction_Check(func));
52324  assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
52325  assert(nargs >= 0);
52326  assert(nargs == 0 || args != NULL);
52327  /* _PyCFunction_FastCallDict() must not be called with an exception set,
52328  because it may clear it (directly or indirectly) and so the
52329  caller loses its exception */
52330  assert(!PyErr_Occurred());
52331  if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
52332  return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
52333  } else {
52334  return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
52335  }
52336 }
52337 #endif
52338 
52339 /* PyObjectCallOneArg */
52340 #if CYTHON_COMPILING_IN_CPYTHON
52341 static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
52342  PyObject *result;
52343  PyObject *args = PyTuple_New(1);
52344  if (unlikely(!args)) return NULL;
52345  Py_INCREF(arg);
52346  PyTuple_SET_ITEM(args, 0, arg);
52347  result = __Pyx_PyObject_Call(func, args, NULL);
52348  Py_DECREF(args);
52349  return result;
52350 }
52351 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
52352 #if CYTHON_FAST_PYCALL
52353  if (PyFunction_Check(func)) {
52354  return __Pyx_PyFunction_FastCall(func, &arg, 1);
52355  }
52356 #endif
52357  if (likely(PyCFunction_Check(func))) {
52358  if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
52359  return __Pyx_PyObject_CallMethO(func, arg);
52360 #if CYTHON_FAST_PYCCALL
52361  } else if (__Pyx_PyFastCFunction_Check(func)) {
52362  return __Pyx_PyCFunction_FastCall(func, &arg, 1);
52363 #endif
52364  }
52365  }
52366  return __Pyx__PyObject_CallOneArg(func, arg);
52367 }
52368 #else
52369 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
52370  PyObject *result;
52371  PyObject *args = PyTuple_Pack(1, arg);
52372  if (unlikely(!args)) return NULL;
52373  result = __Pyx_PyObject_Call(func, args, NULL);
52374  Py_DECREF(args);
52375  return result;
52376 }
52377 #endif
52378 
52379 /* RaiseTooManyValuesToUnpack */
52380 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
52381  PyErr_Format(PyExc_ValueError,
52382  "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
52383 }
52384 
52385 /* RaiseNeedMoreValuesToUnpack */
52386 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
52387  PyErr_Format(PyExc_ValueError,
52388  "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
52389  index, (index == 1) ? "" : "s");
52390 }
52391 
52392 /* IterFinish */
52393 static CYTHON_INLINE int __Pyx_IterFinish(void) {
52394 #if CYTHON_FAST_THREAD_STATE
52395  PyThreadState *tstate = __Pyx_PyThreadState_Current;
52396  PyObject* exc_type = tstate->curexc_type;
52397  if (unlikely(exc_type)) {
52398  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) {
52399  PyObject *exc_value, *exc_tb;
52400  exc_value = tstate->curexc_value;
52401  exc_tb = tstate->curexc_traceback;
52402  tstate->curexc_type = 0;
52403  tstate->curexc_value = 0;
52404  tstate->curexc_traceback = 0;
52405  Py_DECREF(exc_type);
52406  Py_XDECREF(exc_value);
52407  Py_XDECREF(exc_tb);
52408  return 0;
52409  } else {
52410  return -1;
52411  }
52412  }
52413  return 0;
52414 #else
52415  if (unlikely(PyErr_Occurred())) {
52416  if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
52417  PyErr_Clear();
52418  return 0;
52419  } else {
52420  return -1;
52421  }
52422  }
52423  return 0;
52424 #endif
52425 }
52426 
52427 /* UnpackItemEndCheck */
52428 static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
52429  if (unlikely(retval)) {
52430  Py_DECREF(retval);
52431  __Pyx_RaiseTooManyValuesError(expected);
52432  return -1;
52433  } else {
52434  return __Pyx_IterFinish();
52435  }
52436  return 0;
52437 }
52438 
52439 /* ExtTypeTest */
52440 static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
52441  if (unlikely(!type)) {
52442  PyErr_SetString(PyExc_SystemError, "Missing type object");
52443  return 0;
52444  }
52445  if (likely(__Pyx_TypeCheck(obj, type)))
52446  return 1;
52447  PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
52448  Py_TYPE(obj)->tp_name, type->tp_name);
52449  return 0;
52450 }
52451 
52452 /* GetTopmostException */
52453 #if CYTHON_USE_EXC_INFO_STACK
52454 static _PyErr_StackItem *
52455 __Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
52456 {
52457  _PyErr_StackItem *exc_info = tstate->exc_info;
52458  while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
52459  exc_info->previous_item != NULL)
52460  {
52461  exc_info = exc_info->previous_item;
52462  }
52463  return exc_info;
52464 }
52465 #endif
52466 
52467 /* SaveResetException */
52468 #if CYTHON_FAST_THREAD_STATE
52469 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
52470  #if CYTHON_USE_EXC_INFO_STACK
52471  _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
52472  *type = exc_info->exc_type;
52473  *value = exc_info->exc_value;
52474  *tb = exc_info->exc_traceback;
52475  #else
52476  *type = tstate->exc_type;
52477  *value = tstate->exc_value;
52478  *tb = tstate->exc_traceback;
52479  #endif
52480  Py_XINCREF(*type);
52481  Py_XINCREF(*value);
52482  Py_XINCREF(*tb);
52483 }
52484 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
52485  PyObject *tmp_type, *tmp_value, *tmp_tb;
52486  #if CYTHON_USE_EXC_INFO_STACK
52487  _PyErr_StackItem *exc_info = tstate->exc_info;
52488  tmp_type = exc_info->exc_type;
52489  tmp_value = exc_info->exc_value;
52490  tmp_tb = exc_info->exc_traceback;
52491  exc_info->exc_type = type;
52492  exc_info->exc_value = value;
52493  exc_info->exc_traceback = tb;
52494  #else
52495  tmp_type = tstate->exc_type;
52496  tmp_value = tstate->exc_value;
52497  tmp_tb = tstate->exc_traceback;
52498  tstate->exc_type = type;
52499  tstate->exc_value = value;
52500  tstate->exc_traceback = tb;
52501  #endif
52502  Py_XDECREF(tmp_type);
52503  Py_XDECREF(tmp_value);
52504  Py_XDECREF(tmp_tb);
52505 }
52506 #endif
52507 
52508 /* PyErrExceptionMatches */
52509 #if CYTHON_FAST_THREAD_STATE
52510 static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
52511  Py_ssize_t i, n;
52512  n = PyTuple_GET_SIZE(tuple);
52513 #if PY_MAJOR_VERSION >= 3
52514  for (i=0; i<n; i++) {
52515  if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
52516  }
52517 #endif
52518  for (i=0; i<n; i++) {
52519  if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
52520  }
52521  return 0;
52522 }
52523 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
52524  PyObject *exc_type = tstate->curexc_type;
52525  if (exc_type == err) return 1;
52526  if (unlikely(!exc_type)) return 0;
52527  if (unlikely(PyTuple_Check(err)))
52528  return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
52529  return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
52530 }
52531 #endif
52532 
52533 /* GetException */
52534 #if CYTHON_FAST_THREAD_STATE
52535 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
52536 #else
52537 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
52538 #endif
52539 {
52540  PyObject *local_type, *local_value, *local_tb;
52541 #if CYTHON_FAST_THREAD_STATE
52542  PyObject *tmp_type, *tmp_value, *tmp_tb;
52543  local_type = tstate->curexc_type;
52544  local_value = tstate->curexc_value;
52545  local_tb = tstate->curexc_traceback;
52546  tstate->curexc_type = 0;
52547  tstate->curexc_value = 0;
52548  tstate->curexc_traceback = 0;
52549 #else
52550  PyErr_Fetch(&local_type, &local_value, &local_tb);
52551 #endif
52552  PyErr_NormalizeException(&local_type, &local_value, &local_tb);
52553 #if CYTHON_FAST_THREAD_STATE
52554  if (unlikely(tstate->curexc_type))
52555 #else
52556  if (unlikely(PyErr_Occurred()))
52557 #endif
52558  goto bad;
52559  #if PY_MAJOR_VERSION >= 3
52560  if (local_tb) {
52561  if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
52562  goto bad;
52563  }
52564  #endif
52565  Py_XINCREF(local_tb);
52566  Py_XINCREF(local_type);
52567  Py_XINCREF(local_value);
52568  *type = local_type;
52569  *value = local_value;
52570  *tb = local_tb;
52571 #if CYTHON_FAST_THREAD_STATE
52572  #if CYTHON_USE_EXC_INFO_STACK
52573  {
52574  _PyErr_StackItem *exc_info = tstate->exc_info;
52575  tmp_type = exc_info->exc_type;
52576  tmp_value = exc_info->exc_value;
52577  tmp_tb = exc_info->exc_traceback;
52578  exc_info->exc_type = local_type;
52579  exc_info->exc_value = local_value;
52580  exc_info->exc_traceback = local_tb;
52581  }
52582  #else
52583  tmp_type = tstate->exc_type;
52584  tmp_value = tstate->exc_value;
52585  tmp_tb = tstate->exc_traceback;
52586  tstate->exc_type = local_type;
52587  tstate->exc_value = local_value;
52588  tstate->exc_traceback = local_tb;
52589  #endif
52590  Py_XDECREF(tmp_type);
52591  Py_XDECREF(tmp_value);
52592  Py_XDECREF(tmp_tb);
52593 #else
52594  PyErr_SetExcInfo(local_type, local_value, local_tb);
52595 #endif
52596  return 0;
52597 bad:
52598  *type = 0;
52599  *value = 0;
52600  *tb = 0;
52601  Py_XDECREF(local_type);
52602  Py_XDECREF(local_value);
52603  Py_XDECREF(local_tb);
52604  return -1;
52605 }
52606 
52607 /* PyErrFetchRestore */
52608 #if CYTHON_FAST_THREAD_STATE
52609 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
52610  PyObject *tmp_type, *tmp_value, *tmp_tb;
52611  tmp_type = tstate->curexc_type;
52612  tmp_value = tstate->curexc_value;
52613  tmp_tb = tstate->curexc_traceback;
52614  tstate->curexc_type = type;
52615  tstate->curexc_value = value;
52616  tstate->curexc_traceback = tb;
52617  Py_XDECREF(tmp_type);
52618  Py_XDECREF(tmp_value);
52619  Py_XDECREF(tmp_tb);
52620 }
52621 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
52622  *type = tstate->curexc_type;
52623  *value = tstate->curexc_value;
52624  *tb = tstate->curexc_traceback;
52625  tstate->curexc_type = 0;
52626  tstate->curexc_value = 0;
52627  tstate->curexc_traceback = 0;
52628 }
52629 #endif
52630 
52631 /* RaiseException */
52632 #if PY_MAJOR_VERSION < 3
52633 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
52634  CYTHON_UNUSED PyObject *cause) {
52635  __Pyx_PyThreadState_declare
52636  Py_XINCREF(type);
52637  if (!value || value == Py_None)
52638  value = NULL;
52639  else
52640  Py_INCREF(value);
52641  if (!tb || tb == Py_None)
52642  tb = NULL;
52643  else {
52644  Py_INCREF(tb);
52645  if (!PyTraceBack_Check(tb)) {
52646  PyErr_SetString(PyExc_TypeError,
52647  "raise: arg 3 must be a traceback or None");
52648  goto raise_error;
52649  }
52650  }
52651  if (PyType_Check(type)) {
52652 #if CYTHON_COMPILING_IN_PYPY
52653  if (!value) {
52654  Py_INCREF(Py_None);
52655  value = Py_None;
52656  }
52657 #endif
52658  PyErr_NormalizeException(&type, &value, &tb);
52659  } else {
52660  if (value) {
52661  PyErr_SetString(PyExc_TypeError,
52662  "instance exception may not have a separate value");
52663  goto raise_error;
52664  }
52665  value = type;
52666  type = (PyObject*) Py_TYPE(type);
52667  Py_INCREF(type);
52668  if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
52669  PyErr_SetString(PyExc_TypeError,
52670  "raise: exception class must be a subclass of BaseException");
52671  goto raise_error;
52672  }
52673  }
52674  __Pyx_PyThreadState_assign
52675  __Pyx_ErrRestore(type, value, tb);
52676  return;
52677 raise_error:
52678  Py_XDECREF(value);
52679  Py_XDECREF(type);
52680  Py_XDECREF(tb);
52681  return;
52682 }
52683 #else
52684 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
52685  PyObject* owned_instance = NULL;
52686  if (tb == Py_None) {
52687  tb = 0;
52688  } else if (tb && !PyTraceBack_Check(tb)) {
52689  PyErr_SetString(PyExc_TypeError,
52690  "raise: arg 3 must be a traceback or None");
52691  goto bad;
52692  }
52693  if (value == Py_None)
52694  value = 0;
52695  if (PyExceptionInstance_Check(type)) {
52696  if (value) {
52697  PyErr_SetString(PyExc_TypeError,
52698  "instance exception may not have a separate value");
52699  goto bad;
52700  }
52701  value = type;
52702  type = (PyObject*) Py_TYPE(value);
52703  } else if (PyExceptionClass_Check(type)) {
52704  PyObject *instance_class = NULL;
52705  if (value && PyExceptionInstance_Check(value)) {
52706  instance_class = (PyObject*) Py_TYPE(value);
52707  if (instance_class != type) {
52708  int is_subclass = PyObject_IsSubclass(instance_class, type);
52709  if (!is_subclass) {
52710  instance_class = NULL;
52711  } else if (unlikely(is_subclass == -1)) {
52712  goto bad;
52713  } else {
52714  type = instance_class;
52715  }
52716  }
52717  }
52718  if (!instance_class) {
52719  PyObject *args;
52720  if (!value)
52721  args = PyTuple_New(0);
52722  else if (PyTuple_Check(value)) {
52723  Py_INCREF(value);
52724  args = value;
52725  } else
52726  args = PyTuple_Pack(1, value);
52727  if (!args)
52728  goto bad;
52729  owned_instance = PyObject_Call(type, args, NULL);
52730  Py_DECREF(args);
52731  if (!owned_instance)
52732  goto bad;
52733  value = owned_instance;
52734  if (!PyExceptionInstance_Check(value)) {
52735  PyErr_Format(PyExc_TypeError,
52736  "calling %R should have returned an instance of "
52737  "BaseException, not %R",
52738  type, Py_TYPE(value));
52739  goto bad;
52740  }
52741  }
52742  } else {
52743  PyErr_SetString(PyExc_TypeError,
52744  "raise: exception class must be a subclass of BaseException");
52745  goto bad;
52746  }
52747  if (cause) {
52748  PyObject *fixed_cause;
52749  if (cause == Py_None) {
52750  fixed_cause = NULL;
52751  } else if (PyExceptionClass_Check(cause)) {
52752  fixed_cause = PyObject_CallObject(cause, NULL);
52753  if (fixed_cause == NULL)
52754  goto bad;
52755  } else if (PyExceptionInstance_Check(cause)) {
52756  fixed_cause = cause;
52757  Py_INCREF(fixed_cause);
52758  } else {
52759  PyErr_SetString(PyExc_TypeError,
52760  "exception causes must derive from "
52761  "BaseException");
52762  goto bad;
52763  }
52764  PyException_SetCause(value, fixed_cause);
52765  }
52766  PyErr_SetObject(type, value);
52767  if (tb) {
52768 #if CYTHON_COMPILING_IN_PYPY
52769  PyObject *tmp_type, *tmp_value, *tmp_tb;
52770  PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
52771  Py_INCREF(tb);
52772  PyErr_Restore(tmp_type, tmp_value, tb);
52773  Py_XDECREF(tmp_tb);
52774 #else
52775  PyThreadState *tstate = __Pyx_PyThreadState_Current;
52776  PyObject* tmp_tb = tstate->curexc_traceback;
52777  if (tb != tmp_tb) {
52778  Py_INCREF(tb);
52779  tstate->curexc_traceback = tb;
52780  Py_XDECREF(tmp_tb);
52781  }
52782 #endif
52783  }
52784 bad:
52785  Py_XDECREF(owned_instance);
52786  return;
52787 }
52788 #endif
52789 
52790 /* TypeImport */
52791 #ifndef __PYX_HAVE_RT_ImportType
52792 #define __PYX_HAVE_RT_ImportType
52793 static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, const char *class_name,
52794  size_t size, enum __Pyx_ImportType_CheckSize check_size)
52795 {
52796  PyObject *result = 0;
52797  char warning[200];
52798  Py_ssize_t basicsize;
52799 #ifdef Py_LIMITED_API
52800  PyObject *py_basicsize;
52801 #endif
52802  result = PyObject_GetAttrString(module, class_name);
52803  if (!result)
52804  goto bad;
52805  if (!PyType_Check(result)) {
52806  PyErr_Format(PyExc_TypeError,
52807  "%.200s.%.200s is not a type object",
52808  module_name, class_name);
52809  goto bad;
52810  }
52811 #ifndef Py_LIMITED_API
52812  basicsize = ((PyTypeObject *)result)->tp_basicsize;
52813 #else
52814  py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
52815  if (!py_basicsize)
52816  goto bad;
52817  basicsize = PyLong_AsSsize_t(py_basicsize);
52818  Py_DECREF(py_basicsize);
52819  py_basicsize = 0;
52820  if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
52821  goto bad;
52822 #endif
52823  if ((size_t)basicsize < size) {
52824  PyErr_Format(PyExc_ValueError,
52825  "%.200s.%.200s size changed, may indicate binary incompatibility. "
52826  "Expected %zd from C header, got %zd from PyObject",
52827  module_name, class_name, size, basicsize);
52828  goto bad;
52829  }
52830  if (check_size == __Pyx_ImportType_CheckSize_Error && (size_t)basicsize != size) {
52831  PyErr_Format(PyExc_ValueError,
52832  "%.200s.%.200s size changed, may indicate binary incompatibility. "
52833  "Expected %zd from C header, got %zd from PyObject",
52834  module_name, class_name, size, basicsize);
52835  goto bad;
52836  }
52837  else if (check_size == __Pyx_ImportType_CheckSize_Warn && (size_t)basicsize > size) {
52838  PyOS_snprintf(warning, sizeof(warning),
52839  "%s.%s size changed, may indicate binary incompatibility. "
52840  "Expected %zd from C header, got %zd from PyObject",
52841  module_name, class_name, size, basicsize);
52842  if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
52843  }
52844  return (PyTypeObject *)result;
52845 bad:
52846  Py_XDECREF(result);
52847  return NULL;
52848 }
52849 #endif
52850 
52851 /* Import */
52852 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
52853  PyObject *empty_list = 0;
52854  PyObject *module = 0;
52855  PyObject *global_dict = 0;
52856  PyObject *empty_dict = 0;
52857  PyObject *list;
52858  #if PY_MAJOR_VERSION < 3
52859  PyObject *py_import;
52860  py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
52861  if (!py_import)
52862  goto bad;
52863  #endif
52864  if (from_list)
52865  list = from_list;
52866  else {
52867  empty_list = PyList_New(0);
52868  if (!empty_list)
52869  goto bad;
52870  list = empty_list;
52871  }
52872  global_dict = PyModule_GetDict(__pyx_m);
52873  if (!global_dict)
52874  goto bad;
52875  empty_dict = PyDict_New();
52876  if (!empty_dict)
52877  goto bad;
52878  {
52879  #if PY_MAJOR_VERSION >= 3
52880  if (level == -1) {
52881  if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) {
52882  module = PyImport_ImportModuleLevelObject(
52883  name, global_dict, empty_dict, list, 1);
52884  if (!module) {
52885  if (!PyErr_ExceptionMatches(PyExc_ImportError))
52886  goto bad;
52887  PyErr_Clear();
52888  }
52889  }
52890  level = 0;
52891  }
52892  #endif
52893  if (!module) {
52894  #if PY_MAJOR_VERSION < 3
52895  PyObject *py_level = PyInt_FromLong(level);
52896  if (!py_level)
52897  goto bad;
52898  module = PyObject_CallFunctionObjArgs(py_import,
52899  name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
52900  Py_DECREF(py_level);
52901  #else
52902  module = PyImport_ImportModuleLevelObject(
52903  name, global_dict, empty_dict, list, level);
52904  #endif
52905  }
52906  }
52907 bad:
52908  #if PY_MAJOR_VERSION < 3
52909  Py_XDECREF(py_import);
52910  #endif
52911  Py_XDECREF(empty_list);
52912  Py_XDECREF(empty_dict);
52913  return module;
52914 }
52915 
52916 /* PyDictVersioning */
52917 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
52918 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
52919  PyObject *dict = Py_TYPE(obj)->tp_dict;
52920  return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
52921 }
52922 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
52923  PyObject **dictptr = NULL;
52924  Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
52925  if (offset) {
52926 #if CYTHON_COMPILING_IN_CPYTHON
52927  dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
52928 #else
52929  dictptr = _PyObject_GetDictPtr(obj);
52930 #endif
52931  }
52932  return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
52933 }
52934 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
52935  PyObject *dict = Py_TYPE(obj)->tp_dict;
52936  if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
52937  return 0;
52938  return obj_dict_version == __Pyx_get_object_dict_version(obj);
52939 }
52940 #endif
52941 
52942 /* CLineInTraceback */
52943 #ifndef CYTHON_CLINE_IN_TRACEBACK
52944 static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) {
52945  PyObject *use_cline;
52946  PyObject *ptype, *pvalue, *ptraceback;
52947 #if CYTHON_COMPILING_IN_CPYTHON
52948  PyObject **cython_runtime_dict;
52949 #endif
52950  if (unlikely(!__pyx_cython_runtime)) {
52951  return c_line;
52952  }
52953  __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
52954 #if CYTHON_COMPILING_IN_CPYTHON
52955  cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
52956  if (likely(cython_runtime_dict)) {
52957  __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
52958  use_cline, *cython_runtime_dict,
52959  __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
52960  } else
52961 #endif
52962  {
52963  PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
52964  if (use_cline_obj) {
52965  use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
52966  Py_DECREF(use_cline_obj);
52967  } else {
52968  PyErr_Clear();
52969  use_cline = NULL;
52970  }
52971  }
52972  if (!use_cline) {
52973  c_line = 0;
52974  (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
52975  }
52976  else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
52977  c_line = 0;
52978  }
52979  __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
52980  return c_line;
52981 }
52982 #endif
52983 
52984 /* CodeObjectCache */
52985 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
52986  int start = 0, mid = 0, end = count - 1;
52987  if (end >= 0 && code_line > entries[end].code_line) {
52988  return count;
52989  }
52990  while (start < end) {
52991  mid = start + (end - start) / 2;
52992  if (code_line < entries[mid].code_line) {
52993  end = mid;
52994  } else if (code_line > entries[mid].code_line) {
52995  start = mid + 1;
52996  } else {
52997  return mid;
52998  }
52999  }
53000  if (code_line <= entries[mid].code_line) {
53001  return mid;
53002  } else {
53003  return mid + 1;
53004  }
53005 }
53006 static PyCodeObject *__pyx_find_code_object(int code_line) {
53007  PyCodeObject* code_object;
53008  int pos;
53009  if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
53010  return NULL;
53011  }
53012  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
53013  if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
53014  return NULL;
53015  }
53016  code_object = __pyx_code_cache.entries[pos].code_object;
53017  Py_INCREF(code_object);
53018  return code_object;
53019 }
53020 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
53021  int pos, i;
53022  __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
53023  if (unlikely(!code_line)) {
53024  return;
53025  }
53026  if (unlikely(!entries)) {
53027  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
53028  if (likely(entries)) {
53029  __pyx_code_cache.entries = entries;
53030  __pyx_code_cache.max_count = 64;
53031  __pyx_code_cache.count = 1;
53032  entries[0].code_line = code_line;
53033  entries[0].code_object = code_object;
53034  Py_INCREF(code_object);
53035  }
53036  return;
53037  }
53038  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
53039  if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
53040  PyCodeObject* tmp = entries[pos].code_object;
53041  entries[pos].code_object = code_object;
53042  Py_DECREF(tmp);
53043  return;
53044  }
53045  if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
53046  int new_max = __pyx_code_cache.max_count + 64;
53047  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
53048  __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
53049  if (unlikely(!entries)) {
53050  return;
53051  }
53052  __pyx_code_cache.entries = entries;
53053  __pyx_code_cache.max_count = new_max;
53054  }
53055  for (i=__pyx_code_cache.count; i>pos; i--) {
53056  entries[i] = entries[i-1];
53057  }
53058  entries[pos].code_line = code_line;
53059  entries[pos].code_object = code_object;
53060  __pyx_code_cache.count++;
53061  Py_INCREF(code_object);
53062 }
53063 
53064 /* AddTraceback */
53065 #include "compile.h"
53066 #include "frameobject.h"
53067 #include "traceback.h"
53068 #if PY_VERSION_HEX >= 0x030b00a6
53069  #ifndef Py_BUILD_CORE
53070  #define Py_BUILD_CORE 1
53071  #endif
53072  #include "internal/pycore_frame.h"
53073 #endif
53074 static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
53075  const char *funcname, int c_line,
53076  int py_line, const char *filename) {
53077  PyCodeObject *py_code = NULL;
53078  PyObject *py_funcname = NULL;
53079  #if PY_MAJOR_VERSION < 3
53080  PyObject *py_srcfile = NULL;
53081  py_srcfile = PyString_FromString(filename);
53082  if (!py_srcfile) goto bad;
53083  #endif
53084  if (c_line) {
53085  #if PY_MAJOR_VERSION < 3
53086  py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
53087  if (!py_funcname) goto bad;
53088  #else
53089  py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
53090  if (!py_funcname) goto bad;
53091  funcname = PyUnicode_AsUTF8(py_funcname);
53092  if (!funcname) goto bad;
53093  #endif
53094  }
53095  else {
53096  #if PY_MAJOR_VERSION < 3
53097  py_funcname = PyString_FromString(funcname);
53098  if (!py_funcname) goto bad;
53099  #endif
53100  }
53101  #if PY_MAJOR_VERSION < 3
53102  py_code = __Pyx_PyCode_New(
53103  0,
53104  0,
53105  0,
53106  0,
53107  0,
53108  __pyx_empty_bytes, /*PyObject *code,*/
53109  __pyx_empty_tuple, /*PyObject *consts,*/
53110  __pyx_empty_tuple, /*PyObject *names,*/
53111  __pyx_empty_tuple, /*PyObject *varnames,*/
53112  __pyx_empty_tuple, /*PyObject *freevars,*/
53113  __pyx_empty_tuple, /*PyObject *cellvars,*/
53114  py_srcfile, /*PyObject *filename,*/
53115  py_funcname, /*PyObject *name,*/
53116  py_line,
53117  __pyx_empty_bytes /*PyObject *lnotab*/
53118  );
53119  Py_DECREF(py_srcfile);
53120  #else
53121  py_code = PyCode_NewEmpty(filename, funcname, py_line);
53122  #endif
53123  Py_XDECREF(py_funcname); // XDECREF since it's only set on Py3 if cline
53124  return py_code;
53125 bad:
53126  Py_XDECREF(py_funcname);
53127  #if PY_MAJOR_VERSION < 3
53128  Py_XDECREF(py_srcfile);
53129  #endif
53130  return NULL;
53131 }
53132 static void __Pyx_AddTraceback(const char *funcname, int c_line,
53133  int py_line, const char *filename) {
53134  PyCodeObject *py_code = 0;
53135  PyFrameObject *py_frame = 0;
53136  PyThreadState *tstate = __Pyx_PyThreadState_Current;
53137  PyObject *ptype, *pvalue, *ptraceback;
53138  if (c_line) {
53139  c_line = __Pyx_CLineForTraceback(tstate, c_line);
53140  }
53141  py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
53142  if (!py_code) {
53143  __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
53144  py_code = __Pyx_CreateCodeObjectForTraceback(
53145  funcname, c_line, py_line, filename);
53146  if (!py_code) {
53147  /* If the code object creation fails, then we should clear the
53148  fetched exception references and propagate the new exception */
53149  Py_XDECREF(ptype);
53150  Py_XDECREF(pvalue);
53151  Py_XDECREF(ptraceback);
53152  goto bad;
53153  }
53154  __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
53155  __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
53156  }
53157  py_frame = PyFrame_New(
53158  tstate, /*PyThreadState *tstate,*/
53159  py_code, /*PyCodeObject *code,*/
53160  __pyx_d, /*PyObject *globals,*/
53161  0 /*PyObject *locals*/
53162  );
53163  if (!py_frame) goto bad;
53164  __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
53165  PyTraceBack_Here(py_frame);
53166 bad:
53167  Py_XDECREF(py_code);
53168  Py_XDECREF(py_frame);
53169 }
53170 
53171 /* CIntFromPyVerify */
53172 #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
53173  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
53174 #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
53175  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
53176 #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
53177  {\
53178  func_type value = func_value;\
53179  if (sizeof(target_type) < sizeof(func_type)) {\
53180  if (unlikely(value != (func_type) (target_type) value)) {\
53181  func_type zero = 0;\
53182  if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
53183  return (target_type) -1;\
53184  if (is_unsigned && unlikely(value < zero))\
53185  goto raise_neg_overflow;\
53186  else\
53187  goto raise_overflow;\
53188  }\
53189  }\
53190  return (target_type) value;\
53191  }
53192 
53193 /* Print */
53194 #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3
53195 static PyObject *__Pyx_GetStdout(void) {
53196  PyObject *f = PySys_GetObject((char *)"stdout");
53197  if (!f) {
53198  PyErr_SetString(PyExc_RuntimeError, "lost sys.stdout");
53199  }
53200  return f;
53201 }
53202 static int __Pyx_Print(PyObject* f, PyObject *arg_tuple, int newline) {
53203  int i;
53204  if (!f) {
53205  if (!(f = __Pyx_GetStdout()))
53206  return -1;
53207  }
53208  Py_INCREF(f);
53209  for (i=0; i < PyTuple_GET_SIZE(arg_tuple); i++) {
53210  PyObject* v;
53211  if (PyFile_SoftSpace(f, 1)) {
53212  if (PyFile_WriteString(" ", f) < 0)
53213  goto error;
53214  }
53215  v = PyTuple_GET_ITEM(arg_tuple, i);
53216  if (PyFile_WriteObject(v, f, Py_PRINT_RAW) < 0)
53217  goto error;
53218  if (PyString_Check(v)) {
53219  char *s = PyString_AsString(v);
53220  Py_ssize_t len = PyString_Size(v);
53221  if (len > 0) {
53222  switch (s[len-1]) {
53223  case ' ': break;
53224  case '\f': case '\r': case '\n': case '\t': case '\v':
53225  PyFile_SoftSpace(f, 0);
53226  break;
53227  default: break;
53228  }
53229  }
53230  }
53231  }
53232  if (newline) {
53233  if (PyFile_WriteString("\n", f) < 0)
53234  goto error;
53235  PyFile_SoftSpace(f, 0);
53236  }
53237  Py_DECREF(f);
53238  return 0;
53239 error:
53240  Py_DECREF(f);
53241  return -1;
53242 }
53243 #else
53244 static int __Pyx_Print(PyObject* stream, PyObject *arg_tuple, int newline) {
53245  PyObject* kwargs = 0;
53246  PyObject* result = 0;
53247  PyObject* end_string;
53248  if (unlikely(!__pyx_print)) {
53249  __pyx_print = PyObject_GetAttr(__pyx_b, __pyx_n_s_print);
53250  if (!__pyx_print)
53251  return -1;
53252  }
53253  if (stream) {
53254  kwargs = PyDict_New();
53255  if (unlikely(!kwargs))
53256  return -1;
53257  if (unlikely(PyDict_SetItem(kwargs, __pyx_n_s_file, stream) < 0))
53258  goto bad;
53259  if (!newline) {
53260  end_string = PyUnicode_FromStringAndSize(" ", 1);
53261  if (unlikely(!end_string))
53262  goto bad;
53263  if (PyDict_SetItem(kwargs, __pyx_n_s_end, end_string) < 0) {
53264  Py_DECREF(end_string);
53265  goto bad;
53266  }
53267  Py_DECREF(end_string);
53268  }
53269  } else if (!newline) {
53270  if (unlikely(!__pyx_print_kwargs)) {
53271  __pyx_print_kwargs = PyDict_New();
53272  if (unlikely(!__pyx_print_kwargs))
53273  return -1;
53274  end_string = PyUnicode_FromStringAndSize(" ", 1);
53275  if (unlikely(!end_string))
53276  return -1;
53277  if (PyDict_SetItem(__pyx_print_kwargs, __pyx_n_s_end, end_string) < 0) {
53278  Py_DECREF(end_string);
53279  return -1;
53280  }
53281  Py_DECREF(end_string);
53282  }
53283  kwargs = __pyx_print_kwargs;
53284  }
53285  result = PyObject_Call(__pyx_print, arg_tuple, kwargs);
53286  if (unlikely(kwargs) && (kwargs != __pyx_print_kwargs))
53287  Py_DECREF(kwargs);
53288  if (!result)
53289  return -1;
53290  Py_DECREF(result);
53291  return 0;
53292 bad:
53293  if (kwargs != __pyx_print_kwargs)
53294  Py_XDECREF(kwargs);
53295  return -1;
53296 }
53297 #endif
53298 
53299 /* Declarations */
53300 #if CYTHON_CCOMPLEX
53301  #ifdef __cplusplus
53302  static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
53303  return ::std::complex< float >(x, y);
53304  }
53305  #else
53306  static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
53307  return x + y*(__pyx_t_float_complex)_Complex_I;
53308  }
53309  #endif
53310 #else
53311  static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
53312  __pyx_t_float_complex z;
53313  z.real = x;
53314  z.imag = y;
53315  return z;
53316  }
53317 #endif
53318 
53319 /* Arithmetic */
53320 #if CYTHON_CCOMPLEX
53321 #else
53322  static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
53323  return (a.real == b.real) && (a.imag == b.imag);
53324  }
53325  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
53326  __pyx_t_float_complex z;
53327  z.real = a.real + b.real;
53328  z.imag = a.imag + b.imag;
53329  return z;
53330  }
53331  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
53332  __pyx_t_float_complex z;
53333  z.real = a.real - b.real;
53334  z.imag = a.imag - b.imag;
53335  return z;
53336  }
53337  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
53338  __pyx_t_float_complex z;
53339  z.real = a.real * b.real - a.imag * b.imag;
53340  z.imag = a.real * b.imag + a.imag * b.real;
53341  return z;
53342  }
53343  #if 1
53344  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
53345  if (b.imag == 0) {
53346  return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
53347  } else if (fabsf(b.real) >= fabsf(b.imag)) {
53348  if (b.real == 0 && b.imag == 0) {
53349  return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.imag);
53350  } else {
53351  float r = b.imag / b.real;
53352  float s = (float)(1.0) / (b.real + b.imag * r);
53353  return __pyx_t_float_complex_from_parts(
53354  (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
53355  }
53356  } else {
53357  float r = b.real / b.imag;
53358  float s = (float)(1.0) / (b.imag + b.real * r);
53359  return __pyx_t_float_complex_from_parts(
53360  (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
53361  }
53362  }
53363  #else
53364  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
53365  if (b.imag == 0) {
53366  return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
53367  } else {
53368  float denom = b.real * b.real + b.imag * b.imag;
53369  return __pyx_t_float_complex_from_parts(
53370  (a.real * b.real + a.imag * b.imag) / denom,
53371  (a.imag * b.real - a.real * b.imag) / denom);
53372  }
53373  }
53374  #endif
53375  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex a) {
53376  __pyx_t_float_complex z;
53377  z.real = -a.real;
53378  z.imag = -a.imag;
53379  return z;
53380  }
53381  static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex a) {
53382  return (a.real == 0) && (a.imag == 0);
53383  }
53384  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex a) {
53385  __pyx_t_float_complex z;
53386  z.real = a.real;
53387  z.imag = -a.imag;
53388  return z;
53389  }
53390  #if 1
53391  static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex z) {
53392  #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
53393  return sqrtf(z.real*z.real + z.imag*z.imag);
53394  #else
53395  return hypotf(z.real, z.imag);
53396  #endif
53397  }
53398  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
53399  __pyx_t_float_complex z;
53400  float r, lnr, theta, z_r, z_theta;
53401  if (b.imag == 0 && b.real == (int)b.real) {
53402  if (b.real < 0) {
53403  float denom = a.real * a.real + a.imag * a.imag;
53404  a.real = a.real / denom;
53405  a.imag = -a.imag / denom;
53406  b.real = -b.real;
53407  }
53408  switch ((int)b.real) {
53409  case 0:
53410  z.real = 1;
53411  z.imag = 0;
53412  return z;
53413  case 1:
53414  return a;
53415  case 2:
53416  return __Pyx_c_prod_float(a, a);
53417  case 3:
53418  z = __Pyx_c_prod_float(a, a);
53419  return __Pyx_c_prod_float(z, a);
53420  case 4:
53421  z = __Pyx_c_prod_float(a, a);
53422  return __Pyx_c_prod_float(z, z);
53423  }
53424  }
53425  if (a.imag == 0) {
53426  if (a.real == 0) {
53427  return a;
53428  } else if (b.imag == 0) {
53429  z.real = powf(a.real, b.real);
53430  z.imag = 0;
53431  return z;
53432  } else if (a.real > 0) {
53433  r = a.real;
53434  theta = 0;
53435  } else {
53436  r = -a.real;
53437  theta = atan2f(0.0, -1.0);
53438  }
53439  } else {
53440  r = __Pyx_c_abs_float(a);
53441  theta = atan2f(a.imag, a.real);
53442  }
53443  lnr = logf(r);
53444  z_r = expf(lnr * b.real - theta * b.imag);
53445  z_theta = theta * b.real + lnr * b.imag;
53446  z.real = z_r * cosf(z_theta);
53447  z.imag = z_r * sinf(z_theta);
53448  return z;
53449  }
53450  #endif
53451 #endif
53452 
53453 /* Declarations */
53454 #if CYTHON_CCOMPLEX
53455  #ifdef __cplusplus
53456  static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
53457  return ::std::complex< double >(x, y);
53458  }
53459  #else
53460  static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
53461  return x + y*(__pyx_t_double_complex)_Complex_I;
53462  }
53463  #endif
53464 #else
53465  static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
53466  __pyx_t_double_complex z;
53467  z.real = x;
53468  z.imag = y;
53469  return z;
53470  }
53471 #endif
53472 
53473 /* Arithmetic */
53474 #if CYTHON_CCOMPLEX
53475 #else
53476  static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
53477  return (a.real == b.real) && (a.imag == b.imag);
53478  }
53479  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
53480  __pyx_t_double_complex z;
53481  z.real = a.real + b.real;
53482  z.imag = a.imag + b.imag;
53483  return z;
53484  }
53485  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
53486  __pyx_t_double_complex z;
53487  z.real = a.real - b.real;
53488  z.imag = a.imag - b.imag;
53489  return z;
53490  }
53491  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
53492  __pyx_t_double_complex z;
53493  z.real = a.real * b.real - a.imag * b.imag;
53494  z.imag = a.real * b.imag + a.imag * b.real;
53495  return z;
53496  }
53497  #if 1
53498  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
53499  if (b.imag == 0) {
53500  return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
53501  } else if (fabs(b.real) >= fabs(b.imag)) {
53502  if (b.real == 0 && b.imag == 0) {
53503  return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.imag);
53504  } else {
53505  double r = b.imag / b.real;
53506  double s = (double)(1.0) / (b.real + b.imag * r);
53507  return __pyx_t_double_complex_from_parts(
53508  (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
53509  }
53510  } else {
53511  double r = b.real / b.imag;
53512  double s = (double)(1.0) / (b.imag + b.real * r);
53513  return __pyx_t_double_complex_from_parts(
53514  (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
53515  }
53516  }
53517  #else
53518  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
53519  if (b.imag == 0) {
53520  return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
53521  } else {
53522  double denom = b.real * b.real + b.imag * b.imag;
53523  return __pyx_t_double_complex_from_parts(
53524  (a.real * b.real + a.imag * b.imag) / denom,
53525  (a.imag * b.real - a.real * b.imag) / denom);
53526  }
53527  }
53528  #endif
53529  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex a) {
53530  __pyx_t_double_complex z;
53531  z.real = -a.real;
53532  z.imag = -a.imag;
53533  return z;
53534  }
53535  static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex a) {
53536  return (a.real == 0) && (a.imag == 0);
53537  }
53538  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex a) {
53539  __pyx_t_double_complex z;
53540  z.real = a.real;
53541  z.imag = -a.imag;
53542  return z;
53543  }
53544  #if 1
53545  static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex z) {
53546  #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
53547  return sqrt(z.real*z.real + z.imag*z.imag);
53548  #else
53549  return hypot(z.real, z.imag);
53550  #endif
53551  }
53552  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
53553  __pyx_t_double_complex z;
53554  double r, lnr, theta, z_r, z_theta;
53555  if (b.imag == 0 && b.real == (int)b.real) {
53556  if (b.real < 0) {
53557  double denom = a.real * a.real + a.imag * a.imag;
53558  a.real = a.real / denom;
53559  a.imag = -a.imag / denom;
53560  b.real = -b.real;
53561  }
53562  switch ((int)b.real) {
53563  case 0:
53564  z.real = 1;
53565  z.imag = 0;
53566  return z;
53567  case 1:
53568  return a;
53569  case 2:
53570  return __Pyx_c_prod_double(a, a);
53571  case 3:
53572  z = __Pyx_c_prod_double(a, a);
53573  return __Pyx_c_prod_double(z, a);
53574  case 4:
53575  z = __Pyx_c_prod_double(a, a);
53576  return __Pyx_c_prod_double(z, z);
53577  }
53578  }
53579  if (a.imag == 0) {
53580  if (a.real == 0) {
53581  return a;
53582  } else if (b.imag == 0) {
53583  z.real = pow(a.real, b.real);
53584  z.imag = 0;
53585  return z;
53586  } else if (a.real > 0) {
53587  r = a.real;
53588  theta = 0;
53589  } else {
53590  r = -a.real;
53591  theta = atan2(0.0, -1.0);
53592  }
53593  } else {
53594  r = __Pyx_c_abs_double(a);
53595  theta = atan2(a.imag, a.real);
53596  }
53597  lnr = log(r);
53598  z_r = exp(lnr * b.real - theta * b.imag);
53599  z_theta = theta * b.real + lnr * b.imag;
53600  z.real = z_r * cos(z_theta);
53601  z.imag = z_r * sin(z_theta);
53602  return z;
53603  }
53604  #endif
53605 #endif
53606 
53607 /* CIntFromPy */
53608 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
53609 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
53610 #pragma GCC diagnostic push
53611 #pragma GCC diagnostic ignored "-Wconversion"
53612 #endif
53613  const int neg_one = (int) -1, const_zero = (int) 0;
53614 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
53615 #pragma GCC diagnostic pop
53616 #endif
53617  const int is_unsigned = neg_one > const_zero;
53618 #if PY_MAJOR_VERSION < 3
53619  if (likely(PyInt_Check(x))) {
53620  if (sizeof(int) < sizeof(long)) {
53621  __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
53622  } else {
53623  long val = PyInt_AS_LONG(x);
53624  if (is_unsigned && unlikely(val < 0)) {
53625  goto raise_neg_overflow;
53626  }
53627  return (int) val;
53628  }
53629  } else
53630 #endif
53631  if (likely(PyLong_Check(x))) {
53632  if (is_unsigned) {
53633 #if CYTHON_USE_PYLONG_INTERNALS
53634  const digit* digits = ((PyLongObject*)x)->ob_digit;
53635  switch (Py_SIZE(x)) {
53636  case 0: return (int) 0;
53637  case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
53638  case 2:
53639  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
53640  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
53641  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
53642  } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
53643  return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
53644  }
53645  }
53646  break;
53647  case 3:
53648  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
53649  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
53650  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
53651  } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
53652  return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
53653  }
53654  }
53655  break;
53656  case 4:
53657  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
53658  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
53659  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
53660  } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
53661  return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
53662  }
53663  }
53664  break;
53665  }
53666 #endif
53667 #if CYTHON_COMPILING_IN_CPYTHON
53668  if (unlikely(Py_SIZE(x) < 0)) {
53669  goto raise_neg_overflow;
53670  }
53671 #else
53672  {
53673  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
53674  if (unlikely(result < 0))
53675  return (int) -1;
53676  if (unlikely(result == 1))
53677  goto raise_neg_overflow;
53678  }
53679 #endif
53680  if (sizeof(int) <= sizeof(unsigned long)) {
53681  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
53682 #ifdef HAVE_LONG_LONG
53683  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
53684  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
53685 #endif
53686  }
53687  } else {
53688 #if CYTHON_USE_PYLONG_INTERNALS
53689  const digit* digits = ((PyLongObject*)x)->ob_digit;
53690  switch (Py_SIZE(x)) {
53691  case 0: return (int) 0;
53692  case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
53693  case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0])
53694  case -2:
53695  if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
53696  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
53697  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
53698  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
53699  return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
53700  }
53701  }
53702  break;
53703  case 2:
53704  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
53705  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
53706  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
53707  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
53708  return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
53709  }
53710  }
53711  break;
53712  case -3:
53713  if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
53714  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
53715  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
53716  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
53717  return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
53718  }
53719  }
53720  break;
53721  case 3:
53722  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
53723  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
53724  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
53725  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
53726  return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
53727  }
53728  }
53729  break;
53730  case -4:
53731  if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
53732  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
53733  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
53734  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
53735  return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
53736  }
53737  }
53738  break;
53739  case 4:
53740  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
53741  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
53742  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
53743  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
53744  return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
53745  }
53746  }
53747  break;
53748  }
53749 #endif
53750  if (sizeof(int) <= sizeof(long)) {
53751  __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
53752 #ifdef HAVE_LONG_LONG
53753  } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
53754  __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
53755 #endif
53756  }
53757  }
53758  {
53759 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
53760  PyErr_SetString(PyExc_RuntimeError,
53761  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
53762 #else
53763  int val;
53764  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
53765  #if PY_MAJOR_VERSION < 3
53766  if (likely(v) && !PyLong_Check(v)) {
53767  PyObject *tmp = v;
53768  v = PyNumber_Long(tmp);
53769  Py_DECREF(tmp);
53770  }
53771  #endif
53772  if (likely(v)) {
53773  int one = 1; int is_little = (int)*(unsigned char *)&one;
53774  unsigned char *bytes = (unsigned char *)&val;
53775  int ret = _PyLong_AsByteArray((PyLongObject *)v,
53776  bytes, sizeof(val),
53777  is_little, !is_unsigned);
53778  Py_DECREF(v);
53779  if (likely(!ret))
53780  return val;
53781  }
53782 #endif
53783  return (int) -1;
53784  }
53785  } else {
53786  int val;
53787  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
53788  if (!tmp) return (int) -1;
53789  val = __Pyx_PyInt_As_int(tmp);
53790  Py_DECREF(tmp);
53791  return val;
53792  }
53793 raise_overflow:
53794  PyErr_SetString(PyExc_OverflowError,
53795  "value too large to convert to int");
53796  return (int) -1;
53797 raise_neg_overflow:
53798  PyErr_SetString(PyExc_OverflowError,
53799  "can't convert negative value to int");
53800  return (int) -1;
53801 }
53802 
53803 /* CIntToPy */
53804 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
53805 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
53806 #pragma GCC diagnostic push
53807 #pragma GCC diagnostic ignored "-Wconversion"
53808 #endif
53809  const int neg_one = (int) -1, const_zero = (int) 0;
53810 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
53811 #pragma GCC diagnostic pop
53812 #endif
53813  const int is_unsigned = neg_one > const_zero;
53814  if (is_unsigned) {
53815  if (sizeof(int) < sizeof(long)) {
53816  return PyInt_FromLong((long) value);
53817  } else if (sizeof(int) <= sizeof(unsigned long)) {
53818  return PyLong_FromUnsignedLong((unsigned long) value);
53819 #ifdef HAVE_LONG_LONG
53820  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
53821  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
53822 #endif
53823  }
53824  } else {
53825  if (sizeof(int) <= sizeof(long)) {
53826  return PyInt_FromLong((long) value);
53827 #ifdef HAVE_LONG_LONG
53828  } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
53829  return PyLong_FromLongLong((PY_LONG_LONG) value);
53830 #endif
53831  }
53832  }
53833  {
53834  int one = 1; int little = (int)*(unsigned char *)&one;
53835  unsigned char *bytes = (unsigned char *)&value;
53836  return _PyLong_FromByteArray(bytes, sizeof(int),
53837  little, !is_unsigned);
53838  }
53839 }
53840 
53841 /* CIntFromPy */
53842 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
53843 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
53844 #pragma GCC diagnostic push
53845 #pragma GCC diagnostic ignored "-Wconversion"
53846 #endif
53847  const long neg_one = (long) -1, const_zero = (long) 0;
53848 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
53849 #pragma GCC diagnostic pop
53850 #endif
53851  const int is_unsigned = neg_one > const_zero;
53852 #if PY_MAJOR_VERSION < 3
53853  if (likely(PyInt_Check(x))) {
53854  if (sizeof(long) < sizeof(long)) {
53855  __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
53856  } else {
53857  long val = PyInt_AS_LONG(x);
53858  if (is_unsigned && unlikely(val < 0)) {
53859  goto raise_neg_overflow;
53860  }
53861  return (long) val;
53862  }
53863  } else
53864 #endif
53865  if (likely(PyLong_Check(x))) {
53866  if (is_unsigned) {
53867 #if CYTHON_USE_PYLONG_INTERNALS
53868  const digit* digits = ((PyLongObject*)x)->ob_digit;
53869  switch (Py_SIZE(x)) {
53870  case 0: return (long) 0;
53871  case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
53872  case 2:
53873  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
53874  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
53875  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
53876  } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
53877  return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
53878  }
53879  }
53880  break;
53881  case 3:
53882  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
53883  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
53884  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
53885  } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
53886  return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
53887  }
53888  }
53889  break;
53890  case 4:
53891  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
53892  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
53893  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
53894  } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
53895  return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
53896  }
53897  }
53898  break;
53899  }
53900 #endif
53901 #if CYTHON_COMPILING_IN_CPYTHON
53902  if (unlikely(Py_SIZE(x) < 0)) {
53903  goto raise_neg_overflow;
53904  }
53905 #else
53906  {
53907  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
53908  if (unlikely(result < 0))
53909  return (long) -1;
53910  if (unlikely(result == 1))
53911  goto raise_neg_overflow;
53912  }
53913 #endif
53914  if (sizeof(long) <= sizeof(unsigned long)) {
53915  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
53916 #ifdef HAVE_LONG_LONG
53917  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
53918  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
53919 #endif
53920  }
53921  } else {
53922 #if CYTHON_USE_PYLONG_INTERNALS
53923  const digit* digits = ((PyLongObject*)x)->ob_digit;
53924  switch (Py_SIZE(x)) {
53925  case 0: return (long) 0;
53926  case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
53927  case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0])
53928  case -2:
53929  if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
53930  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
53931  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
53932  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
53933  return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
53934  }
53935  }
53936  break;
53937  case 2:
53938  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
53939  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
53940  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
53941  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
53942  return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
53943  }
53944  }
53945  break;
53946  case -3:
53947  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
53948  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
53949  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
53950  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
53951  return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
53952  }
53953  }
53954  break;
53955  case 3:
53956  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
53957  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
53958  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
53959  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
53960  return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
53961  }
53962  }
53963  break;
53964  case -4:
53965  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
53966  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
53967  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
53968  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
53969  return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
53970  }
53971  }
53972  break;
53973  case 4:
53974  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
53975  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
53976  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
53977  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
53978  return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
53979  }
53980  }
53981  break;
53982  }
53983 #endif
53984  if (sizeof(long) <= sizeof(long)) {
53985  __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
53986 #ifdef HAVE_LONG_LONG
53987  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
53988  __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
53989 #endif
53990  }
53991  }
53992  {
53993 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
53994  PyErr_SetString(PyExc_RuntimeError,
53995  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
53996 #else
53997  long val;
53998  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
53999  #if PY_MAJOR_VERSION < 3
54000  if (likely(v) && !PyLong_Check(v)) {
54001  PyObject *tmp = v;
54002  v = PyNumber_Long(tmp);
54003  Py_DECREF(tmp);
54004  }
54005  #endif
54006  if (likely(v)) {
54007  int one = 1; int is_little = (int)*(unsigned char *)&one;
54008  unsigned char *bytes = (unsigned char *)&val;
54009  int ret = _PyLong_AsByteArray((PyLongObject *)v,
54010  bytes, sizeof(val),
54011  is_little, !is_unsigned);
54012  Py_DECREF(v);
54013  if (likely(!ret))
54014  return val;
54015  }
54016 #endif
54017  return (long) -1;
54018  }
54019  } else {
54020  long val;
54021  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
54022  if (!tmp) return (long) -1;
54023  val = __Pyx_PyInt_As_long(tmp);
54024  Py_DECREF(tmp);
54025  return val;
54026  }
54027 raise_overflow:
54028  PyErr_SetString(PyExc_OverflowError,
54029  "value too large to convert to long");
54030  return (long) -1;
54031 raise_neg_overflow:
54032  PyErr_SetString(PyExc_OverflowError,
54033  "can't convert negative value to long");
54034  return (long) -1;
54035 }
54036 
54037 /* PrintOne */
54038 #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3
54039 static int __Pyx_PrintOne(PyObject* f, PyObject *o) {
54040  if (!f) {
54041  if (!(f = __Pyx_GetStdout()))
54042  return -1;
54043  }
54044  Py_INCREF(f);
54045  if (PyFile_SoftSpace(f, 0)) {
54046  if (PyFile_WriteString(" ", f) < 0)
54047  goto error;
54048  }
54049  if (PyFile_WriteObject(o, f, Py_PRINT_RAW) < 0)
54050  goto error;
54051  if (PyFile_WriteString("\n", f) < 0)
54052  goto error;
54053  Py_DECREF(f);
54054  return 0;
54055 error:
54056  Py_DECREF(f);
54057  return -1;
54058  /* the line below is just to avoid C compiler
54059  * warnings about unused functions */
54060  return __Pyx_Print(f, NULL, 0);
54061 }
54062 #else
54063 static int __Pyx_PrintOne(PyObject* stream, PyObject *o) {
54064  int res;
54065  PyObject* arg_tuple = PyTuple_Pack(1, o);
54066  if (unlikely(!arg_tuple))
54067  return -1;
54068  res = __Pyx_Print(stream, arg_tuple, 1);
54069  Py_DECREF(arg_tuple);
54070  return res;
54071 }
54072 #endif
54073 
54074 /* CIntToPy */
54075 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
54076 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
54077 #pragma GCC diagnostic push
54078 #pragma GCC diagnostic ignored "-Wconversion"
54079 #endif
54080  const long neg_one = (long) -1, const_zero = (long) 0;
54081 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
54082 #pragma GCC diagnostic pop
54083 #endif
54084  const int is_unsigned = neg_one > const_zero;
54085  if (is_unsigned) {
54086  if (sizeof(long) < sizeof(long)) {
54087  return PyInt_FromLong((long) value);
54088  } else if (sizeof(long) <= sizeof(unsigned long)) {
54089  return PyLong_FromUnsignedLong((unsigned long) value);
54090 #ifdef HAVE_LONG_LONG
54091  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
54092  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
54093 #endif
54094  }
54095  } else {
54096  if (sizeof(long) <= sizeof(long)) {
54097  return PyInt_FromLong((long) value);
54098 #ifdef HAVE_LONG_LONG
54099  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
54100  return PyLong_FromLongLong((PY_LONG_LONG) value);
54101 #endif
54102  }
54103  }
54104  {
54105  int one = 1; int little = (int)*(unsigned char *)&one;
54106  unsigned char *bytes = (unsigned char *)&value;
54107  return _PyLong_FromByteArray(bytes, sizeof(long),
54108  little, !is_unsigned);
54109  }
54110 }
54111 
54112 /* FastTypeChecks */
54113 #if CYTHON_COMPILING_IN_CPYTHON
54114 static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
54115  while (a) {
54116  a = a->tp_base;
54117  if (a == b)
54118  return 1;
54119  }
54120  return b == &PyBaseObject_Type;
54121 }
54122 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
54123  PyObject *mro;
54124  if (a == b) return 1;
54125  mro = a->tp_mro;
54126  if (likely(mro)) {
54127  Py_ssize_t i, n;
54128  n = PyTuple_GET_SIZE(mro);
54129  for (i = 0; i < n; i++) {
54130  if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
54131  return 1;
54132  }
54133  return 0;
54134  }
54135  return __Pyx_InBases(a, b);
54136 }
54137 #if PY_MAJOR_VERSION == 2
54138 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
54139  PyObject *exception, *value, *tb;
54140  int res;
54141  __Pyx_PyThreadState_declare
54142  __Pyx_PyThreadState_assign
54143  __Pyx_ErrFetch(&exception, &value, &tb);
54144  res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
54145  if (unlikely(res == -1)) {
54146  PyErr_WriteUnraisable(err);
54147  res = 0;
54148  }
54149  if (!res) {
54150  res = PyObject_IsSubclass(err, exc_type2);
54151  if (unlikely(res == -1)) {
54152  PyErr_WriteUnraisable(err);
54153  res = 0;
54154  }
54155  }
54156  __Pyx_ErrRestore(exception, value, tb);
54157  return res;
54158 }
54159 #else
54160 static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
54161  int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
54162  if (!res) {
54163  res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
54164  }
54165  return res;
54166 }
54167 #endif
54168 static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
54169  Py_ssize_t i, n;
54170  assert(PyExceptionClass_Check(exc_type));
54171  n = PyTuple_GET_SIZE(tuple);
54172 #if PY_MAJOR_VERSION >= 3
54173  for (i=0; i<n; i++) {
54174  if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
54175  }
54176 #endif
54177  for (i=0; i<n; i++) {
54178  PyObject *t = PyTuple_GET_ITEM(tuple, i);
54179  #if PY_MAJOR_VERSION < 3
54180  if (likely(exc_type == t)) return 1;
54181  #endif
54182  if (likely(PyExceptionClass_Check(t))) {
54183  if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
54184  } else {
54185  }
54186  }
54187  return 0;
54188 }
54189 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
54190  if (likely(err == exc_type)) return 1;
54191  if (likely(PyExceptionClass_Check(err))) {
54192  if (likely(PyExceptionClass_Check(exc_type))) {
54193  return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
54194  } else if (likely(PyTuple_Check(exc_type))) {
54195  return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
54196  } else {
54197  }
54198  }
54199  return PyErr_GivenExceptionMatches(err, exc_type);
54200 }
54201 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
54202  assert(PyExceptionClass_Check(exc_type1));
54203  assert(PyExceptionClass_Check(exc_type2));
54204  if (likely(err == exc_type1 || err == exc_type2)) return 1;
54205  if (likely(PyExceptionClass_Check(err))) {
54206  return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
54207  }
54208  return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
54209 }
54210 #endif
54211 
54212 /* CheckBinaryVersion */
54213 static int __Pyx_check_binary_version(void) {
54214  char ctversion[5];
54215  int same=1, i, found_dot;
54216  const char* rt_from_call = Py_GetVersion();
54217  PyOS_snprintf(ctversion, 5, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
54218  found_dot = 0;
54219  for (i = 0; i < 4; i++) {
54220  if (!ctversion[i]) {
54221  same = (rt_from_call[i] < '0' || rt_from_call[i] > '9');
54222  break;
54223  }
54224  if (rt_from_call[i] != ctversion[i]) {
54225  same = 0;
54226  break;
54227  }
54228  }
54229  if (!same) {
54230  char rtversion[5] = {'\0'};
54231  char message[200];
54232  for (i=0; i<4; ++i) {
54233  if (rt_from_call[i] == '.') {
54234  if (found_dot) break;
54235  found_dot = 1;
54236  } else if (rt_from_call[i] < '0' || rt_from_call[i] > '9') {
54237  break;
54238  }
54239  rtversion[i] = rt_from_call[i];
54240  }
54241  PyOS_snprintf(message, sizeof(message),
54242  "compiletime version %s of module '%.100s' "
54243  "does not match runtime version %s",
54244  ctversion, __Pyx_MODULE_NAME, rtversion);
54245  return PyErr_WarnEx(NULL, message, 1);
54246  }
54247  return 0;
54248 }
54249 
54250 /* InitStrings */
54251 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
54252  while (t->p) {
54253  #if PY_MAJOR_VERSION < 3
54254  if (t->is_unicode) {
54255  *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
54256  } else if (t->intern) {
54257  *t->p = PyString_InternFromString(t->s);
54258  } else {
54259  *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
54260  }
54261  #else
54262  if (t->is_unicode | t->is_str) {
54263  if (t->intern) {
54264  *t->p = PyUnicode_InternFromString(t->s);
54265  } else if (t->encoding) {
54266  *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
54267  } else {
54268  *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
54269  }
54270  } else {
54271  *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
54272  }
54273  #endif
54274  if (!*t->p)
54275  return -1;
54276  if (PyObject_Hash(*t->p) == -1)
54277  return -1;
54278  ++t;
54279  }
54280  return 0;
54281 }
54282 
54283 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
54284  return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
54285 }
54286 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
54287  Py_ssize_t ignore;
54288  return __Pyx_PyObject_AsStringAndSize(o, &ignore);
54289 }
54290 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
54291 #if !CYTHON_PEP393_ENABLED
54292 static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
54293  char* defenc_c;
54294  PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
54295  if (!defenc) return NULL;
54296  defenc_c = PyBytes_AS_STRING(defenc);
54297 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
54298  {
54299  char* end = defenc_c + PyBytes_GET_SIZE(defenc);
54300  char* c;
54301  for (c = defenc_c; c < end; c++) {
54302  if ((unsigned char) (*c) >= 128) {
54303  PyUnicode_AsASCIIString(o);
54304  return NULL;
54305  }
54306  }
54307  }
54308 #endif
54309  *length = PyBytes_GET_SIZE(defenc);
54310  return defenc_c;
54311 }
54312 #else
54313 static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
54314  if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
54315 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
54316  if (likely(PyUnicode_IS_ASCII(o))) {
54317  *length = PyUnicode_GET_LENGTH(o);
54318  return PyUnicode_AsUTF8(o);
54319  } else {
54320  PyUnicode_AsASCIIString(o);
54321  return NULL;
54322  }
54323 #else
54324  return PyUnicode_AsUTF8AndSize(o, length);
54325 #endif
54326 }
54327 #endif
54328 #endif
54329 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
54330 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
54331  if (
54332 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
54333  __Pyx_sys_getdefaultencoding_not_ascii &&
54334 #endif
54335  PyUnicode_Check(o)) {
54336  return __Pyx_PyUnicode_AsStringAndSize(o, length);
54337  } else
54338 #endif
54339 #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
54340  if (PyByteArray_Check(o)) {
54341  *length = PyByteArray_GET_SIZE(o);
54342  return PyByteArray_AS_STRING(o);
54343  } else
54344 #endif
54345  {
54346  char* result;
54347  int r = PyBytes_AsStringAndSize(o, &result, length);
54348  if (unlikely(r < 0)) {
54349  return NULL;
54350  } else {
54351  return result;
54352  }
54353  }
54354 }
54355 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
54356  int is_true = x == Py_True;
54357  if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
54358  else return PyObject_IsTrue(x);
54359 }
54360 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
54361  int retval;
54362  if (unlikely(!x)) return -1;
54363  retval = __Pyx_PyObject_IsTrue(x);
54364  Py_DECREF(x);
54365  return retval;
54366 }
54367 static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
54368 #if PY_MAJOR_VERSION >= 3
54369  if (PyLong_Check(result)) {
54370  if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
54371  "__int__ returned non-int (type %.200s). "
54372  "The ability to return an instance of a strict subclass of int "
54373  "is deprecated, and may be removed in a future version of Python.",
54374  Py_TYPE(result)->tp_name)) {
54375  Py_DECREF(result);
54376  return NULL;
54377  }
54378  return result;
54379  }
54380 #endif
54381  PyErr_Format(PyExc_TypeError,
54382  "__%.4s__ returned non-%.4s (type %.200s)",
54383  type_name, type_name, Py_TYPE(result)->tp_name);
54384  Py_DECREF(result);
54385  return NULL;
54386 }
54387 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
54388 #if CYTHON_USE_TYPE_SLOTS
54389  PyNumberMethods *m;
54390 #endif
54391  const char *name = NULL;
54392  PyObject *res = NULL;
54393 #if PY_MAJOR_VERSION < 3
54394  if (likely(PyInt_Check(x) || PyLong_Check(x)))
54395 #else
54396  if (likely(PyLong_Check(x)))
54397 #endif
54398  return __Pyx_NewRef(x);
54399 #if CYTHON_USE_TYPE_SLOTS
54400  m = Py_TYPE(x)->tp_as_number;
54401  #if PY_MAJOR_VERSION < 3
54402  if (m && m->nb_int) {
54403  name = "int";
54404  res = m->nb_int(x);
54405  }
54406  else if (m && m->nb_long) {
54407  name = "long";
54408  res = m->nb_long(x);
54409  }
54410  #else
54411  if (likely(m && m->nb_int)) {
54412  name = "int";
54413  res = m->nb_int(x);
54414  }
54415  #endif
54416 #else
54417  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
54418  res = PyNumber_Int(x);
54419  }
54420 #endif
54421  if (likely(res)) {
54422 #if PY_MAJOR_VERSION < 3
54423  if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
54424 #else
54425  if (unlikely(!PyLong_CheckExact(res))) {
54426 #endif
54427  return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
54428  }
54429  }
54430  else if (!PyErr_Occurred()) {
54431  PyErr_SetString(PyExc_TypeError,
54432  "an integer is required");
54433  }
54434  return res;
54435 }
54436 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
54437  Py_ssize_t ival;
54438  PyObject *x;
54439 #if PY_MAJOR_VERSION < 3
54440  if (likely(PyInt_CheckExact(b))) {
54441  if (sizeof(Py_ssize_t) >= sizeof(long))
54442  return PyInt_AS_LONG(b);
54443  else
54444  return PyInt_AsSsize_t(b);
54445  }
54446 #endif
54447  if (likely(PyLong_CheckExact(b))) {
54448  #if CYTHON_USE_PYLONG_INTERNALS
54449  const digit* digits = ((PyLongObject*)b)->ob_digit;
54450  const Py_ssize_t size = Py_SIZE(b);
54451  if (likely(__Pyx_sst_abs(size) <= 1)) {
54452  ival = likely(size) ? digits[0] : 0;
54453  if (size == -1) ival = -ival;
54454  return ival;
54455  } else {
54456  switch (size) {
54457  case 2:
54458  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
54459  return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
54460  }
54461  break;
54462  case -2:
54463  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
54464  return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
54465  }
54466  break;
54467  case 3:
54468  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
54469  return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
54470  }
54471  break;
54472  case -3:
54473  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
54474  return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
54475  }
54476  break;
54477  case 4:
54478  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
54479  return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
54480  }
54481  break;
54482  case -4:
54483  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
54484  return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
54485  }
54486  break;
54487  }
54488  }
54489  #endif
54490  return PyLong_AsSsize_t(b);
54491  }
54492  x = PyNumber_Index(b);
54493  if (!x) return -1;
54494  ival = PyInt_AsSsize_t(x);
54495  Py_DECREF(x);
54496  return ival;
54497 }
54498 static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
54499  if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) {
54500  return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
54501 #if PY_MAJOR_VERSION < 3
54502  } else if (likely(PyInt_CheckExact(o))) {
54503  return PyInt_AS_LONG(o);
54504 #endif
54505  } else {
54506  Py_ssize_t ival;
54507  PyObject *x;
54508  x = PyNumber_Index(o);
54509  if (!x) return -1;
54510  ival = PyInt_AsLong(x);
54511  Py_DECREF(x);
54512  return ival;
54513  }
54514 }
54515 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
54516  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
54517 }
54518 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
54519  return PyInt_FromSize_t(ival);
54520 }
54521 
54522 
54523 #endif /* Py_PYTHON_H */
updateDiffusion_strong_sd
void updateDiffusion_strong_sd(int nElements_global, int nQuadraturePoints_element, int nSpace, int *rowptr, int *colind, double *da, double *grad_phi, double *grad_u, double *strong_residual)
Definition: femIntegrals.c:3153
setExteriorGlobalElementBoundaryVelocityValues
void setExteriorGlobalElementBoundaryVelocityValues(int updateFluxValues, int nExteriorElementBoundaries_global, int nQuadraturePoints_elementBoundary, int nSpace, int *exteriorElementBoundaries, int *elementBoundaryElements, int *elementBoundaryLocalElementBoundaries, double *n, double *vn_in, double *v_out)
Definition: femIntegrals.c:7532
calculateShape_X_weightedShape
void calculateShape_X_weightedShape(int nElements_global, int nQuadraturePoints_element, int nDOF_trial_element, int nDOF_test_element, double *v, double *w_dV, double *v_X_w_dV)
Calcualte the tensor product of trial and test functions at the quadrature points.
Definition: femIntegrals.c:6537
calculateFiniteElementFunctionGradientTensorValues
void calculateFiniteElementFunctionGradientTensorValues(int nElements_global, int nQuadraturePoints_element, int nDOF_trial_element, int nDOF_test_element, int nComponents, int nSpace, int *l2g, double *dof, double *grad_v_X_grad_w_dV, double *grad_u_X_grad_w_dV)
Loop over all the quadrature points and calculate the tensor product of the solution gradient with th...
Definition: femIntegrals.c:7124
updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_dense
void updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_dense(int nInteriorElementBoundaries_global, int nElementBoundaries_element, int nQuadraturePoints_elementBoundary, int nDOF_test_element, int nDOF_trial_element, int offset_r, int stride_r, int offset_u, int stride_u, int nFreeVDOF_global, int *interiorElementBoundaries, int *elementBoundaryElements, int *elementBoundaryLocalElementBoundaries, int *nFreeDOF_element_r, int *freeLocal_r, int *freeGlobal_r, int *nFreeDOF_element_u, int *freeLocal_u, int *freeGlobal_u, double *elementBoundaryFluxJacobian_2sided, double *w_dS, double *jac)
Update the global dense Jacobian from the element boundary two-sided Hamiltonflux Jacobians at interi...
Definition: femIntegrals.c:5109
parametricMaps_getValues
void parametricMaps_getValues(int nElements_global, int nQuadraturePoints_element, int nDOF_element, int nSpace_global, double *psi, int *l2g, double *nodeArray, double *xArray)
Definition: femIntegrals.c:580
parametricMaps_getPermutationsGlobalExterior
void parametricMaps_getPermutationsGlobalExterior(int nElementBoundaryQuadraturePoints_elementBoundary, int nSpace_global, int nExteriorElementBoundaries_global, const int *exteriorElementBoundariesArray, const int *elementBoundaryElementsArray, const int *elementBoundaryLocalElementBoundariesArray, double *xiArray, int *permutations)
Definition: femIntegrals.c:496
copyGlobalUnknownsToFreeUnknowns
void copyGlobalUnknownsToFreeUnknowns(int nDOF2set, int offset, int stride, const int *globalDOFids, const int *freeDOFids, const double *u, double *free_u)
Definition: femIntegrals.c:11016
calculateGradShape_X_weightedShapeGlobalExteriorTrace
void calculateGradShape_X_weightedShapeGlobalExteriorTrace(int nElementBoundaryQuadraturePoints_elementBoundary, int nDOF_trial_element, int nDOF_test_element, int nSpace, int nExteriorElementBoundaries_global, const int *exteriorElementBoundariesArray, const int *elementBoundaryElementsArray, const int *elementBoundaryLocalElementBoundariesArray, double *grad_v, double *w_dS, double *grad_v_X_w_dS)
Calculate the tensor product of trial function gradients and test functions at the quadrature points.
Definition: femIntegrals.c:6883
calculateConservationJacobianPWL
void calculateConservationJacobianPWL(int nNodes_global, int nNodes_internal, int nElements_global, int nInteriorElementBoundaries_global, int nExteriorElementBoundaries_global, int nElementBoundaries_element, int nQuadraturePoints_elementBoundary, int nNodes_element, int nSpace, int *interiorElementBoundaries, int *exteriorElementBoundaries, int *elementBoundaryElements, int *elementBoundaryLocalElementBoundaries, int *elementNodes, int *nodeStarElements, int *nodeStarElementNeighbors, int *nodeStarOffsets, int *nodeStarJacobianOffsets, int *nElements_node, int *internalNodes, double *w, double *normal, double *starJacobian)
updateNumericalDiffusionJacobian
void updateNumericalDiffusionJacobian(int nElements_global, int nQuadraturePoints_element, int nDOF_trial_element, int nDOF_test_element, int nSpace, double *numDiff, double *grad_v_X_grad_w_dV, double *jacobian_weak_residual)
Loop over all the elements and update the element Jacobian with the numerical quadrature approximatio...
Definition: femIntegrals.c:4131
parametricMaps_getJacobianValuesTrace2D
void parametricMaps_getJacobianValuesTrace2D(int nElements_global, int nElementBoundaries_element, int nQuadraturePoints_element, int nDOF_element, double *grad_psi, double *boundaryNormals, double *boundaryJacobians, int *l2g, double *nodeArray, double *jacobianInverseArray, double *metricTensorArray, double *metricTensorDeterminantSqrtArray, double *unitNormalArray)
Definition: femIntegrals.c:1095
updateDiffusion_weak_sd
void updateDiffusion_weak_sd(int nElements_global, int nQuadraturePoints_element, int nDOF_test_element, int nSpace, int *rowptr, int *colind, double *a, double *grad_phi, double *grad_w_dV, double *weak_residual)
Definition: femIntegrals.c:2714
parametricMaps_getJacobianValuesGlobalExteriorTrace2D
void parametricMaps_getJacobianValuesGlobalExteriorTrace2D(int nQuadraturePoints_element, int nDOF_element, int nExteriorElementBoundaries_global, const int *exteriorElementBoundariesArray, const int *elementBoundaryElementsArray, const int *elementBoundaryLocalElementBoundariesArray, double *grad_psi, double *boundaryNormals, double *boundaryJacobians, int *l2g, double *nodeArray, double *jacobianInverseArray, double *metricTensorArray, double *metricTensorDeterminantSqrtArray, double *unitNormalArray)
Definition: femIntegrals.c:1375
calculateInteriorElementBoundaryVelocities
void calculateInteriorElementBoundaryVelocities(int nInteriorElementBoundaries_global, int nElementBoundaries_element, int nQuadraturePoints_elementBoundary, int nSpace, int *interiorElementBoundaries, int *elementBoundaryElements, int *elementBoundaryLocalElementBoundaries, double *m, double *a, double *grad_phi, double *f, double *vAverage, double *vJump, double *mAverage, double *mJump)
Definition: femIntegrals.c:7369
calculateGradShape_X_weightedShape
void calculateGradShape_X_weightedShape(int nElements_global, int nQuadraturePoints_element, int nDOF_trial_element, int nDOF_test_element, int nSpace, double *grad_v, double *w_dV, double *grad_v_X_w_dV)
Calculate the tensor product of trial function gradients and test functions at the quadrature points.
Definition: femIntegrals.c:6601
copyExteriorElementBoundaryValuesFromElementBoundaryValues
void copyExteriorElementBoundaryValuesFromElementBoundaryValues(int nExteriorElementBoundaries_global, int nElements_global, int nElementBoundaries_element, int nQuadraturePoints_elementBoundary, int nValuesPerQuadraturePoint, const int *exteriorElementBoundaries, const int *elementBoundaryElements, const int *elementBoundaryLocalElementBoundaries, const double *ebq_val, double *ebqe_val)
copy quantity in an elementBoundary quadrature array to one that sits only on exterior boundaries
Definition: femIntegrals.c:10545
updateGlobalJacobianFromElementJacobian_dense
void updateGlobalJacobianFromElementJacobian_dense(int nElements_global, int nDOF_test_element, int nDOF_trial_element, int offset_r, int stride_r, int offset_u, int stride_u, int nFreeVDOF_global, int *nFreeDOF_element_r, int *freeLocal_r, int *freeGlobal_r, int *nFreeDOF_element_u, int *freeLocal_u, int *freeGlobal_u, double *elementJacobian, double *globalJacobian)
Update the global dense jacobian from the element Jacobians.
Definition: femIntegrals.c:4676
updateInteriorElementBoundaryShockCapturingVelocity
void updateInteriorElementBoundaryShockCapturingVelocity(int nInteriorElementBoundaries_global, int nElementBoundaries_element, int nQuadraturePoints_elementBoundary, int nQuadraturePoints_element, int nSpace, int *interiorElementBoundaries, int *elementBoundaryElements, int *elementBoundaryLocalElementBoundaries, double *numDiff, double *grad_u, double *velocity)
Calculate the velocity from shock capturing at interior element boundary quadrature points.
Definition: femIntegrals.c:8176
parametricMaps_getInverseValuesGlobalExteriorTrace
void parametricMaps_getInverseValuesGlobalExteriorTrace(int nElementBoundaryQuadraturePoints_elementBoundary, int nDOF_element, int nSpace_global, int nExteriorElementBoundaries_global, const int *exteriorElementBoundariesArray, const int *elementBoundaryElementsArray, const int *elementBoundaryLocalElementBoundariesArray, double *inverseJacobian, int *l2g, double *nodeArray, double *xArray, double *xiArray)
Definition: femIntegrals.c:766
calculateVelocityQuadrature_MixedForm
void calculateVelocityQuadrature_MixedForm(int nElements_global, int nElementBoundaries_element, int nElementBoundaryQuadraturePoints_elementBoundary, int nDOF_element, int nSpace, int nQuadraturePoints_element, double *A_inv, double *b, double *v, double *V, double *qv, double *qV)
Definition: femIntegrals.c:9136
calculateWeightedShapeGlobalExteriorTrace
void calculateWeightedShapeGlobalExteriorTrace(int nElementBoundaryQuadraturePoints_elementBoundary, int nDOF_test_element, int nExteriorElementBoundaries_global, const int *exteriorElementBoundariesArray, const int *elementBoundaryElementsArray, const int *elementBoundaryLocalElementBoundariesArray, double *dSR, double *sqrt_det_g, double *w, double *w_dS)
Weight the traces of the test function with the element boundary integration weights global exterior ...
Definition: femIntegrals.c:6814
updateReactionJacobian_strong
void updateReactionJacobian_strong(int nElements_global, int nQuadraturePoints_element, int nDOF_trial_element, double *dr, double *v, double *dstrong_residual)
Loop over all the elements and update the strong from of the residual at the quadrature points with t...
Definition: femIntegrals.c:3805
calculateWeightedShapeTrace
void calculateWeightedShapeTrace(int nElements_global, int nElementBoundaries_element, int nElementBoundaryQuadraturePoints_elementBoundary, int nDOF_test_element, double *dSR, double *sqrt_det_g, double *w, double *w_dS)
Weight the traces of the test function with the element boundary integration weights.
Definition: femIntegrals.c:6672
updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_dense
void updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_dense(int *elementNeighbors, int nElements_global, int nInteriorElementBoundaries_global, int nElementBoundaries_element, int nQuadraturePoints_elementBoundary, int nDOF_test_element, int nDOF_trial_element, int offset_r, int stride_r, int offset_u, int stride_u, int nFreeVDOF_global, int *interiorElementBoundaries, int *elementBoundaryElements, int *elementBoundaryLocalElementBoundaries, int *nFreeDOF_element_r, int *freeLocal_r, int *freeGlobal_r, int *nFreeDOF_element_u, int *freeLocal_u, int *freeGlobal_u, double *elementBoundaryFluxJacobian_eb, double *w_dS, double *jac)
Update the global dense Jacobian from the element boundary flux Jacobians at interior boundaries.
Definition: femIntegrals.c:4908
updateHamiltonian_weak
void updateHamiltonian_weak(int nElements_global, int nQuadraturePoints_element, int nDOF_test_element, double *H, double *w_dV, double *weak_residual)
Loop over all the elements and update the element weak_residual with the numerical quadrature approxi...
Definition: femIntegrals.c:2306
update_f_movingDomain_ebq
void update_f_movingDomain_ebq(int nElements_global, int nElementBoundaries_element, int nQuadraturePoints_elementBoundary, int nSpace, double *xt, double *m, double *f)
Definition: femIntegrals.c:12168
estimate_mt_lowmem
void estimate_mt_lowmem(int nElements_global, int nQuadraturePoints_element, int nDOF_element, double *v, double *w_dV, double *elementSpatialResidual, double *mt)
Definition: femIntegrals.c:10497
fluxDomainBoundaryIntegral
double fluxDomainBoundaryIntegral(int nExteriorElementBoundaries, int nElementBoundaries_owned, int nQuadraturePoints_elementBoundary, int *flag, int *exteriorElementBoundariesArray, double *dS, double *nValueArray)
Definition: femIntegrals.c:10731
calculateVelocityProjectionMatrixLDG
void calculateVelocityProjectionMatrixLDG(int nElements_global, int nQuadraturePoints_element, int nDOF_element, double *vXw_dV, double *A_inv)
Definition: femIntegrals.c:10109
updateDiffusion2_adjoint_sd
void updateDiffusion2_adjoint_sd(int nElements_global, int nQuadraturePoints_element, int nDOF_test_element, int nSpace, int *rowptr, int *colind, double *a, double *Hess_w_dV, double *Lstar_w_dV)
Definition: femIntegrals.c:3613
parametricMaps_getJacobianValuesGlobalExteriorTrace2D_movingDomain
void parametricMaps_getJacobianValuesGlobalExteriorTrace2D_movingDomain(int nQuadraturePoints_element, int nDOF_element, int nExteriorElementBoundaries_global, const int *exteriorElementBoundariesArray, const int *elementBoundaryElementsArray, const int *elementBoundaryLocalElementBoundariesArray, double *xtArray, double *grad_psi, double *boundaryNormals, double *boundaryJacobians, int *l2g, double *nodeArray, double *jacobianInverseArray, double *metricTensorArray, double *metricTensorDeterminantSqrtArray, double *unitNormalArray)
Definition: femIntegrals.c:1455
updateDiffusion2_strong
void updateDiffusion2_strong(int nElements_global, int nQuadraturePoints_element, int nSpace, double *a, double *Hess_phi, double *strong_residual)
Definition: femIntegrals.c:3413
updateGlobalResidualFromElementResidual
void updateGlobalResidualFromElementResidual(int nElements_global, int nDOF_test_element, int offset_r, int stride_r, int *nFreeDOF_element_r, int *freeLocal_r, int *freeGlobal_r, double *elementResidual, double *globalResidual)
Update the global residuals from the element residuals.
Definition: femIntegrals.c:4651
calculateConservationResidual
void calculateConservationResidual(int nElements_global, int nDOF_test_element, int nElementBoundaries_element, int nQuadraturePoints_elementBoundary, int nSpace, double *n, double *dS_u, double *elementResidual, double *velocity, double *conservationResidual)
calculate mass conservation error as
Definition: femIntegrals.c:8397
calculateIntegrationWeights
void calculateIntegrationWeights(int nElements_global, int nQuadraturePoints_element, double *abs_det_J, double *referenceWeights, double *weights)
Calculate the physical space integration weights from the reference element weights and Jacobian dete...
Definition: femIntegrals.c:6921
computeC0P1InterpolantNCP1
void computeC0P1InterpolantNCP1(int nElements_global, int nNodes_global, int nNodes_element, int nDOF_element, int dim_dof, const int *elementNodesArray, const int *nodeElementOffsets, const int *nodeElementsArray, const int *l2g, const double *dof, double *nodalAverage)
Definition: femIntegrals.c:10857
updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense
void updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense(int nExteriorElementBoundaries_global, int nQuadraturePoints_elementBoundary, int nDOF_test_element, int nDOF_trial_element, int nSpace, int offset_r, int stride_r, int offset_u, int stride_u, int nFreeVDOF_global, int *exteriorElementBoundaries, int *elementBoundaryElements, int *elementBoundaryLocalElementBoundaries, int *nFreeDOF_element_r, int *freeLocal_r, int *freeGlobal_r, int *nFreeDOF_element_u, int *freeLocal_u, int *freeGlobal_u, int *isDOFBoundary, double sigma, double *v, double *n, double *a, double *grad_w, double *dS, double *jac)
Definition: femIntegrals.c:11358
updateExteriorElementBoundaryShockCapturingVelocity
void updateExteriorElementBoundaryShockCapturingVelocity(int nExteriorElementBoundaries_global, int nElementBoundaries_element, int nQuadraturePoints_elementBoundary, int nQuadraturePoints_element, int nSpace, int *exteriorElementBoundaries, int *elementBoundaryElements, int *elementBoundaryLocalElementBoundaries, double *numDiff, double *grad_u, double *velocity)
Calculate the shock capturing flux at exterior element boundary quadrature points.
Definition: femIntegrals.c:8228
calculateExteriorElementBoundaryStress2D
void calculateExteriorElementBoundaryStress2D(int nExteriorElementBoundaries_global, int nQuadraturePoints_elementBoundary, int *elementBoundaryMaterialTypes, int *exteriorElementBoundaries, int *elementBoundaryElements, int *elementBoundaryLocalElementBoundaries, double *p, double *mom_flux_vec_u, double *mom_flux_vec_v, double *dS, double *n, double *F)
Definition: femIntegrals.c:4551
updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense_sd
void updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense_sd(int nInteriorElementBoundaries_global, int nElementBoundaries_element, int nQuadraturePoints_elementBoundary, int nDOF_test_element, int nDOF_trial_element, int nSpace, int *rowptr, int *colind, int offset_r, int stride_r, int offset_u, int stride_u, int nFreeVDOF_global, int *interiorElementBoundaries, int *elementBoundaryElements, int *elementBoundaryLocalElementBoundaries, int *nFreeDOF_element_r, int *freeLocal_r, int *freeGlobal_r, int *nFreeDOF_element_u, int *freeLocal_u, int *freeGlobal_u, double sigma, double *v, double *n, double *a, double *grad_w, double *dS, double *jac)
Definition: femIntegrals.c:11577
calculateExteriorNumericalTrace_Potential
void calculateExteriorNumericalTrace_Potential(int *isDOFBoundary, int nExteriorElementBoundaries_global, int nElementBoundaries_element, int nQuadraturePoints_elementBoundary, int *exteriorElementBoundaries, int *elementBoundaryElements, int *elementBoundaryLocalElementBoundaries, double *phi_bc, double *phi, double *dphi, double *phi_trace, double *dphi_trace_left)
Calculate the trace of the potential on interior element boundaries. Use the arithmetic average.
Definition: femIntegrals.c:8707
updateAdvection_adjoint
void updateAdvection_adjoint(int nElements_global, int nQuadraturePoints_element, int nDOF_test_element, int nSpace, double *df, double *grad_w_dV, double *Lstar_w_dV)
Loop over all the elements and update the linearized adjoint applied to the weighted test functions w...
Definition: femIntegrals.c:2247
calculateGlobalExteriorElementBoundaryIntegrationWeights
void calculateGlobalExteriorElementBoundaryIntegrationWeights(int nQuadraturePoints_elementBoundary, int nExteriorElementBoundaries_global, double *sqrt_det_g, double *referenceWeights, double *weights)
Definition: femIntegrals.c:6961
updateHamiltonianJacobian_strong
void updateHamiltonianJacobian_strong(int nElements_global, int nQuadraturePoints_element, int nDOF_trial_element, int nSpace, double *dH, double *grad_v, double *dstrong_residual)
Loop over all the elements and update the Jacobian of the strong form of the residual with the advect...
Definition: femIntegrals.c:2508
updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_CSR
void updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_eb_CSR(int *elementNeighbors, int nInteriorElementBoundaries_global, int nElementBoundaries_element, int nQuadraturePoints_elementBoundary, int nDOF_test_element, int nDOF_trial_element, int *interiorElementBoundaries, int *elementBoundaryElements, int *elementBoundaryLocalElementBoundaries, int *nFreeDOF_element_r, int *freeLocal_r, int *nFreeDOF_element_u, int *freeLocal_u, int *csrRowIndeces_ru, int *csrColumnOffsets_eb_eNebN_ru, double *elementBoundaryFluxJacobian_eb, double *w_dS, double *jac)
Update the global CSR Jacobian from the element boundary flux Jacobians at interior boundaries.
Definition: femIntegrals.c:5902
parametricMaps_getPermutations
void parametricMaps_getPermutations(int nElements_global, int nElementBoundaries_element, int nElementBoundaryQuadraturePoints_elementBoundary, int nSpace_global, double *xiArray, int *permutations)
Definition: femIntegrals.c:453
updateNumericalDiffusionJacobian_lowmem
void updateNumericalDiffusionJacobian_lowmem(int nElements_global, int nQuadraturePoints_element, int nDOF_trial_element, int nDOF_test_element, int nSpace, double *numDiff, double *grad_v, double *grad_w_dV, double *jacobian_weak_residual)
Definition: femIntegrals.c:4161
f
Double f
Definition: Headers.h:64
checkGlobalElementBoundaryAndExteriorElementBoundaryArraysSame
int checkGlobalElementBoundaryAndExteriorElementBoundaryArraysSame(int nExteriorElementBoundaries_global, int nQuadraturePoints_elementBoundary, int nValuesPerQuadraturePoint, double tolerance, const int *exteriorElementBoundariesArray, const int *elementBoundaryElementsArray, const int *elementBoundaryLocalElementBoundariesArray, const double *ebq_global_val, const double *ebqe_val, int *firstBadIndex)
Definition: femIntegrals.c:10959
updateMassJacobian_weak_lowmem
void updateMassJacobian_weak_lowmem(int nElements_global, int nQuadraturePoints_element, int nDOF_trial_element, int nDOF_test_element, double *dmt, double *v, double *w_dV, double *jacobian_weak_residual)
Definition: femIntegrals.c:1785
updateGlobalJacobianFromElementJacobian_eb_CSR
void updateGlobalJacobianFromElementJacobian_eb_CSR(int *elementNeighbors, int nElements_global, int nElementBoundaries_element, int nDOF_test_element, int nDOF_trial_element, int *nFreeDOF_element_r, int *freeLocal_r, int *nFreeDOF_element_u, int *freeLocal_u, int *csrRowIndeces_ru, int *csrColumnOffsets_eb_ru, double *elementJacobian_eb, double *globalJacobian)
Update the global CSR jacobian from the element Jacobians.
Definition: femIntegrals.c:5587
updateExteriorElementBoundaryDiffusionAdjoint
void updateExteriorElementBoundaryDiffusionAdjoint(int nExteriorElementBoundaries_global, int nQuadraturePoints_elementBoundary, int nDOF_test_element, int nSpace, int *isDOFBoundary, int *exteriorElementBoundaries, int *elementBoundaryElements, int *elementBoundaryLocalElementBoundaries, double sigma, double *u, double *ub, double *n, double *a, double *grad_w, double *dS, double *residual)
Definition: femIntegrals.c:11118
updateInteriorElementBoundary_MixedForm_weakJacobian
void updateInteriorElementBoundary_MixedForm_weakJacobian(int nInteriorElementBoundaries_global, int nElementBoundaries_element, int nQuadraturePoints_elementBoundary, int nDOF_test_element, int nSpace, int *interiorElementBoundaries, int *elementBoundaryElements, int *elementBoundaryLocalElementBoundaries, double *n, double *dphi_trace_left, double *dphi_trace_right, double *v, double *w_dS, double *db, double *db_eb)
Update the element boundary flux on interior element boundaries.
Definition: femIntegrals.c:8818
updateDiffusion_adjoint_sd
void updateDiffusion_adjoint_sd(int nElements_global, int nQuadraturePoints_element, int nDOF_test_element, int nSpace, int *rowptr, int *colind, double *da, double *grad_phi, double *grad_w_dV, double *Lstar_w_dV)
Definition: femIntegrals.c:3378
updateInteriorElementBoundary_MixedForm_weak
void updateInteriorElementBoundary_MixedForm_weak(int nInteriorElementBoundaries_global, int nElementBoundaries_element, int nQuadraturePoints_elementBoundary, int nDOF_test_element, int nSpace, int *interiorElementBoundaries, int *elementBoundaryElements, int *elementBoundaryLocalElementBoundaries, double *n, double *phi_trace, double *w_dS, double *b)
Update the element boundary flux on interior element boundaries.
Definition: femIntegrals.c:8754
parametricMaps_getInverseValues
void parametricMaps_getInverseValues(int nElements_global, int nQuadraturePoints_element, int nDOF_element, int nSpace_global, double *inverseJacobian, int *l2g, double *nodeArray, double *xArray, double *xiArray)
Definition: femIntegrals.c:683
updateAdvectionJacobian_strong
void updateAdvectionJacobian_strong(int nElements_global, int nQuadraturePoints_element, int nDOF_trial_element, int nSpace, double *df, double *grad_v, double *dstrong_residual)
Loop over all the elements and update the Jacobian of the strong form of the residual with the advect...
Definition: femIntegrals.c:2190
updateGlobalExteriorElementBoundaryShockCapturingVelocity
void updateGlobalExteriorElementBoundaryShockCapturingVelocity(int nExteriorElementBoundaries_global, int nQuadraturePoints_elementBoundary, int nSpace, int *exteriorElementBoundaries, int *elementBoundaryElements, int *elementBoundaryLocalElementBoundaries, double *numDiff, double *grad_u, double *velocity)
Calculate the shock capturing flux at exterior element boundary quadrature points.
Definition: femIntegrals.c:8270
updateDiffusion_weak
void updateDiffusion_weak(int nElements_global, int nQuadraturePoints_element, int nDOF_test_element, int nSpace, double *a, double *grad_phi_X_grad_w_dV, double *weak_residual)
Loop over all the elements and update the element weak_residual with the numerical quadrature approxi...
Definition: femIntegrals.c:2634
s
Double s
Definition: Headers.h:84
calculateFiniteElementFunctionValues
void calculateFiniteElementFunctionValues(int nElements_global, int nQuadraturePoints_element, int nDOF_trial_element, int nComponents, int *l2g, double *dof, double *v, double *u)
Calculate the values of a multicomponent finite element function at the quadrature points from the de...
Definition: femIntegrals.c:6982
updateDiffusionJacobian_MixedForm_weak_sd
void updateDiffusionJacobian_MixedForm_weak_sd(int nElements_global, int nElementBoundaries_element, int nQuadraturePoints_element, int nDOF_trial_element, int nDOF_test_element, int nSpace, int *rowptr, int *colind, double *a, double *da, double *qV, double *qDV, double *qDV_eb, double *grad_w_dV, double *v, double *jacobian_weak_residual, double *jacobian_weak_residual_eb)
Definition: femIntegrals.c:10343
updateDiffusion_MixedForm_weak
void updateDiffusion_MixedForm_weak(int nElements_global, int nQuadraturePoints_element, int nDOF_test_element, int nSpace, double *a, double *qV, double *grad_w_dV, double *weak_residual)
Definition: femIntegrals.c:10137
calculateInteriorNumericalTrace_Potential
void calculateInteriorNumericalTrace_Potential(int nInteriorElementBoundaries_global, int nElementBoundaries_element, int nQuadraturePoints_elementBoundary, int *interiorElementBoundaries, int *elementBoundaryElements, int *elementBoundaryLocalElementBoundaries, double *phi, double *dphi, double *phi_trace, double *dphi_trace_left, double *dphi_trace_right)
Calculate the trace of the potential on interior element boundaries. Use the arithmetic average.
Definition: femIntegrals.c:8658
updateInteriorElementBoundaryDiffusionAdjoint
void updateInteriorElementBoundaryDiffusionAdjoint(int nInteriorElementBoundaries_global, int nElementBoundaries_element, int nQuadraturePoints_elementBoundary, int nDOF_test_element, int nSpace, int *interiorElementBoundaries, int *elementBoundaryElements, int *elementBoundaryLocalElementBoundaries, double sigma, double *u, double *n, double *a, double *grad_w, double *dS, double *residual)
Definition: femIntegrals.c:11033
updateNumericalDiffusion_lowmem
void updateNumericalDiffusion_lowmem(int nElements_global, int nQuadraturePoints_element, int nDOF_test_element, int nSpace, double *numDiff, double *grad_u, double *grad_w_dV, double *weak_residual)
Definition: femIntegrals.c:4059
parametricMaps_getJacobianValuesTrace3D
void parametricMaps_getJacobianValuesTrace3D(int nElements_global, int nElementBoundaries_element, int nQuadraturePoints_element, int nDOF_element, double *grad_psi, double *boundaryNormals, double *boundaryJacobians, int *l2g, double *nodeArray, double *jacobianInverseArray, double *metricTensorArray, double *metricTensorDeterminantSqrtArray, double *unitNormalArray)
Definition: femIntegrals.c:972
calculateConservationResidualDG
void calculateConservationResidualDG(int nElements_global, int nDOF_test_element, double *elementResidual, double *conservationResidual)
Definition: femIntegrals.c:8376
updateExteriorElementBoundaryDiffusiveVelocity
void updateExteriorElementBoundaryDiffusiveVelocity(int nExteriorElementBoundaries_global, int nElementBoundaries_element, int nQuadraturePoints_elementBoundary, int nSpace, int *exteriorElementBoundaries, int *elementBoundaryElements, int *elementBoundaryLocalElementBoundaries, double *a, double *grad_phi, double *velocity)
Calculate the diffusive flux at exterior element boundary quadrature points.
Definition: femIntegrals.c:7911
calculateFiniteElementFunctionGradientValuesGlobalExteriorTrace
void calculateFiniteElementFunctionGradientValuesGlobalExteriorTrace(int nQuadraturePoints_elementBoundary, int nDOF_trial_element, int nComponents, int nSpace, int nExteriorElementBoundaries_global, const int *exteriorElementBoundariesArray, const int *elementBoundaryElementsArray, const int *elementBoundaryLocalElementBoundariesArray, int *l2g, double *dof, double *grad_v, double *grad_u)
Definition: femIntegrals.c:7271
updateSubgridErrorJacobian
void updateSubgridErrorJacobian(int nElements_global, int nQuadraturePoints_element, int nDOF_trial_element, int nDOF_test_element, double *derror, double *Lstar_w_dV, double *jacobian_weak_residual)
Loop over all the elements and update the element Jacobian with the numerical quadrature approximatio...
Definition: femIntegrals.c:3969
parametricFiniteElementSpace_getGradientValuesTrace
void parametricFiniteElementSpace_getGradientValuesTrace(int nElements_global, int nElementBoundaries_element, int nElementBoundaryQuadraturePoints_elementBoundary, int nDOF_element, int nSpace_global, double *grad_psi, int *permutations, double *inverseJacobianArray, double *grad_vArray)
Definition: femIntegrals.c:378
calculateFiniteElementFunctionGradientValues
void calculateFiniteElementFunctionGradientValues(int nElements_global, int nQuadraturePoints_element, int nDOF_trial_element, int nComponents, int nSpace, int *l2g, double *dof, double *grad_v, double *grad_u)
Calculate the gradient values of a multicomponent finite element function at the quadrature points fr...
Definition: femIntegrals.c:7013
parametricFiniteElementSpace_getValuesGlobalExteriorTrace
void parametricFiniteElementSpace_getValuesGlobalExteriorTrace(int nElementBoundaries_element, int nElementBoundaryQuadraturePoints_elementBoundary, int nDOF_element, int nExteriorElementBoundaries_global, const int *exteriorElementBoundariesArray, const int *elementBoundaryElementsArray, const int *elementBoundaryLocalElementBoundariesArray, double *psi, double *vArray)
Definition: femIntegrals.c:283
calculateVectorScalarProduct
void calculateVectorScalarProduct(int nElements_global, int nQuadraturePoints_element, int nSpace, double *v, double *s, double *vResult)
Calculate the product of a vector and a scalar at the quadrature points.
Definition: femIntegrals.c:4220
parametricFiniteElementSpace_getValuesTrace
void parametricFiniteElementSpace_getValuesTrace(int nElements_global, int nElementBoundaries_element, int nElementBoundaryQuadraturePoints_elementBoundary, int nDOF_element, double *psi, int *permutations, double *vArray)
Definition: femIntegrals.c:259
calculateFiniteElementFunctionHessianValues
void calculateFiniteElementFunctionHessianValues(int nElements_global, int nQuadraturePoints_element, int nDOF_trial_element, int nComponents, int nSpace, int *l2g, double *dof, double *Hessian_v, double *Hessian_u)
Definition: femIntegrals.c:7045
n
Int n
Definition: Headers.h:28
updateGlobalJacobianFromGlobalExteriorElementBoundaryFluxJacobian_eb_CSR
void updateGlobalJacobianFromGlobalExteriorElementBoundaryFluxJacobian_eb_CSR(int *elementNeighbors, int nExteriorElementBoundaries_global, int nElementBoundaries_element, int nQuadraturePoints_elementBoundary, int nDOF_test_element, int nDOF_trial_element, int *exteriorElementBoundaries, int *elementBoundaryElements, int *elementBoundaryLocalElementBoundaries, int *nFreeDOF_element_r, int *freeLocal_r, int *nFreeDOF_element_u, int *freeLocal_u, int *csrRowIndeces_ru, int *csrColumnOffsets_eb_eNebN_ru, double *elementBoundaryFluxJacobian_eb, double *w_dS, double *jac)
Update the global CSR Jacobian from the element boundary flux Jacobians at exterior boundaries only d...
Definition: femIntegrals.c:6187
updateExteriorElementBoundaryFlux
void updateExteriorElementBoundaryFlux(int nExteriorElementBoundaries_global, int nElementBoundaries_element, int nQuadraturePoints_elementBoundary, int nDOF_test_element, int *exteriorElementBoundaries, int *elementBoundaryElements, int *elementBoundaryLocalElementBoundaries, double *flux, double *w_dS, double *residual)
Update the element boundary flux on exterior element boundaries.
Definition: femIntegrals.c:4327
calculateExteriorElementBoundaryStress3D
void calculateExteriorElementBoundaryStress3D(int nExteriorElementBoundaries_global, int nQuadraturePoints_elementBoundary, int *elementBoundaryMaterialTypes, int *exteriorElementBoundaries, int *elementBoundaryElements, int *elementBoundaryLocalElementBoundaries, double *p, double *mom_flux_vec_u, double *mom_flux_vec_v, double *mom_flux_vec_w, double *dS, double *n, double *F)
Definition: femIntegrals.c:4470
updateDiffusionJacobian_weak_lowmem
void updateDiffusionJacobian_weak_lowmem(int nElements_global, int nQuadraturePoints_element, int nDOF_trial_element, int nDOF_test_element, int nSpace, int *l2g, double *a, double *da, double *grad_phi, double *grad_w_dV, double *dphi, double *v, double *grad_v, double *jacobian_weak_residual)
Definition: femIntegrals.c:2890
parametricMaps_getJacobianValuesTrace1D
void parametricMaps_getJacobianValuesTrace1D(int nElements_global, int nElementBoundaries_element, int nQuadraturePoints_element, int nDOF_element, double *grad_psi, double *boundaryNormals, double *boundaryJacobians, int *l2g, double *nodeArray, double *jacobianInverseArray, double *metricTensorArray, double *metricTensorDeterminantSqrtArray, double *unitNormalArray)
Definition: femIntegrals.c:1260
calculateCFLADR2speeds
void calculateCFLADR2speeds(int nElements_global, int nQuadraturePoints_element, int nSpace, double *elementDiameter, double *dm, double *df1, double *df2, double *cfl)
Definition: femIntegrals.c:7752
updateMassJacobian_strong
void updateMassJacobian_strong(int nElements_global, int nQuadraturePoints_element, int nDOF_trial_element, double *dmt, double *v, double *dstrong_residual)
Loop over all the elements and update the Jacobian of the strong from of the residual at the quadratu...
Definition: femIntegrals.c:1873
loadBoundaryFluxIntoGlobalElementBoundaryVelocity
void loadBoundaryFluxIntoGlobalElementBoundaryVelocity(int nExteriorElementBoundaries_global, int nQuadraturePoints_elementBoundary, int nSpace, int *exteriorElementBoundaries, int *fluxElementBoundaries, double *normal, double *flux, double updateCoef, double *velocity)
Definition: femIntegrals.c:8606
calculateTensorScalarProduct
void calculateTensorScalarProduct(int nElements_global, int nQuadraturePoints_element, int nSpace, double *t, double *s, double *tResult)
Calculate the product of a tensor and scalar at the quadrature points.
Definition: femIntegrals.c:4246
updateGlobalJacobianFromElementJacobian_eb_dense
void updateGlobalJacobianFromElementJacobian_eb_dense(int *elementNeighbors, int nElements_global, int nElementBoundaries_element, int nDOF_test_element, int nDOF_trial_element, int offset_r, int stride_r, int offset_u, int stride_u, int nFreeVDOF_global, int *nFreeDOF_element_r, int *freeLocal_r, int *freeGlobal_r, int *nFreeDOF_element_u, int *freeLocal_u, int *freeGlobal_u, double *elementJacobian_eb, double *globalJacobian)
Update the global dense jacobian from the element Jacobians.
Definition: femIntegrals.c:4720
updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense_sd
void updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_dense_sd(int nExteriorElementBoundaries_global, int nQuadraturePoints_elementBoundary, int nDOF_test_element, int nDOF_trial_element, int nSpace, int *rowptr, int *colind, int offset_r, int stride_r, int offset_u, int stride_u, int nFreeVDOF_global, int *exteriorElementBoundaries, int *elementBoundaryElements, int *elementBoundaryLocalElementBoundaries, int *nFreeDOF_element_r, int *freeLocal_r, int *freeGlobal_r, int *nFreeDOF_element_u, int *freeLocal_u, int *freeGlobal_u, int *isDOFBoundary, double sigma, double *v, double *n, double *a, double *grad_w, double *dS, double *jac)
Definition: femIntegrals.c:11768
copyLeftElementBoundaryInfo
void copyLeftElementBoundaryInfo(int nElementBoundaries_element, int nElementBoundaryQuadraturePoints_elementBoundary, int nSpace_global, int nExteriorElementBoundaries_global, int nInteriorElementBoundaries_global, int *elementBoundaryElementsArray, int *elementBoundaryLocalElementBoundariesArray, int *exteriorElementBoundariesArray, int *interiorElementBoundariesArray, double *x, double *n, double *xg, double *ng)
Definition: femIntegrals.c:20
updateSubgridError
void updateSubgridError(int nElements_global, int nQuadraturePoints_element, int nDOF_test_element, double *error, double *Lstar_w_dV, double *weak_residual)
Loop over all the elements and update the element weak_residual with the numerical quadrature approxi...
Definition: femIntegrals.c:3909
copyExteriorElementBoundaryValuesToElementBoundaryValues
void copyExteriorElementBoundaryValuesToElementBoundaryValues(int nExteriorElementBoundaries_global, int nElements_global, int nElementBoundaries_element, int nQuadraturePoints_elementBoundary, int nValuesPerQuadraturePoint, const int *exteriorElementBoundaries, const int *elementBoundaryElements, const int *elementBoundaryLocalElementBoundaries, const double *ebqe_val, double *ebq_val)
copy quantity that sits only on exterior boundaries into an elementBoundary quadrature array
Definition: femIntegrals.c:10578
updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense
void updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_dense(int nInteriorElementBoundaries_global, int nElementBoundaries_element, int nQuadraturePoints_elementBoundary, int nDOF_test_element, int nDOF_trial_element, int nSpace, int offset_r, int stride_r, int offset_u, int stride_u, int nFreeVDOF_global, int *interiorElementBoundaries, int *elementBoundaryElements, int *elementBoundaryLocalElementBoundaries, int *nFreeDOF_element_r, int *freeLocal_r, int *freeGlobal_r, int *nFreeDOF_element_u, int *freeLocal_u, int *freeGlobal_u, double sigma, double *v, double *n, double *a, double *grad_w, double *dS, double *jac)
Definition: femIntegrals.c:11174
checkElementBoundaryAndExteriorElementBoundaryArraysSame
int checkElementBoundaryAndExteriorElementBoundaryArraysSame(int nElementBoundaries_element, int nExteriorElementBoundaries_global, int nQuadraturePoints_elementBoundary, int nValuesPerQuadraturePoint, double tolerance, const int *exteriorElementBoundariesArray, const int *elementBoundaryElementsArray, const int *elementBoundaryLocalElementBoundariesArray, const double *ebq_val, const double *ebqe_val, int *firstBadIndex)
Definition: femIntegrals.c:10913
femIntegrals.h
A library of functions for computing the discrete finite element formulations.
updateGlobalJacobianFromGlobalExteriorElementBoundaryFluxJacobian_CSR
void updateGlobalJacobianFromGlobalExteriorElementBoundaryFluxJacobian_CSR(int nExteriorElementBoundaries_global, int nQuadraturePoints_elementBoundary, int nDOF_test_element, int nDOF_trial_element, int *exteriorElementBoundaries, int *elementBoundaryElements, int *elementBoundaryLocalElementBoundaries, int *nFreeDOF_element_r, int *freeLocal_r, int *nFreeDOF_element_u, int *freeLocal_u, int *csrRowIndeces_ru, int *csrColumnOffsets_eb_ru, double *elementBoundaryFluxJacobian, double *w_dS, double *jac)
Update the global CSR Jacobian from the element boundary flux Jacobians at exterior boundaries.
Definition: femIntegrals.c:5845
parametricFiniteElementSpace_getGradientValuesGlobalExteriorTrace
void parametricFiniteElementSpace_getGradientValuesGlobalExteriorTrace(int nElementBoundaries_element, int nElementBoundaryQuadraturePoints_elementBoundary, int nDOF_element, int nSpace_global, int nExteriorElementBoundaries_global, const int *exteriorElementBoundariesArray, const int *elementBoundaryElementsArray, const int *elementBoundaryLocalElementBoundariesArray, double *grad_psi, double *inverseJacobianArray, double *grad_vArray)
Definition: femIntegrals.c:414
calculateFiniteElementFunctionGradientValuesTrace
void calculateFiniteElementFunctionGradientValuesTrace(int nElements_global, int nElementBoundaries_element, int nQuadraturePoints_elementBoundary, int nDOF_trial_element, int nComponents, int nSpace, int *l2g, double *dof, double *grad_v, double *grad_u)
Calculate the gradients of a multi-component finite element function at the element boundary quadratu...
Definition: femIntegrals.c:7202
updateExteriorElementBoundary_MixedForm_weakJacobian
void updateExteriorElementBoundary_MixedForm_weakJacobian(int nExteriorElementBoundaries_global, int nElementBoundaries_element, int nQuadraturePoints_elementBoundary, int nDOF_test_element, int nSpace, int *exteriorElementBoundaries, int *elementBoundaryElements, int *elementBoundaryLocalElementBoundaries, double *n, double *dphi_trace_left, double *v, double *w_dS, double *db, double *db_eb)
Update the element boundary flux on interior element boundaries.
Definition: femIntegrals.c:8988
updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_CSR_sd
void updateGlobalJacobianFromInteriorElementBoundaryDiffusionAdjoint_CSR_sd(int nInteriorElementBoundaries_global, int nElementBoundaries_element, int nQuadraturePoints_elementBoundary, int nDOF_test_element, int nDOF_trial_element, int nSpace, int *rowptr, int *colind, int offset_r, int stride_r, int offset_u, int stride_u, int nFreeVDOF_global, int *interiorElementBoundaries, int *elementBoundaryElements, int *elementBoundaryLocalElementBoundaries, int *nFreeDOF_element_r, int *freeLocal_r, int *freeGlobal_r, int *nFreeDOF_element_u, int *freeLocal_u, int *freeGlobal_u, int *csrRowIndeces_ru, int *csrColumnOffsets_eb_ru, double sigma, double *v, double *n, double *a, double *grad_w, double *dS, double *jac)
Definition: femIntegrals.c:11844
updateExteriorElementBoundaryAdvectiveVelocity
void updateExteriorElementBoundaryAdvectiveVelocity(int nExteriorElementBoundaries_global, int nElementBoundaries_element, int nQuadraturePoints_elementBoundary, int nSpace, int *exteriorElementBoundaries, int *elementBoundaryElements, int *elementBoundaryLocalElementBoundaries, double *f, double *velocity)
Update the advective flux at exterior element boundaries.
Definition: femIntegrals.c:8113
calculateWeightedShapeHessians
void calculateWeightedShapeHessians(int nElements_global, int nQuadraturePoints_element, int nDOF_test_element, int nSpace, double *dVR, double *abs_det_jac, double *Hess_w, double *Hess_w_dV)
Definition: femIntegrals.c:6501
updateInteriorElementBoundaryDiffusionAdjoint_sd
void updateInteriorElementBoundaryDiffusionAdjoint_sd(int nInteriorElementBoundaries_global, int nElementBoundaries_element, int nQuadraturePoints_elementBoundary, int nDOF_test_element, int nSpace, int *rowptr, int *colind, int *interiorElementBoundaries, int *elementBoundaryElements, int *elementBoundaryLocalElementBoundaries, double sigma, double *u, double *n, double *a, double *grad_w, double *dS, double *residual)
Definition: femIntegrals.c:11433
updateGlobalJacobianFromGlobalExteriorElementBoundaryFluxJacobian_eb_dense
void updateGlobalJacobianFromGlobalExteriorElementBoundaryFluxJacobian_eb_dense(int *elementNeighbors, int nElements_global, int nExteriorElementBoundaries_global, int nElementBoundaries_element, int nQuadraturePoints_elementBoundary, int nDOF_test_element, int nDOF_trial_element, int offset_r, int stride_r, int offset_u, int stride_u, int nFreeVDOF_global, int *exteriorElementBoundaries, int *elementBoundaryElements, int *elementBoundaryLocalElementBoundaries, int *nFreeDOF_element_r, int *freeLocal_r, int *freeGlobal_r, int *nFreeDOF_element_u, int *freeLocal_u, int *freeGlobal_u, double *elementBoundaryFluxJacobian_eb, double *w_dS, double *jac)
Update the global dense Jacobian from the element boundary flux Jacobians at exterior boundaries only...
Definition: femIntegrals.c:5399
updateDiffusionJacobian_MixedForm_weak
void updateDiffusionJacobian_MixedForm_weak(int nElements_global, int nElementBoundaries_element, int nQuadraturePoints_element, int nDOF_trial_element, int nDOF_test_element, int nSpace, double *a, double *da, double *qV, double *qDV, double *qDV_eb, double *grad_w_dV, double *v, double *jacobian_weak_residual, double *jacobian_weak_residual_eb)
Definition: femIntegrals.c:10231
updateReaction_strong
void updateReaction_strong(int nElements_global, int nQuadraturePoints_element, double *r, double *strong_residual)
Loop over all the elements and update the strong from of the residual at the quadrature points with t...
Definition: femIntegrals.c:3771
updateInteriorElementBoundaryDiffusiveVelocity_sd
void updateInteriorElementBoundaryDiffusiveVelocity_sd(int nInteriorElementBoundaries_global, int nElementBoundaries_element, int nQuadraturePoints_elementBoundary, int nSpace, int *rowptr, int *colind, int *interiorElementBoundaries, int *elementBoundaryElements, int *elementBoundaryLocalElementBoundaries, double *a, double *grad_phi, double *velocity)
Definition: femIntegrals.c:7855
updateHamiltonian_adjoint
void updateHamiltonian_adjoint(int nElements_global, int nQuadraturePoints_element, int nDOF_test_element, int nSpace, double *dH, double *grad_w_dV, double *Lstar_w_dV)
Loop over all the elements and update the linearized adjoint applied to the weighted test functions w...
Definition: femIntegrals.c:2566
v
Double v
Definition: Headers.h:95
updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_CSR_sd
void updateGlobalJacobianFromExteriorElementBoundaryDiffusionAdjoint_CSR_sd(int nExteriorElementBoundaries_global, int nQuadraturePoints_elementBoundary, int nDOF_test_element, int nDOF_trial_element, int nSpace, int *rowptr, int *colind, int offset_r, int stride_r, int offset_u, int stride_u, int nFreeVDOF_global, int *exteriorElementBoundaries, int *elementBoundaryElements, int *elementBoundaryLocalElementBoundaries, int *nFreeDOF_element_r, int *freeLocal_r, int *freeGlobal_r, int *nFreeDOF_element_u, int *freeLocal_u, int *freeGlobal_u, int *csrRowIndeces_ru, int *csrColumnOffsets_eb_ru, int *isDOFBoundary, double sigma, double *v, double *n, double *a, double *grad_w, double *dS, double *jac)
Definition: femIntegrals.c:12044
update_f_movingDomain_constantMass_q
void update_f_movingDomain_constantMass_q(int nElements_global, int nQuadraturePoints_element, int nSpace, double *xt, double *f)
Definition: femIntegrals.c:12149
calculateShape_X_weightedShapeGlobalExteriorTrace
void calculateShape_X_weightedShapeGlobalExteriorTrace(int nElementBoundaryQuadraturePoints_elementBoundary, int nDOF_trial_element, int nDOF_test_element, int nExteriorElementBoundaries_global, const int *exteriorElementBoundariesArray, const int *elementBoundaryElementsArray, const int *elementBoundaryLocalElementBoundariesArray, double *v, double *w_dS, double *v_X_w_dS)
Calcualte the tensor product of trial and test functions at the quadrature points global exterior bou...
Definition: femIntegrals.c:6850
parametricMaps_getJacobianValuesGlobalExteriorTrace1D
void parametricMaps_getJacobianValuesGlobalExteriorTrace1D(int nQuadraturePoints_element, int nDOF_element, int nExteriorElementBoundaries_global, const int *exteriorElementBoundariesArray, const int *elementBoundaryElementsArray, const int *elementBoundaryLocalElementBoundariesArray, double *grad_psi, double *boundaryNormals, double *boundaryJacobians, int *l2g, double *nodeArray, double *jacobianInverseArray, double *metricTensorArray, double *metricTensorDeterminantSqrtArray, double *unitNormalArray)
Definition: femIntegrals.c:1317
computeC0P1InterpolantDGP0
void computeC0P1InterpolantDGP0(int nElements_global, int nNodes_global, int nNodes_element, int nDOF_element, int dim_dof, const int *elementNodesArray, const int *nodeElementOffsets, const int *nodeElementsArray, const int *l2g, const double *dof, double *nodalAverage)
Definition: femIntegrals.c:10823
updateDiffusion2_strong_sd
void updateDiffusion2_strong_sd(int nElements_global, int nQuadraturePoints_element, int nSpace, int *rowptr, int *colind, double *a, double *Hess_phi, double *strong_residual)
Definition: femIntegrals.c:3441
calculateConservationFluxPWL
void calculateConservationFluxPWL(int nNodes_global, int nNodes_internal, int *nElements_node, int *nodeStarOffsets, int *nodeStarJacobianOffsets, int *internalNodes, double *starR, double *starJ, double *starU)
parametricMaps_getValuesTrace
void parametricMaps_getValuesTrace(int nElements_global, int nElementBoundaries_element, int nQuadraturePoints_element, int nDOF_element, int nSpace_global, double *psi, int *l2g, double *nodeArray, double *xArray)
Definition: femIntegrals.c:610
parametricMaps_getInverseValuesTrace
void parametricMaps_getInverseValuesTrace(int nElements_global, int nElementBoundaries_element, int nElementBoundaryQuadraturePoints_elementBoundary, int nDOF_element, int nSpace_global, double *inverseJacobian, int *l2g, double *nodeArray, double *xArray, double *xiArray)
Definition: femIntegrals.c:722
updateDiffusion_adjoint
void updateDiffusion_adjoint(int nElements_global, int nQuadraturePoints_element, int nDOF_test_element, int nSpace, double *da, double *grad_phi, double *grad_w_dV, double *Lstar_w_dV)
Loop over all the elements and update the linearized adjoint applied to the weighted test function wi...
Definition: femIntegrals.c:3344
updateDiffusionJacobian2_strong_sd
void updateDiffusionJacobian2_strong_sd(int nElements_global, int nQuadraturePoints_element, int nDOF_trial_element, int nSpace, int *rowptr, int *colind, int *l2g, double *a, double *da, double *v, double *Hess_phi, double *dphi, double *Hess_v, double *dstrong_residual)
Definition: femIntegrals.c:3525
calculateConservationResidualPWL
void calculateConservationResidualPWL(int nElements_global, int nInteriorElementBoundaries_global, int nExteriorElementBoundaries_global, int nElementBoundaries_element, int nQuadraturePoints_elementBoundary, int nNodes_element, int nSpace, int *interiorElementBoundaries, int *exteriorElementBoundaries, int *elementBoundaryElements, int *elementBoundaryLocalElementBoundaries, int *elementNodes, int *nodeStarElements, int *nodeStarElementNeighbors, int *nodeStarOffsets, int *nElements_node, double *elementResidual, double *vAverage, double *starU, double *dX, double *w, double *normal, double *conservationResidual, double *starR, double *vConservative, double *vConservative_element)
T
Double T
Definition: Headers.h:87
updatePotential_MixedForm_weakJacobian
void updatePotential_MixedForm_weakJacobian(int nElements_global, int nQuadraturePoints_element, int nDOF_test_element, int nSpace, double *dphi, double *v, double *grad_w_dV, double *db)
Definition: femIntegrals.c:9103
updateGlobalJacobianFromGlobalExteriorElementBoundaryFluxJacobian_dense
void updateGlobalJacobianFromGlobalExteriorElementBoundaryFluxJacobian_dense(int nExteriorElementBoundaries_global, int nQuadraturePoints_elementBoundary, int nDOF_test_element, int nDOF_trial_element, int offset_r, int stride_r, int offset_u, int stride_u, int nFreeVDOF_global, int *exteriorElementBoundaries, int *elementBoundaryElements, int *elementBoundaryLocalElementBoundaries, int *nFreeDOF_element_r, int *freeLocal_r, int *freeGlobal_r, int *nFreeDOF_element_u, int *freeLocal_u, int *freeGlobal_u, double *elementBoundaryFluxJacobian, double *w_dS, double *jac)
Update the global dense Jacobian from the element boundary flux Jacobians at exterior boundaries.
Definition: femIntegrals.c:5486
updateDiffusionJacobian2_strong
void updateDiffusionJacobian2_strong(int nElements_global, int nQuadraturePoints_element, int nDOF_trial_element, int nSpace, int *l2g, double *a, double *da, double *v, double *Hess_phi, double *dphi, double *Hess_v, double *dstrong_residual)
Definition: femIntegrals.c:3470
calculateFiniteElementFunctionValuesTrace
void calculateFiniteElementFunctionValuesTrace(int nElements_global, int nElementBoundaries_element, int nQuadraturePoints_elementBoundary, int nDOF_trial_element, int nComponents, int *l2g, double *dof, double *v, double *u)
Calculate the values of a multi-component finite element function at element boundary quadrature poin...
Definition: femIntegrals.c:7167
calculateElementBoundaryIntegrationWeights
void calculateElementBoundaryIntegrationWeights(int nElements_global, int nElementBoundaries_element, int nQuadraturePoints_elementBoundary, double *sqrt_det_g, double *referenceWeights, double *weights)
Definition: femIntegrals.c:6939
parametricFiniteElementSpace_getGradientValues
void parametricFiniteElementSpace_getGradientValues(int nElements_global, int nQuadraturePoints_element, int nDOF_element, int nSpace_global, double *grad_psi, double *inverseJacobianArray, double *grad_vArray)
Definition: femIntegrals.c:311
z
Double * z
Definition: Headers.h:49
updateReaction_adjoint
void updateReaction_adjoint(int nElements_global, int nQuadraturePoints_element, int nDOF_test_element, double *dr, double *w_dV, double *Lstar_w_dV)
Loop over all the elements and update the linearized adjoint, applied to the weighted test functions,...
Definition: femIntegrals.c:3852
updateDiffusionJacobian_strong
void updateDiffusionJacobian_strong(int nElements_global, int nQuadraturePoints_element, int nDOF_trial_element, int nSpace, int *l2g, double *da, double *dphi, double *grad_phi, double *grad_u, double *grad_v, double *dstrong_residual)
Loop over all the elements and update the strong form of the residual with the diffusion term at the ...
Definition: femIntegrals.c:3207
updateAdvection_strong
void updateAdvection_strong(int nElements_global, int nQuadraturePoints_element, int nSpace, double *df, double *grad_u, double *strong_residual)
Loop over all the elements and update the strong form of the residual with the advection term.
Definition: femIntegrals.c:2143
updateNumericalDiffusion
void updateNumericalDiffusion(int nElements_global, int nQuadraturePoints_element, int nDOF_test_element, int nSpace, double *numDiff, double *grad_u_X_grad_w_dV, double *weak_residual)
Loop over all the elements and update the element weak_residual with the numerical quadrature approxi...
Definition: femIntegrals.c:4034
parametricMaps_getJacobianValues1D
void parametricMaps_getJacobianValues1D(int nElements_global, int nQuadraturePoints_element, int nDOF_element, double *grad_psi, int *l2g, double *nodeArray, double *jacobianArray, double *jacobianDeterminantArray, double *jacobianInverseArray)
Definition: femIntegrals.c:928
getPermutationsGlobal
void getPermutationsGlobal(int nElementBoundaries_global, int nElementBoundaryQuadraturePoints_elementBoundary, double *xArray, double *xArrayNew, int *permutations)
Definition: femIntegrals.c:542
u
Double u
Definition: Headers.h:89
updateDiffusionJacobian_strong_sd
void updateDiffusionJacobian_strong_sd(int nElements_global, int nQuadraturePoints_element, int nDOF_trial_element, int nSpace, int *rowptr, int *colind, int *l2g, double *da, double *dphi, double *grad_phi, double *grad_u, double *grad_v, double *dstrong_residual)
Definition: femIntegrals.c:3258
c
Double c
Definition: Headers.h:54
updateMass_adjoint
void updateMass_adjoint(int nElements_global, int nQuadraturePoints_element, int nDOF_test_element, double *dmt, double *w_dV, double *Lstar_w_dV)
Loop over all the elements and update the linearized adjoint, applied to the weighted test functions,...
Definition: femIntegrals.c:1921
updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_dense
void updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_dense(int nInteriorElementBoundaries_global, int nElementBoundaries_element, int nQuadraturePoints_elementBoundary, int nDOF_test_element, int nDOF_trial_element, int offset_r, int stride_r, int offset_u, int stride_u, int nFreeVDOF_global, int *interiorElementBoundaries, int *elementBoundaryElements, int *elementBoundaryLocalElementBoundaries, int *nFreeDOF_element_r, int *freeLocal_r, int *freeGlobal_r, int *nFreeDOF_element_u, int *freeLocal_u, int *freeGlobal_u, double *elementBoundaryFluxJacobian, double *w_dS, double *jac)
Update the global dense Jacobian from the element boundary flux Jacobians at interior boundaries.
Definition: femIntegrals.c:4778
fluxDomainBoundaryIntegralFromVector
double fluxDomainBoundaryIntegralFromVector(int nExteriorElementBoundaries, int nElementBoundaries_owned, int nQuadraturePoints_elementBoundary, int nSpace, int *flag, int *exteriorElementBoundaries, double *dS, double *nValueArray, double *normal)
Definition: femIntegrals.c:10756
updateGlobalExteriorElementBoundaryAdvectiveVelocity
void updateGlobalExteriorElementBoundaryAdvectiveVelocity(int nExteriorElementBoundaries_global, int nQuadraturePoints_elementBoundary, int nSpace, int *exteriorElementBoundaries, int *elementBoundaryElements, int *elementBoundaryLocalElementBoundaries, double *f, double *velocity)
Update the advective flux at exterior element boundaries.
Definition: femIntegrals.c:8147
calculateExteriorElementBoundaryAverageVelocity
void calculateExteriorElementBoundaryAverageVelocity(int nExteriorElementBoundaries_global, int nElementBoundaries_element, int nQuadraturePoints_elementBoundary, int nSpace, int *exteriorElementBoundaries, int *elementBoundaryElements, int *elementBoundaryLocalElementBoundaries, double *v, double *vAverage)
Definition: femIntegrals.c:8334
projectFromNodalInterpolationConditions
void projectFromNodalInterpolationConditions(int nElements_global, int nDOF_element, int dim_dof, const int *l2g, const int *functional_map_element, const double *interpolationValues, double *dofs)
Definition: femIntegrals.c:12477
updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_CSR
void updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_2sided_CSR(int nInteriorElementBoundaries_global, int nElementBoundaries_element, int nQuadraturePoints_elementBoundary, int nDOF_test_element, int nDOF_trial_element, int *interiorElementBoundaries, int *elementBoundaryElements, int *elementBoundaryLocalElementBoundaries, int *nFreeDOF_element_r, int *freeLocal_r, int *nFreeDOF_element_u, int *freeLocal_u, int *csrRowIndeces_ru, int *csrColumnOffsets_eb_ru, double *elementBoundaryFluxJacobian_2sided, double *w_dS, double *jac)
Update the global CSR Jacobian from the element boundary two-sided Hamiltonian flux Jacobians at inte...
Definition: femIntegrals.c:6265
parametricMaps_getJacobianValues3D
void parametricMaps_getJacobianValues3D(int nElements_global, int nQuadraturePoints_element, int nDOF_element, double *grad_psi, int *l2g, double *nodeArray, double *jacobianArray, double *jacobianDeterminantArray, double *jacobianInverseArray)
Definition: femIntegrals.c:814
calculateCFLADR
void calculateCFLADR(int nElements_global, int nQuadraturePoints_element, int nSpace, double *elementDiameter, double *dm, double *df, double *cfl)
Definition: femIntegrals.c:7716
copyExteriorElementBoundaryValuesFromGlobalElementBoundaryValues
void copyExteriorElementBoundaryValuesFromGlobalElementBoundaryValues(int nExteriorElementBoundaries_global, int nQuadraturePoints_elementBoundary, int nValuesPerQuadraturePoint, const int *exteriorElementBoundaries, const int *elementBoundaryElements, const int *elementBoundaryLocalElementBoundaries, const double *ebq_global_val, double *ebqe_val)
copy quantity that sits only on exterior boundaries from a global elementBoundary quadrature array
Definition: femIntegrals.c:10641
updateAdvectionJacobian_weak
void updateAdvectionJacobian_weak(int nElements_global, int nQuadraturePoints_element, int nDOF_trial_element, int nDOF_test_element, int nSpace, double *df, double *v_X_grad_w_dV, double *jacobian_weak_residual)
Loop over all the elements and update the element Jacobian with the numerical quadrature approximatio...
Definition: femIntegrals.c:2055
updateAdvection_weak
void updateAdvection_weak(int nElements_global, int nQuadraturePoints_element, int nDOF_test_element, int nSpace, double *f, double *grad_w_dV, double *weak_residual)
Loop over all the elements and update the element weak_residual with the numerical quadrature approxi...
Definition: femIntegrals.c:1985
updateDiffusion_weak_lowmem
void updateDiffusion_weak_lowmem(int nElements_global, int nQuadraturePoints_element, int nDOF_test_element, int nSpace, double *a, double *grad_phi, double *grad_w_dV, double *weak_residual)
Definition: femIntegrals.c:2662
calculateFiniteElementFunctionValuesGlobalExteriorTrace
void calculateFiniteElementFunctionValuesGlobalExteriorTrace(int nQuadraturePoints_elementBoundary, int nDOF_trial_element, int nComponents, int nExteriorElementBoundaries_global, const int *exteriorElementBoundariesArray, const int *elementBoundaryElementsArray, const int *elementBoundaryLocalElementBoundariesArray, int *l2g, double *dof, double *v, double *u)
Definition: femIntegrals.c:7236
calculateVelocityQuadrature_MixedForm2_sd
void calculateVelocityQuadrature_MixedForm2_sd(int nElements_global, int nElementBoundaries_element, int nElementBoundaryQuadraturePoints_elementBoundary, int nDOF_element, int nSpace, int nQuadraturePoints_element, const int *rowptr, const int *colind, double *qa, double *qw_dV, double *b, double *v, double *V, double *qv, double *qV)
Definition: femIntegrals.c:9312
updateMassJacobian_weak
void updateMassJacobian_weak(int nElements_global, int nQuadraturePoints_element, int nDOF_trial_element, int nDOF_test_element, double *dmt, double *v_X_w_dV, double *jacobian_weak_residual)
Loop over all the elements and update the element Jacobian with the numerical quadrature approximatio...
Definition: femIntegrals.c:1759
parametricMaps_getJacobianValuesGlobalExteriorTrace3D
void parametricMaps_getJacobianValuesGlobalExteriorTrace3D(int nQuadraturePoints_element, int nDOF_element, int nExteriorElementBoundaries_global, const int *exteriorElementBoundariesArray, const int *elementBoundaryElementsArray, const int *elementBoundaryLocalElementBoundariesArray, double *grad_psi, double *boundaryNormals, double *boundaryJacobians, int *l2g, double *nodeArray, double *jacobianInverseArray, double *metricTensorArray, double *metricTensorDeterminantSqrtArray, double *unitNormalArray)
Definition: femIntegrals.c:1542
calculateWeightedShape
void calculateWeightedShape(int nElements_global, int nQuadraturePoints_element, int nDOF_test_element, double *dVR, double *abs_det_jac, double *w, double *w_dV)
Weight the test function with the integration weights.
Definition: femIntegrals.c:6413
calculateFlowVelocity
void calculateFlowVelocity(int nElements_global, int nQuadraturePoints_element, int nSpace, double *f, double *a, double *grad_phi, double *v)
Calculate the total (advective + diffusive) flow velocity.
Definition: femIntegrals.c:7314
updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_CSR
void updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_CSR(int nExteriorElementBoundaries_global, int nElementBoundaries_element, int nQuadraturePoints_elementBoundary, int nDOF_test_element, int nDOF_trial_element, int *exteriorElementBoundaries, int *elementBoundaryElements, int *elementBoundaryLocalElementBoundaries, int *nFreeDOF_element_r, int *freeLocal_r, int *nFreeDOF_element_u, int *freeLocal_u, int *csrRowIndeces_ru, int *csrColumnOffsets_eb_ru, double *elementBoundaryFluxJacobian, double *w_dS, double *jac)
Update the global CSR Jacobian from the element boundary flux Jacobians at exterior boundaries.
Definition: femIntegrals.c:5785
updateStress_weak
void updateStress_weak(int nElements_global, int nQuadraturePoints_element, int nDOF_test_element, int nSpace, double *sigma, double *grad_w_dV, double *weak_residual_x, double *weak_residual_y, double *weak_residual_z)
Definition: femIntegrals.c:12219
updateInteriorElementBoundaryFlux
void updateInteriorElementBoundaryFlux(int nInteriorElementBoundaries_global, int nElementBoundaries_element, int nQuadraturePoints_elementBoundary, int nDOF_test_element, int *interiorElementBoundaries, int *elementBoundaryElements, int *elementBoundaryLocalElementBoundaries, double *flux, double *w_dS, double *residual)
Update the element boundary flux on interior element boundaries.
Definition: femIntegrals.c:4280
updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_CSR
void updateGlobalJacobianFromInteriorElementBoundaryFluxJacobian_CSR(int nInteriorElementBoundaries_global, int nElementBoundaries_element, int nQuadraturePoints_elementBoundary, int nDOF_test_element, int nDOF_trial_element, int *interiorElementBoundaries, int *elementBoundaryElements, int *elementBoundaryLocalElementBoundaries, int *nFreeDOF_element_r, int *freeLocal_r, int *nFreeDOF_element_u, int *freeLocal_u, int *csrRowIndeces_ru, int *csrColumnOffsets_eb_ru, double *elementBoundaryFluxJacobian, double *w_dS, double *jac)
Update the global CSR Jacobian from the element boundary flux Jacobians at interior boundaries.
Definition: femIntegrals.c:5643
calculateVelocityQuadrature_MixedForm2_Jacobian_sd
void calculateVelocityQuadrature_MixedForm2_Jacobian_sd(int nElements_global, int nElementBoundaries_element, int nElementBoundaryQuadraturePoints_elementBoundary, int nDOF_element, int nSpace, int nQuadraturePoints_element, const int *rowptr, const int *colind, double *qa, double *qw_dV, double *db, double *db_eb, double *v, double *DV, double *DV_eb, double *qv, double *qDV, double *qDV_eb)
Definition: femIntegrals.c:9911
estimate_mt
void estimate_mt(int nElements_global, int nQuadraturePoints_element, int nDOF_element, double *v, double *vXw_dV, double *elementSpatialResidual, double *mt)
Definition: femIntegrals.c:10454
parametricMaps_getJacobianValues2D
void parametricMaps_getJacobianValues2D(int nElements_global, int nQuadraturePoints_element, int nDOF_element, double *grad_psi, int *l2g, double *nodeArray, double *jacobianArray, double *jacobianDeterminantArray, double *jacobianInverseArray)
Definition: femIntegrals.c:877
copyGlobalElementBoundaryVelocityToElementBoundary
void copyGlobalElementBoundaryVelocityToElementBoundary(int nElements_global, int nInteriorElementBoundaries_global, int nExteriorElementBoundaries_global, int nElementBoundaries_global, int nElementBoundaries_element, int nQuadraturePoints_elementBoundary, int nSpace, int *interiorElementBoundaries, int *exteriorElementBoundaries, int *elementBoundaryElementsArray, int *elementBoundaryLocalElementBoundariesArray, double *velocityBoundary_global, double *velocityBoundary_element)
Definition: femIntegrals.c:8542
calculateInteriorElementBoundaryAverageVelocity
void calculateInteriorElementBoundaryAverageVelocity(int nInteriorElementBoundaries_global, int nElementBoundaries_element, int nQuadraturePoints_elementBoundary, int nSpace, int *interiorElementBoundaries, int *elementBoundaryElements, int *elementBoundaryLocalElementBoundaries, double *v, double *vAverage)
Definition: femIntegrals.c:8299
scalarSmoothedHeavisideDomainIntegral
double scalarSmoothedHeavisideDomainIntegral(int nElements, int nQuadraturePoints_element, double epsFact, double *elementDiameter, double *dV, double *nValueArray)
Definition: femIntegrals.c:10702
calculateConservationResidualGlobalBoundaries
void calculateConservationResidualGlobalBoundaries(int nElements_global, int nInteriorElementBoundaries_global, int nExteriorElementBoundaries_global, int nElementBoundaries_element, int nQuadraturePoints_elementBoundary, int nNodes_element, int nSpace, int *interiorElementBoundaries, int *exteriorElementBoundaries, int *elementBoundaryElements, int *elementBoundaryLocalElementBoundaries, double *dS, double *normal, double *elementResidual, double *velocity, double *conservationResidual)
updateHamiltonian_strong
void updateHamiltonian_strong(int nElements_global, int nQuadraturePoints_element, int nSpace, double *dH, double *grad_u, double *strong_residual)
Loop over all the elements and update the strong form of the residual with the advection term.
Definition: femIntegrals.c:2462
updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_dense
void updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_dense(int *elementNeighbors, int nElements_global, int nExteriorElementBoundaries_global, int nElementBoundaries_element, int nQuadraturePoints_elementBoundary, int nDOF_test_element, int nDOF_trial_element, int offset_r, int stride_r, int offset_u, int stride_u, int nFreeVDOF_global, int *exteriorElementBoundaries, int *elementBoundaryElements, int *elementBoundaryLocalElementBoundaries, int *nFreeDOF_element_r, int *freeLocal_r, int *freeGlobal_r, int *nFreeDOF_element_u, int *freeLocal_u, int *freeGlobal_u, double *elementBoundaryFluxJacobian_eb, double *w_dS, double *jac)
Update the global dense Jacobian from the element boundary flux Jacobians at exterior boundaries.
Definition: femIntegrals.c:5309
calculateWeightedShapeGradients
void calculateWeightedShapeGradients(int nElements_global, int nQuadraturePoints_element, int nDOF_test_element, int nSpace, double *dVR, double *abs_det_jac, double *grad_w, double *grad_w_dV)
Weight the test function with the integration weights.
Definition: femIntegrals.c:6442
updatePotential_MixedForm_weak
void updatePotential_MixedForm_weak(int nElements_global, int nQuadraturePoints_element, int nDOF_test_element, int nSpace, double *phi, double *grad_w_dV, double *b)
Definition: femIntegrals.c:9040
calculateDimensionlessNumbersADR_sd
void calculateDimensionlessNumbersADR_sd(int nElements_global, int nQuadraturePoints_element, int nSpace, int computeDiffusiveTimeStepLimit, int *rowptr, int *colind, double *elementDiameter, double *df, double *a, double *dphi, double *dr, double *dmt, double *pe, double *cfl)
Definition: femIntegrals.c:7647
updateStressJacobian_weak
void updateStressJacobian_weak(int nElements_global, int nQuadraturePoints_element, int nDOF_trial_element, int nDOF_test_element, int nSpace, double *dsigma_xx, double *dsigma_xy, double *dsigma_xz, double *dsigma_yx, double *dsigma_yy, double *dsigma_yz, double *dsigma_zx, double *dsigma_zy, double *dsigma_zz, double *grad_v, double *grad_w_dV, double *jacobian_weak_residual_xx, double *jacobian_weak_residual_xy, double *jacobian_weak_residual_xz, double *jacobian_weak_residual_yx, double *jacobian_weak_residual_yy, double *jacobian_weak_residual_yz, double *jacobian_weak_residual_zx, double *jacobian_weak_residual_zy, double *jacobian_weak_residual_zz)
Definition: femIntegrals.c:12274
updateAddJacobian_CSR
void updateAddJacobian_CSR(int jacIndex, double val, double *jac)
Update a single element of the Jacobian.
Definition: femIntegrals.c:7353
update_f_movingDomain_constantMass_ebq
void update_f_movingDomain_constantMass_ebq(int nElements_global, int nElementBoundaries_element, int nQuadraturePoints_elementBoundary, int nSpace, double *xt, double *f)
Definition: femIntegrals.c:12196
scalarHeavisideDomainIntegral
double scalarHeavisideDomainIntegral(int nElements, int nQuadraturePoints_element, double *dV, double *nValueArray)
Definition: femIntegrals.c:10684
calculateGradShape_X_weightedGradShape
void calculateGradShape_X_weightedGradShape(int nElements_global, int nQuadraturePoints_element, int nDOF_trial_element, int nDOF_test_element, int nSpace, double *grad_v, double *grad_w_dV, double *grad_v_X_grad_w_dV)
Calculate the tensor product of trial function gradients and test function gradients at the quadratur...
Definition: femIntegrals.c:6635
calculateShape_X_weightedGradShape
void calculateShape_X_weightedGradShape(int nElements_global, int nQuadraturePoints_element, int nDOF_trial_element, int nDOF_test_element, int nSpace, double *v, double *grad_w_dV, double *v_X_grad_w_dV)
Calculate the tensor product of trial functions and test function gradients at the quadrature points.
Definition: femIntegrals.c:6567
updateGlobalJacobianFromElementJacobian_CSR
void updateGlobalJacobianFromElementJacobian_CSR(int nElements_global, int nDOF_test_element, int nDOF_trial_element, int *nFreeDOF_element_r, int *freeLocal_r, int *nFreeDOF_element_u, int *freeLocal_u, int *csrRowIndeces_ru, int *csrColumnOffsets_ru, double *elementJacobian, double *globalJacobian)
Update the global CSR jacobian from the element Jacobians.
Definition: femIntegrals.c:5547
updateExteriorElementBoundaryDiffusiveVelocity_sd
void updateExteriorElementBoundaryDiffusiveVelocity_sd(int nExteriorElementBoundaries_global, int nElementBoundaries_element, int nQuadraturePoints_elementBoundary, int nSpace, int *rowptr, int *colind, int *exteriorElementBoundaries, int *elementBoundaryElements, int *elementBoundaryLocalElementBoundaries, double *a, double *grad_phi, double *velocity)
Definition: femIntegrals.c:7951
updateDiffusion_strong
void updateDiffusion_strong(int nElements_global, int nQuadraturePoints_element, int nSpace, double *da, double *grad_phi, double *grad_u, double *strong_residual)
Loop over all the elements and update the strong form of the residual with the diffusion term at the ...
Definition: femIntegrals.c:3125
update_f_movingDomain_q
void update_f_movingDomain_q(int nElements_global, int nQuadraturePoints_element, int nSpace, double *xt, double *m, double *f)
Definition: femIntegrals.c:12126
computeC0P1InterpolantDGP12
void computeC0P1InterpolantDGP12(int nElements_global, int nNodes_global, int nNodes_element, int nDOF_element, int dim_dof, const int *elementNodesArray, const int *nodeElementOffsets, const int *nodeElementsArray, const int *l2g, const double *dof, double *nodalAverage)
Definition: femIntegrals.c:10789
updateInteriorElementBoundaryDiffusiveVelocity
void updateInteriorElementBoundaryDiffusiveVelocity(int nInteriorElementBoundaries_global, int nElementBoundaries_element, int nQuadraturePoints_elementBoundary, int nSpace, int *interiorElementBoundaries, int *elementBoundaryElements, int *elementBoundaryLocalElementBoundaries, double *a, double *grad_phi, double *velocity)
Calculate the diffusive flux at interior element boundary quadrature points.
Definition: femIntegrals.c:7802
updateDiffusionJacobian_weak_sd
void updateDiffusionJacobian_weak_sd(int nElements_global, int nQuadraturePoints_element, int nDOF_trial_element, int nDOF_test_element, int nSpace, int *rowptr, int *colind, int *l2g, double *a, double *da, double *grad_phi, double *grad_w_dV, double *dphi, double *v, double *grad_v, double *jacobian_weak_residual)
Definition: femIntegrals.c:3023
parametricMaps_getValuesGlobalExteriorTrace
void parametricMaps_getValuesGlobalExteriorTrace(int nQuadraturePoints_elementBoundary, int nDOF_element, int nSpace_global, int nExteriorElementBoundaries_global, const int *exteriorElementBoundariesArray, const int *elementBoundaryElementsArray, const int *elementBoundaryLocalElementBoundariesArray, double *psi, int *l2g, double *nodeArray, double *xArray)
Definition: femIntegrals.c:644
updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_CSR
void updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_eb_CSR(int *elementNeighbors, int nExteriorElementBoundaries_global, int nElementBoundaries_element, int nQuadraturePoints_elementBoundary, int nDOF_test_element, int nDOF_trial_element, int *exteriorElementBoundaries, int *elementBoundaryElements, int *elementBoundaryLocalElementBoundaries, int *nFreeDOF_element_r, int *freeLocal_r, int *nFreeDOF_element_u, int *freeLocal_u, int *csrRowIndeces_ru, int *csrColumnOffsets_eb_eNebN_ru, double *elementBoundaryFluxJacobian_eb, double *w_dS, double *jac)
Update the global CSR Jacobian from the element boundary flux Jacobians at exterior boundaries.
Definition: femIntegrals.c:6106
updateGlobalExteriorElementBoundaryDiffusiveVelocity
void updateGlobalExteriorElementBoundaryDiffusiveVelocity(int nExteriorElementBoundaries_global, int nQuadraturePoints_elementBoundary, int nSpace, int *exteriorElementBoundaries, int *elementBoundaryElements, int *elementBoundaryLocalElementBoundaries, double *a, double *grad_phi, double *velocity)
Calculate the diffusive flux at exterior element boundary quadrature points.
Definition: femIntegrals.c:7995
updateHamiltonianJacobian_weak
void updateHamiltonianJacobian_weak(int nElements_global, int nQuadraturePoints_element, int nDOF_trial_element, int nDOF_test_element, int nSpace, double *dH, double *grad_v_X_w_dV, double *jacobian_weak_residual)
Loop over all the elements and update the element Jacobian with the numerical quadrature approximatio...
Definition: femIntegrals.c:2372
updateMass_strong
void updateMass_strong(int nElements_global, int nQuadraturePoints_element, double *mt, double *strong_residual)
Loop over all the elements and update the strong from of the residual at the quadrature points with t...
Definition: femIntegrals.c:1834
r
Double r
Definition: Headers.h:83
scalarDomainIntegral
double scalarDomainIntegral(int nElements, int nQuadraturePoints_element, double *dV, double *nValueArray)
Definition: femIntegrals.c:10668
calculateExteriorElementBoundaryVelocities
void calculateExteriorElementBoundaryVelocities(int nExteriorElementBoundaries_global, int nElementBoundaries_element, int nQuadraturePoints_elementBoundary, int nSpace, int *exteriorElementBoundaries, int *elementBoundaryElements, int *elementBoundaryLocalElementBoundaries, double *m, double *a, double *grad_phi, double *f, double *vAverage, double *vJump, double *mAverage, double *mJump)
Definition: femIntegrals.c:7461
updateDiffusion_MixedForm_weak_sd
void updateDiffusion_MixedForm_weak_sd(int nElements_global, int nQuadraturePoints_element, int nDOF_test_element, int nSpace, int rho_split, int *rowptr, int *colind, double *a, double *qV, double *grad_w_dV, double *velocity, double *weak_residual)
Definition: femIntegrals.c:10169
updateGlobalExteriorElementBoundaryFlux
void updateGlobalExteriorElementBoundaryFlux(int nExteriorElementBoundaries_global, int nQuadraturePoints_elementBoundary, int nDOF_test_element, int *exteriorElementBoundaries, int *elementBoundaryElements, int *elementBoundaryLocalElementBoundaries, double *flux, double *w_dS, double *residual)
Definition: femIntegrals.c:4361
updateMass_weak
void updateMass_weak(int nElements_global, int nQuadraturePoints_element, int nDOF_test_element, double *mt, double *w_dV, double *weak_residual)
Loop over all the elements and update the element weak_residual with the numerical quadrature approxi...
Definition: femIntegrals.c:1698
calculateShape_X_weightedShapeTrace
void calculateShape_X_weightedShapeTrace(int nElements_global, int nElementBoundaries_element, int nElementBoundaryQuadraturePoints_elementBoundary, int nDOF_trial_element, int nDOF_test_element, double *v, double *w_dS, double *v_X_w_dS)
Calcualte the tensor product of trial and test functions at the quadrature points.
Definition: femIntegrals.c:6740
parametricFiniteElementSpace_getHessianValues
void parametricFiniteElementSpace_getHessianValues(int nElements_global, int nQuadraturePoints_element, int nDOF_element, int nSpace_global, double *Hessian_psi, double *inverseJacobianArray, double *Hessian_vArray)
Definition: femIntegrals.c:340
copyFreeUnknownsToGlobalUnknowns
void copyFreeUnknownsToGlobalUnknowns(int nDOF2set, int offset, int stride, const int *globalDOFids, const int *freeDOFids, const double *free_u, double *u)
Definition: femIntegrals.c:10999
updateDiffusionJacobian_weak
void updateDiffusionJacobian_weak(int nElements_global, int nQuadraturePoints_element, int nDOF_trial_element, int nDOF_test_element, int nSpace, int *l2g, double *a, double *da, double *grad_phi_X_grad_w_dV, double *dphi, double *v, double *grad_v_X_grad_w_dV, double *jacobian_weak_residual)
Loop over all the elements and update the element Jacobian with the numerical quadrature approximatio...
Definition: femIntegrals.c:2819
pos
double pos(double a)
Definition: testFMMandFSW.cpp:8
updateExteriorElementBoundaryDiffusionAdjoint_sd
void updateExteriorElementBoundaryDiffusionAdjoint_sd(int nExteriorElementBoundaries_global, int nQuadraturePoints_elementBoundary, int nDOF_test_element, int nSpace, int *rowptr, int *colind, int *isDOFBoundary, int *exteriorElementBoundaries, int *elementBoundaryElements, int *elementBoundaryLocalElementBoundaries, double sigma, double *u, double *ub, double *n, double *a, double *grad_w, double *dS, double *residual)
Definition: femIntegrals.c:11520
updateAdvectionJacobian_weak_lowmem
void updateAdvectionJacobian_weak_lowmem(int nElements_global, int nQuadraturePoints_element, int nDOF_trial_element, int nDOF_test_element, int nSpace, double *df, double *v, double *grad_w_dV, double *jacobian_weak_residual)
Definition: femIntegrals.c:2085
updateReactionJacobian_weak
void updateReactionJacobian_weak(int nElements_global, int nQuadraturePoints_element, int nDOF_trial_element, int nDOF_test_element, double *dr, double *v_X_w_dV, double *jacobian_weak_residual)
Loop over all the elements and update the element Jacobian with the numerical quadrature approximatio...
Definition: femIntegrals.c:3729
updateHamiltonianJacobian_weak_lowmem
void updateHamiltonianJacobian_weak_lowmem(int nElements_global, int nQuadraturePoints_element, int nDOF_trial_element, int nDOF_test_element, int nSpace, double *dH, double *grad_v, double *w_dV, double *jacobian_weak_residual)
Definition: femIntegrals.c:2402
copyExteriorElementBoundaryValuesToGlobalElementBoundaryValues
void copyExteriorElementBoundaryValuesToGlobalElementBoundaryValues(int nExteriorElementBoundaries_global, int nQuadraturePoints_elementBoundary, int nValuesPerQuadraturePoint, const int *exteriorElementBoundaries, const int *elementBoundaryElements, const int *elementBoundaryLocalElementBoundaries, const double *ebqe_val, double *ebq_global_val)
copy quantity that sits only on exterior boundaries into a global elementBoundary quadrature array
Definition: femIntegrals.c:10611
updateExteriorElementBoundary_MixedForm_weak
void updateExteriorElementBoundary_MixedForm_weak(int nExteriorElementBoundaries_global, int nElementBoundaries_element, int nQuadraturePoints_elementBoundary, int nDOF_test_element, int nSpace, int *exteriorElementBoundaries, int *elementBoundaryElements, int *elementBoundaryLocalElementBoundaries, double *n, double *phi_trace, double *w_dS, double *b)
Update the element boundary flux on exterior element boundaries.
Definition: femIntegrals.c:8944
updateInteriorElementBoundaryAdvectiveVelocity
void updateInteriorElementBoundaryAdvectiveVelocity(int nInteriorElementBoundaries_global, int nElementBoundaries_element, int nQuadraturePoints_elementBoundary, int nSpace, int *interiorElementBoundaries, int *elementBoundaryElements, int *elementBoundaryLocalElementBoundaries, double *f, double *velocity)
Calculate the advective flux at at interior element boundaries.
Definition: femIntegrals.c:8066
updateInteriorTwoSidedElementBoundaryFlux
void updateInteriorTwoSidedElementBoundaryFlux(int nInteriorElementBoundaries_global, int nElementBoundaries_element, int nQuadraturePoints_elementBoundary, int nDOF_test_element, int *interiorElementBoundaries, int *elementBoundaryElements, int *elementBoundaryLocalElementBoundaries, double *flux, double *w_dS, double *residual)
Update a two-sided (say nonconservative HJ flux) element boundary flux on interior element boundaries...
Definition: femIntegrals.c:4424
calculateVelocityQuadrature_MixedForm_Jacobian
void calculateVelocityQuadrature_MixedForm_Jacobian(int nElements_global, int nElementBoundaries_element, int nElementBoundaryQuadraturePoints_elementBoundary, int nDOF_element, int nSpace, int nQuadraturePoints_element, double *A_inv, double *db, double *db_eb, double *v, double *DV, double *DV_eb, double *qv, double *qDV, double *qDV_eb)
Definition: femIntegrals.c:9562
zeroJacobian_CSR
void zeroJacobian_CSR(int nNonzeros, double *jac)
Set all the Jacobian entries to 0.0.
Definition: femIntegrals.c:7363
calculateScalarScalarProduct
void calculateScalarScalarProduct(int nElements_global, int nQuadraturePoints_element, double *s1, double *s2, double *sResult)
Calculate the product of two scalars at the quadrature points.
Definition: femIntegrals.c:4198
updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_dense
void updateGlobalJacobianFromExteriorElementBoundaryFluxJacobian_dense(int nExteriorElementBoundaries_global, int nElementBoundaries_element, int nQuadraturePoints_elementBoundary, int nDOF_test_element, int nDOF_trial_element, int offset_r, int stride_r, int offset_u, int stride_u, int nFreeVDOF_global, int *exteriorElementBoundaries, int *elementBoundaryElements, int *elementBoundaryLocalElementBoundaries, int *nFreeDOF_element_r, int *freeLocal_r, int *freeGlobal_r, int *nFreeDOF_element_u, int *freeLocal_u, int *freeGlobal_u, double *elementBoundaryFluxJacobian, double *w_dS, double *jac)
Update the global dense Jacobian from the element boundary flux Jacobians at exterior boundaries.
Definition: femIntegrals.c:5245
updateReactionJacobian_weak_lowmem
void updateReactionJacobian_weak_lowmem(int nElements_global, int nQuadraturePoints_element, int nDOF_trial_element, int nDOF_test_element, double *dr, double *v, double *w_dV, double *jacobian_weak_residual)
Definition: femIntegrals.c:3740
parametricFiniteElementSpace_getValues
void parametricFiniteElementSpace_getValues(int nElements_global, int nQuadraturePoints_element, int nDOF_element, double *psi, double *vArray)
Definition: femIntegrals.c:241
updateDiffusion2_adjoint
void updateDiffusion2_adjoint(int nElements_global, int nQuadraturePoints_element, int nDOF_test_element, int nSpace, double *a, double *Hess_w_dV, double *Lstar_w_dV)
Definition: femIntegrals.c:3580
calculateDimensionlessNumbersADR
void calculateDimensionlessNumbersADR(int nElements_global, int nQuadraturePoints_element, int nSpace, int computeDiffusiveTimeStepLimit, double *elementDiameter, double *df, double *a, double *dphi, double *dr, double *dmt, double *pe, double *cfl)
Calculate the Peclet and Courant-Friedrichs-Lewy numbers for the scalar advection-diffusion-reaction ...
Definition: femIntegrals.c:7588
calculateGradShape_X_weightedShapeTrace
void calculateGradShape_X_weightedShapeTrace(int nElements_global, int nElementBoundaries_element, int nElementBoundaryQuadraturePoints_elementBoundary, int nDOF_trial_element, int nDOF_test_element, int nSpace, double *grad_v, double *w_dS, double *grad_v_X_w_dS)
Calculate the tensor product of trial function gradients and test functions at the quadrature points.
Definition: femIntegrals.c:6775
updateReaction_weak
void updateReaction_weak(int nElements_global, int nQuadraturePoints_element, int nDOF_test_element, double *r, double *w_dV, double *weak_residual)
Loop over all the elements and update the element weak_residual with the numerical quadrature approxi...
Definition: femIntegrals.c:3680