3 #ifndef PY_SSIZE_T_CLEAN
4 #define PY_SSIZE_T_CLEAN
8 #error Python headers needed to compile C extensions, please install development version of Python.
9 #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
10 #error Cython requires Python 2.6+ or Python 3.3+.
12 #define CYTHON_ABI "0_29_30"
13 #define CYTHON_HEX_VERSION 0x001D1EF0
14 #define CYTHON_FUTURE_DIVISION 0
17 #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
19 #if !defined(WIN32) && !defined(MS_WINDOWS)
31 #define DL_IMPORT(t) t
34 #define DL_EXPORT(t) t
37 #ifndef HAVE_LONG_LONG
38 #if PY_VERSION_HEX >= 0x02070000
39 #define HAVE_LONG_LONG
43 #define PY_LONG_LONG LONG_LONG
46 #define Py_HUGE_VAL HUGE_VAL
49 #define CYTHON_COMPILING_IN_PYPY 1
50 #define CYTHON_COMPILING_IN_PYSTON 0
51 #define CYTHON_COMPILING_IN_CPYTHON 0
52 #undef CYTHON_USE_TYPE_SLOTS
53 #define CYTHON_USE_TYPE_SLOTS 0
54 #undef CYTHON_USE_PYTYPE_LOOKUP
55 #define CYTHON_USE_PYTYPE_LOOKUP 0
56 #if PY_VERSION_HEX < 0x03050000
57 #undef CYTHON_USE_ASYNC_SLOTS
58 #define CYTHON_USE_ASYNC_SLOTS 0
59 #elif !defined(CYTHON_USE_ASYNC_SLOTS)
60 #define CYTHON_USE_ASYNC_SLOTS 1
62 #undef CYTHON_USE_PYLIST_INTERNALS
63 #define CYTHON_USE_PYLIST_INTERNALS 0
64 #undef CYTHON_USE_UNICODE_INTERNALS
65 #define CYTHON_USE_UNICODE_INTERNALS 0
66 #undef CYTHON_USE_UNICODE_WRITER
67 #define CYTHON_USE_UNICODE_WRITER 0
68 #undef CYTHON_USE_PYLONG_INTERNALS
69 #define CYTHON_USE_PYLONG_INTERNALS 0
70 #undef CYTHON_AVOID_BORROWED_REFS
71 #define CYTHON_AVOID_BORROWED_REFS 1
72 #undef CYTHON_ASSUME_SAFE_MACROS
73 #define CYTHON_ASSUME_SAFE_MACROS 0
74 #undef CYTHON_UNPACK_METHODS
75 #define CYTHON_UNPACK_METHODS 0
76 #undef CYTHON_FAST_THREAD_STATE
77 #define CYTHON_FAST_THREAD_STATE 0
78 #undef CYTHON_FAST_PYCALL
79 #define CYTHON_FAST_PYCALL 0
80 #undef CYTHON_PEP489_MULTI_PHASE_INIT
81 #define CYTHON_PEP489_MULTI_PHASE_INIT 0
82 #undef CYTHON_USE_TP_FINALIZE
83 #define CYTHON_USE_TP_FINALIZE 0
84 #undef CYTHON_USE_DICT_VERSIONS
85 #define CYTHON_USE_DICT_VERSIONS 0
86 #undef CYTHON_USE_EXC_INFO_STACK
87 #define CYTHON_USE_EXC_INFO_STACK 0
88 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
89 #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_HEX >= 0x07030900)
91 #elif defined(PYSTON_VERSION)
92 #define CYTHON_COMPILING_IN_PYPY 0
93 #define CYTHON_COMPILING_IN_PYSTON 1
94 #define CYTHON_COMPILING_IN_CPYTHON 0
95 #ifndef CYTHON_USE_TYPE_SLOTS
96 #define CYTHON_USE_TYPE_SLOTS 1
98 #undef CYTHON_USE_PYTYPE_LOOKUP
99 #define CYTHON_USE_PYTYPE_LOOKUP 0
100 #undef CYTHON_USE_ASYNC_SLOTS
101 #define CYTHON_USE_ASYNC_SLOTS 0
102 #undef CYTHON_USE_PYLIST_INTERNALS
103 #define CYTHON_USE_PYLIST_INTERNALS 0
104 #ifndef CYTHON_USE_UNICODE_INTERNALS
105 #define CYTHON_USE_UNICODE_INTERNALS 1
107 #undef CYTHON_USE_UNICODE_WRITER
108 #define CYTHON_USE_UNICODE_WRITER 0
109 #undef CYTHON_USE_PYLONG_INTERNALS
110 #define CYTHON_USE_PYLONG_INTERNALS 0
111 #ifndef CYTHON_AVOID_BORROWED_REFS
112 #define CYTHON_AVOID_BORROWED_REFS 0
114 #ifndef CYTHON_ASSUME_SAFE_MACROS
115 #define CYTHON_ASSUME_SAFE_MACROS 1
117 #ifndef CYTHON_UNPACK_METHODS
118 #define CYTHON_UNPACK_METHODS 1
120 #undef CYTHON_FAST_THREAD_STATE
121 #define CYTHON_FAST_THREAD_STATE 0
122 #undef CYTHON_FAST_PYCALL
123 #define CYTHON_FAST_PYCALL 0
124 #undef CYTHON_PEP489_MULTI_PHASE_INIT
125 #define CYTHON_PEP489_MULTI_PHASE_INIT 0
126 #undef CYTHON_USE_TP_FINALIZE
127 #define CYTHON_USE_TP_FINALIZE 0
128 #undef CYTHON_USE_DICT_VERSIONS
129 #define CYTHON_USE_DICT_VERSIONS 0
130 #undef CYTHON_USE_EXC_INFO_STACK
131 #define CYTHON_USE_EXC_INFO_STACK 0
132 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
133 #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
136 #define CYTHON_COMPILING_IN_PYPY 0
137 #define CYTHON_COMPILING_IN_PYSTON 0
138 #define CYTHON_COMPILING_IN_CPYTHON 1
139 #ifndef CYTHON_USE_TYPE_SLOTS
140 #define CYTHON_USE_TYPE_SLOTS 1
142 #if PY_VERSION_HEX < 0x02070000
143 #undef CYTHON_USE_PYTYPE_LOOKUP
144 #define CYTHON_USE_PYTYPE_LOOKUP 0
145 #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
146 #define CYTHON_USE_PYTYPE_LOOKUP 1
148 #if PY_MAJOR_VERSION < 3
149 #undef CYTHON_USE_ASYNC_SLOTS
150 #define CYTHON_USE_ASYNC_SLOTS 0
151 #elif !defined(CYTHON_USE_ASYNC_SLOTS)
152 #define CYTHON_USE_ASYNC_SLOTS 1
154 #if PY_VERSION_HEX < 0x02070000
155 #undef CYTHON_USE_PYLONG_INTERNALS
156 #define CYTHON_USE_PYLONG_INTERNALS 0
157 #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
158 #define CYTHON_USE_PYLONG_INTERNALS 1
160 #ifndef CYTHON_USE_PYLIST_INTERNALS
161 #define CYTHON_USE_PYLIST_INTERNALS 1
163 #ifndef CYTHON_USE_UNICODE_INTERNALS
164 #define CYTHON_USE_UNICODE_INTERNALS 1
166 #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2
167 #undef CYTHON_USE_UNICODE_WRITER
168 #define CYTHON_USE_UNICODE_WRITER 0
169 #elif !defined(CYTHON_USE_UNICODE_WRITER)
170 #define CYTHON_USE_UNICODE_WRITER 1
172 #ifndef CYTHON_AVOID_BORROWED_REFS
173 #define CYTHON_AVOID_BORROWED_REFS 0
175 #ifndef CYTHON_ASSUME_SAFE_MACROS
176 #define CYTHON_ASSUME_SAFE_MACROS 1
178 #ifndef CYTHON_UNPACK_METHODS
179 #define CYTHON_UNPACK_METHODS 1
181 #if PY_VERSION_HEX >= 0x030B00A4
182 #undef CYTHON_FAST_THREAD_STATE
183 #define CYTHON_FAST_THREAD_STATE 0
184 #elif !defined(CYTHON_FAST_THREAD_STATE)
185 #define CYTHON_FAST_THREAD_STATE 1
187 #ifndef CYTHON_FAST_PYCALL
188 #define CYTHON_FAST_PYCALL (PY_VERSION_HEX < 0x030A0000)
190 #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
191 #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
193 #ifndef CYTHON_USE_TP_FINALIZE
194 #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
196 #ifndef CYTHON_USE_DICT_VERSIONS
197 #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
199 #if PY_VERSION_HEX >= 0x030B00A4
200 #undef CYTHON_USE_EXC_INFO_STACK
201 #define CYTHON_USE_EXC_INFO_STACK 0
202 #elif !defined(CYTHON_USE_EXC_INFO_STACK)
203 #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
205 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
206 #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
209 #if !defined(CYTHON_FAST_PYCCALL)
210 #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
212 #if CYTHON_USE_PYLONG_INTERNALS
213 #if PY_MAJOR_VERSION < 3
214 #include "longintrepr.h"
220 enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P ==
sizeof(
void*)) };
223 #ifndef __has_attribute
224 #define __has_attribute(x) 0
226 #ifndef __has_cpp_attribute
227 #define __has_cpp_attribute(x) 0
229 #ifndef CYTHON_RESTRICT
230 #if defined(__GNUC__)
231 #define CYTHON_RESTRICT __restrict__
232 #elif defined(_MSC_VER) && _MSC_VER >= 1400
233 #define CYTHON_RESTRICT __restrict
234 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
235 #define CYTHON_RESTRICT restrict
237 #define CYTHON_RESTRICT
240 #ifndef CYTHON_UNUSED
241 # if defined(__GNUC__)
242 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
243 # define CYTHON_UNUSED __attribute__ ((__unused__))
245 # define CYTHON_UNUSED
247 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
248 # define CYTHON_UNUSED __attribute__ ((__unused__))
250 # define CYTHON_UNUSED
253 #ifndef CYTHON_MAYBE_UNUSED_VAR
254 # if defined(__cplusplus)
255 template<
class T>
void CYTHON_MAYBE_UNUSED_VAR(
const T& ) { }
257 # define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
260 #ifndef CYTHON_NCP_UNUSED
261 # if CYTHON_COMPILING_IN_CPYTHON
262 # define CYTHON_NCP_UNUSED
264 # define CYTHON_NCP_UNUSED CYTHON_UNUSED
267 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
269 #ifndef _MSC_STDINT_H_
271 typedef unsigned char uint8_t;
272 typedef unsigned int uint32_t;
274 typedef unsigned __int8 uint8_t;
275 typedef unsigned __int32 uint32_t;
281 #ifndef CYTHON_FALLTHROUGH
282 #if defined(__cplusplus) && __cplusplus >= 201103L
283 #if __has_cpp_attribute(fallthrough)
284 #define CYTHON_FALLTHROUGH [[fallthrough]]
285 #elif __has_cpp_attribute(clang::fallthrough)
286 #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
287 #elif __has_cpp_attribute(gnu::fallthrough)
288 #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
291 #ifndef CYTHON_FALLTHROUGH
292 #if __has_attribute(fallthrough)
293 #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
295 #define CYTHON_FALLTHROUGH
298 #if defined(__clang__ ) && defined(__apple_build_version__)
299 #if __apple_build_version__ < 7000000
300 #undef CYTHON_FALLTHROUGH
301 #define CYTHON_FALLTHROUGH
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
316 #define CYTHON_INLINE
320 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
321 #define Py_OptimizeFlag 0
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
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;
370 if (!(call_result = PyObject_Call(replace, empty, kwds)))
goto cleanup_code_too;
371 Py_XDECREF((PyObject*)co);
372 co = (PyCodeObject*)call_result;
376 Py_XDECREF((PyObject*)co);
381 Py_XDECREF(argcount);
382 Py_XDECREF(posonlyargcount);
383 Py_XDECREF(kwonlyargcount);
385 Py_XDECREF(stacksize);
387 Py_XDECREF(call_result);
390 PyErr_Restore(type, value, traceback);
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)
398 #define __Pyx_DefaultClassType PyType_Type
400 #ifndef Py_TPFLAGS_CHECKTYPES
401 #define Py_TPFLAGS_CHECKTYPES 0
403 #ifndef Py_TPFLAGS_HAVE_INDEX
404 #define Py_TPFLAGS_HAVE_INDEX 0
406 #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
407 #define Py_TPFLAGS_HAVE_NEWBUFFER 0
409 #ifndef Py_TPFLAGS_HAVE_FINALIZE
410 #define Py_TPFLAGS_HAVE_FINALIZE 0
412 #ifndef METH_STACKLESS
413 #define METH_STACKLESS 0
415 #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
416 #ifndef METH_FASTCALL
417 #define METH_FASTCALL 0x80
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);
423 #define __Pyx_PyCFunctionFast _PyCFunctionFast
424 #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
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)))))
430 #define __Pyx_PyFastCFunction_Check(func) 0
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)
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)
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)
446 #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
447 #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
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()
456 #define __Pyx_PyThreadState_Current _PyThreadState_Current
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();
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;
471 static CYTHON_INLINE
void PyThread_tss_free(Py_tss_t *key) {
474 static CYTHON_INLINE
int PyThread_tss_is_created(Py_tss_t *key) {
475 return *key != Py_tss_NEEDS_INIT;
477 static CYTHON_INLINE
void PyThread_tss_delete(Py_tss_t *key) {
478 PyThread_delete_key(*key);
479 *key = Py_tss_NEEDS_INIT;
481 static CYTHON_INLINE
int PyThread_tss_set(Py_tss_t *key,
void *value) {
482 return PyThread_set_key_value(*key, value);
484 static CYTHON_INLINE
void * PyThread_tss_get(Py_tss_t *key) {
485 return PyThread_get_key_value(*key);
488 #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
489 #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
491 #define __Pyx_PyDict_NewPresized(n) PyDict_New()
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)
497 #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
498 #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
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)
503 #define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name)
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)))
511 #define __Pyx_PyUnicode_READY(op) (0)
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))
524 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
527 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u))
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))
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)
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))
552 #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
553 #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
555 #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
556 #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
558 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
559 #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
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)
566 #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
568 #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
569 #define PyObject_ASCII(o) PyObject_Repr(o)
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
581 #if PY_MAJOR_VERSION >= 3
582 #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
583 #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
585 #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
586 #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
588 #ifndef PySet_CheckExact
589 #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
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)
595 #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
596 #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
598 #if CYTHON_ASSUME_SAFE_MACROS
599 #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
601 #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
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
620 #if PY_MAJOR_VERSION >= 3
621 #define PyBoolObject PyLongObject
623 #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
624 #ifndef PyUnicode_InternFromString
625 #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
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
633 #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
634 #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t
636 #if PY_MAJOR_VERSION >= 3
637 #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func))
639 #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
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)
646 #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
649 #define __Pyx_PyType_AsAsync(obj) NULL
651 #ifndef __Pyx_PyAsyncMethodsStruct
656 } __Pyx_PyAsyncMethodsStruct;
659 #if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
660 #if !defined(_USE_MATH_DEFINES)
661 #define _USE_MATH_DEFINES
666 #define __PYX_NAN() ((float) NAN)
668 static CYTHON_INLINE
float __PYX_NAN() {
670 memset(&value, 0xFF,
sizeof(value));
674 #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
675 #define __Pyx_truncl trunc
677 #define __Pyx_truncl truncl
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; }
685 #ifndef __PYX_EXTERN_C
687 #define __PYX_EXTERN_C extern "C"
689 #define __PYX_EXTERN_C extern
693 #define __PYX_HAVE__csubgridError
694 #define __PYX_HAVE_API__csubgridError
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"
711 #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
712 #define CYTHON_WITHOUT_ASSERTIONS
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;
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;
739 #if defined (__cplusplus) && __cplusplus >= 201103L
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)
753 #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
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
766 #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
767 #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
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;
788 return (
size_t)(u_end -
u - 1);
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))
807 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
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))
813 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
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) {
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");
826 default_encoding = PyObject_CallMethod(sys, (
char*)
"getdefaultencoding", NULL);
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;
834 char ascii_chars[128];
836 for (
c = 0;
c < 128;
c++) {
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) {
846 "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
850 Py_DECREF(ascii_chars_u);
851 Py_DECREF(ascii_chars_b);
853 Py_DECREF(default_encoding);
856 Py_XDECREF(default_encoding);
857 Py_XDECREF(ascii_chars_u);
858 Py_XDECREF(ascii_chars_b);
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)
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) {
870 PyObject* default_encoding = NULL;
871 char* default_encoding_c;
872 sys = PyImport_ImportModule(
"sys");
874 default_encoding = PyObject_CallMethod(sys, (
char*) (
const char*)
"getdefaultencoding", NULL);
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);
885 Py_XDECREF(default_encoding);
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)
897 #define likely(x) (x)
898 #define unlikely(x) (x)
900 static CYTHON_INLINE
void __Pyx_pretend_to_initialize(
void* ptr) { (void)ptr; }
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;
915 #if !defined(CYTHON_CCOMPLEX)
916 #if defined(__cplusplus)
917 #define CYTHON_CCOMPLEX 1
918 #elif defined(_Complex_I)
919 #define CYTHON_CCOMPLEX 1
921 #define CYTHON_CCOMPLEX 0
931 #if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
933 #define _Complex_I 1.0fj
937 static const char *__pyx_f[] = {
938 "proteus/csubgridError.pyx",
950 typedef npy_int8 __pyx_t_5numpy_int8_t;
959 typedef npy_int16 __pyx_t_5numpy_int16_t;
968 typedef npy_int32 __pyx_t_5numpy_int32_t;
977 typedef npy_int64 __pyx_t_5numpy_int64_t;
986 typedef npy_uint8 __pyx_t_5numpy_uint8_t;
995 typedef npy_uint16 __pyx_t_5numpy_uint16_t;
1004 typedef npy_uint32 __pyx_t_5numpy_uint32_t;
1013 typedef npy_uint64 __pyx_t_5numpy_uint64_t;
1022 typedef npy_float32 __pyx_t_5numpy_float32_t;
1031 typedef npy_float64 __pyx_t_5numpy_float64_t;
1040 typedef npy_long __pyx_t_5numpy_int_t;
1049 typedef npy_longlong __pyx_t_5numpy_long_t;
1058 typedef npy_longlong __pyx_t_5numpy_longlong_t;
1067 typedef npy_ulong __pyx_t_5numpy_uint_t;
1076 typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
1085 typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
1094 typedef npy_intp __pyx_t_5numpy_intp_t;
1103 typedef npy_uintp __pyx_t_5numpy_uintp_t;
1112 typedef npy_double __pyx_t_5numpy_float_t;
1121 typedef npy_double __pyx_t_5numpy_double_t;
1130 typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
1134 typedef ::std::complex< float > __pyx_t_float_complex;
1136 typedef float _Complex __pyx_t_float_complex;
1139 typedef struct {
float real, imag; } __pyx_t_float_complex;
1141 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(
float,
float);
1146 typedef ::std::complex< double > __pyx_t_double_complex;
1148 typedef double _Complex __pyx_t_double_complex;
1151 typedef struct {
double real, imag; } __pyx_t_double_complex;
1153 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(
double,
double);
1165 typedef npy_cfloat __pyx_t_5numpy_cfloat_t;
1174 typedef npy_cdouble __pyx_t_5numpy_cdouble_t;
1183 typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;
1192 typedef npy_cdouble __pyx_t_5numpy_complex_t;
1196 #ifndef CYTHON_REFNANNY
1197 #define CYTHON_REFNANNY 0
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;
1212 #define __Pyx_RefNannySetupContext(name, 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);\
1218 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1221 #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1222 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
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)
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)
1247 #define __Pyx_XDECREF_SET(r, v) do {\
1248 PyObject *tmp = (PyObject *) r;\
1249 r = v; __Pyx_XDECREF(tmp);\
1251 #define __Pyx_DECREF_SET(r, v) do {\
1252 PyObject *tmp = (PyObject *) r;\
1253 r = v; __Pyx_DECREF(tmp);\
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)
1259 static void __Pyx_RaiseArgtupleInvalid(
const char* func_name,
int exact,
1260 Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
1263 static void __Pyx_RaiseDoubleKeywordsError(
const char* func_name, PyObject* kw_name);
1266 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
1267 PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
1268 const char* function_name);
1271 #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
1272 ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
1273 __Pyx__ArgTypeTest(obj, type, name, exact))
1274 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type,
const char *name,
int exact);
1277 #if CYTHON_USE_TYPE_SLOTS
1278 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
1280 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
1284 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
1287 #if CYTHON_USE_EXC_INFO_STACK
1288 static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
1292 #if CYTHON_FAST_THREAD_STATE
1293 #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
1294 #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
1295 #define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type
1297 #define __Pyx_PyThreadState_declare
1298 #define __Pyx_PyThreadState_assign
1299 #define __Pyx_PyErr_Occurred() PyErr_Occurred()
1303 #if CYTHON_FAST_THREAD_STATE
1304 #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
1305 static CYTHON_INLINE
void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1306 #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
1307 static CYTHON_INLINE
void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1309 #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
1310 #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
1314 #if CYTHON_FAST_THREAD_STATE
1315 #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
1316 static CYTHON_INLINE
int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
1318 #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
1322 #if CYTHON_FAST_THREAD_STATE
1323 #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
1324 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1326 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
1330 #if CYTHON_COMPILING_IN_CPYTHON
1331 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
1333 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
1337 #if CYTHON_FAST_THREAD_STATE
1338 #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
1339 #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
1340 #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
1341 #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
1342 #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
1343 static CYTHON_INLINE
void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1344 static CYTHON_INLINE
void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1345 #if CYTHON_COMPILING_IN_CPYTHON
1346 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
1348 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1351 #define __Pyx_PyErr_Clear() PyErr_Clear()
1352 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1353 #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
1354 #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
1355 #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
1356 #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
1357 #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
1358 #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
1362 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
1365 #ifndef __PYX_HAVE_RT_ImportType_proto
1366 #define __PYX_HAVE_RT_ImportType_proto
1367 enum __Pyx_ImportType_CheckSize {
1368 __Pyx_ImportType_CheckSize_Error = 0,
1369 __Pyx_ImportType_CheckSize_Warn = 1,
1370 __Pyx_ImportType_CheckSize_Ignore = 2
1372 static PyTypeObject *__Pyx_ImportType(PyObject* module,
const char *module_name,
const char *class_name,
size_t size,
enum __Pyx_ImportType_CheckSize check_size);
1376 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list,
int level);
1379 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
1380 #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1)
1381 #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)
1382 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
1383 (version_var) = __PYX_GET_DICT_VERSION(dict);\
1384 (cache_var) = (value);
1385 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
1386 static PY_UINT64_T __pyx_dict_version = 0;\
1387 static PyObject *__pyx_dict_cached_value = NULL;\
1388 if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
1389 (VAR) = __pyx_dict_cached_value;\
1391 (VAR) = __pyx_dict_cached_value = (LOOKUP);\
1392 __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
1395 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
1396 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
1397 static CYTHON_INLINE
int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
1399 #define __PYX_GET_DICT_VERSION(dict) (0)
1400 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
1401 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);
1405 #ifdef CYTHON_CLINE_IN_TRACEBACK
1406 #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
1408 static int __Pyx_CLineForTraceback(PyThreadState *tstate,
int c_line);
1413 PyCodeObject* code_object;
1415 } __Pyx_CodeObjectCacheEntry;
1416 struct __Pyx_CodeObjectCache {
1419 __Pyx_CodeObjectCacheEntry* entries;
1421 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
1422 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries,
int count,
int code_line);
1423 static PyCodeObject *__pyx_find_code_object(
int code_line);
1424 static void __pyx_insert_code_object(
int code_line, PyCodeObject* code_object);
1427 static void __Pyx_AddTraceback(
const char *funcname,
int c_line,
1428 int py_line,
const char *filename);
1431 #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
1432 #define __Pyx_HAS_GCC_DIAGNOSTIC
1438 #define __Pyx_CREAL(z) ((z).real())
1439 #define __Pyx_CIMAG(z) ((z).imag())
1441 #define __Pyx_CREAL(z) (__real__(z))
1442 #define __Pyx_CIMAG(z) (__imag__(z))
1445 #define __Pyx_CREAL(z) ((z).real)
1446 #define __Pyx_CIMAG(z) ((z).imag)
1448 #if defined(__cplusplus) && CYTHON_CCOMPLEX\
1449 && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103)
1450 #define __Pyx_SET_CREAL(z,x) ((z).real(x))
1451 #define __Pyx_SET_CIMAG(z,y) ((z).imag(y))
1453 #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
1454 #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
1459 #define __Pyx_c_eq_float(a, b) ((a)==(b))
1460 #define __Pyx_c_sum_float(a, b) ((a)+(b))
1461 #define __Pyx_c_diff_float(a, b) ((a)-(b))
1462 #define __Pyx_c_prod_float(a, b) ((a)*(b))
1463 #define __Pyx_c_quot_float(a, b) ((a)/(b))
1464 #define __Pyx_c_neg_float(a) (-(a))
1466 #define __Pyx_c_is_zero_float(z) ((z)==(float)0)
1467 #define __Pyx_c_conj_float(z) (::std::conj(z))
1469 #define __Pyx_c_abs_float(z) (::std::abs(z))
1470 #define __Pyx_c_pow_float(a, b) (::std::pow(a, b))
1473 #define __Pyx_c_is_zero_float(z) ((z)==0)
1474 #define __Pyx_c_conj_float(z) (conjf(z))
1476 #define __Pyx_c_abs_float(z) (cabsf(z))
1477 #define __Pyx_c_pow_float(a, b) (cpowf(a, b))
1481 static CYTHON_INLINE
int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex);
1482 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex);
1483 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex);
1484 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex);
1485 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex);
1486 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex);
1487 static CYTHON_INLINE
int __Pyx_c_is_zero_float(__pyx_t_float_complex);
1488 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex);
1490 static CYTHON_INLINE
float __Pyx_c_abs_float(__pyx_t_float_complex);
1491 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex);
1497 #define __Pyx_c_eq_double(a, b) ((a)==(b))
1498 #define __Pyx_c_sum_double(a, b) ((a)+(b))
1499 #define __Pyx_c_diff_double(a, b) ((a)-(b))
1500 #define __Pyx_c_prod_double(a, b) ((a)*(b))
1501 #define __Pyx_c_quot_double(a, b) ((a)/(b))
1502 #define __Pyx_c_neg_double(a) (-(a))
1504 #define __Pyx_c_is_zero_double(z) ((z)==(double)0)
1505 #define __Pyx_c_conj_double(z) (::std::conj(z))
1507 #define __Pyx_c_abs_double(z) (::std::abs(z))
1508 #define __Pyx_c_pow_double(a, b) (::std::pow(a, b))
1511 #define __Pyx_c_is_zero_double(z) ((z)==0)
1512 #define __Pyx_c_conj_double(z) (conj(z))
1514 #define __Pyx_c_abs_double(z) (cabs(z))
1515 #define __Pyx_c_pow_double(a, b) (cpow(a, b))
1519 static CYTHON_INLINE
int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex);
1520 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex);
1521 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex);
1522 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex);
1523 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex);
1524 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex);
1525 static CYTHON_INLINE
int __Pyx_c_is_zero_double(__pyx_t_double_complex);
1526 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex);
1528 static CYTHON_INLINE
double __Pyx_c_abs_double(__pyx_t_double_complex);
1529 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex);
1534 static CYTHON_INLINE
char __Pyx_PyInt_As_char(PyObject *);
1537 static CYTHON_INLINE
int __Pyx_PyInt_As_int(PyObject *);
1540 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(
long value);
1543 static CYTHON_INLINE
long __Pyx_PyInt_As_long(PyObject *);
1546 #if CYTHON_COMPILING_IN_CPYTHON
1547 #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
1548 static CYTHON_INLINE
int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
1549 static CYTHON_INLINE
int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
1550 static CYTHON_INLINE
int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
1552 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
1553 #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
1554 #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
1556 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
1559 static int __Pyx_check_binary_version(
void);
1562 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
1574 static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;
1587 static PyTypeObject *__pyx_ptype_5numpy_dtype = 0;
1588 static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0;
1589 static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0;
1590 static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0;
1591 static PyTypeObject *__pyx_ptype_5numpy_generic = 0;
1592 static PyTypeObject *__pyx_ptype_5numpy_number = 0;
1593 static PyTypeObject *__pyx_ptype_5numpy_integer = 0;
1594 static PyTypeObject *__pyx_ptype_5numpy_signedinteger = 0;
1595 static PyTypeObject *__pyx_ptype_5numpy_unsignedinteger = 0;
1596 static PyTypeObject *__pyx_ptype_5numpy_inexact = 0;
1597 static PyTypeObject *__pyx_ptype_5numpy_floating = 0;
1598 static PyTypeObject *__pyx_ptype_5numpy_complexfloating = 0;
1599 static PyTypeObject *__pyx_ptype_5numpy_flexible = 0;
1600 static PyTypeObject *__pyx_ptype_5numpy_character = 0;
1601 static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0;
1604 #define __Pyx_MODULE_NAME "csubgridError"
1605 extern int __pyx_module_is_main_csubgridError;
1606 int __pyx_module_is_main_csubgridError = 0;
1609 static PyObject *__pyx_builtin_ImportError;
1610 static const char __pyx_k_a[] =
"a";
1611 static const char __pyx_k_f[] =
"f";
1612 static const char __pyx_k_g[] =
"g";
1613 static const char __pyx_k_h[] =
"h";
1614 static const char __pyx_k_u[] =
"u";
1615 static const char __pyx_k_v[] =
"v";
1616 static const char __pyx_k_dH[] =
"dH";
1617 static const char __pyx_k_da[] =
"da";
1618 static const char __pyx_k_df[] =
"df";
1619 static const char __pyx_k_dm[] =
"dm";
1620 static const char __pyx_k_dr[] =
"dr";
1621 static const char __pyx_k_dt[] =
"dt";
1622 static const char __pyx_k_hu[] =
"hu";
1623 static const char __pyx_k_hv[] =
"hv";
1624 static const char __pyx_k_np[] =
"np";
1625 static const char __pyx_k_pe[] =
"pe";
1626 static const char __pyx_k_cfl[] =
"cfl";
1627 static const char __pyx_k_dmt[] =
"dmt";
1628 static const char __pyx_k_tau[] =
"tau";
1629 static const char __pyx_k_dphi[] =
"dphi";
1630 static const char __pyx_k_main[] =
"__main__";
1631 static const char __pyx_k_name[] =
"__name__";
1632 static const char __pyx_k_tau0[] =
"tau0";
1633 static const char __pyx_k_tau1[] =
"tau1";
1634 static const char __pyx_k_test[] =
"__test__";
1635 static const char __pyx_k_cfl_1[] =
"cfl_1";
1636 static const char __pyx_k_cfl_2[] =
"cfl_2";
1637 static const char __pyx_k_cfl_3[] =
"cfl_3";
1638 static const char __pyx_k_numpy[] =
"numpy";
1639 static const char __pyx_k_colind[] =
"colind";
1640 static const char __pyx_k_import[] =
"__import__";
1641 static const char __pyx_k_nSpace[] =
"nSpace";
1642 static const char __pyx_k_rowptr[] =
"rowptr";
1643 static const char __pyx_k_hFactor[] =
"hFactor";
1644 static const char __pyx_k_grad_phi[] =
"grad_phi";
1645 static const char __pyx_k_inverseJ[] =
"inverseJ";
1646 static const char __pyx_k_ImportError[] =
"ImportError";
1647 static const char __pyx_k_pdeResidual[] =
"pdeResidual";
1648 static const char __pyx_k_dpdeResidual[] =
"dpdeResidual";
1649 static const char __pyx_k_pdeResidualP[] =
"pdeResidualP";
1650 static const char __pyx_k_pdeResidualU[] =
"pdeResidualU";
1651 static const char __pyx_k_pdeResidualV[] =
"pdeResidualV";
1652 static const char __pyx_k_pdeResidualW[] =
"pdeResidualW";
1653 static const char __pyx_k_subgridError[] =
"subgridError";
1654 static const char __pyx_k_tau_gradient[] =
"tau_gradient";
1655 static const char __pyx_k_csubgridError[] =
"csubgridError";
1656 static const char __pyx_k_dsubgridError[] =
"dsubgridError";
1657 static const char __pyx_k_stabilization[] =
"stabilization";
1658 static const char __pyx_k_subgridErrorP[] =
"subgridErrorP";
1659 static const char __pyx_k_subgridErrorU[] =
"subgridErrorU";
1660 static const char __pyx_k_subgridErrorV[] =
"subgridErrorV";
1661 static const char __pyx_k_subgridErrorW[] =
"subgridErrorW";
1662 static const char __pyx_k_elementDiameter[] =
"elementDiameter";
1663 static const char __pyx_k_dpdeResidualP_du[] =
"dpdeResidualP_du";
1664 static const char __pyx_k_dpdeResidualP_dv[] =
"dpdeResidualP_dv";
1665 static const char __pyx_k_dpdeResidualP_dw[] =
"dpdeResidualP_dw";
1666 static const char __pyx_k_dpdeResidualU_dp[] =
"dpdeResidualU_dp";
1667 static const char __pyx_k_dpdeResidualU_du[] =
"dpdeResidualU_du";
1668 static const char __pyx_k_dpdeResidualU_dv[] =
"dpdeResidualU_dv";
1669 static const char __pyx_k_dpdeResidualU_dw[] =
"dpdeResidualU_dw";
1670 static const char __pyx_k_dpdeResidualV_dp[] =
"dpdeResidualV_dp";
1671 static const char __pyx_k_dpdeResidualV_du[] =
"dpdeResidualV_du";
1672 static const char __pyx_k_dpdeResidualV_dv[] =
"dpdeResidualV_dv";
1673 static const char __pyx_k_dpdeResidualV_dw[] =
"dpdeResidualV_dw";
1674 static const char __pyx_k_dpdeResidualW_dp[] =
"dpdeResidualW_dp";
1675 static const char __pyx_k_dpdeResidualW_du[] =
"dpdeResidualW_du";
1676 static const char __pyx_k_dpdeResidualW_dv[] =
"dpdeResidualW_dv";
1677 static const char __pyx_k_dpdeResidualW_dw[] =
"dpdeResidualW_dw";
1678 static const char __pyx_k_grad_pdeResidual[] =
"grad_pdeResidual";
1679 static const char __pyx_k_dsubgridErrorP_dp[] =
"dsubgridErrorP_dp";
1680 static const char __pyx_k_dsubgridErrorP_du[] =
"dsubgridErrorP_du";
1681 static const char __pyx_k_dsubgridErrorP_dv[] =
"dsubgridErrorP_dv";
1682 static const char __pyx_k_dsubgridErrorP_dw[] =
"dsubgridErrorP_dw";
1683 static const char __pyx_k_dsubgridErrorU_dp[] =
"dsubgridErrorU_dp";
1684 static const char __pyx_k_dsubgridErrorU_du[] =
"dsubgridErrorU_du";
1685 static const char __pyx_k_dsubgridErrorU_dv[] =
"dsubgridErrorU_dv";
1686 static const char __pyx_k_dsubgridErrorU_dw[] =
"dsubgridErrorU_dw";
1687 static const char __pyx_k_dsubgridErrorV_dp[] =
"dsubgridErrorV_dp";
1688 static const char __pyx_k_dsubgridErrorV_du[] =
"dsubgridErrorV_du";
1689 static const char __pyx_k_dsubgridErrorV_dv[] =
"dsubgridErrorV_dv";
1690 static const char __pyx_k_dsubgridErrorV_dw[] =
"dsubgridErrorV_dw";
1691 static const char __pyx_k_dsubgridErrorW_dp[] =
"dsubgridErrorW_dp";
1692 static const char __pyx_k_dsubgridErrorW_du[] =
"dsubgridErrorW_du";
1693 static const char __pyx_k_dsubgridErrorW_dv[] =
"dsubgridErrorW_dv";
1694 static const char __pyx_k_dsubgridErrorW_dw[] =
"dsubgridErrorW_dw";
1695 static const char __pyx_k_grad_subgridError[] =
"grad_subgridError";
1696 static const char __pyx_k_cline_in_traceback[] =
"cline_in_traceback";
1697 static const char __pyx_k_proteus_csubgridError_pyx[] =
"proteus/csubgridError.pyx";
1698 static const char __pyx_k_calculateSubgridError_A_tau[] =
"calculateSubgridError_A_tau";
1699 static const char __pyx_k_calculateSubgridError_HJ_tau[] =
"calculateSubgridError_HJ_tau";
1700 static const char __pyx_k_calculateSubgridError_tauRes[] =
"calculateSubgridError_tauRes";
1701 static const char __pyx_k_calculateSubgridError_ADR_tau[] =
"calculateSubgridError_ADR_tau";
1702 static const char __pyx_k_calculateSubgridErrorStokes2D_1[] =
"calculateSubgridErrorStokes2D_1";
1703 static const char __pyx_k_calculateSubgridErrorStokes_GLS[] =
"calculateSubgridErrorStokes_GLS_tau";
1704 static const char __pyx_k_numpy_core_multiarray_failed_to[] =
"numpy.core.multiarray failed to import";
1705 static const char __pyx_k_calculateSubgridErrorGradient_ta[] =
"calculateSubgridErrorGradient_tauRes";
1706 static const char __pyx_k_calculateSubgridErrorNavierStoke[] =
"calculateSubgridErrorNavierStokes2D_GLS_tau";
1707 static const char __pyx_k_calculateSubgridErrorShallowWate[] =
"calculateSubgridErrorShallowWater1D";
1708 static const char __pyx_k_calculateSubgridErrorStokes2D_GL[] =
"calculateSubgridErrorStokes2D_GLS_velocity";
1709 static const char __pyx_k_calculateSubgridErrorStokes3D_GL[] =
"calculateSubgridErrorStokes3D_GLS_velocity";
1710 static const char __pyx_k_calculateSubgridError_ADR_Sangal[] =
"calculateSubgridError_ADR_Sangalli_tau_sd";
1711 static const char __pyx_k_calculateSubgridError_ADR_generi[] =
"calculateSubgridError_ADR_generic_tau";
1712 static const char __pyx_k_calculateSubgridError_ADR_tau_sd[] =
"calculateSubgridError_ADR_tau_sd";
1713 static const char __pyx_k_calculateSubgridError_Harari_tau[] =
"calculateSubgridError_Harari_tau_sd";
1714 static const char __pyx_k_numpy_core_umath_failed_to_impor[] =
"numpy.core.umath failed to import";
1715 static const char __pyx_k_calculateSubgridErrorStokes2D_1_2[] =
"calculateSubgridErrorStokes2D_1_sd";
1716 static const char __pyx_k_calculateSubgridErrorStokes_GLS_2[] =
"calculateSubgridErrorStokes_GLS_tau_sd";
1717 static const char __pyx_k_calculateSubgridErrorNavierStoke_2[] =
"calculateSubgridErrorNavierStokes2D_GLS_tau_sd";
1718 static const char __pyx_k_calculateSubgridErrorNavierStoke_3[] =
"calculateSubgridErrorNavierStokes2D_generic_tau";
1719 static const char __pyx_k_calculateSubgridErrorNavierStoke_4[] =
"calculateSubgridErrorNavierStokes2D_generic_tau_sd";
1720 static const char __pyx_k_calculateSubgridErrorNavierStoke_5[] =
"calculateSubgridErrorNavierStokes2D_generic_withBodyForce_tau";
1721 static const char __pyx_k_calculateSubgridErrorNavierStoke_6[] =
"calculateSubgridErrorNavierStokes2D_generic_withBodyForce_tau_sd";
1722 static const char __pyx_k_calculateSubgridErrorNavierStoke_7[] =
"calculateSubgridErrorNavierStokes2D_GLS_tauRes";
1723 static const char __pyx_k_calculateSubgridErrorNavierStoke_8[] =
"calculateSubgridErrorNavierStokes3D_GLS_tauRes";
1724 static const char __pyx_k_calculateSubgridErrorNavierStoke_9[] =
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure";
1725 static const char __pyx_k_calculateSubgridErrorShallowWate_2[] =
"calculateSubgridErrorShallowWater2D";
1726 static const char __pyx_k_calculateSubgridErrorStokes2D_GL_2[] =
"calculateSubgridErrorStokes2D_GLS_velocity_sd";
1727 static const char __pyx_k_calculateSubgridErrorStokes2D_GL_3[] =
"calculateSubgridErrorStokes2D_GLS_velocity_pressure";
1728 static const char __pyx_k_calculateSubgridErrorStokes2D_GL_4[] =
"calculateSubgridErrorStokes2D_GLS_velocity_pressure_sd";
1729 static const char __pyx_k_calculateSubgridErrorStokes2D_GL_5[] =
"calculateSubgridErrorStokes2D_GLS_tauRes";
1730 static const char __pyx_k_calculateSubgridErrorStokes3D_GL_2[] =
"calculateSubgridErrorStokes3D_GLS_velocity_sd";
1731 static const char __pyx_k_calculateSubgridErrorStokes3D_GL_3[] =
"calculateSubgridErrorStokes3D_GLS_velocity_pressure";
1732 static const char __pyx_k_calculateSubgridErrorStokes3D_GL_4[] =
"calculateSubgridErrorStokes3D_GLS_velocity_pressure_sd";
1733 static const char __pyx_k_calculateSubgridErrorStokes3D_GL_5[] =
"calculateSubgridErrorStokes3D_GLS_tauRes";
1734 static const char __pyx_k_calculateSubgridError_ADR_generi_2[] =
"calculateSubgridError_ADR_generic_tau_sd";
1735 static const char __pyx_k_calculateSubgridErrorNavierStoke_10[] =
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure_sd";
1736 static PyObject *__pyx_n_s_ImportError;
1737 static PyObject *__pyx_n_s_a;
1738 static PyObject *__pyx_n_s_calculateSubgridErrorGradient_ta;
1739 static PyObject *__pyx_n_s_calculateSubgridErrorNavierStoke;
1740 static PyObject *__pyx_n_s_calculateSubgridErrorNavierStoke_10;
1741 static PyObject *__pyx_n_s_calculateSubgridErrorNavierStoke_2;
1742 static PyObject *__pyx_n_s_calculateSubgridErrorNavierStoke_3;
1743 static PyObject *__pyx_n_s_calculateSubgridErrorNavierStoke_4;
1744 static PyObject *__pyx_n_s_calculateSubgridErrorNavierStoke_5;
1745 static PyObject *__pyx_n_s_calculateSubgridErrorNavierStoke_6;
1746 static PyObject *__pyx_n_s_calculateSubgridErrorNavierStoke_7;
1747 static PyObject *__pyx_n_s_calculateSubgridErrorNavierStoke_8;
1748 static PyObject *__pyx_n_s_calculateSubgridErrorNavierStoke_9;
1749 static PyObject *__pyx_n_s_calculateSubgridErrorShallowWate;
1750 static PyObject *__pyx_n_s_calculateSubgridErrorShallowWate_2;
1751 static PyObject *__pyx_n_s_calculateSubgridErrorStokes2D_1;
1752 static PyObject *__pyx_n_s_calculateSubgridErrorStokes2D_1_2;
1753 static PyObject *__pyx_n_s_calculateSubgridErrorStokes2D_GL;
1754 static PyObject *__pyx_n_s_calculateSubgridErrorStokes2D_GL_2;
1755 static PyObject *__pyx_n_s_calculateSubgridErrorStokes2D_GL_3;
1756 static PyObject *__pyx_n_s_calculateSubgridErrorStokes2D_GL_4;
1757 static PyObject *__pyx_n_s_calculateSubgridErrorStokes2D_GL_5;
1758 static PyObject *__pyx_n_s_calculateSubgridErrorStokes3D_GL;
1759 static PyObject *__pyx_n_s_calculateSubgridErrorStokes3D_GL_2;
1760 static PyObject *__pyx_n_s_calculateSubgridErrorStokes3D_GL_3;
1761 static PyObject *__pyx_n_s_calculateSubgridErrorStokes3D_GL_4;
1762 static PyObject *__pyx_n_s_calculateSubgridErrorStokes3D_GL_5;
1763 static PyObject *__pyx_n_s_calculateSubgridErrorStokes_GLS;
1764 static PyObject *__pyx_n_s_calculateSubgridErrorStokes_GLS_2;
1765 static PyObject *__pyx_n_s_calculateSubgridError_ADR_Sangal;
1766 static PyObject *__pyx_n_s_calculateSubgridError_ADR_generi;
1767 static PyObject *__pyx_n_s_calculateSubgridError_ADR_generi_2;
1768 static PyObject *__pyx_n_s_calculateSubgridError_ADR_tau;
1769 static PyObject *__pyx_n_s_calculateSubgridError_ADR_tau_sd;
1770 static PyObject *__pyx_n_s_calculateSubgridError_A_tau;
1771 static PyObject *__pyx_n_s_calculateSubgridError_HJ_tau;
1772 static PyObject *__pyx_n_s_calculateSubgridError_Harari_tau;
1773 static PyObject *__pyx_n_s_calculateSubgridError_tauRes;
1774 static PyObject *__pyx_n_s_cfl;
1775 static PyObject *__pyx_n_s_cfl_1;
1776 static PyObject *__pyx_n_s_cfl_2;
1777 static PyObject *__pyx_n_s_cfl_3;
1778 static PyObject *__pyx_n_s_cline_in_traceback;
1779 static PyObject *__pyx_n_s_colind;
1780 static PyObject *__pyx_n_s_csubgridError;
1781 static PyObject *__pyx_n_s_dH;
1782 static PyObject *__pyx_n_s_da;
1783 static PyObject *__pyx_n_s_df;
1784 static PyObject *__pyx_n_s_dm;
1785 static PyObject *__pyx_n_s_dmt;
1786 static PyObject *__pyx_n_s_dpdeResidual;
1787 static PyObject *__pyx_n_s_dpdeResidualP_du;
1788 static PyObject *__pyx_n_s_dpdeResidualP_dv;
1789 static PyObject *__pyx_n_s_dpdeResidualP_dw;
1790 static PyObject *__pyx_n_s_dpdeResidualU_dp;
1791 static PyObject *__pyx_n_s_dpdeResidualU_du;
1792 static PyObject *__pyx_n_s_dpdeResidualU_dv;
1793 static PyObject *__pyx_n_s_dpdeResidualU_dw;
1794 static PyObject *__pyx_n_s_dpdeResidualV_dp;
1795 static PyObject *__pyx_n_s_dpdeResidualV_du;
1796 static PyObject *__pyx_n_s_dpdeResidualV_dv;
1797 static PyObject *__pyx_n_s_dpdeResidualV_dw;
1798 static PyObject *__pyx_n_s_dpdeResidualW_dp;
1799 static PyObject *__pyx_n_s_dpdeResidualW_du;
1800 static PyObject *__pyx_n_s_dpdeResidualW_dv;
1801 static PyObject *__pyx_n_s_dpdeResidualW_dw;
1802 static PyObject *__pyx_n_s_dphi;
1803 static PyObject *__pyx_n_s_dr;
1804 static PyObject *__pyx_n_s_dsubgridError;
1805 static PyObject *__pyx_n_s_dsubgridErrorP_dp;
1806 static PyObject *__pyx_n_s_dsubgridErrorP_du;
1807 static PyObject *__pyx_n_s_dsubgridErrorP_dv;
1808 static PyObject *__pyx_n_s_dsubgridErrorP_dw;
1809 static PyObject *__pyx_n_s_dsubgridErrorU_dp;
1810 static PyObject *__pyx_n_s_dsubgridErrorU_du;
1811 static PyObject *__pyx_n_s_dsubgridErrorU_dv;
1812 static PyObject *__pyx_n_s_dsubgridErrorU_dw;
1813 static PyObject *__pyx_n_s_dsubgridErrorV_dp;
1814 static PyObject *__pyx_n_s_dsubgridErrorV_du;
1815 static PyObject *__pyx_n_s_dsubgridErrorV_dv;
1816 static PyObject *__pyx_n_s_dsubgridErrorV_dw;
1817 static PyObject *__pyx_n_s_dsubgridErrorW_dp;
1818 static PyObject *__pyx_n_s_dsubgridErrorW_du;
1819 static PyObject *__pyx_n_s_dsubgridErrorW_dv;
1820 static PyObject *__pyx_n_s_dsubgridErrorW_dw;
1821 static PyObject *__pyx_n_s_dt;
1822 static PyObject *__pyx_n_s_elementDiameter;
1823 static PyObject *__pyx_n_s_f;
1824 static PyObject *__pyx_n_s_g;
1825 static PyObject *__pyx_n_s_grad_pdeResidual;
1826 static PyObject *__pyx_n_s_grad_phi;
1827 static PyObject *__pyx_n_s_grad_subgridError;
1828 static PyObject *__pyx_n_s_h;
1829 static PyObject *__pyx_n_s_hFactor;
1830 static PyObject *__pyx_n_s_hu;
1831 static PyObject *__pyx_n_s_hv;
1832 static PyObject *__pyx_n_s_import;
1833 static PyObject *__pyx_n_s_inverseJ;
1834 static PyObject *__pyx_n_s_main;
1835 static PyObject *__pyx_n_s_nSpace;
1836 static PyObject *__pyx_n_s_name;
1837 static PyObject *__pyx_n_s_np;
1838 static PyObject *__pyx_n_s_numpy;
1839 static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to;
1840 static PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor;
1841 static PyObject *__pyx_n_s_pdeResidual;
1842 static PyObject *__pyx_n_s_pdeResidualP;
1843 static PyObject *__pyx_n_s_pdeResidualU;
1844 static PyObject *__pyx_n_s_pdeResidualV;
1845 static PyObject *__pyx_n_s_pdeResidualW;
1846 static PyObject *__pyx_n_s_pe;
1847 static PyObject *__pyx_kp_s_proteus_csubgridError_pyx;
1848 static PyObject *__pyx_n_s_rowptr;
1849 static PyObject *__pyx_n_s_stabilization;
1850 static PyObject *__pyx_n_s_subgridError;
1851 static PyObject *__pyx_n_s_subgridErrorP;
1852 static PyObject *__pyx_n_s_subgridErrorU;
1853 static PyObject *__pyx_n_s_subgridErrorV;
1854 static PyObject *__pyx_n_s_subgridErrorW;
1855 static PyObject *__pyx_n_s_tau;
1856 static PyObject *__pyx_n_s_tau0;
1857 static PyObject *__pyx_n_s_tau1;
1858 static PyObject *__pyx_n_s_tau_gradient;
1859 static PyObject *__pyx_n_s_test;
1860 static PyObject *__pyx_n_s_u;
1861 static PyObject *__pyx_n_s_v;
1862 static PyObject *__pyx_pf_13csubgridError_calculateSubgridError_tauRes(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_tau, PyArrayObject *__pyx_v_pdeResidual, PyArrayObject *__pyx_v_dpdeResidual, PyArrayObject *__pyx_v_subgridError, PyArrayObject *__pyx_v_dsubgridError);
1863 static PyObject *__pyx_pf_13csubgridError_2calculateSubgridError_ADR_generic_tau(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_inverseJ, PyArrayObject *__pyx_v_dmt, PyArrayObject *__pyx_v_df, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_da, PyArrayObject *__pyx_v_grad_phi, PyArrayObject *__pyx_v_dphi, PyArrayObject *__pyx_v_dr, PyArrayObject *__pyx_v_pe, PyArrayObject *__pyx_v_cfl, PyArrayObject *__pyx_v_tau);
1864 static PyObject *__pyx_pf_13csubgridError_4calculateSubgridError_ADR_generic_tau_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_inverseJ, PyArrayObject *__pyx_v_dmt, PyArrayObject *__pyx_v_df, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_da, PyArrayObject *__pyx_v_grad_phi, PyArrayObject *__pyx_v_dphi, PyArrayObject *__pyx_v_dr, PyArrayObject *__pyx_v_pe, PyArrayObject *__pyx_v_cfl, PyArrayObject *__pyx_v_tau);
1865 static PyObject *__pyx_pf_13csubgridError_6calculateSubgridError_ADR_tau(CYTHON_UNUSED PyObject *__pyx_self,
char __pyx_v_stabilization, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_dmt, PyArrayObject *__pyx_v_df, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_da, PyArrayObject *__pyx_v_grad_phi, PyArrayObject *__pyx_v_dphi, PyArrayObject *__pyx_v_dr, PyArrayObject *__pyx_v_pe, PyArrayObject *__pyx_v_cfl, PyArrayObject *__pyx_v_tau);
1866 static PyObject *__pyx_pf_13csubgridError_8calculateSubgridError_ADR_tau_sd(CYTHON_UNUSED PyObject *__pyx_self,
char __pyx_v_stabilization, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_dmt, PyArrayObject *__pyx_v_df, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_da, PyArrayObject *__pyx_v_grad_phi, PyArrayObject *__pyx_v_dphi, PyArrayObject *__pyx_v_dr, PyArrayObject *__pyx_v_pe, PyArrayObject *__pyx_v_cfl, PyArrayObject *__pyx_v_tau);
1867 static PyObject *__pyx_pf_13csubgridError_10calculateSubgridError_A_tau(CYTHON_UNUSED PyObject *__pyx_self,
char __pyx_v_stabilization, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_dmt, PyArrayObject *__pyx_v_df, PyArrayObject *__pyx_v_cfl, PyArrayObject *__pyx_v_tau);
1868 static PyObject *__pyx_pf_13csubgridError_12calculateSubgridError_HJ_tau(CYTHON_UNUSED PyObject *__pyx_self,
char __pyx_v_stabilization, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_dmt, PyArrayObject *__pyx_v_dH, PyArrayObject *__pyx_v_cfl, PyArrayObject *__pyx_v_tau);
1869 static PyObject *__pyx_pf_13csubgridError_14calculateSubgridErrorStokes2D_GLS_velocity(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_pdeResidualU, PyArrayObject *__pyx_v_dpdeResidualU_dp, PyArrayObject *__pyx_v_dpdeResidualU_du, PyArrayObject *__pyx_v_pdeResidualV, PyArrayObject *__pyx_v_dpdeResidualV_dp, PyArrayObject *__pyx_v_dpdeResidualV_dv, PyArrayObject *__pyx_v_subgridErrorU, PyArrayObject *__pyx_v_dsubgridErrorU_dp, PyArrayObject *__pyx_v_dsubgridErrorU_du, PyArrayObject *__pyx_v_subgridErrorV, PyArrayObject *__pyx_v_dsubgridErrorV_dp, PyArrayObject *__pyx_v_dsubgridErrorV_dv);
1870 static PyObject *__pyx_pf_13csubgridError_16calculateSubgridErrorStokes2D_GLS_velocity_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_pdeResidualU, PyArrayObject *__pyx_v_dpdeResidualU_dp, PyArrayObject *__pyx_v_dpdeResidualU_du, PyArrayObject *__pyx_v_pdeResidualV, PyArrayObject *__pyx_v_dpdeResidualV_dp, PyArrayObject *__pyx_v_dpdeResidualV_dv, PyArrayObject *__pyx_v_subgridErrorU, PyArrayObject *__pyx_v_dsubgridErrorU_dp, PyArrayObject *__pyx_v_dsubgridErrorU_du, PyArrayObject *__pyx_v_subgridErrorV, PyArrayObject *__pyx_v_dsubgridErrorV_dp, PyArrayObject *__pyx_v_dsubgridErrorV_dv);
1871 static PyObject *__pyx_pf_13csubgridError_18calculateSubgridErrorStokes3D_GLS_velocity(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_pdeResidualU, PyArrayObject *__pyx_v_dpdeResidualU_dp, PyArrayObject *__pyx_v_dpdeResidualU_du, PyArrayObject *__pyx_v_pdeResidualV, PyArrayObject *__pyx_v_dpdeResidualV_dp, PyArrayObject *__pyx_v_dpdeResidualV_dv, PyArrayObject *__pyx_v_pdeResidualW, PyArrayObject *__pyx_v_dpdeResidualW_dp, PyArrayObject *__pyx_v_dpdeResidualW_dw, PyArrayObject *__pyx_v_subgridErrorU, PyArrayObject *__pyx_v_dsubgridErrorU_dp, PyArrayObject *__pyx_v_dsubgridErrorU_du, PyArrayObject *__pyx_v_subgridErrorV, PyArrayObject *__pyx_v_dsubgridErrorV_dp, PyArrayObject *__pyx_v_dsubgridErrorV_dv, PyArrayObject *__pyx_v_subgridErrorW, PyArrayObject *__pyx_v_dsubgridErrorW_dp, PyArrayObject *__pyx_v_dsubgridErrorW_dw);
1872 static PyObject *__pyx_pf_13csubgridError_20calculateSubgridErrorStokes3D_GLS_velocity_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_pdeResidualU, PyArrayObject *__pyx_v_dpdeResidualU_dp, PyArrayObject *__pyx_v_dpdeResidualU_du, PyArrayObject *__pyx_v_pdeResidualV, PyArrayObject *__pyx_v_dpdeResidualV_dp, PyArrayObject *__pyx_v_dpdeResidualV_dv, PyArrayObject *__pyx_v_pdeResidualW, PyArrayObject *__pyx_v_dpdeResidualW_dp, PyArrayObject *__pyx_v_dpdeResidualW_dw, PyArrayObject *__pyx_v_subgridErrorU, PyArrayObject *__pyx_v_dsubgridErrorU_dp, PyArrayObject *__pyx_v_dsubgridErrorU_du, PyArrayObject *__pyx_v_subgridErrorV, PyArrayObject *__pyx_v_dsubgridErrorV_dp, PyArrayObject *__pyx_v_dsubgridErrorV_dv, PyArrayObject *__pyx_v_subgridErrorW, PyArrayObject *__pyx_v_dsubgridErrorW_dp, PyArrayObject *__pyx_v_dsubgridErrorW_dw);
1873 static PyObject *__pyx_pf_13csubgridError_22calculateSubgridErrorStokes2D_GLS_velocity_pressure(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_pdeResidualP, PyArrayObject *__pyx_v_dpdeResidualP_du, PyArrayObject *__pyx_v_dpdeResidualP_dv, PyArrayObject *__pyx_v_pdeResidualU, PyArrayObject *__pyx_v_dpdeResidualU_dp, PyArrayObject *__pyx_v_dpdeResidualU_du, PyArrayObject *__pyx_v_pdeResidualV, PyArrayObject *__pyx_v_dpdeResidualV_dp, PyArrayObject *__pyx_v_dpdeResidualV_dv, PyArrayObject *__pyx_v_subgridErrorP, PyArrayObject *__pyx_v_dsubgridErrorP_du, PyArrayObject *__pyx_v_dsubgridErrorP_dv, PyArrayObject *__pyx_v_subgridErrorU, PyArrayObject *__pyx_v_dsubgridErrorU_dp, PyArrayObject *__pyx_v_dsubgridErrorU_du, PyArrayObject *__pyx_v_subgridErrorV, PyArrayObject *__pyx_v_dsubgridErrorV_dp, PyArrayObject *__pyx_v_dsubgridErrorV_dv);
1874 static PyObject *__pyx_pf_13csubgridError_24calculateSubgridErrorStokes2D_GLS_velocity_pressure_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_pdeResidualP, PyArrayObject *__pyx_v_dpdeResidualP_du, PyArrayObject *__pyx_v_dpdeResidualP_dv, PyArrayObject *__pyx_v_pdeResidualU, PyArrayObject *__pyx_v_dpdeResidualU_dp, PyArrayObject *__pyx_v_dpdeResidualU_du, PyArrayObject *__pyx_v_pdeResidualV, PyArrayObject *__pyx_v_dpdeResidualV_dp, PyArrayObject *__pyx_v_dpdeResidualV_dv, PyArrayObject *__pyx_v_subgridErrorP, PyArrayObject *__pyx_v_dsubgridErrorP_du, PyArrayObject *__pyx_v_dsubgridErrorP_dv, PyArrayObject *__pyx_v_subgridErrorU, PyArrayObject *__pyx_v_dsubgridErrorU_dp, PyArrayObject *__pyx_v_dsubgridErrorU_du, PyArrayObject *__pyx_v_subgridErrorV, PyArrayObject *__pyx_v_dsubgridErrorV_dp, PyArrayObject *__pyx_v_dsubgridErrorV_dv);
1875 static PyObject *__pyx_pf_13csubgridError_26calculateSubgridErrorStokes3D_GLS_velocity_pressure(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_pdeResidualP, PyArrayObject *__pyx_v_dpdeResidualP_du, PyArrayObject *__pyx_v_dpdeResidualP_dv, PyArrayObject *__pyx_v_dpdeResidualP_dw, PyArrayObject *__pyx_v_pdeResidualU, PyArrayObject *__pyx_v_dpdeResidualU_dp, PyArrayObject *__pyx_v_dpdeResidualU_du, PyArrayObject *__pyx_v_pdeResidualV, PyArrayObject *__pyx_v_dpdeResidualV_dp, PyArrayObject *__pyx_v_dpdeResidualV_dv, PyArrayObject *__pyx_v_pdeResidualW, PyArrayObject *__pyx_v_dpdeResidualW_dp, PyArrayObject *__pyx_v_dpdeResidualW_dw, PyArrayObject *__pyx_v_subgridErrorP, PyArrayObject *__pyx_v_dsubgridErrorP_du, PyArrayObject *__pyx_v_dsubgridErrorP_dv, PyArrayObject *__pyx_v_dsubgridErrorP_dw, PyArrayObject *__pyx_v_subgridErrorU, PyArrayObject *__pyx_v_dsubgridErrorU_dp, PyArrayObject *__pyx_v_dsubgridErrorU_du, PyArrayObject *__pyx_v_subgridErrorV, PyArrayObject *__pyx_v_dsubgridErrorV_dp, PyArrayObject *__pyx_v_dsubgridErrorV_dv, PyArrayObject *__pyx_v_subgridErrorW, PyArrayObject *__pyx_v_dsubgridErrorW_dp, PyArrayObject *__pyx_v_dsubgridErrorW_dw);
1876 static PyObject *__pyx_pf_13csubgridError_28calculateSubgridErrorStokes3D_GLS_velocity_pressure_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_pdeResidualP, PyArrayObject *__pyx_v_dpdeResidualP_du, PyArrayObject *__pyx_v_dpdeResidualP_dv, PyArrayObject *__pyx_v_dpdeResidualP_dw, PyArrayObject *__pyx_v_pdeResidualU, PyArrayObject *__pyx_v_dpdeResidualU_dp, PyArrayObject *__pyx_v_dpdeResidualU_du, PyArrayObject *__pyx_v_pdeResidualV, PyArrayObject *__pyx_v_dpdeResidualV_dp, PyArrayObject *__pyx_v_dpdeResidualV_dv, PyArrayObject *__pyx_v_pdeResidualW, PyArrayObject *__pyx_v_dpdeResidualW_dp, PyArrayObject *__pyx_v_dpdeResidualW_dw, PyArrayObject *__pyx_v_subgridErrorP, PyArrayObject *__pyx_v_dsubgridErrorP_du, PyArrayObject *__pyx_v_dsubgridErrorP_dv, PyArrayObject *__pyx_v_dsubgridErrorP_dw, PyArrayObject *__pyx_v_subgridErrorU, PyArrayObject *__pyx_v_dsubgridErrorU_dp, PyArrayObject *__pyx_v_dsubgridErrorU_du, PyArrayObject *__pyx_v_subgridErrorV, PyArrayObject *__pyx_v_dsubgridErrorV_dp, PyArrayObject *__pyx_v_dsubgridErrorV_dv, PyArrayObject *__pyx_v_subgridErrorW, PyArrayObject *__pyx_v_dsubgridErrorW_dp, PyArrayObject *__pyx_v_dsubgridErrorW_dw);
1877 static PyObject *__pyx_pf_13csubgridError_30calculateSubgridErrorNavierStokes2D_GLS_tau(CYTHON_UNUSED PyObject *__pyx_self,
double __pyx_v_hFactor, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_dmt, PyArrayObject *__pyx_v_dm, PyArrayObject *__pyx_v_f, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_tau0, PyArrayObject *__pyx_v_tau1, PyArrayObject *__pyx_v_cfl);
1878 static PyObject *__pyx_pf_13csubgridError_32calculateSubgridErrorNavierStokes2D_GLS_tau_sd(CYTHON_UNUSED PyObject *__pyx_self,
double __pyx_v_hFactor, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_dmt, PyArrayObject *__pyx_v_dm, PyArrayObject *__pyx_v_f, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_tau0, PyArrayObject *__pyx_v_tau1, PyArrayObject *__pyx_v_cfl);
1879 static PyObject *__pyx_pf_13csubgridError_34calculateSubgridErrorNavierStokes2D_generic_tau(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_inverseJ, PyArrayObject *__pyx_v_dmt, PyArrayObject *__pyx_v_dm, PyArrayObject *__pyx_v_f, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_tau0, PyArrayObject *__pyx_v_tau1, PyArrayObject *__pyx_v_cfl);
1880 static PyObject *__pyx_pf_13csubgridError_36calculateSubgridErrorNavierStokes2D_generic_tau_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_inverseJ, PyArrayObject *__pyx_v_dmt, PyArrayObject *__pyx_v_dm, PyArrayObject *__pyx_v_f, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_tau0, PyArrayObject *__pyx_v_tau1, PyArrayObject *__pyx_v_cfl);
1881 static PyObject *__pyx_pf_13csubgridError_38calculateSubgridErrorNavierStokes2D_generic_withBodyForce_tau(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_inverseJ, PyArrayObject *__pyx_v_dmt, PyArrayObject *__pyx_v_dm, PyArrayObject *__pyx_v_f, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_dr, PyArrayObject *__pyx_v_tau0, PyArrayObject *__pyx_v_tau1, PyArrayObject *__pyx_v_cfl);
1882 static PyObject *__pyx_pf_13csubgridError_40calculateSubgridErrorNavierStokes2D_generic_withBodyForce_tau_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_inverseJ, PyArrayObject *__pyx_v_dmt, PyArrayObject *__pyx_v_dm, PyArrayObject *__pyx_v_f, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_dr, PyArrayObject *__pyx_v_tau0, PyArrayObject *__pyx_v_tau1, PyArrayObject *__pyx_v_cfl);
1883 static PyObject *__pyx_pf_13csubgridError_42calculateSubgridErrorNavierStokes2D_GLS_tauRes(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_tau0, PyArrayObject *__pyx_v_tau1, PyArrayObject *__pyx_v_pdeResidualP, PyArrayObject *__pyx_v_dpdeResidualP_du, PyArrayObject *__pyx_v_dpdeResidualP_dv, PyArrayObject *__pyx_v_pdeResidualU, PyArrayObject *__pyx_v_dpdeResidualU_dp, PyArrayObject *__pyx_v_dpdeResidualU_du, PyArrayObject *__pyx_v_dpdeResidualU_dv, PyArrayObject *__pyx_v_pdeResidualV, PyArrayObject *__pyx_v_dpdeResidualV_dp, PyArrayObject *__pyx_v_dpdeResidualV_du, PyArrayObject *__pyx_v_dpdeResidualV_dv, PyArrayObject *__pyx_v_subgridErrorP, PyArrayObject *__pyx_v_dsubgridErrorP_du, PyArrayObject *__pyx_v_dsubgridErrorP_dv, PyArrayObject *__pyx_v_subgridErrorU, PyArrayObject *__pyx_v_dsubgridErrorU_dp, PyArrayObject *__pyx_v_dsubgridErrorU_du, PyArrayObject *__pyx_v_dsubgridErrorU_dv, PyArrayObject *__pyx_v_subgridErrorV, PyArrayObject *__pyx_v_dsubgridErrorV_dp, PyArrayObject *__pyx_v_dsubgridErrorV_du, PyArrayObject *__pyx_v_dsubgridErrorV_dv);
1884 static PyObject *__pyx_pf_13csubgridError_44calculateSubgridErrorStokes_GLS_tau(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_dH, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_tau0, PyArrayObject *__pyx_v_tau1);
1885 static PyObject *__pyx_pf_13csubgridError_46calculateSubgridErrorStokes_GLS_tau_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_dH, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_tau0, PyArrayObject *__pyx_v_tau1);
1886 static PyObject *__pyx_pf_13csubgridError_48calculateSubgridErrorStokes2D_GLS_tauRes(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_tau0, PyArrayObject *__pyx_v_tau1, PyArrayObject *__pyx_v_pdeResidualP, PyArrayObject *__pyx_v_dpdeResidualP_du, PyArrayObject *__pyx_v_dpdeResidualP_dv, PyArrayObject *__pyx_v_pdeResidualU, PyArrayObject *__pyx_v_dpdeResidualU_dp, PyArrayObject *__pyx_v_dpdeResidualU_du, PyArrayObject *__pyx_v_pdeResidualV, PyArrayObject *__pyx_v_dpdeResidualV_dp, PyArrayObject *__pyx_v_dpdeResidualV_dv, PyArrayObject *__pyx_v_subgridErrorP, PyArrayObject *__pyx_v_dsubgridErrorP_du, PyArrayObject *__pyx_v_dsubgridErrorP_dv, PyArrayObject *__pyx_v_subgridErrorU, PyArrayObject *__pyx_v_dsubgridErrorU_dp, PyArrayObject *__pyx_v_dsubgridErrorU_du, PyArrayObject *__pyx_v_subgridErrorV, PyArrayObject *__pyx_v_dsubgridErrorV_dp, PyArrayObject *__pyx_v_dsubgridErrorV_dv);
1887 static PyObject *__pyx_pf_13csubgridError_50calculateSubgridErrorStokes3D_GLS_tauRes(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_tau0, PyArrayObject *__pyx_v_tau1, PyArrayObject *__pyx_v_pdeResidualP, PyArrayObject *__pyx_v_dpdeResidualP_du, PyArrayObject *__pyx_v_dpdeResidualP_dv, PyArrayObject *__pyx_v_dpdeResidualP_dw, PyArrayObject *__pyx_v_pdeResidualU, PyArrayObject *__pyx_v_dpdeResidualU_dp, PyArrayObject *__pyx_v_dpdeResidualU_du, PyArrayObject *__pyx_v_pdeResidualV, PyArrayObject *__pyx_v_dpdeResidualV_dp, PyArrayObject *__pyx_v_dpdeResidualV_dv, PyArrayObject *__pyx_v_pdeResidualW, PyArrayObject *__pyx_v_dpdeResidualW_dp, PyArrayObject *__pyx_v_dpdeResidualW_dw, PyArrayObject *__pyx_v_subgridErrorP, PyArrayObject *__pyx_v_dsubgridErrorP_du, PyArrayObject *__pyx_v_dsubgridErrorP_dv, PyArrayObject *__pyx_v_dsubgridErrorP_dw, PyArrayObject *__pyx_v_subgridErrorU, PyArrayObject *__pyx_v_dsubgridErrorU_dp, PyArrayObject *__pyx_v_dsubgridErrorU_du, PyArrayObject *__pyx_v_subgridErrorV, PyArrayObject *__pyx_v_dsubgridErrorV_dp, PyArrayObject *__pyx_v_dsubgridErrorV_dv, PyArrayObject *__pyx_v_subgridErrorW, PyArrayObject *__pyx_v_dsubgridErrorW_dp, PyArrayObject *__pyx_v_dsubgridErrorW_dw);
1888 static PyObject *__pyx_pf_13csubgridError_52calculateSubgridErrorNavierStokes3D_GLS_tauRes(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_tau0, PyArrayObject *__pyx_v_tau1, PyArrayObject *__pyx_v_pdeResidualP, PyArrayObject *__pyx_v_dpdeResidualP_du, PyArrayObject *__pyx_v_dpdeResidualP_dv, PyArrayObject *__pyx_v_dpdeResidualP_dw, PyArrayObject *__pyx_v_pdeResidualU, PyArrayObject *__pyx_v_dpdeResidualU_dp, PyArrayObject *__pyx_v_dpdeResidualU_du, PyArrayObject *__pyx_v_dpdeResidualU_dv, PyArrayObject *__pyx_v_dpdeResidualU_dw, PyArrayObject *__pyx_v_pdeResidualV, PyArrayObject *__pyx_v_dpdeResidualV_dp, PyArrayObject *__pyx_v_dpdeResidualV_du, PyArrayObject *__pyx_v_dpdeResidualV_dv, PyArrayObject *__pyx_v_dpdeResidualV_dw, PyArrayObject *__pyx_v_pdeResidualW, PyArrayObject *__pyx_v_dpdeResidualW_dp, PyArrayObject *__pyx_v_dpdeResidualW_du, PyArrayObject *__pyx_v_dpdeResidualW_dv, PyArrayObject *__pyx_v_dpdeResidualW_dw, PyArrayObject *__pyx_v_subgridErrorP, PyArrayObject *__pyx_v_dsubgridErrorP_du, PyArrayObject *__pyx_v_dsubgridErrorP_dv, PyArrayObject *__pyx_v_dsubgridErrorP_dw, PyArrayObject *__pyx_v_subgridErrorU, PyArrayObject *__pyx_v_dsubgridErrorU_dp, PyArrayObject *__pyx_v_dsubgridErrorU_du, PyArrayObject *__pyx_v_dsubgridErrorU_dv, PyArrayObject *__pyx_v_dsubgridErrorU_dw, PyArrayObject *__pyx_v_subgridErrorV, PyArrayObject *__pyx_v_dsubgridErrorV_dp, PyArrayObject *__pyx_v_dsubgridErrorV_du, PyArrayObject *__pyx_v_dsubgridErrorV_dv, PyArrayObject *__pyx_v_dsubgridErrorV_dw, PyArrayObject *__pyx_v_subgridErrorW, PyArrayObject *__pyx_v_dsubgridErrorW_dp, PyArrayObject *__pyx_v_dsubgridErrorW_du, PyArrayObject *__pyx_v_dsubgridErrorW_dv, PyArrayObject *__pyx_v_dsubgridErrorW_dw);
1889 static PyObject *__pyx_pf_13csubgridError_54calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_dm, PyArrayObject *__pyx_v_f, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_pdeResidualP, PyArrayObject *__pyx_v_dpdeResidualP_du, PyArrayObject *__pyx_v_dpdeResidualP_dv, PyArrayObject *__pyx_v_dpdeResidualP_dw, PyArrayObject *__pyx_v_pdeResidualU, PyArrayObject *__pyx_v_dpdeResidualU_dp, PyArrayObject *__pyx_v_dpdeResidualU_du, PyArrayObject *__pyx_v_pdeResidualV, PyArrayObject *__pyx_v_dpdeResidualV_dp, PyArrayObject *__pyx_v_dpdeResidualV_dv, PyArrayObject *__pyx_v_pdeResidualW, PyArrayObject *__pyx_v_dpdeResidualW_dp, PyArrayObject *__pyx_v_dpdeResidualW_dw, PyArrayObject *__pyx_v_subgridErrorP, PyArrayObject *__pyx_v_dsubgridErrorP_du, PyArrayObject *__pyx_v_dsubgridErrorP_dv, PyArrayObject *__pyx_v_dsubgridErrorP_dw, PyArrayObject *__pyx_v_subgridErrorU, PyArrayObject *__pyx_v_dsubgridErrorU_dp, PyArrayObject *__pyx_v_dsubgridErrorU_du, PyArrayObject *__pyx_v_subgridErrorV, PyArrayObject *__pyx_v_dsubgridErrorV_dp, PyArrayObject *__pyx_v_dsubgridErrorV_dv, PyArrayObject *__pyx_v_subgridErrorW, PyArrayObject *__pyx_v_dsubgridErrorW_dp, PyArrayObject *__pyx_v_dsubgridErrorW_dw);
1890 static PyObject *__pyx_pf_13csubgridError_56calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_dm, PyArrayObject *__pyx_v_f, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_pdeResidualP, PyArrayObject *__pyx_v_dpdeResidualP_du, PyArrayObject *__pyx_v_dpdeResidualP_dv, PyArrayObject *__pyx_v_dpdeResidualP_dw, PyArrayObject *__pyx_v_pdeResidualU, PyArrayObject *__pyx_v_dpdeResidualU_dp, PyArrayObject *__pyx_v_dpdeResidualU_du, PyArrayObject *__pyx_v_pdeResidualV, PyArrayObject *__pyx_v_dpdeResidualV_dp, PyArrayObject *__pyx_v_dpdeResidualV_dv, PyArrayObject *__pyx_v_pdeResidualW, PyArrayObject *__pyx_v_dpdeResidualW_dp, PyArrayObject *__pyx_v_dpdeResidualW_dw, PyArrayObject *__pyx_v_subgridErrorP, PyArrayObject *__pyx_v_dsubgridErrorP_du, PyArrayObject *__pyx_v_dsubgridErrorP_dv, PyArrayObject *__pyx_v_dsubgridErrorP_dw, PyArrayObject *__pyx_v_subgridErrorU, PyArrayObject *__pyx_v_dsubgridErrorU_dp, PyArrayObject *__pyx_v_dsubgridErrorU_du, PyArrayObject *__pyx_v_subgridErrorV, PyArrayObject *__pyx_v_dsubgridErrorV_dp, PyArrayObject *__pyx_v_dsubgridErrorV_dv, PyArrayObject *__pyx_v_subgridErrorW, PyArrayObject *__pyx_v_dsubgridErrorW_dp, PyArrayObject *__pyx_v_dsubgridErrorW_dw);
1891 static PyObject *__pyx_pf_13csubgridError_58calculateSubgridErrorStokes2D_1(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_u, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_pdeResidualP, PyArrayObject *__pyx_v_dpdeResidualP_du, PyArrayObject *__pyx_v_dpdeResidualP_dv, PyArrayObject *__pyx_v_pdeResidualU, PyArrayObject *__pyx_v_dpdeResidualU_dp, PyArrayObject *__pyx_v_dpdeResidualU_du, PyArrayObject *__pyx_v_pdeResidualV, PyArrayObject *__pyx_v_dpdeResidualV_dp, PyArrayObject *__pyx_v_dpdeResidualV_dv, PyArrayObject *__pyx_v_subgridErrorP, PyArrayObject *__pyx_v_dsubgridErrorP_dp, PyArrayObject *__pyx_v_dsubgridErrorP_du, PyArrayObject *__pyx_v_dsubgridErrorP_dv, PyArrayObject *__pyx_v_subgridErrorU, PyArrayObject *__pyx_v_dsubgridErrorU_dp, PyArrayObject *__pyx_v_dsubgridErrorU_du, PyArrayObject *__pyx_v_dsubgridErrorU_dv, PyArrayObject *__pyx_v_subgridErrorV, PyArrayObject *__pyx_v_dsubgridErrorV_dp, PyArrayObject *__pyx_v_dsubgridErrorV_du, PyArrayObject *__pyx_v_dsubgridErrorV_dv);
1892 static PyObject *__pyx_pf_13csubgridError_60calculateSubgridErrorStokes2D_1_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_u, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_pdeResidualP, PyArrayObject *__pyx_v_dpdeResidualP_du, PyArrayObject *__pyx_v_dpdeResidualP_dv, PyArrayObject *__pyx_v_pdeResidualU, PyArrayObject *__pyx_v_dpdeResidualU_dp, PyArrayObject *__pyx_v_dpdeResidualU_du, PyArrayObject *__pyx_v_pdeResidualV, PyArrayObject *__pyx_v_dpdeResidualV_dp, PyArrayObject *__pyx_v_dpdeResidualV_dv, PyArrayObject *__pyx_v_subgridErrorP, PyArrayObject *__pyx_v_dsubgridErrorP_dp, PyArrayObject *__pyx_v_dsubgridErrorP_du, PyArrayObject *__pyx_v_dsubgridErrorP_dv, PyArrayObject *__pyx_v_subgridErrorU, PyArrayObject *__pyx_v_dsubgridErrorU_dp, PyArrayObject *__pyx_v_dsubgridErrorU_du, PyArrayObject *__pyx_v_dsubgridErrorU_dv, PyArrayObject *__pyx_v_subgridErrorV, PyArrayObject *__pyx_v_dsubgridErrorV_dp, PyArrayObject *__pyx_v_dsubgridErrorV_du, PyArrayObject *__pyx_v_dsubgridErrorV_dv);
1893 static PyObject *__pyx_pf_13csubgridError_62calculateSubgridErrorShallowWater1D(CYTHON_UNUSED PyObject *__pyx_self,
double __pyx_v_g, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_h, PyArrayObject *__pyx_v_hu, PyArrayObject *__pyx_v_cfl_1, PyArrayObject *__pyx_v_cfl_2);
1894 static PyObject *__pyx_pf_13csubgridError_64calculateSubgridErrorShallowWater2D(CYTHON_UNUSED PyObject *__pyx_self,
double __pyx_v_g, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_h, PyArrayObject *__pyx_v_hu, PyArrayObject *__pyx_v_hv, PyArrayObject *__pyx_v_cfl_1, PyArrayObject *__pyx_v_cfl_2, PyArrayObject *__pyx_v_cfl_3);
1895 static PyObject *__pyx_pf_13csubgridError_66calculateSubgridError_Harari_tau_sd(CYTHON_UNUSED PyObject *__pyx_self,
int __pyx_v_nSpace,
double __pyx_v_dt, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_tau);
1896 static PyObject *__pyx_pf_13csubgridError_68calculateSubgridErrorGradient_tauRes(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_tau_gradient, PyArrayObject *__pyx_v_grad_pdeResidual, PyArrayObject *__pyx_v_grad_subgridError);
1897 static PyObject *__pyx_pf_13csubgridError_70calculateSubgridError_ADR_Sangalli_tau_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_inverseJ, PyArrayObject *__pyx_v_dmt, PyArrayObject *__pyx_v_df, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_da, PyArrayObject *__pyx_v_grad_phi, PyArrayObject *__pyx_v_dphi, PyArrayObject *__pyx_v_dr, PyArrayObject *__pyx_v_pe, PyArrayObject *__pyx_v_cfl, PyArrayObject *__pyx_v_tau, PyArrayObject *__pyx_v_tau_gradient);
1898 static PyObject *__pyx_tuple_;
1899 static PyObject *__pyx_tuple__2;
1900 static PyObject *__pyx_tuple__3;
1901 static PyObject *__pyx_tuple__5;
1902 static PyObject *__pyx_tuple__7;
1903 static PyObject *__pyx_tuple__9;
1904 static PyObject *__pyx_tuple__11;
1905 static PyObject *__pyx_tuple__13;
1906 static PyObject *__pyx_tuple__15;
1907 static PyObject *__pyx_tuple__17;
1908 static PyObject *__pyx_tuple__19;
1909 static PyObject *__pyx_tuple__21;
1910 static PyObject *__pyx_tuple__23;
1911 static PyObject *__pyx_tuple__25;
1912 static PyObject *__pyx_tuple__27;
1913 static PyObject *__pyx_tuple__29;
1914 static PyObject *__pyx_tuple__31;
1915 static PyObject *__pyx_tuple__33;
1916 static PyObject *__pyx_tuple__35;
1917 static PyObject *__pyx_tuple__37;
1918 static PyObject *__pyx_tuple__39;
1919 static PyObject *__pyx_tuple__41;
1920 static PyObject *__pyx_tuple__43;
1921 static PyObject *__pyx_tuple__45;
1922 static PyObject *__pyx_tuple__47;
1923 static PyObject *__pyx_tuple__49;
1924 static PyObject *__pyx_tuple__51;
1925 static PyObject *__pyx_tuple__53;
1926 static PyObject *__pyx_tuple__55;
1927 static PyObject *__pyx_tuple__57;
1928 static PyObject *__pyx_tuple__59;
1929 static PyObject *__pyx_tuple__61;
1930 static PyObject *__pyx_tuple__63;
1931 static PyObject *__pyx_tuple__65;
1932 static PyObject *__pyx_tuple__67;
1933 static PyObject *__pyx_tuple__69;
1934 static PyObject *__pyx_tuple__71;
1935 static PyObject *__pyx_tuple__73;
1936 static PyObject *__pyx_codeobj__4;
1937 static PyObject *__pyx_codeobj__6;
1938 static PyObject *__pyx_codeobj__8;
1939 static PyObject *__pyx_codeobj__10;
1940 static PyObject *__pyx_codeobj__12;
1941 static PyObject *__pyx_codeobj__14;
1942 static PyObject *__pyx_codeobj__16;
1943 static PyObject *__pyx_codeobj__18;
1944 static PyObject *__pyx_codeobj__20;
1945 static PyObject *__pyx_codeobj__22;
1946 static PyObject *__pyx_codeobj__24;
1947 static PyObject *__pyx_codeobj__26;
1948 static PyObject *__pyx_codeobj__28;
1949 static PyObject *__pyx_codeobj__30;
1950 static PyObject *__pyx_codeobj__32;
1951 static PyObject *__pyx_codeobj__34;
1952 static PyObject *__pyx_codeobj__36;
1953 static PyObject *__pyx_codeobj__38;
1954 static PyObject *__pyx_codeobj__40;
1955 static PyObject *__pyx_codeobj__42;
1956 static PyObject *__pyx_codeobj__44;
1957 static PyObject *__pyx_codeobj__46;
1958 static PyObject *__pyx_codeobj__48;
1959 static PyObject *__pyx_codeobj__50;
1960 static PyObject *__pyx_codeobj__52;
1961 static PyObject *__pyx_codeobj__54;
1962 static PyObject *__pyx_codeobj__56;
1963 static PyObject *__pyx_codeobj__58;
1964 static PyObject *__pyx_codeobj__60;
1965 static PyObject *__pyx_codeobj__62;
1966 static PyObject *__pyx_codeobj__64;
1967 static PyObject *__pyx_codeobj__66;
1968 static PyObject *__pyx_codeobj__68;
1969 static PyObject *__pyx_codeobj__70;
1970 static PyObject *__pyx_codeobj__72;
1971 static PyObject *__pyx_codeobj__74;
1983 static PyObject *__pyx_pw_13csubgridError_1calculateSubgridError_tauRes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
1984 static PyMethodDef __pyx_mdef_13csubgridError_1calculateSubgridError_tauRes = {
"calculateSubgridError_tauRes", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_13csubgridError_1calculateSubgridError_tauRes, METH_VARARGS|METH_KEYWORDS, 0};
1985 static PyObject *__pyx_pw_13csubgridError_1calculateSubgridError_tauRes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
1986 PyArrayObject *__pyx_v_tau = 0;
1987 PyArrayObject *__pyx_v_pdeResidual = 0;
1988 PyArrayObject *__pyx_v_dpdeResidual = 0;
1989 PyArrayObject *__pyx_v_subgridError = 0;
1990 PyArrayObject *__pyx_v_dsubgridError = 0;
1991 int __pyx_lineno = 0;
1992 const char *__pyx_filename = NULL;
1993 int __pyx_clineno = 0;
1994 PyObject *__pyx_r = 0;
1995 __Pyx_RefNannyDeclarations
1996 __Pyx_RefNannySetupContext(
"calculateSubgridError_tauRes (wrapper)", 0);
1998 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tau,&__pyx_n_s_pdeResidual,&__pyx_n_s_dpdeResidual,&__pyx_n_s_subgridError,&__pyx_n_s_dsubgridError,0};
1999 PyObject* values[5] = {0,0,0,0,0};
2000 if (unlikely(__pyx_kwds)) {
2002 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2004 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
2006 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
2008 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2010 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2012 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2015 default:
goto __pyx_L5_argtuple_error;
2017 kw_args = PyDict_Size(__pyx_kwds);
2020 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tau)) != 0)) kw_args--;
2021 else goto __pyx_L5_argtuple_error;
2024 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pdeResidual)) != 0)) kw_args--;
2026 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_tauRes", 1, 5, 5, 1); __PYX_ERR(0, 670, __pyx_L3_error)
2030 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidual)) != 0)) kw_args--;
2032 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_tauRes", 1, 5, 5, 2); __PYX_ERR(0, 670, __pyx_L3_error)
2036 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subgridError)) != 0)) kw_args--;
2038 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_tauRes", 1, 5, 5, 3); __PYX_ERR(0, 670, __pyx_L3_error)
2042 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridError)) != 0)) kw_args--;
2044 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_tauRes", 1, 5, 5, 4); __PYX_ERR(0, 670, __pyx_L3_error)
2047 if (unlikely(kw_args > 0)) {
2048 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"calculateSubgridError_tauRes") < 0)) __PYX_ERR(0, 670, __pyx_L3_error)
2050 }
else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
2051 goto __pyx_L5_argtuple_error;
2053 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2054 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2055 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2056 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
2057 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
2059 __pyx_v_tau = ((PyArrayObject *)values[0]);
2060 __pyx_v_pdeResidual = ((PyArrayObject *)values[1]);
2061 __pyx_v_dpdeResidual = ((PyArrayObject *)values[2]);
2062 __pyx_v_subgridError = ((PyArrayObject *)values[3]);
2063 __pyx_v_dsubgridError = ((PyArrayObject *)values[4]);
2065 goto __pyx_L4_argument_unpacking_done;
2066 __pyx_L5_argtuple_error:;
2067 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_tauRes", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 670, __pyx_L3_error)
2069 __Pyx_AddTraceback(
"csubgridError.calculateSubgridError_tauRes", __pyx_clineno, __pyx_lineno, __pyx_filename);
2070 __Pyx_RefNannyFinishContext();
2072 __pyx_L4_argument_unpacking_done:;
2073 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tau), __pyx_ptype_5numpy_ndarray, 1,
"tau", 0))) __PYX_ERR(0, 670, __pyx_L1_error)
2074 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pdeResidual), __pyx_ptype_5numpy_ndarray, 1,
"pdeResidual", 0))) __PYX_ERR(0, 671, __pyx_L1_error)
2075 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidual), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidual", 0))) __PYX_ERR(0, 672, __pyx_L1_error)
2076 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_subgridError), __pyx_ptype_5numpy_ndarray, 1,
"subgridError", 0))) __PYX_ERR(0, 673, __pyx_L1_error)
2077 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridError), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridError", 0))) __PYX_ERR(0, 674, __pyx_L1_error)
2078 __pyx_r = __pyx_pf_13csubgridError_calculateSubgridError_tauRes(__pyx_self, __pyx_v_tau, __pyx_v_pdeResidual, __pyx_v_dpdeResidual, __pyx_v_subgridError, __pyx_v_dsubgridError);
2085 __Pyx_RefNannyFinishContext();
2089 static PyObject *__pyx_pf_13csubgridError_calculateSubgridError_tauRes(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_tau, PyArrayObject *__pyx_v_pdeResidual, PyArrayObject *__pyx_v_dpdeResidual, PyArrayObject *__pyx_v_subgridError, PyArrayObject *__pyx_v_dsubgridError) {
2090 PyObject *__pyx_r = NULL;
2091 __Pyx_RefNannyDeclarations
2092 __Pyx_RefNannySetupContext(
"calculateSubgridError_tauRes", 0);
2101 calculateSubgridError_tauRes((__pyx_v_dsubgridError->dimensions[0]), (__pyx_v_dsubgridError->dimensions[1]), (__pyx_v_dsubgridError->dimensions[2]), ((
double *)__pyx_v_tau->data), ((
double *)__pyx_v_pdeResidual->data), ((
double *)__pyx_v_dpdeResidual->data), ((
double *)__pyx_v_subgridError->data), ((
double *)__pyx_v_dsubgridError->data));
2112 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2113 __Pyx_XGIVEREF(__pyx_r);
2114 __Pyx_RefNannyFinishContext();
2127 static PyObject *__pyx_pw_13csubgridError_3calculateSubgridError_ADR_generic_tau(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
2128 static PyMethodDef __pyx_mdef_13csubgridError_3calculateSubgridError_ADR_generic_tau = {
"calculateSubgridError_ADR_generic_tau", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_13csubgridError_3calculateSubgridError_ADR_generic_tau, METH_VARARGS|METH_KEYWORDS, 0};
2129 static PyObject *__pyx_pw_13csubgridError_3calculateSubgridError_ADR_generic_tau(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2130 PyArrayObject *__pyx_v_inverseJ = 0;
2131 PyArrayObject *__pyx_v_dmt = 0;
2132 PyArrayObject *__pyx_v_df = 0;
2133 PyArrayObject *__pyx_v_a = 0;
2134 PyArrayObject *__pyx_v_da = 0;
2135 PyArrayObject *__pyx_v_grad_phi = 0;
2136 PyArrayObject *__pyx_v_dphi = 0;
2137 PyArrayObject *__pyx_v_dr = 0;
2138 PyArrayObject *__pyx_v_pe = 0;
2139 PyArrayObject *__pyx_v_cfl = 0;
2140 PyArrayObject *__pyx_v_tau = 0;
2141 int __pyx_lineno = 0;
2142 const char *__pyx_filename = NULL;
2143 int __pyx_clineno = 0;
2144 PyObject *__pyx_r = 0;
2145 __Pyx_RefNannyDeclarations
2146 __Pyx_RefNannySetupContext(
"calculateSubgridError_ADR_generic_tau (wrapper)", 0);
2148 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inverseJ,&__pyx_n_s_dmt,&__pyx_n_s_df,&__pyx_n_s_a,&__pyx_n_s_da,&__pyx_n_s_grad_phi,&__pyx_n_s_dphi,&__pyx_n_s_dr,&__pyx_n_s_pe,&__pyx_n_s_cfl,&__pyx_n_s_tau,0};
2149 PyObject* values[11] = {0,0,0,0,0,0,0,0,0,0,0};
2150 if (unlikely(__pyx_kwds)) {
2152 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2154 case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
2156 case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
2158 case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
2160 case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
2162 case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
2164 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
2166 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
2168 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
2170 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2172 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2174 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2177 default:
goto __pyx_L5_argtuple_error;
2179 kw_args = PyDict_Size(__pyx_kwds);
2182 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inverseJ)) != 0)) kw_args--;
2183 else goto __pyx_L5_argtuple_error;
2186 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dmt)) != 0)) kw_args--;
2188 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_generic_tau", 1, 11, 11, 1); __PYX_ERR(0, 683, __pyx_L3_error)
2192 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_df)) != 0)) kw_args--;
2194 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_generic_tau", 1, 11, 11, 2); __PYX_ERR(0, 683, __pyx_L3_error)
2198 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
2200 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_generic_tau", 1, 11, 11, 3); __PYX_ERR(0, 683, __pyx_L3_error)
2204 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_da)) != 0)) kw_args--;
2206 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_generic_tau", 1, 11, 11, 4); __PYX_ERR(0, 683, __pyx_L3_error)
2210 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_phi)) != 0)) kw_args--;
2212 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_generic_tau", 1, 11, 11, 5); __PYX_ERR(0, 683, __pyx_L3_error)
2216 if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dphi)) != 0)) kw_args--;
2218 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_generic_tau", 1, 11, 11, 6); __PYX_ERR(0, 683, __pyx_L3_error)
2222 if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dr)) != 0)) kw_args--;
2224 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_generic_tau", 1, 11, 11, 7); __PYX_ERR(0, 683, __pyx_L3_error)
2228 if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pe)) != 0)) kw_args--;
2230 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_generic_tau", 1, 11, 11, 8); __PYX_ERR(0, 683, __pyx_L3_error)
2234 if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cfl)) != 0)) kw_args--;
2236 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_generic_tau", 1, 11, 11, 9); __PYX_ERR(0, 683, __pyx_L3_error)
2240 if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tau)) != 0)) kw_args--;
2242 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_generic_tau", 1, 11, 11, 10); __PYX_ERR(0, 683, __pyx_L3_error)
2245 if (unlikely(kw_args > 0)) {
2246 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"calculateSubgridError_ADR_generic_tau") < 0)) __PYX_ERR(0, 683, __pyx_L3_error)
2248 }
else if (PyTuple_GET_SIZE(__pyx_args) != 11) {
2249 goto __pyx_L5_argtuple_error;
2251 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2252 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2253 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2254 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
2255 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
2256 values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
2257 values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
2258 values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
2259 values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
2260 values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
2261 values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
2263 __pyx_v_inverseJ = ((PyArrayObject *)values[0]);
2264 __pyx_v_dmt = ((PyArrayObject *)values[1]);
2265 __pyx_v_df = ((PyArrayObject *)values[2]);
2266 __pyx_v_a = ((PyArrayObject *)values[3]);
2267 __pyx_v_da = ((PyArrayObject *)values[4]);
2268 __pyx_v_grad_phi = ((PyArrayObject *)values[5]);
2269 __pyx_v_dphi = ((PyArrayObject *)values[6]);
2270 __pyx_v_dr = ((PyArrayObject *)values[7]);
2271 __pyx_v_pe = ((PyArrayObject *)values[8]);
2272 __pyx_v_cfl = ((PyArrayObject *)values[9]);
2273 __pyx_v_tau = ((PyArrayObject *)values[10]);
2275 goto __pyx_L4_argument_unpacking_done;
2276 __pyx_L5_argtuple_error:;
2277 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_generic_tau", 1, 11, 11, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 683, __pyx_L3_error)
2279 __Pyx_AddTraceback(
"csubgridError.calculateSubgridError_ADR_generic_tau", __pyx_clineno, __pyx_lineno, __pyx_filename);
2280 __Pyx_RefNannyFinishContext();
2282 __pyx_L4_argument_unpacking_done:;
2283 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_inverseJ), __pyx_ptype_5numpy_ndarray, 1,
"inverseJ", 0))) __PYX_ERR(0, 683, __pyx_L1_error)
2284 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dmt), __pyx_ptype_5numpy_ndarray, 1,
"dmt", 0))) __PYX_ERR(0, 684, __pyx_L1_error)
2285 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_df), __pyx_ptype_5numpy_ndarray, 1,
"df", 0))) __PYX_ERR(0, 685, __pyx_L1_error)
2286 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1,
"a", 0))) __PYX_ERR(0, 686, __pyx_L1_error)
2287 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_da), __pyx_ptype_5numpy_ndarray, 1,
"da", 0))) __PYX_ERR(0, 687, __pyx_L1_error)
2288 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_phi), __pyx_ptype_5numpy_ndarray, 1,
"grad_phi", 0))) __PYX_ERR(0, 688, __pyx_L1_error)
2289 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dphi), __pyx_ptype_5numpy_ndarray, 1,
"dphi", 0))) __PYX_ERR(0, 689, __pyx_L1_error)
2290 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dr), __pyx_ptype_5numpy_ndarray, 1,
"dr", 0))) __PYX_ERR(0, 690, __pyx_L1_error)
2291 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pe), __pyx_ptype_5numpy_ndarray, 1,
"pe", 0))) __PYX_ERR(0, 691, __pyx_L1_error)
2292 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cfl), __pyx_ptype_5numpy_ndarray, 1,
"cfl", 0))) __PYX_ERR(0, 692, __pyx_L1_error)
2293 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tau), __pyx_ptype_5numpy_ndarray, 1,
"tau", 0))) __PYX_ERR(0, 693, __pyx_L1_error)
2294 __pyx_r = __pyx_pf_13csubgridError_2calculateSubgridError_ADR_generic_tau(__pyx_self, __pyx_v_inverseJ, __pyx_v_dmt, __pyx_v_df, __pyx_v_a, __pyx_v_da, __pyx_v_grad_phi, __pyx_v_dphi, __pyx_v_dr, __pyx_v_pe, __pyx_v_cfl, __pyx_v_tau);
2301 __Pyx_RefNannyFinishContext();
2305 static PyObject *__pyx_pf_13csubgridError_2calculateSubgridError_ADR_generic_tau(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_inverseJ, PyArrayObject *__pyx_v_dmt, PyArrayObject *__pyx_v_df, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_da, PyArrayObject *__pyx_v_grad_phi, PyArrayObject *__pyx_v_dphi, PyArrayObject *__pyx_v_dr, PyArrayObject *__pyx_v_pe, PyArrayObject *__pyx_v_cfl, PyArrayObject *__pyx_v_tau) {
2306 PyObject *__pyx_r = NULL;
2307 __Pyx_RefNannyDeclarations
2308 __Pyx_RefNannySetupContext(
"calculateSubgridError_ADR_generic_tau", 0);
2317 calculateSubgridError_ADR_generic_tau((__pyx_v_df->dimensions[0]), (__pyx_v_df->dimensions[1]), (__pyx_v_df->dimensions[2]), ((
double *)__pyx_v_inverseJ->data), ((
double *)__pyx_v_dmt->data), ((
double *)__pyx_v_df->data), ((
double *)__pyx_v_a->data), ((
double *)__pyx_v_da->data), ((
double *)__pyx_v_grad_phi->data), ((
double *)__pyx_v_dphi->data), ((
double *)__pyx_v_dr->data), ((
double *)__pyx_v_pe->data), ((
double *)__pyx_v_cfl->data), ((
double *)__pyx_v_tau->data));
2328 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2329 __Pyx_XGIVEREF(__pyx_r);
2330 __Pyx_RefNannyFinishContext();
2343 static PyObject *__pyx_pw_13csubgridError_5calculateSubgridError_ADR_generic_tau_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
2344 static PyMethodDef __pyx_mdef_13csubgridError_5calculateSubgridError_ADR_generic_tau_sd = {
"calculateSubgridError_ADR_generic_tau_sd", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_13csubgridError_5calculateSubgridError_ADR_generic_tau_sd, METH_VARARGS|METH_KEYWORDS, 0};
2345 static PyObject *__pyx_pw_13csubgridError_5calculateSubgridError_ADR_generic_tau_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2346 PyArrayObject *__pyx_v_rowptr = 0;
2347 PyArrayObject *__pyx_v_colind = 0;
2348 PyArrayObject *__pyx_v_inverseJ = 0;
2349 PyArrayObject *__pyx_v_dmt = 0;
2350 PyArrayObject *__pyx_v_df = 0;
2351 PyArrayObject *__pyx_v_a = 0;
2352 PyArrayObject *__pyx_v_da = 0;
2353 PyArrayObject *__pyx_v_grad_phi = 0;
2354 PyArrayObject *__pyx_v_dphi = 0;
2355 PyArrayObject *__pyx_v_dr = 0;
2356 PyArrayObject *__pyx_v_pe = 0;
2357 PyArrayObject *__pyx_v_cfl = 0;
2358 PyArrayObject *__pyx_v_tau = 0;
2359 int __pyx_lineno = 0;
2360 const char *__pyx_filename = NULL;
2361 int __pyx_clineno = 0;
2362 PyObject *__pyx_r = 0;
2363 __Pyx_RefNannyDeclarations
2364 __Pyx_RefNannySetupContext(
"calculateSubgridError_ADR_generic_tau_sd (wrapper)", 0);
2366 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rowptr,&__pyx_n_s_colind,&__pyx_n_s_inverseJ,&__pyx_n_s_dmt,&__pyx_n_s_df,&__pyx_n_s_a,&__pyx_n_s_da,&__pyx_n_s_grad_phi,&__pyx_n_s_dphi,&__pyx_n_s_dr,&__pyx_n_s_pe,&__pyx_n_s_cfl,&__pyx_n_s_tau,0};
2367 PyObject* values[13] = {0,0,0,0,0,0,0,0,0,0,0,0,0};
2368 if (unlikely(__pyx_kwds)) {
2370 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2372 case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
2374 case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
2376 case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
2378 case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
2380 case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
2382 case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
2384 case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
2386 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
2388 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
2390 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
2392 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2394 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2396 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2399 default:
goto __pyx_L5_argtuple_error;
2401 kw_args = PyDict_Size(__pyx_kwds);
2404 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rowptr)) != 0)) kw_args--;
2405 else goto __pyx_L5_argtuple_error;
2408 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_colind)) != 0)) kw_args--;
2410 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_generic_tau_sd", 1, 13, 13, 1); __PYX_ERR(0, 708, __pyx_L3_error)
2414 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inverseJ)) != 0)) kw_args--;
2416 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_generic_tau_sd", 1, 13, 13, 2); __PYX_ERR(0, 708, __pyx_L3_error)
2420 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dmt)) != 0)) kw_args--;
2422 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_generic_tau_sd", 1, 13, 13, 3); __PYX_ERR(0, 708, __pyx_L3_error)
2426 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_df)) != 0)) kw_args--;
2428 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_generic_tau_sd", 1, 13, 13, 4); __PYX_ERR(0, 708, __pyx_L3_error)
2432 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
2434 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_generic_tau_sd", 1, 13, 13, 5); __PYX_ERR(0, 708, __pyx_L3_error)
2438 if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_da)) != 0)) kw_args--;
2440 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_generic_tau_sd", 1, 13, 13, 6); __PYX_ERR(0, 708, __pyx_L3_error)
2444 if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_phi)) != 0)) kw_args--;
2446 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_generic_tau_sd", 1, 13, 13, 7); __PYX_ERR(0, 708, __pyx_L3_error)
2450 if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dphi)) != 0)) kw_args--;
2452 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_generic_tau_sd", 1, 13, 13, 8); __PYX_ERR(0, 708, __pyx_L3_error)
2456 if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dr)) != 0)) kw_args--;
2458 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_generic_tau_sd", 1, 13, 13, 9); __PYX_ERR(0, 708, __pyx_L3_error)
2462 if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pe)) != 0)) kw_args--;
2464 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_generic_tau_sd", 1, 13, 13, 10); __PYX_ERR(0, 708, __pyx_L3_error)
2468 if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cfl)) != 0)) kw_args--;
2470 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_generic_tau_sd", 1, 13, 13, 11); __PYX_ERR(0, 708, __pyx_L3_error)
2474 if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tau)) != 0)) kw_args--;
2476 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_generic_tau_sd", 1, 13, 13, 12); __PYX_ERR(0, 708, __pyx_L3_error)
2479 if (unlikely(kw_args > 0)) {
2480 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"calculateSubgridError_ADR_generic_tau_sd") < 0)) __PYX_ERR(0, 708, __pyx_L3_error)
2482 }
else if (PyTuple_GET_SIZE(__pyx_args) != 13) {
2483 goto __pyx_L5_argtuple_error;
2485 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2486 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2487 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2488 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
2489 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
2490 values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
2491 values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
2492 values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
2493 values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
2494 values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
2495 values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
2496 values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
2497 values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
2499 __pyx_v_rowptr = ((PyArrayObject *)values[0]);
2500 __pyx_v_colind = ((PyArrayObject *)values[1]);
2501 __pyx_v_inverseJ = ((PyArrayObject *)values[2]);
2502 __pyx_v_dmt = ((PyArrayObject *)values[3]);
2503 __pyx_v_df = ((PyArrayObject *)values[4]);
2504 __pyx_v_a = ((PyArrayObject *)values[5]);
2505 __pyx_v_da = ((PyArrayObject *)values[6]);
2506 __pyx_v_grad_phi = ((PyArrayObject *)values[7]);
2507 __pyx_v_dphi = ((PyArrayObject *)values[8]);
2508 __pyx_v_dr = ((PyArrayObject *)values[9]);
2509 __pyx_v_pe = ((PyArrayObject *)values[10]);
2510 __pyx_v_cfl = ((PyArrayObject *)values[11]);
2511 __pyx_v_tau = ((PyArrayObject *)values[12]);
2513 goto __pyx_L4_argument_unpacking_done;
2514 __pyx_L5_argtuple_error:;
2515 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_generic_tau_sd", 1, 13, 13, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 708, __pyx_L3_error)
2517 __Pyx_AddTraceback(
"csubgridError.calculateSubgridError_ADR_generic_tau_sd", __pyx_clineno, __pyx_lineno, __pyx_filename);
2518 __Pyx_RefNannyFinishContext();
2520 __pyx_L4_argument_unpacking_done:;
2521 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rowptr), __pyx_ptype_5numpy_ndarray, 1,
"rowptr", 0))) __PYX_ERR(0, 708, __pyx_L1_error)
2522 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_colind), __pyx_ptype_5numpy_ndarray, 1,
"colind", 0))) __PYX_ERR(0, 709, __pyx_L1_error)
2523 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_inverseJ), __pyx_ptype_5numpy_ndarray, 1,
"inverseJ", 0))) __PYX_ERR(0, 710, __pyx_L1_error)
2524 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dmt), __pyx_ptype_5numpy_ndarray, 1,
"dmt", 0))) __PYX_ERR(0, 711, __pyx_L1_error)
2525 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_df), __pyx_ptype_5numpy_ndarray, 1,
"df", 0))) __PYX_ERR(0, 712, __pyx_L1_error)
2526 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1,
"a", 0))) __PYX_ERR(0, 713, __pyx_L1_error)
2527 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_da), __pyx_ptype_5numpy_ndarray, 1,
"da", 0))) __PYX_ERR(0, 714, __pyx_L1_error)
2528 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_phi), __pyx_ptype_5numpy_ndarray, 1,
"grad_phi", 0))) __PYX_ERR(0, 715, __pyx_L1_error)
2529 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dphi), __pyx_ptype_5numpy_ndarray, 1,
"dphi", 0))) __PYX_ERR(0, 716, __pyx_L1_error)
2530 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dr), __pyx_ptype_5numpy_ndarray, 1,
"dr", 0))) __PYX_ERR(0, 717, __pyx_L1_error)
2531 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pe), __pyx_ptype_5numpy_ndarray, 1,
"pe", 0))) __PYX_ERR(0, 718, __pyx_L1_error)
2532 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cfl), __pyx_ptype_5numpy_ndarray, 1,
"cfl", 0))) __PYX_ERR(0, 719, __pyx_L1_error)
2533 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tau), __pyx_ptype_5numpy_ndarray, 1,
"tau", 0))) __PYX_ERR(0, 720, __pyx_L1_error)
2534 __pyx_r = __pyx_pf_13csubgridError_4calculateSubgridError_ADR_generic_tau_sd(__pyx_self, __pyx_v_rowptr, __pyx_v_colind, __pyx_v_inverseJ, __pyx_v_dmt, __pyx_v_df, __pyx_v_a, __pyx_v_da, __pyx_v_grad_phi, __pyx_v_dphi, __pyx_v_dr, __pyx_v_pe, __pyx_v_cfl, __pyx_v_tau);
2541 __Pyx_RefNannyFinishContext();
2545 static PyObject *__pyx_pf_13csubgridError_4calculateSubgridError_ADR_generic_tau_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_inverseJ, PyArrayObject *__pyx_v_dmt, PyArrayObject *__pyx_v_df, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_da, PyArrayObject *__pyx_v_grad_phi, PyArrayObject *__pyx_v_dphi, PyArrayObject *__pyx_v_dr, PyArrayObject *__pyx_v_pe, PyArrayObject *__pyx_v_cfl, PyArrayObject *__pyx_v_tau) {
2546 PyObject *__pyx_r = NULL;
2547 __Pyx_RefNannyDeclarations
2548 __Pyx_RefNannySetupContext(
"calculateSubgridError_ADR_generic_tau_sd", 0);
2557 calculateSubgridError_ADR_generic_tau_sd((__pyx_v_df->dimensions[0]), (__pyx_v_df->dimensions[1]), (__pyx_v_df->dimensions[2]), ((
int *)__pyx_v_rowptr->data), ((
int *)__pyx_v_colind->data), ((
double *)__pyx_v_inverseJ->data), ((
double *)__pyx_v_dmt->data), ((
double *)__pyx_v_df->data), ((
double *)__pyx_v_a->data), ((
double *)__pyx_v_da->data), ((
double *)__pyx_v_grad_phi->data), ((
double *)__pyx_v_dphi->data), ((
double *)__pyx_v_dr->data), ((
double *)__pyx_v_pe->data), ((
double *)__pyx_v_cfl->data), ((
double *)__pyx_v_tau->data));
2568 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2569 __Pyx_XGIVEREF(__pyx_r);
2570 __Pyx_RefNannyFinishContext();
2583 static PyObject *__pyx_pw_13csubgridError_7calculateSubgridError_ADR_tau(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
2584 static PyMethodDef __pyx_mdef_13csubgridError_7calculateSubgridError_ADR_tau = {
"calculateSubgridError_ADR_tau", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_13csubgridError_7calculateSubgridError_ADR_tau, METH_VARARGS|METH_KEYWORDS, 0};
2585 static PyObject *__pyx_pw_13csubgridError_7calculateSubgridError_ADR_tau(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2586 char __pyx_v_stabilization;
2587 PyArrayObject *__pyx_v_elementDiameter = 0;
2588 PyArrayObject *__pyx_v_dmt = 0;
2589 PyArrayObject *__pyx_v_df = 0;
2590 PyArrayObject *__pyx_v_a = 0;
2591 PyArrayObject *__pyx_v_da = 0;
2592 PyArrayObject *__pyx_v_grad_phi = 0;
2593 PyArrayObject *__pyx_v_dphi = 0;
2594 PyArrayObject *__pyx_v_dr = 0;
2595 PyArrayObject *__pyx_v_pe = 0;
2596 PyArrayObject *__pyx_v_cfl = 0;
2597 PyArrayObject *__pyx_v_tau = 0;
2598 int __pyx_lineno = 0;
2599 const char *__pyx_filename = NULL;
2600 int __pyx_clineno = 0;
2601 PyObject *__pyx_r = 0;
2602 __Pyx_RefNannyDeclarations
2603 __Pyx_RefNannySetupContext(
"calculateSubgridError_ADR_tau (wrapper)", 0);
2605 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_stabilization,&__pyx_n_s_elementDiameter,&__pyx_n_s_dmt,&__pyx_n_s_df,&__pyx_n_s_a,&__pyx_n_s_da,&__pyx_n_s_grad_phi,&__pyx_n_s_dphi,&__pyx_n_s_dr,&__pyx_n_s_pe,&__pyx_n_s_cfl,&__pyx_n_s_tau,0};
2606 PyObject* values[12] = {0,0,0,0,0,0,0,0,0,0,0,0};
2607 if (unlikely(__pyx_kwds)) {
2609 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2611 case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
2613 case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
2615 case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
2617 case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
2619 case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
2621 case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
2623 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
2625 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
2627 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
2629 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2631 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2633 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2636 default:
goto __pyx_L5_argtuple_error;
2638 kw_args = PyDict_Size(__pyx_kwds);
2641 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stabilization)) != 0)) kw_args--;
2642 else goto __pyx_L5_argtuple_error;
2645 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementDiameter)) != 0)) kw_args--;
2647 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_tau", 1, 12, 12, 1); __PYX_ERR(0, 737, __pyx_L3_error)
2651 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dmt)) != 0)) kw_args--;
2653 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_tau", 1, 12, 12, 2); __PYX_ERR(0, 737, __pyx_L3_error)
2657 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_df)) != 0)) kw_args--;
2659 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_tau", 1, 12, 12, 3); __PYX_ERR(0, 737, __pyx_L3_error)
2663 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
2665 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_tau", 1, 12, 12, 4); __PYX_ERR(0, 737, __pyx_L3_error)
2669 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_da)) != 0)) kw_args--;
2671 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_tau", 1, 12, 12, 5); __PYX_ERR(0, 737, __pyx_L3_error)
2675 if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_phi)) != 0)) kw_args--;
2677 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_tau", 1, 12, 12, 6); __PYX_ERR(0, 737, __pyx_L3_error)
2681 if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dphi)) != 0)) kw_args--;
2683 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_tau", 1, 12, 12, 7); __PYX_ERR(0, 737, __pyx_L3_error)
2687 if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dr)) != 0)) kw_args--;
2689 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_tau", 1, 12, 12, 8); __PYX_ERR(0, 737, __pyx_L3_error)
2693 if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pe)) != 0)) kw_args--;
2695 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_tau", 1, 12, 12, 9); __PYX_ERR(0, 737, __pyx_L3_error)
2699 if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cfl)) != 0)) kw_args--;
2701 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_tau", 1, 12, 12, 10); __PYX_ERR(0, 737, __pyx_L3_error)
2705 if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tau)) != 0)) kw_args--;
2707 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_tau", 1, 12, 12, 11); __PYX_ERR(0, 737, __pyx_L3_error)
2710 if (unlikely(kw_args > 0)) {
2711 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"calculateSubgridError_ADR_tau") < 0)) __PYX_ERR(0, 737, __pyx_L3_error)
2713 }
else if (PyTuple_GET_SIZE(__pyx_args) != 12) {
2714 goto __pyx_L5_argtuple_error;
2716 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2717 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2718 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2719 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
2720 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
2721 values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
2722 values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
2723 values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
2724 values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
2725 values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
2726 values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
2727 values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
2729 __pyx_v_stabilization = __Pyx_PyInt_As_char(values[0]);
if (unlikely((__pyx_v_stabilization == (
char)-1) && PyErr_Occurred())) __PYX_ERR(0, 737, __pyx_L3_error)
2730 __pyx_v_elementDiameter = ((PyArrayObject *)values[1]);
2731 __pyx_v_dmt = ((PyArrayObject *)values[2]);
2732 __pyx_v_df = ((PyArrayObject *)values[3]);
2733 __pyx_v_a = ((PyArrayObject *)values[4]);
2734 __pyx_v_da = ((PyArrayObject *)values[5]);
2735 __pyx_v_grad_phi = ((PyArrayObject *)values[6]);
2736 __pyx_v_dphi = ((PyArrayObject *)values[7]);
2737 __pyx_v_dr = ((PyArrayObject *)values[8]);
2738 __pyx_v_pe = ((PyArrayObject *)values[9]);
2739 __pyx_v_cfl = ((PyArrayObject *)values[10]);
2740 __pyx_v_tau = ((PyArrayObject *)values[11]);
2742 goto __pyx_L4_argument_unpacking_done;
2743 __pyx_L5_argtuple_error:;
2744 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_tau", 1, 12, 12, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 737, __pyx_L3_error)
2746 __Pyx_AddTraceback(
"csubgridError.calculateSubgridError_ADR_tau", __pyx_clineno, __pyx_lineno, __pyx_filename);
2747 __Pyx_RefNannyFinishContext();
2749 __pyx_L4_argument_unpacking_done:;
2750 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementDiameter), __pyx_ptype_5numpy_ndarray, 1,
"elementDiameter", 0))) __PYX_ERR(0, 738, __pyx_L1_error)
2751 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dmt), __pyx_ptype_5numpy_ndarray, 1,
"dmt", 0))) __PYX_ERR(0, 739, __pyx_L1_error)
2752 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_df), __pyx_ptype_5numpy_ndarray, 1,
"df", 0))) __PYX_ERR(0, 740, __pyx_L1_error)
2753 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1,
"a", 0))) __PYX_ERR(0, 741, __pyx_L1_error)
2754 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_da), __pyx_ptype_5numpy_ndarray, 1,
"da", 0))) __PYX_ERR(0, 742, __pyx_L1_error)
2755 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_phi), __pyx_ptype_5numpy_ndarray, 1,
"grad_phi", 0))) __PYX_ERR(0, 743, __pyx_L1_error)
2756 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dphi), __pyx_ptype_5numpy_ndarray, 1,
"dphi", 0))) __PYX_ERR(0, 744, __pyx_L1_error)
2757 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dr), __pyx_ptype_5numpy_ndarray, 1,
"dr", 0))) __PYX_ERR(0, 745, __pyx_L1_error)
2758 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pe), __pyx_ptype_5numpy_ndarray, 1,
"pe", 0))) __PYX_ERR(0, 746, __pyx_L1_error)
2759 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cfl), __pyx_ptype_5numpy_ndarray, 1,
"cfl", 0))) __PYX_ERR(0, 747, __pyx_L1_error)
2760 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tau), __pyx_ptype_5numpy_ndarray, 1,
"tau", 0))) __PYX_ERR(0, 748, __pyx_L1_error)
2761 __pyx_r = __pyx_pf_13csubgridError_6calculateSubgridError_ADR_tau(__pyx_self, __pyx_v_stabilization, __pyx_v_elementDiameter, __pyx_v_dmt, __pyx_v_df, __pyx_v_a, __pyx_v_da, __pyx_v_grad_phi, __pyx_v_dphi, __pyx_v_dr, __pyx_v_pe, __pyx_v_cfl, __pyx_v_tau);
2768 __Pyx_RefNannyFinishContext();
2772 static PyObject *__pyx_pf_13csubgridError_6calculateSubgridError_ADR_tau(CYTHON_UNUSED PyObject *__pyx_self,
char __pyx_v_stabilization, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_dmt, PyArrayObject *__pyx_v_df, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_da, PyArrayObject *__pyx_v_grad_phi, PyArrayObject *__pyx_v_dphi, PyArrayObject *__pyx_v_dr, PyArrayObject *__pyx_v_pe, PyArrayObject *__pyx_v_cfl, PyArrayObject *__pyx_v_tau) {
2773 PyObject *__pyx_r = NULL;
2774 __Pyx_RefNannyDeclarations
2775 __Pyx_RefNannySetupContext(
"calculateSubgridError_ADR_tau", 0);
2784 calculateSubgridError_ADR_tau((__pyx_v_df->dimensions[0]), (__pyx_v_df->dimensions[1]), (__pyx_v_df->dimensions[2]), __pyx_v_stabilization, ((
double *)__pyx_v_elementDiameter->data), ((
double *)__pyx_v_dmt->data), ((
double *)__pyx_v_df->data), ((
double *)__pyx_v_a->data), ((
double *)__pyx_v_da->data), ((
double *)__pyx_v_grad_phi->data), ((
double *)__pyx_v_dphi->data), ((
double *)__pyx_v_dr->data), ((
double *)__pyx_v_pe->data), ((
double *)__pyx_v_cfl->data), ((
double *)__pyx_v_tau->data));
2795 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2796 __Pyx_XGIVEREF(__pyx_r);
2797 __Pyx_RefNannyFinishContext();
2810 static PyObject *__pyx_pw_13csubgridError_9calculateSubgridError_ADR_tau_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
2811 static PyMethodDef __pyx_mdef_13csubgridError_9calculateSubgridError_ADR_tau_sd = {
"calculateSubgridError_ADR_tau_sd", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_13csubgridError_9calculateSubgridError_ADR_tau_sd, METH_VARARGS|METH_KEYWORDS, 0};
2812 static PyObject *__pyx_pw_13csubgridError_9calculateSubgridError_ADR_tau_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2813 char __pyx_v_stabilization;
2814 PyArrayObject *__pyx_v_rowptr = 0;
2815 PyArrayObject *__pyx_v_colind = 0;
2816 PyArrayObject *__pyx_v_elementDiameter = 0;
2817 PyArrayObject *__pyx_v_dmt = 0;
2818 PyArrayObject *__pyx_v_df = 0;
2819 PyArrayObject *__pyx_v_a = 0;
2820 PyArrayObject *__pyx_v_da = 0;
2821 PyArrayObject *__pyx_v_grad_phi = 0;
2822 PyArrayObject *__pyx_v_dphi = 0;
2823 PyArrayObject *__pyx_v_dr = 0;
2824 PyArrayObject *__pyx_v_pe = 0;
2825 PyArrayObject *__pyx_v_cfl = 0;
2826 PyArrayObject *__pyx_v_tau = 0;
2827 int __pyx_lineno = 0;
2828 const char *__pyx_filename = NULL;
2829 int __pyx_clineno = 0;
2830 PyObject *__pyx_r = 0;
2831 __Pyx_RefNannyDeclarations
2832 __Pyx_RefNannySetupContext(
"calculateSubgridError_ADR_tau_sd (wrapper)", 0);
2834 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_stabilization,&__pyx_n_s_rowptr,&__pyx_n_s_colind,&__pyx_n_s_elementDiameter,&__pyx_n_s_dmt,&__pyx_n_s_df,&__pyx_n_s_a,&__pyx_n_s_da,&__pyx_n_s_grad_phi,&__pyx_n_s_dphi,&__pyx_n_s_dr,&__pyx_n_s_pe,&__pyx_n_s_cfl,&__pyx_n_s_tau,0};
2835 PyObject* values[14] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0};
2836 if (unlikely(__pyx_kwds)) {
2838 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2840 case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
2842 case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
2844 case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
2846 case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
2848 case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
2850 case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
2852 case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
2854 case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
2856 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
2858 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
2860 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
2862 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2864 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2866 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2869 default:
goto __pyx_L5_argtuple_error;
2871 kw_args = PyDict_Size(__pyx_kwds);
2874 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stabilization)) != 0)) kw_args--;
2875 else goto __pyx_L5_argtuple_error;
2878 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rowptr)) != 0)) kw_args--;
2880 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_tau_sd", 1, 14, 14, 1); __PYX_ERR(0, 764, __pyx_L3_error)
2884 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_colind)) != 0)) kw_args--;
2886 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_tau_sd", 1, 14, 14, 2); __PYX_ERR(0, 764, __pyx_L3_error)
2890 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementDiameter)) != 0)) kw_args--;
2892 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_tau_sd", 1, 14, 14, 3); __PYX_ERR(0, 764, __pyx_L3_error)
2896 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dmt)) != 0)) kw_args--;
2898 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_tau_sd", 1, 14, 14, 4); __PYX_ERR(0, 764, __pyx_L3_error)
2902 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_df)) != 0)) kw_args--;
2904 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_tau_sd", 1, 14, 14, 5); __PYX_ERR(0, 764, __pyx_L3_error)
2908 if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
2910 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_tau_sd", 1, 14, 14, 6); __PYX_ERR(0, 764, __pyx_L3_error)
2914 if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_da)) != 0)) kw_args--;
2916 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_tau_sd", 1, 14, 14, 7); __PYX_ERR(0, 764, __pyx_L3_error)
2920 if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_phi)) != 0)) kw_args--;
2922 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_tau_sd", 1, 14, 14, 8); __PYX_ERR(0, 764, __pyx_L3_error)
2926 if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dphi)) != 0)) kw_args--;
2928 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_tau_sd", 1, 14, 14, 9); __PYX_ERR(0, 764, __pyx_L3_error)
2932 if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dr)) != 0)) kw_args--;
2934 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_tau_sd", 1, 14, 14, 10); __PYX_ERR(0, 764, __pyx_L3_error)
2938 if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pe)) != 0)) kw_args--;
2940 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_tau_sd", 1, 14, 14, 11); __PYX_ERR(0, 764, __pyx_L3_error)
2944 if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cfl)) != 0)) kw_args--;
2946 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_tau_sd", 1, 14, 14, 12); __PYX_ERR(0, 764, __pyx_L3_error)
2950 if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tau)) != 0)) kw_args--;
2952 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_tau_sd", 1, 14, 14, 13); __PYX_ERR(0, 764, __pyx_L3_error)
2955 if (unlikely(kw_args > 0)) {
2956 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"calculateSubgridError_ADR_tau_sd") < 0)) __PYX_ERR(0, 764, __pyx_L3_error)
2958 }
else if (PyTuple_GET_SIZE(__pyx_args) != 14) {
2959 goto __pyx_L5_argtuple_error;
2961 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2962 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2963 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2964 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
2965 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
2966 values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
2967 values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
2968 values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
2969 values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
2970 values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
2971 values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
2972 values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
2973 values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
2974 values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
2976 __pyx_v_stabilization = __Pyx_PyInt_As_char(values[0]);
if (unlikely((__pyx_v_stabilization == (
char)-1) && PyErr_Occurred())) __PYX_ERR(0, 764, __pyx_L3_error)
2977 __pyx_v_rowptr = ((PyArrayObject *)values[1]);
2978 __pyx_v_colind = ((PyArrayObject *)values[2]);
2979 __pyx_v_elementDiameter = ((PyArrayObject *)values[3]);
2980 __pyx_v_dmt = ((PyArrayObject *)values[4]);
2981 __pyx_v_df = ((PyArrayObject *)values[5]);
2982 __pyx_v_a = ((PyArrayObject *)values[6]);
2983 __pyx_v_da = ((PyArrayObject *)values[7]);
2984 __pyx_v_grad_phi = ((PyArrayObject *)values[8]);
2985 __pyx_v_dphi = ((PyArrayObject *)values[9]);
2986 __pyx_v_dr = ((PyArrayObject *)values[10]);
2987 __pyx_v_pe = ((PyArrayObject *)values[11]);
2988 __pyx_v_cfl = ((PyArrayObject *)values[12]);
2989 __pyx_v_tau = ((PyArrayObject *)values[13]);
2991 goto __pyx_L4_argument_unpacking_done;
2992 __pyx_L5_argtuple_error:;
2993 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_tau_sd", 1, 14, 14, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 764, __pyx_L3_error)
2995 __Pyx_AddTraceback(
"csubgridError.calculateSubgridError_ADR_tau_sd", __pyx_clineno, __pyx_lineno, __pyx_filename);
2996 __Pyx_RefNannyFinishContext();
2998 __pyx_L4_argument_unpacking_done:;
2999 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rowptr), __pyx_ptype_5numpy_ndarray, 1,
"rowptr", 0))) __PYX_ERR(0, 765, __pyx_L1_error)
3000 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_colind), __pyx_ptype_5numpy_ndarray, 1,
"colind", 0))) __PYX_ERR(0, 766, __pyx_L1_error)
3001 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementDiameter), __pyx_ptype_5numpy_ndarray, 1,
"elementDiameter", 0))) __PYX_ERR(0, 767, __pyx_L1_error)
3002 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dmt), __pyx_ptype_5numpy_ndarray, 1,
"dmt", 0))) __PYX_ERR(0, 768, __pyx_L1_error)
3003 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_df), __pyx_ptype_5numpy_ndarray, 1,
"df", 0))) __PYX_ERR(0, 769, __pyx_L1_error)
3004 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1,
"a", 0))) __PYX_ERR(0, 770, __pyx_L1_error)
3005 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_da), __pyx_ptype_5numpy_ndarray, 1,
"da", 0))) __PYX_ERR(0, 771, __pyx_L1_error)
3006 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_phi), __pyx_ptype_5numpy_ndarray, 1,
"grad_phi", 0))) __PYX_ERR(0, 772, __pyx_L1_error)
3007 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dphi), __pyx_ptype_5numpy_ndarray, 1,
"dphi", 0))) __PYX_ERR(0, 773, __pyx_L1_error)
3008 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dr), __pyx_ptype_5numpy_ndarray, 1,
"dr", 0))) __PYX_ERR(0, 774, __pyx_L1_error)
3009 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pe), __pyx_ptype_5numpy_ndarray, 1,
"pe", 0))) __PYX_ERR(0, 775, __pyx_L1_error)
3010 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cfl), __pyx_ptype_5numpy_ndarray, 1,
"cfl", 0))) __PYX_ERR(0, 776, __pyx_L1_error)
3011 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tau), __pyx_ptype_5numpy_ndarray, 1,
"tau", 0))) __PYX_ERR(0, 777, __pyx_L1_error)
3012 __pyx_r = __pyx_pf_13csubgridError_8calculateSubgridError_ADR_tau_sd(__pyx_self, __pyx_v_stabilization, __pyx_v_rowptr, __pyx_v_colind, __pyx_v_elementDiameter, __pyx_v_dmt, __pyx_v_df, __pyx_v_a, __pyx_v_da, __pyx_v_grad_phi, __pyx_v_dphi, __pyx_v_dr, __pyx_v_pe, __pyx_v_cfl, __pyx_v_tau);
3019 __Pyx_RefNannyFinishContext();
3023 static PyObject *__pyx_pf_13csubgridError_8calculateSubgridError_ADR_tau_sd(CYTHON_UNUSED PyObject *__pyx_self,
char __pyx_v_stabilization, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_dmt, PyArrayObject *__pyx_v_df, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_da, PyArrayObject *__pyx_v_grad_phi, PyArrayObject *__pyx_v_dphi, PyArrayObject *__pyx_v_dr, PyArrayObject *__pyx_v_pe, PyArrayObject *__pyx_v_cfl, PyArrayObject *__pyx_v_tau) {
3024 PyObject *__pyx_r = NULL;
3025 __Pyx_RefNannyDeclarations
3026 __Pyx_RefNannySetupContext(
"calculateSubgridError_ADR_tau_sd", 0);
3035 calculateSubgridError_ADR_tau_sd((__pyx_v_df->dimensions[0]), (__pyx_v_df->dimensions[1]), (__pyx_v_df->dimensions[2]), ((
int *)__pyx_v_rowptr->data), ((
int *)__pyx_v_colind->data), __pyx_v_stabilization, ((
double *)__pyx_v_elementDiameter->data), ((
double *)__pyx_v_dmt->data), ((
double *)__pyx_v_df->data), ((
double *)__pyx_v_a->data), ((
double *)__pyx_v_da->data), ((
double *)__pyx_v_grad_phi->data), ((
double *)__pyx_v_dphi->data), ((
double *)__pyx_v_dr->data), ((
double *)__pyx_v_pe->data), ((
double *)__pyx_v_cfl->data), ((
double *)__pyx_v_tau->data));
3046 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3047 __Pyx_XGIVEREF(__pyx_r);
3048 __Pyx_RefNannyFinishContext();
3061 static PyObject *__pyx_pw_13csubgridError_11calculateSubgridError_A_tau(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
3062 static PyMethodDef __pyx_mdef_13csubgridError_11calculateSubgridError_A_tau = {
"calculateSubgridError_A_tau", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_13csubgridError_11calculateSubgridError_A_tau, METH_VARARGS|METH_KEYWORDS, 0};
3063 static PyObject *__pyx_pw_13csubgridError_11calculateSubgridError_A_tau(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3064 char __pyx_v_stabilization;
3065 PyArrayObject *__pyx_v_elementDiameter = 0;
3066 PyArrayObject *__pyx_v_dmt = 0;
3067 PyArrayObject *__pyx_v_df = 0;
3068 PyArrayObject *__pyx_v_cfl = 0;
3069 PyArrayObject *__pyx_v_tau = 0;
3070 int __pyx_lineno = 0;
3071 const char *__pyx_filename = NULL;
3072 int __pyx_clineno = 0;
3073 PyObject *__pyx_r = 0;
3074 __Pyx_RefNannyDeclarations
3075 __Pyx_RefNannySetupContext(
"calculateSubgridError_A_tau (wrapper)", 0);
3077 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_stabilization,&__pyx_n_s_elementDiameter,&__pyx_n_s_dmt,&__pyx_n_s_df,&__pyx_n_s_cfl,&__pyx_n_s_tau,0};
3078 PyObject* values[6] = {0,0,0,0,0,0};
3079 if (unlikely(__pyx_kwds)) {
3081 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
3083 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
3085 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
3087 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3089 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3091 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3093 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3096 default:
goto __pyx_L5_argtuple_error;
3098 kw_args = PyDict_Size(__pyx_kwds);
3101 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stabilization)) != 0)) kw_args--;
3102 else goto __pyx_L5_argtuple_error;
3105 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementDiameter)) != 0)) kw_args--;
3107 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_A_tau", 1, 6, 6, 1); __PYX_ERR(0, 795, __pyx_L3_error)
3111 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dmt)) != 0)) kw_args--;
3113 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_A_tau", 1, 6, 6, 2); __PYX_ERR(0, 795, __pyx_L3_error)
3117 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_df)) != 0)) kw_args--;
3119 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_A_tau", 1, 6, 6, 3); __PYX_ERR(0, 795, __pyx_L3_error)
3123 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cfl)) != 0)) kw_args--;
3125 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_A_tau", 1, 6, 6, 4); __PYX_ERR(0, 795, __pyx_L3_error)
3129 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tau)) != 0)) kw_args--;
3131 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_A_tau", 1, 6, 6, 5); __PYX_ERR(0, 795, __pyx_L3_error)
3134 if (unlikely(kw_args > 0)) {
3135 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"calculateSubgridError_A_tau") < 0)) __PYX_ERR(0, 795, __pyx_L3_error)
3137 }
else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
3138 goto __pyx_L5_argtuple_error;
3140 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3141 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3142 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3143 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3144 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
3145 values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
3147 __pyx_v_stabilization = __Pyx_PyInt_As_char(values[0]);
if (unlikely((__pyx_v_stabilization == (
char)-1) && PyErr_Occurred())) __PYX_ERR(0, 795, __pyx_L3_error)
3148 __pyx_v_elementDiameter = ((PyArrayObject *)values[1]);
3149 __pyx_v_dmt = ((PyArrayObject *)values[2]);
3150 __pyx_v_df = ((PyArrayObject *)values[3]);
3151 __pyx_v_cfl = ((PyArrayObject *)values[4]);
3152 __pyx_v_tau = ((PyArrayObject *)values[5]);
3154 goto __pyx_L4_argument_unpacking_done;
3155 __pyx_L5_argtuple_error:;
3156 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_A_tau", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 795, __pyx_L3_error)
3158 __Pyx_AddTraceback(
"csubgridError.calculateSubgridError_A_tau", __pyx_clineno, __pyx_lineno, __pyx_filename);
3159 __Pyx_RefNannyFinishContext();
3161 __pyx_L4_argument_unpacking_done:;
3162 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementDiameter), __pyx_ptype_5numpy_ndarray, 1,
"elementDiameter", 0))) __PYX_ERR(0, 796, __pyx_L1_error)
3163 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dmt), __pyx_ptype_5numpy_ndarray, 1,
"dmt", 0))) __PYX_ERR(0, 797, __pyx_L1_error)
3164 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_df), __pyx_ptype_5numpy_ndarray, 1,
"df", 0))) __PYX_ERR(0, 798, __pyx_L1_error)
3165 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cfl), __pyx_ptype_5numpy_ndarray, 1,
"cfl", 0))) __PYX_ERR(0, 799, __pyx_L1_error)
3166 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tau), __pyx_ptype_5numpy_ndarray, 1,
"tau", 0))) __PYX_ERR(0, 800, __pyx_L1_error)
3167 __pyx_r = __pyx_pf_13csubgridError_10calculateSubgridError_A_tau(__pyx_self, __pyx_v_stabilization, __pyx_v_elementDiameter, __pyx_v_dmt, __pyx_v_df, __pyx_v_cfl, __pyx_v_tau);
3174 __Pyx_RefNannyFinishContext();
3178 static PyObject *__pyx_pf_13csubgridError_10calculateSubgridError_A_tau(CYTHON_UNUSED PyObject *__pyx_self,
char __pyx_v_stabilization, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_dmt, PyArrayObject *__pyx_v_df, PyArrayObject *__pyx_v_cfl, PyArrayObject *__pyx_v_tau) {
3179 PyObject *__pyx_r = NULL;
3180 __Pyx_RefNannyDeclarations
3181 __Pyx_RefNannySetupContext(
"calculateSubgridError_A_tau", 0);
3190 calculateSubgridError_A_tau((__pyx_v_df->dimensions[0]), (__pyx_v_df->dimensions[1]), (__pyx_v_df->dimensions[2]), __pyx_v_stabilization, ((
double *)__pyx_v_elementDiameter->data), ((
double *)__pyx_v_dmt->data), ((
double *)__pyx_v_df->data), ((
double *)__pyx_v_cfl->data), ((
double *)__pyx_v_tau->data));
3201 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3202 __Pyx_XGIVEREF(__pyx_r);
3203 __Pyx_RefNannyFinishContext();
3216 static PyObject *__pyx_pw_13csubgridError_13calculateSubgridError_HJ_tau(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
3217 static PyMethodDef __pyx_mdef_13csubgridError_13calculateSubgridError_HJ_tau = {
"calculateSubgridError_HJ_tau", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_13csubgridError_13calculateSubgridError_HJ_tau, METH_VARARGS|METH_KEYWORDS, 0};
3218 static PyObject *__pyx_pw_13csubgridError_13calculateSubgridError_HJ_tau(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3219 char __pyx_v_stabilization;
3220 PyArrayObject *__pyx_v_elementDiameter = 0;
3221 PyArrayObject *__pyx_v_dmt = 0;
3222 PyArrayObject *__pyx_v_dH = 0;
3223 PyArrayObject *__pyx_v_cfl = 0;
3224 PyArrayObject *__pyx_v_tau = 0;
3225 int __pyx_lineno = 0;
3226 const char *__pyx_filename = NULL;
3227 int __pyx_clineno = 0;
3228 PyObject *__pyx_r = 0;
3229 __Pyx_RefNannyDeclarations
3230 __Pyx_RefNannySetupContext(
"calculateSubgridError_HJ_tau (wrapper)", 0);
3232 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_stabilization,&__pyx_n_s_elementDiameter,&__pyx_n_s_dmt,&__pyx_n_s_dH,&__pyx_n_s_cfl,&__pyx_n_s_tau,0};
3233 PyObject* values[6] = {0,0,0,0,0,0};
3234 if (unlikely(__pyx_kwds)) {
3236 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
3238 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
3240 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
3242 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3244 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3246 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3248 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3251 default:
goto __pyx_L5_argtuple_error;
3253 kw_args = PyDict_Size(__pyx_kwds);
3256 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stabilization)) != 0)) kw_args--;
3257 else goto __pyx_L5_argtuple_error;
3260 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementDiameter)) != 0)) kw_args--;
3262 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_HJ_tau", 1, 6, 6, 1); __PYX_ERR(0, 810, __pyx_L3_error)
3266 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dmt)) != 0)) kw_args--;
3268 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_HJ_tau", 1, 6, 6, 2); __PYX_ERR(0, 810, __pyx_L3_error)
3272 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dH)) != 0)) kw_args--;
3274 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_HJ_tau", 1, 6, 6, 3); __PYX_ERR(0, 810, __pyx_L3_error)
3278 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cfl)) != 0)) kw_args--;
3280 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_HJ_tau", 1, 6, 6, 4); __PYX_ERR(0, 810, __pyx_L3_error)
3284 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tau)) != 0)) kw_args--;
3286 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_HJ_tau", 1, 6, 6, 5); __PYX_ERR(0, 810, __pyx_L3_error)
3289 if (unlikely(kw_args > 0)) {
3290 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"calculateSubgridError_HJ_tau") < 0)) __PYX_ERR(0, 810, __pyx_L3_error)
3292 }
else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
3293 goto __pyx_L5_argtuple_error;
3295 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3296 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3297 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3298 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3299 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
3300 values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
3302 __pyx_v_stabilization = __Pyx_PyInt_As_char(values[0]);
if (unlikely((__pyx_v_stabilization == (
char)-1) && PyErr_Occurred())) __PYX_ERR(0, 810, __pyx_L3_error)
3303 __pyx_v_elementDiameter = ((PyArrayObject *)values[1]);
3304 __pyx_v_dmt = ((PyArrayObject *)values[2]);
3305 __pyx_v_dH = ((PyArrayObject *)values[3]);
3306 __pyx_v_cfl = ((PyArrayObject *)values[4]);
3307 __pyx_v_tau = ((PyArrayObject *)values[5]);
3309 goto __pyx_L4_argument_unpacking_done;
3310 __pyx_L5_argtuple_error:;
3311 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_HJ_tau", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 810, __pyx_L3_error)
3313 __Pyx_AddTraceback(
"csubgridError.calculateSubgridError_HJ_tau", __pyx_clineno, __pyx_lineno, __pyx_filename);
3314 __Pyx_RefNannyFinishContext();
3316 __pyx_L4_argument_unpacking_done:;
3317 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementDiameter), __pyx_ptype_5numpy_ndarray, 1,
"elementDiameter", 0))) __PYX_ERR(0, 811, __pyx_L1_error)
3318 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dmt), __pyx_ptype_5numpy_ndarray, 1,
"dmt", 0))) __PYX_ERR(0, 812, __pyx_L1_error)
3319 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dH), __pyx_ptype_5numpy_ndarray, 1,
"dH", 0))) __PYX_ERR(0, 813, __pyx_L1_error)
3320 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cfl), __pyx_ptype_5numpy_ndarray, 1,
"cfl", 0))) __PYX_ERR(0, 814, __pyx_L1_error)
3321 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tau), __pyx_ptype_5numpy_ndarray, 1,
"tau", 0))) __PYX_ERR(0, 815, __pyx_L1_error)
3322 __pyx_r = __pyx_pf_13csubgridError_12calculateSubgridError_HJ_tau(__pyx_self, __pyx_v_stabilization, __pyx_v_elementDiameter, __pyx_v_dmt, __pyx_v_dH, __pyx_v_cfl, __pyx_v_tau);
3329 __Pyx_RefNannyFinishContext();
3333 static PyObject *__pyx_pf_13csubgridError_12calculateSubgridError_HJ_tau(CYTHON_UNUSED PyObject *__pyx_self,
char __pyx_v_stabilization, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_dmt, PyArrayObject *__pyx_v_dH, PyArrayObject *__pyx_v_cfl, PyArrayObject *__pyx_v_tau) {
3334 PyObject *__pyx_r = NULL;
3335 __Pyx_RefNannyDeclarations
3336 __Pyx_RefNannySetupContext(
"calculateSubgridError_HJ_tau", 0);
3345 calculateSubgridError_A_tau((__pyx_v_dH->dimensions[0]), (__pyx_v_dH->dimensions[1]), (__pyx_v_dH->dimensions[2]), __pyx_v_stabilization, ((
double *)__pyx_v_elementDiameter->data), ((
double *)__pyx_v_dmt->data), ((
double *)__pyx_v_dH->data), ((
double *)__pyx_v_cfl->data), ((
double *)__pyx_v_tau->data));
3356 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3357 __Pyx_XGIVEREF(__pyx_r);
3358 __Pyx_RefNannyFinishContext();
3371 static PyObject *__pyx_pw_13csubgridError_15calculateSubgridErrorStokes2D_GLS_velocity(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
3372 static PyMethodDef __pyx_mdef_13csubgridError_15calculateSubgridErrorStokes2D_GLS_velocity = {
"calculateSubgridErrorStokes2D_GLS_velocity", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_13csubgridError_15calculateSubgridErrorStokes2D_GLS_velocity, METH_VARARGS|METH_KEYWORDS, 0};
3373 static PyObject *__pyx_pw_13csubgridError_15calculateSubgridErrorStokes2D_GLS_velocity(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3374 PyArrayObject *__pyx_v_elementDiameter = 0;
3375 PyArrayObject *__pyx_v_a = 0;
3376 PyArrayObject *__pyx_v_pdeResidualU = 0;
3377 PyArrayObject *__pyx_v_dpdeResidualU_dp = 0;
3378 PyArrayObject *__pyx_v_dpdeResidualU_du = 0;
3379 PyArrayObject *__pyx_v_pdeResidualV = 0;
3380 PyArrayObject *__pyx_v_dpdeResidualV_dp = 0;
3381 PyArrayObject *__pyx_v_dpdeResidualV_dv = 0;
3382 PyArrayObject *__pyx_v_subgridErrorU = 0;
3383 PyArrayObject *__pyx_v_dsubgridErrorU_dp = 0;
3384 PyArrayObject *__pyx_v_dsubgridErrorU_du = 0;
3385 PyArrayObject *__pyx_v_subgridErrorV = 0;
3386 PyArrayObject *__pyx_v_dsubgridErrorV_dp = 0;
3387 PyArrayObject *__pyx_v_dsubgridErrorV_dv = 0;
3388 int __pyx_lineno = 0;
3389 const char *__pyx_filename = NULL;
3390 int __pyx_clineno = 0;
3391 PyObject *__pyx_r = 0;
3392 __Pyx_RefNannyDeclarations
3393 __Pyx_RefNannySetupContext(
"calculateSubgridErrorStokes2D_GLS_velocity (wrapper)", 0);
3395 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_elementDiameter,&__pyx_n_s_a,&__pyx_n_s_pdeResidualU,&__pyx_n_s_dpdeResidualU_dp,&__pyx_n_s_dpdeResidualU_du,&__pyx_n_s_pdeResidualV,&__pyx_n_s_dpdeResidualV_dp,&__pyx_n_s_dpdeResidualV_dv,&__pyx_n_s_subgridErrorU,&__pyx_n_s_dsubgridErrorU_dp,&__pyx_n_s_dsubgridErrorU_du,&__pyx_n_s_subgridErrorV,&__pyx_n_s_dsubgridErrorV_dp,&__pyx_n_s_dsubgridErrorV_dv,0};
3396 PyObject* values[14] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0};
3397 if (unlikely(__pyx_kwds)) {
3399 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
3401 case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
3403 case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
3405 case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
3407 case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
3409 case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
3411 case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
3413 case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
3415 case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
3417 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
3419 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
3421 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3423 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3425 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3427 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3430 default:
goto __pyx_L5_argtuple_error;
3432 kw_args = PyDict_Size(__pyx_kwds);
3435 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementDiameter)) != 0)) kw_args--;
3436 else goto __pyx_L5_argtuple_error;
3439 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
3441 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity", 1, 14, 14, 1); __PYX_ERR(0, 826, __pyx_L3_error)
3445 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pdeResidualU)) != 0)) kw_args--;
3447 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity", 1, 14, 14, 2); __PYX_ERR(0, 826, __pyx_L3_error)
3451 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualU_dp)) != 0)) kw_args--;
3453 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity", 1, 14, 14, 3); __PYX_ERR(0, 826, __pyx_L3_error)
3457 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualU_du)) != 0)) kw_args--;
3459 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity", 1, 14, 14, 4); __PYX_ERR(0, 826, __pyx_L3_error)
3463 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pdeResidualV)) != 0)) kw_args--;
3465 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity", 1, 14, 14, 5); __PYX_ERR(0, 826, __pyx_L3_error)
3469 if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualV_dp)) != 0)) kw_args--;
3471 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity", 1, 14, 14, 6); __PYX_ERR(0, 826, __pyx_L3_error)
3475 if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualV_dv)) != 0)) kw_args--;
3477 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity", 1, 14, 14, 7); __PYX_ERR(0, 826, __pyx_L3_error)
3481 if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subgridErrorU)) != 0)) kw_args--;
3483 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity", 1, 14, 14, 8); __PYX_ERR(0, 826, __pyx_L3_error)
3487 if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorU_dp)) != 0)) kw_args--;
3489 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity", 1, 14, 14, 9); __PYX_ERR(0, 826, __pyx_L3_error)
3493 if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorU_du)) != 0)) kw_args--;
3495 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity", 1, 14, 14, 10); __PYX_ERR(0, 826, __pyx_L3_error)
3499 if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subgridErrorV)) != 0)) kw_args--;
3501 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity", 1, 14, 14, 11); __PYX_ERR(0, 826, __pyx_L3_error)
3505 if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorV_dp)) != 0)) kw_args--;
3507 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity", 1, 14, 14, 12); __PYX_ERR(0, 826, __pyx_L3_error)
3511 if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorV_dv)) != 0)) kw_args--;
3513 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity", 1, 14, 14, 13); __PYX_ERR(0, 826, __pyx_L3_error)
3516 if (unlikely(kw_args > 0)) {
3517 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"calculateSubgridErrorStokes2D_GLS_velocity") < 0)) __PYX_ERR(0, 826, __pyx_L3_error)
3519 }
else if (PyTuple_GET_SIZE(__pyx_args) != 14) {
3520 goto __pyx_L5_argtuple_error;
3522 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3523 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3524 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3525 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3526 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
3527 values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
3528 values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
3529 values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
3530 values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
3531 values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
3532 values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
3533 values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
3534 values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
3535 values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
3537 __pyx_v_elementDiameter = ((PyArrayObject *)values[0]);
3538 __pyx_v_a = ((PyArrayObject *)values[1]);
3539 __pyx_v_pdeResidualU = ((PyArrayObject *)values[2]);
3540 __pyx_v_dpdeResidualU_dp = ((PyArrayObject *)values[3]);
3541 __pyx_v_dpdeResidualU_du = ((PyArrayObject *)values[4]);
3542 __pyx_v_pdeResidualV = ((PyArrayObject *)values[5]);
3543 __pyx_v_dpdeResidualV_dp = ((PyArrayObject *)values[6]);
3544 __pyx_v_dpdeResidualV_dv = ((PyArrayObject *)values[7]);
3545 __pyx_v_subgridErrorU = ((PyArrayObject *)values[8]);
3546 __pyx_v_dsubgridErrorU_dp = ((PyArrayObject *)values[9]);
3547 __pyx_v_dsubgridErrorU_du = ((PyArrayObject *)values[10]);
3548 __pyx_v_subgridErrorV = ((PyArrayObject *)values[11]);
3549 __pyx_v_dsubgridErrorV_dp = ((PyArrayObject *)values[12]);
3550 __pyx_v_dsubgridErrorV_dv = ((PyArrayObject *)values[13]);
3552 goto __pyx_L4_argument_unpacking_done;
3553 __pyx_L5_argtuple_error:;
3554 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity", 1, 14, 14, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 826, __pyx_L3_error)
3556 __Pyx_AddTraceback(
"csubgridError.calculateSubgridErrorStokes2D_GLS_velocity", __pyx_clineno, __pyx_lineno, __pyx_filename);
3557 __Pyx_RefNannyFinishContext();
3559 __pyx_L4_argument_unpacking_done:;
3560 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementDiameter), __pyx_ptype_5numpy_ndarray, 1,
"elementDiameter", 0))) __PYX_ERR(0, 826, __pyx_L1_error)
3561 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1,
"a", 0))) __PYX_ERR(0, 827, __pyx_L1_error)
3562 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pdeResidualU), __pyx_ptype_5numpy_ndarray, 1,
"pdeResidualU", 0))) __PYX_ERR(0, 828, __pyx_L1_error)
3563 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualU_dp), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualU_dp", 0))) __PYX_ERR(0, 829, __pyx_L1_error)
3564 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualU_du), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualU_du", 0))) __PYX_ERR(0, 830, __pyx_L1_error)
3565 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pdeResidualV), __pyx_ptype_5numpy_ndarray, 1,
"pdeResidualV", 0))) __PYX_ERR(0, 831, __pyx_L1_error)
3566 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualV_dp), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualV_dp", 0))) __PYX_ERR(0, 832, __pyx_L1_error)
3567 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualV_dv), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualV_dv", 0))) __PYX_ERR(0, 833, __pyx_L1_error)
3568 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_subgridErrorU), __pyx_ptype_5numpy_ndarray, 1,
"subgridErrorU", 0))) __PYX_ERR(0, 834, __pyx_L1_error)
3569 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorU_dp), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorU_dp", 0))) __PYX_ERR(0, 835, __pyx_L1_error)
3570 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorU_du), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorU_du", 0))) __PYX_ERR(0, 836, __pyx_L1_error)
3571 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_subgridErrorV), __pyx_ptype_5numpy_ndarray, 1,
"subgridErrorV", 0))) __PYX_ERR(0, 837, __pyx_L1_error)
3572 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorV_dp), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorV_dp", 0))) __PYX_ERR(0, 838, __pyx_L1_error)
3573 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorV_dv), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorV_dv", 0))) __PYX_ERR(0, 839, __pyx_L1_error)
3574 __pyx_r = __pyx_pf_13csubgridError_14calculateSubgridErrorStokes2D_GLS_velocity(__pyx_self, __pyx_v_elementDiameter, __pyx_v_a, __pyx_v_pdeResidualU, __pyx_v_dpdeResidualU_dp, __pyx_v_dpdeResidualU_du, __pyx_v_pdeResidualV, __pyx_v_dpdeResidualV_dp, __pyx_v_dpdeResidualV_dv, __pyx_v_subgridErrorU, __pyx_v_dsubgridErrorU_dp, __pyx_v_dsubgridErrorU_du, __pyx_v_subgridErrorV, __pyx_v_dsubgridErrorV_dp, __pyx_v_dsubgridErrorV_dv);
3581 __Pyx_RefNannyFinishContext();
3585 static PyObject *__pyx_pf_13csubgridError_14calculateSubgridErrorStokes2D_GLS_velocity(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_pdeResidualU, PyArrayObject *__pyx_v_dpdeResidualU_dp, PyArrayObject *__pyx_v_dpdeResidualU_du, PyArrayObject *__pyx_v_pdeResidualV, PyArrayObject *__pyx_v_dpdeResidualV_dp, PyArrayObject *__pyx_v_dpdeResidualV_dv, PyArrayObject *__pyx_v_subgridErrorU, PyArrayObject *__pyx_v_dsubgridErrorU_dp, PyArrayObject *__pyx_v_dsubgridErrorU_du, PyArrayObject *__pyx_v_subgridErrorV, PyArrayObject *__pyx_v_dsubgridErrorV_dp, PyArrayObject *__pyx_v_dsubgridErrorV_dv) {
3586 PyObject *__pyx_r = NULL;
3587 __Pyx_RefNannyDeclarations
3588 __Pyx_RefNannySetupContext(
"calculateSubgridErrorStokes2D_GLS_velocity", 0);
3597 calculateSubgridErrorStokes2D_GLS_velocity((__pyx_v_dsubgridErrorU_du->dimensions[0]), (__pyx_v_dsubgridErrorU_du->dimensions[1]), (__pyx_v_dsubgridErrorU_du->dimensions[2]), 2, ((
double *)__pyx_v_elementDiameter->data), ((
double *)__pyx_v_a->data), ((
double *)__pyx_v_pdeResidualU->data), ((
double *)__pyx_v_dpdeResidualU_dp->data), ((
double *)__pyx_v_dpdeResidualU_du->data), ((
double *)__pyx_v_pdeResidualV->data), ((
double *)__pyx_v_dpdeResidualV_dp->data), ((
double *)__pyx_v_dpdeResidualV_dv->data), ((
double *)__pyx_v_subgridErrorU->data), ((
double *)__pyx_v_dsubgridErrorU_dp->data), ((
double *)__pyx_v_dsubgridErrorU_du->data), ((
double *)__pyx_v_subgridErrorV->data), ((
double *)__pyx_v_dsubgridErrorV_dp->data), ((
double *)__pyx_v_dsubgridErrorV_dv->data));
3608 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3609 __Pyx_XGIVEREF(__pyx_r);
3610 __Pyx_RefNannyFinishContext();
3623 static PyObject *__pyx_pw_13csubgridError_17calculateSubgridErrorStokes2D_GLS_velocity_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
3624 static PyMethodDef __pyx_mdef_13csubgridError_17calculateSubgridErrorStokes2D_GLS_velocity_sd = {
"calculateSubgridErrorStokes2D_GLS_velocity_sd", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_13csubgridError_17calculateSubgridErrorStokes2D_GLS_velocity_sd, METH_VARARGS|METH_KEYWORDS, 0};
3625 static PyObject *__pyx_pw_13csubgridError_17calculateSubgridErrorStokes2D_GLS_velocity_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3626 PyArrayObject *__pyx_v_elementDiameter = 0;
3627 PyArrayObject *__pyx_v_a = 0;
3628 PyArrayObject *__pyx_v_pdeResidualU = 0;
3629 PyArrayObject *__pyx_v_dpdeResidualU_dp = 0;
3630 PyArrayObject *__pyx_v_dpdeResidualU_du = 0;
3631 PyArrayObject *__pyx_v_pdeResidualV = 0;
3632 PyArrayObject *__pyx_v_dpdeResidualV_dp = 0;
3633 PyArrayObject *__pyx_v_dpdeResidualV_dv = 0;
3634 PyArrayObject *__pyx_v_subgridErrorU = 0;
3635 PyArrayObject *__pyx_v_dsubgridErrorU_dp = 0;
3636 PyArrayObject *__pyx_v_dsubgridErrorU_du = 0;
3637 PyArrayObject *__pyx_v_subgridErrorV = 0;
3638 PyArrayObject *__pyx_v_dsubgridErrorV_dp = 0;
3639 PyArrayObject *__pyx_v_dsubgridErrorV_dv = 0;
3640 int __pyx_lineno = 0;
3641 const char *__pyx_filename = NULL;
3642 int __pyx_clineno = 0;
3643 PyObject *__pyx_r = 0;
3644 __Pyx_RefNannyDeclarations
3645 __Pyx_RefNannySetupContext(
"calculateSubgridErrorStokes2D_GLS_velocity_sd (wrapper)", 0);
3647 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_elementDiameter,&__pyx_n_s_a,&__pyx_n_s_pdeResidualU,&__pyx_n_s_dpdeResidualU_dp,&__pyx_n_s_dpdeResidualU_du,&__pyx_n_s_pdeResidualV,&__pyx_n_s_dpdeResidualV_dp,&__pyx_n_s_dpdeResidualV_dv,&__pyx_n_s_subgridErrorU,&__pyx_n_s_dsubgridErrorU_dp,&__pyx_n_s_dsubgridErrorU_du,&__pyx_n_s_subgridErrorV,&__pyx_n_s_dsubgridErrorV_dp,&__pyx_n_s_dsubgridErrorV_dv,0};
3648 PyObject* values[14] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0};
3649 if (unlikely(__pyx_kwds)) {
3651 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
3653 case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
3655 case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
3657 case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
3659 case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
3661 case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
3663 case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
3665 case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
3667 case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
3669 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
3671 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
3673 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3675 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3677 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3679 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3682 default:
goto __pyx_L5_argtuple_error;
3684 kw_args = PyDict_Size(__pyx_kwds);
3687 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementDiameter)) != 0)) kw_args--;
3688 else goto __pyx_L5_argtuple_error;
3691 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
3693 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity_sd", 1, 14, 14, 1); __PYX_ERR(0, 858, __pyx_L3_error)
3697 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pdeResidualU)) != 0)) kw_args--;
3699 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity_sd", 1, 14, 14, 2); __PYX_ERR(0, 858, __pyx_L3_error)
3703 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualU_dp)) != 0)) kw_args--;
3705 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity_sd", 1, 14, 14, 3); __PYX_ERR(0, 858, __pyx_L3_error)
3709 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualU_du)) != 0)) kw_args--;
3711 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity_sd", 1, 14, 14, 4); __PYX_ERR(0, 858, __pyx_L3_error)
3715 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pdeResidualV)) != 0)) kw_args--;
3717 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity_sd", 1, 14, 14, 5); __PYX_ERR(0, 858, __pyx_L3_error)
3721 if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualV_dp)) != 0)) kw_args--;
3723 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity_sd", 1, 14, 14, 6); __PYX_ERR(0, 858, __pyx_L3_error)
3727 if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualV_dv)) != 0)) kw_args--;
3729 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity_sd", 1, 14, 14, 7); __PYX_ERR(0, 858, __pyx_L3_error)
3733 if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subgridErrorU)) != 0)) kw_args--;
3735 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity_sd", 1, 14, 14, 8); __PYX_ERR(0, 858, __pyx_L3_error)
3739 if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorU_dp)) != 0)) kw_args--;
3741 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity_sd", 1, 14, 14, 9); __PYX_ERR(0, 858, __pyx_L3_error)
3745 if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorU_du)) != 0)) kw_args--;
3747 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity_sd", 1, 14, 14, 10); __PYX_ERR(0, 858, __pyx_L3_error)
3751 if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subgridErrorV)) != 0)) kw_args--;
3753 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity_sd", 1, 14, 14, 11); __PYX_ERR(0, 858, __pyx_L3_error)
3757 if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorV_dp)) != 0)) kw_args--;
3759 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity_sd", 1, 14, 14, 12); __PYX_ERR(0, 858, __pyx_L3_error)
3763 if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorV_dv)) != 0)) kw_args--;
3765 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity_sd", 1, 14, 14, 13); __PYX_ERR(0, 858, __pyx_L3_error)
3768 if (unlikely(kw_args > 0)) {
3769 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"calculateSubgridErrorStokes2D_GLS_velocity_sd") < 0)) __PYX_ERR(0, 858, __pyx_L3_error)
3771 }
else if (PyTuple_GET_SIZE(__pyx_args) != 14) {
3772 goto __pyx_L5_argtuple_error;
3774 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3775 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3776 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3777 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3778 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
3779 values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
3780 values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
3781 values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
3782 values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
3783 values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
3784 values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
3785 values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
3786 values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
3787 values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
3789 __pyx_v_elementDiameter = ((PyArrayObject *)values[0]);
3790 __pyx_v_a = ((PyArrayObject *)values[1]);
3791 __pyx_v_pdeResidualU = ((PyArrayObject *)values[2]);
3792 __pyx_v_dpdeResidualU_dp = ((PyArrayObject *)values[3]);
3793 __pyx_v_dpdeResidualU_du = ((PyArrayObject *)values[4]);
3794 __pyx_v_pdeResidualV = ((PyArrayObject *)values[5]);
3795 __pyx_v_dpdeResidualV_dp = ((PyArrayObject *)values[6]);
3796 __pyx_v_dpdeResidualV_dv = ((PyArrayObject *)values[7]);
3797 __pyx_v_subgridErrorU = ((PyArrayObject *)values[8]);
3798 __pyx_v_dsubgridErrorU_dp = ((PyArrayObject *)values[9]);
3799 __pyx_v_dsubgridErrorU_du = ((PyArrayObject *)values[10]);
3800 __pyx_v_subgridErrorV = ((PyArrayObject *)values[11]);
3801 __pyx_v_dsubgridErrorV_dp = ((PyArrayObject *)values[12]);
3802 __pyx_v_dsubgridErrorV_dv = ((PyArrayObject *)values[13]);
3804 goto __pyx_L4_argument_unpacking_done;
3805 __pyx_L5_argtuple_error:;
3806 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity_sd", 1, 14, 14, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 858, __pyx_L3_error)
3808 __Pyx_AddTraceback(
"csubgridError.calculateSubgridErrorStokes2D_GLS_velocity_sd", __pyx_clineno, __pyx_lineno, __pyx_filename);
3809 __Pyx_RefNannyFinishContext();
3811 __pyx_L4_argument_unpacking_done:;
3812 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementDiameter), __pyx_ptype_5numpy_ndarray, 1,
"elementDiameter", 0))) __PYX_ERR(0, 858, __pyx_L1_error)
3813 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1,
"a", 0))) __PYX_ERR(0, 859, __pyx_L1_error)
3814 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pdeResidualU), __pyx_ptype_5numpy_ndarray, 1,
"pdeResidualU", 0))) __PYX_ERR(0, 860, __pyx_L1_error)
3815 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualU_dp), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualU_dp", 0))) __PYX_ERR(0, 861, __pyx_L1_error)
3816 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualU_du), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualU_du", 0))) __PYX_ERR(0, 862, __pyx_L1_error)
3817 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pdeResidualV), __pyx_ptype_5numpy_ndarray, 1,
"pdeResidualV", 0))) __PYX_ERR(0, 863, __pyx_L1_error)
3818 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualV_dp), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualV_dp", 0))) __PYX_ERR(0, 864, __pyx_L1_error)
3819 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualV_dv), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualV_dv", 0))) __PYX_ERR(0, 865, __pyx_L1_error)
3820 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_subgridErrorU), __pyx_ptype_5numpy_ndarray, 1,
"subgridErrorU", 0))) __PYX_ERR(0, 866, __pyx_L1_error)
3821 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorU_dp), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorU_dp", 0))) __PYX_ERR(0, 867, __pyx_L1_error)
3822 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorU_du), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorU_du", 0))) __PYX_ERR(0, 868, __pyx_L1_error)
3823 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_subgridErrorV), __pyx_ptype_5numpy_ndarray, 1,
"subgridErrorV", 0))) __PYX_ERR(0, 869, __pyx_L1_error)
3824 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorV_dp), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorV_dp", 0))) __PYX_ERR(0, 870, __pyx_L1_error)
3825 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorV_dv), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorV_dv", 0))) __PYX_ERR(0, 871, __pyx_L1_error)
3826 __pyx_r = __pyx_pf_13csubgridError_16calculateSubgridErrorStokes2D_GLS_velocity_sd(__pyx_self, __pyx_v_elementDiameter, __pyx_v_a, __pyx_v_pdeResidualU, __pyx_v_dpdeResidualU_dp, __pyx_v_dpdeResidualU_du, __pyx_v_pdeResidualV, __pyx_v_dpdeResidualV_dp, __pyx_v_dpdeResidualV_dv, __pyx_v_subgridErrorU, __pyx_v_dsubgridErrorU_dp, __pyx_v_dsubgridErrorU_du, __pyx_v_subgridErrorV, __pyx_v_dsubgridErrorV_dp, __pyx_v_dsubgridErrorV_dv);
3833 __Pyx_RefNannyFinishContext();
3837 static PyObject *__pyx_pf_13csubgridError_16calculateSubgridErrorStokes2D_GLS_velocity_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_pdeResidualU, PyArrayObject *__pyx_v_dpdeResidualU_dp, PyArrayObject *__pyx_v_dpdeResidualU_du, PyArrayObject *__pyx_v_pdeResidualV, PyArrayObject *__pyx_v_dpdeResidualV_dp, PyArrayObject *__pyx_v_dpdeResidualV_dv, PyArrayObject *__pyx_v_subgridErrorU, PyArrayObject *__pyx_v_dsubgridErrorU_dp, PyArrayObject *__pyx_v_dsubgridErrorU_du, PyArrayObject *__pyx_v_subgridErrorV, PyArrayObject *__pyx_v_dsubgridErrorV_dp, PyArrayObject *__pyx_v_dsubgridErrorV_dv) {
3838 PyObject *__pyx_r = NULL;
3839 __Pyx_RefNannyDeclarations
3840 __Pyx_RefNannySetupContext(
"calculateSubgridErrorStokes2D_GLS_velocity_sd", 0);
3849 calculateSubgridErrorStokes2D_GLS_velocity_sd((__pyx_v_dsubgridErrorU_du->dimensions[0]), (__pyx_v_dsubgridErrorU_du->dimensions[1]), (__pyx_v_dsubgridErrorU_du->dimensions[2]), 2, ((
double *)__pyx_v_elementDiameter->data), ((
double *)__pyx_v_a->data), ((
double *)__pyx_v_pdeResidualU->data), ((
double *)__pyx_v_dpdeResidualU_dp->data), ((
double *)__pyx_v_dpdeResidualU_du->data), ((
double *)__pyx_v_pdeResidualV->data), ((
double *)__pyx_v_dpdeResidualV_dp->data), ((
double *)__pyx_v_dpdeResidualV_dv->data), ((
double *)__pyx_v_subgridErrorU->data), ((
double *)__pyx_v_dsubgridErrorU_dp->data), ((
double *)__pyx_v_dsubgridErrorU_du->data), ((
double *)__pyx_v_subgridErrorV->data), ((
double *)__pyx_v_dsubgridErrorV_dp->data), ((
double *)__pyx_v_dsubgridErrorV_dv->data));
3860 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3861 __Pyx_XGIVEREF(__pyx_r);
3862 __Pyx_RefNannyFinishContext();
3875 static PyObject *__pyx_pw_13csubgridError_19calculateSubgridErrorStokes3D_GLS_velocity(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
3876 static PyMethodDef __pyx_mdef_13csubgridError_19calculateSubgridErrorStokes3D_GLS_velocity = {
"calculateSubgridErrorStokes3D_GLS_velocity", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_13csubgridError_19calculateSubgridErrorStokes3D_GLS_velocity, METH_VARARGS|METH_KEYWORDS, 0};
3877 static PyObject *__pyx_pw_13csubgridError_19calculateSubgridErrorStokes3D_GLS_velocity(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3878 PyArrayObject *__pyx_v_elementDiameter = 0;
3879 PyArrayObject *__pyx_v_a = 0;
3880 PyArrayObject *__pyx_v_pdeResidualU = 0;
3881 PyArrayObject *__pyx_v_dpdeResidualU_dp = 0;
3882 PyArrayObject *__pyx_v_dpdeResidualU_du = 0;
3883 PyArrayObject *__pyx_v_pdeResidualV = 0;
3884 PyArrayObject *__pyx_v_dpdeResidualV_dp = 0;
3885 PyArrayObject *__pyx_v_dpdeResidualV_dv = 0;
3886 PyArrayObject *__pyx_v_pdeResidualW = 0;
3887 PyArrayObject *__pyx_v_dpdeResidualW_dp = 0;
3888 PyArrayObject *__pyx_v_dpdeResidualW_dw = 0;
3889 PyArrayObject *__pyx_v_subgridErrorU = 0;
3890 PyArrayObject *__pyx_v_dsubgridErrorU_dp = 0;
3891 PyArrayObject *__pyx_v_dsubgridErrorU_du = 0;
3892 PyArrayObject *__pyx_v_subgridErrorV = 0;
3893 PyArrayObject *__pyx_v_dsubgridErrorV_dp = 0;
3894 PyArrayObject *__pyx_v_dsubgridErrorV_dv = 0;
3895 PyArrayObject *__pyx_v_subgridErrorW = 0;
3896 PyArrayObject *__pyx_v_dsubgridErrorW_dp = 0;
3897 PyArrayObject *__pyx_v_dsubgridErrorW_dw = 0;
3898 int __pyx_lineno = 0;
3899 const char *__pyx_filename = NULL;
3900 int __pyx_clineno = 0;
3901 PyObject *__pyx_r = 0;
3902 __Pyx_RefNannyDeclarations
3903 __Pyx_RefNannySetupContext(
"calculateSubgridErrorStokes3D_GLS_velocity (wrapper)", 0);
3905 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_elementDiameter,&__pyx_n_s_a,&__pyx_n_s_pdeResidualU,&__pyx_n_s_dpdeResidualU_dp,&__pyx_n_s_dpdeResidualU_du,&__pyx_n_s_pdeResidualV,&__pyx_n_s_dpdeResidualV_dp,&__pyx_n_s_dpdeResidualV_dv,&__pyx_n_s_pdeResidualW,&__pyx_n_s_dpdeResidualW_dp,&__pyx_n_s_dpdeResidualW_dw,&__pyx_n_s_subgridErrorU,&__pyx_n_s_dsubgridErrorU_dp,&__pyx_n_s_dsubgridErrorU_du,&__pyx_n_s_subgridErrorV,&__pyx_n_s_dsubgridErrorV_dp,&__pyx_n_s_dsubgridErrorV_dv,&__pyx_n_s_subgridErrorW,&__pyx_n_s_dsubgridErrorW_dp,&__pyx_n_s_dsubgridErrorW_dw,0};
3906 PyObject* values[20] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
3907 if (unlikely(__pyx_kwds)) {
3909 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
3911 case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
3913 case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
3915 case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
3917 case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
3919 case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
3921 case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
3923 case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
3925 case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
3927 case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
3929 case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
3931 case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
3933 case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
3935 case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
3937 case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
3939 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
3941 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
3943 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3945 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3947 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3949 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3952 default:
goto __pyx_L5_argtuple_error;
3954 kw_args = PyDict_Size(__pyx_kwds);
3957 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementDiameter)) != 0)) kw_args--;
3958 else goto __pyx_L5_argtuple_error;
3961 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
3963 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity", 1, 20, 20, 1); __PYX_ERR(0, 890, __pyx_L3_error)
3967 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pdeResidualU)) != 0)) kw_args--;
3969 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity", 1, 20, 20, 2); __PYX_ERR(0, 890, __pyx_L3_error)
3973 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualU_dp)) != 0)) kw_args--;
3975 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity", 1, 20, 20, 3); __PYX_ERR(0, 890, __pyx_L3_error)
3979 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualU_du)) != 0)) kw_args--;
3981 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity", 1, 20, 20, 4); __PYX_ERR(0, 890, __pyx_L3_error)
3985 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pdeResidualV)) != 0)) kw_args--;
3987 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity", 1, 20, 20, 5); __PYX_ERR(0, 890, __pyx_L3_error)
3991 if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualV_dp)) != 0)) kw_args--;
3993 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity", 1, 20, 20, 6); __PYX_ERR(0, 890, __pyx_L3_error)
3997 if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualV_dv)) != 0)) kw_args--;
3999 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity", 1, 20, 20, 7); __PYX_ERR(0, 890, __pyx_L3_error)
4003 if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pdeResidualW)) != 0)) kw_args--;
4005 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity", 1, 20, 20, 8); __PYX_ERR(0, 890, __pyx_L3_error)
4009 if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualW_dp)) != 0)) kw_args--;
4011 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity", 1, 20, 20, 9); __PYX_ERR(0, 890, __pyx_L3_error)
4015 if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualW_dw)) != 0)) kw_args--;
4017 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity", 1, 20, 20, 10); __PYX_ERR(0, 890, __pyx_L3_error)
4021 if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subgridErrorU)) != 0)) kw_args--;
4023 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity", 1, 20, 20, 11); __PYX_ERR(0, 890, __pyx_L3_error)
4027 if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorU_dp)) != 0)) kw_args--;
4029 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity", 1, 20, 20, 12); __PYX_ERR(0, 890, __pyx_L3_error)
4033 if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorU_du)) != 0)) kw_args--;
4035 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity", 1, 20, 20, 13); __PYX_ERR(0, 890, __pyx_L3_error)
4039 if (likely((values[14] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subgridErrorV)) != 0)) kw_args--;
4041 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity", 1, 20, 20, 14); __PYX_ERR(0, 890, __pyx_L3_error)
4045 if (likely((values[15] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorV_dp)) != 0)) kw_args--;
4047 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity", 1, 20, 20, 15); __PYX_ERR(0, 890, __pyx_L3_error)
4051 if (likely((values[16] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorV_dv)) != 0)) kw_args--;
4053 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity", 1, 20, 20, 16); __PYX_ERR(0, 890, __pyx_L3_error)
4057 if (likely((values[17] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subgridErrorW)) != 0)) kw_args--;
4059 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity", 1, 20, 20, 17); __PYX_ERR(0, 890, __pyx_L3_error)
4063 if (likely((values[18] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorW_dp)) != 0)) kw_args--;
4065 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity", 1, 20, 20, 18); __PYX_ERR(0, 890, __pyx_L3_error)
4069 if (likely((values[19] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorW_dw)) != 0)) kw_args--;
4071 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity", 1, 20, 20, 19); __PYX_ERR(0, 890, __pyx_L3_error)
4074 if (unlikely(kw_args > 0)) {
4075 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"calculateSubgridErrorStokes3D_GLS_velocity") < 0)) __PYX_ERR(0, 890, __pyx_L3_error)
4077 }
else if (PyTuple_GET_SIZE(__pyx_args) != 20) {
4078 goto __pyx_L5_argtuple_error;
4080 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4081 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4082 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4083 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
4084 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
4085 values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
4086 values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
4087 values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
4088 values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
4089 values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
4090 values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
4091 values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
4092 values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
4093 values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
4094 values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
4095 values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
4096 values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
4097 values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
4098 values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
4099 values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
4101 __pyx_v_elementDiameter = ((PyArrayObject *)values[0]);
4102 __pyx_v_a = ((PyArrayObject *)values[1]);
4103 __pyx_v_pdeResidualU = ((PyArrayObject *)values[2]);
4104 __pyx_v_dpdeResidualU_dp = ((PyArrayObject *)values[3]);
4105 __pyx_v_dpdeResidualU_du = ((PyArrayObject *)values[4]);
4106 __pyx_v_pdeResidualV = ((PyArrayObject *)values[5]);
4107 __pyx_v_dpdeResidualV_dp = ((PyArrayObject *)values[6]);
4108 __pyx_v_dpdeResidualV_dv = ((PyArrayObject *)values[7]);
4109 __pyx_v_pdeResidualW = ((PyArrayObject *)values[8]);
4110 __pyx_v_dpdeResidualW_dp = ((PyArrayObject *)values[9]);
4111 __pyx_v_dpdeResidualW_dw = ((PyArrayObject *)values[10]);
4112 __pyx_v_subgridErrorU = ((PyArrayObject *)values[11]);
4113 __pyx_v_dsubgridErrorU_dp = ((PyArrayObject *)values[12]);
4114 __pyx_v_dsubgridErrorU_du = ((PyArrayObject *)values[13]);
4115 __pyx_v_subgridErrorV = ((PyArrayObject *)values[14]);
4116 __pyx_v_dsubgridErrorV_dp = ((PyArrayObject *)values[15]);
4117 __pyx_v_dsubgridErrorV_dv = ((PyArrayObject *)values[16]);
4118 __pyx_v_subgridErrorW = ((PyArrayObject *)values[17]);
4119 __pyx_v_dsubgridErrorW_dp = ((PyArrayObject *)values[18]);
4120 __pyx_v_dsubgridErrorW_dw = ((PyArrayObject *)values[19]);
4122 goto __pyx_L4_argument_unpacking_done;
4123 __pyx_L5_argtuple_error:;
4124 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity", 1, 20, 20, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 890, __pyx_L3_error)
4126 __Pyx_AddTraceback(
"csubgridError.calculateSubgridErrorStokes3D_GLS_velocity", __pyx_clineno, __pyx_lineno, __pyx_filename);
4127 __Pyx_RefNannyFinishContext();
4129 __pyx_L4_argument_unpacking_done:;
4130 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementDiameter), __pyx_ptype_5numpy_ndarray, 1,
"elementDiameter", 0))) __PYX_ERR(0, 890, __pyx_L1_error)
4131 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1,
"a", 0))) __PYX_ERR(0, 891, __pyx_L1_error)
4132 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pdeResidualU), __pyx_ptype_5numpy_ndarray, 1,
"pdeResidualU", 0))) __PYX_ERR(0, 892, __pyx_L1_error)
4133 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualU_dp), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualU_dp", 0))) __PYX_ERR(0, 893, __pyx_L1_error)
4134 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualU_du), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualU_du", 0))) __PYX_ERR(0, 894, __pyx_L1_error)
4135 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pdeResidualV), __pyx_ptype_5numpy_ndarray, 1,
"pdeResidualV", 0))) __PYX_ERR(0, 895, __pyx_L1_error)
4136 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualV_dp), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualV_dp", 0))) __PYX_ERR(0, 896, __pyx_L1_error)
4137 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualV_dv), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualV_dv", 0))) __PYX_ERR(0, 897, __pyx_L1_error)
4138 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pdeResidualW), __pyx_ptype_5numpy_ndarray, 1,
"pdeResidualW", 0))) __PYX_ERR(0, 898, __pyx_L1_error)
4139 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualW_dp), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualW_dp", 0))) __PYX_ERR(0, 899, __pyx_L1_error)
4140 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualW_dw), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualW_dw", 0))) __PYX_ERR(0, 900, __pyx_L1_error)
4141 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_subgridErrorU), __pyx_ptype_5numpy_ndarray, 1,
"subgridErrorU", 0))) __PYX_ERR(0, 901, __pyx_L1_error)
4142 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorU_dp), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorU_dp", 0))) __PYX_ERR(0, 902, __pyx_L1_error)
4143 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorU_du), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorU_du", 0))) __PYX_ERR(0, 903, __pyx_L1_error)
4144 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_subgridErrorV), __pyx_ptype_5numpy_ndarray, 1,
"subgridErrorV", 0))) __PYX_ERR(0, 904, __pyx_L1_error)
4145 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorV_dp), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorV_dp", 0))) __PYX_ERR(0, 905, __pyx_L1_error)
4146 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorV_dv), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorV_dv", 0))) __PYX_ERR(0, 906, __pyx_L1_error)
4147 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_subgridErrorW), __pyx_ptype_5numpy_ndarray, 1,
"subgridErrorW", 0))) __PYX_ERR(0, 907, __pyx_L1_error)
4148 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorW_dp), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorW_dp", 0))) __PYX_ERR(0, 908, __pyx_L1_error)
4149 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorW_dw), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorW_dw", 0))) __PYX_ERR(0, 909, __pyx_L1_error)
4150 __pyx_r = __pyx_pf_13csubgridError_18calculateSubgridErrorStokes3D_GLS_velocity(__pyx_self, __pyx_v_elementDiameter, __pyx_v_a, __pyx_v_pdeResidualU, __pyx_v_dpdeResidualU_dp, __pyx_v_dpdeResidualU_du, __pyx_v_pdeResidualV, __pyx_v_dpdeResidualV_dp, __pyx_v_dpdeResidualV_dv, __pyx_v_pdeResidualW, __pyx_v_dpdeResidualW_dp, __pyx_v_dpdeResidualW_dw, __pyx_v_subgridErrorU, __pyx_v_dsubgridErrorU_dp, __pyx_v_dsubgridErrorU_du, __pyx_v_subgridErrorV, __pyx_v_dsubgridErrorV_dp, __pyx_v_dsubgridErrorV_dv, __pyx_v_subgridErrorW, __pyx_v_dsubgridErrorW_dp, __pyx_v_dsubgridErrorW_dw);
4157 __Pyx_RefNannyFinishContext();
4161 static PyObject *__pyx_pf_13csubgridError_18calculateSubgridErrorStokes3D_GLS_velocity(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_pdeResidualU, PyArrayObject *__pyx_v_dpdeResidualU_dp, PyArrayObject *__pyx_v_dpdeResidualU_du, PyArrayObject *__pyx_v_pdeResidualV, PyArrayObject *__pyx_v_dpdeResidualV_dp, PyArrayObject *__pyx_v_dpdeResidualV_dv, PyArrayObject *__pyx_v_pdeResidualW, PyArrayObject *__pyx_v_dpdeResidualW_dp, PyArrayObject *__pyx_v_dpdeResidualW_dw, PyArrayObject *__pyx_v_subgridErrorU, PyArrayObject *__pyx_v_dsubgridErrorU_dp, PyArrayObject *__pyx_v_dsubgridErrorU_du, PyArrayObject *__pyx_v_subgridErrorV, PyArrayObject *__pyx_v_dsubgridErrorV_dp, PyArrayObject *__pyx_v_dsubgridErrorV_dv, PyArrayObject *__pyx_v_subgridErrorW, PyArrayObject *__pyx_v_dsubgridErrorW_dp, PyArrayObject *__pyx_v_dsubgridErrorW_dw) {
4162 PyObject *__pyx_r = NULL;
4163 __Pyx_RefNannyDeclarations
4164 __Pyx_RefNannySetupContext(
"calculateSubgridErrorStokes3D_GLS_velocity", 0);
4173 calculateSubgridErrorStokes3D_GLS_velocity((__pyx_v_dsubgridErrorU_du->dimensions[0]), (__pyx_v_dsubgridErrorU_du->dimensions[1]), (__pyx_v_dsubgridErrorU_du->dimensions[2]), 3, ((
double *)__pyx_v_elementDiameter->data), ((
double *)__pyx_v_a->data), ((
double *)__pyx_v_pdeResidualU->data), ((
double *)__pyx_v_dpdeResidualU_dp->data), ((
double *)__pyx_v_dpdeResidualU_du->data), ((
double *)__pyx_v_pdeResidualV->data), ((
double *)__pyx_v_dpdeResidualV_dp->data), ((
double *)__pyx_v_dpdeResidualV_dv->data), ((
double *)__pyx_v_pdeResidualW->data), ((
double *)__pyx_v_dpdeResidualW_dp->data), ((
double *)__pyx_v_dpdeResidualW_dw->data), ((
double *)__pyx_v_subgridErrorU->data), ((
double *)__pyx_v_dsubgridErrorU_dp->data), ((
double *)__pyx_v_dsubgridErrorU_du->data), ((
double *)__pyx_v_subgridErrorV->data), ((
double *)__pyx_v_dsubgridErrorV_dp->data), ((
double *)__pyx_v_dsubgridErrorV_dv->data), ((
double *)__pyx_v_subgridErrorW->data), ((
double *)__pyx_v_dsubgridErrorW_dp->data), ((
double *)__pyx_v_dsubgridErrorW_dw->data));
4184 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4185 __Pyx_XGIVEREF(__pyx_r);
4186 __Pyx_RefNannyFinishContext();
4199 static PyObject *__pyx_pw_13csubgridError_21calculateSubgridErrorStokes3D_GLS_velocity_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
4200 static PyMethodDef __pyx_mdef_13csubgridError_21calculateSubgridErrorStokes3D_GLS_velocity_sd = {
"calculateSubgridErrorStokes3D_GLS_velocity_sd", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_13csubgridError_21calculateSubgridErrorStokes3D_GLS_velocity_sd, METH_VARARGS|METH_KEYWORDS, 0};
4201 static PyObject *__pyx_pw_13csubgridError_21calculateSubgridErrorStokes3D_GLS_velocity_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4202 PyArrayObject *__pyx_v_elementDiameter = 0;
4203 PyArrayObject *__pyx_v_a = 0;
4204 PyArrayObject *__pyx_v_pdeResidualU = 0;
4205 PyArrayObject *__pyx_v_dpdeResidualU_dp = 0;
4206 PyArrayObject *__pyx_v_dpdeResidualU_du = 0;
4207 PyArrayObject *__pyx_v_pdeResidualV = 0;
4208 PyArrayObject *__pyx_v_dpdeResidualV_dp = 0;
4209 PyArrayObject *__pyx_v_dpdeResidualV_dv = 0;
4210 PyArrayObject *__pyx_v_pdeResidualW = 0;
4211 PyArrayObject *__pyx_v_dpdeResidualW_dp = 0;
4212 PyArrayObject *__pyx_v_dpdeResidualW_dw = 0;
4213 PyArrayObject *__pyx_v_subgridErrorU = 0;
4214 PyArrayObject *__pyx_v_dsubgridErrorU_dp = 0;
4215 PyArrayObject *__pyx_v_dsubgridErrorU_du = 0;
4216 PyArrayObject *__pyx_v_subgridErrorV = 0;
4217 PyArrayObject *__pyx_v_dsubgridErrorV_dp = 0;
4218 PyArrayObject *__pyx_v_dsubgridErrorV_dv = 0;
4219 PyArrayObject *__pyx_v_subgridErrorW = 0;
4220 PyArrayObject *__pyx_v_dsubgridErrorW_dp = 0;
4221 PyArrayObject *__pyx_v_dsubgridErrorW_dw = 0;
4222 int __pyx_lineno = 0;
4223 const char *__pyx_filename = NULL;
4224 int __pyx_clineno = 0;
4225 PyObject *__pyx_r = 0;
4226 __Pyx_RefNannyDeclarations
4227 __Pyx_RefNannySetupContext(
"calculateSubgridErrorStokes3D_GLS_velocity_sd (wrapper)", 0);
4229 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_elementDiameter,&__pyx_n_s_a,&__pyx_n_s_pdeResidualU,&__pyx_n_s_dpdeResidualU_dp,&__pyx_n_s_dpdeResidualU_du,&__pyx_n_s_pdeResidualV,&__pyx_n_s_dpdeResidualV_dp,&__pyx_n_s_dpdeResidualV_dv,&__pyx_n_s_pdeResidualW,&__pyx_n_s_dpdeResidualW_dp,&__pyx_n_s_dpdeResidualW_dw,&__pyx_n_s_subgridErrorU,&__pyx_n_s_dsubgridErrorU_dp,&__pyx_n_s_dsubgridErrorU_du,&__pyx_n_s_subgridErrorV,&__pyx_n_s_dsubgridErrorV_dp,&__pyx_n_s_dsubgridErrorV_dv,&__pyx_n_s_subgridErrorW,&__pyx_n_s_dsubgridErrorW_dp,&__pyx_n_s_dsubgridErrorW_dw,0};
4230 PyObject* values[20] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
4231 if (unlikely(__pyx_kwds)) {
4233 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
4235 case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
4237 case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
4239 case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
4241 case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
4243 case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
4245 case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
4247 case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
4249 case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
4251 case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
4253 case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
4255 case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
4257 case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
4259 case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
4261 case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
4263 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
4265 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
4267 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
4269 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4271 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4273 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4276 default:
goto __pyx_L5_argtuple_error;
4278 kw_args = PyDict_Size(__pyx_kwds);
4281 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementDiameter)) != 0)) kw_args--;
4282 else goto __pyx_L5_argtuple_error;
4285 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
4287 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_sd", 1, 20, 20, 1); __PYX_ERR(0, 934, __pyx_L3_error)
4291 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pdeResidualU)) != 0)) kw_args--;
4293 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_sd", 1, 20, 20, 2); __PYX_ERR(0, 934, __pyx_L3_error)
4297 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualU_dp)) != 0)) kw_args--;
4299 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_sd", 1, 20, 20, 3); __PYX_ERR(0, 934, __pyx_L3_error)
4303 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualU_du)) != 0)) kw_args--;
4305 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_sd", 1, 20, 20, 4); __PYX_ERR(0, 934, __pyx_L3_error)
4309 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pdeResidualV)) != 0)) kw_args--;
4311 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_sd", 1, 20, 20, 5); __PYX_ERR(0, 934, __pyx_L3_error)
4315 if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualV_dp)) != 0)) kw_args--;
4317 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_sd", 1, 20, 20, 6); __PYX_ERR(0, 934, __pyx_L3_error)
4321 if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualV_dv)) != 0)) kw_args--;
4323 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_sd", 1, 20, 20, 7); __PYX_ERR(0, 934, __pyx_L3_error)
4327 if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pdeResidualW)) != 0)) kw_args--;
4329 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_sd", 1, 20, 20, 8); __PYX_ERR(0, 934, __pyx_L3_error)
4333 if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualW_dp)) != 0)) kw_args--;
4335 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_sd", 1, 20, 20, 9); __PYX_ERR(0, 934, __pyx_L3_error)
4339 if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualW_dw)) != 0)) kw_args--;
4341 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_sd", 1, 20, 20, 10); __PYX_ERR(0, 934, __pyx_L3_error)
4345 if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subgridErrorU)) != 0)) kw_args--;
4347 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_sd", 1, 20, 20, 11); __PYX_ERR(0, 934, __pyx_L3_error)
4351 if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorU_dp)) != 0)) kw_args--;
4353 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_sd", 1, 20, 20, 12); __PYX_ERR(0, 934, __pyx_L3_error)
4357 if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorU_du)) != 0)) kw_args--;
4359 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_sd", 1, 20, 20, 13); __PYX_ERR(0, 934, __pyx_L3_error)
4363 if (likely((values[14] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subgridErrorV)) != 0)) kw_args--;
4365 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_sd", 1, 20, 20, 14); __PYX_ERR(0, 934, __pyx_L3_error)
4369 if (likely((values[15] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorV_dp)) != 0)) kw_args--;
4371 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_sd", 1, 20, 20, 15); __PYX_ERR(0, 934, __pyx_L3_error)
4375 if (likely((values[16] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorV_dv)) != 0)) kw_args--;
4377 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_sd", 1, 20, 20, 16); __PYX_ERR(0, 934, __pyx_L3_error)
4381 if (likely((values[17] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subgridErrorW)) != 0)) kw_args--;
4383 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_sd", 1, 20, 20, 17); __PYX_ERR(0, 934, __pyx_L3_error)
4387 if (likely((values[18] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorW_dp)) != 0)) kw_args--;
4389 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_sd", 1, 20, 20, 18); __PYX_ERR(0, 934, __pyx_L3_error)
4393 if (likely((values[19] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorW_dw)) != 0)) kw_args--;
4395 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_sd", 1, 20, 20, 19); __PYX_ERR(0, 934, __pyx_L3_error)
4398 if (unlikely(kw_args > 0)) {
4399 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"calculateSubgridErrorStokes3D_GLS_velocity_sd") < 0)) __PYX_ERR(0, 934, __pyx_L3_error)
4401 }
else if (PyTuple_GET_SIZE(__pyx_args) != 20) {
4402 goto __pyx_L5_argtuple_error;
4404 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4405 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4406 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4407 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
4408 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
4409 values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
4410 values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
4411 values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
4412 values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
4413 values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
4414 values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
4415 values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
4416 values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
4417 values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
4418 values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
4419 values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
4420 values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
4421 values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
4422 values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
4423 values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
4425 __pyx_v_elementDiameter = ((PyArrayObject *)values[0]);
4426 __pyx_v_a = ((PyArrayObject *)values[1]);
4427 __pyx_v_pdeResidualU = ((PyArrayObject *)values[2]);
4428 __pyx_v_dpdeResidualU_dp = ((PyArrayObject *)values[3]);
4429 __pyx_v_dpdeResidualU_du = ((PyArrayObject *)values[4]);
4430 __pyx_v_pdeResidualV = ((PyArrayObject *)values[5]);
4431 __pyx_v_dpdeResidualV_dp = ((PyArrayObject *)values[6]);
4432 __pyx_v_dpdeResidualV_dv = ((PyArrayObject *)values[7]);
4433 __pyx_v_pdeResidualW = ((PyArrayObject *)values[8]);
4434 __pyx_v_dpdeResidualW_dp = ((PyArrayObject *)values[9]);
4435 __pyx_v_dpdeResidualW_dw = ((PyArrayObject *)values[10]);
4436 __pyx_v_subgridErrorU = ((PyArrayObject *)values[11]);
4437 __pyx_v_dsubgridErrorU_dp = ((PyArrayObject *)values[12]);
4438 __pyx_v_dsubgridErrorU_du = ((PyArrayObject *)values[13]);
4439 __pyx_v_subgridErrorV = ((PyArrayObject *)values[14]);
4440 __pyx_v_dsubgridErrorV_dp = ((PyArrayObject *)values[15]);
4441 __pyx_v_dsubgridErrorV_dv = ((PyArrayObject *)values[16]);
4442 __pyx_v_subgridErrorW = ((PyArrayObject *)values[17]);
4443 __pyx_v_dsubgridErrorW_dp = ((PyArrayObject *)values[18]);
4444 __pyx_v_dsubgridErrorW_dw = ((PyArrayObject *)values[19]);
4446 goto __pyx_L4_argument_unpacking_done;
4447 __pyx_L5_argtuple_error:;
4448 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_sd", 1, 20, 20, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 934, __pyx_L3_error)
4450 __Pyx_AddTraceback(
"csubgridError.calculateSubgridErrorStokes3D_GLS_velocity_sd", __pyx_clineno, __pyx_lineno, __pyx_filename);
4451 __Pyx_RefNannyFinishContext();
4453 __pyx_L4_argument_unpacking_done:;
4454 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementDiameter), __pyx_ptype_5numpy_ndarray, 1,
"elementDiameter", 0))) __PYX_ERR(0, 934, __pyx_L1_error)
4455 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1,
"a", 0))) __PYX_ERR(0, 935, __pyx_L1_error)
4456 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pdeResidualU), __pyx_ptype_5numpy_ndarray, 1,
"pdeResidualU", 0))) __PYX_ERR(0, 936, __pyx_L1_error)
4457 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualU_dp), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualU_dp", 0))) __PYX_ERR(0, 937, __pyx_L1_error)
4458 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualU_du), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualU_du", 0))) __PYX_ERR(0, 938, __pyx_L1_error)
4459 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pdeResidualV), __pyx_ptype_5numpy_ndarray, 1,
"pdeResidualV", 0))) __PYX_ERR(0, 939, __pyx_L1_error)
4460 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualV_dp), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualV_dp", 0))) __PYX_ERR(0, 940, __pyx_L1_error)
4461 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualV_dv), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualV_dv", 0))) __PYX_ERR(0, 941, __pyx_L1_error)
4462 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pdeResidualW), __pyx_ptype_5numpy_ndarray, 1,
"pdeResidualW", 0))) __PYX_ERR(0, 942, __pyx_L1_error)
4463 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualW_dp), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualW_dp", 0))) __PYX_ERR(0, 943, __pyx_L1_error)
4464 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualW_dw), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualW_dw", 0))) __PYX_ERR(0, 944, __pyx_L1_error)
4465 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_subgridErrorU), __pyx_ptype_5numpy_ndarray, 1,
"subgridErrorU", 0))) __PYX_ERR(0, 945, __pyx_L1_error)
4466 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorU_dp), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorU_dp", 0))) __PYX_ERR(0, 946, __pyx_L1_error)
4467 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorU_du), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorU_du", 0))) __PYX_ERR(0, 947, __pyx_L1_error)
4468 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_subgridErrorV), __pyx_ptype_5numpy_ndarray, 1,
"subgridErrorV", 0))) __PYX_ERR(0, 948, __pyx_L1_error)
4469 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorV_dp), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorV_dp", 0))) __PYX_ERR(0, 949, __pyx_L1_error)
4470 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorV_dv), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorV_dv", 0))) __PYX_ERR(0, 950, __pyx_L1_error)
4471 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_subgridErrorW), __pyx_ptype_5numpy_ndarray, 1,
"subgridErrorW", 0))) __PYX_ERR(0, 951, __pyx_L1_error)
4472 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorW_dp), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorW_dp", 0))) __PYX_ERR(0, 952, __pyx_L1_error)
4473 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorW_dw), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorW_dw", 0))) __PYX_ERR(0, 953, __pyx_L1_error)
4474 __pyx_r = __pyx_pf_13csubgridError_20calculateSubgridErrorStokes3D_GLS_velocity_sd(__pyx_self, __pyx_v_elementDiameter, __pyx_v_a, __pyx_v_pdeResidualU, __pyx_v_dpdeResidualU_dp, __pyx_v_dpdeResidualU_du, __pyx_v_pdeResidualV, __pyx_v_dpdeResidualV_dp, __pyx_v_dpdeResidualV_dv, __pyx_v_pdeResidualW, __pyx_v_dpdeResidualW_dp, __pyx_v_dpdeResidualW_dw, __pyx_v_subgridErrorU, __pyx_v_dsubgridErrorU_dp, __pyx_v_dsubgridErrorU_du, __pyx_v_subgridErrorV, __pyx_v_dsubgridErrorV_dp, __pyx_v_dsubgridErrorV_dv, __pyx_v_subgridErrorW, __pyx_v_dsubgridErrorW_dp, __pyx_v_dsubgridErrorW_dw);
4481 __Pyx_RefNannyFinishContext();
4485 static PyObject *__pyx_pf_13csubgridError_20calculateSubgridErrorStokes3D_GLS_velocity_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_pdeResidualU, PyArrayObject *__pyx_v_dpdeResidualU_dp, PyArrayObject *__pyx_v_dpdeResidualU_du, PyArrayObject *__pyx_v_pdeResidualV, PyArrayObject *__pyx_v_dpdeResidualV_dp, PyArrayObject *__pyx_v_dpdeResidualV_dv, PyArrayObject *__pyx_v_pdeResidualW, PyArrayObject *__pyx_v_dpdeResidualW_dp, PyArrayObject *__pyx_v_dpdeResidualW_dw, PyArrayObject *__pyx_v_subgridErrorU, PyArrayObject *__pyx_v_dsubgridErrorU_dp, PyArrayObject *__pyx_v_dsubgridErrorU_du, PyArrayObject *__pyx_v_subgridErrorV, PyArrayObject *__pyx_v_dsubgridErrorV_dp, PyArrayObject *__pyx_v_dsubgridErrorV_dv, PyArrayObject *__pyx_v_subgridErrorW, PyArrayObject *__pyx_v_dsubgridErrorW_dp, PyArrayObject *__pyx_v_dsubgridErrorW_dw) {
4486 PyObject *__pyx_r = NULL;
4487 __Pyx_RefNannyDeclarations
4488 __Pyx_RefNannySetupContext(
"calculateSubgridErrorStokes3D_GLS_velocity_sd", 0);
4497 calculateSubgridErrorStokes3D_GLS_velocity_sd((__pyx_v_dsubgridErrorU_du->dimensions[0]), (__pyx_v_dsubgridErrorU_du->dimensions[1]), (__pyx_v_dsubgridErrorU_du->dimensions[2]), 3, ((
double *)__pyx_v_elementDiameter->data), ((
double *)__pyx_v_a->data), ((
double *)__pyx_v_pdeResidualU->data), ((
double *)__pyx_v_dpdeResidualU_dp->data), ((
double *)__pyx_v_dpdeResidualU_du->data), ((
double *)__pyx_v_pdeResidualV->data), ((
double *)__pyx_v_dpdeResidualV_dp->data), ((
double *)__pyx_v_dpdeResidualV_dv->data), ((
double *)__pyx_v_pdeResidualW->data), ((
double *)__pyx_v_dpdeResidualW_dp->data), ((
double *)__pyx_v_dpdeResidualW_dw->data), ((
double *)__pyx_v_subgridErrorU->data), ((
double *)__pyx_v_dsubgridErrorU_dp->data), ((
double *)__pyx_v_dsubgridErrorU_du->data), ((
double *)__pyx_v_subgridErrorV->data), ((
double *)__pyx_v_dsubgridErrorV_dp->data), ((
double *)__pyx_v_dsubgridErrorV_dv->data), ((
double *)__pyx_v_subgridErrorW->data), ((
double *)__pyx_v_dsubgridErrorW_dp->data), ((
double *)__pyx_v_dsubgridErrorW_dw->data));
4508 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4509 __Pyx_XGIVEREF(__pyx_r);
4510 __Pyx_RefNannyFinishContext();
4523 static PyObject *__pyx_pw_13csubgridError_23calculateSubgridErrorStokes2D_GLS_velocity_pressure(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
4524 static PyMethodDef __pyx_mdef_13csubgridError_23calculateSubgridErrorStokes2D_GLS_velocity_pressure = {
"calculateSubgridErrorStokes2D_GLS_velocity_pressure", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_13csubgridError_23calculateSubgridErrorStokes2D_GLS_velocity_pressure, METH_VARARGS|METH_KEYWORDS, 0};
4525 static PyObject *__pyx_pw_13csubgridError_23calculateSubgridErrorStokes2D_GLS_velocity_pressure(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4526 PyArrayObject *__pyx_v_elementDiameter = 0;
4527 PyArrayObject *__pyx_v_a = 0;
4528 PyArrayObject *__pyx_v_pdeResidualP = 0;
4529 PyArrayObject *__pyx_v_dpdeResidualP_du = 0;
4530 PyArrayObject *__pyx_v_dpdeResidualP_dv = 0;
4531 PyArrayObject *__pyx_v_pdeResidualU = 0;
4532 PyArrayObject *__pyx_v_dpdeResidualU_dp = 0;
4533 PyArrayObject *__pyx_v_dpdeResidualU_du = 0;
4534 PyArrayObject *__pyx_v_pdeResidualV = 0;
4535 PyArrayObject *__pyx_v_dpdeResidualV_dp = 0;
4536 PyArrayObject *__pyx_v_dpdeResidualV_dv = 0;
4537 PyArrayObject *__pyx_v_subgridErrorP = 0;
4538 PyArrayObject *__pyx_v_dsubgridErrorP_du = 0;
4539 PyArrayObject *__pyx_v_dsubgridErrorP_dv = 0;
4540 PyArrayObject *__pyx_v_subgridErrorU = 0;
4541 PyArrayObject *__pyx_v_dsubgridErrorU_dp = 0;
4542 PyArrayObject *__pyx_v_dsubgridErrorU_du = 0;
4543 PyArrayObject *__pyx_v_subgridErrorV = 0;
4544 PyArrayObject *__pyx_v_dsubgridErrorV_dp = 0;
4545 PyArrayObject *__pyx_v_dsubgridErrorV_dv = 0;
4546 int __pyx_lineno = 0;
4547 const char *__pyx_filename = NULL;
4548 int __pyx_clineno = 0;
4549 PyObject *__pyx_r = 0;
4550 __Pyx_RefNannyDeclarations
4551 __Pyx_RefNannySetupContext(
"calculateSubgridErrorStokes2D_GLS_velocity_pressure (wrapper)", 0);
4553 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_elementDiameter,&__pyx_n_s_a,&__pyx_n_s_pdeResidualP,&__pyx_n_s_dpdeResidualP_du,&__pyx_n_s_dpdeResidualP_dv,&__pyx_n_s_pdeResidualU,&__pyx_n_s_dpdeResidualU_dp,&__pyx_n_s_dpdeResidualU_du,&__pyx_n_s_pdeResidualV,&__pyx_n_s_dpdeResidualV_dp,&__pyx_n_s_dpdeResidualV_dv,&__pyx_n_s_subgridErrorP,&__pyx_n_s_dsubgridErrorP_du,&__pyx_n_s_dsubgridErrorP_dv,&__pyx_n_s_subgridErrorU,&__pyx_n_s_dsubgridErrorU_dp,&__pyx_n_s_dsubgridErrorU_du,&__pyx_n_s_subgridErrorV,&__pyx_n_s_dsubgridErrorV_dp,&__pyx_n_s_dsubgridErrorV_dv,0};
4554 PyObject* values[20] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
4555 if (unlikely(__pyx_kwds)) {
4557 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
4559 case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
4561 case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
4563 case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
4565 case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
4567 case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
4569 case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
4571 case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
4573 case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
4575 case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
4577 case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
4579 case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
4581 case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
4583 case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
4585 case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
4587 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
4589 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
4591 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
4593 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4595 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4597 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4600 default:
goto __pyx_L5_argtuple_error;
4602 kw_args = PyDict_Size(__pyx_kwds);
4605 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementDiameter)) != 0)) kw_args--;
4606 else goto __pyx_L5_argtuple_error;
4609 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
4611 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity_pressure", 1, 20, 20, 1); __PYX_ERR(0, 978, __pyx_L3_error)
4615 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pdeResidualP)) != 0)) kw_args--;
4617 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity_pressure", 1, 20, 20, 2); __PYX_ERR(0, 978, __pyx_L3_error)
4621 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualP_du)) != 0)) kw_args--;
4623 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity_pressure", 1, 20, 20, 3); __PYX_ERR(0, 978, __pyx_L3_error)
4627 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualP_dv)) != 0)) kw_args--;
4629 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity_pressure", 1, 20, 20, 4); __PYX_ERR(0, 978, __pyx_L3_error)
4633 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pdeResidualU)) != 0)) kw_args--;
4635 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity_pressure", 1, 20, 20, 5); __PYX_ERR(0, 978, __pyx_L3_error)
4639 if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualU_dp)) != 0)) kw_args--;
4641 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity_pressure", 1, 20, 20, 6); __PYX_ERR(0, 978, __pyx_L3_error)
4645 if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualU_du)) != 0)) kw_args--;
4647 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity_pressure", 1, 20, 20, 7); __PYX_ERR(0, 978, __pyx_L3_error)
4651 if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pdeResidualV)) != 0)) kw_args--;
4653 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity_pressure", 1, 20, 20, 8); __PYX_ERR(0, 978, __pyx_L3_error)
4657 if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualV_dp)) != 0)) kw_args--;
4659 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity_pressure", 1, 20, 20, 9); __PYX_ERR(0, 978, __pyx_L3_error)
4663 if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualV_dv)) != 0)) kw_args--;
4665 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity_pressure", 1, 20, 20, 10); __PYX_ERR(0, 978, __pyx_L3_error)
4669 if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subgridErrorP)) != 0)) kw_args--;
4671 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity_pressure", 1, 20, 20, 11); __PYX_ERR(0, 978, __pyx_L3_error)
4675 if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorP_du)) != 0)) kw_args--;
4677 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity_pressure", 1, 20, 20, 12); __PYX_ERR(0, 978, __pyx_L3_error)
4681 if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorP_dv)) != 0)) kw_args--;
4683 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity_pressure", 1, 20, 20, 13); __PYX_ERR(0, 978, __pyx_L3_error)
4687 if (likely((values[14] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subgridErrorU)) != 0)) kw_args--;
4689 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity_pressure", 1, 20, 20, 14); __PYX_ERR(0, 978, __pyx_L3_error)
4693 if (likely((values[15] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorU_dp)) != 0)) kw_args--;
4695 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity_pressure", 1, 20, 20, 15); __PYX_ERR(0, 978, __pyx_L3_error)
4699 if (likely((values[16] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorU_du)) != 0)) kw_args--;
4701 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity_pressure", 1, 20, 20, 16); __PYX_ERR(0, 978, __pyx_L3_error)
4705 if (likely((values[17] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subgridErrorV)) != 0)) kw_args--;
4707 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity_pressure", 1, 20, 20, 17); __PYX_ERR(0, 978, __pyx_L3_error)
4711 if (likely((values[18] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorV_dp)) != 0)) kw_args--;
4713 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity_pressure", 1, 20, 20, 18); __PYX_ERR(0, 978, __pyx_L3_error)
4717 if (likely((values[19] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorV_dv)) != 0)) kw_args--;
4719 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity_pressure", 1, 20, 20, 19); __PYX_ERR(0, 978, __pyx_L3_error)
4722 if (unlikely(kw_args > 0)) {
4723 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"calculateSubgridErrorStokes2D_GLS_velocity_pressure") < 0)) __PYX_ERR(0, 978, __pyx_L3_error)
4725 }
else if (PyTuple_GET_SIZE(__pyx_args) != 20) {
4726 goto __pyx_L5_argtuple_error;
4728 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4729 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4730 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4731 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
4732 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
4733 values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
4734 values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
4735 values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
4736 values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
4737 values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
4738 values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
4739 values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
4740 values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
4741 values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
4742 values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
4743 values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
4744 values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
4745 values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
4746 values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
4747 values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
4749 __pyx_v_elementDiameter = ((PyArrayObject *)values[0]);
4750 __pyx_v_a = ((PyArrayObject *)values[1]);
4751 __pyx_v_pdeResidualP = ((PyArrayObject *)values[2]);
4752 __pyx_v_dpdeResidualP_du = ((PyArrayObject *)values[3]);
4753 __pyx_v_dpdeResidualP_dv = ((PyArrayObject *)values[4]);
4754 __pyx_v_pdeResidualU = ((PyArrayObject *)values[5]);
4755 __pyx_v_dpdeResidualU_dp = ((PyArrayObject *)values[6]);
4756 __pyx_v_dpdeResidualU_du = ((PyArrayObject *)values[7]);
4757 __pyx_v_pdeResidualV = ((PyArrayObject *)values[8]);
4758 __pyx_v_dpdeResidualV_dp = ((PyArrayObject *)values[9]);
4759 __pyx_v_dpdeResidualV_dv = ((PyArrayObject *)values[10]);
4760 __pyx_v_subgridErrorP = ((PyArrayObject *)values[11]);
4761 __pyx_v_dsubgridErrorP_du = ((PyArrayObject *)values[12]);
4762 __pyx_v_dsubgridErrorP_dv = ((PyArrayObject *)values[13]);
4763 __pyx_v_subgridErrorU = ((PyArrayObject *)values[14]);
4764 __pyx_v_dsubgridErrorU_dp = ((PyArrayObject *)values[15]);
4765 __pyx_v_dsubgridErrorU_du = ((PyArrayObject *)values[16]);
4766 __pyx_v_subgridErrorV = ((PyArrayObject *)values[17]);
4767 __pyx_v_dsubgridErrorV_dp = ((PyArrayObject *)values[18]);
4768 __pyx_v_dsubgridErrorV_dv = ((PyArrayObject *)values[19]);
4770 goto __pyx_L4_argument_unpacking_done;
4771 __pyx_L5_argtuple_error:;
4772 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity_pressure", 1, 20, 20, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 978, __pyx_L3_error)
4774 __Pyx_AddTraceback(
"csubgridError.calculateSubgridErrorStokes2D_GLS_velocity_pressure", __pyx_clineno, __pyx_lineno, __pyx_filename);
4775 __Pyx_RefNannyFinishContext();
4777 __pyx_L4_argument_unpacking_done:;
4778 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementDiameter), __pyx_ptype_5numpy_ndarray, 1,
"elementDiameter", 0))) __PYX_ERR(0, 978, __pyx_L1_error)
4779 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1,
"a", 0))) __PYX_ERR(0, 979, __pyx_L1_error)
4780 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pdeResidualP), __pyx_ptype_5numpy_ndarray, 1,
"pdeResidualP", 0))) __PYX_ERR(0, 980, __pyx_L1_error)
4781 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualP_du), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualP_du", 0))) __PYX_ERR(0, 981, __pyx_L1_error)
4782 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualP_dv), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualP_dv", 0))) __PYX_ERR(0, 982, __pyx_L1_error)
4783 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pdeResidualU), __pyx_ptype_5numpy_ndarray, 1,
"pdeResidualU", 0))) __PYX_ERR(0, 983, __pyx_L1_error)
4784 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualU_dp), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualU_dp", 0))) __PYX_ERR(0, 984, __pyx_L1_error)
4785 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualU_du), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualU_du", 0))) __PYX_ERR(0, 985, __pyx_L1_error)
4786 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pdeResidualV), __pyx_ptype_5numpy_ndarray, 1,
"pdeResidualV", 0))) __PYX_ERR(0, 986, __pyx_L1_error)
4787 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualV_dp), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualV_dp", 0))) __PYX_ERR(0, 987, __pyx_L1_error)
4788 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualV_dv), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualV_dv", 0))) __PYX_ERR(0, 988, __pyx_L1_error)
4789 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_subgridErrorP), __pyx_ptype_5numpy_ndarray, 1,
"subgridErrorP", 0))) __PYX_ERR(0, 989, __pyx_L1_error)
4790 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorP_du), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorP_du", 0))) __PYX_ERR(0, 990, __pyx_L1_error)
4791 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorP_dv), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorP_dv", 0))) __PYX_ERR(0, 991, __pyx_L1_error)
4792 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_subgridErrorU), __pyx_ptype_5numpy_ndarray, 1,
"subgridErrorU", 0))) __PYX_ERR(0, 992, __pyx_L1_error)
4793 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorU_dp), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorU_dp", 0))) __PYX_ERR(0, 993, __pyx_L1_error)
4794 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorU_du), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorU_du", 0))) __PYX_ERR(0, 994, __pyx_L1_error)
4795 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_subgridErrorV), __pyx_ptype_5numpy_ndarray, 1,
"subgridErrorV", 0))) __PYX_ERR(0, 995, __pyx_L1_error)
4796 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorV_dp), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorV_dp", 0))) __PYX_ERR(0, 996, __pyx_L1_error)
4797 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorV_dv), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorV_dv", 0))) __PYX_ERR(0, 997, __pyx_L1_error)
4798 __pyx_r = __pyx_pf_13csubgridError_22calculateSubgridErrorStokes2D_GLS_velocity_pressure(__pyx_self, __pyx_v_elementDiameter, __pyx_v_a, __pyx_v_pdeResidualP, __pyx_v_dpdeResidualP_du, __pyx_v_dpdeResidualP_dv, __pyx_v_pdeResidualU, __pyx_v_dpdeResidualU_dp, __pyx_v_dpdeResidualU_du, __pyx_v_pdeResidualV, __pyx_v_dpdeResidualV_dp, __pyx_v_dpdeResidualV_dv, __pyx_v_subgridErrorP, __pyx_v_dsubgridErrorP_du, __pyx_v_dsubgridErrorP_dv, __pyx_v_subgridErrorU, __pyx_v_dsubgridErrorU_dp, __pyx_v_dsubgridErrorU_du, __pyx_v_subgridErrorV, __pyx_v_dsubgridErrorV_dp, __pyx_v_dsubgridErrorV_dv);
4805 __Pyx_RefNannyFinishContext();
4809 static PyObject *__pyx_pf_13csubgridError_22calculateSubgridErrorStokes2D_GLS_velocity_pressure(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_pdeResidualP, PyArrayObject *__pyx_v_dpdeResidualP_du, PyArrayObject *__pyx_v_dpdeResidualP_dv, PyArrayObject *__pyx_v_pdeResidualU, PyArrayObject *__pyx_v_dpdeResidualU_dp, PyArrayObject *__pyx_v_dpdeResidualU_du, PyArrayObject *__pyx_v_pdeResidualV, PyArrayObject *__pyx_v_dpdeResidualV_dp, PyArrayObject *__pyx_v_dpdeResidualV_dv, PyArrayObject *__pyx_v_subgridErrorP, PyArrayObject *__pyx_v_dsubgridErrorP_du, PyArrayObject *__pyx_v_dsubgridErrorP_dv, PyArrayObject *__pyx_v_subgridErrorU, PyArrayObject *__pyx_v_dsubgridErrorU_dp, PyArrayObject *__pyx_v_dsubgridErrorU_du, PyArrayObject *__pyx_v_subgridErrorV, PyArrayObject *__pyx_v_dsubgridErrorV_dp, PyArrayObject *__pyx_v_dsubgridErrorV_dv) {
4810 PyObject *__pyx_r = NULL;
4811 __Pyx_RefNannyDeclarations
4812 __Pyx_RefNannySetupContext(
"calculateSubgridErrorStokes2D_GLS_velocity_pressure", 0);
4821 calculateSubgridErrorStokes2D_GLS_velocity_pressure((__pyx_v_dsubgridErrorP_du->dimensions[0]), (__pyx_v_dsubgridErrorP_du->dimensions[1]), (__pyx_v_dsubgridErrorP_du->dimensions[2]), 2, ((
double *)__pyx_v_elementDiameter->data), ((
double *)__pyx_v_a->data), ((
double *)__pyx_v_pdeResidualP->data), ((
double *)__pyx_v_dpdeResidualP_du->data), ((
double *)__pyx_v_dpdeResidualP_dv->data), ((
double *)__pyx_v_pdeResidualU->data), ((
double *)__pyx_v_dpdeResidualU_dp->data), ((
double *)__pyx_v_dpdeResidualU_du->data), ((
double *)__pyx_v_pdeResidualV->data), ((
double *)__pyx_v_dpdeResidualV_dp->data), ((
double *)__pyx_v_dpdeResidualV_dv->data), ((
double *)__pyx_v_subgridErrorP->data), ((
double *)__pyx_v_dsubgridErrorP_du->data), ((
double *)__pyx_v_dsubgridErrorP_dv->data), ((
double *)__pyx_v_subgridErrorU->data), ((
double *)__pyx_v_dsubgridErrorU_dp->data), ((
double *)__pyx_v_dsubgridErrorU_du->data), ((
double *)__pyx_v_subgridErrorV->data), ((
double *)__pyx_v_dsubgridErrorV_dp->data), ((
double *)__pyx_v_dsubgridErrorV_dv->data));
4832 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4833 __Pyx_XGIVEREF(__pyx_r);
4834 __Pyx_RefNannyFinishContext();
4847 static PyObject *__pyx_pw_13csubgridError_25calculateSubgridErrorStokes2D_GLS_velocity_pressure_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
4848 static PyMethodDef __pyx_mdef_13csubgridError_25calculateSubgridErrorStokes2D_GLS_velocity_pressure_sd = {
"calculateSubgridErrorStokes2D_GLS_velocity_pressure_sd", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_13csubgridError_25calculateSubgridErrorStokes2D_GLS_velocity_pressure_sd, METH_VARARGS|METH_KEYWORDS, 0};
4849 static PyObject *__pyx_pw_13csubgridError_25calculateSubgridErrorStokes2D_GLS_velocity_pressure_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4850 PyArrayObject *__pyx_v_elementDiameter = 0;
4851 PyArrayObject *__pyx_v_a = 0;
4852 PyArrayObject *__pyx_v_pdeResidualP = 0;
4853 PyArrayObject *__pyx_v_dpdeResidualP_du = 0;
4854 PyArrayObject *__pyx_v_dpdeResidualP_dv = 0;
4855 PyArrayObject *__pyx_v_pdeResidualU = 0;
4856 PyArrayObject *__pyx_v_dpdeResidualU_dp = 0;
4857 PyArrayObject *__pyx_v_dpdeResidualU_du = 0;
4858 PyArrayObject *__pyx_v_pdeResidualV = 0;
4859 PyArrayObject *__pyx_v_dpdeResidualV_dp = 0;
4860 PyArrayObject *__pyx_v_dpdeResidualV_dv = 0;
4861 PyArrayObject *__pyx_v_subgridErrorP = 0;
4862 PyArrayObject *__pyx_v_dsubgridErrorP_du = 0;
4863 PyArrayObject *__pyx_v_dsubgridErrorP_dv = 0;
4864 PyArrayObject *__pyx_v_subgridErrorU = 0;
4865 PyArrayObject *__pyx_v_dsubgridErrorU_dp = 0;
4866 PyArrayObject *__pyx_v_dsubgridErrorU_du = 0;
4867 PyArrayObject *__pyx_v_subgridErrorV = 0;
4868 PyArrayObject *__pyx_v_dsubgridErrorV_dp = 0;
4869 PyArrayObject *__pyx_v_dsubgridErrorV_dv = 0;
4870 int __pyx_lineno = 0;
4871 const char *__pyx_filename = NULL;
4872 int __pyx_clineno = 0;
4873 PyObject *__pyx_r = 0;
4874 __Pyx_RefNannyDeclarations
4875 __Pyx_RefNannySetupContext(
"calculateSubgridErrorStokes2D_GLS_velocity_pressure_sd (wrapper)", 0);
4877 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_elementDiameter,&__pyx_n_s_a,&__pyx_n_s_pdeResidualP,&__pyx_n_s_dpdeResidualP_du,&__pyx_n_s_dpdeResidualP_dv,&__pyx_n_s_pdeResidualU,&__pyx_n_s_dpdeResidualU_dp,&__pyx_n_s_dpdeResidualU_du,&__pyx_n_s_pdeResidualV,&__pyx_n_s_dpdeResidualV_dp,&__pyx_n_s_dpdeResidualV_dv,&__pyx_n_s_subgridErrorP,&__pyx_n_s_dsubgridErrorP_du,&__pyx_n_s_dsubgridErrorP_dv,&__pyx_n_s_subgridErrorU,&__pyx_n_s_dsubgridErrorU_dp,&__pyx_n_s_dsubgridErrorU_du,&__pyx_n_s_subgridErrorV,&__pyx_n_s_dsubgridErrorV_dp,&__pyx_n_s_dsubgridErrorV_dv,0};
4878 PyObject* values[20] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
4879 if (unlikely(__pyx_kwds)) {
4881 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
4883 case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
4885 case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
4887 case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
4889 case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
4891 case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
4893 case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
4895 case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
4897 case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
4899 case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
4901 case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
4903 case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
4905 case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
4907 case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
4909 case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
4911 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
4913 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
4915 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
4917 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4919 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4921 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4924 default:
goto __pyx_L5_argtuple_error;
4926 kw_args = PyDict_Size(__pyx_kwds);
4929 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementDiameter)) != 0)) kw_args--;
4930 else goto __pyx_L5_argtuple_error;
4933 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
4935 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity_pressure_sd", 1, 20, 20, 1); __PYX_ERR(0, 1022, __pyx_L3_error)
4939 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pdeResidualP)) != 0)) kw_args--;
4941 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity_pressure_sd", 1, 20, 20, 2); __PYX_ERR(0, 1022, __pyx_L3_error)
4945 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualP_du)) != 0)) kw_args--;
4947 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity_pressure_sd", 1, 20, 20, 3); __PYX_ERR(0, 1022, __pyx_L3_error)
4951 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualP_dv)) != 0)) kw_args--;
4953 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity_pressure_sd", 1, 20, 20, 4); __PYX_ERR(0, 1022, __pyx_L3_error)
4957 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pdeResidualU)) != 0)) kw_args--;
4959 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity_pressure_sd", 1, 20, 20, 5); __PYX_ERR(0, 1022, __pyx_L3_error)
4963 if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualU_dp)) != 0)) kw_args--;
4965 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity_pressure_sd", 1, 20, 20, 6); __PYX_ERR(0, 1022, __pyx_L3_error)
4969 if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualU_du)) != 0)) kw_args--;
4971 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity_pressure_sd", 1, 20, 20, 7); __PYX_ERR(0, 1022, __pyx_L3_error)
4975 if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pdeResidualV)) != 0)) kw_args--;
4977 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity_pressure_sd", 1, 20, 20, 8); __PYX_ERR(0, 1022, __pyx_L3_error)
4981 if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualV_dp)) != 0)) kw_args--;
4983 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity_pressure_sd", 1, 20, 20, 9); __PYX_ERR(0, 1022, __pyx_L3_error)
4987 if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualV_dv)) != 0)) kw_args--;
4989 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity_pressure_sd", 1, 20, 20, 10); __PYX_ERR(0, 1022, __pyx_L3_error)
4993 if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subgridErrorP)) != 0)) kw_args--;
4995 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity_pressure_sd", 1, 20, 20, 11); __PYX_ERR(0, 1022, __pyx_L3_error)
4999 if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorP_du)) != 0)) kw_args--;
5001 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity_pressure_sd", 1, 20, 20, 12); __PYX_ERR(0, 1022, __pyx_L3_error)
5005 if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorP_dv)) != 0)) kw_args--;
5007 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity_pressure_sd", 1, 20, 20, 13); __PYX_ERR(0, 1022, __pyx_L3_error)
5011 if (likely((values[14] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subgridErrorU)) != 0)) kw_args--;
5013 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity_pressure_sd", 1, 20, 20, 14); __PYX_ERR(0, 1022, __pyx_L3_error)
5017 if (likely((values[15] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorU_dp)) != 0)) kw_args--;
5019 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity_pressure_sd", 1, 20, 20, 15); __PYX_ERR(0, 1022, __pyx_L3_error)
5023 if (likely((values[16] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorU_du)) != 0)) kw_args--;
5025 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity_pressure_sd", 1, 20, 20, 16); __PYX_ERR(0, 1022, __pyx_L3_error)
5029 if (likely((values[17] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subgridErrorV)) != 0)) kw_args--;
5031 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity_pressure_sd", 1, 20, 20, 17); __PYX_ERR(0, 1022, __pyx_L3_error)
5035 if (likely((values[18] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorV_dp)) != 0)) kw_args--;
5037 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity_pressure_sd", 1, 20, 20, 18); __PYX_ERR(0, 1022, __pyx_L3_error)
5041 if (likely((values[19] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorV_dv)) != 0)) kw_args--;
5043 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity_pressure_sd", 1, 20, 20, 19); __PYX_ERR(0, 1022, __pyx_L3_error)
5046 if (unlikely(kw_args > 0)) {
5047 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"calculateSubgridErrorStokes2D_GLS_velocity_pressure_sd") < 0)) __PYX_ERR(0, 1022, __pyx_L3_error)
5049 }
else if (PyTuple_GET_SIZE(__pyx_args) != 20) {
5050 goto __pyx_L5_argtuple_error;
5052 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5053 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5054 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5055 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
5056 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
5057 values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
5058 values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
5059 values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
5060 values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
5061 values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
5062 values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
5063 values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
5064 values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
5065 values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
5066 values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
5067 values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
5068 values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
5069 values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
5070 values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
5071 values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
5073 __pyx_v_elementDiameter = ((PyArrayObject *)values[0]);
5074 __pyx_v_a = ((PyArrayObject *)values[1]);
5075 __pyx_v_pdeResidualP = ((PyArrayObject *)values[2]);
5076 __pyx_v_dpdeResidualP_du = ((PyArrayObject *)values[3]);
5077 __pyx_v_dpdeResidualP_dv = ((PyArrayObject *)values[4]);
5078 __pyx_v_pdeResidualU = ((PyArrayObject *)values[5]);
5079 __pyx_v_dpdeResidualU_dp = ((PyArrayObject *)values[6]);
5080 __pyx_v_dpdeResidualU_du = ((PyArrayObject *)values[7]);
5081 __pyx_v_pdeResidualV = ((PyArrayObject *)values[8]);
5082 __pyx_v_dpdeResidualV_dp = ((PyArrayObject *)values[9]);
5083 __pyx_v_dpdeResidualV_dv = ((PyArrayObject *)values[10]);
5084 __pyx_v_subgridErrorP = ((PyArrayObject *)values[11]);
5085 __pyx_v_dsubgridErrorP_du = ((PyArrayObject *)values[12]);
5086 __pyx_v_dsubgridErrorP_dv = ((PyArrayObject *)values[13]);
5087 __pyx_v_subgridErrorU = ((PyArrayObject *)values[14]);
5088 __pyx_v_dsubgridErrorU_dp = ((PyArrayObject *)values[15]);
5089 __pyx_v_dsubgridErrorU_du = ((PyArrayObject *)values[16]);
5090 __pyx_v_subgridErrorV = ((PyArrayObject *)values[17]);
5091 __pyx_v_dsubgridErrorV_dp = ((PyArrayObject *)values[18]);
5092 __pyx_v_dsubgridErrorV_dv = ((PyArrayObject *)values[19]);
5094 goto __pyx_L4_argument_unpacking_done;
5095 __pyx_L5_argtuple_error:;
5096 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_velocity_pressure_sd", 1, 20, 20, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1022, __pyx_L3_error)
5098 __Pyx_AddTraceback(
"csubgridError.calculateSubgridErrorStokes2D_GLS_velocity_pressure_sd", __pyx_clineno, __pyx_lineno, __pyx_filename);
5099 __Pyx_RefNannyFinishContext();
5101 __pyx_L4_argument_unpacking_done:;
5102 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementDiameter), __pyx_ptype_5numpy_ndarray, 1,
"elementDiameter", 0))) __PYX_ERR(0, 1022, __pyx_L1_error)
5103 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1,
"a", 0))) __PYX_ERR(0, 1023, __pyx_L1_error)
5104 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pdeResidualP), __pyx_ptype_5numpy_ndarray, 1,
"pdeResidualP", 0))) __PYX_ERR(0, 1024, __pyx_L1_error)
5105 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualP_du), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualP_du", 0))) __PYX_ERR(0, 1025, __pyx_L1_error)
5106 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualP_dv), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualP_dv", 0))) __PYX_ERR(0, 1026, __pyx_L1_error)
5107 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pdeResidualU), __pyx_ptype_5numpy_ndarray, 1,
"pdeResidualU", 0))) __PYX_ERR(0, 1027, __pyx_L1_error)
5108 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualU_dp), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualU_dp", 0))) __PYX_ERR(0, 1028, __pyx_L1_error)
5109 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualU_du), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualU_du", 0))) __PYX_ERR(0, 1029, __pyx_L1_error)
5110 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pdeResidualV), __pyx_ptype_5numpy_ndarray, 1,
"pdeResidualV", 0))) __PYX_ERR(0, 1030, __pyx_L1_error)
5111 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualV_dp), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualV_dp", 0))) __PYX_ERR(0, 1031, __pyx_L1_error)
5112 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualV_dv), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualV_dv", 0))) __PYX_ERR(0, 1032, __pyx_L1_error)
5113 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_subgridErrorP), __pyx_ptype_5numpy_ndarray, 1,
"subgridErrorP", 0))) __PYX_ERR(0, 1033, __pyx_L1_error)
5114 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorP_du), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorP_du", 0))) __PYX_ERR(0, 1034, __pyx_L1_error)
5115 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorP_dv), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorP_dv", 0))) __PYX_ERR(0, 1035, __pyx_L1_error)
5116 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_subgridErrorU), __pyx_ptype_5numpy_ndarray, 1,
"subgridErrorU", 0))) __PYX_ERR(0, 1036, __pyx_L1_error)
5117 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorU_dp), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorU_dp", 0))) __PYX_ERR(0, 1037, __pyx_L1_error)
5118 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorU_du), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorU_du", 0))) __PYX_ERR(0, 1038, __pyx_L1_error)
5119 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_subgridErrorV), __pyx_ptype_5numpy_ndarray, 1,
"subgridErrorV", 0))) __PYX_ERR(0, 1039, __pyx_L1_error)
5120 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorV_dp), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorV_dp", 0))) __PYX_ERR(0, 1040, __pyx_L1_error)
5121 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorV_dv), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorV_dv", 0))) __PYX_ERR(0, 1041, __pyx_L1_error)
5122 __pyx_r = __pyx_pf_13csubgridError_24calculateSubgridErrorStokes2D_GLS_velocity_pressure_sd(__pyx_self, __pyx_v_elementDiameter, __pyx_v_a, __pyx_v_pdeResidualP, __pyx_v_dpdeResidualP_du, __pyx_v_dpdeResidualP_dv, __pyx_v_pdeResidualU, __pyx_v_dpdeResidualU_dp, __pyx_v_dpdeResidualU_du, __pyx_v_pdeResidualV, __pyx_v_dpdeResidualV_dp, __pyx_v_dpdeResidualV_dv, __pyx_v_subgridErrorP, __pyx_v_dsubgridErrorP_du, __pyx_v_dsubgridErrorP_dv, __pyx_v_subgridErrorU, __pyx_v_dsubgridErrorU_dp, __pyx_v_dsubgridErrorU_du, __pyx_v_subgridErrorV, __pyx_v_dsubgridErrorV_dp, __pyx_v_dsubgridErrorV_dv);
5129 __Pyx_RefNannyFinishContext();
5133 static PyObject *__pyx_pf_13csubgridError_24calculateSubgridErrorStokes2D_GLS_velocity_pressure_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_pdeResidualP, PyArrayObject *__pyx_v_dpdeResidualP_du, PyArrayObject *__pyx_v_dpdeResidualP_dv, PyArrayObject *__pyx_v_pdeResidualU, PyArrayObject *__pyx_v_dpdeResidualU_dp, PyArrayObject *__pyx_v_dpdeResidualU_du, PyArrayObject *__pyx_v_pdeResidualV, PyArrayObject *__pyx_v_dpdeResidualV_dp, PyArrayObject *__pyx_v_dpdeResidualV_dv, PyArrayObject *__pyx_v_subgridErrorP, PyArrayObject *__pyx_v_dsubgridErrorP_du, PyArrayObject *__pyx_v_dsubgridErrorP_dv, PyArrayObject *__pyx_v_subgridErrorU, PyArrayObject *__pyx_v_dsubgridErrorU_dp, PyArrayObject *__pyx_v_dsubgridErrorU_du, PyArrayObject *__pyx_v_subgridErrorV, PyArrayObject *__pyx_v_dsubgridErrorV_dp, PyArrayObject *__pyx_v_dsubgridErrorV_dv) {
5134 PyObject *__pyx_r = NULL;
5135 __Pyx_RefNannyDeclarations
5136 __Pyx_RefNannySetupContext(
"calculateSubgridErrorStokes2D_GLS_velocity_pressure_sd", 0);
5145 calculateSubgridErrorStokes2D_GLS_velocity_pressure_sd((__pyx_v_dsubgridErrorP_du->dimensions[0]), (__pyx_v_dsubgridErrorP_du->dimensions[1]), (__pyx_v_dsubgridErrorP_du->dimensions[2]), 2, ((
double *)__pyx_v_elementDiameter->data), ((
double *)__pyx_v_a->data), ((
double *)__pyx_v_pdeResidualP->data), ((
double *)__pyx_v_dpdeResidualP_du->data), ((
double *)__pyx_v_dpdeResidualP_dv->data), ((
double *)__pyx_v_pdeResidualU->data), ((
double *)__pyx_v_dpdeResidualU_dp->data), ((
double *)__pyx_v_dpdeResidualU_du->data), ((
double *)__pyx_v_pdeResidualV->data), ((
double *)__pyx_v_dpdeResidualV_dp->data), ((
double *)__pyx_v_dpdeResidualV_dv->data), ((
double *)__pyx_v_subgridErrorP->data), ((
double *)__pyx_v_dsubgridErrorP_du->data), ((
double *)__pyx_v_dsubgridErrorP_dv->data), ((
double *)__pyx_v_subgridErrorU->data), ((
double *)__pyx_v_dsubgridErrorU_dp->data), ((
double *)__pyx_v_dsubgridErrorU_du->data), ((
double *)__pyx_v_subgridErrorV->data), ((
double *)__pyx_v_dsubgridErrorV_dp->data), ((
double *)__pyx_v_dsubgridErrorV_dv->data));
5156 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5157 __Pyx_XGIVEREF(__pyx_r);
5158 __Pyx_RefNannyFinishContext();
5171 static PyObject *__pyx_pw_13csubgridError_27calculateSubgridErrorStokes3D_GLS_velocity_pressure(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
5172 static PyMethodDef __pyx_mdef_13csubgridError_27calculateSubgridErrorStokes3D_GLS_velocity_pressure = {
"calculateSubgridErrorStokes3D_GLS_velocity_pressure", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_13csubgridError_27calculateSubgridErrorStokes3D_GLS_velocity_pressure, METH_VARARGS|METH_KEYWORDS, 0};
5173 static PyObject *__pyx_pw_13csubgridError_27calculateSubgridErrorStokes3D_GLS_velocity_pressure(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5174 PyArrayObject *__pyx_v_elementDiameter = 0;
5175 PyArrayObject *__pyx_v_a = 0;
5176 PyArrayObject *__pyx_v_pdeResidualP = 0;
5177 PyArrayObject *__pyx_v_dpdeResidualP_du = 0;
5178 PyArrayObject *__pyx_v_dpdeResidualP_dv = 0;
5179 PyArrayObject *__pyx_v_dpdeResidualP_dw = 0;
5180 PyArrayObject *__pyx_v_pdeResidualU = 0;
5181 PyArrayObject *__pyx_v_dpdeResidualU_dp = 0;
5182 PyArrayObject *__pyx_v_dpdeResidualU_du = 0;
5183 PyArrayObject *__pyx_v_pdeResidualV = 0;
5184 PyArrayObject *__pyx_v_dpdeResidualV_dp = 0;
5185 PyArrayObject *__pyx_v_dpdeResidualV_dv = 0;
5186 PyArrayObject *__pyx_v_pdeResidualW = 0;
5187 PyArrayObject *__pyx_v_dpdeResidualW_dp = 0;
5188 PyArrayObject *__pyx_v_dpdeResidualW_dw = 0;
5189 PyArrayObject *__pyx_v_subgridErrorP = 0;
5190 PyArrayObject *__pyx_v_dsubgridErrorP_du = 0;
5191 PyArrayObject *__pyx_v_dsubgridErrorP_dv = 0;
5192 PyArrayObject *__pyx_v_dsubgridErrorP_dw = 0;
5193 PyArrayObject *__pyx_v_subgridErrorU = 0;
5194 PyArrayObject *__pyx_v_dsubgridErrorU_dp = 0;
5195 PyArrayObject *__pyx_v_dsubgridErrorU_du = 0;
5196 PyArrayObject *__pyx_v_subgridErrorV = 0;
5197 PyArrayObject *__pyx_v_dsubgridErrorV_dp = 0;
5198 PyArrayObject *__pyx_v_dsubgridErrorV_dv = 0;
5199 PyArrayObject *__pyx_v_subgridErrorW = 0;
5200 PyArrayObject *__pyx_v_dsubgridErrorW_dp = 0;
5201 PyArrayObject *__pyx_v_dsubgridErrorW_dw = 0;
5202 int __pyx_lineno = 0;
5203 const char *__pyx_filename = NULL;
5204 int __pyx_clineno = 0;
5205 PyObject *__pyx_r = 0;
5206 __Pyx_RefNannyDeclarations
5207 __Pyx_RefNannySetupContext(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure (wrapper)", 0);
5209 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_elementDiameter,&__pyx_n_s_a,&__pyx_n_s_pdeResidualP,&__pyx_n_s_dpdeResidualP_du,&__pyx_n_s_dpdeResidualP_dv,&__pyx_n_s_dpdeResidualP_dw,&__pyx_n_s_pdeResidualU,&__pyx_n_s_dpdeResidualU_dp,&__pyx_n_s_dpdeResidualU_du,&__pyx_n_s_pdeResidualV,&__pyx_n_s_dpdeResidualV_dp,&__pyx_n_s_dpdeResidualV_dv,&__pyx_n_s_pdeResidualW,&__pyx_n_s_dpdeResidualW_dp,&__pyx_n_s_dpdeResidualW_dw,&__pyx_n_s_subgridErrorP,&__pyx_n_s_dsubgridErrorP_du,&__pyx_n_s_dsubgridErrorP_dv,&__pyx_n_s_dsubgridErrorP_dw,&__pyx_n_s_subgridErrorU,&__pyx_n_s_dsubgridErrorU_dp,&__pyx_n_s_dsubgridErrorU_du,&__pyx_n_s_subgridErrorV,&__pyx_n_s_dsubgridErrorV_dp,&__pyx_n_s_dsubgridErrorV_dv,&__pyx_n_s_subgridErrorW,&__pyx_n_s_dsubgridErrorW_dp,&__pyx_n_s_dsubgridErrorW_dw,0};
5210 PyObject* values[28] = {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,0,0};
5211 if (unlikely(__pyx_kwds)) {
5213 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5215 case 28: values[27] = PyTuple_GET_ITEM(__pyx_args, 27);
5217 case 27: values[26] = PyTuple_GET_ITEM(__pyx_args, 26);
5219 case 26: values[25] = PyTuple_GET_ITEM(__pyx_args, 25);
5221 case 25: values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
5223 case 24: values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
5225 case 23: values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
5227 case 22: values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
5229 case 21: values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
5231 case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
5233 case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
5235 case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
5237 case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
5239 case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
5241 case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
5243 case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
5245 case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
5247 case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
5249 case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
5251 case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
5253 case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
5255 case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
5257 case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
5259 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
5261 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
5263 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
5265 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5267 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5269 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5272 default:
goto __pyx_L5_argtuple_error;
5274 kw_args = PyDict_Size(__pyx_kwds);
5277 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementDiameter)) != 0)) kw_args--;
5278 else goto __pyx_L5_argtuple_error;
5281 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
5283 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure", 1, 28, 28, 1); __PYX_ERR(0, 1066, __pyx_L3_error)
5287 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pdeResidualP)) != 0)) kw_args--;
5289 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure", 1, 28, 28, 2); __PYX_ERR(0, 1066, __pyx_L3_error)
5293 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualP_du)) != 0)) kw_args--;
5295 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure", 1, 28, 28, 3); __PYX_ERR(0, 1066, __pyx_L3_error)
5299 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualP_dv)) != 0)) kw_args--;
5301 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure", 1, 28, 28, 4); __PYX_ERR(0, 1066, __pyx_L3_error)
5305 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualP_dw)) != 0)) kw_args--;
5307 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure", 1, 28, 28, 5); __PYX_ERR(0, 1066, __pyx_L3_error)
5311 if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pdeResidualU)) != 0)) kw_args--;
5313 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure", 1, 28, 28, 6); __PYX_ERR(0, 1066, __pyx_L3_error)
5317 if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualU_dp)) != 0)) kw_args--;
5319 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure", 1, 28, 28, 7); __PYX_ERR(0, 1066, __pyx_L3_error)
5323 if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualU_du)) != 0)) kw_args--;
5325 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure", 1, 28, 28, 8); __PYX_ERR(0, 1066, __pyx_L3_error)
5329 if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pdeResidualV)) != 0)) kw_args--;
5331 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure", 1, 28, 28, 9); __PYX_ERR(0, 1066, __pyx_L3_error)
5335 if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualV_dp)) != 0)) kw_args--;
5337 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure", 1, 28, 28, 10); __PYX_ERR(0, 1066, __pyx_L3_error)
5341 if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualV_dv)) != 0)) kw_args--;
5343 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure", 1, 28, 28, 11); __PYX_ERR(0, 1066, __pyx_L3_error)
5347 if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pdeResidualW)) != 0)) kw_args--;
5349 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure", 1, 28, 28, 12); __PYX_ERR(0, 1066, __pyx_L3_error)
5353 if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualW_dp)) != 0)) kw_args--;
5355 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure", 1, 28, 28, 13); __PYX_ERR(0, 1066, __pyx_L3_error)
5359 if (likely((values[14] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualW_dw)) != 0)) kw_args--;
5361 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure", 1, 28, 28, 14); __PYX_ERR(0, 1066, __pyx_L3_error)
5365 if (likely((values[15] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subgridErrorP)) != 0)) kw_args--;
5367 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure", 1, 28, 28, 15); __PYX_ERR(0, 1066, __pyx_L3_error)
5371 if (likely((values[16] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorP_du)) != 0)) kw_args--;
5373 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure", 1, 28, 28, 16); __PYX_ERR(0, 1066, __pyx_L3_error)
5377 if (likely((values[17] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorP_dv)) != 0)) kw_args--;
5379 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure", 1, 28, 28, 17); __PYX_ERR(0, 1066, __pyx_L3_error)
5383 if (likely((values[18] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorP_dw)) != 0)) kw_args--;
5385 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure", 1, 28, 28, 18); __PYX_ERR(0, 1066, __pyx_L3_error)
5389 if (likely((values[19] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subgridErrorU)) != 0)) kw_args--;
5391 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure", 1, 28, 28, 19); __PYX_ERR(0, 1066, __pyx_L3_error)
5395 if (likely((values[20] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorU_dp)) != 0)) kw_args--;
5397 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure", 1, 28, 28, 20); __PYX_ERR(0, 1066, __pyx_L3_error)
5401 if (likely((values[21] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorU_du)) != 0)) kw_args--;
5403 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure", 1, 28, 28, 21); __PYX_ERR(0, 1066, __pyx_L3_error)
5407 if (likely((values[22] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subgridErrorV)) != 0)) kw_args--;
5409 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure", 1, 28, 28, 22); __PYX_ERR(0, 1066, __pyx_L3_error)
5413 if (likely((values[23] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorV_dp)) != 0)) kw_args--;
5415 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure", 1, 28, 28, 23); __PYX_ERR(0, 1066, __pyx_L3_error)
5419 if (likely((values[24] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorV_dv)) != 0)) kw_args--;
5421 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure", 1, 28, 28, 24); __PYX_ERR(0, 1066, __pyx_L3_error)
5425 if (likely((values[25] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subgridErrorW)) != 0)) kw_args--;
5427 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure", 1, 28, 28, 25); __PYX_ERR(0, 1066, __pyx_L3_error)
5431 if (likely((values[26] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorW_dp)) != 0)) kw_args--;
5433 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure", 1, 28, 28, 26); __PYX_ERR(0, 1066, __pyx_L3_error)
5437 if (likely((values[27] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorW_dw)) != 0)) kw_args--;
5439 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure", 1, 28, 28, 27); __PYX_ERR(0, 1066, __pyx_L3_error)
5442 if (unlikely(kw_args > 0)) {
5443 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"calculateSubgridErrorStokes3D_GLS_velocity_pressure") < 0)) __PYX_ERR(0, 1066, __pyx_L3_error)
5445 }
else if (PyTuple_GET_SIZE(__pyx_args) != 28) {
5446 goto __pyx_L5_argtuple_error;
5448 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5449 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5450 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5451 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
5452 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
5453 values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
5454 values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
5455 values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
5456 values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
5457 values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
5458 values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
5459 values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
5460 values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
5461 values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
5462 values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
5463 values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
5464 values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
5465 values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
5466 values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
5467 values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
5468 values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
5469 values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
5470 values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
5471 values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
5472 values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
5473 values[25] = PyTuple_GET_ITEM(__pyx_args, 25);
5474 values[26] = PyTuple_GET_ITEM(__pyx_args, 26);
5475 values[27] = PyTuple_GET_ITEM(__pyx_args, 27);
5477 __pyx_v_elementDiameter = ((PyArrayObject *)values[0]);
5478 __pyx_v_a = ((PyArrayObject *)values[1]);
5479 __pyx_v_pdeResidualP = ((PyArrayObject *)values[2]);
5480 __pyx_v_dpdeResidualP_du = ((PyArrayObject *)values[3]);
5481 __pyx_v_dpdeResidualP_dv = ((PyArrayObject *)values[4]);
5482 __pyx_v_dpdeResidualP_dw = ((PyArrayObject *)values[5]);
5483 __pyx_v_pdeResidualU = ((PyArrayObject *)values[6]);
5484 __pyx_v_dpdeResidualU_dp = ((PyArrayObject *)values[7]);
5485 __pyx_v_dpdeResidualU_du = ((PyArrayObject *)values[8]);
5486 __pyx_v_pdeResidualV = ((PyArrayObject *)values[9]);
5487 __pyx_v_dpdeResidualV_dp = ((PyArrayObject *)values[10]);
5488 __pyx_v_dpdeResidualV_dv = ((PyArrayObject *)values[11]);
5489 __pyx_v_pdeResidualW = ((PyArrayObject *)values[12]);
5490 __pyx_v_dpdeResidualW_dp = ((PyArrayObject *)values[13]);
5491 __pyx_v_dpdeResidualW_dw = ((PyArrayObject *)values[14]);
5492 __pyx_v_subgridErrorP = ((PyArrayObject *)values[15]);
5493 __pyx_v_dsubgridErrorP_du = ((PyArrayObject *)values[16]);
5494 __pyx_v_dsubgridErrorP_dv = ((PyArrayObject *)values[17]);
5495 __pyx_v_dsubgridErrorP_dw = ((PyArrayObject *)values[18]);
5496 __pyx_v_subgridErrorU = ((PyArrayObject *)values[19]);
5497 __pyx_v_dsubgridErrorU_dp = ((PyArrayObject *)values[20]);
5498 __pyx_v_dsubgridErrorU_du = ((PyArrayObject *)values[21]);
5499 __pyx_v_subgridErrorV = ((PyArrayObject *)values[22]);
5500 __pyx_v_dsubgridErrorV_dp = ((PyArrayObject *)values[23]);
5501 __pyx_v_dsubgridErrorV_dv = ((PyArrayObject *)values[24]);
5502 __pyx_v_subgridErrorW = ((PyArrayObject *)values[25]);
5503 __pyx_v_dsubgridErrorW_dp = ((PyArrayObject *)values[26]);
5504 __pyx_v_dsubgridErrorW_dw = ((PyArrayObject *)values[27]);
5506 goto __pyx_L4_argument_unpacking_done;
5507 __pyx_L5_argtuple_error:;
5508 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure", 1, 28, 28, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1066, __pyx_L3_error)
5510 __Pyx_AddTraceback(
"csubgridError.calculateSubgridErrorStokes3D_GLS_velocity_pressure", __pyx_clineno, __pyx_lineno, __pyx_filename);
5511 __Pyx_RefNannyFinishContext();
5513 __pyx_L4_argument_unpacking_done:;
5514 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementDiameter), __pyx_ptype_5numpy_ndarray, 1,
"elementDiameter", 0))) __PYX_ERR(0, 1066, __pyx_L1_error)
5515 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1,
"a", 0))) __PYX_ERR(0, 1067, __pyx_L1_error)
5516 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pdeResidualP), __pyx_ptype_5numpy_ndarray, 1,
"pdeResidualP", 0))) __PYX_ERR(0, 1068, __pyx_L1_error)
5517 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualP_du), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualP_du", 0))) __PYX_ERR(0, 1069, __pyx_L1_error)
5518 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualP_dv), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualP_dv", 0))) __PYX_ERR(0, 1070, __pyx_L1_error)
5519 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualP_dw), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualP_dw", 0))) __PYX_ERR(0, 1071, __pyx_L1_error)
5520 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pdeResidualU), __pyx_ptype_5numpy_ndarray, 1,
"pdeResidualU", 0))) __PYX_ERR(0, 1072, __pyx_L1_error)
5521 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualU_dp), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualU_dp", 0))) __PYX_ERR(0, 1073, __pyx_L1_error)
5522 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualU_du), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualU_du", 0))) __PYX_ERR(0, 1074, __pyx_L1_error)
5523 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pdeResidualV), __pyx_ptype_5numpy_ndarray, 1,
"pdeResidualV", 0))) __PYX_ERR(0, 1075, __pyx_L1_error)
5524 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualV_dp), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualV_dp", 0))) __PYX_ERR(0, 1076, __pyx_L1_error)
5525 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualV_dv), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualV_dv", 0))) __PYX_ERR(0, 1077, __pyx_L1_error)
5526 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pdeResidualW), __pyx_ptype_5numpy_ndarray, 1,
"pdeResidualW", 0))) __PYX_ERR(0, 1078, __pyx_L1_error)
5527 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualW_dp), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualW_dp", 0))) __PYX_ERR(0, 1079, __pyx_L1_error)
5528 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualW_dw), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualW_dw", 0))) __PYX_ERR(0, 1080, __pyx_L1_error)
5529 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_subgridErrorP), __pyx_ptype_5numpy_ndarray, 1,
"subgridErrorP", 0))) __PYX_ERR(0, 1081, __pyx_L1_error)
5530 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorP_du), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorP_du", 0))) __PYX_ERR(0, 1082, __pyx_L1_error)
5531 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorP_dv), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorP_dv", 0))) __PYX_ERR(0, 1083, __pyx_L1_error)
5532 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorP_dw), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorP_dw", 0))) __PYX_ERR(0, 1084, __pyx_L1_error)
5533 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_subgridErrorU), __pyx_ptype_5numpy_ndarray, 1,
"subgridErrorU", 0))) __PYX_ERR(0, 1085, __pyx_L1_error)
5534 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorU_dp), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorU_dp", 0))) __PYX_ERR(0, 1086, __pyx_L1_error)
5535 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorU_du), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorU_du", 0))) __PYX_ERR(0, 1087, __pyx_L1_error)
5536 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_subgridErrorV), __pyx_ptype_5numpy_ndarray, 1,
"subgridErrorV", 0))) __PYX_ERR(0, 1088, __pyx_L1_error)
5537 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorV_dp), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorV_dp", 0))) __PYX_ERR(0, 1089, __pyx_L1_error)
5538 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorV_dv), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorV_dv", 0))) __PYX_ERR(0, 1090, __pyx_L1_error)
5539 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_subgridErrorW), __pyx_ptype_5numpy_ndarray, 1,
"subgridErrorW", 0))) __PYX_ERR(0, 1091, __pyx_L1_error)
5540 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorW_dp), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorW_dp", 0))) __PYX_ERR(0, 1092, __pyx_L1_error)
5541 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorW_dw), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorW_dw", 0))) __PYX_ERR(0, 1093, __pyx_L1_error)
5542 __pyx_r = __pyx_pf_13csubgridError_26calculateSubgridErrorStokes3D_GLS_velocity_pressure(__pyx_self, __pyx_v_elementDiameter, __pyx_v_a, __pyx_v_pdeResidualP, __pyx_v_dpdeResidualP_du, __pyx_v_dpdeResidualP_dv, __pyx_v_dpdeResidualP_dw, __pyx_v_pdeResidualU, __pyx_v_dpdeResidualU_dp, __pyx_v_dpdeResidualU_du, __pyx_v_pdeResidualV, __pyx_v_dpdeResidualV_dp, __pyx_v_dpdeResidualV_dv, __pyx_v_pdeResidualW, __pyx_v_dpdeResidualW_dp, __pyx_v_dpdeResidualW_dw, __pyx_v_subgridErrorP, __pyx_v_dsubgridErrorP_du, __pyx_v_dsubgridErrorP_dv, __pyx_v_dsubgridErrorP_dw, __pyx_v_subgridErrorU, __pyx_v_dsubgridErrorU_dp, __pyx_v_dsubgridErrorU_du, __pyx_v_subgridErrorV, __pyx_v_dsubgridErrorV_dp, __pyx_v_dsubgridErrorV_dv, __pyx_v_subgridErrorW, __pyx_v_dsubgridErrorW_dp, __pyx_v_dsubgridErrorW_dw);
5549 __Pyx_RefNannyFinishContext();
5553 static PyObject *__pyx_pf_13csubgridError_26calculateSubgridErrorStokes3D_GLS_velocity_pressure(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_pdeResidualP, PyArrayObject *__pyx_v_dpdeResidualP_du, PyArrayObject *__pyx_v_dpdeResidualP_dv, PyArrayObject *__pyx_v_dpdeResidualP_dw, PyArrayObject *__pyx_v_pdeResidualU, PyArrayObject *__pyx_v_dpdeResidualU_dp, PyArrayObject *__pyx_v_dpdeResidualU_du, PyArrayObject *__pyx_v_pdeResidualV, PyArrayObject *__pyx_v_dpdeResidualV_dp, PyArrayObject *__pyx_v_dpdeResidualV_dv, PyArrayObject *__pyx_v_pdeResidualW, PyArrayObject *__pyx_v_dpdeResidualW_dp, PyArrayObject *__pyx_v_dpdeResidualW_dw, PyArrayObject *__pyx_v_subgridErrorP, PyArrayObject *__pyx_v_dsubgridErrorP_du, PyArrayObject *__pyx_v_dsubgridErrorP_dv, PyArrayObject *__pyx_v_dsubgridErrorP_dw, PyArrayObject *__pyx_v_subgridErrorU, PyArrayObject *__pyx_v_dsubgridErrorU_dp, PyArrayObject *__pyx_v_dsubgridErrorU_du, PyArrayObject *__pyx_v_subgridErrorV, PyArrayObject *__pyx_v_dsubgridErrorV_dp, PyArrayObject *__pyx_v_dsubgridErrorV_dv, PyArrayObject *__pyx_v_subgridErrorW, PyArrayObject *__pyx_v_dsubgridErrorW_dp, PyArrayObject *__pyx_v_dsubgridErrorW_dw) {
5554 PyObject *__pyx_r = NULL;
5555 __Pyx_RefNannyDeclarations
5556 __Pyx_RefNannySetupContext(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure", 0);
5565 calculateSubgridErrorStokes3D_GLS_velocity_pressure((__pyx_v_dsubgridErrorP_du->dimensions[0]), (__pyx_v_dsubgridErrorP_du->dimensions[1]), (__pyx_v_dsubgridErrorP_du->dimensions[2]), 3, ((
double *)__pyx_v_elementDiameter->data), ((
double *)__pyx_v_a->data), ((
double *)__pyx_v_pdeResidualP->data), ((
double *)__pyx_v_dpdeResidualP_du->data), ((
double *)__pyx_v_dpdeResidualP_dv->data), ((
double *)__pyx_v_dpdeResidualP_dw->data), ((
double *)__pyx_v_pdeResidualU->data), ((
double *)__pyx_v_dpdeResidualU_dp->data), ((
double *)__pyx_v_dpdeResidualU_du->data), ((
double *)__pyx_v_pdeResidualV->data), ((
double *)__pyx_v_dpdeResidualV_dp->data), ((
double *)__pyx_v_dpdeResidualV_dv->data), ((
double *)__pyx_v_pdeResidualW->data), ((
double *)__pyx_v_dpdeResidualW_dp->data), ((
double *)__pyx_v_dpdeResidualW_dw->data), ((
double *)__pyx_v_subgridErrorP->data), ((
double *)__pyx_v_dsubgridErrorP_du->data), ((
double *)__pyx_v_dsubgridErrorP_dv->data), ((
double *)__pyx_v_dsubgridErrorP_dw->data), ((
double *)__pyx_v_subgridErrorU->data), ((
double *)__pyx_v_dsubgridErrorU_dp->data), ((
double *)__pyx_v_dsubgridErrorU_du->data), ((
double *)__pyx_v_subgridErrorV->data), ((
double *)__pyx_v_dsubgridErrorV_dp->data), ((
double *)__pyx_v_dsubgridErrorV_dv->data), ((
double *)__pyx_v_subgridErrorW->data), ((
double *)__pyx_v_dsubgridErrorW_dp->data), ((
double *)__pyx_v_dsubgridErrorW_dw->data));
5576 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5577 __Pyx_XGIVEREF(__pyx_r);
5578 __Pyx_RefNannyFinishContext();
5591 static PyObject *__pyx_pw_13csubgridError_29calculateSubgridErrorStokes3D_GLS_velocity_pressure_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
5592 static PyMethodDef __pyx_mdef_13csubgridError_29calculateSubgridErrorStokes3D_GLS_velocity_pressure_sd = {
"calculateSubgridErrorStokes3D_GLS_velocity_pressure_sd", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_13csubgridError_29calculateSubgridErrorStokes3D_GLS_velocity_pressure_sd, METH_VARARGS|METH_KEYWORDS, 0};
5593 static PyObject *__pyx_pw_13csubgridError_29calculateSubgridErrorStokes3D_GLS_velocity_pressure_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5594 PyArrayObject *__pyx_v_elementDiameter = 0;
5595 PyArrayObject *__pyx_v_a = 0;
5596 PyArrayObject *__pyx_v_pdeResidualP = 0;
5597 PyArrayObject *__pyx_v_dpdeResidualP_du = 0;
5598 PyArrayObject *__pyx_v_dpdeResidualP_dv = 0;
5599 PyArrayObject *__pyx_v_dpdeResidualP_dw = 0;
5600 PyArrayObject *__pyx_v_pdeResidualU = 0;
5601 PyArrayObject *__pyx_v_dpdeResidualU_dp = 0;
5602 PyArrayObject *__pyx_v_dpdeResidualU_du = 0;
5603 PyArrayObject *__pyx_v_pdeResidualV = 0;
5604 PyArrayObject *__pyx_v_dpdeResidualV_dp = 0;
5605 PyArrayObject *__pyx_v_dpdeResidualV_dv = 0;
5606 PyArrayObject *__pyx_v_pdeResidualW = 0;
5607 PyArrayObject *__pyx_v_dpdeResidualW_dp = 0;
5608 PyArrayObject *__pyx_v_dpdeResidualW_dw = 0;
5609 PyArrayObject *__pyx_v_subgridErrorP = 0;
5610 PyArrayObject *__pyx_v_dsubgridErrorP_du = 0;
5611 PyArrayObject *__pyx_v_dsubgridErrorP_dv = 0;
5612 PyArrayObject *__pyx_v_dsubgridErrorP_dw = 0;
5613 PyArrayObject *__pyx_v_subgridErrorU = 0;
5614 PyArrayObject *__pyx_v_dsubgridErrorU_dp = 0;
5615 PyArrayObject *__pyx_v_dsubgridErrorU_du = 0;
5616 PyArrayObject *__pyx_v_subgridErrorV = 0;
5617 PyArrayObject *__pyx_v_dsubgridErrorV_dp = 0;
5618 PyArrayObject *__pyx_v_dsubgridErrorV_dv = 0;
5619 PyArrayObject *__pyx_v_subgridErrorW = 0;
5620 PyArrayObject *__pyx_v_dsubgridErrorW_dp = 0;
5621 PyArrayObject *__pyx_v_dsubgridErrorW_dw = 0;
5622 int __pyx_lineno = 0;
5623 const char *__pyx_filename = NULL;
5624 int __pyx_clineno = 0;
5625 PyObject *__pyx_r = 0;
5626 __Pyx_RefNannyDeclarations
5627 __Pyx_RefNannySetupContext(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure_sd (wrapper)", 0);
5629 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_elementDiameter,&__pyx_n_s_a,&__pyx_n_s_pdeResidualP,&__pyx_n_s_dpdeResidualP_du,&__pyx_n_s_dpdeResidualP_dv,&__pyx_n_s_dpdeResidualP_dw,&__pyx_n_s_pdeResidualU,&__pyx_n_s_dpdeResidualU_dp,&__pyx_n_s_dpdeResidualU_du,&__pyx_n_s_pdeResidualV,&__pyx_n_s_dpdeResidualV_dp,&__pyx_n_s_dpdeResidualV_dv,&__pyx_n_s_pdeResidualW,&__pyx_n_s_dpdeResidualW_dp,&__pyx_n_s_dpdeResidualW_dw,&__pyx_n_s_subgridErrorP,&__pyx_n_s_dsubgridErrorP_du,&__pyx_n_s_dsubgridErrorP_dv,&__pyx_n_s_dsubgridErrorP_dw,&__pyx_n_s_subgridErrorU,&__pyx_n_s_dsubgridErrorU_dp,&__pyx_n_s_dsubgridErrorU_du,&__pyx_n_s_subgridErrorV,&__pyx_n_s_dsubgridErrorV_dp,&__pyx_n_s_dsubgridErrorV_dv,&__pyx_n_s_subgridErrorW,&__pyx_n_s_dsubgridErrorW_dp,&__pyx_n_s_dsubgridErrorW_dw,0};
5630 PyObject* values[28] = {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,0,0};
5631 if (unlikely(__pyx_kwds)) {
5633 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5635 case 28: values[27] = PyTuple_GET_ITEM(__pyx_args, 27);
5637 case 27: values[26] = PyTuple_GET_ITEM(__pyx_args, 26);
5639 case 26: values[25] = PyTuple_GET_ITEM(__pyx_args, 25);
5641 case 25: values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
5643 case 24: values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
5645 case 23: values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
5647 case 22: values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
5649 case 21: values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
5651 case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
5653 case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
5655 case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
5657 case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
5659 case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
5661 case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
5663 case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
5665 case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
5667 case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
5669 case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
5671 case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
5673 case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
5675 case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
5677 case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
5679 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
5681 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
5683 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
5685 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5687 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5689 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5692 default:
goto __pyx_L5_argtuple_error;
5694 kw_args = PyDict_Size(__pyx_kwds);
5697 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementDiameter)) != 0)) kw_args--;
5698 else goto __pyx_L5_argtuple_error;
5701 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
5703 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure_sd", 1, 28, 28, 1); __PYX_ERR(0, 1126, __pyx_L3_error)
5707 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pdeResidualP)) != 0)) kw_args--;
5709 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure_sd", 1, 28, 28, 2); __PYX_ERR(0, 1126, __pyx_L3_error)
5713 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualP_du)) != 0)) kw_args--;
5715 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure_sd", 1, 28, 28, 3); __PYX_ERR(0, 1126, __pyx_L3_error)
5719 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualP_dv)) != 0)) kw_args--;
5721 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure_sd", 1, 28, 28, 4); __PYX_ERR(0, 1126, __pyx_L3_error)
5725 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualP_dw)) != 0)) kw_args--;
5727 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure_sd", 1, 28, 28, 5); __PYX_ERR(0, 1126, __pyx_L3_error)
5731 if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pdeResidualU)) != 0)) kw_args--;
5733 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure_sd", 1, 28, 28, 6); __PYX_ERR(0, 1126, __pyx_L3_error)
5737 if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualU_dp)) != 0)) kw_args--;
5739 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure_sd", 1, 28, 28, 7); __PYX_ERR(0, 1126, __pyx_L3_error)
5743 if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualU_du)) != 0)) kw_args--;
5745 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure_sd", 1, 28, 28, 8); __PYX_ERR(0, 1126, __pyx_L3_error)
5749 if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pdeResidualV)) != 0)) kw_args--;
5751 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure_sd", 1, 28, 28, 9); __PYX_ERR(0, 1126, __pyx_L3_error)
5755 if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualV_dp)) != 0)) kw_args--;
5757 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure_sd", 1, 28, 28, 10); __PYX_ERR(0, 1126, __pyx_L3_error)
5761 if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualV_dv)) != 0)) kw_args--;
5763 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure_sd", 1, 28, 28, 11); __PYX_ERR(0, 1126, __pyx_L3_error)
5767 if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pdeResidualW)) != 0)) kw_args--;
5769 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure_sd", 1, 28, 28, 12); __PYX_ERR(0, 1126, __pyx_L3_error)
5773 if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualW_dp)) != 0)) kw_args--;
5775 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure_sd", 1, 28, 28, 13); __PYX_ERR(0, 1126, __pyx_L3_error)
5779 if (likely((values[14] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualW_dw)) != 0)) kw_args--;
5781 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure_sd", 1, 28, 28, 14); __PYX_ERR(0, 1126, __pyx_L3_error)
5785 if (likely((values[15] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subgridErrorP)) != 0)) kw_args--;
5787 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure_sd", 1, 28, 28, 15); __PYX_ERR(0, 1126, __pyx_L3_error)
5791 if (likely((values[16] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorP_du)) != 0)) kw_args--;
5793 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure_sd", 1, 28, 28, 16); __PYX_ERR(0, 1126, __pyx_L3_error)
5797 if (likely((values[17] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorP_dv)) != 0)) kw_args--;
5799 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure_sd", 1, 28, 28, 17); __PYX_ERR(0, 1126, __pyx_L3_error)
5803 if (likely((values[18] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorP_dw)) != 0)) kw_args--;
5805 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure_sd", 1, 28, 28, 18); __PYX_ERR(0, 1126, __pyx_L3_error)
5809 if (likely((values[19] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subgridErrorU)) != 0)) kw_args--;
5811 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure_sd", 1, 28, 28, 19); __PYX_ERR(0, 1126, __pyx_L3_error)
5815 if (likely((values[20] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorU_dp)) != 0)) kw_args--;
5817 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure_sd", 1, 28, 28, 20); __PYX_ERR(0, 1126, __pyx_L3_error)
5821 if (likely((values[21] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorU_du)) != 0)) kw_args--;
5823 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure_sd", 1, 28, 28, 21); __PYX_ERR(0, 1126, __pyx_L3_error)
5827 if (likely((values[22] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subgridErrorV)) != 0)) kw_args--;
5829 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure_sd", 1, 28, 28, 22); __PYX_ERR(0, 1126, __pyx_L3_error)
5833 if (likely((values[23] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorV_dp)) != 0)) kw_args--;
5835 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure_sd", 1, 28, 28, 23); __PYX_ERR(0, 1126, __pyx_L3_error)
5839 if (likely((values[24] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorV_dv)) != 0)) kw_args--;
5841 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure_sd", 1, 28, 28, 24); __PYX_ERR(0, 1126, __pyx_L3_error)
5845 if (likely((values[25] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subgridErrorW)) != 0)) kw_args--;
5847 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure_sd", 1, 28, 28, 25); __PYX_ERR(0, 1126, __pyx_L3_error)
5851 if (likely((values[26] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorW_dp)) != 0)) kw_args--;
5853 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure_sd", 1, 28, 28, 26); __PYX_ERR(0, 1126, __pyx_L3_error)
5857 if (likely((values[27] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorW_dw)) != 0)) kw_args--;
5859 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure_sd", 1, 28, 28, 27); __PYX_ERR(0, 1126, __pyx_L3_error)
5862 if (unlikely(kw_args > 0)) {
5863 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"calculateSubgridErrorStokes3D_GLS_velocity_pressure_sd") < 0)) __PYX_ERR(0, 1126, __pyx_L3_error)
5865 }
else if (PyTuple_GET_SIZE(__pyx_args) != 28) {
5866 goto __pyx_L5_argtuple_error;
5868 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5869 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5870 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5871 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
5872 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
5873 values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
5874 values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
5875 values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
5876 values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
5877 values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
5878 values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
5879 values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
5880 values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
5881 values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
5882 values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
5883 values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
5884 values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
5885 values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
5886 values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
5887 values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
5888 values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
5889 values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
5890 values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
5891 values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
5892 values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
5893 values[25] = PyTuple_GET_ITEM(__pyx_args, 25);
5894 values[26] = PyTuple_GET_ITEM(__pyx_args, 26);
5895 values[27] = PyTuple_GET_ITEM(__pyx_args, 27);
5897 __pyx_v_elementDiameter = ((PyArrayObject *)values[0]);
5898 __pyx_v_a = ((PyArrayObject *)values[1]);
5899 __pyx_v_pdeResidualP = ((PyArrayObject *)values[2]);
5900 __pyx_v_dpdeResidualP_du = ((PyArrayObject *)values[3]);
5901 __pyx_v_dpdeResidualP_dv = ((PyArrayObject *)values[4]);
5902 __pyx_v_dpdeResidualP_dw = ((PyArrayObject *)values[5]);
5903 __pyx_v_pdeResidualU = ((PyArrayObject *)values[6]);
5904 __pyx_v_dpdeResidualU_dp = ((PyArrayObject *)values[7]);
5905 __pyx_v_dpdeResidualU_du = ((PyArrayObject *)values[8]);
5906 __pyx_v_pdeResidualV = ((PyArrayObject *)values[9]);
5907 __pyx_v_dpdeResidualV_dp = ((PyArrayObject *)values[10]);
5908 __pyx_v_dpdeResidualV_dv = ((PyArrayObject *)values[11]);
5909 __pyx_v_pdeResidualW = ((PyArrayObject *)values[12]);
5910 __pyx_v_dpdeResidualW_dp = ((PyArrayObject *)values[13]);
5911 __pyx_v_dpdeResidualW_dw = ((PyArrayObject *)values[14]);
5912 __pyx_v_subgridErrorP = ((PyArrayObject *)values[15]);
5913 __pyx_v_dsubgridErrorP_du = ((PyArrayObject *)values[16]);
5914 __pyx_v_dsubgridErrorP_dv = ((PyArrayObject *)values[17]);
5915 __pyx_v_dsubgridErrorP_dw = ((PyArrayObject *)values[18]);
5916 __pyx_v_subgridErrorU = ((PyArrayObject *)values[19]);
5917 __pyx_v_dsubgridErrorU_dp = ((PyArrayObject *)values[20]);
5918 __pyx_v_dsubgridErrorU_du = ((PyArrayObject *)values[21]);
5919 __pyx_v_subgridErrorV = ((PyArrayObject *)values[22]);
5920 __pyx_v_dsubgridErrorV_dp = ((PyArrayObject *)values[23]);
5921 __pyx_v_dsubgridErrorV_dv = ((PyArrayObject *)values[24]);
5922 __pyx_v_subgridErrorW = ((PyArrayObject *)values[25]);
5923 __pyx_v_dsubgridErrorW_dp = ((PyArrayObject *)values[26]);
5924 __pyx_v_dsubgridErrorW_dw = ((PyArrayObject *)values[27]);
5926 goto __pyx_L4_argument_unpacking_done;
5927 __pyx_L5_argtuple_error:;
5928 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure_sd", 1, 28, 28, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1126, __pyx_L3_error)
5930 __Pyx_AddTraceback(
"csubgridError.calculateSubgridErrorStokes3D_GLS_velocity_pressure_sd", __pyx_clineno, __pyx_lineno, __pyx_filename);
5931 __Pyx_RefNannyFinishContext();
5933 __pyx_L4_argument_unpacking_done:;
5934 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementDiameter), __pyx_ptype_5numpy_ndarray, 1,
"elementDiameter", 0))) __PYX_ERR(0, 1126, __pyx_L1_error)
5935 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1,
"a", 0))) __PYX_ERR(0, 1127, __pyx_L1_error)
5936 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pdeResidualP), __pyx_ptype_5numpy_ndarray, 1,
"pdeResidualP", 0))) __PYX_ERR(0, 1128, __pyx_L1_error)
5937 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualP_du), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualP_du", 0))) __PYX_ERR(0, 1129, __pyx_L1_error)
5938 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualP_dv), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualP_dv", 0))) __PYX_ERR(0, 1130, __pyx_L1_error)
5939 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualP_dw), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualP_dw", 0))) __PYX_ERR(0, 1131, __pyx_L1_error)
5940 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pdeResidualU), __pyx_ptype_5numpy_ndarray, 1,
"pdeResidualU", 0))) __PYX_ERR(0, 1132, __pyx_L1_error)
5941 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualU_dp), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualU_dp", 0))) __PYX_ERR(0, 1133, __pyx_L1_error)
5942 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualU_du), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualU_du", 0))) __PYX_ERR(0, 1134, __pyx_L1_error)
5943 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pdeResidualV), __pyx_ptype_5numpy_ndarray, 1,
"pdeResidualV", 0))) __PYX_ERR(0, 1135, __pyx_L1_error)
5944 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualV_dp), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualV_dp", 0))) __PYX_ERR(0, 1136, __pyx_L1_error)
5945 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualV_dv), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualV_dv", 0))) __PYX_ERR(0, 1137, __pyx_L1_error)
5946 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pdeResidualW), __pyx_ptype_5numpy_ndarray, 1,
"pdeResidualW", 0))) __PYX_ERR(0, 1138, __pyx_L1_error)
5947 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualW_dp), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualW_dp", 0))) __PYX_ERR(0, 1139, __pyx_L1_error)
5948 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualW_dw), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualW_dw", 0))) __PYX_ERR(0, 1140, __pyx_L1_error)
5949 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_subgridErrorP), __pyx_ptype_5numpy_ndarray, 1,
"subgridErrorP", 0))) __PYX_ERR(0, 1141, __pyx_L1_error)
5950 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorP_du), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorP_du", 0))) __PYX_ERR(0, 1142, __pyx_L1_error)
5951 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorP_dv), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorP_dv", 0))) __PYX_ERR(0, 1143, __pyx_L1_error)
5952 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorP_dw), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorP_dw", 0))) __PYX_ERR(0, 1144, __pyx_L1_error)
5953 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_subgridErrorU), __pyx_ptype_5numpy_ndarray, 1,
"subgridErrorU", 0))) __PYX_ERR(0, 1145, __pyx_L1_error)
5954 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorU_dp), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorU_dp", 0))) __PYX_ERR(0, 1146, __pyx_L1_error)
5955 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorU_du), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorU_du", 0))) __PYX_ERR(0, 1147, __pyx_L1_error)
5956 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_subgridErrorV), __pyx_ptype_5numpy_ndarray, 1,
"subgridErrorV", 0))) __PYX_ERR(0, 1148, __pyx_L1_error)
5957 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorV_dp), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorV_dp", 0))) __PYX_ERR(0, 1149, __pyx_L1_error)
5958 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorV_dv), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorV_dv", 0))) __PYX_ERR(0, 1150, __pyx_L1_error)
5959 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_subgridErrorW), __pyx_ptype_5numpy_ndarray, 1,
"subgridErrorW", 0))) __PYX_ERR(0, 1151, __pyx_L1_error)
5960 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorW_dp), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorW_dp", 0))) __PYX_ERR(0, 1152, __pyx_L1_error)
5961 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorW_dw), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorW_dw", 0))) __PYX_ERR(0, 1153, __pyx_L1_error)
5962 __pyx_r = __pyx_pf_13csubgridError_28calculateSubgridErrorStokes3D_GLS_velocity_pressure_sd(__pyx_self, __pyx_v_elementDiameter, __pyx_v_a, __pyx_v_pdeResidualP, __pyx_v_dpdeResidualP_du, __pyx_v_dpdeResidualP_dv, __pyx_v_dpdeResidualP_dw, __pyx_v_pdeResidualU, __pyx_v_dpdeResidualU_dp, __pyx_v_dpdeResidualU_du, __pyx_v_pdeResidualV, __pyx_v_dpdeResidualV_dp, __pyx_v_dpdeResidualV_dv, __pyx_v_pdeResidualW, __pyx_v_dpdeResidualW_dp, __pyx_v_dpdeResidualW_dw, __pyx_v_subgridErrorP, __pyx_v_dsubgridErrorP_du, __pyx_v_dsubgridErrorP_dv, __pyx_v_dsubgridErrorP_dw, __pyx_v_subgridErrorU, __pyx_v_dsubgridErrorU_dp, __pyx_v_dsubgridErrorU_du, __pyx_v_subgridErrorV, __pyx_v_dsubgridErrorV_dp, __pyx_v_dsubgridErrorV_dv, __pyx_v_subgridErrorW, __pyx_v_dsubgridErrorW_dp, __pyx_v_dsubgridErrorW_dw);
5969 __Pyx_RefNannyFinishContext();
5973 static PyObject *__pyx_pf_13csubgridError_28calculateSubgridErrorStokes3D_GLS_velocity_pressure_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_pdeResidualP, PyArrayObject *__pyx_v_dpdeResidualP_du, PyArrayObject *__pyx_v_dpdeResidualP_dv, PyArrayObject *__pyx_v_dpdeResidualP_dw, PyArrayObject *__pyx_v_pdeResidualU, PyArrayObject *__pyx_v_dpdeResidualU_dp, PyArrayObject *__pyx_v_dpdeResidualU_du, PyArrayObject *__pyx_v_pdeResidualV, PyArrayObject *__pyx_v_dpdeResidualV_dp, PyArrayObject *__pyx_v_dpdeResidualV_dv, PyArrayObject *__pyx_v_pdeResidualW, PyArrayObject *__pyx_v_dpdeResidualW_dp, PyArrayObject *__pyx_v_dpdeResidualW_dw, PyArrayObject *__pyx_v_subgridErrorP, PyArrayObject *__pyx_v_dsubgridErrorP_du, PyArrayObject *__pyx_v_dsubgridErrorP_dv, PyArrayObject *__pyx_v_dsubgridErrorP_dw, PyArrayObject *__pyx_v_subgridErrorU, PyArrayObject *__pyx_v_dsubgridErrorU_dp, PyArrayObject *__pyx_v_dsubgridErrorU_du, PyArrayObject *__pyx_v_subgridErrorV, PyArrayObject *__pyx_v_dsubgridErrorV_dp, PyArrayObject *__pyx_v_dsubgridErrorV_dv, PyArrayObject *__pyx_v_subgridErrorW, PyArrayObject *__pyx_v_dsubgridErrorW_dp, PyArrayObject *__pyx_v_dsubgridErrorW_dw) {
5974 PyObject *__pyx_r = NULL;
5975 __Pyx_RefNannyDeclarations
5976 __Pyx_RefNannySetupContext(
"calculateSubgridErrorStokes3D_GLS_velocity_pressure_sd", 0);
5985 calculateSubgridErrorStokes3D_GLS_velocity_pressure_sd((__pyx_v_dsubgridErrorP_du->dimensions[0]), (__pyx_v_dsubgridErrorP_du->dimensions[1]), (__pyx_v_dsubgridErrorP_du->dimensions[2]), 3, ((
double *)__pyx_v_elementDiameter->data), ((
double *)__pyx_v_a->data), ((
double *)__pyx_v_pdeResidualP->data), ((
double *)__pyx_v_dpdeResidualP_du->data), ((
double *)__pyx_v_dpdeResidualP_dv->data), ((
double *)__pyx_v_dpdeResidualP_dw->data), ((
double *)__pyx_v_pdeResidualU->data), ((
double *)__pyx_v_dpdeResidualU_dp->data), ((
double *)__pyx_v_dpdeResidualU_du->data), ((
double *)__pyx_v_pdeResidualV->data), ((
double *)__pyx_v_dpdeResidualV_dp->data), ((
double *)__pyx_v_dpdeResidualV_dv->data), ((
double *)__pyx_v_pdeResidualW->data), ((
double *)__pyx_v_dpdeResidualW_dp->data), ((
double *)__pyx_v_dpdeResidualW_dw->data), ((
double *)__pyx_v_subgridErrorP->data), ((
double *)__pyx_v_dsubgridErrorP_du->data), ((
double *)__pyx_v_dsubgridErrorP_dv->data), ((
double *)__pyx_v_dsubgridErrorP_dw->data), ((
double *)__pyx_v_subgridErrorU->data), ((
double *)__pyx_v_dsubgridErrorU_dp->data), ((
double *)__pyx_v_dsubgridErrorU_du->data), ((
double *)__pyx_v_subgridErrorV->data), ((
double *)__pyx_v_dsubgridErrorV_dp->data), ((
double *)__pyx_v_dsubgridErrorV_dv->data), ((
double *)__pyx_v_subgridErrorW->data), ((
double *)__pyx_v_dsubgridErrorW_dp->data), ((
double *)__pyx_v_dsubgridErrorW_dw->data));
5996 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5997 __Pyx_XGIVEREF(__pyx_r);
5998 __Pyx_RefNannyFinishContext();
6011 static PyObject *__pyx_pw_13csubgridError_31calculateSubgridErrorNavierStokes2D_GLS_tau(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
6012 static PyMethodDef __pyx_mdef_13csubgridError_31calculateSubgridErrorNavierStokes2D_GLS_tau = {
"calculateSubgridErrorNavierStokes2D_GLS_tau", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_13csubgridError_31calculateSubgridErrorNavierStokes2D_GLS_tau, METH_VARARGS|METH_KEYWORDS, 0};
6013 static PyObject *__pyx_pw_13csubgridError_31calculateSubgridErrorNavierStokes2D_GLS_tau(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6014 double __pyx_v_hFactor;
6015 PyArrayObject *__pyx_v_elementDiameter = 0;
6016 PyArrayObject *__pyx_v_dmt = 0;
6017 PyArrayObject *__pyx_v_dm = 0;
6018 PyArrayObject *__pyx_v_f = 0;
6019 PyArrayObject *__pyx_v_a = 0;
6020 PyArrayObject *__pyx_v_tau0 = 0;
6021 PyArrayObject *__pyx_v_tau1 = 0;
6022 PyArrayObject *__pyx_v_cfl = 0;
6023 int __pyx_lineno = 0;
6024 const char *__pyx_filename = NULL;
6025 int __pyx_clineno = 0;
6026 PyObject *__pyx_r = 0;
6027 __Pyx_RefNannyDeclarations
6028 __Pyx_RefNannySetupContext(
"calculateSubgridErrorNavierStokes2D_GLS_tau (wrapper)", 0);
6030 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hFactor,&__pyx_n_s_elementDiameter,&__pyx_n_s_dmt,&__pyx_n_s_dm,&__pyx_n_s_f,&__pyx_n_s_a,&__pyx_n_s_tau0,&__pyx_n_s_tau1,&__pyx_n_s_cfl,0};
6031 PyObject* values[9] = {0,0,0,0,0,0,0,0,0};
6032 if (unlikely(__pyx_kwds)) {
6034 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
6036 case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
6038 case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
6040 case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
6042 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
6044 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6046 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6048 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6050 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6052 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6055 default:
goto __pyx_L5_argtuple_error;
6057 kw_args = PyDict_Size(__pyx_kwds);
6060 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hFactor)) != 0)) kw_args--;
6061 else goto __pyx_L5_argtuple_error;
6064 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementDiameter)) != 0)) kw_args--;
6066 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_GLS_tau", 1, 9, 9, 1); __PYX_ERR(0, 1186, __pyx_L3_error)
6070 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dmt)) != 0)) kw_args--;
6072 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_GLS_tau", 1, 9, 9, 2); __PYX_ERR(0, 1186, __pyx_L3_error)
6076 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dm)) != 0)) kw_args--;
6078 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_GLS_tau", 1, 9, 9, 3); __PYX_ERR(0, 1186, __pyx_L3_error)
6082 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_f)) != 0)) kw_args--;
6084 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_GLS_tau", 1, 9, 9, 4); __PYX_ERR(0, 1186, __pyx_L3_error)
6088 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
6090 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_GLS_tau", 1, 9, 9, 5); __PYX_ERR(0, 1186, __pyx_L3_error)
6094 if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tau0)) != 0)) kw_args--;
6096 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_GLS_tau", 1, 9, 9, 6); __PYX_ERR(0, 1186, __pyx_L3_error)
6100 if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tau1)) != 0)) kw_args--;
6102 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_GLS_tau", 1, 9, 9, 7); __PYX_ERR(0, 1186, __pyx_L3_error)
6106 if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cfl)) != 0)) kw_args--;
6108 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_GLS_tau", 1, 9, 9, 8); __PYX_ERR(0, 1186, __pyx_L3_error)
6111 if (unlikely(kw_args > 0)) {
6112 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"calculateSubgridErrorNavierStokes2D_GLS_tau") < 0)) __PYX_ERR(0, 1186, __pyx_L3_error)
6114 }
else if (PyTuple_GET_SIZE(__pyx_args) != 9) {
6115 goto __pyx_L5_argtuple_error;
6117 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6118 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6119 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6120 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6121 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6122 values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
6123 values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
6124 values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
6125 values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
6127 __pyx_v_hFactor = __pyx_PyFloat_AsDouble(values[0]);
if (unlikely((__pyx_v_hFactor == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1186, __pyx_L3_error)
6128 __pyx_v_elementDiameter = ((PyArrayObject *)values[1]);
6129 __pyx_v_dmt = ((PyArrayObject *)values[2]);
6130 __pyx_v_dm = ((PyArrayObject *)values[3]);
6131 __pyx_v_f = ((PyArrayObject *)values[4]);
6132 __pyx_v_a = ((PyArrayObject *)values[5]);
6133 __pyx_v_tau0 = ((PyArrayObject *)values[6]);
6134 __pyx_v_tau1 = ((PyArrayObject *)values[7]);
6135 __pyx_v_cfl = ((PyArrayObject *)values[8]);
6137 goto __pyx_L4_argument_unpacking_done;
6138 __pyx_L5_argtuple_error:;
6139 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_GLS_tau", 1, 9, 9, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1186, __pyx_L3_error)
6141 __Pyx_AddTraceback(
"csubgridError.calculateSubgridErrorNavierStokes2D_GLS_tau", __pyx_clineno, __pyx_lineno, __pyx_filename);
6142 __Pyx_RefNannyFinishContext();
6144 __pyx_L4_argument_unpacking_done:;
6145 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementDiameter), __pyx_ptype_5numpy_ndarray, 1,
"elementDiameter", 0))) __PYX_ERR(0, 1187, __pyx_L1_error)
6146 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dmt), __pyx_ptype_5numpy_ndarray, 1,
"dmt", 0))) __PYX_ERR(0, 1188, __pyx_L1_error)
6147 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dm), __pyx_ptype_5numpy_ndarray, 1,
"dm", 0))) __PYX_ERR(0, 1189, __pyx_L1_error)
6148 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_f), __pyx_ptype_5numpy_ndarray, 1,
"f", 0))) __PYX_ERR(0, 1190, __pyx_L1_error)
6149 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1,
"a", 0))) __PYX_ERR(0, 1191, __pyx_L1_error)
6150 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tau0), __pyx_ptype_5numpy_ndarray, 1,
"tau0", 0))) __PYX_ERR(0, 1192, __pyx_L1_error)
6151 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tau1), __pyx_ptype_5numpy_ndarray, 1,
"tau1", 0))) __PYX_ERR(0, 1193, __pyx_L1_error)
6152 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cfl), __pyx_ptype_5numpy_ndarray, 1,
"cfl", 0))) __PYX_ERR(0, 1194, __pyx_L1_error)
6153 __pyx_r = __pyx_pf_13csubgridError_30calculateSubgridErrorNavierStokes2D_GLS_tau(__pyx_self, __pyx_v_hFactor, __pyx_v_elementDiameter, __pyx_v_dmt, __pyx_v_dm, __pyx_v_f, __pyx_v_a, __pyx_v_tau0, __pyx_v_tau1, __pyx_v_cfl);
6160 __Pyx_RefNannyFinishContext();
6164 static PyObject *__pyx_pf_13csubgridError_30calculateSubgridErrorNavierStokes2D_GLS_tau(CYTHON_UNUSED PyObject *__pyx_self,
double __pyx_v_hFactor, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_dmt, PyArrayObject *__pyx_v_dm, PyArrayObject *__pyx_v_f, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_tau0, PyArrayObject *__pyx_v_tau1, PyArrayObject *__pyx_v_cfl) {
6165 PyObject *__pyx_r = NULL;
6166 __Pyx_RefNannyDeclarations
6167 __Pyx_RefNannySetupContext(
"calculateSubgridErrorNavierStokes2D_GLS_tau", 0);
6176 calculateSubgridErrorNavierStokes2D_GLS_tau((__pyx_v_f->dimensions[0]), (__pyx_v_f->dimensions[1]), (__pyx_v_f->dimensions[2]), __pyx_v_hFactor, ((
double *)__pyx_v_elementDiameter->data), ((
double *)__pyx_v_dmt->data), ((
double *)__pyx_v_dm->data), ((
double *)__pyx_v_f->data), ((
double *)__pyx_v_a->data), ((
double *)__pyx_v_tau0->data), ((
double *)__pyx_v_tau1->data), ((
double *)__pyx_v_cfl->data));
6187 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6188 __Pyx_XGIVEREF(__pyx_r);
6189 __Pyx_RefNannyFinishContext();
6202 static PyObject *__pyx_pw_13csubgridError_33calculateSubgridErrorNavierStokes2D_GLS_tau_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
6203 static PyMethodDef __pyx_mdef_13csubgridError_33calculateSubgridErrorNavierStokes2D_GLS_tau_sd = {
"calculateSubgridErrorNavierStokes2D_GLS_tau_sd", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_13csubgridError_33calculateSubgridErrorNavierStokes2D_GLS_tau_sd, METH_VARARGS|METH_KEYWORDS, 0};
6204 static PyObject *__pyx_pw_13csubgridError_33calculateSubgridErrorNavierStokes2D_GLS_tau_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6205 double __pyx_v_hFactor;
6206 PyArrayObject *__pyx_v_elementDiameter = 0;
6207 PyArrayObject *__pyx_v_dmt = 0;
6208 PyArrayObject *__pyx_v_dm = 0;
6209 PyArrayObject *__pyx_v_f = 0;
6210 PyArrayObject *__pyx_v_a = 0;
6211 PyArrayObject *__pyx_v_tau0 = 0;
6212 PyArrayObject *__pyx_v_tau1 = 0;
6213 PyArrayObject *__pyx_v_cfl = 0;
6214 int __pyx_lineno = 0;
6215 const char *__pyx_filename = NULL;
6216 int __pyx_clineno = 0;
6217 PyObject *__pyx_r = 0;
6218 __Pyx_RefNannyDeclarations
6219 __Pyx_RefNannySetupContext(
"calculateSubgridErrorNavierStokes2D_GLS_tau_sd (wrapper)", 0);
6221 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hFactor,&__pyx_n_s_elementDiameter,&__pyx_n_s_dmt,&__pyx_n_s_dm,&__pyx_n_s_f,&__pyx_n_s_a,&__pyx_n_s_tau0,&__pyx_n_s_tau1,&__pyx_n_s_cfl,0};
6222 PyObject* values[9] = {0,0,0,0,0,0,0,0,0};
6223 if (unlikely(__pyx_kwds)) {
6225 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
6227 case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
6229 case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
6231 case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
6233 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
6235 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6237 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6239 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6241 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6243 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6246 default:
goto __pyx_L5_argtuple_error;
6248 kw_args = PyDict_Size(__pyx_kwds);
6251 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hFactor)) != 0)) kw_args--;
6252 else goto __pyx_L5_argtuple_error;
6255 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementDiameter)) != 0)) kw_args--;
6257 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_GLS_tau_sd", 1, 9, 9, 1); __PYX_ERR(0, 1207, __pyx_L3_error)
6261 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dmt)) != 0)) kw_args--;
6263 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_GLS_tau_sd", 1, 9, 9, 2); __PYX_ERR(0, 1207, __pyx_L3_error)
6267 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dm)) != 0)) kw_args--;
6269 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_GLS_tau_sd", 1, 9, 9, 3); __PYX_ERR(0, 1207, __pyx_L3_error)
6273 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_f)) != 0)) kw_args--;
6275 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_GLS_tau_sd", 1, 9, 9, 4); __PYX_ERR(0, 1207, __pyx_L3_error)
6279 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
6281 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_GLS_tau_sd", 1, 9, 9, 5); __PYX_ERR(0, 1207, __pyx_L3_error)
6285 if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tau0)) != 0)) kw_args--;
6287 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_GLS_tau_sd", 1, 9, 9, 6); __PYX_ERR(0, 1207, __pyx_L3_error)
6291 if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tau1)) != 0)) kw_args--;
6293 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_GLS_tau_sd", 1, 9, 9, 7); __PYX_ERR(0, 1207, __pyx_L3_error)
6297 if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cfl)) != 0)) kw_args--;
6299 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_GLS_tau_sd", 1, 9, 9, 8); __PYX_ERR(0, 1207, __pyx_L3_error)
6302 if (unlikely(kw_args > 0)) {
6303 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"calculateSubgridErrorNavierStokes2D_GLS_tau_sd") < 0)) __PYX_ERR(0, 1207, __pyx_L3_error)
6305 }
else if (PyTuple_GET_SIZE(__pyx_args) != 9) {
6306 goto __pyx_L5_argtuple_error;
6308 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6309 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6310 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6311 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6312 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6313 values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
6314 values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
6315 values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
6316 values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
6318 __pyx_v_hFactor = __pyx_PyFloat_AsDouble(values[0]);
if (unlikely((__pyx_v_hFactor == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1207, __pyx_L3_error)
6319 __pyx_v_elementDiameter = ((PyArrayObject *)values[1]);
6320 __pyx_v_dmt = ((PyArrayObject *)values[2]);
6321 __pyx_v_dm = ((PyArrayObject *)values[3]);
6322 __pyx_v_f = ((PyArrayObject *)values[4]);
6323 __pyx_v_a = ((PyArrayObject *)values[5]);
6324 __pyx_v_tau0 = ((PyArrayObject *)values[6]);
6325 __pyx_v_tau1 = ((PyArrayObject *)values[7]);
6326 __pyx_v_cfl = ((PyArrayObject *)values[8]);
6328 goto __pyx_L4_argument_unpacking_done;
6329 __pyx_L5_argtuple_error:;
6330 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_GLS_tau_sd", 1, 9, 9, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1207, __pyx_L3_error)
6332 __Pyx_AddTraceback(
"csubgridError.calculateSubgridErrorNavierStokes2D_GLS_tau_sd", __pyx_clineno, __pyx_lineno, __pyx_filename);
6333 __Pyx_RefNannyFinishContext();
6335 __pyx_L4_argument_unpacking_done:;
6336 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementDiameter), __pyx_ptype_5numpy_ndarray, 1,
"elementDiameter", 0))) __PYX_ERR(0, 1208, __pyx_L1_error)
6337 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dmt), __pyx_ptype_5numpy_ndarray, 1,
"dmt", 0))) __PYX_ERR(0, 1209, __pyx_L1_error)
6338 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dm), __pyx_ptype_5numpy_ndarray, 1,
"dm", 0))) __PYX_ERR(0, 1210, __pyx_L1_error)
6339 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_f), __pyx_ptype_5numpy_ndarray, 1,
"f", 0))) __PYX_ERR(0, 1211, __pyx_L1_error)
6340 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1,
"a", 0))) __PYX_ERR(0, 1212, __pyx_L1_error)
6341 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tau0), __pyx_ptype_5numpy_ndarray, 1,
"tau0", 0))) __PYX_ERR(0, 1213, __pyx_L1_error)
6342 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tau1), __pyx_ptype_5numpy_ndarray, 1,
"tau1", 0))) __PYX_ERR(0, 1214, __pyx_L1_error)
6343 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cfl), __pyx_ptype_5numpy_ndarray, 1,
"cfl", 0))) __PYX_ERR(0, 1215, __pyx_L1_error)
6344 __pyx_r = __pyx_pf_13csubgridError_32calculateSubgridErrorNavierStokes2D_GLS_tau_sd(__pyx_self, __pyx_v_hFactor, __pyx_v_elementDiameter, __pyx_v_dmt, __pyx_v_dm, __pyx_v_f, __pyx_v_a, __pyx_v_tau0, __pyx_v_tau1, __pyx_v_cfl);
6351 __Pyx_RefNannyFinishContext();
6355 static PyObject *__pyx_pf_13csubgridError_32calculateSubgridErrorNavierStokes2D_GLS_tau_sd(CYTHON_UNUSED PyObject *__pyx_self,
double __pyx_v_hFactor, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_dmt, PyArrayObject *__pyx_v_dm, PyArrayObject *__pyx_v_f, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_tau0, PyArrayObject *__pyx_v_tau1, PyArrayObject *__pyx_v_cfl) {
6356 PyObject *__pyx_r = NULL;
6357 __Pyx_RefNannyDeclarations
6358 __Pyx_RefNannySetupContext(
"calculateSubgridErrorNavierStokes2D_GLS_tau_sd", 0);
6367 calculateSubgridErrorNavierStokes2D_GLS_tau_sd((__pyx_v_f->dimensions[0]), (__pyx_v_f->dimensions[1]), (__pyx_v_f->dimensions[2]), __pyx_v_hFactor, ((
double *)__pyx_v_elementDiameter->data), ((
double *)__pyx_v_dmt->data), ((
double *)__pyx_v_dm->data), ((
double *)__pyx_v_f->data), ((
double *)__pyx_v_a->data), ((
double *)__pyx_v_tau0->data), ((
double *)__pyx_v_tau1->data), ((
double *)__pyx_v_cfl->data));
6378 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6379 __Pyx_XGIVEREF(__pyx_r);
6380 __Pyx_RefNannyFinishContext();
6393 static PyObject *__pyx_pw_13csubgridError_35calculateSubgridErrorNavierStokes2D_generic_tau(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
6394 static PyMethodDef __pyx_mdef_13csubgridError_35calculateSubgridErrorNavierStokes2D_generic_tau = {
"calculateSubgridErrorNavierStokes2D_generic_tau", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_13csubgridError_35calculateSubgridErrorNavierStokes2D_generic_tau, METH_VARARGS|METH_KEYWORDS, 0};
6395 static PyObject *__pyx_pw_13csubgridError_35calculateSubgridErrorNavierStokes2D_generic_tau(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6396 PyArrayObject *__pyx_v_inverseJ = 0;
6397 PyArrayObject *__pyx_v_dmt = 0;
6398 PyArrayObject *__pyx_v_dm = 0;
6399 PyArrayObject *__pyx_v_f = 0;
6400 PyArrayObject *__pyx_v_a = 0;
6401 PyArrayObject *__pyx_v_tau0 = 0;
6402 PyArrayObject *__pyx_v_tau1 = 0;
6403 PyArrayObject *__pyx_v_cfl = 0;
6404 int __pyx_lineno = 0;
6405 const char *__pyx_filename = NULL;
6406 int __pyx_clineno = 0;
6407 PyObject *__pyx_r = 0;
6408 __Pyx_RefNannyDeclarations
6409 __Pyx_RefNannySetupContext(
"calculateSubgridErrorNavierStokes2D_generic_tau (wrapper)", 0);
6411 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inverseJ,&__pyx_n_s_dmt,&__pyx_n_s_dm,&__pyx_n_s_f,&__pyx_n_s_a,&__pyx_n_s_tau0,&__pyx_n_s_tau1,&__pyx_n_s_cfl,0};
6412 PyObject* values[8] = {0,0,0,0,0,0,0,0};
6413 if (unlikely(__pyx_kwds)) {
6415 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
6417 case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
6419 case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
6421 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
6423 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6425 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6427 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6429 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6431 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6434 default:
goto __pyx_L5_argtuple_error;
6436 kw_args = PyDict_Size(__pyx_kwds);
6439 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inverseJ)) != 0)) kw_args--;
6440 else goto __pyx_L5_argtuple_error;
6443 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dmt)) != 0)) kw_args--;
6445 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_generic_tau", 1, 8, 8, 1); __PYX_ERR(0, 1228, __pyx_L3_error)
6449 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dm)) != 0)) kw_args--;
6451 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_generic_tau", 1, 8, 8, 2); __PYX_ERR(0, 1228, __pyx_L3_error)
6455 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_f)) != 0)) kw_args--;
6457 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_generic_tau", 1, 8, 8, 3); __PYX_ERR(0, 1228, __pyx_L3_error)
6461 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
6463 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_generic_tau", 1, 8, 8, 4); __PYX_ERR(0, 1228, __pyx_L3_error)
6467 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tau0)) != 0)) kw_args--;
6469 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_generic_tau", 1, 8, 8, 5); __PYX_ERR(0, 1228, __pyx_L3_error)
6473 if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tau1)) != 0)) kw_args--;
6475 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_generic_tau", 1, 8, 8, 6); __PYX_ERR(0, 1228, __pyx_L3_error)
6479 if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cfl)) != 0)) kw_args--;
6481 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_generic_tau", 1, 8, 8, 7); __PYX_ERR(0, 1228, __pyx_L3_error)
6484 if (unlikely(kw_args > 0)) {
6485 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"calculateSubgridErrorNavierStokes2D_generic_tau") < 0)) __PYX_ERR(0, 1228, __pyx_L3_error)
6487 }
else if (PyTuple_GET_SIZE(__pyx_args) != 8) {
6488 goto __pyx_L5_argtuple_error;
6490 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6491 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6492 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6493 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6494 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6495 values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
6496 values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
6497 values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
6499 __pyx_v_inverseJ = ((PyArrayObject *)values[0]);
6500 __pyx_v_dmt = ((PyArrayObject *)values[1]);
6501 __pyx_v_dm = ((PyArrayObject *)values[2]);
6502 __pyx_v_f = ((PyArrayObject *)values[3]);
6503 __pyx_v_a = ((PyArrayObject *)values[4]);
6504 __pyx_v_tau0 = ((PyArrayObject *)values[5]);
6505 __pyx_v_tau1 = ((PyArrayObject *)values[6]);
6506 __pyx_v_cfl = ((PyArrayObject *)values[7]);
6508 goto __pyx_L4_argument_unpacking_done;
6509 __pyx_L5_argtuple_error:;
6510 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_generic_tau", 1, 8, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1228, __pyx_L3_error)
6512 __Pyx_AddTraceback(
"csubgridError.calculateSubgridErrorNavierStokes2D_generic_tau", __pyx_clineno, __pyx_lineno, __pyx_filename);
6513 __Pyx_RefNannyFinishContext();
6515 __pyx_L4_argument_unpacking_done:;
6516 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_inverseJ), __pyx_ptype_5numpy_ndarray, 1,
"inverseJ", 0))) __PYX_ERR(0, 1228, __pyx_L1_error)
6517 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dmt), __pyx_ptype_5numpy_ndarray, 1,
"dmt", 0))) __PYX_ERR(0, 1229, __pyx_L1_error)
6518 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dm), __pyx_ptype_5numpy_ndarray, 1,
"dm", 0))) __PYX_ERR(0, 1230, __pyx_L1_error)
6519 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_f), __pyx_ptype_5numpy_ndarray, 1,
"f", 0))) __PYX_ERR(0, 1231, __pyx_L1_error)
6520 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1,
"a", 0))) __PYX_ERR(0, 1232, __pyx_L1_error)
6521 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tau0), __pyx_ptype_5numpy_ndarray, 1,
"tau0", 0))) __PYX_ERR(0, 1233, __pyx_L1_error)
6522 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tau1), __pyx_ptype_5numpy_ndarray, 1,
"tau1", 0))) __PYX_ERR(0, 1234, __pyx_L1_error)
6523 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cfl), __pyx_ptype_5numpy_ndarray, 1,
"cfl", 0))) __PYX_ERR(0, 1235, __pyx_L1_error)
6524 __pyx_r = __pyx_pf_13csubgridError_34calculateSubgridErrorNavierStokes2D_generic_tau(__pyx_self, __pyx_v_inverseJ, __pyx_v_dmt, __pyx_v_dm, __pyx_v_f, __pyx_v_a, __pyx_v_tau0, __pyx_v_tau1, __pyx_v_cfl);
6531 __Pyx_RefNannyFinishContext();
6535 static PyObject *__pyx_pf_13csubgridError_34calculateSubgridErrorNavierStokes2D_generic_tau(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_inverseJ, PyArrayObject *__pyx_v_dmt, PyArrayObject *__pyx_v_dm, PyArrayObject *__pyx_v_f, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_tau0, PyArrayObject *__pyx_v_tau1, PyArrayObject *__pyx_v_cfl) {
6536 PyObject *__pyx_r = NULL;
6537 __Pyx_RefNannyDeclarations
6538 __Pyx_RefNannySetupContext(
"calculateSubgridErrorNavierStokes2D_generic_tau", 0);
6547 calculateSubgridErrorNavierStokes2D_generic_tau((__pyx_v_f->dimensions[0]), (__pyx_v_f->dimensions[1]), (__pyx_v_f->dimensions[2]), ((
double *)__pyx_v_inverseJ->data), ((
double *)__pyx_v_dmt->data), ((
double *)__pyx_v_dm->data), ((
double *)__pyx_v_f->data), ((
double *)__pyx_v_a->data), ((
double *)__pyx_v_tau0->data), ((
double *)__pyx_v_tau1->data), ((
double *)__pyx_v_cfl->data));
6558 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6559 __Pyx_XGIVEREF(__pyx_r);
6560 __Pyx_RefNannyFinishContext();
6573 static PyObject *__pyx_pw_13csubgridError_37calculateSubgridErrorNavierStokes2D_generic_tau_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
6574 static PyMethodDef __pyx_mdef_13csubgridError_37calculateSubgridErrorNavierStokes2D_generic_tau_sd = {
"calculateSubgridErrorNavierStokes2D_generic_tau_sd", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_13csubgridError_37calculateSubgridErrorNavierStokes2D_generic_tau_sd, METH_VARARGS|METH_KEYWORDS, 0};
6575 static PyObject *__pyx_pw_13csubgridError_37calculateSubgridErrorNavierStokes2D_generic_tau_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6576 PyArrayObject *__pyx_v_inverseJ = 0;
6577 PyArrayObject *__pyx_v_dmt = 0;
6578 PyArrayObject *__pyx_v_dm = 0;
6579 PyArrayObject *__pyx_v_f = 0;
6580 PyArrayObject *__pyx_v_a = 0;
6581 PyArrayObject *__pyx_v_tau0 = 0;
6582 PyArrayObject *__pyx_v_tau1 = 0;
6583 PyArrayObject *__pyx_v_cfl = 0;
6584 int __pyx_lineno = 0;
6585 const char *__pyx_filename = NULL;
6586 int __pyx_clineno = 0;
6587 PyObject *__pyx_r = 0;
6588 __Pyx_RefNannyDeclarations
6589 __Pyx_RefNannySetupContext(
"calculateSubgridErrorNavierStokes2D_generic_tau_sd (wrapper)", 0);
6591 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inverseJ,&__pyx_n_s_dmt,&__pyx_n_s_dm,&__pyx_n_s_f,&__pyx_n_s_a,&__pyx_n_s_tau0,&__pyx_n_s_tau1,&__pyx_n_s_cfl,0};
6592 PyObject* values[8] = {0,0,0,0,0,0,0,0};
6593 if (unlikely(__pyx_kwds)) {
6595 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
6597 case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
6599 case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
6601 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
6603 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6605 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6607 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6609 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6611 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6614 default:
goto __pyx_L5_argtuple_error;
6616 kw_args = PyDict_Size(__pyx_kwds);
6619 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inverseJ)) != 0)) kw_args--;
6620 else goto __pyx_L5_argtuple_error;
6623 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dmt)) != 0)) kw_args--;
6625 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_generic_tau_sd", 1, 8, 8, 1); __PYX_ERR(0, 1247, __pyx_L3_error)
6629 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dm)) != 0)) kw_args--;
6631 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_generic_tau_sd", 1, 8, 8, 2); __PYX_ERR(0, 1247, __pyx_L3_error)
6635 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_f)) != 0)) kw_args--;
6637 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_generic_tau_sd", 1, 8, 8, 3); __PYX_ERR(0, 1247, __pyx_L3_error)
6641 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
6643 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_generic_tau_sd", 1, 8, 8, 4); __PYX_ERR(0, 1247, __pyx_L3_error)
6647 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tau0)) != 0)) kw_args--;
6649 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_generic_tau_sd", 1, 8, 8, 5); __PYX_ERR(0, 1247, __pyx_L3_error)
6653 if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tau1)) != 0)) kw_args--;
6655 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_generic_tau_sd", 1, 8, 8, 6); __PYX_ERR(0, 1247, __pyx_L3_error)
6659 if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cfl)) != 0)) kw_args--;
6661 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_generic_tau_sd", 1, 8, 8, 7); __PYX_ERR(0, 1247, __pyx_L3_error)
6664 if (unlikely(kw_args > 0)) {
6665 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"calculateSubgridErrorNavierStokes2D_generic_tau_sd") < 0)) __PYX_ERR(0, 1247, __pyx_L3_error)
6667 }
else if (PyTuple_GET_SIZE(__pyx_args) != 8) {
6668 goto __pyx_L5_argtuple_error;
6670 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6671 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6672 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6673 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6674 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6675 values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
6676 values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
6677 values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
6679 __pyx_v_inverseJ = ((PyArrayObject *)values[0]);
6680 __pyx_v_dmt = ((PyArrayObject *)values[1]);
6681 __pyx_v_dm = ((PyArrayObject *)values[2]);
6682 __pyx_v_f = ((PyArrayObject *)values[3]);
6683 __pyx_v_a = ((PyArrayObject *)values[4]);
6684 __pyx_v_tau0 = ((PyArrayObject *)values[5]);
6685 __pyx_v_tau1 = ((PyArrayObject *)values[6]);
6686 __pyx_v_cfl = ((PyArrayObject *)values[7]);
6688 goto __pyx_L4_argument_unpacking_done;
6689 __pyx_L5_argtuple_error:;
6690 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_generic_tau_sd", 1, 8, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1247, __pyx_L3_error)
6692 __Pyx_AddTraceback(
"csubgridError.calculateSubgridErrorNavierStokes2D_generic_tau_sd", __pyx_clineno, __pyx_lineno, __pyx_filename);
6693 __Pyx_RefNannyFinishContext();
6695 __pyx_L4_argument_unpacking_done:;
6696 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_inverseJ), __pyx_ptype_5numpy_ndarray, 1,
"inverseJ", 0))) __PYX_ERR(0, 1247, __pyx_L1_error)
6697 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dmt), __pyx_ptype_5numpy_ndarray, 1,
"dmt", 0))) __PYX_ERR(0, 1248, __pyx_L1_error)
6698 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dm), __pyx_ptype_5numpy_ndarray, 1,
"dm", 0))) __PYX_ERR(0, 1249, __pyx_L1_error)
6699 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_f), __pyx_ptype_5numpy_ndarray, 1,
"f", 0))) __PYX_ERR(0, 1250, __pyx_L1_error)
6700 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1,
"a", 0))) __PYX_ERR(0, 1251, __pyx_L1_error)
6701 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tau0), __pyx_ptype_5numpy_ndarray, 1,
"tau0", 0))) __PYX_ERR(0, 1252, __pyx_L1_error)
6702 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tau1), __pyx_ptype_5numpy_ndarray, 1,
"tau1", 0))) __PYX_ERR(0, 1253, __pyx_L1_error)
6703 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cfl), __pyx_ptype_5numpy_ndarray, 1,
"cfl", 0))) __PYX_ERR(0, 1254, __pyx_L1_error)
6704 __pyx_r = __pyx_pf_13csubgridError_36calculateSubgridErrorNavierStokes2D_generic_tau_sd(__pyx_self, __pyx_v_inverseJ, __pyx_v_dmt, __pyx_v_dm, __pyx_v_f, __pyx_v_a, __pyx_v_tau0, __pyx_v_tau1, __pyx_v_cfl);
6711 __Pyx_RefNannyFinishContext();
6715 static PyObject *__pyx_pf_13csubgridError_36calculateSubgridErrorNavierStokes2D_generic_tau_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_inverseJ, PyArrayObject *__pyx_v_dmt, PyArrayObject *__pyx_v_dm, PyArrayObject *__pyx_v_f, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_tau0, PyArrayObject *__pyx_v_tau1, PyArrayObject *__pyx_v_cfl) {
6716 PyObject *__pyx_r = NULL;
6717 __Pyx_RefNannyDeclarations
6718 __Pyx_RefNannySetupContext(
"calculateSubgridErrorNavierStokes2D_generic_tau_sd", 0);
6727 calculateSubgridErrorNavierStokes2D_generic_tau_sd((__pyx_v_f->dimensions[0]), (__pyx_v_f->dimensions[1]), (__pyx_v_f->dimensions[2]), ((
double *)__pyx_v_inverseJ->data), ((
double *)__pyx_v_dmt->data), ((
double *)__pyx_v_dm->data), ((
double *)__pyx_v_f->data), ((
double *)__pyx_v_a->data), ((
double *)__pyx_v_tau0->data), ((
double *)__pyx_v_tau1->data), ((
double *)__pyx_v_cfl->data));
6738 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6739 __Pyx_XGIVEREF(__pyx_r);
6740 __Pyx_RefNannyFinishContext();
6753 static PyObject *__pyx_pw_13csubgridError_39calculateSubgridErrorNavierStokes2D_generic_withBodyForce_tau(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
6754 static PyMethodDef __pyx_mdef_13csubgridError_39calculateSubgridErrorNavierStokes2D_generic_withBodyForce_tau = {
"calculateSubgridErrorNavierStokes2D_generic_withBodyForce_tau", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_13csubgridError_39calculateSubgridErrorNavierStokes2D_generic_withBodyForce_tau, METH_VARARGS|METH_KEYWORDS, 0};
6755 static PyObject *__pyx_pw_13csubgridError_39calculateSubgridErrorNavierStokes2D_generic_withBodyForce_tau(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6756 PyArrayObject *__pyx_v_inverseJ = 0;
6757 PyArrayObject *__pyx_v_dmt = 0;
6758 PyArrayObject *__pyx_v_dm = 0;
6759 PyArrayObject *__pyx_v_f = 0;
6760 PyArrayObject *__pyx_v_a = 0;
6761 PyArrayObject *__pyx_v_dr = 0;
6762 PyArrayObject *__pyx_v_tau0 = 0;
6763 PyArrayObject *__pyx_v_tau1 = 0;
6764 PyArrayObject *__pyx_v_cfl = 0;
6765 int __pyx_lineno = 0;
6766 const char *__pyx_filename = NULL;
6767 int __pyx_clineno = 0;
6768 PyObject *__pyx_r = 0;
6769 __Pyx_RefNannyDeclarations
6770 __Pyx_RefNannySetupContext(
"calculateSubgridErrorNavierStokes2D_generic_withBodyForce_tau (wrapper)", 0);
6772 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inverseJ,&__pyx_n_s_dmt,&__pyx_n_s_dm,&__pyx_n_s_f,&__pyx_n_s_a,&__pyx_n_s_dr,&__pyx_n_s_tau0,&__pyx_n_s_tau1,&__pyx_n_s_cfl,0};
6773 PyObject* values[9] = {0,0,0,0,0,0,0,0,0};
6774 if (unlikely(__pyx_kwds)) {
6776 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
6778 case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
6780 case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
6782 case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
6784 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
6786 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6788 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6790 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6792 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6794 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6797 default:
goto __pyx_L5_argtuple_error;
6799 kw_args = PyDict_Size(__pyx_kwds);
6802 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inverseJ)) != 0)) kw_args--;
6803 else goto __pyx_L5_argtuple_error;
6806 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dmt)) != 0)) kw_args--;
6808 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_generic_withBodyForce_tau", 1, 9, 9, 1); __PYX_ERR(0, 1266, __pyx_L3_error)
6812 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dm)) != 0)) kw_args--;
6814 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_generic_withBodyForce_tau", 1, 9, 9, 2); __PYX_ERR(0, 1266, __pyx_L3_error)
6818 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_f)) != 0)) kw_args--;
6820 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_generic_withBodyForce_tau", 1, 9, 9, 3); __PYX_ERR(0, 1266, __pyx_L3_error)
6824 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
6826 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_generic_withBodyForce_tau", 1, 9, 9, 4); __PYX_ERR(0, 1266, __pyx_L3_error)
6830 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dr)) != 0)) kw_args--;
6832 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_generic_withBodyForce_tau", 1, 9, 9, 5); __PYX_ERR(0, 1266, __pyx_L3_error)
6836 if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tau0)) != 0)) kw_args--;
6838 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_generic_withBodyForce_tau", 1, 9, 9, 6); __PYX_ERR(0, 1266, __pyx_L3_error)
6842 if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tau1)) != 0)) kw_args--;
6844 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_generic_withBodyForce_tau", 1, 9, 9, 7); __PYX_ERR(0, 1266, __pyx_L3_error)
6848 if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cfl)) != 0)) kw_args--;
6850 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_generic_withBodyForce_tau", 1, 9, 9, 8); __PYX_ERR(0, 1266, __pyx_L3_error)
6853 if (unlikely(kw_args > 0)) {
6854 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"calculateSubgridErrorNavierStokes2D_generic_withBodyForce_tau") < 0)) __PYX_ERR(0, 1266, __pyx_L3_error)
6856 }
else if (PyTuple_GET_SIZE(__pyx_args) != 9) {
6857 goto __pyx_L5_argtuple_error;
6859 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6860 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6861 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6862 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6863 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6864 values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
6865 values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
6866 values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
6867 values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
6869 __pyx_v_inverseJ = ((PyArrayObject *)values[0]);
6870 __pyx_v_dmt = ((PyArrayObject *)values[1]);
6871 __pyx_v_dm = ((PyArrayObject *)values[2]);
6872 __pyx_v_f = ((PyArrayObject *)values[3]);
6873 __pyx_v_a = ((PyArrayObject *)values[4]);
6874 __pyx_v_dr = ((PyArrayObject *)values[5]);
6875 __pyx_v_tau0 = ((PyArrayObject *)values[6]);
6876 __pyx_v_tau1 = ((PyArrayObject *)values[7]);
6877 __pyx_v_cfl = ((PyArrayObject *)values[8]);
6879 goto __pyx_L4_argument_unpacking_done;
6880 __pyx_L5_argtuple_error:;
6881 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_generic_withBodyForce_tau", 1, 9, 9, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1266, __pyx_L3_error)
6883 __Pyx_AddTraceback(
"csubgridError.calculateSubgridErrorNavierStokes2D_generic_withBodyForce_tau", __pyx_clineno, __pyx_lineno, __pyx_filename);
6884 __Pyx_RefNannyFinishContext();
6886 __pyx_L4_argument_unpacking_done:;
6887 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_inverseJ), __pyx_ptype_5numpy_ndarray, 1,
"inverseJ", 0))) __PYX_ERR(0, 1266, __pyx_L1_error)
6888 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dmt), __pyx_ptype_5numpy_ndarray, 1,
"dmt", 0))) __PYX_ERR(0, 1267, __pyx_L1_error)
6889 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dm), __pyx_ptype_5numpy_ndarray, 1,
"dm", 0))) __PYX_ERR(0, 1268, __pyx_L1_error)
6890 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_f), __pyx_ptype_5numpy_ndarray, 1,
"f", 0))) __PYX_ERR(0, 1269, __pyx_L1_error)
6891 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1,
"a", 0))) __PYX_ERR(0, 1270, __pyx_L1_error)
6892 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dr), __pyx_ptype_5numpy_ndarray, 1,
"dr", 0))) __PYX_ERR(0, 1271, __pyx_L1_error)
6893 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tau0), __pyx_ptype_5numpy_ndarray, 1,
"tau0", 0))) __PYX_ERR(0, 1272, __pyx_L1_error)
6894 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tau1), __pyx_ptype_5numpy_ndarray, 1,
"tau1", 0))) __PYX_ERR(0, 1273, __pyx_L1_error)
6895 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cfl), __pyx_ptype_5numpy_ndarray, 1,
"cfl", 0))) __PYX_ERR(0, 1274, __pyx_L1_error)
6896 __pyx_r = __pyx_pf_13csubgridError_38calculateSubgridErrorNavierStokes2D_generic_withBodyForce_tau(__pyx_self, __pyx_v_inverseJ, __pyx_v_dmt, __pyx_v_dm, __pyx_v_f, __pyx_v_a, __pyx_v_dr, __pyx_v_tau0, __pyx_v_tau1, __pyx_v_cfl);
6903 __Pyx_RefNannyFinishContext();
6907 static PyObject *__pyx_pf_13csubgridError_38calculateSubgridErrorNavierStokes2D_generic_withBodyForce_tau(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_inverseJ, PyArrayObject *__pyx_v_dmt, PyArrayObject *__pyx_v_dm, PyArrayObject *__pyx_v_f, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_dr, PyArrayObject *__pyx_v_tau0, PyArrayObject *__pyx_v_tau1, PyArrayObject *__pyx_v_cfl) {
6908 PyObject *__pyx_r = NULL;
6909 __Pyx_RefNannyDeclarations
6910 __Pyx_RefNannySetupContext(
"calculateSubgridErrorNavierStokes2D_generic_withBodyForce_tau", 0);
6919 calculateSubgridErrorNavierStokes2D_generic_withBodyForce_tau((__pyx_v_f->dimensions[0]), (__pyx_v_f->dimensions[1]), (__pyx_v_f->dimensions[2]), ((
double *)__pyx_v_inverseJ->data), ((
double *)__pyx_v_dmt->data), ((
double *)__pyx_v_dm->data), ((
double *)__pyx_v_f->data), ((
double *)__pyx_v_a->data), ((
double *)__pyx_v_dr->data), ((
double *)__pyx_v_tau0->data), ((
double *)__pyx_v_tau1->data), ((
double *)__pyx_v_cfl->data));
6930 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6931 __Pyx_XGIVEREF(__pyx_r);
6932 __Pyx_RefNannyFinishContext();
6945 static PyObject *__pyx_pw_13csubgridError_41calculateSubgridErrorNavierStokes2D_generic_withBodyForce_tau_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
6946 static PyMethodDef __pyx_mdef_13csubgridError_41calculateSubgridErrorNavierStokes2D_generic_withBodyForce_tau_sd = {
"calculateSubgridErrorNavierStokes2D_generic_withBodyForce_tau_sd", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_13csubgridError_41calculateSubgridErrorNavierStokes2D_generic_withBodyForce_tau_sd, METH_VARARGS|METH_KEYWORDS, 0};
6947 static PyObject *__pyx_pw_13csubgridError_41calculateSubgridErrorNavierStokes2D_generic_withBodyForce_tau_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6948 PyArrayObject *__pyx_v_inverseJ = 0;
6949 PyArrayObject *__pyx_v_dmt = 0;
6950 PyArrayObject *__pyx_v_dm = 0;
6951 PyArrayObject *__pyx_v_f = 0;
6952 PyArrayObject *__pyx_v_a = 0;
6953 PyArrayObject *__pyx_v_dr = 0;
6954 PyArrayObject *__pyx_v_tau0 = 0;
6955 PyArrayObject *__pyx_v_tau1 = 0;
6956 PyArrayObject *__pyx_v_cfl = 0;
6957 int __pyx_lineno = 0;
6958 const char *__pyx_filename = NULL;
6959 int __pyx_clineno = 0;
6960 PyObject *__pyx_r = 0;
6961 __Pyx_RefNannyDeclarations
6962 __Pyx_RefNannySetupContext(
"calculateSubgridErrorNavierStokes2D_generic_withBodyForce_tau_sd (wrapper)", 0);
6964 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inverseJ,&__pyx_n_s_dmt,&__pyx_n_s_dm,&__pyx_n_s_f,&__pyx_n_s_a,&__pyx_n_s_dr,&__pyx_n_s_tau0,&__pyx_n_s_tau1,&__pyx_n_s_cfl,0};
6965 PyObject* values[9] = {0,0,0,0,0,0,0,0,0};
6966 if (unlikely(__pyx_kwds)) {
6968 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
6970 case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
6972 case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
6974 case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
6976 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
6978 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6980 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6982 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6984 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6986 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6989 default:
goto __pyx_L5_argtuple_error;
6991 kw_args = PyDict_Size(__pyx_kwds);
6994 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inverseJ)) != 0)) kw_args--;
6995 else goto __pyx_L5_argtuple_error;
6998 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dmt)) != 0)) kw_args--;
7000 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_generic_withBodyForce_tau_sd", 1, 9, 9, 1); __PYX_ERR(0, 1287, __pyx_L3_error)
7004 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dm)) != 0)) kw_args--;
7006 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_generic_withBodyForce_tau_sd", 1, 9, 9, 2); __PYX_ERR(0, 1287, __pyx_L3_error)
7010 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_f)) != 0)) kw_args--;
7012 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_generic_withBodyForce_tau_sd", 1, 9, 9, 3); __PYX_ERR(0, 1287, __pyx_L3_error)
7016 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
7018 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_generic_withBodyForce_tau_sd", 1, 9, 9, 4); __PYX_ERR(0, 1287, __pyx_L3_error)
7022 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dr)) != 0)) kw_args--;
7024 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_generic_withBodyForce_tau_sd", 1, 9, 9, 5); __PYX_ERR(0, 1287, __pyx_L3_error)
7028 if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tau0)) != 0)) kw_args--;
7030 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_generic_withBodyForce_tau_sd", 1, 9, 9, 6); __PYX_ERR(0, 1287, __pyx_L3_error)
7034 if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tau1)) != 0)) kw_args--;
7036 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_generic_withBodyForce_tau_sd", 1, 9, 9, 7); __PYX_ERR(0, 1287, __pyx_L3_error)
7040 if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cfl)) != 0)) kw_args--;
7042 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_generic_withBodyForce_tau_sd", 1, 9, 9, 8); __PYX_ERR(0, 1287, __pyx_L3_error)
7045 if (unlikely(kw_args > 0)) {
7046 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"calculateSubgridErrorNavierStokes2D_generic_withBodyForce_tau_sd") < 0)) __PYX_ERR(0, 1287, __pyx_L3_error)
7048 }
else if (PyTuple_GET_SIZE(__pyx_args) != 9) {
7049 goto __pyx_L5_argtuple_error;
7051 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7052 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7053 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
7054 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
7055 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
7056 values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
7057 values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
7058 values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
7059 values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
7061 __pyx_v_inverseJ = ((PyArrayObject *)values[0]);
7062 __pyx_v_dmt = ((PyArrayObject *)values[1]);
7063 __pyx_v_dm = ((PyArrayObject *)values[2]);
7064 __pyx_v_f = ((PyArrayObject *)values[3]);
7065 __pyx_v_a = ((PyArrayObject *)values[4]);
7066 __pyx_v_dr = ((PyArrayObject *)values[5]);
7067 __pyx_v_tau0 = ((PyArrayObject *)values[6]);
7068 __pyx_v_tau1 = ((PyArrayObject *)values[7]);
7069 __pyx_v_cfl = ((PyArrayObject *)values[8]);
7071 goto __pyx_L4_argument_unpacking_done;
7072 __pyx_L5_argtuple_error:;
7073 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_generic_withBodyForce_tau_sd", 1, 9, 9, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1287, __pyx_L3_error)
7075 __Pyx_AddTraceback(
"csubgridError.calculateSubgridErrorNavierStokes2D_generic_withBodyForce_tau_sd", __pyx_clineno, __pyx_lineno, __pyx_filename);
7076 __Pyx_RefNannyFinishContext();
7078 __pyx_L4_argument_unpacking_done:;
7079 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_inverseJ), __pyx_ptype_5numpy_ndarray, 1,
"inverseJ", 0))) __PYX_ERR(0, 1287, __pyx_L1_error)
7080 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dmt), __pyx_ptype_5numpy_ndarray, 1,
"dmt", 0))) __PYX_ERR(0, 1288, __pyx_L1_error)
7081 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dm), __pyx_ptype_5numpy_ndarray, 1,
"dm", 0))) __PYX_ERR(0, 1289, __pyx_L1_error)
7082 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_f), __pyx_ptype_5numpy_ndarray, 1,
"f", 0))) __PYX_ERR(0, 1290, __pyx_L1_error)
7083 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1,
"a", 0))) __PYX_ERR(0, 1291, __pyx_L1_error)
7084 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dr), __pyx_ptype_5numpy_ndarray, 1,
"dr", 0))) __PYX_ERR(0, 1292, __pyx_L1_error)
7085 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tau0), __pyx_ptype_5numpy_ndarray, 1,
"tau0", 0))) __PYX_ERR(0, 1293, __pyx_L1_error)
7086 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tau1), __pyx_ptype_5numpy_ndarray, 1,
"tau1", 0))) __PYX_ERR(0, 1294, __pyx_L1_error)
7087 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cfl), __pyx_ptype_5numpy_ndarray, 1,
"cfl", 0))) __PYX_ERR(0, 1295, __pyx_L1_error)
7088 __pyx_r = __pyx_pf_13csubgridError_40calculateSubgridErrorNavierStokes2D_generic_withBodyForce_tau_sd(__pyx_self, __pyx_v_inverseJ, __pyx_v_dmt, __pyx_v_dm, __pyx_v_f, __pyx_v_a, __pyx_v_dr, __pyx_v_tau0, __pyx_v_tau1, __pyx_v_cfl);
7095 __Pyx_RefNannyFinishContext();
7099 static PyObject *__pyx_pf_13csubgridError_40calculateSubgridErrorNavierStokes2D_generic_withBodyForce_tau_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_inverseJ, PyArrayObject *__pyx_v_dmt, PyArrayObject *__pyx_v_dm, PyArrayObject *__pyx_v_f, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_dr, PyArrayObject *__pyx_v_tau0, PyArrayObject *__pyx_v_tau1, PyArrayObject *__pyx_v_cfl) {
7100 PyObject *__pyx_r = NULL;
7101 __Pyx_RefNannyDeclarations
7102 __Pyx_RefNannySetupContext(
"calculateSubgridErrorNavierStokes2D_generic_withBodyForce_tau_sd", 0);
7111 calculateSubgridErrorNavierStokes2D_generic_withBodyForce_tau_sd((__pyx_v_f->dimensions[0]), (__pyx_v_f->dimensions[1]), (__pyx_v_f->dimensions[2]), ((
double *)__pyx_v_inverseJ->data), ((
double *)__pyx_v_dmt->data), ((
double *)__pyx_v_dm->data), ((
double *)__pyx_v_f->data), ((
double *)__pyx_v_a->data), ((
double *)__pyx_v_dr->data), ((
double *)__pyx_v_tau0->data), ((
double *)__pyx_v_tau1->data), ((
double *)__pyx_v_cfl->data));
7122 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7123 __Pyx_XGIVEREF(__pyx_r);
7124 __Pyx_RefNannyFinishContext();
7137 static PyObject *__pyx_pw_13csubgridError_43calculateSubgridErrorNavierStokes2D_GLS_tauRes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
7138 static PyMethodDef __pyx_mdef_13csubgridError_43calculateSubgridErrorNavierStokes2D_GLS_tauRes = {
"calculateSubgridErrorNavierStokes2D_GLS_tauRes", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_13csubgridError_43calculateSubgridErrorNavierStokes2D_GLS_tauRes, METH_VARARGS|METH_KEYWORDS, 0};
7139 static PyObject *__pyx_pw_13csubgridError_43calculateSubgridErrorNavierStokes2D_GLS_tauRes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
7140 PyArrayObject *__pyx_v_tau0 = 0;
7141 PyArrayObject *__pyx_v_tau1 = 0;
7142 PyArrayObject *__pyx_v_pdeResidualP = 0;
7143 PyArrayObject *__pyx_v_dpdeResidualP_du = 0;
7144 PyArrayObject *__pyx_v_dpdeResidualP_dv = 0;
7145 PyArrayObject *__pyx_v_pdeResidualU = 0;
7146 PyArrayObject *__pyx_v_dpdeResidualU_dp = 0;
7147 PyArrayObject *__pyx_v_dpdeResidualU_du = 0;
7148 PyArrayObject *__pyx_v_dpdeResidualU_dv = 0;
7149 PyArrayObject *__pyx_v_pdeResidualV = 0;
7150 PyArrayObject *__pyx_v_dpdeResidualV_dp = 0;
7151 PyArrayObject *__pyx_v_dpdeResidualV_du = 0;
7152 PyArrayObject *__pyx_v_dpdeResidualV_dv = 0;
7153 PyArrayObject *__pyx_v_subgridErrorP = 0;
7154 PyArrayObject *__pyx_v_dsubgridErrorP_du = 0;
7155 PyArrayObject *__pyx_v_dsubgridErrorP_dv = 0;
7156 PyArrayObject *__pyx_v_subgridErrorU = 0;
7157 PyArrayObject *__pyx_v_dsubgridErrorU_dp = 0;
7158 PyArrayObject *__pyx_v_dsubgridErrorU_du = 0;
7159 PyArrayObject *__pyx_v_dsubgridErrorU_dv = 0;
7160 PyArrayObject *__pyx_v_subgridErrorV = 0;
7161 PyArrayObject *__pyx_v_dsubgridErrorV_dp = 0;
7162 PyArrayObject *__pyx_v_dsubgridErrorV_du = 0;
7163 PyArrayObject *__pyx_v_dsubgridErrorV_dv = 0;
7164 int __pyx_lineno = 0;
7165 const char *__pyx_filename = NULL;
7166 int __pyx_clineno = 0;
7167 PyObject *__pyx_r = 0;
7168 __Pyx_RefNannyDeclarations
7169 __Pyx_RefNannySetupContext(
"calculateSubgridErrorNavierStokes2D_GLS_tauRes (wrapper)", 0);
7171 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tau0,&__pyx_n_s_tau1,&__pyx_n_s_pdeResidualP,&__pyx_n_s_dpdeResidualP_du,&__pyx_n_s_dpdeResidualP_dv,&__pyx_n_s_pdeResidualU,&__pyx_n_s_dpdeResidualU_dp,&__pyx_n_s_dpdeResidualU_du,&__pyx_n_s_dpdeResidualU_dv,&__pyx_n_s_pdeResidualV,&__pyx_n_s_dpdeResidualV_dp,&__pyx_n_s_dpdeResidualV_du,&__pyx_n_s_dpdeResidualV_dv,&__pyx_n_s_subgridErrorP,&__pyx_n_s_dsubgridErrorP_du,&__pyx_n_s_dsubgridErrorP_dv,&__pyx_n_s_subgridErrorU,&__pyx_n_s_dsubgridErrorU_dp,&__pyx_n_s_dsubgridErrorU_du,&__pyx_n_s_dsubgridErrorU_dv,&__pyx_n_s_subgridErrorV,&__pyx_n_s_dsubgridErrorV_dp,&__pyx_n_s_dsubgridErrorV_du,&__pyx_n_s_dsubgridErrorV_dv,0};
7172 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};
7173 if (unlikely(__pyx_kwds)) {
7175 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
7177 case 24: values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
7179 case 23: values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
7181 case 22: values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
7183 case 21: values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
7185 case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
7187 case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
7189 case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
7191 case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
7193 case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
7195 case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
7197 case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
7199 case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
7201 case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
7203 case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
7205 case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
7207 case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
7209 case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
7211 case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
7213 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
7215 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
7217 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
7219 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
7221 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7223 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7226 default:
goto __pyx_L5_argtuple_error;
7228 kw_args = PyDict_Size(__pyx_kwds);
7231 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tau0)) != 0)) kw_args--;
7232 else goto __pyx_L5_argtuple_error;
7235 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tau1)) != 0)) kw_args--;
7237 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_GLS_tauRes", 1, 24, 24, 1); __PYX_ERR(0, 1308, __pyx_L3_error)
7241 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pdeResidualP)) != 0)) kw_args--;
7243 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_GLS_tauRes", 1, 24, 24, 2); __PYX_ERR(0, 1308, __pyx_L3_error)
7247 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualP_du)) != 0)) kw_args--;
7249 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_GLS_tauRes", 1, 24, 24, 3); __PYX_ERR(0, 1308, __pyx_L3_error)
7253 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualP_dv)) != 0)) kw_args--;
7255 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_GLS_tauRes", 1, 24, 24, 4); __PYX_ERR(0, 1308, __pyx_L3_error)
7259 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pdeResidualU)) != 0)) kw_args--;
7261 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_GLS_tauRes", 1, 24, 24, 5); __PYX_ERR(0, 1308, __pyx_L3_error)
7265 if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualU_dp)) != 0)) kw_args--;
7267 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_GLS_tauRes", 1, 24, 24, 6); __PYX_ERR(0, 1308, __pyx_L3_error)
7271 if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualU_du)) != 0)) kw_args--;
7273 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_GLS_tauRes", 1, 24, 24, 7); __PYX_ERR(0, 1308, __pyx_L3_error)
7277 if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualU_dv)) != 0)) kw_args--;
7279 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_GLS_tauRes", 1, 24, 24, 8); __PYX_ERR(0, 1308, __pyx_L3_error)
7283 if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pdeResidualV)) != 0)) kw_args--;
7285 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_GLS_tauRes", 1, 24, 24, 9); __PYX_ERR(0, 1308, __pyx_L3_error)
7289 if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualV_dp)) != 0)) kw_args--;
7291 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_GLS_tauRes", 1, 24, 24, 10); __PYX_ERR(0, 1308, __pyx_L3_error)
7295 if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualV_du)) != 0)) kw_args--;
7297 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_GLS_tauRes", 1, 24, 24, 11); __PYX_ERR(0, 1308, __pyx_L3_error)
7301 if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualV_dv)) != 0)) kw_args--;
7303 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_GLS_tauRes", 1, 24, 24, 12); __PYX_ERR(0, 1308, __pyx_L3_error)
7307 if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subgridErrorP)) != 0)) kw_args--;
7309 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_GLS_tauRes", 1, 24, 24, 13); __PYX_ERR(0, 1308, __pyx_L3_error)
7313 if (likely((values[14] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorP_du)) != 0)) kw_args--;
7315 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_GLS_tauRes", 1, 24, 24, 14); __PYX_ERR(0, 1308, __pyx_L3_error)
7319 if (likely((values[15] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorP_dv)) != 0)) kw_args--;
7321 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_GLS_tauRes", 1, 24, 24, 15); __PYX_ERR(0, 1308, __pyx_L3_error)
7325 if (likely((values[16] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subgridErrorU)) != 0)) kw_args--;
7327 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_GLS_tauRes", 1, 24, 24, 16); __PYX_ERR(0, 1308, __pyx_L3_error)
7331 if (likely((values[17] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorU_dp)) != 0)) kw_args--;
7333 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_GLS_tauRes", 1, 24, 24, 17); __PYX_ERR(0, 1308, __pyx_L3_error)
7337 if (likely((values[18] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorU_du)) != 0)) kw_args--;
7339 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_GLS_tauRes", 1, 24, 24, 18); __PYX_ERR(0, 1308, __pyx_L3_error)
7343 if (likely((values[19] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorU_dv)) != 0)) kw_args--;
7345 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_GLS_tauRes", 1, 24, 24, 19); __PYX_ERR(0, 1308, __pyx_L3_error)
7349 if (likely((values[20] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subgridErrorV)) != 0)) kw_args--;
7351 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_GLS_tauRes", 1, 24, 24, 20); __PYX_ERR(0, 1308, __pyx_L3_error)
7355 if (likely((values[21] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorV_dp)) != 0)) kw_args--;
7357 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_GLS_tauRes", 1, 24, 24, 21); __PYX_ERR(0, 1308, __pyx_L3_error)
7361 if (likely((values[22] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorV_du)) != 0)) kw_args--;
7363 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_GLS_tauRes", 1, 24, 24, 22); __PYX_ERR(0, 1308, __pyx_L3_error)
7367 if (likely((values[23] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorV_dv)) != 0)) kw_args--;
7369 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_GLS_tauRes", 1, 24, 24, 23); __PYX_ERR(0, 1308, __pyx_L3_error)
7372 if (unlikely(kw_args > 0)) {
7373 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"calculateSubgridErrorNavierStokes2D_GLS_tauRes") < 0)) __PYX_ERR(0, 1308, __pyx_L3_error)
7375 }
else if (PyTuple_GET_SIZE(__pyx_args) != 24) {
7376 goto __pyx_L5_argtuple_error;
7378 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7379 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7380 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
7381 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
7382 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
7383 values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
7384 values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
7385 values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
7386 values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
7387 values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
7388 values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
7389 values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
7390 values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
7391 values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
7392 values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
7393 values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
7394 values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
7395 values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
7396 values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
7397 values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
7398 values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
7399 values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
7400 values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
7401 values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
7403 __pyx_v_tau0 = ((PyArrayObject *)values[0]);
7404 __pyx_v_tau1 = ((PyArrayObject *)values[1]);
7405 __pyx_v_pdeResidualP = ((PyArrayObject *)values[2]);
7406 __pyx_v_dpdeResidualP_du = ((PyArrayObject *)values[3]);
7407 __pyx_v_dpdeResidualP_dv = ((PyArrayObject *)values[4]);
7408 __pyx_v_pdeResidualU = ((PyArrayObject *)values[5]);
7409 __pyx_v_dpdeResidualU_dp = ((PyArrayObject *)values[6]);
7410 __pyx_v_dpdeResidualU_du = ((PyArrayObject *)values[7]);
7411 __pyx_v_dpdeResidualU_dv = ((PyArrayObject *)values[8]);
7412 __pyx_v_pdeResidualV = ((PyArrayObject *)values[9]);
7413 __pyx_v_dpdeResidualV_dp = ((PyArrayObject *)values[10]);
7414 __pyx_v_dpdeResidualV_du = ((PyArrayObject *)values[11]);
7415 __pyx_v_dpdeResidualV_dv = ((PyArrayObject *)values[12]);
7416 __pyx_v_subgridErrorP = ((PyArrayObject *)values[13]);
7417 __pyx_v_dsubgridErrorP_du = ((PyArrayObject *)values[14]);
7418 __pyx_v_dsubgridErrorP_dv = ((PyArrayObject *)values[15]);
7419 __pyx_v_subgridErrorU = ((PyArrayObject *)values[16]);
7420 __pyx_v_dsubgridErrorU_dp = ((PyArrayObject *)values[17]);
7421 __pyx_v_dsubgridErrorU_du = ((PyArrayObject *)values[18]);
7422 __pyx_v_dsubgridErrorU_dv = ((PyArrayObject *)values[19]);
7423 __pyx_v_subgridErrorV = ((PyArrayObject *)values[20]);
7424 __pyx_v_dsubgridErrorV_dp = ((PyArrayObject *)values[21]);
7425 __pyx_v_dsubgridErrorV_du = ((PyArrayObject *)values[22]);
7426 __pyx_v_dsubgridErrorV_dv = ((PyArrayObject *)values[23]);
7428 goto __pyx_L4_argument_unpacking_done;
7429 __pyx_L5_argtuple_error:;
7430 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes2D_GLS_tauRes", 1, 24, 24, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1308, __pyx_L3_error)
7432 __Pyx_AddTraceback(
"csubgridError.calculateSubgridErrorNavierStokes2D_GLS_tauRes", __pyx_clineno, __pyx_lineno, __pyx_filename);
7433 __Pyx_RefNannyFinishContext();
7435 __pyx_L4_argument_unpacking_done:;
7436 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tau0), __pyx_ptype_5numpy_ndarray, 1,
"tau0", 0))) __PYX_ERR(0, 1308, __pyx_L1_error)
7437 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tau1), __pyx_ptype_5numpy_ndarray, 1,
"tau1", 0))) __PYX_ERR(0, 1309, __pyx_L1_error)
7438 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pdeResidualP), __pyx_ptype_5numpy_ndarray, 1,
"pdeResidualP", 0))) __PYX_ERR(0, 1310, __pyx_L1_error)
7439 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualP_du), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualP_du", 0))) __PYX_ERR(0, 1311, __pyx_L1_error)
7440 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualP_dv), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualP_dv", 0))) __PYX_ERR(0, 1312, __pyx_L1_error)
7441 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pdeResidualU), __pyx_ptype_5numpy_ndarray, 1,
"pdeResidualU", 0))) __PYX_ERR(0, 1313, __pyx_L1_error)
7442 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualU_dp), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualU_dp", 0))) __PYX_ERR(0, 1314, __pyx_L1_error)
7443 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualU_du), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualU_du", 0))) __PYX_ERR(0, 1315, __pyx_L1_error)
7444 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualU_dv), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualU_dv", 0))) __PYX_ERR(0, 1316, __pyx_L1_error)
7445 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pdeResidualV), __pyx_ptype_5numpy_ndarray, 1,
"pdeResidualV", 0))) __PYX_ERR(0, 1317, __pyx_L1_error)
7446 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualV_dp), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualV_dp", 0))) __PYX_ERR(0, 1318, __pyx_L1_error)
7447 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualV_du), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualV_du", 0))) __PYX_ERR(0, 1319, __pyx_L1_error)
7448 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualV_dv), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualV_dv", 0))) __PYX_ERR(0, 1320, __pyx_L1_error)
7449 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_subgridErrorP), __pyx_ptype_5numpy_ndarray, 1,
"subgridErrorP", 0))) __PYX_ERR(0, 1321, __pyx_L1_error)
7450 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorP_du), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorP_du", 0))) __PYX_ERR(0, 1322, __pyx_L1_error)
7451 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorP_dv), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorP_dv", 0))) __PYX_ERR(0, 1323, __pyx_L1_error)
7452 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_subgridErrorU), __pyx_ptype_5numpy_ndarray, 1,
"subgridErrorU", 0))) __PYX_ERR(0, 1324, __pyx_L1_error)
7453 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorU_dp), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorU_dp", 0))) __PYX_ERR(0, 1325, __pyx_L1_error)
7454 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorU_du), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorU_du", 0))) __PYX_ERR(0, 1326, __pyx_L1_error)
7455 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorU_dv), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorU_dv", 0))) __PYX_ERR(0, 1327, __pyx_L1_error)
7456 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_subgridErrorV), __pyx_ptype_5numpy_ndarray, 1,
"subgridErrorV", 0))) __PYX_ERR(0, 1328, __pyx_L1_error)
7457 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorV_dp), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorV_dp", 0))) __PYX_ERR(0, 1329, __pyx_L1_error)
7458 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorV_du), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorV_du", 0))) __PYX_ERR(0, 1330, __pyx_L1_error)
7459 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorV_dv), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorV_dv", 0))) __PYX_ERR(0, 1331, __pyx_L1_error)
7460 __pyx_r = __pyx_pf_13csubgridError_42calculateSubgridErrorNavierStokes2D_GLS_tauRes(__pyx_self, __pyx_v_tau0, __pyx_v_tau1, __pyx_v_pdeResidualP, __pyx_v_dpdeResidualP_du, __pyx_v_dpdeResidualP_dv, __pyx_v_pdeResidualU, __pyx_v_dpdeResidualU_dp, __pyx_v_dpdeResidualU_du, __pyx_v_dpdeResidualU_dv, __pyx_v_pdeResidualV, __pyx_v_dpdeResidualV_dp, __pyx_v_dpdeResidualV_du, __pyx_v_dpdeResidualV_dv, __pyx_v_subgridErrorP, __pyx_v_dsubgridErrorP_du, __pyx_v_dsubgridErrorP_dv, __pyx_v_subgridErrorU, __pyx_v_dsubgridErrorU_dp, __pyx_v_dsubgridErrorU_du, __pyx_v_dsubgridErrorU_dv, __pyx_v_subgridErrorV, __pyx_v_dsubgridErrorV_dp, __pyx_v_dsubgridErrorV_du, __pyx_v_dsubgridErrorV_dv);
7467 __Pyx_RefNannyFinishContext();
7471 static PyObject *__pyx_pf_13csubgridError_42calculateSubgridErrorNavierStokes2D_GLS_tauRes(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_tau0, PyArrayObject *__pyx_v_tau1, PyArrayObject *__pyx_v_pdeResidualP, PyArrayObject *__pyx_v_dpdeResidualP_du, PyArrayObject *__pyx_v_dpdeResidualP_dv, PyArrayObject *__pyx_v_pdeResidualU, PyArrayObject *__pyx_v_dpdeResidualU_dp, PyArrayObject *__pyx_v_dpdeResidualU_du, PyArrayObject *__pyx_v_dpdeResidualU_dv, PyArrayObject *__pyx_v_pdeResidualV, PyArrayObject *__pyx_v_dpdeResidualV_dp, PyArrayObject *__pyx_v_dpdeResidualV_du, PyArrayObject *__pyx_v_dpdeResidualV_dv, PyArrayObject *__pyx_v_subgridErrorP, PyArrayObject *__pyx_v_dsubgridErrorP_du, PyArrayObject *__pyx_v_dsubgridErrorP_dv, PyArrayObject *__pyx_v_subgridErrorU, PyArrayObject *__pyx_v_dsubgridErrorU_dp, PyArrayObject *__pyx_v_dsubgridErrorU_du, PyArrayObject *__pyx_v_dsubgridErrorU_dv, PyArrayObject *__pyx_v_subgridErrorV, PyArrayObject *__pyx_v_dsubgridErrorV_dp, PyArrayObject *__pyx_v_dsubgridErrorV_du, PyArrayObject *__pyx_v_dsubgridErrorV_dv) {
7472 PyObject *__pyx_r = NULL;
7473 __Pyx_RefNannyDeclarations
7474 __Pyx_RefNannySetupContext(
"calculateSubgridErrorNavierStokes2D_GLS_tauRes", 0);
7483 calculateSubgridErrorNavierStokes2D_GLS_tauRes((__pyx_v_dsubgridErrorP_du->dimensions[0]), (__pyx_v_dsubgridErrorP_du->dimensions[1]), (__pyx_v_dsubgridErrorP_du->dimensions[2]), 2, ((
double *)__pyx_v_tau0->data), ((
double *)__pyx_v_tau1->data), ((
double *)__pyx_v_pdeResidualP->data), ((
double *)__pyx_v_dpdeResidualP_du->data), ((
double *)__pyx_v_dpdeResidualP_dv->data), ((
double *)__pyx_v_pdeResidualU->data), ((
double *)__pyx_v_dpdeResidualU_dp->data), ((
double *)__pyx_v_dpdeResidualU_du->data), ((
double *)__pyx_v_dpdeResidualU_dv->data), ((
double *)__pyx_v_pdeResidualV->data), ((
double *)__pyx_v_dpdeResidualV_dp->data), ((
double *)__pyx_v_dpdeResidualV_du->data), ((
double *)__pyx_v_dpdeResidualV_dv->data), ((
double *)__pyx_v_subgridErrorP->data), ((
double *)__pyx_v_dsubgridErrorP_du->data), ((
double *)__pyx_v_dsubgridErrorP_dv->data), ((
double *)__pyx_v_subgridErrorU->data), ((
double *)__pyx_v_dsubgridErrorU_dp->data), ((
double *)__pyx_v_dsubgridErrorU_du->data), ((
double *)__pyx_v_dsubgridErrorU_dv->data), ((
double *)__pyx_v_subgridErrorV->data), ((
double *)__pyx_v_dsubgridErrorV_dp->data), ((
double *)__pyx_v_dsubgridErrorV_du->data), ((
double *)__pyx_v_dsubgridErrorV_dv->data));
7494 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7495 __Pyx_XGIVEREF(__pyx_r);
7496 __Pyx_RefNannyFinishContext();
7509 static PyObject *__pyx_pw_13csubgridError_45calculateSubgridErrorStokes_GLS_tau(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
7510 static PyMethodDef __pyx_mdef_13csubgridError_45calculateSubgridErrorStokes_GLS_tau = {
"calculateSubgridErrorStokes_GLS_tau", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_13csubgridError_45calculateSubgridErrorStokes_GLS_tau, METH_VARARGS|METH_KEYWORDS, 0};
7511 static PyObject *__pyx_pw_13csubgridError_45calculateSubgridErrorStokes_GLS_tau(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
7512 PyArrayObject *__pyx_v_elementDiameter = 0;
7513 PyArrayObject *__pyx_v_dH = 0;
7514 PyArrayObject *__pyx_v_a = 0;
7515 PyArrayObject *__pyx_v_tau0 = 0;
7516 PyArrayObject *__pyx_v_tau1 = 0;
7517 int __pyx_lineno = 0;
7518 const char *__pyx_filename = NULL;
7519 int __pyx_clineno = 0;
7520 PyObject *__pyx_r = 0;
7521 __Pyx_RefNannyDeclarations
7522 __Pyx_RefNannySetupContext(
"calculateSubgridErrorStokes_GLS_tau (wrapper)", 0);
7524 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_elementDiameter,&__pyx_n_s_dH,&__pyx_n_s_a,&__pyx_n_s_tau0,&__pyx_n_s_tau1,0};
7525 PyObject* values[5] = {0,0,0,0,0};
7526 if (unlikely(__pyx_kwds)) {
7528 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
7530 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
7532 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
7534 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
7536 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7538 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7541 default:
goto __pyx_L5_argtuple_error;
7543 kw_args = PyDict_Size(__pyx_kwds);
7546 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementDiameter)) != 0)) kw_args--;
7547 else goto __pyx_L5_argtuple_error;
7550 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dH)) != 0)) kw_args--;
7552 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes_GLS_tau", 1, 5, 5, 1); __PYX_ERR(0, 1360, __pyx_L3_error)
7556 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
7558 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes_GLS_tau", 1, 5, 5, 2); __PYX_ERR(0, 1360, __pyx_L3_error)
7562 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tau0)) != 0)) kw_args--;
7564 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes_GLS_tau", 1, 5, 5, 3); __PYX_ERR(0, 1360, __pyx_L3_error)
7568 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tau1)) != 0)) kw_args--;
7570 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes_GLS_tau", 1, 5, 5, 4); __PYX_ERR(0, 1360, __pyx_L3_error)
7573 if (unlikely(kw_args > 0)) {
7574 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"calculateSubgridErrorStokes_GLS_tau") < 0)) __PYX_ERR(0, 1360, __pyx_L3_error)
7576 }
else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
7577 goto __pyx_L5_argtuple_error;
7579 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7580 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7581 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
7582 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
7583 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
7585 __pyx_v_elementDiameter = ((PyArrayObject *)values[0]);
7586 __pyx_v_dH = ((PyArrayObject *)values[1]);
7587 __pyx_v_a = ((PyArrayObject *)values[2]);
7588 __pyx_v_tau0 = ((PyArrayObject *)values[3]);
7589 __pyx_v_tau1 = ((PyArrayObject *)values[4]);
7591 goto __pyx_L4_argument_unpacking_done;
7592 __pyx_L5_argtuple_error:;
7593 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes_GLS_tau", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1360, __pyx_L3_error)
7595 __Pyx_AddTraceback(
"csubgridError.calculateSubgridErrorStokes_GLS_tau", __pyx_clineno, __pyx_lineno, __pyx_filename);
7596 __Pyx_RefNannyFinishContext();
7598 __pyx_L4_argument_unpacking_done:;
7599 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementDiameter), __pyx_ptype_5numpy_ndarray, 1,
"elementDiameter", 0))) __PYX_ERR(0, 1360, __pyx_L1_error)
7600 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dH), __pyx_ptype_5numpy_ndarray, 1,
"dH", 0))) __PYX_ERR(0, 1361, __pyx_L1_error)
7601 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1,
"a", 0))) __PYX_ERR(0, 1362, __pyx_L1_error)
7602 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tau0), __pyx_ptype_5numpy_ndarray, 1,
"tau0", 0))) __PYX_ERR(0, 1363, __pyx_L1_error)
7603 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tau1), __pyx_ptype_5numpy_ndarray, 1,
"tau1", 0))) __PYX_ERR(0, 1364, __pyx_L1_error)
7604 __pyx_r = __pyx_pf_13csubgridError_44calculateSubgridErrorStokes_GLS_tau(__pyx_self, __pyx_v_elementDiameter, __pyx_v_dH, __pyx_v_a, __pyx_v_tau0, __pyx_v_tau1);
7611 __Pyx_RefNannyFinishContext();
7615 static PyObject *__pyx_pf_13csubgridError_44calculateSubgridErrorStokes_GLS_tau(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_dH, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_tau0, PyArrayObject *__pyx_v_tau1) {
7616 PyObject *__pyx_r = NULL;
7617 __Pyx_RefNannyDeclarations
7618 __Pyx_RefNannySetupContext(
"calculateSubgridErrorStokes_GLS_tau", 0);
7627 calculateSubgridErrorStokes_GLS_tau((__pyx_v_dH->dimensions[0]), (__pyx_v_dH->dimensions[1]), (__pyx_v_dH->dimensions[2]), ((
double *)__pyx_v_elementDiameter->data), ((
double *)__pyx_v_dH->data), ((
double *)__pyx_v_a->data), ((
double *)__pyx_v_tau0->data), ((
double *)__pyx_v_tau1->data));
7638 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7639 __Pyx_XGIVEREF(__pyx_r);
7640 __Pyx_RefNannyFinishContext();
7653 static PyObject *__pyx_pw_13csubgridError_47calculateSubgridErrorStokes_GLS_tau_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
7654 static PyMethodDef __pyx_mdef_13csubgridError_47calculateSubgridErrorStokes_GLS_tau_sd = {
"calculateSubgridErrorStokes_GLS_tau_sd", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_13csubgridError_47calculateSubgridErrorStokes_GLS_tau_sd, METH_VARARGS|METH_KEYWORDS, 0};
7655 static PyObject *__pyx_pw_13csubgridError_47calculateSubgridErrorStokes_GLS_tau_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
7656 PyArrayObject *__pyx_v_elementDiameter = 0;
7657 PyArrayObject *__pyx_v_dH = 0;
7658 PyArrayObject *__pyx_v_a = 0;
7659 PyArrayObject *__pyx_v_tau0 = 0;
7660 PyArrayObject *__pyx_v_tau1 = 0;
7661 int __pyx_lineno = 0;
7662 const char *__pyx_filename = NULL;
7663 int __pyx_clineno = 0;
7664 PyObject *__pyx_r = 0;
7665 __Pyx_RefNannyDeclarations
7666 __Pyx_RefNannySetupContext(
"calculateSubgridErrorStokes_GLS_tau_sd (wrapper)", 0);
7668 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_elementDiameter,&__pyx_n_s_dH,&__pyx_n_s_a,&__pyx_n_s_tau0,&__pyx_n_s_tau1,0};
7669 PyObject* values[5] = {0,0,0,0,0};
7670 if (unlikely(__pyx_kwds)) {
7672 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
7674 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
7676 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
7678 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
7680 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7682 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7685 default:
goto __pyx_L5_argtuple_error;
7687 kw_args = PyDict_Size(__pyx_kwds);
7690 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementDiameter)) != 0)) kw_args--;
7691 else goto __pyx_L5_argtuple_error;
7694 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dH)) != 0)) kw_args--;
7696 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes_GLS_tau_sd", 1, 5, 5, 1); __PYX_ERR(0, 1373, __pyx_L3_error)
7700 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
7702 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes_GLS_tau_sd", 1, 5, 5, 2); __PYX_ERR(0, 1373, __pyx_L3_error)
7706 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tau0)) != 0)) kw_args--;
7708 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes_GLS_tau_sd", 1, 5, 5, 3); __PYX_ERR(0, 1373, __pyx_L3_error)
7712 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tau1)) != 0)) kw_args--;
7714 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes_GLS_tau_sd", 1, 5, 5, 4); __PYX_ERR(0, 1373, __pyx_L3_error)
7717 if (unlikely(kw_args > 0)) {
7718 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"calculateSubgridErrorStokes_GLS_tau_sd") < 0)) __PYX_ERR(0, 1373, __pyx_L3_error)
7720 }
else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
7721 goto __pyx_L5_argtuple_error;
7723 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7724 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7725 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
7726 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
7727 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
7729 __pyx_v_elementDiameter = ((PyArrayObject *)values[0]);
7730 __pyx_v_dH = ((PyArrayObject *)values[1]);
7731 __pyx_v_a = ((PyArrayObject *)values[2]);
7732 __pyx_v_tau0 = ((PyArrayObject *)values[3]);
7733 __pyx_v_tau1 = ((PyArrayObject *)values[4]);
7735 goto __pyx_L4_argument_unpacking_done;
7736 __pyx_L5_argtuple_error:;
7737 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes_GLS_tau_sd", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1373, __pyx_L3_error)
7739 __Pyx_AddTraceback(
"csubgridError.calculateSubgridErrorStokes_GLS_tau_sd", __pyx_clineno, __pyx_lineno, __pyx_filename);
7740 __Pyx_RefNannyFinishContext();
7742 __pyx_L4_argument_unpacking_done:;
7743 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementDiameter), __pyx_ptype_5numpy_ndarray, 1,
"elementDiameter", 0))) __PYX_ERR(0, 1373, __pyx_L1_error)
7744 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dH), __pyx_ptype_5numpy_ndarray, 1,
"dH", 0))) __PYX_ERR(0, 1374, __pyx_L1_error)
7745 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1,
"a", 0))) __PYX_ERR(0, 1375, __pyx_L1_error)
7746 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tau0), __pyx_ptype_5numpy_ndarray, 1,
"tau0", 0))) __PYX_ERR(0, 1376, __pyx_L1_error)
7747 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tau1), __pyx_ptype_5numpy_ndarray, 1,
"tau1", 0))) __PYX_ERR(0, 1377, __pyx_L1_error)
7748 __pyx_r = __pyx_pf_13csubgridError_46calculateSubgridErrorStokes_GLS_tau_sd(__pyx_self, __pyx_v_elementDiameter, __pyx_v_dH, __pyx_v_a, __pyx_v_tau0, __pyx_v_tau1);
7755 __Pyx_RefNannyFinishContext();
7759 static PyObject *__pyx_pf_13csubgridError_46calculateSubgridErrorStokes_GLS_tau_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_dH, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_tau0, PyArrayObject *__pyx_v_tau1) {
7760 PyObject *__pyx_r = NULL;
7761 __Pyx_RefNannyDeclarations
7762 __Pyx_RefNannySetupContext(
"calculateSubgridErrorStokes_GLS_tau_sd", 0);
7771 calculateSubgridErrorStokes_GLS_tau_sd((__pyx_v_dH->dimensions[0]), (__pyx_v_dH->dimensions[1]), (__pyx_v_dH->dimensions[2]), ((
double *)__pyx_v_elementDiameter->data), ((
double *)__pyx_v_dH->data), ((
double *)__pyx_v_a->data), ((
double *)__pyx_v_tau0->data), ((
double *)__pyx_v_tau1->data));
7782 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7783 __Pyx_XGIVEREF(__pyx_r);
7784 __Pyx_RefNannyFinishContext();
7797 static PyObject *__pyx_pw_13csubgridError_49calculateSubgridErrorStokes2D_GLS_tauRes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
7798 static PyMethodDef __pyx_mdef_13csubgridError_49calculateSubgridErrorStokes2D_GLS_tauRes = {
"calculateSubgridErrorStokes2D_GLS_tauRes", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_13csubgridError_49calculateSubgridErrorStokes2D_GLS_tauRes, METH_VARARGS|METH_KEYWORDS, 0};
7799 static PyObject *__pyx_pw_13csubgridError_49calculateSubgridErrorStokes2D_GLS_tauRes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
7800 PyArrayObject *__pyx_v_tau0 = 0;
7801 PyArrayObject *__pyx_v_tau1 = 0;
7802 PyArrayObject *__pyx_v_pdeResidualP = 0;
7803 PyArrayObject *__pyx_v_dpdeResidualP_du = 0;
7804 PyArrayObject *__pyx_v_dpdeResidualP_dv = 0;
7805 PyArrayObject *__pyx_v_pdeResidualU = 0;
7806 PyArrayObject *__pyx_v_dpdeResidualU_dp = 0;
7807 PyArrayObject *__pyx_v_dpdeResidualU_du = 0;
7808 PyArrayObject *__pyx_v_pdeResidualV = 0;
7809 PyArrayObject *__pyx_v_dpdeResidualV_dp = 0;
7810 PyArrayObject *__pyx_v_dpdeResidualV_dv = 0;
7811 PyArrayObject *__pyx_v_subgridErrorP = 0;
7812 PyArrayObject *__pyx_v_dsubgridErrorP_du = 0;
7813 PyArrayObject *__pyx_v_dsubgridErrorP_dv = 0;
7814 PyArrayObject *__pyx_v_subgridErrorU = 0;
7815 PyArrayObject *__pyx_v_dsubgridErrorU_dp = 0;
7816 PyArrayObject *__pyx_v_dsubgridErrorU_du = 0;
7817 PyArrayObject *__pyx_v_subgridErrorV = 0;
7818 PyArrayObject *__pyx_v_dsubgridErrorV_dp = 0;
7819 PyArrayObject *__pyx_v_dsubgridErrorV_dv = 0;
7820 int __pyx_lineno = 0;
7821 const char *__pyx_filename = NULL;
7822 int __pyx_clineno = 0;
7823 PyObject *__pyx_r = 0;
7824 __Pyx_RefNannyDeclarations
7825 __Pyx_RefNannySetupContext(
"calculateSubgridErrorStokes2D_GLS_tauRes (wrapper)", 0);
7827 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tau0,&__pyx_n_s_tau1,&__pyx_n_s_pdeResidualP,&__pyx_n_s_dpdeResidualP_du,&__pyx_n_s_dpdeResidualP_dv,&__pyx_n_s_pdeResidualU,&__pyx_n_s_dpdeResidualU_dp,&__pyx_n_s_dpdeResidualU_du,&__pyx_n_s_pdeResidualV,&__pyx_n_s_dpdeResidualV_dp,&__pyx_n_s_dpdeResidualV_dv,&__pyx_n_s_subgridErrorP,&__pyx_n_s_dsubgridErrorP_du,&__pyx_n_s_dsubgridErrorP_dv,&__pyx_n_s_subgridErrorU,&__pyx_n_s_dsubgridErrorU_dp,&__pyx_n_s_dsubgridErrorU_du,&__pyx_n_s_subgridErrorV,&__pyx_n_s_dsubgridErrorV_dp,&__pyx_n_s_dsubgridErrorV_dv,0};
7828 PyObject* values[20] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
7829 if (unlikely(__pyx_kwds)) {
7831 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
7833 case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
7835 case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
7837 case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
7839 case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
7841 case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
7843 case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
7845 case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
7847 case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
7849 case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
7851 case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
7853 case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
7855 case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
7857 case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
7859 case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
7861 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
7863 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
7865 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
7867 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
7869 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7871 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7874 default:
goto __pyx_L5_argtuple_error;
7876 kw_args = PyDict_Size(__pyx_kwds);
7879 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tau0)) != 0)) kw_args--;
7880 else goto __pyx_L5_argtuple_error;
7883 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tau1)) != 0)) kw_args--;
7885 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_tauRes", 1, 20, 20, 1); __PYX_ERR(0, 1386, __pyx_L3_error)
7889 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pdeResidualP)) != 0)) kw_args--;
7891 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_tauRes", 1, 20, 20, 2); __PYX_ERR(0, 1386, __pyx_L3_error)
7895 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualP_du)) != 0)) kw_args--;
7897 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_tauRes", 1, 20, 20, 3); __PYX_ERR(0, 1386, __pyx_L3_error)
7901 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualP_dv)) != 0)) kw_args--;
7903 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_tauRes", 1, 20, 20, 4); __PYX_ERR(0, 1386, __pyx_L3_error)
7907 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pdeResidualU)) != 0)) kw_args--;
7909 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_tauRes", 1, 20, 20, 5); __PYX_ERR(0, 1386, __pyx_L3_error)
7913 if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualU_dp)) != 0)) kw_args--;
7915 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_tauRes", 1, 20, 20, 6); __PYX_ERR(0, 1386, __pyx_L3_error)
7919 if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualU_du)) != 0)) kw_args--;
7921 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_tauRes", 1, 20, 20, 7); __PYX_ERR(0, 1386, __pyx_L3_error)
7925 if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pdeResidualV)) != 0)) kw_args--;
7927 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_tauRes", 1, 20, 20, 8); __PYX_ERR(0, 1386, __pyx_L3_error)
7931 if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualV_dp)) != 0)) kw_args--;
7933 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_tauRes", 1, 20, 20, 9); __PYX_ERR(0, 1386, __pyx_L3_error)
7937 if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualV_dv)) != 0)) kw_args--;
7939 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_tauRes", 1, 20, 20, 10); __PYX_ERR(0, 1386, __pyx_L3_error)
7943 if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subgridErrorP)) != 0)) kw_args--;
7945 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_tauRes", 1, 20, 20, 11); __PYX_ERR(0, 1386, __pyx_L3_error)
7949 if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorP_du)) != 0)) kw_args--;
7951 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_tauRes", 1, 20, 20, 12); __PYX_ERR(0, 1386, __pyx_L3_error)
7955 if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorP_dv)) != 0)) kw_args--;
7957 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_tauRes", 1, 20, 20, 13); __PYX_ERR(0, 1386, __pyx_L3_error)
7961 if (likely((values[14] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subgridErrorU)) != 0)) kw_args--;
7963 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_tauRes", 1, 20, 20, 14); __PYX_ERR(0, 1386, __pyx_L3_error)
7967 if (likely((values[15] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorU_dp)) != 0)) kw_args--;
7969 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_tauRes", 1, 20, 20, 15); __PYX_ERR(0, 1386, __pyx_L3_error)
7973 if (likely((values[16] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorU_du)) != 0)) kw_args--;
7975 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_tauRes", 1, 20, 20, 16); __PYX_ERR(0, 1386, __pyx_L3_error)
7979 if (likely((values[17] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subgridErrorV)) != 0)) kw_args--;
7981 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_tauRes", 1, 20, 20, 17); __PYX_ERR(0, 1386, __pyx_L3_error)
7985 if (likely((values[18] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorV_dp)) != 0)) kw_args--;
7987 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_tauRes", 1, 20, 20, 18); __PYX_ERR(0, 1386, __pyx_L3_error)
7991 if (likely((values[19] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorV_dv)) != 0)) kw_args--;
7993 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_tauRes", 1, 20, 20, 19); __PYX_ERR(0, 1386, __pyx_L3_error)
7996 if (unlikely(kw_args > 0)) {
7997 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"calculateSubgridErrorStokes2D_GLS_tauRes") < 0)) __PYX_ERR(0, 1386, __pyx_L3_error)
7999 }
else if (PyTuple_GET_SIZE(__pyx_args) != 20) {
8000 goto __pyx_L5_argtuple_error;
8002 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8003 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
8004 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
8005 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
8006 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
8007 values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
8008 values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
8009 values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
8010 values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
8011 values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
8012 values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
8013 values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
8014 values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
8015 values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
8016 values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
8017 values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
8018 values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
8019 values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
8020 values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
8021 values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
8023 __pyx_v_tau0 = ((PyArrayObject *)values[0]);
8024 __pyx_v_tau1 = ((PyArrayObject *)values[1]);
8025 __pyx_v_pdeResidualP = ((PyArrayObject *)values[2]);
8026 __pyx_v_dpdeResidualP_du = ((PyArrayObject *)values[3]);
8027 __pyx_v_dpdeResidualP_dv = ((PyArrayObject *)values[4]);
8028 __pyx_v_pdeResidualU = ((PyArrayObject *)values[5]);
8029 __pyx_v_dpdeResidualU_dp = ((PyArrayObject *)values[6]);
8030 __pyx_v_dpdeResidualU_du = ((PyArrayObject *)values[7]);
8031 __pyx_v_pdeResidualV = ((PyArrayObject *)values[8]);
8032 __pyx_v_dpdeResidualV_dp = ((PyArrayObject *)values[9]);
8033 __pyx_v_dpdeResidualV_dv = ((PyArrayObject *)values[10]);
8034 __pyx_v_subgridErrorP = ((PyArrayObject *)values[11]);
8035 __pyx_v_dsubgridErrorP_du = ((PyArrayObject *)values[12]);
8036 __pyx_v_dsubgridErrorP_dv = ((PyArrayObject *)values[13]);
8037 __pyx_v_subgridErrorU = ((PyArrayObject *)values[14]);
8038 __pyx_v_dsubgridErrorU_dp = ((PyArrayObject *)values[15]);
8039 __pyx_v_dsubgridErrorU_du = ((PyArrayObject *)values[16]);
8040 __pyx_v_subgridErrorV = ((PyArrayObject *)values[17]);
8041 __pyx_v_dsubgridErrorV_dp = ((PyArrayObject *)values[18]);
8042 __pyx_v_dsubgridErrorV_dv = ((PyArrayObject *)values[19]);
8044 goto __pyx_L4_argument_unpacking_done;
8045 __pyx_L5_argtuple_error:;
8046 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_GLS_tauRes", 1, 20, 20, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1386, __pyx_L3_error)
8048 __Pyx_AddTraceback(
"csubgridError.calculateSubgridErrorStokes2D_GLS_tauRes", __pyx_clineno, __pyx_lineno, __pyx_filename);
8049 __Pyx_RefNannyFinishContext();
8051 __pyx_L4_argument_unpacking_done:;
8052 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tau0), __pyx_ptype_5numpy_ndarray, 1,
"tau0", 0))) __PYX_ERR(0, 1386, __pyx_L1_error)
8053 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tau1), __pyx_ptype_5numpy_ndarray, 1,
"tau1", 0))) __PYX_ERR(0, 1387, __pyx_L1_error)
8054 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pdeResidualP), __pyx_ptype_5numpy_ndarray, 1,
"pdeResidualP", 0))) __PYX_ERR(0, 1388, __pyx_L1_error)
8055 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualP_du), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualP_du", 0))) __PYX_ERR(0, 1389, __pyx_L1_error)
8056 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualP_dv), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualP_dv", 0))) __PYX_ERR(0, 1390, __pyx_L1_error)
8057 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pdeResidualU), __pyx_ptype_5numpy_ndarray, 1,
"pdeResidualU", 0))) __PYX_ERR(0, 1391, __pyx_L1_error)
8058 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualU_dp), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualU_dp", 0))) __PYX_ERR(0, 1392, __pyx_L1_error)
8059 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualU_du), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualU_du", 0))) __PYX_ERR(0, 1393, __pyx_L1_error)
8060 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pdeResidualV), __pyx_ptype_5numpy_ndarray, 1,
"pdeResidualV", 0))) __PYX_ERR(0, 1394, __pyx_L1_error)
8061 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualV_dp), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualV_dp", 0))) __PYX_ERR(0, 1395, __pyx_L1_error)
8062 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualV_dv), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualV_dv", 0))) __PYX_ERR(0, 1396, __pyx_L1_error)
8063 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_subgridErrorP), __pyx_ptype_5numpy_ndarray, 1,
"subgridErrorP", 0))) __PYX_ERR(0, 1397, __pyx_L1_error)
8064 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorP_du), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorP_du", 0))) __PYX_ERR(0, 1398, __pyx_L1_error)
8065 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorP_dv), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorP_dv", 0))) __PYX_ERR(0, 1399, __pyx_L1_error)
8066 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_subgridErrorU), __pyx_ptype_5numpy_ndarray, 1,
"subgridErrorU", 0))) __PYX_ERR(0, 1400, __pyx_L1_error)
8067 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorU_dp), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorU_dp", 0))) __PYX_ERR(0, 1401, __pyx_L1_error)
8068 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorU_du), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorU_du", 0))) __PYX_ERR(0, 1402, __pyx_L1_error)
8069 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_subgridErrorV), __pyx_ptype_5numpy_ndarray, 1,
"subgridErrorV", 0))) __PYX_ERR(0, 1403, __pyx_L1_error)
8070 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorV_dp), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorV_dp", 0))) __PYX_ERR(0, 1404, __pyx_L1_error)
8071 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorV_dv), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorV_dv", 0))) __PYX_ERR(0, 1405, __pyx_L1_error)
8072 __pyx_r = __pyx_pf_13csubgridError_48calculateSubgridErrorStokes2D_GLS_tauRes(__pyx_self, __pyx_v_tau0, __pyx_v_tau1, __pyx_v_pdeResidualP, __pyx_v_dpdeResidualP_du, __pyx_v_dpdeResidualP_dv, __pyx_v_pdeResidualU, __pyx_v_dpdeResidualU_dp, __pyx_v_dpdeResidualU_du, __pyx_v_pdeResidualV, __pyx_v_dpdeResidualV_dp, __pyx_v_dpdeResidualV_dv, __pyx_v_subgridErrorP, __pyx_v_dsubgridErrorP_du, __pyx_v_dsubgridErrorP_dv, __pyx_v_subgridErrorU, __pyx_v_dsubgridErrorU_dp, __pyx_v_dsubgridErrorU_du, __pyx_v_subgridErrorV, __pyx_v_dsubgridErrorV_dp, __pyx_v_dsubgridErrorV_dv);
8079 __Pyx_RefNannyFinishContext();
8083 static PyObject *__pyx_pf_13csubgridError_48calculateSubgridErrorStokes2D_GLS_tauRes(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_tau0, PyArrayObject *__pyx_v_tau1, PyArrayObject *__pyx_v_pdeResidualP, PyArrayObject *__pyx_v_dpdeResidualP_du, PyArrayObject *__pyx_v_dpdeResidualP_dv, PyArrayObject *__pyx_v_pdeResidualU, PyArrayObject *__pyx_v_dpdeResidualU_dp, PyArrayObject *__pyx_v_dpdeResidualU_du, PyArrayObject *__pyx_v_pdeResidualV, PyArrayObject *__pyx_v_dpdeResidualV_dp, PyArrayObject *__pyx_v_dpdeResidualV_dv, PyArrayObject *__pyx_v_subgridErrorP, PyArrayObject *__pyx_v_dsubgridErrorP_du, PyArrayObject *__pyx_v_dsubgridErrorP_dv, PyArrayObject *__pyx_v_subgridErrorU, PyArrayObject *__pyx_v_dsubgridErrorU_dp, PyArrayObject *__pyx_v_dsubgridErrorU_du, PyArrayObject *__pyx_v_subgridErrorV, PyArrayObject *__pyx_v_dsubgridErrorV_dp, PyArrayObject *__pyx_v_dsubgridErrorV_dv) {
8084 PyObject *__pyx_r = NULL;
8085 __Pyx_RefNannyDeclarations
8086 __Pyx_RefNannySetupContext(
"calculateSubgridErrorStokes2D_GLS_tauRes", 0);
8095 calculateSubgridErrorStokes2D_GLS_tauRes((__pyx_v_dsubgridErrorP_du->dimensions[0]), (__pyx_v_dsubgridErrorP_du->dimensions[1]), (__pyx_v_dsubgridErrorP_du->dimensions[2]), 2, ((
double *)__pyx_v_tau0->data), ((
double *)__pyx_v_tau1->data), ((
double *)__pyx_v_pdeResidualP->data), ((
double *)__pyx_v_dpdeResidualP_du->data), ((
double *)__pyx_v_dpdeResidualP_dv->data), ((
double *)__pyx_v_pdeResidualU->data), ((
double *)__pyx_v_dpdeResidualU_dp->data), ((
double *)__pyx_v_dpdeResidualU_du->data), ((
double *)__pyx_v_pdeResidualV->data), ((
double *)__pyx_v_dpdeResidualV_dp->data), ((
double *)__pyx_v_dpdeResidualV_dv->data), ((
double *)__pyx_v_subgridErrorP->data), ((
double *)__pyx_v_dsubgridErrorP_du->data), ((
double *)__pyx_v_dsubgridErrorP_dv->data), ((
double *)__pyx_v_subgridErrorU->data), ((
double *)__pyx_v_dsubgridErrorU_dp->data), ((
double *)__pyx_v_dsubgridErrorU_du->data), ((
double *)__pyx_v_subgridErrorV->data), ((
double *)__pyx_v_dsubgridErrorV_dp->data), ((
double *)__pyx_v_dsubgridErrorV_dv->data));
8106 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8107 __Pyx_XGIVEREF(__pyx_r);
8108 __Pyx_RefNannyFinishContext();
8121 static PyObject *__pyx_pw_13csubgridError_51calculateSubgridErrorStokes3D_GLS_tauRes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
8122 static PyMethodDef __pyx_mdef_13csubgridError_51calculateSubgridErrorStokes3D_GLS_tauRes = {
"calculateSubgridErrorStokes3D_GLS_tauRes", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_13csubgridError_51calculateSubgridErrorStokes3D_GLS_tauRes, METH_VARARGS|METH_KEYWORDS, 0};
8123 static PyObject *__pyx_pw_13csubgridError_51calculateSubgridErrorStokes3D_GLS_tauRes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
8124 PyArrayObject *__pyx_v_tau0 = 0;
8125 PyArrayObject *__pyx_v_tau1 = 0;
8126 PyArrayObject *__pyx_v_pdeResidualP = 0;
8127 PyArrayObject *__pyx_v_dpdeResidualP_du = 0;
8128 PyArrayObject *__pyx_v_dpdeResidualP_dv = 0;
8129 PyArrayObject *__pyx_v_dpdeResidualP_dw = 0;
8130 PyArrayObject *__pyx_v_pdeResidualU = 0;
8131 PyArrayObject *__pyx_v_dpdeResidualU_dp = 0;
8132 PyArrayObject *__pyx_v_dpdeResidualU_du = 0;
8133 PyArrayObject *__pyx_v_pdeResidualV = 0;
8134 PyArrayObject *__pyx_v_dpdeResidualV_dp = 0;
8135 PyArrayObject *__pyx_v_dpdeResidualV_dv = 0;
8136 PyArrayObject *__pyx_v_pdeResidualW = 0;
8137 PyArrayObject *__pyx_v_dpdeResidualW_dp = 0;
8138 PyArrayObject *__pyx_v_dpdeResidualW_dw = 0;
8139 PyArrayObject *__pyx_v_subgridErrorP = 0;
8140 PyArrayObject *__pyx_v_dsubgridErrorP_du = 0;
8141 PyArrayObject *__pyx_v_dsubgridErrorP_dv = 0;
8142 PyArrayObject *__pyx_v_dsubgridErrorP_dw = 0;
8143 PyArrayObject *__pyx_v_subgridErrorU = 0;
8144 PyArrayObject *__pyx_v_dsubgridErrorU_dp = 0;
8145 PyArrayObject *__pyx_v_dsubgridErrorU_du = 0;
8146 PyArrayObject *__pyx_v_subgridErrorV = 0;
8147 PyArrayObject *__pyx_v_dsubgridErrorV_dp = 0;
8148 PyArrayObject *__pyx_v_dsubgridErrorV_dv = 0;
8149 PyArrayObject *__pyx_v_subgridErrorW = 0;
8150 PyArrayObject *__pyx_v_dsubgridErrorW_dp = 0;
8151 PyArrayObject *__pyx_v_dsubgridErrorW_dw = 0;
8152 int __pyx_lineno = 0;
8153 const char *__pyx_filename = NULL;
8154 int __pyx_clineno = 0;
8155 PyObject *__pyx_r = 0;
8156 __Pyx_RefNannyDeclarations
8157 __Pyx_RefNannySetupContext(
"calculateSubgridErrorStokes3D_GLS_tauRes (wrapper)", 0);
8159 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tau0,&__pyx_n_s_tau1,&__pyx_n_s_pdeResidualP,&__pyx_n_s_dpdeResidualP_du,&__pyx_n_s_dpdeResidualP_dv,&__pyx_n_s_dpdeResidualP_dw,&__pyx_n_s_pdeResidualU,&__pyx_n_s_dpdeResidualU_dp,&__pyx_n_s_dpdeResidualU_du,&__pyx_n_s_pdeResidualV,&__pyx_n_s_dpdeResidualV_dp,&__pyx_n_s_dpdeResidualV_dv,&__pyx_n_s_pdeResidualW,&__pyx_n_s_dpdeResidualW_dp,&__pyx_n_s_dpdeResidualW_dw,&__pyx_n_s_subgridErrorP,&__pyx_n_s_dsubgridErrorP_du,&__pyx_n_s_dsubgridErrorP_dv,&__pyx_n_s_dsubgridErrorP_dw,&__pyx_n_s_subgridErrorU,&__pyx_n_s_dsubgridErrorU_dp,&__pyx_n_s_dsubgridErrorU_du,&__pyx_n_s_subgridErrorV,&__pyx_n_s_dsubgridErrorV_dp,&__pyx_n_s_dsubgridErrorV_dv,&__pyx_n_s_subgridErrorW,&__pyx_n_s_dsubgridErrorW_dp,&__pyx_n_s_dsubgridErrorW_dw,0};
8160 PyObject* values[28] = {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,0,0};
8161 if (unlikely(__pyx_kwds)) {
8163 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
8165 case 28: values[27] = PyTuple_GET_ITEM(__pyx_args, 27);
8167 case 27: values[26] = PyTuple_GET_ITEM(__pyx_args, 26);
8169 case 26: values[25] = PyTuple_GET_ITEM(__pyx_args, 25);
8171 case 25: values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
8173 case 24: values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
8175 case 23: values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
8177 case 22: values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
8179 case 21: values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
8181 case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
8183 case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
8185 case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
8187 case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
8189 case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
8191 case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
8193 case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
8195 case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
8197 case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
8199 case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
8201 case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
8203 case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
8205 case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
8207 case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
8209 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
8211 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
8213 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
8215 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
8217 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
8219 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8222 default:
goto __pyx_L5_argtuple_error;
8224 kw_args = PyDict_Size(__pyx_kwds);
8227 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tau0)) != 0)) kw_args--;
8228 else goto __pyx_L5_argtuple_error;
8231 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tau1)) != 0)) kw_args--;
8233 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_tauRes", 1, 28, 28, 1); __PYX_ERR(0, 1430, __pyx_L3_error)
8237 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pdeResidualP)) != 0)) kw_args--;
8239 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_tauRes", 1, 28, 28, 2); __PYX_ERR(0, 1430, __pyx_L3_error)
8243 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualP_du)) != 0)) kw_args--;
8245 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_tauRes", 1, 28, 28, 3); __PYX_ERR(0, 1430, __pyx_L3_error)
8249 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualP_dv)) != 0)) kw_args--;
8251 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_tauRes", 1, 28, 28, 4); __PYX_ERR(0, 1430, __pyx_L3_error)
8255 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualP_dw)) != 0)) kw_args--;
8257 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_tauRes", 1, 28, 28, 5); __PYX_ERR(0, 1430, __pyx_L3_error)
8261 if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pdeResidualU)) != 0)) kw_args--;
8263 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_tauRes", 1, 28, 28, 6); __PYX_ERR(0, 1430, __pyx_L3_error)
8267 if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualU_dp)) != 0)) kw_args--;
8269 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_tauRes", 1, 28, 28, 7); __PYX_ERR(0, 1430, __pyx_L3_error)
8273 if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualU_du)) != 0)) kw_args--;
8275 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_tauRes", 1, 28, 28, 8); __PYX_ERR(0, 1430, __pyx_L3_error)
8279 if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pdeResidualV)) != 0)) kw_args--;
8281 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_tauRes", 1, 28, 28, 9); __PYX_ERR(0, 1430, __pyx_L3_error)
8285 if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualV_dp)) != 0)) kw_args--;
8287 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_tauRes", 1, 28, 28, 10); __PYX_ERR(0, 1430, __pyx_L3_error)
8291 if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualV_dv)) != 0)) kw_args--;
8293 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_tauRes", 1, 28, 28, 11); __PYX_ERR(0, 1430, __pyx_L3_error)
8297 if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pdeResidualW)) != 0)) kw_args--;
8299 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_tauRes", 1, 28, 28, 12); __PYX_ERR(0, 1430, __pyx_L3_error)
8303 if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualW_dp)) != 0)) kw_args--;
8305 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_tauRes", 1, 28, 28, 13); __PYX_ERR(0, 1430, __pyx_L3_error)
8309 if (likely((values[14] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualW_dw)) != 0)) kw_args--;
8311 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_tauRes", 1, 28, 28, 14); __PYX_ERR(0, 1430, __pyx_L3_error)
8315 if (likely((values[15] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subgridErrorP)) != 0)) kw_args--;
8317 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_tauRes", 1, 28, 28, 15); __PYX_ERR(0, 1430, __pyx_L3_error)
8321 if (likely((values[16] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorP_du)) != 0)) kw_args--;
8323 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_tauRes", 1, 28, 28, 16); __PYX_ERR(0, 1430, __pyx_L3_error)
8327 if (likely((values[17] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorP_dv)) != 0)) kw_args--;
8329 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_tauRes", 1, 28, 28, 17); __PYX_ERR(0, 1430, __pyx_L3_error)
8333 if (likely((values[18] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorP_dw)) != 0)) kw_args--;
8335 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_tauRes", 1, 28, 28, 18); __PYX_ERR(0, 1430, __pyx_L3_error)
8339 if (likely((values[19] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subgridErrorU)) != 0)) kw_args--;
8341 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_tauRes", 1, 28, 28, 19); __PYX_ERR(0, 1430, __pyx_L3_error)
8345 if (likely((values[20] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorU_dp)) != 0)) kw_args--;
8347 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_tauRes", 1, 28, 28, 20); __PYX_ERR(0, 1430, __pyx_L3_error)
8351 if (likely((values[21] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorU_du)) != 0)) kw_args--;
8353 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_tauRes", 1, 28, 28, 21); __PYX_ERR(0, 1430, __pyx_L3_error)
8357 if (likely((values[22] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subgridErrorV)) != 0)) kw_args--;
8359 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_tauRes", 1, 28, 28, 22); __PYX_ERR(0, 1430, __pyx_L3_error)
8363 if (likely((values[23] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorV_dp)) != 0)) kw_args--;
8365 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_tauRes", 1, 28, 28, 23); __PYX_ERR(0, 1430, __pyx_L3_error)
8369 if (likely((values[24] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorV_dv)) != 0)) kw_args--;
8371 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_tauRes", 1, 28, 28, 24); __PYX_ERR(0, 1430, __pyx_L3_error)
8375 if (likely((values[25] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subgridErrorW)) != 0)) kw_args--;
8377 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_tauRes", 1, 28, 28, 25); __PYX_ERR(0, 1430, __pyx_L3_error)
8381 if (likely((values[26] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorW_dp)) != 0)) kw_args--;
8383 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_tauRes", 1, 28, 28, 26); __PYX_ERR(0, 1430, __pyx_L3_error)
8387 if (likely((values[27] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorW_dw)) != 0)) kw_args--;
8389 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_tauRes", 1, 28, 28, 27); __PYX_ERR(0, 1430, __pyx_L3_error)
8392 if (unlikely(kw_args > 0)) {
8393 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"calculateSubgridErrorStokes3D_GLS_tauRes") < 0)) __PYX_ERR(0, 1430, __pyx_L3_error)
8395 }
else if (PyTuple_GET_SIZE(__pyx_args) != 28) {
8396 goto __pyx_L5_argtuple_error;
8398 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8399 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
8400 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
8401 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
8402 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
8403 values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
8404 values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
8405 values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
8406 values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
8407 values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
8408 values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
8409 values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
8410 values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
8411 values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
8412 values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
8413 values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
8414 values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
8415 values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
8416 values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
8417 values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
8418 values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
8419 values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
8420 values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
8421 values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
8422 values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
8423 values[25] = PyTuple_GET_ITEM(__pyx_args, 25);
8424 values[26] = PyTuple_GET_ITEM(__pyx_args, 26);
8425 values[27] = PyTuple_GET_ITEM(__pyx_args, 27);
8427 __pyx_v_tau0 = ((PyArrayObject *)values[0]);
8428 __pyx_v_tau1 = ((PyArrayObject *)values[1]);
8429 __pyx_v_pdeResidualP = ((PyArrayObject *)values[2]);
8430 __pyx_v_dpdeResidualP_du = ((PyArrayObject *)values[3]);
8431 __pyx_v_dpdeResidualP_dv = ((PyArrayObject *)values[4]);
8432 __pyx_v_dpdeResidualP_dw = ((PyArrayObject *)values[5]);
8433 __pyx_v_pdeResidualU = ((PyArrayObject *)values[6]);
8434 __pyx_v_dpdeResidualU_dp = ((PyArrayObject *)values[7]);
8435 __pyx_v_dpdeResidualU_du = ((PyArrayObject *)values[8]);
8436 __pyx_v_pdeResidualV = ((PyArrayObject *)values[9]);
8437 __pyx_v_dpdeResidualV_dp = ((PyArrayObject *)values[10]);
8438 __pyx_v_dpdeResidualV_dv = ((PyArrayObject *)values[11]);
8439 __pyx_v_pdeResidualW = ((PyArrayObject *)values[12]);
8440 __pyx_v_dpdeResidualW_dp = ((PyArrayObject *)values[13]);
8441 __pyx_v_dpdeResidualW_dw = ((PyArrayObject *)values[14]);
8442 __pyx_v_subgridErrorP = ((PyArrayObject *)values[15]);
8443 __pyx_v_dsubgridErrorP_du = ((PyArrayObject *)values[16]);
8444 __pyx_v_dsubgridErrorP_dv = ((PyArrayObject *)values[17]);
8445 __pyx_v_dsubgridErrorP_dw = ((PyArrayObject *)values[18]);
8446 __pyx_v_subgridErrorU = ((PyArrayObject *)values[19]);
8447 __pyx_v_dsubgridErrorU_dp = ((PyArrayObject *)values[20]);
8448 __pyx_v_dsubgridErrorU_du = ((PyArrayObject *)values[21]);
8449 __pyx_v_subgridErrorV = ((PyArrayObject *)values[22]);
8450 __pyx_v_dsubgridErrorV_dp = ((PyArrayObject *)values[23]);
8451 __pyx_v_dsubgridErrorV_dv = ((PyArrayObject *)values[24]);
8452 __pyx_v_subgridErrorW = ((PyArrayObject *)values[25]);
8453 __pyx_v_dsubgridErrorW_dp = ((PyArrayObject *)values[26]);
8454 __pyx_v_dsubgridErrorW_dw = ((PyArrayObject *)values[27]);
8456 goto __pyx_L4_argument_unpacking_done;
8457 __pyx_L5_argtuple_error:;
8458 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes3D_GLS_tauRes", 1, 28, 28, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1430, __pyx_L3_error)
8460 __Pyx_AddTraceback(
"csubgridError.calculateSubgridErrorStokes3D_GLS_tauRes", __pyx_clineno, __pyx_lineno, __pyx_filename);
8461 __Pyx_RefNannyFinishContext();
8463 __pyx_L4_argument_unpacking_done:;
8464 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tau0), __pyx_ptype_5numpy_ndarray, 1,
"tau0", 0))) __PYX_ERR(0, 1430, __pyx_L1_error)
8465 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tau1), __pyx_ptype_5numpy_ndarray, 1,
"tau1", 0))) __PYX_ERR(0, 1431, __pyx_L1_error)
8466 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pdeResidualP), __pyx_ptype_5numpy_ndarray, 1,
"pdeResidualP", 0))) __PYX_ERR(0, 1432, __pyx_L1_error)
8467 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualP_du), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualP_du", 0))) __PYX_ERR(0, 1433, __pyx_L1_error)
8468 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualP_dv), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualP_dv", 0))) __PYX_ERR(0, 1434, __pyx_L1_error)
8469 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualP_dw), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualP_dw", 0))) __PYX_ERR(0, 1435, __pyx_L1_error)
8470 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pdeResidualU), __pyx_ptype_5numpy_ndarray, 1,
"pdeResidualU", 0))) __PYX_ERR(0, 1436, __pyx_L1_error)
8471 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualU_dp), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualU_dp", 0))) __PYX_ERR(0, 1437, __pyx_L1_error)
8472 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualU_du), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualU_du", 0))) __PYX_ERR(0, 1438, __pyx_L1_error)
8473 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pdeResidualV), __pyx_ptype_5numpy_ndarray, 1,
"pdeResidualV", 0))) __PYX_ERR(0, 1439, __pyx_L1_error)
8474 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualV_dp), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualV_dp", 0))) __PYX_ERR(0, 1440, __pyx_L1_error)
8475 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualV_dv), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualV_dv", 0))) __PYX_ERR(0, 1441, __pyx_L1_error)
8476 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pdeResidualW), __pyx_ptype_5numpy_ndarray, 1,
"pdeResidualW", 0))) __PYX_ERR(0, 1442, __pyx_L1_error)
8477 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualW_dp), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualW_dp", 0))) __PYX_ERR(0, 1443, __pyx_L1_error)
8478 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualW_dw), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualW_dw", 0))) __PYX_ERR(0, 1444, __pyx_L1_error)
8479 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_subgridErrorP), __pyx_ptype_5numpy_ndarray, 1,
"subgridErrorP", 0))) __PYX_ERR(0, 1445, __pyx_L1_error)
8480 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorP_du), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorP_du", 0))) __PYX_ERR(0, 1446, __pyx_L1_error)
8481 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorP_dv), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorP_dv", 0))) __PYX_ERR(0, 1447, __pyx_L1_error)
8482 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorP_dw), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorP_dw", 0))) __PYX_ERR(0, 1448, __pyx_L1_error)
8483 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_subgridErrorU), __pyx_ptype_5numpy_ndarray, 1,
"subgridErrorU", 0))) __PYX_ERR(0, 1449, __pyx_L1_error)
8484 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorU_dp), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorU_dp", 0))) __PYX_ERR(0, 1450, __pyx_L1_error)
8485 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorU_du), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorU_du", 0))) __PYX_ERR(0, 1451, __pyx_L1_error)
8486 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_subgridErrorV), __pyx_ptype_5numpy_ndarray, 1,
"subgridErrorV", 0))) __PYX_ERR(0, 1452, __pyx_L1_error)
8487 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorV_dp), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorV_dp", 0))) __PYX_ERR(0, 1453, __pyx_L1_error)
8488 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorV_dv), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorV_dv", 0))) __PYX_ERR(0, 1454, __pyx_L1_error)
8489 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_subgridErrorW), __pyx_ptype_5numpy_ndarray, 1,
"subgridErrorW", 0))) __PYX_ERR(0, 1455, __pyx_L1_error)
8490 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorW_dp), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorW_dp", 0))) __PYX_ERR(0, 1456, __pyx_L1_error)
8491 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorW_dw), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorW_dw", 0))) __PYX_ERR(0, 1457, __pyx_L1_error)
8492 __pyx_r = __pyx_pf_13csubgridError_50calculateSubgridErrorStokes3D_GLS_tauRes(__pyx_self, __pyx_v_tau0, __pyx_v_tau1, __pyx_v_pdeResidualP, __pyx_v_dpdeResidualP_du, __pyx_v_dpdeResidualP_dv, __pyx_v_dpdeResidualP_dw, __pyx_v_pdeResidualU, __pyx_v_dpdeResidualU_dp, __pyx_v_dpdeResidualU_du, __pyx_v_pdeResidualV, __pyx_v_dpdeResidualV_dp, __pyx_v_dpdeResidualV_dv, __pyx_v_pdeResidualW, __pyx_v_dpdeResidualW_dp, __pyx_v_dpdeResidualW_dw, __pyx_v_subgridErrorP, __pyx_v_dsubgridErrorP_du, __pyx_v_dsubgridErrorP_dv, __pyx_v_dsubgridErrorP_dw, __pyx_v_subgridErrorU, __pyx_v_dsubgridErrorU_dp, __pyx_v_dsubgridErrorU_du, __pyx_v_subgridErrorV, __pyx_v_dsubgridErrorV_dp, __pyx_v_dsubgridErrorV_dv, __pyx_v_subgridErrorW, __pyx_v_dsubgridErrorW_dp, __pyx_v_dsubgridErrorW_dw);
8499 __Pyx_RefNannyFinishContext();
8503 static PyObject *__pyx_pf_13csubgridError_50calculateSubgridErrorStokes3D_GLS_tauRes(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_tau0, PyArrayObject *__pyx_v_tau1, PyArrayObject *__pyx_v_pdeResidualP, PyArrayObject *__pyx_v_dpdeResidualP_du, PyArrayObject *__pyx_v_dpdeResidualP_dv, PyArrayObject *__pyx_v_dpdeResidualP_dw, PyArrayObject *__pyx_v_pdeResidualU, PyArrayObject *__pyx_v_dpdeResidualU_dp, PyArrayObject *__pyx_v_dpdeResidualU_du, PyArrayObject *__pyx_v_pdeResidualV, PyArrayObject *__pyx_v_dpdeResidualV_dp, PyArrayObject *__pyx_v_dpdeResidualV_dv, PyArrayObject *__pyx_v_pdeResidualW, PyArrayObject *__pyx_v_dpdeResidualW_dp, PyArrayObject *__pyx_v_dpdeResidualW_dw, PyArrayObject *__pyx_v_subgridErrorP, PyArrayObject *__pyx_v_dsubgridErrorP_du, PyArrayObject *__pyx_v_dsubgridErrorP_dv, PyArrayObject *__pyx_v_dsubgridErrorP_dw, PyArrayObject *__pyx_v_subgridErrorU, PyArrayObject *__pyx_v_dsubgridErrorU_dp, PyArrayObject *__pyx_v_dsubgridErrorU_du, PyArrayObject *__pyx_v_subgridErrorV, PyArrayObject *__pyx_v_dsubgridErrorV_dp, PyArrayObject *__pyx_v_dsubgridErrorV_dv, PyArrayObject *__pyx_v_subgridErrorW, PyArrayObject *__pyx_v_dsubgridErrorW_dp, PyArrayObject *__pyx_v_dsubgridErrorW_dw) {
8504 PyObject *__pyx_r = NULL;
8505 __Pyx_RefNannyDeclarations
8506 __Pyx_RefNannySetupContext(
"calculateSubgridErrorStokes3D_GLS_tauRes", 0);
8515 calculateSubgridErrorStokes3D_GLS_tauRes((__pyx_v_dsubgridErrorP_du->dimensions[0]), (__pyx_v_dsubgridErrorP_du->dimensions[1]), (__pyx_v_dsubgridErrorP_du->dimensions[2]), 3, ((
double *)__pyx_v_tau0->data), ((
double *)__pyx_v_tau1->data), ((
double *)__pyx_v_pdeResidualP->data), ((
double *)__pyx_v_dpdeResidualP_du->data), ((
double *)__pyx_v_dpdeResidualP_dv->data), ((
double *)__pyx_v_dpdeResidualP_dw->data), ((
double *)__pyx_v_pdeResidualU->data), ((
double *)__pyx_v_dpdeResidualU_dp->data), ((
double *)__pyx_v_dpdeResidualU_du->data), ((
double *)__pyx_v_pdeResidualV->data), ((
double *)__pyx_v_dpdeResidualV_dp->data), ((
double *)__pyx_v_dpdeResidualV_dv->data), ((
double *)__pyx_v_pdeResidualW->data), ((
double *)__pyx_v_dpdeResidualW_dp->data), ((
double *)__pyx_v_dpdeResidualW_dw->data), ((
double *)__pyx_v_subgridErrorP->data), ((
double *)__pyx_v_dsubgridErrorP_du->data), ((
double *)__pyx_v_dsubgridErrorP_dv->data), ((
double *)__pyx_v_dsubgridErrorP_dw->data), ((
double *)__pyx_v_subgridErrorU->data), ((
double *)__pyx_v_dsubgridErrorU_dp->data), ((
double *)__pyx_v_dsubgridErrorU_du->data), ((
double *)__pyx_v_subgridErrorV->data), ((
double *)__pyx_v_dsubgridErrorV_dp->data), ((
double *)__pyx_v_dsubgridErrorV_dv->data), ((
double *)__pyx_v_subgridErrorW->data), ((
double *)__pyx_v_dsubgridErrorW_dp->data), ((
double *)__pyx_v_dsubgridErrorW_dw->data));
8526 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8527 __Pyx_XGIVEREF(__pyx_r);
8528 __Pyx_RefNannyFinishContext();
8541 static PyObject *__pyx_pw_13csubgridError_53calculateSubgridErrorNavierStokes3D_GLS_tauRes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
8542 static PyMethodDef __pyx_mdef_13csubgridError_53calculateSubgridErrorNavierStokes3D_GLS_tauRes = {
"calculateSubgridErrorNavierStokes3D_GLS_tauRes", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_13csubgridError_53calculateSubgridErrorNavierStokes3D_GLS_tauRes, METH_VARARGS|METH_KEYWORDS, 0};
8543 static PyObject *__pyx_pw_13csubgridError_53calculateSubgridErrorNavierStokes3D_GLS_tauRes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
8544 PyArrayObject *__pyx_v_tau0 = 0;
8545 PyArrayObject *__pyx_v_tau1 = 0;
8546 PyArrayObject *__pyx_v_pdeResidualP = 0;
8547 PyArrayObject *__pyx_v_dpdeResidualP_du = 0;
8548 PyArrayObject *__pyx_v_dpdeResidualP_dv = 0;
8549 PyArrayObject *__pyx_v_dpdeResidualP_dw = 0;
8550 PyArrayObject *__pyx_v_pdeResidualU = 0;
8551 PyArrayObject *__pyx_v_dpdeResidualU_dp = 0;
8552 PyArrayObject *__pyx_v_dpdeResidualU_du = 0;
8553 PyArrayObject *__pyx_v_dpdeResidualU_dv = 0;
8554 PyArrayObject *__pyx_v_dpdeResidualU_dw = 0;
8555 PyArrayObject *__pyx_v_pdeResidualV = 0;
8556 PyArrayObject *__pyx_v_dpdeResidualV_dp = 0;
8557 PyArrayObject *__pyx_v_dpdeResidualV_du = 0;
8558 PyArrayObject *__pyx_v_dpdeResidualV_dv = 0;
8559 PyArrayObject *__pyx_v_dpdeResidualV_dw = 0;
8560 PyArrayObject *__pyx_v_pdeResidualW = 0;
8561 PyArrayObject *__pyx_v_dpdeResidualW_dp = 0;
8562 PyArrayObject *__pyx_v_dpdeResidualW_du = 0;
8563 PyArrayObject *__pyx_v_dpdeResidualW_dv = 0;
8564 PyArrayObject *__pyx_v_dpdeResidualW_dw = 0;
8565 PyArrayObject *__pyx_v_subgridErrorP = 0;
8566 PyArrayObject *__pyx_v_dsubgridErrorP_du = 0;
8567 PyArrayObject *__pyx_v_dsubgridErrorP_dv = 0;
8568 PyArrayObject *__pyx_v_dsubgridErrorP_dw = 0;
8569 PyArrayObject *__pyx_v_subgridErrorU = 0;
8570 PyArrayObject *__pyx_v_dsubgridErrorU_dp = 0;
8571 PyArrayObject *__pyx_v_dsubgridErrorU_du = 0;
8572 PyArrayObject *__pyx_v_dsubgridErrorU_dv = 0;
8573 PyArrayObject *__pyx_v_dsubgridErrorU_dw = 0;
8574 PyArrayObject *__pyx_v_subgridErrorV = 0;
8575 PyArrayObject *__pyx_v_dsubgridErrorV_dp = 0;
8576 PyArrayObject *__pyx_v_dsubgridErrorV_du = 0;
8577 PyArrayObject *__pyx_v_dsubgridErrorV_dv = 0;
8578 PyArrayObject *__pyx_v_dsubgridErrorV_dw = 0;
8579 PyArrayObject *__pyx_v_subgridErrorW = 0;
8580 PyArrayObject *__pyx_v_dsubgridErrorW_dp = 0;
8581 PyArrayObject *__pyx_v_dsubgridErrorW_du = 0;
8582 PyArrayObject *__pyx_v_dsubgridErrorW_dv = 0;
8583 PyArrayObject *__pyx_v_dsubgridErrorW_dw = 0;
8584 int __pyx_lineno = 0;
8585 const char *__pyx_filename = NULL;
8586 int __pyx_clineno = 0;
8587 PyObject *__pyx_r = 0;
8588 __Pyx_RefNannyDeclarations
8589 __Pyx_RefNannySetupContext(
"calculateSubgridErrorNavierStokes3D_GLS_tauRes (wrapper)", 0);
8591 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tau0,&__pyx_n_s_tau1,&__pyx_n_s_pdeResidualP,&__pyx_n_s_dpdeResidualP_du,&__pyx_n_s_dpdeResidualP_dv,&__pyx_n_s_dpdeResidualP_dw,&__pyx_n_s_pdeResidualU,&__pyx_n_s_dpdeResidualU_dp,&__pyx_n_s_dpdeResidualU_du,&__pyx_n_s_dpdeResidualU_dv,&__pyx_n_s_dpdeResidualU_dw,&__pyx_n_s_pdeResidualV,&__pyx_n_s_dpdeResidualV_dp,&__pyx_n_s_dpdeResidualV_du,&__pyx_n_s_dpdeResidualV_dv,&__pyx_n_s_dpdeResidualV_dw,&__pyx_n_s_pdeResidualW,&__pyx_n_s_dpdeResidualW_dp,&__pyx_n_s_dpdeResidualW_du,&__pyx_n_s_dpdeResidualW_dv,&__pyx_n_s_dpdeResidualW_dw,&__pyx_n_s_subgridErrorP,&__pyx_n_s_dsubgridErrorP_du,&__pyx_n_s_dsubgridErrorP_dv,&__pyx_n_s_dsubgridErrorP_dw,&__pyx_n_s_subgridErrorU,&__pyx_n_s_dsubgridErrorU_dp,&__pyx_n_s_dsubgridErrorU_du,&__pyx_n_s_dsubgridErrorU_dv,&__pyx_n_s_dsubgridErrorU_dw,&__pyx_n_s_subgridErrorV,&__pyx_n_s_dsubgridErrorV_dp,&__pyx_n_s_dsubgridErrorV_du,&__pyx_n_s_dsubgridErrorV_dv,&__pyx_n_s_dsubgridErrorV_dw,&__pyx_n_s_subgridErrorW,&__pyx_n_s_dsubgridErrorW_dp,&__pyx_n_s_dsubgridErrorW_du,&__pyx_n_s_dsubgridErrorW_dv,&__pyx_n_s_dsubgridErrorW_dw,0};
8592 PyObject* values[40] = {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,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
8593 if (unlikely(__pyx_kwds)) {
8595 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
8597 case 40: values[39] = PyTuple_GET_ITEM(__pyx_args, 39);
8599 case 39: values[38] = PyTuple_GET_ITEM(__pyx_args, 38);
8601 case 38: values[37] = PyTuple_GET_ITEM(__pyx_args, 37);
8603 case 37: values[36] = PyTuple_GET_ITEM(__pyx_args, 36);
8605 case 36: values[35] = PyTuple_GET_ITEM(__pyx_args, 35);
8607 case 35: values[34] = PyTuple_GET_ITEM(__pyx_args, 34);
8609 case 34: values[33] = PyTuple_GET_ITEM(__pyx_args, 33);
8611 case 33: values[32] = PyTuple_GET_ITEM(__pyx_args, 32);
8613 case 32: values[31] = PyTuple_GET_ITEM(__pyx_args, 31);
8615 case 31: values[30] = PyTuple_GET_ITEM(__pyx_args, 30);
8617 case 30: values[29] = PyTuple_GET_ITEM(__pyx_args, 29);
8619 case 29: values[28] = PyTuple_GET_ITEM(__pyx_args, 28);
8621 case 28: values[27] = PyTuple_GET_ITEM(__pyx_args, 27);
8623 case 27: values[26] = PyTuple_GET_ITEM(__pyx_args, 26);
8625 case 26: values[25] = PyTuple_GET_ITEM(__pyx_args, 25);
8627 case 25: values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
8629 case 24: values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
8631 case 23: values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
8633 case 22: values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
8635 case 21: values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
8637 case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
8639 case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
8641 case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
8643 case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
8645 case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
8647 case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
8649 case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
8651 case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
8653 case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
8655 case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
8657 case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
8659 case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
8661 case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
8663 case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
8665 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
8667 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
8669 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
8671 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
8673 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
8675 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8678 default:
goto __pyx_L5_argtuple_error;
8680 kw_args = PyDict_Size(__pyx_kwds);
8683 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tau0)) != 0)) kw_args--;
8684 else goto __pyx_L5_argtuple_error;
8687 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tau1)) != 0)) kw_args--;
8689 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_tauRes", 1, 40, 40, 1); __PYX_ERR(0, 1490, __pyx_L3_error)
8693 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pdeResidualP)) != 0)) kw_args--;
8695 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_tauRes", 1, 40, 40, 2); __PYX_ERR(0, 1490, __pyx_L3_error)
8699 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualP_du)) != 0)) kw_args--;
8701 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_tauRes", 1, 40, 40, 3); __PYX_ERR(0, 1490, __pyx_L3_error)
8705 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualP_dv)) != 0)) kw_args--;
8707 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_tauRes", 1, 40, 40, 4); __PYX_ERR(0, 1490, __pyx_L3_error)
8711 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualP_dw)) != 0)) kw_args--;
8713 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_tauRes", 1, 40, 40, 5); __PYX_ERR(0, 1490, __pyx_L3_error)
8717 if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pdeResidualU)) != 0)) kw_args--;
8719 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_tauRes", 1, 40, 40, 6); __PYX_ERR(0, 1490, __pyx_L3_error)
8723 if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualU_dp)) != 0)) kw_args--;
8725 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_tauRes", 1, 40, 40, 7); __PYX_ERR(0, 1490, __pyx_L3_error)
8729 if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualU_du)) != 0)) kw_args--;
8731 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_tauRes", 1, 40, 40, 8); __PYX_ERR(0, 1490, __pyx_L3_error)
8735 if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualU_dv)) != 0)) kw_args--;
8737 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_tauRes", 1, 40, 40, 9); __PYX_ERR(0, 1490, __pyx_L3_error)
8741 if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualU_dw)) != 0)) kw_args--;
8743 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_tauRes", 1, 40, 40, 10); __PYX_ERR(0, 1490, __pyx_L3_error)
8747 if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pdeResidualV)) != 0)) kw_args--;
8749 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_tauRes", 1, 40, 40, 11); __PYX_ERR(0, 1490, __pyx_L3_error)
8753 if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualV_dp)) != 0)) kw_args--;
8755 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_tauRes", 1, 40, 40, 12); __PYX_ERR(0, 1490, __pyx_L3_error)
8759 if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualV_du)) != 0)) kw_args--;
8761 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_tauRes", 1, 40, 40, 13); __PYX_ERR(0, 1490, __pyx_L3_error)
8765 if (likely((values[14] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualV_dv)) != 0)) kw_args--;
8767 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_tauRes", 1, 40, 40, 14); __PYX_ERR(0, 1490, __pyx_L3_error)
8771 if (likely((values[15] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualV_dw)) != 0)) kw_args--;
8773 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_tauRes", 1, 40, 40, 15); __PYX_ERR(0, 1490, __pyx_L3_error)
8777 if (likely((values[16] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pdeResidualW)) != 0)) kw_args--;
8779 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_tauRes", 1, 40, 40, 16); __PYX_ERR(0, 1490, __pyx_L3_error)
8783 if (likely((values[17] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualW_dp)) != 0)) kw_args--;
8785 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_tauRes", 1, 40, 40, 17); __PYX_ERR(0, 1490, __pyx_L3_error)
8789 if (likely((values[18] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualW_du)) != 0)) kw_args--;
8791 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_tauRes", 1, 40, 40, 18); __PYX_ERR(0, 1490, __pyx_L3_error)
8795 if (likely((values[19] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualW_dv)) != 0)) kw_args--;
8797 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_tauRes", 1, 40, 40, 19); __PYX_ERR(0, 1490, __pyx_L3_error)
8801 if (likely((values[20] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualW_dw)) != 0)) kw_args--;
8803 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_tauRes", 1, 40, 40, 20); __PYX_ERR(0, 1490, __pyx_L3_error)
8807 if (likely((values[21] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subgridErrorP)) != 0)) kw_args--;
8809 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_tauRes", 1, 40, 40, 21); __PYX_ERR(0, 1490, __pyx_L3_error)
8813 if (likely((values[22] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorP_du)) != 0)) kw_args--;
8815 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_tauRes", 1, 40, 40, 22); __PYX_ERR(0, 1490, __pyx_L3_error)
8819 if (likely((values[23] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorP_dv)) != 0)) kw_args--;
8821 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_tauRes", 1, 40, 40, 23); __PYX_ERR(0, 1490, __pyx_L3_error)
8825 if (likely((values[24] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorP_dw)) != 0)) kw_args--;
8827 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_tauRes", 1, 40, 40, 24); __PYX_ERR(0, 1490, __pyx_L3_error)
8831 if (likely((values[25] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subgridErrorU)) != 0)) kw_args--;
8833 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_tauRes", 1, 40, 40, 25); __PYX_ERR(0, 1490, __pyx_L3_error)
8837 if (likely((values[26] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorU_dp)) != 0)) kw_args--;
8839 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_tauRes", 1, 40, 40, 26); __PYX_ERR(0, 1490, __pyx_L3_error)
8843 if (likely((values[27] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorU_du)) != 0)) kw_args--;
8845 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_tauRes", 1, 40, 40, 27); __PYX_ERR(0, 1490, __pyx_L3_error)
8849 if (likely((values[28] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorU_dv)) != 0)) kw_args--;
8851 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_tauRes", 1, 40, 40, 28); __PYX_ERR(0, 1490, __pyx_L3_error)
8855 if (likely((values[29] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorU_dw)) != 0)) kw_args--;
8857 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_tauRes", 1, 40, 40, 29); __PYX_ERR(0, 1490, __pyx_L3_error)
8861 if (likely((values[30] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subgridErrorV)) != 0)) kw_args--;
8863 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_tauRes", 1, 40, 40, 30); __PYX_ERR(0, 1490, __pyx_L3_error)
8867 if (likely((values[31] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorV_dp)) != 0)) kw_args--;
8869 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_tauRes", 1, 40, 40, 31); __PYX_ERR(0, 1490, __pyx_L3_error)
8873 if (likely((values[32] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorV_du)) != 0)) kw_args--;
8875 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_tauRes", 1, 40, 40, 32); __PYX_ERR(0, 1490, __pyx_L3_error)
8879 if (likely((values[33] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorV_dv)) != 0)) kw_args--;
8881 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_tauRes", 1, 40, 40, 33); __PYX_ERR(0, 1490, __pyx_L3_error)
8885 if (likely((values[34] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorV_dw)) != 0)) kw_args--;
8887 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_tauRes", 1, 40, 40, 34); __PYX_ERR(0, 1490, __pyx_L3_error)
8891 if (likely((values[35] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subgridErrorW)) != 0)) kw_args--;
8893 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_tauRes", 1, 40, 40, 35); __PYX_ERR(0, 1490, __pyx_L3_error)
8897 if (likely((values[36] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorW_dp)) != 0)) kw_args--;
8899 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_tauRes", 1, 40, 40, 36); __PYX_ERR(0, 1490, __pyx_L3_error)
8903 if (likely((values[37] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorW_du)) != 0)) kw_args--;
8905 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_tauRes", 1, 40, 40, 37); __PYX_ERR(0, 1490, __pyx_L3_error)
8909 if (likely((values[38] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorW_dv)) != 0)) kw_args--;
8911 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_tauRes", 1, 40, 40, 38); __PYX_ERR(0, 1490, __pyx_L3_error)
8915 if (likely((values[39] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorW_dw)) != 0)) kw_args--;
8917 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_tauRes", 1, 40, 40, 39); __PYX_ERR(0, 1490, __pyx_L3_error)
8920 if (unlikely(kw_args > 0)) {
8921 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"calculateSubgridErrorNavierStokes3D_GLS_tauRes") < 0)) __PYX_ERR(0, 1490, __pyx_L3_error)
8923 }
else if (PyTuple_GET_SIZE(__pyx_args) != 40) {
8924 goto __pyx_L5_argtuple_error;
8926 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8927 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
8928 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
8929 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
8930 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
8931 values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
8932 values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
8933 values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
8934 values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
8935 values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
8936 values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
8937 values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
8938 values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
8939 values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
8940 values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
8941 values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
8942 values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
8943 values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
8944 values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
8945 values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
8946 values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
8947 values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
8948 values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
8949 values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
8950 values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
8951 values[25] = PyTuple_GET_ITEM(__pyx_args, 25);
8952 values[26] = PyTuple_GET_ITEM(__pyx_args, 26);
8953 values[27] = PyTuple_GET_ITEM(__pyx_args, 27);
8954 values[28] = PyTuple_GET_ITEM(__pyx_args, 28);
8955 values[29] = PyTuple_GET_ITEM(__pyx_args, 29);
8956 values[30] = PyTuple_GET_ITEM(__pyx_args, 30);
8957 values[31] = PyTuple_GET_ITEM(__pyx_args, 31);
8958 values[32] = PyTuple_GET_ITEM(__pyx_args, 32);
8959 values[33] = PyTuple_GET_ITEM(__pyx_args, 33);
8960 values[34] = PyTuple_GET_ITEM(__pyx_args, 34);
8961 values[35] = PyTuple_GET_ITEM(__pyx_args, 35);
8962 values[36] = PyTuple_GET_ITEM(__pyx_args, 36);
8963 values[37] = PyTuple_GET_ITEM(__pyx_args, 37);
8964 values[38] = PyTuple_GET_ITEM(__pyx_args, 38);
8965 values[39] = PyTuple_GET_ITEM(__pyx_args, 39);
8967 __pyx_v_tau0 = ((PyArrayObject *)values[0]);
8968 __pyx_v_tau1 = ((PyArrayObject *)values[1]);
8969 __pyx_v_pdeResidualP = ((PyArrayObject *)values[2]);
8970 __pyx_v_dpdeResidualP_du = ((PyArrayObject *)values[3]);
8971 __pyx_v_dpdeResidualP_dv = ((PyArrayObject *)values[4]);
8972 __pyx_v_dpdeResidualP_dw = ((PyArrayObject *)values[5]);
8973 __pyx_v_pdeResidualU = ((PyArrayObject *)values[6]);
8974 __pyx_v_dpdeResidualU_dp = ((PyArrayObject *)values[7]);
8975 __pyx_v_dpdeResidualU_du = ((PyArrayObject *)values[8]);
8976 __pyx_v_dpdeResidualU_dv = ((PyArrayObject *)values[9]);
8977 __pyx_v_dpdeResidualU_dw = ((PyArrayObject *)values[10]);
8978 __pyx_v_pdeResidualV = ((PyArrayObject *)values[11]);
8979 __pyx_v_dpdeResidualV_dp = ((PyArrayObject *)values[12]);
8980 __pyx_v_dpdeResidualV_du = ((PyArrayObject *)values[13]);
8981 __pyx_v_dpdeResidualV_dv = ((PyArrayObject *)values[14]);
8982 __pyx_v_dpdeResidualV_dw = ((PyArrayObject *)values[15]);
8983 __pyx_v_pdeResidualW = ((PyArrayObject *)values[16]);
8984 __pyx_v_dpdeResidualW_dp = ((PyArrayObject *)values[17]);
8985 __pyx_v_dpdeResidualW_du = ((PyArrayObject *)values[18]);
8986 __pyx_v_dpdeResidualW_dv = ((PyArrayObject *)values[19]);
8987 __pyx_v_dpdeResidualW_dw = ((PyArrayObject *)values[20]);
8988 __pyx_v_subgridErrorP = ((PyArrayObject *)values[21]);
8989 __pyx_v_dsubgridErrorP_du = ((PyArrayObject *)values[22]);
8990 __pyx_v_dsubgridErrorP_dv = ((PyArrayObject *)values[23]);
8991 __pyx_v_dsubgridErrorP_dw = ((PyArrayObject *)values[24]);
8992 __pyx_v_subgridErrorU = ((PyArrayObject *)values[25]);
8993 __pyx_v_dsubgridErrorU_dp = ((PyArrayObject *)values[26]);
8994 __pyx_v_dsubgridErrorU_du = ((PyArrayObject *)values[27]);
8995 __pyx_v_dsubgridErrorU_dv = ((PyArrayObject *)values[28]);
8996 __pyx_v_dsubgridErrorU_dw = ((PyArrayObject *)values[29]);
8997 __pyx_v_subgridErrorV = ((PyArrayObject *)values[30]);
8998 __pyx_v_dsubgridErrorV_dp = ((PyArrayObject *)values[31]);
8999 __pyx_v_dsubgridErrorV_du = ((PyArrayObject *)values[32]);
9000 __pyx_v_dsubgridErrorV_dv = ((PyArrayObject *)values[33]);
9001 __pyx_v_dsubgridErrorV_dw = ((PyArrayObject *)values[34]);
9002 __pyx_v_subgridErrorW = ((PyArrayObject *)values[35]);
9003 __pyx_v_dsubgridErrorW_dp = ((PyArrayObject *)values[36]);
9004 __pyx_v_dsubgridErrorW_du = ((PyArrayObject *)values[37]);
9005 __pyx_v_dsubgridErrorW_dv = ((PyArrayObject *)values[38]);
9006 __pyx_v_dsubgridErrorW_dw = ((PyArrayObject *)values[39]);
9008 goto __pyx_L4_argument_unpacking_done;
9009 __pyx_L5_argtuple_error:;
9010 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_tauRes", 1, 40, 40, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1490, __pyx_L3_error)
9012 __Pyx_AddTraceback(
"csubgridError.calculateSubgridErrorNavierStokes3D_GLS_tauRes", __pyx_clineno, __pyx_lineno, __pyx_filename);
9013 __Pyx_RefNannyFinishContext();
9015 __pyx_L4_argument_unpacking_done:;
9016 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tau0), __pyx_ptype_5numpy_ndarray, 1,
"tau0", 0))) __PYX_ERR(0, 1490, __pyx_L1_error)
9017 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tau1), __pyx_ptype_5numpy_ndarray, 1,
"tau1", 0))) __PYX_ERR(0, 1491, __pyx_L1_error)
9018 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pdeResidualP), __pyx_ptype_5numpy_ndarray, 1,
"pdeResidualP", 0))) __PYX_ERR(0, 1492, __pyx_L1_error)
9019 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualP_du), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualP_du", 0))) __PYX_ERR(0, 1493, __pyx_L1_error)
9020 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualP_dv), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualP_dv", 0))) __PYX_ERR(0, 1494, __pyx_L1_error)
9021 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualP_dw), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualP_dw", 0))) __PYX_ERR(0, 1495, __pyx_L1_error)
9022 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pdeResidualU), __pyx_ptype_5numpy_ndarray, 1,
"pdeResidualU", 0))) __PYX_ERR(0, 1496, __pyx_L1_error)
9023 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualU_dp), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualU_dp", 0))) __PYX_ERR(0, 1497, __pyx_L1_error)
9024 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualU_du), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualU_du", 0))) __PYX_ERR(0, 1498, __pyx_L1_error)
9025 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualU_dv), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualU_dv", 0))) __PYX_ERR(0, 1499, __pyx_L1_error)
9026 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualU_dw), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualU_dw", 0))) __PYX_ERR(0, 1500, __pyx_L1_error)
9027 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pdeResidualV), __pyx_ptype_5numpy_ndarray, 1,
"pdeResidualV", 0))) __PYX_ERR(0, 1501, __pyx_L1_error)
9028 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualV_dp), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualV_dp", 0))) __PYX_ERR(0, 1502, __pyx_L1_error)
9029 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualV_du), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualV_du", 0))) __PYX_ERR(0, 1503, __pyx_L1_error)
9030 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualV_dv), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualV_dv", 0))) __PYX_ERR(0, 1504, __pyx_L1_error)
9031 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualV_dw), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualV_dw", 0))) __PYX_ERR(0, 1505, __pyx_L1_error)
9032 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pdeResidualW), __pyx_ptype_5numpy_ndarray, 1,
"pdeResidualW", 0))) __PYX_ERR(0, 1506, __pyx_L1_error)
9033 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualW_dp), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualW_dp", 0))) __PYX_ERR(0, 1507, __pyx_L1_error)
9034 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualW_du), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualW_du", 0))) __PYX_ERR(0, 1508, __pyx_L1_error)
9035 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualW_dv), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualW_dv", 0))) __PYX_ERR(0, 1509, __pyx_L1_error)
9036 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualW_dw), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualW_dw", 0))) __PYX_ERR(0, 1510, __pyx_L1_error)
9037 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_subgridErrorP), __pyx_ptype_5numpy_ndarray, 1,
"subgridErrorP", 0))) __PYX_ERR(0, 1511, __pyx_L1_error)
9038 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorP_du), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorP_du", 0))) __PYX_ERR(0, 1512, __pyx_L1_error)
9039 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorP_dv), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorP_dv", 0))) __PYX_ERR(0, 1513, __pyx_L1_error)
9040 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorP_dw), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorP_dw", 0))) __PYX_ERR(0, 1514, __pyx_L1_error)
9041 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_subgridErrorU), __pyx_ptype_5numpy_ndarray, 1,
"subgridErrorU", 0))) __PYX_ERR(0, 1515, __pyx_L1_error)
9042 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorU_dp), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorU_dp", 0))) __PYX_ERR(0, 1516, __pyx_L1_error)
9043 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorU_du), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorU_du", 0))) __PYX_ERR(0, 1517, __pyx_L1_error)
9044 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorU_dv), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorU_dv", 0))) __PYX_ERR(0, 1518, __pyx_L1_error)
9045 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorU_dw), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorU_dw", 0))) __PYX_ERR(0, 1519, __pyx_L1_error)
9046 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_subgridErrorV), __pyx_ptype_5numpy_ndarray, 1,
"subgridErrorV", 0))) __PYX_ERR(0, 1520, __pyx_L1_error)
9047 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorV_dp), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorV_dp", 0))) __PYX_ERR(0, 1521, __pyx_L1_error)
9048 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorV_du), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorV_du", 0))) __PYX_ERR(0, 1522, __pyx_L1_error)
9049 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorV_dv), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorV_dv", 0))) __PYX_ERR(0, 1523, __pyx_L1_error)
9050 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorV_dw), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorV_dw", 0))) __PYX_ERR(0, 1524, __pyx_L1_error)
9051 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_subgridErrorW), __pyx_ptype_5numpy_ndarray, 1,
"subgridErrorW", 0))) __PYX_ERR(0, 1525, __pyx_L1_error)
9052 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorW_dp), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorW_dp", 0))) __PYX_ERR(0, 1526, __pyx_L1_error)
9053 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorW_du), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorW_du", 0))) __PYX_ERR(0, 1527, __pyx_L1_error)
9054 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorW_dv), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorW_dv", 0))) __PYX_ERR(0, 1528, __pyx_L1_error)
9055 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorW_dw), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorW_dw", 0))) __PYX_ERR(0, 1529, __pyx_L1_error)
9056 __pyx_r = __pyx_pf_13csubgridError_52calculateSubgridErrorNavierStokes3D_GLS_tauRes(__pyx_self, __pyx_v_tau0, __pyx_v_tau1, __pyx_v_pdeResidualP, __pyx_v_dpdeResidualP_du, __pyx_v_dpdeResidualP_dv, __pyx_v_dpdeResidualP_dw, __pyx_v_pdeResidualU, __pyx_v_dpdeResidualU_dp, __pyx_v_dpdeResidualU_du, __pyx_v_dpdeResidualU_dv, __pyx_v_dpdeResidualU_dw, __pyx_v_pdeResidualV, __pyx_v_dpdeResidualV_dp, __pyx_v_dpdeResidualV_du, __pyx_v_dpdeResidualV_dv, __pyx_v_dpdeResidualV_dw, __pyx_v_pdeResidualW, __pyx_v_dpdeResidualW_dp, __pyx_v_dpdeResidualW_du, __pyx_v_dpdeResidualW_dv, __pyx_v_dpdeResidualW_dw, __pyx_v_subgridErrorP, __pyx_v_dsubgridErrorP_du, __pyx_v_dsubgridErrorP_dv, __pyx_v_dsubgridErrorP_dw, __pyx_v_subgridErrorU, __pyx_v_dsubgridErrorU_dp, __pyx_v_dsubgridErrorU_du, __pyx_v_dsubgridErrorU_dv, __pyx_v_dsubgridErrorU_dw, __pyx_v_subgridErrorV, __pyx_v_dsubgridErrorV_dp, __pyx_v_dsubgridErrorV_du, __pyx_v_dsubgridErrorV_dv, __pyx_v_dsubgridErrorV_dw, __pyx_v_subgridErrorW, __pyx_v_dsubgridErrorW_dp, __pyx_v_dsubgridErrorW_du, __pyx_v_dsubgridErrorW_dv, __pyx_v_dsubgridErrorW_dw);
9063 __Pyx_RefNannyFinishContext();
9067 static PyObject *__pyx_pf_13csubgridError_52calculateSubgridErrorNavierStokes3D_GLS_tauRes(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_tau0, PyArrayObject *__pyx_v_tau1, PyArrayObject *__pyx_v_pdeResidualP, PyArrayObject *__pyx_v_dpdeResidualP_du, PyArrayObject *__pyx_v_dpdeResidualP_dv, PyArrayObject *__pyx_v_dpdeResidualP_dw, PyArrayObject *__pyx_v_pdeResidualU, PyArrayObject *__pyx_v_dpdeResidualU_dp, PyArrayObject *__pyx_v_dpdeResidualU_du, PyArrayObject *__pyx_v_dpdeResidualU_dv, PyArrayObject *__pyx_v_dpdeResidualU_dw, PyArrayObject *__pyx_v_pdeResidualV, PyArrayObject *__pyx_v_dpdeResidualV_dp, PyArrayObject *__pyx_v_dpdeResidualV_du, PyArrayObject *__pyx_v_dpdeResidualV_dv, PyArrayObject *__pyx_v_dpdeResidualV_dw, PyArrayObject *__pyx_v_pdeResidualW, PyArrayObject *__pyx_v_dpdeResidualW_dp, PyArrayObject *__pyx_v_dpdeResidualW_du, PyArrayObject *__pyx_v_dpdeResidualW_dv, PyArrayObject *__pyx_v_dpdeResidualW_dw, PyArrayObject *__pyx_v_subgridErrorP, PyArrayObject *__pyx_v_dsubgridErrorP_du, PyArrayObject *__pyx_v_dsubgridErrorP_dv, PyArrayObject *__pyx_v_dsubgridErrorP_dw, PyArrayObject *__pyx_v_subgridErrorU, PyArrayObject *__pyx_v_dsubgridErrorU_dp, PyArrayObject *__pyx_v_dsubgridErrorU_du, PyArrayObject *__pyx_v_dsubgridErrorU_dv, PyArrayObject *__pyx_v_dsubgridErrorU_dw, PyArrayObject *__pyx_v_subgridErrorV, PyArrayObject *__pyx_v_dsubgridErrorV_dp, PyArrayObject *__pyx_v_dsubgridErrorV_du, PyArrayObject *__pyx_v_dsubgridErrorV_dv, PyArrayObject *__pyx_v_dsubgridErrorV_dw, PyArrayObject *__pyx_v_subgridErrorW, PyArrayObject *__pyx_v_dsubgridErrorW_dp, PyArrayObject *__pyx_v_dsubgridErrorW_du, PyArrayObject *__pyx_v_dsubgridErrorW_dv, PyArrayObject *__pyx_v_dsubgridErrorW_dw) {
9068 PyObject *__pyx_r = NULL;
9069 __Pyx_RefNannyDeclarations
9070 __Pyx_RefNannySetupContext(
"calculateSubgridErrorNavierStokes3D_GLS_tauRes", 0);
9079 calculateSubgridErrorNavierStokes3D_GLS_tauRes((__pyx_v_dsubgridErrorP_du->dimensions[0]), (__pyx_v_dsubgridErrorP_du->dimensions[1]), (__pyx_v_dsubgridErrorP_du->dimensions[2]), 3, ((
double *)__pyx_v_tau0->data), ((
double *)__pyx_v_tau1->data), ((
double *)__pyx_v_pdeResidualP->data), ((
double *)__pyx_v_dpdeResidualP_du->data), ((
double *)__pyx_v_dpdeResidualP_dv->data), ((
double *)__pyx_v_dpdeResidualP_dw->data), ((
double *)__pyx_v_pdeResidualU->data), ((
double *)__pyx_v_dpdeResidualU_dp->data), ((
double *)__pyx_v_dpdeResidualU_du->data), ((
double *)__pyx_v_dpdeResidualU_dv->data), ((
double *)__pyx_v_dpdeResidualU_dw->data), ((
double *)__pyx_v_pdeResidualV->data), ((
double *)__pyx_v_dpdeResidualV_dp->data), ((
double *)__pyx_v_dpdeResidualV_du->data), ((
double *)__pyx_v_dpdeResidualV_dv->data), ((
double *)__pyx_v_dpdeResidualV_dw->data), ((
double *)__pyx_v_pdeResidualW->data), ((
double *)__pyx_v_dpdeResidualW_dp->data), ((
double *)__pyx_v_dpdeResidualW_du->data), ((
double *)__pyx_v_dpdeResidualW_dv->data), ((
double *)__pyx_v_dpdeResidualW_dw->data), ((
double *)__pyx_v_subgridErrorP->data), ((
double *)__pyx_v_dsubgridErrorP_du->data), ((
double *)__pyx_v_dsubgridErrorP_dv->data), ((
double *)__pyx_v_dsubgridErrorP_dw->data), ((
double *)__pyx_v_subgridErrorU->data), ((
double *)__pyx_v_dsubgridErrorU_dp->data), ((
double *)__pyx_v_dsubgridErrorU_du->data), ((
double *)__pyx_v_dsubgridErrorU_dv->data), ((
double *)__pyx_v_dsubgridErrorU_dw->data), ((
double *)__pyx_v_subgridErrorV->data), ((
double *)__pyx_v_dsubgridErrorV_dp->data), ((
double *)__pyx_v_dsubgridErrorV_du->data), ((
double *)__pyx_v_dsubgridErrorV_dv->data), ((
double *)__pyx_v_dsubgridErrorV_dw->data), ((
double *)__pyx_v_subgridErrorW->data), ((
double *)__pyx_v_dsubgridErrorW_dp->data), ((
double *)__pyx_v_dsubgridErrorW_du->data), ((
double *)__pyx_v_dsubgridErrorW_dv->data), ((
double *)__pyx_v_dsubgridErrorW_dw->data));
9090 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9091 __Pyx_XGIVEREF(__pyx_r);
9092 __Pyx_RefNannyFinishContext();
9105 static PyObject *__pyx_pw_13csubgridError_55calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
9106 static PyMethodDef __pyx_mdef_13csubgridError_55calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure = {
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_13csubgridError_55calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure, METH_VARARGS|METH_KEYWORDS, 0};
9107 static PyObject *__pyx_pw_13csubgridError_55calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
9108 PyArrayObject *__pyx_v_elementDiameter = 0;
9109 PyArrayObject *__pyx_v_dm = 0;
9110 PyArrayObject *__pyx_v_f = 0;
9111 PyArrayObject *__pyx_v_a = 0;
9112 PyArrayObject *__pyx_v_pdeResidualP = 0;
9113 PyArrayObject *__pyx_v_dpdeResidualP_du = 0;
9114 PyArrayObject *__pyx_v_dpdeResidualP_dv = 0;
9115 PyArrayObject *__pyx_v_dpdeResidualP_dw = 0;
9116 PyArrayObject *__pyx_v_pdeResidualU = 0;
9117 PyArrayObject *__pyx_v_dpdeResidualU_dp = 0;
9118 PyArrayObject *__pyx_v_dpdeResidualU_du = 0;
9119 PyArrayObject *__pyx_v_pdeResidualV = 0;
9120 PyArrayObject *__pyx_v_dpdeResidualV_dp = 0;
9121 PyArrayObject *__pyx_v_dpdeResidualV_dv = 0;
9122 PyArrayObject *__pyx_v_pdeResidualW = 0;
9123 PyArrayObject *__pyx_v_dpdeResidualW_dp = 0;
9124 PyArrayObject *__pyx_v_dpdeResidualW_dw = 0;
9125 PyArrayObject *__pyx_v_subgridErrorP = 0;
9126 PyArrayObject *__pyx_v_dsubgridErrorP_du = 0;
9127 PyArrayObject *__pyx_v_dsubgridErrorP_dv = 0;
9128 PyArrayObject *__pyx_v_dsubgridErrorP_dw = 0;
9129 PyArrayObject *__pyx_v_subgridErrorU = 0;
9130 PyArrayObject *__pyx_v_dsubgridErrorU_dp = 0;
9131 PyArrayObject *__pyx_v_dsubgridErrorU_du = 0;
9132 PyArrayObject *__pyx_v_subgridErrorV = 0;
9133 PyArrayObject *__pyx_v_dsubgridErrorV_dp = 0;
9134 PyArrayObject *__pyx_v_dsubgridErrorV_dv = 0;
9135 PyArrayObject *__pyx_v_subgridErrorW = 0;
9136 PyArrayObject *__pyx_v_dsubgridErrorW_dp = 0;
9137 PyArrayObject *__pyx_v_dsubgridErrorW_dw = 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(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure (wrapper)", 0);
9145 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_elementDiameter,&__pyx_n_s_dm,&__pyx_n_s_f,&__pyx_n_s_a,&__pyx_n_s_pdeResidualP,&__pyx_n_s_dpdeResidualP_du,&__pyx_n_s_dpdeResidualP_dv,&__pyx_n_s_dpdeResidualP_dw,&__pyx_n_s_pdeResidualU,&__pyx_n_s_dpdeResidualU_dp,&__pyx_n_s_dpdeResidualU_du,&__pyx_n_s_pdeResidualV,&__pyx_n_s_dpdeResidualV_dp,&__pyx_n_s_dpdeResidualV_dv,&__pyx_n_s_pdeResidualW,&__pyx_n_s_dpdeResidualW_dp,&__pyx_n_s_dpdeResidualW_dw,&__pyx_n_s_subgridErrorP,&__pyx_n_s_dsubgridErrorP_du,&__pyx_n_s_dsubgridErrorP_dv,&__pyx_n_s_dsubgridErrorP_dw,&__pyx_n_s_subgridErrorU,&__pyx_n_s_dsubgridErrorU_dp,&__pyx_n_s_dsubgridErrorU_du,&__pyx_n_s_subgridErrorV,&__pyx_n_s_dsubgridErrorV_dp,&__pyx_n_s_dsubgridErrorV_dv,&__pyx_n_s_subgridErrorW,&__pyx_n_s_dsubgridErrorW_dp,&__pyx_n_s_dsubgridErrorW_dw,0};
9146 PyObject* values[30] = {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,0,0,0,0};
9147 if (unlikely(__pyx_kwds)) {
9149 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
9151 case 30: values[29] = PyTuple_GET_ITEM(__pyx_args, 29);
9153 case 29: values[28] = PyTuple_GET_ITEM(__pyx_args, 28);
9155 case 28: values[27] = PyTuple_GET_ITEM(__pyx_args, 27);
9157 case 27: values[26] = PyTuple_GET_ITEM(__pyx_args, 26);
9159 case 26: values[25] = PyTuple_GET_ITEM(__pyx_args, 25);
9161 case 25: values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
9163 case 24: values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
9165 case 23: values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
9167 case 22: values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
9169 case 21: values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
9171 case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
9173 case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
9175 case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
9177 case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
9179 case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
9181 case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
9183 case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
9185 case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
9187 case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
9189 case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
9191 case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
9193 case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
9195 case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
9197 case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
9199 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
9201 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
9203 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
9205 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
9207 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
9209 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9212 default:
goto __pyx_L5_argtuple_error;
9214 kw_args = PyDict_Size(__pyx_kwds);
9217 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementDiameter)) != 0)) kw_args--;
9218 else goto __pyx_L5_argtuple_error;
9221 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dm)) != 0)) kw_args--;
9223 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure", 1, 30, 30, 1); __PYX_ERR(0, 1574, __pyx_L3_error)
9227 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_f)) != 0)) kw_args--;
9229 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure", 1, 30, 30, 2); __PYX_ERR(0, 1574, __pyx_L3_error)
9233 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
9235 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure", 1, 30, 30, 3); __PYX_ERR(0, 1574, __pyx_L3_error)
9239 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pdeResidualP)) != 0)) kw_args--;
9241 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure", 1, 30, 30, 4); __PYX_ERR(0, 1574, __pyx_L3_error)
9245 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualP_du)) != 0)) kw_args--;
9247 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure", 1, 30, 30, 5); __PYX_ERR(0, 1574, __pyx_L3_error)
9251 if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualP_dv)) != 0)) kw_args--;
9253 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure", 1, 30, 30, 6); __PYX_ERR(0, 1574, __pyx_L3_error)
9257 if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualP_dw)) != 0)) kw_args--;
9259 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure", 1, 30, 30, 7); __PYX_ERR(0, 1574, __pyx_L3_error)
9263 if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pdeResidualU)) != 0)) kw_args--;
9265 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure", 1, 30, 30, 8); __PYX_ERR(0, 1574, __pyx_L3_error)
9269 if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualU_dp)) != 0)) kw_args--;
9271 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure", 1, 30, 30, 9); __PYX_ERR(0, 1574, __pyx_L3_error)
9275 if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualU_du)) != 0)) kw_args--;
9277 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure", 1, 30, 30, 10); __PYX_ERR(0, 1574, __pyx_L3_error)
9281 if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pdeResidualV)) != 0)) kw_args--;
9283 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure", 1, 30, 30, 11); __PYX_ERR(0, 1574, __pyx_L3_error)
9287 if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualV_dp)) != 0)) kw_args--;
9289 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure", 1, 30, 30, 12); __PYX_ERR(0, 1574, __pyx_L3_error)
9293 if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualV_dv)) != 0)) kw_args--;
9295 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure", 1, 30, 30, 13); __PYX_ERR(0, 1574, __pyx_L3_error)
9299 if (likely((values[14] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pdeResidualW)) != 0)) kw_args--;
9301 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure", 1, 30, 30, 14); __PYX_ERR(0, 1574, __pyx_L3_error)
9305 if (likely((values[15] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualW_dp)) != 0)) kw_args--;
9307 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure", 1, 30, 30, 15); __PYX_ERR(0, 1574, __pyx_L3_error)
9311 if (likely((values[16] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualW_dw)) != 0)) kw_args--;
9313 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure", 1, 30, 30, 16); __PYX_ERR(0, 1574, __pyx_L3_error)
9317 if (likely((values[17] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subgridErrorP)) != 0)) kw_args--;
9319 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure", 1, 30, 30, 17); __PYX_ERR(0, 1574, __pyx_L3_error)
9323 if (likely((values[18] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorP_du)) != 0)) kw_args--;
9325 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure", 1, 30, 30, 18); __PYX_ERR(0, 1574, __pyx_L3_error)
9329 if (likely((values[19] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorP_dv)) != 0)) kw_args--;
9331 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure", 1, 30, 30, 19); __PYX_ERR(0, 1574, __pyx_L3_error)
9335 if (likely((values[20] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorP_dw)) != 0)) kw_args--;
9337 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure", 1, 30, 30, 20); __PYX_ERR(0, 1574, __pyx_L3_error)
9341 if (likely((values[21] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subgridErrorU)) != 0)) kw_args--;
9343 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure", 1, 30, 30, 21); __PYX_ERR(0, 1574, __pyx_L3_error)
9347 if (likely((values[22] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorU_dp)) != 0)) kw_args--;
9349 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure", 1, 30, 30, 22); __PYX_ERR(0, 1574, __pyx_L3_error)
9353 if (likely((values[23] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorU_du)) != 0)) kw_args--;
9355 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure", 1, 30, 30, 23); __PYX_ERR(0, 1574, __pyx_L3_error)
9359 if (likely((values[24] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subgridErrorV)) != 0)) kw_args--;
9361 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure", 1, 30, 30, 24); __PYX_ERR(0, 1574, __pyx_L3_error)
9365 if (likely((values[25] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorV_dp)) != 0)) kw_args--;
9367 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure", 1, 30, 30, 25); __PYX_ERR(0, 1574, __pyx_L3_error)
9371 if (likely((values[26] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorV_dv)) != 0)) kw_args--;
9373 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure", 1, 30, 30, 26); __PYX_ERR(0, 1574, __pyx_L3_error)
9377 if (likely((values[27] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subgridErrorW)) != 0)) kw_args--;
9379 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure", 1, 30, 30, 27); __PYX_ERR(0, 1574, __pyx_L3_error)
9383 if (likely((values[28] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorW_dp)) != 0)) kw_args--;
9385 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure", 1, 30, 30, 28); __PYX_ERR(0, 1574, __pyx_L3_error)
9389 if (likely((values[29] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorW_dw)) != 0)) kw_args--;
9391 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure", 1, 30, 30, 29); __PYX_ERR(0, 1574, __pyx_L3_error)
9394 if (unlikely(kw_args > 0)) {
9395 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure") < 0)) __PYX_ERR(0, 1574, __pyx_L3_error)
9397 }
else if (PyTuple_GET_SIZE(__pyx_args) != 30) {
9398 goto __pyx_L5_argtuple_error;
9400 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9401 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
9402 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
9403 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
9404 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
9405 values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
9406 values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
9407 values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
9408 values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
9409 values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
9410 values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
9411 values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
9412 values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
9413 values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
9414 values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
9415 values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
9416 values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
9417 values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
9418 values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
9419 values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
9420 values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
9421 values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
9422 values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
9423 values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
9424 values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
9425 values[25] = PyTuple_GET_ITEM(__pyx_args, 25);
9426 values[26] = PyTuple_GET_ITEM(__pyx_args, 26);
9427 values[27] = PyTuple_GET_ITEM(__pyx_args, 27);
9428 values[28] = PyTuple_GET_ITEM(__pyx_args, 28);
9429 values[29] = PyTuple_GET_ITEM(__pyx_args, 29);
9431 __pyx_v_elementDiameter = ((PyArrayObject *)values[0]);
9432 __pyx_v_dm = ((PyArrayObject *)values[1]);
9433 __pyx_v_f = ((PyArrayObject *)values[2]);
9434 __pyx_v_a = ((PyArrayObject *)values[3]);
9435 __pyx_v_pdeResidualP = ((PyArrayObject *)values[4]);
9436 __pyx_v_dpdeResidualP_du = ((PyArrayObject *)values[5]);
9437 __pyx_v_dpdeResidualP_dv = ((PyArrayObject *)values[6]);
9438 __pyx_v_dpdeResidualP_dw = ((PyArrayObject *)values[7]);
9439 __pyx_v_pdeResidualU = ((PyArrayObject *)values[8]);
9440 __pyx_v_dpdeResidualU_dp = ((PyArrayObject *)values[9]);
9441 __pyx_v_dpdeResidualU_du = ((PyArrayObject *)values[10]);
9442 __pyx_v_pdeResidualV = ((PyArrayObject *)values[11]);
9443 __pyx_v_dpdeResidualV_dp = ((PyArrayObject *)values[12]);
9444 __pyx_v_dpdeResidualV_dv = ((PyArrayObject *)values[13]);
9445 __pyx_v_pdeResidualW = ((PyArrayObject *)values[14]);
9446 __pyx_v_dpdeResidualW_dp = ((PyArrayObject *)values[15]);
9447 __pyx_v_dpdeResidualW_dw = ((PyArrayObject *)values[16]);
9448 __pyx_v_subgridErrorP = ((PyArrayObject *)values[17]);
9449 __pyx_v_dsubgridErrorP_du = ((PyArrayObject *)values[18]);
9450 __pyx_v_dsubgridErrorP_dv = ((PyArrayObject *)values[19]);
9451 __pyx_v_dsubgridErrorP_dw = ((PyArrayObject *)values[20]);
9452 __pyx_v_subgridErrorU = ((PyArrayObject *)values[21]);
9453 __pyx_v_dsubgridErrorU_dp = ((PyArrayObject *)values[22]);
9454 __pyx_v_dsubgridErrorU_du = ((PyArrayObject *)values[23]);
9455 __pyx_v_subgridErrorV = ((PyArrayObject *)values[24]);
9456 __pyx_v_dsubgridErrorV_dp = ((PyArrayObject *)values[25]);
9457 __pyx_v_dsubgridErrorV_dv = ((PyArrayObject *)values[26]);
9458 __pyx_v_subgridErrorW = ((PyArrayObject *)values[27]);
9459 __pyx_v_dsubgridErrorW_dp = ((PyArrayObject *)values[28]);
9460 __pyx_v_dsubgridErrorW_dw = ((PyArrayObject *)values[29]);
9462 goto __pyx_L4_argument_unpacking_done;
9463 __pyx_L5_argtuple_error:;
9464 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure", 1, 30, 30, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1574, __pyx_L3_error)
9466 __Pyx_AddTraceback(
"csubgridError.calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure", __pyx_clineno, __pyx_lineno, __pyx_filename);
9467 __Pyx_RefNannyFinishContext();
9469 __pyx_L4_argument_unpacking_done:;
9470 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementDiameter), __pyx_ptype_5numpy_ndarray, 1,
"elementDiameter", 0))) __PYX_ERR(0, 1574, __pyx_L1_error)
9471 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dm), __pyx_ptype_5numpy_ndarray, 1,
"dm", 0))) __PYX_ERR(0, 1575, __pyx_L1_error)
9472 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_f), __pyx_ptype_5numpy_ndarray, 1,
"f", 0))) __PYX_ERR(0, 1576, __pyx_L1_error)
9473 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1,
"a", 0))) __PYX_ERR(0, 1577, __pyx_L1_error)
9474 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pdeResidualP), __pyx_ptype_5numpy_ndarray, 1,
"pdeResidualP", 0))) __PYX_ERR(0, 1578, __pyx_L1_error)
9475 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualP_du), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualP_du", 0))) __PYX_ERR(0, 1579, __pyx_L1_error)
9476 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualP_dv), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualP_dv", 0))) __PYX_ERR(0, 1580, __pyx_L1_error)
9477 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualP_dw), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualP_dw", 0))) __PYX_ERR(0, 1581, __pyx_L1_error)
9478 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pdeResidualU), __pyx_ptype_5numpy_ndarray, 1,
"pdeResidualU", 0))) __PYX_ERR(0, 1582, __pyx_L1_error)
9479 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualU_dp), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualU_dp", 0))) __PYX_ERR(0, 1583, __pyx_L1_error)
9480 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualU_du), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualU_du", 0))) __PYX_ERR(0, 1584, __pyx_L1_error)
9481 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pdeResidualV), __pyx_ptype_5numpy_ndarray, 1,
"pdeResidualV", 0))) __PYX_ERR(0, 1585, __pyx_L1_error)
9482 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualV_dp), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualV_dp", 0))) __PYX_ERR(0, 1586, __pyx_L1_error)
9483 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualV_dv), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualV_dv", 0))) __PYX_ERR(0, 1587, __pyx_L1_error)
9484 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pdeResidualW), __pyx_ptype_5numpy_ndarray, 1,
"pdeResidualW", 0))) __PYX_ERR(0, 1588, __pyx_L1_error)
9485 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualW_dp), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualW_dp", 0))) __PYX_ERR(0, 1589, __pyx_L1_error)
9486 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualW_dw), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualW_dw", 0))) __PYX_ERR(0, 1590, __pyx_L1_error)
9487 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_subgridErrorP), __pyx_ptype_5numpy_ndarray, 1,
"subgridErrorP", 0))) __PYX_ERR(0, 1591, __pyx_L1_error)
9488 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorP_du), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorP_du", 0))) __PYX_ERR(0, 1592, __pyx_L1_error)
9489 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorP_dv), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorP_dv", 0))) __PYX_ERR(0, 1593, __pyx_L1_error)
9490 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorP_dw), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorP_dw", 0))) __PYX_ERR(0, 1594, __pyx_L1_error)
9491 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_subgridErrorU), __pyx_ptype_5numpy_ndarray, 1,
"subgridErrorU", 0))) __PYX_ERR(0, 1595, __pyx_L1_error)
9492 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorU_dp), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorU_dp", 0))) __PYX_ERR(0, 1596, __pyx_L1_error)
9493 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorU_du), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorU_du", 0))) __PYX_ERR(0, 1597, __pyx_L1_error)
9494 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_subgridErrorV), __pyx_ptype_5numpy_ndarray, 1,
"subgridErrorV", 0))) __PYX_ERR(0, 1598, __pyx_L1_error)
9495 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorV_dp), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorV_dp", 0))) __PYX_ERR(0, 1599, __pyx_L1_error)
9496 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorV_dv), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorV_dv", 0))) __PYX_ERR(0, 1600, __pyx_L1_error)
9497 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_subgridErrorW), __pyx_ptype_5numpy_ndarray, 1,
"subgridErrorW", 0))) __PYX_ERR(0, 1601, __pyx_L1_error)
9498 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorW_dp), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorW_dp", 0))) __PYX_ERR(0, 1602, __pyx_L1_error)
9499 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorW_dw), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorW_dw", 0))) __PYX_ERR(0, 1603, __pyx_L1_error)
9500 __pyx_r = __pyx_pf_13csubgridError_54calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure(__pyx_self, __pyx_v_elementDiameter, __pyx_v_dm, __pyx_v_f, __pyx_v_a, __pyx_v_pdeResidualP, __pyx_v_dpdeResidualP_du, __pyx_v_dpdeResidualP_dv, __pyx_v_dpdeResidualP_dw, __pyx_v_pdeResidualU, __pyx_v_dpdeResidualU_dp, __pyx_v_dpdeResidualU_du, __pyx_v_pdeResidualV, __pyx_v_dpdeResidualV_dp, __pyx_v_dpdeResidualV_dv, __pyx_v_pdeResidualW, __pyx_v_dpdeResidualW_dp, __pyx_v_dpdeResidualW_dw, __pyx_v_subgridErrorP, __pyx_v_dsubgridErrorP_du, __pyx_v_dsubgridErrorP_dv, __pyx_v_dsubgridErrorP_dw, __pyx_v_subgridErrorU, __pyx_v_dsubgridErrorU_dp, __pyx_v_dsubgridErrorU_du, __pyx_v_subgridErrorV, __pyx_v_dsubgridErrorV_dp, __pyx_v_dsubgridErrorV_dv, __pyx_v_subgridErrorW, __pyx_v_dsubgridErrorW_dp, __pyx_v_dsubgridErrorW_dw);
9507 __Pyx_RefNannyFinishContext();
9511 static PyObject *__pyx_pf_13csubgridError_54calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_dm, PyArrayObject *__pyx_v_f, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_pdeResidualP, PyArrayObject *__pyx_v_dpdeResidualP_du, PyArrayObject *__pyx_v_dpdeResidualP_dv, PyArrayObject *__pyx_v_dpdeResidualP_dw, PyArrayObject *__pyx_v_pdeResidualU, PyArrayObject *__pyx_v_dpdeResidualU_dp, PyArrayObject *__pyx_v_dpdeResidualU_du, PyArrayObject *__pyx_v_pdeResidualV, PyArrayObject *__pyx_v_dpdeResidualV_dp, PyArrayObject *__pyx_v_dpdeResidualV_dv, PyArrayObject *__pyx_v_pdeResidualW, PyArrayObject *__pyx_v_dpdeResidualW_dp, PyArrayObject *__pyx_v_dpdeResidualW_dw, PyArrayObject *__pyx_v_subgridErrorP, PyArrayObject *__pyx_v_dsubgridErrorP_du, PyArrayObject *__pyx_v_dsubgridErrorP_dv, PyArrayObject *__pyx_v_dsubgridErrorP_dw, PyArrayObject *__pyx_v_subgridErrorU, PyArrayObject *__pyx_v_dsubgridErrorU_dp, PyArrayObject *__pyx_v_dsubgridErrorU_du, PyArrayObject *__pyx_v_subgridErrorV, PyArrayObject *__pyx_v_dsubgridErrorV_dp, PyArrayObject *__pyx_v_dsubgridErrorV_dv, PyArrayObject *__pyx_v_subgridErrorW, PyArrayObject *__pyx_v_dsubgridErrorW_dp, PyArrayObject *__pyx_v_dsubgridErrorW_dw) {
9512 PyObject *__pyx_r = NULL;
9513 __Pyx_RefNannyDeclarations
9514 __Pyx_RefNannySetupContext(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure", 0);
9523 calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure((__pyx_v_dsubgridErrorP_du->dimensions[0]), (__pyx_v_dsubgridErrorP_du->dimensions[1]), (__pyx_v_dsubgridErrorP_du->dimensions[2]), 3, ((
double *)__pyx_v_elementDiameter->data), ((
double *)__pyx_v_dm->data), ((
double *)__pyx_v_f->data), ((
double *)__pyx_v_a->data), ((
double *)__pyx_v_pdeResidualP->data), ((
double *)__pyx_v_dpdeResidualP_du->data), ((
double *)__pyx_v_dpdeResidualP_dv->data), ((
double *)__pyx_v_dpdeResidualP_dw->data), ((
double *)__pyx_v_pdeResidualU->data), ((
double *)__pyx_v_dpdeResidualU_dp->data), ((
double *)__pyx_v_dpdeResidualU_du->data), ((
double *)__pyx_v_pdeResidualV->data), ((
double *)__pyx_v_dpdeResidualV_dp->data), ((
double *)__pyx_v_dpdeResidualV_dv->data), ((
double *)__pyx_v_pdeResidualW->data), ((
double *)__pyx_v_dpdeResidualW_dp->data), ((
double *)__pyx_v_dpdeResidualW_dw->data), ((
double *)__pyx_v_subgridErrorP->data), ((
double *)__pyx_v_dsubgridErrorP_du->data), ((
double *)__pyx_v_dsubgridErrorP_dv->data), ((
double *)__pyx_v_dsubgridErrorP_dw->data), ((
double *)__pyx_v_subgridErrorU->data), ((
double *)__pyx_v_dsubgridErrorU_dp->data), ((
double *)__pyx_v_dsubgridErrorU_du->data), ((
double *)__pyx_v_subgridErrorV->data), ((
double *)__pyx_v_dsubgridErrorV_dp->data), ((
double *)__pyx_v_dsubgridErrorV_dv->data), ((
double *)__pyx_v_subgridErrorW->data), ((
double *)__pyx_v_dsubgridErrorW_dp->data), ((
double *)__pyx_v_dsubgridErrorW_dw->data));
9534 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9535 __Pyx_XGIVEREF(__pyx_r);
9536 __Pyx_RefNannyFinishContext();
9549 static PyObject *__pyx_pw_13csubgridError_57calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
9550 static PyMethodDef __pyx_mdef_13csubgridError_57calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure_sd = {
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure_sd", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_13csubgridError_57calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure_sd, METH_VARARGS|METH_KEYWORDS, 0};
9551 static PyObject *__pyx_pw_13csubgridError_57calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
9552 PyArrayObject *__pyx_v_elementDiameter = 0;
9553 PyArrayObject *__pyx_v_dm = 0;
9554 PyArrayObject *__pyx_v_f = 0;
9555 PyArrayObject *__pyx_v_a = 0;
9556 PyArrayObject *__pyx_v_pdeResidualP = 0;
9557 PyArrayObject *__pyx_v_dpdeResidualP_du = 0;
9558 PyArrayObject *__pyx_v_dpdeResidualP_dv = 0;
9559 PyArrayObject *__pyx_v_dpdeResidualP_dw = 0;
9560 PyArrayObject *__pyx_v_pdeResidualU = 0;
9561 PyArrayObject *__pyx_v_dpdeResidualU_dp = 0;
9562 PyArrayObject *__pyx_v_dpdeResidualU_du = 0;
9563 PyArrayObject *__pyx_v_pdeResidualV = 0;
9564 PyArrayObject *__pyx_v_dpdeResidualV_dp = 0;
9565 PyArrayObject *__pyx_v_dpdeResidualV_dv = 0;
9566 PyArrayObject *__pyx_v_pdeResidualW = 0;
9567 PyArrayObject *__pyx_v_dpdeResidualW_dp = 0;
9568 PyArrayObject *__pyx_v_dpdeResidualW_dw = 0;
9569 PyArrayObject *__pyx_v_subgridErrorP = 0;
9570 PyArrayObject *__pyx_v_dsubgridErrorP_du = 0;
9571 PyArrayObject *__pyx_v_dsubgridErrorP_dv = 0;
9572 PyArrayObject *__pyx_v_dsubgridErrorP_dw = 0;
9573 PyArrayObject *__pyx_v_subgridErrorU = 0;
9574 PyArrayObject *__pyx_v_dsubgridErrorU_dp = 0;
9575 PyArrayObject *__pyx_v_dsubgridErrorU_du = 0;
9576 PyArrayObject *__pyx_v_subgridErrorV = 0;
9577 PyArrayObject *__pyx_v_dsubgridErrorV_dp = 0;
9578 PyArrayObject *__pyx_v_dsubgridErrorV_dv = 0;
9579 PyArrayObject *__pyx_v_subgridErrorW = 0;
9580 PyArrayObject *__pyx_v_dsubgridErrorW_dp = 0;
9581 PyArrayObject *__pyx_v_dsubgridErrorW_dw = 0;
9582 int __pyx_lineno = 0;
9583 const char *__pyx_filename = NULL;
9584 int __pyx_clineno = 0;
9585 PyObject *__pyx_r = 0;
9586 __Pyx_RefNannyDeclarations
9587 __Pyx_RefNannySetupContext(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure_sd (wrapper)", 0);
9589 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_elementDiameter,&__pyx_n_s_dm,&__pyx_n_s_f,&__pyx_n_s_a,&__pyx_n_s_pdeResidualP,&__pyx_n_s_dpdeResidualP_du,&__pyx_n_s_dpdeResidualP_dv,&__pyx_n_s_dpdeResidualP_dw,&__pyx_n_s_pdeResidualU,&__pyx_n_s_dpdeResidualU_dp,&__pyx_n_s_dpdeResidualU_du,&__pyx_n_s_pdeResidualV,&__pyx_n_s_dpdeResidualV_dp,&__pyx_n_s_dpdeResidualV_dv,&__pyx_n_s_pdeResidualW,&__pyx_n_s_dpdeResidualW_dp,&__pyx_n_s_dpdeResidualW_dw,&__pyx_n_s_subgridErrorP,&__pyx_n_s_dsubgridErrorP_du,&__pyx_n_s_dsubgridErrorP_dv,&__pyx_n_s_dsubgridErrorP_dw,&__pyx_n_s_subgridErrorU,&__pyx_n_s_dsubgridErrorU_dp,&__pyx_n_s_dsubgridErrorU_du,&__pyx_n_s_subgridErrorV,&__pyx_n_s_dsubgridErrorV_dp,&__pyx_n_s_dsubgridErrorV_dv,&__pyx_n_s_subgridErrorW,&__pyx_n_s_dsubgridErrorW_dp,&__pyx_n_s_dsubgridErrorW_dw,0};
9590 PyObject* values[30] = {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,0,0,0,0};
9591 if (unlikely(__pyx_kwds)) {
9593 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
9595 case 30: values[29] = PyTuple_GET_ITEM(__pyx_args, 29);
9597 case 29: values[28] = PyTuple_GET_ITEM(__pyx_args, 28);
9599 case 28: values[27] = PyTuple_GET_ITEM(__pyx_args, 27);
9601 case 27: values[26] = PyTuple_GET_ITEM(__pyx_args, 26);
9603 case 26: values[25] = PyTuple_GET_ITEM(__pyx_args, 25);
9605 case 25: values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
9607 case 24: values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
9609 case 23: values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
9611 case 22: values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
9613 case 21: values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
9615 case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
9617 case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
9619 case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
9621 case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
9623 case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
9625 case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
9627 case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
9629 case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
9631 case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
9633 case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
9635 case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
9637 case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
9639 case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
9641 case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
9643 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
9645 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
9647 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
9649 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
9651 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
9653 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9656 default:
goto __pyx_L5_argtuple_error;
9658 kw_args = PyDict_Size(__pyx_kwds);
9661 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementDiameter)) != 0)) kw_args--;
9662 else goto __pyx_L5_argtuple_error;
9665 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dm)) != 0)) kw_args--;
9667 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure_sd", 1, 30, 30, 1); __PYX_ERR(0, 1638, __pyx_L3_error)
9671 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_f)) != 0)) kw_args--;
9673 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure_sd", 1, 30, 30, 2); __PYX_ERR(0, 1638, __pyx_L3_error)
9677 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
9679 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure_sd", 1, 30, 30, 3); __PYX_ERR(0, 1638, __pyx_L3_error)
9683 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pdeResidualP)) != 0)) kw_args--;
9685 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure_sd", 1, 30, 30, 4); __PYX_ERR(0, 1638, __pyx_L3_error)
9689 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualP_du)) != 0)) kw_args--;
9691 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure_sd", 1, 30, 30, 5); __PYX_ERR(0, 1638, __pyx_L3_error)
9695 if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualP_dv)) != 0)) kw_args--;
9697 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure_sd", 1, 30, 30, 6); __PYX_ERR(0, 1638, __pyx_L3_error)
9701 if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualP_dw)) != 0)) kw_args--;
9703 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure_sd", 1, 30, 30, 7); __PYX_ERR(0, 1638, __pyx_L3_error)
9707 if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pdeResidualU)) != 0)) kw_args--;
9709 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure_sd", 1, 30, 30, 8); __PYX_ERR(0, 1638, __pyx_L3_error)
9713 if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualU_dp)) != 0)) kw_args--;
9715 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure_sd", 1, 30, 30, 9); __PYX_ERR(0, 1638, __pyx_L3_error)
9719 if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualU_du)) != 0)) kw_args--;
9721 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure_sd", 1, 30, 30, 10); __PYX_ERR(0, 1638, __pyx_L3_error)
9725 if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pdeResidualV)) != 0)) kw_args--;
9727 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure_sd", 1, 30, 30, 11); __PYX_ERR(0, 1638, __pyx_L3_error)
9731 if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualV_dp)) != 0)) kw_args--;
9733 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure_sd", 1, 30, 30, 12); __PYX_ERR(0, 1638, __pyx_L3_error)
9737 if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualV_dv)) != 0)) kw_args--;
9739 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure_sd", 1, 30, 30, 13); __PYX_ERR(0, 1638, __pyx_L3_error)
9743 if (likely((values[14] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pdeResidualW)) != 0)) kw_args--;
9745 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure_sd", 1, 30, 30, 14); __PYX_ERR(0, 1638, __pyx_L3_error)
9749 if (likely((values[15] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualW_dp)) != 0)) kw_args--;
9751 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure_sd", 1, 30, 30, 15); __PYX_ERR(0, 1638, __pyx_L3_error)
9755 if (likely((values[16] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualW_dw)) != 0)) kw_args--;
9757 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure_sd", 1, 30, 30, 16); __PYX_ERR(0, 1638, __pyx_L3_error)
9761 if (likely((values[17] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subgridErrorP)) != 0)) kw_args--;
9763 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure_sd", 1, 30, 30, 17); __PYX_ERR(0, 1638, __pyx_L3_error)
9767 if (likely((values[18] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorP_du)) != 0)) kw_args--;
9769 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure_sd", 1, 30, 30, 18); __PYX_ERR(0, 1638, __pyx_L3_error)
9773 if (likely((values[19] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorP_dv)) != 0)) kw_args--;
9775 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure_sd", 1, 30, 30, 19); __PYX_ERR(0, 1638, __pyx_L3_error)
9779 if (likely((values[20] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorP_dw)) != 0)) kw_args--;
9781 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure_sd", 1, 30, 30, 20); __PYX_ERR(0, 1638, __pyx_L3_error)
9785 if (likely((values[21] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subgridErrorU)) != 0)) kw_args--;
9787 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure_sd", 1, 30, 30, 21); __PYX_ERR(0, 1638, __pyx_L3_error)
9791 if (likely((values[22] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorU_dp)) != 0)) kw_args--;
9793 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure_sd", 1, 30, 30, 22); __PYX_ERR(0, 1638, __pyx_L3_error)
9797 if (likely((values[23] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorU_du)) != 0)) kw_args--;
9799 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure_sd", 1, 30, 30, 23); __PYX_ERR(0, 1638, __pyx_L3_error)
9803 if (likely((values[24] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subgridErrorV)) != 0)) kw_args--;
9805 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure_sd", 1, 30, 30, 24); __PYX_ERR(0, 1638, __pyx_L3_error)
9809 if (likely((values[25] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorV_dp)) != 0)) kw_args--;
9811 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure_sd", 1, 30, 30, 25); __PYX_ERR(0, 1638, __pyx_L3_error)
9815 if (likely((values[26] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorV_dv)) != 0)) kw_args--;
9817 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure_sd", 1, 30, 30, 26); __PYX_ERR(0, 1638, __pyx_L3_error)
9821 if (likely((values[27] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subgridErrorW)) != 0)) kw_args--;
9823 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure_sd", 1, 30, 30, 27); __PYX_ERR(0, 1638, __pyx_L3_error)
9827 if (likely((values[28] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorW_dp)) != 0)) kw_args--;
9829 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure_sd", 1, 30, 30, 28); __PYX_ERR(0, 1638, __pyx_L3_error)
9833 if (likely((values[29] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorW_dw)) != 0)) kw_args--;
9835 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure_sd", 1, 30, 30, 29); __PYX_ERR(0, 1638, __pyx_L3_error)
9838 if (unlikely(kw_args > 0)) {
9839 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure_sd") < 0)) __PYX_ERR(0, 1638, __pyx_L3_error)
9841 }
else if (PyTuple_GET_SIZE(__pyx_args) != 30) {
9842 goto __pyx_L5_argtuple_error;
9844 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9845 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
9846 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
9847 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
9848 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
9849 values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
9850 values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
9851 values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
9852 values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
9853 values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
9854 values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
9855 values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
9856 values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
9857 values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
9858 values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
9859 values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
9860 values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
9861 values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
9862 values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
9863 values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
9864 values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
9865 values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
9866 values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
9867 values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
9868 values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
9869 values[25] = PyTuple_GET_ITEM(__pyx_args, 25);
9870 values[26] = PyTuple_GET_ITEM(__pyx_args, 26);
9871 values[27] = PyTuple_GET_ITEM(__pyx_args, 27);
9872 values[28] = PyTuple_GET_ITEM(__pyx_args, 28);
9873 values[29] = PyTuple_GET_ITEM(__pyx_args, 29);
9875 __pyx_v_elementDiameter = ((PyArrayObject *)values[0]);
9876 __pyx_v_dm = ((PyArrayObject *)values[1]);
9877 __pyx_v_f = ((PyArrayObject *)values[2]);
9878 __pyx_v_a = ((PyArrayObject *)values[3]);
9879 __pyx_v_pdeResidualP = ((PyArrayObject *)values[4]);
9880 __pyx_v_dpdeResidualP_du = ((PyArrayObject *)values[5]);
9881 __pyx_v_dpdeResidualP_dv = ((PyArrayObject *)values[6]);
9882 __pyx_v_dpdeResidualP_dw = ((PyArrayObject *)values[7]);
9883 __pyx_v_pdeResidualU = ((PyArrayObject *)values[8]);
9884 __pyx_v_dpdeResidualU_dp = ((PyArrayObject *)values[9]);
9885 __pyx_v_dpdeResidualU_du = ((PyArrayObject *)values[10]);
9886 __pyx_v_pdeResidualV = ((PyArrayObject *)values[11]);
9887 __pyx_v_dpdeResidualV_dp = ((PyArrayObject *)values[12]);
9888 __pyx_v_dpdeResidualV_dv = ((PyArrayObject *)values[13]);
9889 __pyx_v_pdeResidualW = ((PyArrayObject *)values[14]);
9890 __pyx_v_dpdeResidualW_dp = ((PyArrayObject *)values[15]);
9891 __pyx_v_dpdeResidualW_dw = ((PyArrayObject *)values[16]);
9892 __pyx_v_subgridErrorP = ((PyArrayObject *)values[17]);
9893 __pyx_v_dsubgridErrorP_du = ((PyArrayObject *)values[18]);
9894 __pyx_v_dsubgridErrorP_dv = ((PyArrayObject *)values[19]);
9895 __pyx_v_dsubgridErrorP_dw = ((PyArrayObject *)values[20]);
9896 __pyx_v_subgridErrorU = ((PyArrayObject *)values[21]);
9897 __pyx_v_dsubgridErrorU_dp = ((PyArrayObject *)values[22]);
9898 __pyx_v_dsubgridErrorU_du = ((PyArrayObject *)values[23]);
9899 __pyx_v_subgridErrorV = ((PyArrayObject *)values[24]);
9900 __pyx_v_dsubgridErrorV_dp = ((PyArrayObject *)values[25]);
9901 __pyx_v_dsubgridErrorV_dv = ((PyArrayObject *)values[26]);
9902 __pyx_v_subgridErrorW = ((PyArrayObject *)values[27]);
9903 __pyx_v_dsubgridErrorW_dp = ((PyArrayObject *)values[28]);
9904 __pyx_v_dsubgridErrorW_dw = ((PyArrayObject *)values[29]);
9906 goto __pyx_L4_argument_unpacking_done;
9907 __pyx_L5_argtuple_error:;
9908 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure_sd", 1, 30, 30, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1638, __pyx_L3_error)
9910 __Pyx_AddTraceback(
"csubgridError.calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure_sd", __pyx_clineno, __pyx_lineno, __pyx_filename);
9911 __Pyx_RefNannyFinishContext();
9913 __pyx_L4_argument_unpacking_done:;
9914 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementDiameter), __pyx_ptype_5numpy_ndarray, 1,
"elementDiameter", 0))) __PYX_ERR(0, 1638, __pyx_L1_error)
9915 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dm), __pyx_ptype_5numpy_ndarray, 1,
"dm", 0))) __PYX_ERR(0, 1639, __pyx_L1_error)
9916 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_f), __pyx_ptype_5numpy_ndarray, 1,
"f", 0))) __PYX_ERR(0, 1640, __pyx_L1_error)
9917 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1,
"a", 0))) __PYX_ERR(0, 1641, __pyx_L1_error)
9918 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pdeResidualP), __pyx_ptype_5numpy_ndarray, 1,
"pdeResidualP", 0))) __PYX_ERR(0, 1642, __pyx_L1_error)
9919 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualP_du), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualP_du", 0))) __PYX_ERR(0, 1643, __pyx_L1_error)
9920 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualP_dv), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualP_dv", 0))) __PYX_ERR(0, 1644, __pyx_L1_error)
9921 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualP_dw), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualP_dw", 0))) __PYX_ERR(0, 1645, __pyx_L1_error)
9922 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pdeResidualU), __pyx_ptype_5numpy_ndarray, 1,
"pdeResidualU", 0))) __PYX_ERR(0, 1646, __pyx_L1_error)
9923 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualU_dp), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualU_dp", 0))) __PYX_ERR(0, 1647, __pyx_L1_error)
9924 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualU_du), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualU_du", 0))) __PYX_ERR(0, 1648, __pyx_L1_error)
9925 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pdeResidualV), __pyx_ptype_5numpy_ndarray, 1,
"pdeResidualV", 0))) __PYX_ERR(0, 1649, __pyx_L1_error)
9926 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualV_dp), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualV_dp", 0))) __PYX_ERR(0, 1650, __pyx_L1_error)
9927 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualV_dv), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualV_dv", 0))) __PYX_ERR(0, 1651, __pyx_L1_error)
9928 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pdeResidualW), __pyx_ptype_5numpy_ndarray, 1,
"pdeResidualW", 0))) __PYX_ERR(0, 1652, __pyx_L1_error)
9929 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualW_dp), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualW_dp", 0))) __PYX_ERR(0, 1653, __pyx_L1_error)
9930 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualW_dw), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualW_dw", 0))) __PYX_ERR(0, 1654, __pyx_L1_error)
9931 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_subgridErrorP), __pyx_ptype_5numpy_ndarray, 1,
"subgridErrorP", 0))) __PYX_ERR(0, 1655, __pyx_L1_error)
9932 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorP_du), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorP_du", 0))) __PYX_ERR(0, 1656, __pyx_L1_error)
9933 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorP_dv), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorP_dv", 0))) __PYX_ERR(0, 1657, __pyx_L1_error)
9934 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorP_dw), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorP_dw", 0))) __PYX_ERR(0, 1658, __pyx_L1_error)
9935 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_subgridErrorU), __pyx_ptype_5numpy_ndarray, 1,
"subgridErrorU", 0))) __PYX_ERR(0, 1659, __pyx_L1_error)
9936 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorU_dp), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorU_dp", 0))) __PYX_ERR(0, 1660, __pyx_L1_error)
9937 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorU_du), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorU_du", 0))) __PYX_ERR(0, 1661, __pyx_L1_error)
9938 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_subgridErrorV), __pyx_ptype_5numpy_ndarray, 1,
"subgridErrorV", 0))) __PYX_ERR(0, 1662, __pyx_L1_error)
9939 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorV_dp), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorV_dp", 0))) __PYX_ERR(0, 1663, __pyx_L1_error)
9940 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorV_dv), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorV_dv", 0))) __PYX_ERR(0, 1664, __pyx_L1_error)
9941 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_subgridErrorW), __pyx_ptype_5numpy_ndarray, 1,
"subgridErrorW", 0))) __PYX_ERR(0, 1665, __pyx_L1_error)
9942 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorW_dp), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorW_dp", 0))) __PYX_ERR(0, 1666, __pyx_L1_error)
9943 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorW_dw), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorW_dw", 0))) __PYX_ERR(0, 1667, __pyx_L1_error)
9944 __pyx_r = __pyx_pf_13csubgridError_56calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure_sd(__pyx_self, __pyx_v_elementDiameter, __pyx_v_dm, __pyx_v_f, __pyx_v_a, __pyx_v_pdeResidualP, __pyx_v_dpdeResidualP_du, __pyx_v_dpdeResidualP_dv, __pyx_v_dpdeResidualP_dw, __pyx_v_pdeResidualU, __pyx_v_dpdeResidualU_dp, __pyx_v_dpdeResidualU_du, __pyx_v_pdeResidualV, __pyx_v_dpdeResidualV_dp, __pyx_v_dpdeResidualV_dv, __pyx_v_pdeResidualW, __pyx_v_dpdeResidualW_dp, __pyx_v_dpdeResidualW_dw, __pyx_v_subgridErrorP, __pyx_v_dsubgridErrorP_du, __pyx_v_dsubgridErrorP_dv, __pyx_v_dsubgridErrorP_dw, __pyx_v_subgridErrorU, __pyx_v_dsubgridErrorU_dp, __pyx_v_dsubgridErrorU_du, __pyx_v_subgridErrorV, __pyx_v_dsubgridErrorV_dp, __pyx_v_dsubgridErrorV_dv, __pyx_v_subgridErrorW, __pyx_v_dsubgridErrorW_dp, __pyx_v_dsubgridErrorW_dw);
9951 __Pyx_RefNannyFinishContext();
9955 static PyObject *__pyx_pf_13csubgridError_56calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_dm, PyArrayObject *__pyx_v_f, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_pdeResidualP, PyArrayObject *__pyx_v_dpdeResidualP_du, PyArrayObject *__pyx_v_dpdeResidualP_dv, PyArrayObject *__pyx_v_dpdeResidualP_dw, PyArrayObject *__pyx_v_pdeResidualU, PyArrayObject *__pyx_v_dpdeResidualU_dp, PyArrayObject *__pyx_v_dpdeResidualU_du, PyArrayObject *__pyx_v_pdeResidualV, PyArrayObject *__pyx_v_dpdeResidualV_dp, PyArrayObject *__pyx_v_dpdeResidualV_dv, PyArrayObject *__pyx_v_pdeResidualW, PyArrayObject *__pyx_v_dpdeResidualW_dp, PyArrayObject *__pyx_v_dpdeResidualW_dw, PyArrayObject *__pyx_v_subgridErrorP, PyArrayObject *__pyx_v_dsubgridErrorP_du, PyArrayObject *__pyx_v_dsubgridErrorP_dv, PyArrayObject *__pyx_v_dsubgridErrorP_dw, PyArrayObject *__pyx_v_subgridErrorU, PyArrayObject *__pyx_v_dsubgridErrorU_dp, PyArrayObject *__pyx_v_dsubgridErrorU_du, PyArrayObject *__pyx_v_subgridErrorV, PyArrayObject *__pyx_v_dsubgridErrorV_dp, PyArrayObject *__pyx_v_dsubgridErrorV_dv, PyArrayObject *__pyx_v_subgridErrorW, PyArrayObject *__pyx_v_dsubgridErrorW_dp, PyArrayObject *__pyx_v_dsubgridErrorW_dw) {
9956 PyObject *__pyx_r = NULL;
9957 __Pyx_RefNannyDeclarations
9958 __Pyx_RefNannySetupContext(
"calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure_sd", 0);
9967 calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure_sd((__pyx_v_dsubgridErrorP_du->dimensions[0]), (__pyx_v_dsubgridErrorP_du->dimensions[1]), (__pyx_v_dsubgridErrorP_du->dimensions[2]), 3, ((
double *)__pyx_v_elementDiameter->data), ((
double *)__pyx_v_dm->data), ((
double *)__pyx_v_f->data), ((
double *)__pyx_v_a->data), ((
double *)__pyx_v_pdeResidualP->data), ((
double *)__pyx_v_dpdeResidualP_du->data), ((
double *)__pyx_v_dpdeResidualP_dv->data), ((
double *)__pyx_v_dpdeResidualP_dw->data), ((
double *)__pyx_v_pdeResidualU->data), ((
double *)__pyx_v_dpdeResidualU_dp->data), ((
double *)__pyx_v_dpdeResidualU_du->data), ((
double *)__pyx_v_pdeResidualV->data), ((
double *)__pyx_v_dpdeResidualV_dp->data), ((
double *)__pyx_v_dpdeResidualV_dv->data), ((
double *)__pyx_v_pdeResidualW->data), ((
double *)__pyx_v_dpdeResidualW_dp->data), ((
double *)__pyx_v_dpdeResidualW_dw->data), ((
double *)__pyx_v_subgridErrorP->data), ((
double *)__pyx_v_dsubgridErrorP_du->data), ((
double *)__pyx_v_dsubgridErrorP_dv->data), ((
double *)__pyx_v_dsubgridErrorP_dw->data), ((
double *)__pyx_v_subgridErrorU->data), ((
double *)__pyx_v_dsubgridErrorU_dp->data), ((
double *)__pyx_v_dsubgridErrorU_du->data), ((
double *)__pyx_v_subgridErrorV->data), ((
double *)__pyx_v_dsubgridErrorV_dp->data), ((
double *)__pyx_v_dsubgridErrorV_dv->data), ((
double *)__pyx_v_subgridErrorW->data), ((
double *)__pyx_v_dsubgridErrorW_dp->data), ((
double *)__pyx_v_dsubgridErrorW_dw->data));
9978 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9979 __Pyx_XGIVEREF(__pyx_r);
9980 __Pyx_RefNannyFinishContext();
9993 static PyObject *__pyx_pw_13csubgridError_59calculateSubgridErrorStokes2D_1(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
9994 static PyMethodDef __pyx_mdef_13csubgridError_59calculateSubgridErrorStokes2D_1 = {
"calculateSubgridErrorStokes2D_1", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_13csubgridError_59calculateSubgridErrorStokes2D_1, METH_VARARGS|METH_KEYWORDS, 0};
9995 static PyObject *__pyx_pw_13csubgridError_59calculateSubgridErrorStokes2D_1(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
9996 PyArrayObject *__pyx_v_elementDiameter = 0;
9997 PyArrayObject *__pyx_v_u = 0;
9998 PyArrayObject *__pyx_v_v = 0;
9999 PyArrayObject *__pyx_v_a = 0;
10000 PyArrayObject *__pyx_v_pdeResidualP = 0;
10001 PyArrayObject *__pyx_v_dpdeResidualP_du = 0;
10002 PyArrayObject *__pyx_v_dpdeResidualP_dv = 0;
10003 PyArrayObject *__pyx_v_pdeResidualU = 0;
10004 PyArrayObject *__pyx_v_dpdeResidualU_dp = 0;
10005 PyArrayObject *__pyx_v_dpdeResidualU_du = 0;
10006 PyArrayObject *__pyx_v_pdeResidualV = 0;
10007 PyArrayObject *__pyx_v_dpdeResidualV_dp = 0;
10008 PyArrayObject *__pyx_v_dpdeResidualV_dv = 0;
10009 PyArrayObject *__pyx_v_subgridErrorP = 0;
10010 PyArrayObject *__pyx_v_dsubgridErrorP_dp = 0;
10011 PyArrayObject *__pyx_v_dsubgridErrorP_du = 0;
10012 PyArrayObject *__pyx_v_dsubgridErrorP_dv = 0;
10013 PyArrayObject *__pyx_v_subgridErrorU = 0;
10014 PyArrayObject *__pyx_v_dsubgridErrorU_dp = 0;
10015 PyArrayObject *__pyx_v_dsubgridErrorU_du = 0;
10016 PyArrayObject *__pyx_v_dsubgridErrorU_dv = 0;
10017 PyArrayObject *__pyx_v_subgridErrorV = 0;
10018 PyArrayObject *__pyx_v_dsubgridErrorV_dp = 0;
10019 PyArrayObject *__pyx_v_dsubgridErrorV_du = 0;
10020 PyArrayObject *__pyx_v_dsubgridErrorV_dv = 0;
10021 int __pyx_lineno = 0;
10022 const char *__pyx_filename = NULL;
10023 int __pyx_clineno = 0;
10024 PyObject *__pyx_r = 0;
10025 __Pyx_RefNannyDeclarations
10026 __Pyx_RefNannySetupContext(
"calculateSubgridErrorStokes2D_1 (wrapper)", 0);
10028 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_elementDiameter,&__pyx_n_s_u,&__pyx_n_s_v,&__pyx_n_s_a,&__pyx_n_s_pdeResidualP,&__pyx_n_s_dpdeResidualP_du,&__pyx_n_s_dpdeResidualP_dv,&__pyx_n_s_pdeResidualU,&__pyx_n_s_dpdeResidualU_dp,&__pyx_n_s_dpdeResidualU_du,&__pyx_n_s_pdeResidualV,&__pyx_n_s_dpdeResidualV_dp,&__pyx_n_s_dpdeResidualV_dv,&__pyx_n_s_subgridErrorP,&__pyx_n_s_dsubgridErrorP_dp,&__pyx_n_s_dsubgridErrorP_du,&__pyx_n_s_dsubgridErrorP_dv,&__pyx_n_s_subgridErrorU,&__pyx_n_s_dsubgridErrorU_dp,&__pyx_n_s_dsubgridErrorU_du,&__pyx_n_s_dsubgridErrorU_dv,&__pyx_n_s_subgridErrorV,&__pyx_n_s_dsubgridErrorV_dp,&__pyx_n_s_dsubgridErrorV_du,&__pyx_n_s_dsubgridErrorV_dv,0};
10029 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};
10030 if (unlikely(__pyx_kwds)) {
10031 Py_ssize_t kw_args;
10032 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
10033 switch (pos_args) {
10034 case 25: values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
10035 CYTHON_FALLTHROUGH;
10036 case 24: values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
10037 CYTHON_FALLTHROUGH;
10038 case 23: values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
10039 CYTHON_FALLTHROUGH;
10040 case 22: values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
10041 CYTHON_FALLTHROUGH;
10042 case 21: values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
10043 CYTHON_FALLTHROUGH;
10044 case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
10045 CYTHON_FALLTHROUGH;
10046 case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
10047 CYTHON_FALLTHROUGH;
10048 case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
10049 CYTHON_FALLTHROUGH;
10050 case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
10051 CYTHON_FALLTHROUGH;
10052 case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
10053 CYTHON_FALLTHROUGH;
10054 case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
10055 CYTHON_FALLTHROUGH;
10056 case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
10057 CYTHON_FALLTHROUGH;
10058 case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
10059 CYTHON_FALLTHROUGH;
10060 case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
10061 CYTHON_FALLTHROUGH;
10062 case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
10063 CYTHON_FALLTHROUGH;
10064 case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
10065 CYTHON_FALLTHROUGH;
10066 case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
10067 CYTHON_FALLTHROUGH;
10068 case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
10069 CYTHON_FALLTHROUGH;
10070 case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
10071 CYTHON_FALLTHROUGH;
10072 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
10073 CYTHON_FALLTHROUGH;
10074 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
10075 CYTHON_FALLTHROUGH;
10076 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
10077 CYTHON_FALLTHROUGH;
10078 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
10079 CYTHON_FALLTHROUGH;
10080 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
10081 CYTHON_FALLTHROUGH;
10082 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
10083 CYTHON_FALLTHROUGH;
10085 default:
goto __pyx_L5_argtuple_error;
10087 kw_args = PyDict_Size(__pyx_kwds);
10088 switch (pos_args) {
10090 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementDiameter)) != 0)) kw_args--;
10091 else goto __pyx_L5_argtuple_error;
10092 CYTHON_FALLTHROUGH;
10094 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u)) != 0)) kw_args--;
10096 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_1", 1, 25, 25, 1); __PYX_ERR(0, 1702, __pyx_L3_error)
10098 CYTHON_FALLTHROUGH;
10100 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
10102 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_1", 1, 25, 25, 2); __PYX_ERR(0, 1702, __pyx_L3_error)
10104 CYTHON_FALLTHROUGH;
10106 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
10108 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_1", 1, 25, 25, 3); __PYX_ERR(0, 1702, __pyx_L3_error)
10110 CYTHON_FALLTHROUGH;
10112 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pdeResidualP)) != 0)) kw_args--;
10114 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_1", 1, 25, 25, 4); __PYX_ERR(0, 1702, __pyx_L3_error)
10116 CYTHON_FALLTHROUGH;
10118 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualP_du)) != 0)) kw_args--;
10120 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_1", 1, 25, 25, 5); __PYX_ERR(0, 1702, __pyx_L3_error)
10122 CYTHON_FALLTHROUGH;
10124 if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualP_dv)) != 0)) kw_args--;
10126 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_1", 1, 25, 25, 6); __PYX_ERR(0, 1702, __pyx_L3_error)
10128 CYTHON_FALLTHROUGH;
10130 if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pdeResidualU)) != 0)) kw_args--;
10132 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_1", 1, 25, 25, 7); __PYX_ERR(0, 1702, __pyx_L3_error)
10134 CYTHON_FALLTHROUGH;
10136 if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualU_dp)) != 0)) kw_args--;
10138 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_1", 1, 25, 25, 8); __PYX_ERR(0, 1702, __pyx_L3_error)
10140 CYTHON_FALLTHROUGH;
10142 if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualU_du)) != 0)) kw_args--;
10144 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_1", 1, 25, 25, 9); __PYX_ERR(0, 1702, __pyx_L3_error)
10146 CYTHON_FALLTHROUGH;
10148 if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pdeResidualV)) != 0)) kw_args--;
10150 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_1", 1, 25, 25, 10); __PYX_ERR(0, 1702, __pyx_L3_error)
10152 CYTHON_FALLTHROUGH;
10154 if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualV_dp)) != 0)) kw_args--;
10156 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_1", 1, 25, 25, 11); __PYX_ERR(0, 1702, __pyx_L3_error)
10158 CYTHON_FALLTHROUGH;
10160 if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualV_dv)) != 0)) kw_args--;
10162 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_1", 1, 25, 25, 12); __PYX_ERR(0, 1702, __pyx_L3_error)
10164 CYTHON_FALLTHROUGH;
10166 if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subgridErrorP)) != 0)) kw_args--;
10168 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_1", 1, 25, 25, 13); __PYX_ERR(0, 1702, __pyx_L3_error)
10170 CYTHON_FALLTHROUGH;
10172 if (likely((values[14] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorP_dp)) != 0)) kw_args--;
10174 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_1", 1, 25, 25, 14); __PYX_ERR(0, 1702, __pyx_L3_error)
10176 CYTHON_FALLTHROUGH;
10178 if (likely((values[15] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorP_du)) != 0)) kw_args--;
10180 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_1", 1, 25, 25, 15); __PYX_ERR(0, 1702, __pyx_L3_error)
10182 CYTHON_FALLTHROUGH;
10184 if (likely((values[16] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorP_dv)) != 0)) kw_args--;
10186 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_1", 1, 25, 25, 16); __PYX_ERR(0, 1702, __pyx_L3_error)
10188 CYTHON_FALLTHROUGH;
10190 if (likely((values[17] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subgridErrorU)) != 0)) kw_args--;
10192 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_1", 1, 25, 25, 17); __PYX_ERR(0, 1702, __pyx_L3_error)
10194 CYTHON_FALLTHROUGH;
10196 if (likely((values[18] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorU_dp)) != 0)) kw_args--;
10198 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_1", 1, 25, 25, 18); __PYX_ERR(0, 1702, __pyx_L3_error)
10200 CYTHON_FALLTHROUGH;
10202 if (likely((values[19] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorU_du)) != 0)) kw_args--;
10204 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_1", 1, 25, 25, 19); __PYX_ERR(0, 1702, __pyx_L3_error)
10206 CYTHON_FALLTHROUGH;
10208 if (likely((values[20] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorU_dv)) != 0)) kw_args--;
10210 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_1", 1, 25, 25, 20); __PYX_ERR(0, 1702, __pyx_L3_error)
10212 CYTHON_FALLTHROUGH;
10214 if (likely((values[21] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subgridErrorV)) != 0)) kw_args--;
10216 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_1", 1, 25, 25, 21); __PYX_ERR(0, 1702, __pyx_L3_error)
10218 CYTHON_FALLTHROUGH;
10220 if (likely((values[22] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorV_dp)) != 0)) kw_args--;
10222 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_1", 1, 25, 25, 22); __PYX_ERR(0, 1702, __pyx_L3_error)
10224 CYTHON_FALLTHROUGH;
10226 if (likely((values[23] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorV_du)) != 0)) kw_args--;
10228 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_1", 1, 25, 25, 23); __PYX_ERR(0, 1702, __pyx_L3_error)
10230 CYTHON_FALLTHROUGH;
10232 if (likely((values[24] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorV_dv)) != 0)) kw_args--;
10234 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_1", 1, 25, 25, 24); __PYX_ERR(0, 1702, __pyx_L3_error)
10237 if (unlikely(kw_args > 0)) {
10238 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"calculateSubgridErrorStokes2D_1") < 0)) __PYX_ERR(0, 1702, __pyx_L3_error)
10240 }
else if (PyTuple_GET_SIZE(__pyx_args) != 25) {
10241 goto __pyx_L5_argtuple_error;
10243 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
10244 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
10245 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
10246 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
10247 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
10248 values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
10249 values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
10250 values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
10251 values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
10252 values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
10253 values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
10254 values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
10255 values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
10256 values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
10257 values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
10258 values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
10259 values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
10260 values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
10261 values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
10262 values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
10263 values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
10264 values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
10265 values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
10266 values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
10267 values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
10269 __pyx_v_elementDiameter = ((PyArrayObject *)values[0]);
10270 __pyx_v_u = ((PyArrayObject *)values[1]);
10271 __pyx_v_v = ((PyArrayObject *)values[2]);
10272 __pyx_v_a = ((PyArrayObject *)values[3]);
10273 __pyx_v_pdeResidualP = ((PyArrayObject *)values[4]);
10274 __pyx_v_dpdeResidualP_du = ((PyArrayObject *)values[5]);
10275 __pyx_v_dpdeResidualP_dv = ((PyArrayObject *)values[6]);
10276 __pyx_v_pdeResidualU = ((PyArrayObject *)values[7]);
10277 __pyx_v_dpdeResidualU_dp = ((PyArrayObject *)values[8]);
10278 __pyx_v_dpdeResidualU_du = ((PyArrayObject *)values[9]);
10279 __pyx_v_pdeResidualV = ((PyArrayObject *)values[10]);
10280 __pyx_v_dpdeResidualV_dp = ((PyArrayObject *)values[11]);
10281 __pyx_v_dpdeResidualV_dv = ((PyArrayObject *)values[12]);
10282 __pyx_v_subgridErrorP = ((PyArrayObject *)values[13]);
10283 __pyx_v_dsubgridErrorP_dp = ((PyArrayObject *)values[14]);
10284 __pyx_v_dsubgridErrorP_du = ((PyArrayObject *)values[15]);
10285 __pyx_v_dsubgridErrorP_dv = ((PyArrayObject *)values[16]);
10286 __pyx_v_subgridErrorU = ((PyArrayObject *)values[17]);
10287 __pyx_v_dsubgridErrorU_dp = ((PyArrayObject *)values[18]);
10288 __pyx_v_dsubgridErrorU_du = ((PyArrayObject *)values[19]);
10289 __pyx_v_dsubgridErrorU_dv = ((PyArrayObject *)values[20]);
10290 __pyx_v_subgridErrorV = ((PyArrayObject *)values[21]);
10291 __pyx_v_dsubgridErrorV_dp = ((PyArrayObject *)values[22]);
10292 __pyx_v_dsubgridErrorV_du = ((PyArrayObject *)values[23]);
10293 __pyx_v_dsubgridErrorV_dv = ((PyArrayObject *)values[24]);
10295 goto __pyx_L4_argument_unpacking_done;
10296 __pyx_L5_argtuple_error:;
10297 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_1", 1, 25, 25, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1702, __pyx_L3_error)
10299 __Pyx_AddTraceback(
"csubgridError.calculateSubgridErrorStokes2D_1", __pyx_clineno, __pyx_lineno, __pyx_filename);
10300 __Pyx_RefNannyFinishContext();
10302 __pyx_L4_argument_unpacking_done:;
10303 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementDiameter), __pyx_ptype_5numpy_ndarray, 1,
"elementDiameter", 0))) __PYX_ERR(0, 1702, __pyx_L1_error)
10304 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u), __pyx_ptype_5numpy_ndarray, 1,
"u", 0))) __PYX_ERR(0, 1703, __pyx_L1_error)
10305 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), __pyx_ptype_5numpy_ndarray, 1,
"v", 0))) __PYX_ERR(0, 1704, __pyx_L1_error)
10306 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1,
"a", 0))) __PYX_ERR(0, 1705, __pyx_L1_error)
10307 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pdeResidualP), __pyx_ptype_5numpy_ndarray, 1,
"pdeResidualP", 0))) __PYX_ERR(0, 1706, __pyx_L1_error)
10308 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualP_du), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualP_du", 0))) __PYX_ERR(0, 1707, __pyx_L1_error)
10309 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualP_dv), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualP_dv", 0))) __PYX_ERR(0, 1708, __pyx_L1_error)
10310 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pdeResidualU), __pyx_ptype_5numpy_ndarray, 1,
"pdeResidualU", 0))) __PYX_ERR(0, 1709, __pyx_L1_error)
10311 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualU_dp), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualU_dp", 0))) __PYX_ERR(0, 1710, __pyx_L1_error)
10312 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualU_du), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualU_du", 0))) __PYX_ERR(0, 1711, __pyx_L1_error)
10313 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pdeResidualV), __pyx_ptype_5numpy_ndarray, 1,
"pdeResidualV", 0))) __PYX_ERR(0, 1712, __pyx_L1_error)
10314 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualV_dp), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualV_dp", 0))) __PYX_ERR(0, 1713, __pyx_L1_error)
10315 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualV_dv), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualV_dv", 0))) __PYX_ERR(0, 1714, __pyx_L1_error)
10316 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_subgridErrorP), __pyx_ptype_5numpy_ndarray, 1,
"subgridErrorP", 0))) __PYX_ERR(0, 1715, __pyx_L1_error)
10317 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorP_dp), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorP_dp", 0))) __PYX_ERR(0, 1716, __pyx_L1_error)
10318 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorP_du), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorP_du", 0))) __PYX_ERR(0, 1717, __pyx_L1_error)
10319 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorP_dv), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorP_dv", 0))) __PYX_ERR(0, 1718, __pyx_L1_error)
10320 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_subgridErrorU), __pyx_ptype_5numpy_ndarray, 1,
"subgridErrorU", 0))) __PYX_ERR(0, 1719, __pyx_L1_error)
10321 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorU_dp), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorU_dp", 0))) __PYX_ERR(0, 1720, __pyx_L1_error)
10322 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorU_du), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorU_du", 0))) __PYX_ERR(0, 1721, __pyx_L1_error)
10323 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorU_dv), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorU_dv", 0))) __PYX_ERR(0, 1722, __pyx_L1_error)
10324 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_subgridErrorV), __pyx_ptype_5numpy_ndarray, 1,
"subgridErrorV", 0))) __PYX_ERR(0, 1723, __pyx_L1_error)
10325 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorV_dp), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorV_dp", 0))) __PYX_ERR(0, 1724, __pyx_L1_error)
10326 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorV_du), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorV_du", 0))) __PYX_ERR(0, 1725, __pyx_L1_error)
10327 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorV_dv), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorV_dv", 0))) __PYX_ERR(0, 1726, __pyx_L1_error)
10328 __pyx_r = __pyx_pf_13csubgridError_58calculateSubgridErrorStokes2D_1(__pyx_self, __pyx_v_elementDiameter, __pyx_v_u, __pyx_v_v, __pyx_v_a, __pyx_v_pdeResidualP, __pyx_v_dpdeResidualP_du, __pyx_v_dpdeResidualP_dv, __pyx_v_pdeResidualU, __pyx_v_dpdeResidualU_dp, __pyx_v_dpdeResidualU_du, __pyx_v_pdeResidualV, __pyx_v_dpdeResidualV_dp, __pyx_v_dpdeResidualV_dv, __pyx_v_subgridErrorP, __pyx_v_dsubgridErrorP_dp, __pyx_v_dsubgridErrorP_du, __pyx_v_dsubgridErrorP_dv, __pyx_v_subgridErrorU, __pyx_v_dsubgridErrorU_dp, __pyx_v_dsubgridErrorU_du, __pyx_v_dsubgridErrorU_dv, __pyx_v_subgridErrorV, __pyx_v_dsubgridErrorV_dp, __pyx_v_dsubgridErrorV_du, __pyx_v_dsubgridErrorV_dv);
10335 __Pyx_RefNannyFinishContext();
10339 static PyObject *__pyx_pf_13csubgridError_58calculateSubgridErrorStokes2D_1(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_u, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_pdeResidualP, PyArrayObject *__pyx_v_dpdeResidualP_du, PyArrayObject *__pyx_v_dpdeResidualP_dv, PyArrayObject *__pyx_v_pdeResidualU, PyArrayObject *__pyx_v_dpdeResidualU_dp, PyArrayObject *__pyx_v_dpdeResidualU_du, PyArrayObject *__pyx_v_pdeResidualV, PyArrayObject *__pyx_v_dpdeResidualV_dp, PyArrayObject *__pyx_v_dpdeResidualV_dv, PyArrayObject *__pyx_v_subgridErrorP, PyArrayObject *__pyx_v_dsubgridErrorP_dp, PyArrayObject *__pyx_v_dsubgridErrorP_du, PyArrayObject *__pyx_v_dsubgridErrorP_dv, PyArrayObject *__pyx_v_subgridErrorU, PyArrayObject *__pyx_v_dsubgridErrorU_dp, PyArrayObject *__pyx_v_dsubgridErrorU_du, PyArrayObject *__pyx_v_dsubgridErrorU_dv, PyArrayObject *__pyx_v_subgridErrorV, PyArrayObject *__pyx_v_dsubgridErrorV_dp, PyArrayObject *__pyx_v_dsubgridErrorV_du, PyArrayObject *__pyx_v_dsubgridErrorV_dv) {
10340 PyObject *__pyx_r = NULL;
10341 __Pyx_RefNannyDeclarations
10342 __Pyx_RefNannySetupContext(
"calculateSubgridErrorStokes2D_1", 0);
10351 calculateSubgridErrorStokes2D_1((__pyx_v_dsubgridErrorP_du->dimensions[0]), (__pyx_v_dsubgridErrorP_du->dimensions[1]), (__pyx_v_dsubgridErrorP_du->dimensions[2]), 2, ((
double *)__pyx_v_elementDiameter->data), ((
double *)__pyx_v_u->data), ((
double *)__pyx_v_v->data), ((
double *)__pyx_v_a->data), ((
double *)__pyx_v_pdeResidualP->data), ((
double *)__pyx_v_dpdeResidualP_du->data), ((
double *)__pyx_v_dpdeResidualP_dv->data), ((
double *)__pyx_v_pdeResidualU->data), ((
double *)__pyx_v_dpdeResidualU_dp->data), ((
double *)__pyx_v_dpdeResidualU_du->data), ((
double *)__pyx_v_pdeResidualV->data), ((
double *)__pyx_v_dpdeResidualV_dp->data), ((
double *)__pyx_v_dpdeResidualV_dv->data), ((
double *)__pyx_v_subgridErrorP->data), ((
double *)__pyx_v_dsubgridErrorP_dp->data), ((
double *)__pyx_v_dsubgridErrorP_du->data), ((
double *)__pyx_v_dsubgridErrorP_dv->data), ((
double *)__pyx_v_subgridErrorU->data), ((
double *)__pyx_v_dsubgridErrorU_dp->data), ((
double *)__pyx_v_dsubgridErrorU_du->data), ((
double *)__pyx_v_dsubgridErrorU_dv->data), ((
double *)__pyx_v_subgridErrorV->data), ((
double *)__pyx_v_dsubgridErrorV_dp->data), ((
double *)__pyx_v_dsubgridErrorV_du->data), ((
double *)__pyx_v_dsubgridErrorV_dv->data));
10362 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10363 __Pyx_XGIVEREF(__pyx_r);
10364 __Pyx_RefNannyFinishContext();
10377 static PyObject *__pyx_pw_13csubgridError_61calculateSubgridErrorStokes2D_1_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
10378 static PyMethodDef __pyx_mdef_13csubgridError_61calculateSubgridErrorStokes2D_1_sd = {
"calculateSubgridErrorStokes2D_1_sd", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_13csubgridError_61calculateSubgridErrorStokes2D_1_sd, METH_VARARGS|METH_KEYWORDS, 0};
10379 static PyObject *__pyx_pw_13csubgridError_61calculateSubgridErrorStokes2D_1_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
10380 PyArrayObject *__pyx_v_elementDiameter = 0;
10381 PyArrayObject *__pyx_v_u = 0;
10382 PyArrayObject *__pyx_v_v = 0;
10383 PyArrayObject *__pyx_v_a = 0;
10384 PyArrayObject *__pyx_v_pdeResidualP = 0;
10385 PyArrayObject *__pyx_v_dpdeResidualP_du = 0;
10386 PyArrayObject *__pyx_v_dpdeResidualP_dv = 0;
10387 PyArrayObject *__pyx_v_pdeResidualU = 0;
10388 PyArrayObject *__pyx_v_dpdeResidualU_dp = 0;
10389 PyArrayObject *__pyx_v_dpdeResidualU_du = 0;
10390 PyArrayObject *__pyx_v_pdeResidualV = 0;
10391 PyArrayObject *__pyx_v_dpdeResidualV_dp = 0;
10392 PyArrayObject *__pyx_v_dpdeResidualV_dv = 0;
10393 PyArrayObject *__pyx_v_subgridErrorP = 0;
10394 PyArrayObject *__pyx_v_dsubgridErrorP_dp = 0;
10395 PyArrayObject *__pyx_v_dsubgridErrorP_du = 0;
10396 PyArrayObject *__pyx_v_dsubgridErrorP_dv = 0;
10397 PyArrayObject *__pyx_v_subgridErrorU = 0;
10398 PyArrayObject *__pyx_v_dsubgridErrorU_dp = 0;
10399 PyArrayObject *__pyx_v_dsubgridErrorU_du = 0;
10400 PyArrayObject *__pyx_v_dsubgridErrorU_dv = 0;
10401 PyArrayObject *__pyx_v_subgridErrorV = 0;
10402 PyArrayObject *__pyx_v_dsubgridErrorV_dp = 0;
10403 PyArrayObject *__pyx_v_dsubgridErrorV_du = 0;
10404 PyArrayObject *__pyx_v_dsubgridErrorV_dv = 0;
10405 int __pyx_lineno = 0;
10406 const char *__pyx_filename = NULL;
10407 int __pyx_clineno = 0;
10408 PyObject *__pyx_r = 0;
10409 __Pyx_RefNannyDeclarations
10410 __Pyx_RefNannySetupContext(
"calculateSubgridErrorStokes2D_1_sd (wrapper)", 0);
10412 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_elementDiameter,&__pyx_n_s_u,&__pyx_n_s_v,&__pyx_n_s_a,&__pyx_n_s_pdeResidualP,&__pyx_n_s_dpdeResidualP_du,&__pyx_n_s_dpdeResidualP_dv,&__pyx_n_s_pdeResidualU,&__pyx_n_s_dpdeResidualU_dp,&__pyx_n_s_dpdeResidualU_du,&__pyx_n_s_pdeResidualV,&__pyx_n_s_dpdeResidualV_dp,&__pyx_n_s_dpdeResidualV_dv,&__pyx_n_s_subgridErrorP,&__pyx_n_s_dsubgridErrorP_dp,&__pyx_n_s_dsubgridErrorP_du,&__pyx_n_s_dsubgridErrorP_dv,&__pyx_n_s_subgridErrorU,&__pyx_n_s_dsubgridErrorU_dp,&__pyx_n_s_dsubgridErrorU_du,&__pyx_n_s_dsubgridErrorU_dv,&__pyx_n_s_subgridErrorV,&__pyx_n_s_dsubgridErrorV_dp,&__pyx_n_s_dsubgridErrorV_du,&__pyx_n_s_dsubgridErrorV_dv,0};
10413 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};
10414 if (unlikely(__pyx_kwds)) {
10415 Py_ssize_t kw_args;
10416 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
10417 switch (pos_args) {
10418 case 25: values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
10419 CYTHON_FALLTHROUGH;
10420 case 24: values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
10421 CYTHON_FALLTHROUGH;
10422 case 23: values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
10423 CYTHON_FALLTHROUGH;
10424 case 22: values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
10425 CYTHON_FALLTHROUGH;
10426 case 21: values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
10427 CYTHON_FALLTHROUGH;
10428 case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
10429 CYTHON_FALLTHROUGH;
10430 case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
10431 CYTHON_FALLTHROUGH;
10432 case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
10433 CYTHON_FALLTHROUGH;
10434 case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
10435 CYTHON_FALLTHROUGH;
10436 case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
10437 CYTHON_FALLTHROUGH;
10438 case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
10439 CYTHON_FALLTHROUGH;
10440 case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
10441 CYTHON_FALLTHROUGH;
10442 case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
10443 CYTHON_FALLTHROUGH;
10444 case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
10445 CYTHON_FALLTHROUGH;
10446 case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
10447 CYTHON_FALLTHROUGH;
10448 case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
10449 CYTHON_FALLTHROUGH;
10450 case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
10451 CYTHON_FALLTHROUGH;
10452 case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
10453 CYTHON_FALLTHROUGH;
10454 case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
10455 CYTHON_FALLTHROUGH;
10456 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
10457 CYTHON_FALLTHROUGH;
10458 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
10459 CYTHON_FALLTHROUGH;
10460 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
10461 CYTHON_FALLTHROUGH;
10462 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
10463 CYTHON_FALLTHROUGH;
10464 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
10465 CYTHON_FALLTHROUGH;
10466 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
10467 CYTHON_FALLTHROUGH;
10469 default:
goto __pyx_L5_argtuple_error;
10471 kw_args = PyDict_Size(__pyx_kwds);
10472 switch (pos_args) {
10474 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementDiameter)) != 0)) kw_args--;
10475 else goto __pyx_L5_argtuple_error;
10476 CYTHON_FALLTHROUGH;
10478 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u)) != 0)) kw_args--;
10480 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_1_sd", 1, 25, 25, 1); __PYX_ERR(0, 1756, __pyx_L3_error)
10482 CYTHON_FALLTHROUGH;
10484 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
10486 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_1_sd", 1, 25, 25, 2); __PYX_ERR(0, 1756, __pyx_L3_error)
10488 CYTHON_FALLTHROUGH;
10490 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
10492 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_1_sd", 1, 25, 25, 3); __PYX_ERR(0, 1756, __pyx_L3_error)
10494 CYTHON_FALLTHROUGH;
10496 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pdeResidualP)) != 0)) kw_args--;
10498 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_1_sd", 1, 25, 25, 4); __PYX_ERR(0, 1756, __pyx_L3_error)
10500 CYTHON_FALLTHROUGH;
10502 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualP_du)) != 0)) kw_args--;
10504 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_1_sd", 1, 25, 25, 5); __PYX_ERR(0, 1756, __pyx_L3_error)
10506 CYTHON_FALLTHROUGH;
10508 if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualP_dv)) != 0)) kw_args--;
10510 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_1_sd", 1, 25, 25, 6); __PYX_ERR(0, 1756, __pyx_L3_error)
10512 CYTHON_FALLTHROUGH;
10514 if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pdeResidualU)) != 0)) kw_args--;
10516 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_1_sd", 1, 25, 25, 7); __PYX_ERR(0, 1756, __pyx_L3_error)
10518 CYTHON_FALLTHROUGH;
10520 if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualU_dp)) != 0)) kw_args--;
10522 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_1_sd", 1, 25, 25, 8); __PYX_ERR(0, 1756, __pyx_L3_error)
10524 CYTHON_FALLTHROUGH;
10526 if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualU_du)) != 0)) kw_args--;
10528 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_1_sd", 1, 25, 25, 9); __PYX_ERR(0, 1756, __pyx_L3_error)
10530 CYTHON_FALLTHROUGH;
10532 if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pdeResidualV)) != 0)) kw_args--;
10534 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_1_sd", 1, 25, 25, 10); __PYX_ERR(0, 1756, __pyx_L3_error)
10536 CYTHON_FALLTHROUGH;
10538 if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualV_dp)) != 0)) kw_args--;
10540 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_1_sd", 1, 25, 25, 11); __PYX_ERR(0, 1756, __pyx_L3_error)
10542 CYTHON_FALLTHROUGH;
10544 if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpdeResidualV_dv)) != 0)) kw_args--;
10546 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_1_sd", 1, 25, 25, 12); __PYX_ERR(0, 1756, __pyx_L3_error)
10548 CYTHON_FALLTHROUGH;
10550 if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subgridErrorP)) != 0)) kw_args--;
10552 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_1_sd", 1, 25, 25, 13); __PYX_ERR(0, 1756, __pyx_L3_error)
10554 CYTHON_FALLTHROUGH;
10556 if (likely((values[14] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorP_dp)) != 0)) kw_args--;
10558 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_1_sd", 1, 25, 25, 14); __PYX_ERR(0, 1756, __pyx_L3_error)
10560 CYTHON_FALLTHROUGH;
10562 if (likely((values[15] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorP_du)) != 0)) kw_args--;
10564 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_1_sd", 1, 25, 25, 15); __PYX_ERR(0, 1756, __pyx_L3_error)
10566 CYTHON_FALLTHROUGH;
10568 if (likely((values[16] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorP_dv)) != 0)) kw_args--;
10570 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_1_sd", 1, 25, 25, 16); __PYX_ERR(0, 1756, __pyx_L3_error)
10572 CYTHON_FALLTHROUGH;
10574 if (likely((values[17] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subgridErrorU)) != 0)) kw_args--;
10576 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_1_sd", 1, 25, 25, 17); __PYX_ERR(0, 1756, __pyx_L3_error)
10578 CYTHON_FALLTHROUGH;
10580 if (likely((values[18] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorU_dp)) != 0)) kw_args--;
10582 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_1_sd", 1, 25, 25, 18); __PYX_ERR(0, 1756, __pyx_L3_error)
10584 CYTHON_FALLTHROUGH;
10586 if (likely((values[19] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorU_du)) != 0)) kw_args--;
10588 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_1_sd", 1, 25, 25, 19); __PYX_ERR(0, 1756, __pyx_L3_error)
10590 CYTHON_FALLTHROUGH;
10592 if (likely((values[20] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorU_dv)) != 0)) kw_args--;
10594 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_1_sd", 1, 25, 25, 20); __PYX_ERR(0, 1756, __pyx_L3_error)
10596 CYTHON_FALLTHROUGH;
10598 if (likely((values[21] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subgridErrorV)) != 0)) kw_args--;
10600 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_1_sd", 1, 25, 25, 21); __PYX_ERR(0, 1756, __pyx_L3_error)
10602 CYTHON_FALLTHROUGH;
10604 if (likely((values[22] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorV_dp)) != 0)) kw_args--;
10606 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_1_sd", 1, 25, 25, 22); __PYX_ERR(0, 1756, __pyx_L3_error)
10608 CYTHON_FALLTHROUGH;
10610 if (likely((values[23] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorV_du)) != 0)) kw_args--;
10612 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_1_sd", 1, 25, 25, 23); __PYX_ERR(0, 1756, __pyx_L3_error)
10614 CYTHON_FALLTHROUGH;
10616 if (likely((values[24] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dsubgridErrorV_dv)) != 0)) kw_args--;
10618 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_1_sd", 1, 25, 25, 24); __PYX_ERR(0, 1756, __pyx_L3_error)
10621 if (unlikely(kw_args > 0)) {
10622 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"calculateSubgridErrorStokes2D_1_sd") < 0)) __PYX_ERR(0, 1756, __pyx_L3_error)
10624 }
else if (PyTuple_GET_SIZE(__pyx_args) != 25) {
10625 goto __pyx_L5_argtuple_error;
10627 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
10628 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
10629 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
10630 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
10631 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
10632 values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
10633 values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
10634 values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
10635 values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
10636 values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
10637 values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
10638 values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
10639 values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
10640 values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
10641 values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
10642 values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
10643 values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
10644 values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
10645 values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
10646 values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
10647 values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
10648 values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
10649 values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
10650 values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
10651 values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
10653 __pyx_v_elementDiameter = ((PyArrayObject *)values[0]);
10654 __pyx_v_u = ((PyArrayObject *)values[1]);
10655 __pyx_v_v = ((PyArrayObject *)values[2]);
10656 __pyx_v_a = ((PyArrayObject *)values[3]);
10657 __pyx_v_pdeResidualP = ((PyArrayObject *)values[4]);
10658 __pyx_v_dpdeResidualP_du = ((PyArrayObject *)values[5]);
10659 __pyx_v_dpdeResidualP_dv = ((PyArrayObject *)values[6]);
10660 __pyx_v_pdeResidualU = ((PyArrayObject *)values[7]);
10661 __pyx_v_dpdeResidualU_dp = ((PyArrayObject *)values[8]);
10662 __pyx_v_dpdeResidualU_du = ((PyArrayObject *)values[9]);
10663 __pyx_v_pdeResidualV = ((PyArrayObject *)values[10]);
10664 __pyx_v_dpdeResidualV_dp = ((PyArrayObject *)values[11]);
10665 __pyx_v_dpdeResidualV_dv = ((PyArrayObject *)values[12]);
10666 __pyx_v_subgridErrorP = ((PyArrayObject *)values[13]);
10667 __pyx_v_dsubgridErrorP_dp = ((PyArrayObject *)values[14]);
10668 __pyx_v_dsubgridErrorP_du = ((PyArrayObject *)values[15]);
10669 __pyx_v_dsubgridErrorP_dv = ((PyArrayObject *)values[16]);
10670 __pyx_v_subgridErrorU = ((PyArrayObject *)values[17]);
10671 __pyx_v_dsubgridErrorU_dp = ((PyArrayObject *)values[18]);
10672 __pyx_v_dsubgridErrorU_du = ((PyArrayObject *)values[19]);
10673 __pyx_v_dsubgridErrorU_dv = ((PyArrayObject *)values[20]);
10674 __pyx_v_subgridErrorV = ((PyArrayObject *)values[21]);
10675 __pyx_v_dsubgridErrorV_dp = ((PyArrayObject *)values[22]);
10676 __pyx_v_dsubgridErrorV_du = ((PyArrayObject *)values[23]);
10677 __pyx_v_dsubgridErrorV_dv = ((PyArrayObject *)values[24]);
10679 goto __pyx_L4_argument_unpacking_done;
10680 __pyx_L5_argtuple_error:;
10681 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorStokes2D_1_sd", 1, 25, 25, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1756, __pyx_L3_error)
10683 __Pyx_AddTraceback(
"csubgridError.calculateSubgridErrorStokes2D_1_sd", __pyx_clineno, __pyx_lineno, __pyx_filename);
10684 __Pyx_RefNannyFinishContext();
10686 __pyx_L4_argument_unpacking_done:;
10687 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementDiameter), __pyx_ptype_5numpy_ndarray, 1,
"elementDiameter", 0))) __PYX_ERR(0, 1756, __pyx_L1_error)
10688 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u), __pyx_ptype_5numpy_ndarray, 1,
"u", 0))) __PYX_ERR(0, 1757, __pyx_L1_error)
10689 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), __pyx_ptype_5numpy_ndarray, 1,
"v", 0))) __PYX_ERR(0, 1758, __pyx_L1_error)
10690 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1,
"a", 0))) __PYX_ERR(0, 1759, __pyx_L1_error)
10691 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pdeResidualP), __pyx_ptype_5numpy_ndarray, 1,
"pdeResidualP", 0))) __PYX_ERR(0, 1760, __pyx_L1_error)
10692 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualP_du), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualP_du", 0))) __PYX_ERR(0, 1761, __pyx_L1_error)
10693 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualP_dv), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualP_dv", 0))) __PYX_ERR(0, 1762, __pyx_L1_error)
10694 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pdeResidualU), __pyx_ptype_5numpy_ndarray, 1,
"pdeResidualU", 0))) __PYX_ERR(0, 1763, __pyx_L1_error)
10695 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualU_dp), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualU_dp", 0))) __PYX_ERR(0, 1764, __pyx_L1_error)
10696 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualU_du), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualU_du", 0))) __PYX_ERR(0, 1765, __pyx_L1_error)
10697 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pdeResidualV), __pyx_ptype_5numpy_ndarray, 1,
"pdeResidualV", 0))) __PYX_ERR(0, 1766, __pyx_L1_error)
10698 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualV_dp), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualV_dp", 0))) __PYX_ERR(0, 1767, __pyx_L1_error)
10699 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpdeResidualV_dv), __pyx_ptype_5numpy_ndarray, 1,
"dpdeResidualV_dv", 0))) __PYX_ERR(0, 1768, __pyx_L1_error)
10700 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_subgridErrorP), __pyx_ptype_5numpy_ndarray, 1,
"subgridErrorP", 0))) __PYX_ERR(0, 1769, __pyx_L1_error)
10701 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorP_dp), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorP_dp", 0))) __PYX_ERR(0, 1770, __pyx_L1_error)
10702 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorP_du), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorP_du", 0))) __PYX_ERR(0, 1771, __pyx_L1_error)
10703 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorP_dv), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorP_dv", 0))) __PYX_ERR(0, 1772, __pyx_L1_error)
10704 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_subgridErrorU), __pyx_ptype_5numpy_ndarray, 1,
"subgridErrorU", 0))) __PYX_ERR(0, 1773, __pyx_L1_error)
10705 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorU_dp), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorU_dp", 0))) __PYX_ERR(0, 1774, __pyx_L1_error)
10706 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorU_du), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorU_du", 0))) __PYX_ERR(0, 1775, __pyx_L1_error)
10707 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorU_dv), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorU_dv", 0))) __PYX_ERR(0, 1776, __pyx_L1_error)
10708 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_subgridErrorV), __pyx_ptype_5numpy_ndarray, 1,
"subgridErrorV", 0))) __PYX_ERR(0, 1777, __pyx_L1_error)
10709 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorV_dp), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorV_dp", 0))) __PYX_ERR(0, 1778, __pyx_L1_error)
10710 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorV_du), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorV_du", 0))) __PYX_ERR(0, 1779, __pyx_L1_error)
10711 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dsubgridErrorV_dv), __pyx_ptype_5numpy_ndarray, 1,
"dsubgridErrorV_dv", 0))) __PYX_ERR(0, 1780, __pyx_L1_error)
10712 __pyx_r = __pyx_pf_13csubgridError_60calculateSubgridErrorStokes2D_1_sd(__pyx_self, __pyx_v_elementDiameter, __pyx_v_u, __pyx_v_v, __pyx_v_a, __pyx_v_pdeResidualP, __pyx_v_dpdeResidualP_du, __pyx_v_dpdeResidualP_dv, __pyx_v_pdeResidualU, __pyx_v_dpdeResidualU_dp, __pyx_v_dpdeResidualU_du, __pyx_v_pdeResidualV, __pyx_v_dpdeResidualV_dp, __pyx_v_dpdeResidualV_dv, __pyx_v_subgridErrorP, __pyx_v_dsubgridErrorP_dp, __pyx_v_dsubgridErrorP_du, __pyx_v_dsubgridErrorP_dv, __pyx_v_subgridErrorU, __pyx_v_dsubgridErrorU_dp, __pyx_v_dsubgridErrorU_du, __pyx_v_dsubgridErrorU_dv, __pyx_v_subgridErrorV, __pyx_v_dsubgridErrorV_dp, __pyx_v_dsubgridErrorV_du, __pyx_v_dsubgridErrorV_dv);
10719 __Pyx_RefNannyFinishContext();
10723 static PyObject *__pyx_pf_13csubgridError_60calculateSubgridErrorStokes2D_1_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_u, PyArrayObject *__pyx_v_v, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_pdeResidualP, PyArrayObject *__pyx_v_dpdeResidualP_du, PyArrayObject *__pyx_v_dpdeResidualP_dv, PyArrayObject *__pyx_v_pdeResidualU, PyArrayObject *__pyx_v_dpdeResidualU_dp, PyArrayObject *__pyx_v_dpdeResidualU_du, PyArrayObject *__pyx_v_pdeResidualV, PyArrayObject *__pyx_v_dpdeResidualV_dp, PyArrayObject *__pyx_v_dpdeResidualV_dv, PyArrayObject *__pyx_v_subgridErrorP, PyArrayObject *__pyx_v_dsubgridErrorP_dp, PyArrayObject *__pyx_v_dsubgridErrorP_du, PyArrayObject *__pyx_v_dsubgridErrorP_dv, PyArrayObject *__pyx_v_subgridErrorU, PyArrayObject *__pyx_v_dsubgridErrorU_dp, PyArrayObject *__pyx_v_dsubgridErrorU_du, PyArrayObject *__pyx_v_dsubgridErrorU_dv, PyArrayObject *__pyx_v_subgridErrorV, PyArrayObject *__pyx_v_dsubgridErrorV_dp, PyArrayObject *__pyx_v_dsubgridErrorV_du, PyArrayObject *__pyx_v_dsubgridErrorV_dv) {
10724 PyObject *__pyx_r = NULL;
10725 __Pyx_RefNannyDeclarations
10726 __Pyx_RefNannySetupContext(
"calculateSubgridErrorStokes2D_1_sd", 0);
10735 calculateSubgridErrorStokes2D_1_sd((__pyx_v_dsubgridErrorP_du->dimensions[0]), (__pyx_v_dsubgridErrorP_du->dimensions[1]), (__pyx_v_dsubgridErrorP_du->dimensions[2]), 2, ((
double *)__pyx_v_elementDiameter->data), ((
double *)__pyx_v_u->data), ((
double *)__pyx_v_v->data), ((
double *)__pyx_v_a->data), ((
double *)__pyx_v_pdeResidualP->data), ((
double *)__pyx_v_dpdeResidualP_du->data), ((
double *)__pyx_v_dpdeResidualP_dv->data), ((
double *)__pyx_v_pdeResidualU->data), ((
double *)__pyx_v_dpdeResidualU_dp->data), ((
double *)__pyx_v_dpdeResidualU_du->data), ((
double *)__pyx_v_pdeResidualV->data), ((
double *)__pyx_v_dpdeResidualV_dp->data), ((
double *)__pyx_v_dpdeResidualV_dv->data), ((
double *)__pyx_v_subgridErrorP->data), ((
double *)__pyx_v_dsubgridErrorP_dp->data), ((
double *)__pyx_v_dsubgridErrorP_du->data), ((
double *)__pyx_v_dsubgridErrorP_dv->data), ((
double *)__pyx_v_subgridErrorU->data), ((
double *)__pyx_v_dsubgridErrorU_dp->data), ((
double *)__pyx_v_dsubgridErrorU_du->data), ((
double *)__pyx_v_dsubgridErrorU_dv->data), ((
double *)__pyx_v_subgridErrorV->data), ((
double *)__pyx_v_dsubgridErrorV_dp->data), ((
double *)__pyx_v_dsubgridErrorV_du->data), ((
double *)__pyx_v_dsubgridErrorV_dv->data));
10746 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10747 __Pyx_XGIVEREF(__pyx_r);
10748 __Pyx_RefNannyFinishContext();
10761 static PyObject *__pyx_pw_13csubgridError_63calculateSubgridErrorShallowWater1D(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
10762 static PyMethodDef __pyx_mdef_13csubgridError_63calculateSubgridErrorShallowWater1D = {
"calculateSubgridErrorShallowWater1D", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_13csubgridError_63calculateSubgridErrorShallowWater1D, METH_VARARGS|METH_KEYWORDS, 0};
10763 static PyObject *__pyx_pw_13csubgridError_63calculateSubgridErrorShallowWater1D(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
10765 PyArrayObject *__pyx_v_elementDiameter = 0;
10766 PyArrayObject *__pyx_v_h = 0;
10767 PyArrayObject *__pyx_v_hu = 0;
10768 PyArrayObject *__pyx_v_cfl_1 = 0;
10769 PyArrayObject *__pyx_v_cfl_2 = 0;
10770 int __pyx_lineno = 0;
10771 const char *__pyx_filename = NULL;
10772 int __pyx_clineno = 0;
10773 PyObject *__pyx_r = 0;
10774 __Pyx_RefNannyDeclarations
10775 __Pyx_RefNannySetupContext(
"calculateSubgridErrorShallowWater1D (wrapper)", 0);
10777 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_g,&__pyx_n_s_elementDiameter,&__pyx_n_s_h,&__pyx_n_s_hu,&__pyx_n_s_cfl_1,&__pyx_n_s_cfl_2,0};
10778 PyObject* values[6] = {0,0,0,0,0,0};
10779 if (unlikely(__pyx_kwds)) {
10780 Py_ssize_t kw_args;
10781 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
10782 switch (pos_args) {
10783 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
10784 CYTHON_FALLTHROUGH;
10785 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
10786 CYTHON_FALLTHROUGH;
10787 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
10788 CYTHON_FALLTHROUGH;
10789 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
10790 CYTHON_FALLTHROUGH;
10791 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
10792 CYTHON_FALLTHROUGH;
10793 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
10794 CYTHON_FALLTHROUGH;
10796 default:
goto __pyx_L5_argtuple_error;
10798 kw_args = PyDict_Size(__pyx_kwds);
10799 switch (pos_args) {
10801 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_g)) != 0)) kw_args--;
10802 else goto __pyx_L5_argtuple_error;
10803 CYTHON_FALLTHROUGH;
10805 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementDiameter)) != 0)) kw_args--;
10807 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorShallowWater1D", 1, 6, 6, 1); __PYX_ERR(0, 1810, __pyx_L3_error)
10809 CYTHON_FALLTHROUGH;
10811 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_h)) != 0)) kw_args--;
10813 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorShallowWater1D", 1, 6, 6, 2); __PYX_ERR(0, 1810, __pyx_L3_error)
10815 CYTHON_FALLTHROUGH;
10817 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hu)) != 0)) kw_args--;
10819 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorShallowWater1D", 1, 6, 6, 3); __PYX_ERR(0, 1810, __pyx_L3_error)
10821 CYTHON_FALLTHROUGH;
10823 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cfl_1)) != 0)) kw_args--;
10825 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorShallowWater1D", 1, 6, 6, 4); __PYX_ERR(0, 1810, __pyx_L3_error)
10827 CYTHON_FALLTHROUGH;
10829 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cfl_2)) != 0)) kw_args--;
10831 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorShallowWater1D", 1, 6, 6, 5); __PYX_ERR(0, 1810, __pyx_L3_error)
10834 if (unlikely(kw_args > 0)) {
10835 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"calculateSubgridErrorShallowWater1D") < 0)) __PYX_ERR(0, 1810, __pyx_L3_error)
10837 }
else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
10838 goto __pyx_L5_argtuple_error;
10840 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
10841 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
10842 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
10843 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
10844 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
10845 values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
10847 __pyx_v_g = __pyx_PyFloat_AsDouble(values[0]);
if (unlikely((__pyx_v_g == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1810, __pyx_L3_error)
10848 __pyx_v_elementDiameter = ((PyArrayObject *)values[1]);
10849 __pyx_v_h = ((PyArrayObject *)values[2]);
10850 __pyx_v_hu = ((PyArrayObject *)values[3]);
10851 __pyx_v_cfl_1 = ((PyArrayObject *)values[4]);
10852 __pyx_v_cfl_2 = ((PyArrayObject *)values[5]);
10854 goto __pyx_L4_argument_unpacking_done;
10855 __pyx_L5_argtuple_error:;
10856 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorShallowWater1D", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1810, __pyx_L3_error)
10858 __Pyx_AddTraceback(
"csubgridError.calculateSubgridErrorShallowWater1D", __pyx_clineno, __pyx_lineno, __pyx_filename);
10859 __Pyx_RefNannyFinishContext();
10861 __pyx_L4_argument_unpacking_done:;
10862 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementDiameter), __pyx_ptype_5numpy_ndarray, 1,
"elementDiameter", 0))) __PYX_ERR(0, 1811, __pyx_L1_error)
10863 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_h), __pyx_ptype_5numpy_ndarray, 1,
"h", 0))) __PYX_ERR(0, 1812, __pyx_L1_error)
10864 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_hu), __pyx_ptype_5numpy_ndarray, 1,
"hu", 0))) __PYX_ERR(0, 1813, __pyx_L1_error)
10865 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cfl_1), __pyx_ptype_5numpy_ndarray, 1,
"cfl_1", 0))) __PYX_ERR(0, 1814, __pyx_L1_error)
10866 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cfl_2), __pyx_ptype_5numpy_ndarray, 1,
"cfl_2", 0))) __PYX_ERR(0, 1815, __pyx_L1_error)
10867 __pyx_r = __pyx_pf_13csubgridError_62calculateSubgridErrorShallowWater1D(__pyx_self, __pyx_v_g, __pyx_v_elementDiameter, __pyx_v_h, __pyx_v_hu, __pyx_v_cfl_1, __pyx_v_cfl_2);
10874 __Pyx_RefNannyFinishContext();
10878 static PyObject *__pyx_pf_13csubgridError_62calculateSubgridErrorShallowWater1D(CYTHON_UNUSED PyObject *__pyx_self,
double __pyx_v_g, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_h, PyArrayObject *__pyx_v_hu, PyArrayObject *__pyx_v_cfl_1, PyArrayObject *__pyx_v_cfl_2) {
10879 PyObject *__pyx_r = NULL;
10880 __Pyx_RefNannyDeclarations
10881 __Pyx_RefNannySetupContext(
"calculateSubgridErrorShallowWater1D", 0);
10890 calculateSubgridErrorShallowWater1D((__pyx_v_h->dimensions[0]), (__pyx_v_h->dimensions[1]), __pyx_v_g, ((
double *)__pyx_v_elementDiameter->data), ((
double *)__pyx_v_h->data), ((
double *)__pyx_v_hu->data), ((
double *)__pyx_v_cfl_1->data), ((
double *)__pyx_v_cfl_2->data));
10901 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10902 __Pyx_XGIVEREF(__pyx_r);
10903 __Pyx_RefNannyFinishContext();
10916 static PyObject *__pyx_pw_13csubgridError_65calculateSubgridErrorShallowWater2D(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
10917 static PyMethodDef __pyx_mdef_13csubgridError_65calculateSubgridErrorShallowWater2D = {
"calculateSubgridErrorShallowWater2D", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_13csubgridError_65calculateSubgridErrorShallowWater2D, METH_VARARGS|METH_KEYWORDS, 0};
10918 static PyObject *__pyx_pw_13csubgridError_65calculateSubgridErrorShallowWater2D(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
10920 PyArrayObject *__pyx_v_elementDiameter = 0;
10921 PyArrayObject *__pyx_v_h = 0;
10922 PyArrayObject *__pyx_v_hu = 0;
10923 PyArrayObject *__pyx_v_hv = 0;
10924 PyArrayObject *__pyx_v_cfl_1 = 0;
10925 PyArrayObject *__pyx_v_cfl_2 = 0;
10926 PyArrayObject *__pyx_v_cfl_3 = 0;
10927 int __pyx_lineno = 0;
10928 const char *__pyx_filename = NULL;
10929 int __pyx_clineno = 0;
10930 PyObject *__pyx_r = 0;
10931 __Pyx_RefNannyDeclarations
10932 __Pyx_RefNannySetupContext(
"calculateSubgridErrorShallowWater2D (wrapper)", 0);
10934 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_g,&__pyx_n_s_elementDiameter,&__pyx_n_s_h,&__pyx_n_s_hu,&__pyx_n_s_hv,&__pyx_n_s_cfl_1,&__pyx_n_s_cfl_2,&__pyx_n_s_cfl_3,0};
10935 PyObject* values[8] = {0,0,0,0,0,0,0,0};
10936 if (unlikely(__pyx_kwds)) {
10937 Py_ssize_t kw_args;
10938 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
10939 switch (pos_args) {
10940 case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
10941 CYTHON_FALLTHROUGH;
10942 case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
10943 CYTHON_FALLTHROUGH;
10944 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
10945 CYTHON_FALLTHROUGH;
10946 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
10947 CYTHON_FALLTHROUGH;
10948 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
10949 CYTHON_FALLTHROUGH;
10950 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
10951 CYTHON_FALLTHROUGH;
10952 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
10953 CYTHON_FALLTHROUGH;
10954 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
10955 CYTHON_FALLTHROUGH;
10957 default:
goto __pyx_L5_argtuple_error;
10959 kw_args = PyDict_Size(__pyx_kwds);
10960 switch (pos_args) {
10962 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_g)) != 0)) kw_args--;
10963 else goto __pyx_L5_argtuple_error;
10964 CYTHON_FALLTHROUGH;
10966 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementDiameter)) != 0)) kw_args--;
10968 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorShallowWater2D", 1, 8, 8, 1); __PYX_ERR(0, 1824, __pyx_L3_error)
10970 CYTHON_FALLTHROUGH;
10972 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_h)) != 0)) kw_args--;
10974 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorShallowWater2D", 1, 8, 8, 2); __PYX_ERR(0, 1824, __pyx_L3_error)
10976 CYTHON_FALLTHROUGH;
10978 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hu)) != 0)) kw_args--;
10980 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorShallowWater2D", 1, 8, 8, 3); __PYX_ERR(0, 1824, __pyx_L3_error)
10982 CYTHON_FALLTHROUGH;
10984 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hv)) != 0)) kw_args--;
10986 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorShallowWater2D", 1, 8, 8, 4); __PYX_ERR(0, 1824, __pyx_L3_error)
10988 CYTHON_FALLTHROUGH;
10990 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cfl_1)) != 0)) kw_args--;
10992 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorShallowWater2D", 1, 8, 8, 5); __PYX_ERR(0, 1824, __pyx_L3_error)
10994 CYTHON_FALLTHROUGH;
10996 if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cfl_2)) != 0)) kw_args--;
10998 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorShallowWater2D", 1, 8, 8, 6); __PYX_ERR(0, 1824, __pyx_L3_error)
11000 CYTHON_FALLTHROUGH;
11002 if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cfl_3)) != 0)) kw_args--;
11004 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorShallowWater2D", 1, 8, 8, 7); __PYX_ERR(0, 1824, __pyx_L3_error)
11007 if (unlikely(kw_args > 0)) {
11008 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"calculateSubgridErrorShallowWater2D") < 0)) __PYX_ERR(0, 1824, __pyx_L3_error)
11010 }
else if (PyTuple_GET_SIZE(__pyx_args) != 8) {
11011 goto __pyx_L5_argtuple_error;
11013 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
11014 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
11015 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
11016 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
11017 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
11018 values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
11019 values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
11020 values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
11022 __pyx_v_g = __pyx_PyFloat_AsDouble(values[0]);
if (unlikely((__pyx_v_g == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1824, __pyx_L3_error)
11023 __pyx_v_elementDiameter = ((PyArrayObject *)values[1]);
11024 __pyx_v_h = ((PyArrayObject *)values[2]);
11025 __pyx_v_hu = ((PyArrayObject *)values[3]);
11026 __pyx_v_hv = ((PyArrayObject *)values[4]);
11027 __pyx_v_cfl_1 = ((PyArrayObject *)values[5]);
11028 __pyx_v_cfl_2 = ((PyArrayObject *)values[6]);
11029 __pyx_v_cfl_3 = ((PyArrayObject *)values[7]);
11031 goto __pyx_L4_argument_unpacking_done;
11032 __pyx_L5_argtuple_error:;
11033 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorShallowWater2D", 1, 8, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1824, __pyx_L3_error)
11035 __Pyx_AddTraceback(
"csubgridError.calculateSubgridErrorShallowWater2D", __pyx_clineno, __pyx_lineno, __pyx_filename);
11036 __Pyx_RefNannyFinishContext();
11038 __pyx_L4_argument_unpacking_done:;
11039 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementDiameter), __pyx_ptype_5numpy_ndarray, 1,
"elementDiameter", 0))) __PYX_ERR(0, 1825, __pyx_L1_error)
11040 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_h), __pyx_ptype_5numpy_ndarray, 1,
"h", 0))) __PYX_ERR(0, 1826, __pyx_L1_error)
11041 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_hu), __pyx_ptype_5numpy_ndarray, 1,
"hu", 0))) __PYX_ERR(0, 1827, __pyx_L1_error)
11042 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_hv), __pyx_ptype_5numpy_ndarray, 1,
"hv", 0))) __PYX_ERR(0, 1828, __pyx_L1_error)
11043 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cfl_1), __pyx_ptype_5numpy_ndarray, 1,
"cfl_1", 0))) __PYX_ERR(0, 1829, __pyx_L1_error)
11044 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cfl_2), __pyx_ptype_5numpy_ndarray, 1,
"cfl_2", 0))) __PYX_ERR(0, 1830, __pyx_L1_error)
11045 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cfl_3), __pyx_ptype_5numpy_ndarray, 1,
"cfl_3", 0))) __PYX_ERR(0, 1831, __pyx_L1_error)
11046 __pyx_r = __pyx_pf_13csubgridError_64calculateSubgridErrorShallowWater2D(__pyx_self, __pyx_v_g, __pyx_v_elementDiameter, __pyx_v_h, __pyx_v_hu, __pyx_v_hv, __pyx_v_cfl_1, __pyx_v_cfl_2, __pyx_v_cfl_3);
11053 __Pyx_RefNannyFinishContext();
11057 static PyObject *__pyx_pf_13csubgridError_64calculateSubgridErrorShallowWater2D(CYTHON_UNUSED PyObject *__pyx_self,
double __pyx_v_g, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_h, PyArrayObject *__pyx_v_hu, PyArrayObject *__pyx_v_hv, PyArrayObject *__pyx_v_cfl_1, PyArrayObject *__pyx_v_cfl_2, PyArrayObject *__pyx_v_cfl_3) {
11058 PyObject *__pyx_r = NULL;
11059 __Pyx_RefNannyDeclarations
11060 __Pyx_RefNannySetupContext(
"calculateSubgridErrorShallowWater2D", 0);
11069 calculateSubgridErrorShallowWater2D((__pyx_v_h->dimensions[0]), (__pyx_v_h->dimensions[1]), __pyx_v_g, ((
double *)__pyx_v_elementDiameter->data), ((
double *)__pyx_v_h->data), ((
double *)__pyx_v_hu->data), ((
double *)__pyx_v_hv->data), ((
double *)__pyx_v_cfl_1->data), ((
double *)__pyx_v_cfl_2->data), ((
double *)__pyx_v_cfl_3->data));
11080 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11081 __Pyx_XGIVEREF(__pyx_r);
11082 __Pyx_RefNannyFinishContext();
11095 static PyObject *__pyx_pw_13csubgridError_67calculateSubgridError_Harari_tau_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
11096 static PyMethodDef __pyx_mdef_13csubgridError_67calculateSubgridError_Harari_tau_sd = {
"calculateSubgridError_Harari_tau_sd", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_13csubgridError_67calculateSubgridError_Harari_tau_sd, METH_VARARGS|METH_KEYWORDS, 0};
11097 static PyObject *__pyx_pw_13csubgridError_67calculateSubgridError_Harari_tau_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
11098 int __pyx_v_nSpace;
11100 PyArrayObject *__pyx_v_rowptr = 0;
11101 PyArrayObject *__pyx_v_colind = 0;
11102 PyArrayObject *__pyx_v_elementDiameter = 0;
11103 PyArrayObject *__pyx_v_a = 0;
11104 PyArrayObject *__pyx_v_tau = 0;
11105 int __pyx_lineno = 0;
11106 const char *__pyx_filename = NULL;
11107 int __pyx_clineno = 0;
11108 PyObject *__pyx_r = 0;
11109 __Pyx_RefNannyDeclarations
11110 __Pyx_RefNannySetupContext(
"calculateSubgridError_Harari_tau_sd (wrapper)", 0);
11112 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nSpace,&__pyx_n_s_dt,&__pyx_n_s_rowptr,&__pyx_n_s_colind,&__pyx_n_s_elementDiameter,&__pyx_n_s_a,&__pyx_n_s_tau,0};
11113 PyObject* values[7] = {0,0,0,0,0,0,0};
11114 if (unlikely(__pyx_kwds)) {
11115 Py_ssize_t kw_args;
11116 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
11117 switch (pos_args) {
11118 case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
11119 CYTHON_FALLTHROUGH;
11120 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
11121 CYTHON_FALLTHROUGH;
11122 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
11123 CYTHON_FALLTHROUGH;
11124 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
11125 CYTHON_FALLTHROUGH;
11126 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
11127 CYTHON_FALLTHROUGH;
11128 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
11129 CYTHON_FALLTHROUGH;
11130 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
11131 CYTHON_FALLTHROUGH;
11133 default:
goto __pyx_L5_argtuple_error;
11135 kw_args = PyDict_Size(__pyx_kwds);
11136 switch (pos_args) {
11138 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nSpace)) != 0)) kw_args--;
11139 else goto __pyx_L5_argtuple_error;
11140 CYTHON_FALLTHROUGH;
11142 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dt)) != 0)) kw_args--;
11144 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_Harari_tau_sd", 1, 7, 7, 1); __PYX_ERR(0, 1842, __pyx_L3_error)
11146 CYTHON_FALLTHROUGH;
11148 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rowptr)) != 0)) kw_args--;
11150 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_Harari_tau_sd", 1, 7, 7, 2); __PYX_ERR(0, 1842, __pyx_L3_error)
11152 CYTHON_FALLTHROUGH;
11154 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_colind)) != 0)) kw_args--;
11156 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_Harari_tau_sd", 1, 7, 7, 3); __PYX_ERR(0, 1842, __pyx_L3_error)
11158 CYTHON_FALLTHROUGH;
11160 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementDiameter)) != 0)) kw_args--;
11162 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_Harari_tau_sd", 1, 7, 7, 4); __PYX_ERR(0, 1842, __pyx_L3_error)
11164 CYTHON_FALLTHROUGH;
11166 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
11168 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_Harari_tau_sd", 1, 7, 7, 5); __PYX_ERR(0, 1842, __pyx_L3_error)
11170 CYTHON_FALLTHROUGH;
11172 if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tau)) != 0)) kw_args--;
11174 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_Harari_tau_sd", 1, 7, 7, 6); __PYX_ERR(0, 1842, __pyx_L3_error)
11177 if (unlikely(kw_args > 0)) {
11178 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"calculateSubgridError_Harari_tau_sd") < 0)) __PYX_ERR(0, 1842, __pyx_L3_error)
11180 }
else if (PyTuple_GET_SIZE(__pyx_args) != 7) {
11181 goto __pyx_L5_argtuple_error;
11183 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
11184 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
11185 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
11186 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
11187 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
11188 values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
11189 values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
11191 __pyx_v_nSpace = __Pyx_PyInt_As_int(values[0]);
if (unlikely((__pyx_v_nSpace == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1842, __pyx_L3_error)
11192 __pyx_v_dt = __pyx_PyFloat_AsDouble(values[1]);
if (unlikely((__pyx_v_dt == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1843, __pyx_L3_error)
11193 __pyx_v_rowptr = ((PyArrayObject *)values[2]);
11194 __pyx_v_colind = ((PyArrayObject *)values[3]);
11195 __pyx_v_elementDiameter = ((PyArrayObject *)values[4]);
11196 __pyx_v_a = ((PyArrayObject *)values[5]);
11197 __pyx_v_tau = ((PyArrayObject *)values[6]);
11199 goto __pyx_L4_argument_unpacking_done;
11200 __pyx_L5_argtuple_error:;
11201 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_Harari_tau_sd", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1842, __pyx_L3_error)
11203 __Pyx_AddTraceback(
"csubgridError.calculateSubgridError_Harari_tau_sd", __pyx_clineno, __pyx_lineno, __pyx_filename);
11204 __Pyx_RefNannyFinishContext();
11206 __pyx_L4_argument_unpacking_done:;
11207 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rowptr), __pyx_ptype_5numpy_ndarray, 1,
"rowptr", 0))) __PYX_ERR(0, 1844, __pyx_L1_error)
11208 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_colind), __pyx_ptype_5numpy_ndarray, 1,
"colind", 0))) __PYX_ERR(0, 1845, __pyx_L1_error)
11209 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementDiameter), __pyx_ptype_5numpy_ndarray, 1,
"elementDiameter", 0))) __PYX_ERR(0, 1846, __pyx_L1_error)
11210 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1,
"a", 0))) __PYX_ERR(0, 1847, __pyx_L1_error)
11211 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tau), __pyx_ptype_5numpy_ndarray, 1,
"tau", 0))) __PYX_ERR(0, 1848, __pyx_L1_error)
11212 __pyx_r = __pyx_pf_13csubgridError_66calculateSubgridError_Harari_tau_sd(__pyx_self, __pyx_v_nSpace, __pyx_v_dt, __pyx_v_rowptr, __pyx_v_colind, __pyx_v_elementDiameter, __pyx_v_a, __pyx_v_tau);
11219 __Pyx_RefNannyFinishContext();
11223 static PyObject *__pyx_pf_13csubgridError_66calculateSubgridError_Harari_tau_sd(CYTHON_UNUSED PyObject *__pyx_self,
int __pyx_v_nSpace,
double __pyx_v_dt, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_tau) {
11224 PyObject *__pyx_r = NULL;
11225 __Pyx_RefNannyDeclarations
11226 __Pyx_RefNannySetupContext(
"calculateSubgridError_Harari_tau_sd", 0);
11235 calculateSubgridError_Harari_tau_sd((__pyx_v_tau->dimensions[0]), (__pyx_v_tau->dimensions[1]), __pyx_v_nSpace, __pyx_v_dt, ((
int *)__pyx_v_rowptr->data), ((
int *)__pyx_v_colind->data), ((
double *)__pyx_v_elementDiameter->data), ((
double *)__pyx_v_a->data), ((
double *)__pyx_v_tau->data));
11246 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11247 __Pyx_XGIVEREF(__pyx_r);
11248 __Pyx_RefNannyFinishContext();
11261 static PyObject *__pyx_pw_13csubgridError_69calculateSubgridErrorGradient_tauRes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
11262 static PyMethodDef __pyx_mdef_13csubgridError_69calculateSubgridErrorGradient_tauRes = {
"calculateSubgridErrorGradient_tauRes", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_13csubgridError_69calculateSubgridErrorGradient_tauRes, METH_VARARGS|METH_KEYWORDS, 0};
11263 static PyObject *__pyx_pw_13csubgridError_69calculateSubgridErrorGradient_tauRes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
11264 PyArrayObject *__pyx_v_tau_gradient = 0;
11265 PyArrayObject *__pyx_v_grad_pdeResidual = 0;
11266 PyArrayObject *__pyx_v_grad_subgridError = 0;
11267 int __pyx_lineno = 0;
11268 const char *__pyx_filename = NULL;
11269 int __pyx_clineno = 0;
11270 PyObject *__pyx_r = 0;
11271 __Pyx_RefNannyDeclarations
11272 __Pyx_RefNannySetupContext(
"calculateSubgridErrorGradient_tauRes (wrapper)", 0);
11274 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tau_gradient,&__pyx_n_s_grad_pdeResidual,&__pyx_n_s_grad_subgridError,0};
11275 PyObject* values[3] = {0,0,0};
11276 if (unlikely(__pyx_kwds)) {
11277 Py_ssize_t kw_args;
11278 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
11279 switch (pos_args) {
11280 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
11281 CYTHON_FALLTHROUGH;
11282 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
11283 CYTHON_FALLTHROUGH;
11284 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
11285 CYTHON_FALLTHROUGH;
11287 default:
goto __pyx_L5_argtuple_error;
11289 kw_args = PyDict_Size(__pyx_kwds);
11290 switch (pos_args) {
11292 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tau_gradient)) != 0)) kw_args--;
11293 else goto __pyx_L5_argtuple_error;
11294 CYTHON_FALLTHROUGH;
11296 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_pdeResidual)) != 0)) kw_args--;
11298 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorGradient_tauRes", 1, 3, 3, 1); __PYX_ERR(0, 1858, __pyx_L3_error)
11300 CYTHON_FALLTHROUGH;
11302 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_subgridError)) != 0)) kw_args--;
11304 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorGradient_tauRes", 1, 3, 3, 2); __PYX_ERR(0, 1858, __pyx_L3_error)
11307 if (unlikely(kw_args > 0)) {
11308 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"calculateSubgridErrorGradient_tauRes") < 0)) __PYX_ERR(0, 1858, __pyx_L3_error)
11310 }
else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
11311 goto __pyx_L5_argtuple_error;
11313 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
11314 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
11315 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
11317 __pyx_v_tau_gradient = ((PyArrayObject *)values[0]);
11318 __pyx_v_grad_pdeResidual = ((PyArrayObject *)values[1]);
11319 __pyx_v_grad_subgridError = ((PyArrayObject *)values[2]);
11321 goto __pyx_L4_argument_unpacking_done;
11322 __pyx_L5_argtuple_error:;
11323 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridErrorGradient_tauRes", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1858, __pyx_L3_error)
11325 __Pyx_AddTraceback(
"csubgridError.calculateSubgridErrorGradient_tauRes", __pyx_clineno, __pyx_lineno, __pyx_filename);
11326 __Pyx_RefNannyFinishContext();
11328 __pyx_L4_argument_unpacking_done:;
11329 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tau_gradient), __pyx_ptype_5numpy_ndarray, 1,
"tau_gradient", 0))) __PYX_ERR(0, 1858, __pyx_L1_error)
11330 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_pdeResidual), __pyx_ptype_5numpy_ndarray, 1,
"grad_pdeResidual", 0))) __PYX_ERR(0, 1859, __pyx_L1_error)
11331 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_subgridError), __pyx_ptype_5numpy_ndarray, 1,
"grad_subgridError", 0))) __PYX_ERR(0, 1860, __pyx_L1_error)
11332 __pyx_r = __pyx_pf_13csubgridError_68calculateSubgridErrorGradient_tauRes(__pyx_self, __pyx_v_tau_gradient, __pyx_v_grad_pdeResidual, __pyx_v_grad_subgridError);
11339 __Pyx_RefNannyFinishContext();
11343 static PyObject *__pyx_pf_13csubgridError_68calculateSubgridErrorGradient_tauRes(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_tau_gradient, PyArrayObject *__pyx_v_grad_pdeResidual, PyArrayObject *__pyx_v_grad_subgridError) {
11344 PyObject *__pyx_r = NULL;
11345 __Pyx_RefNannyDeclarations
11346 __Pyx_RefNannySetupContext(
"calculateSubgridErrorGradient_tauRes", 0);
11355 calculateSubgridErrorGradient_tauRes((__pyx_v_grad_subgridError->dimensions[0]), (__pyx_v_grad_subgridError->dimensions[1]), (__pyx_v_grad_subgridError->dimensions[2]), ((
double *)__pyx_v_tau_gradient->data), ((
double *)__pyx_v_grad_pdeResidual->data), ((
double *)__pyx_v_grad_subgridError->data));
11366 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11367 __Pyx_XGIVEREF(__pyx_r);
11368 __Pyx_RefNannyFinishContext();
11381 static PyObject *__pyx_pw_13csubgridError_71calculateSubgridError_ADR_Sangalli_tau_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
11382 static PyMethodDef __pyx_mdef_13csubgridError_71calculateSubgridError_ADR_Sangalli_tau_sd = {
"calculateSubgridError_ADR_Sangalli_tau_sd", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_13csubgridError_71calculateSubgridError_ADR_Sangalli_tau_sd, METH_VARARGS|METH_KEYWORDS, 0};
11383 static PyObject *__pyx_pw_13csubgridError_71calculateSubgridError_ADR_Sangalli_tau_sd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
11384 PyArrayObject *__pyx_v_rowptr = 0;
11385 PyArrayObject *__pyx_v_colind = 0;
11386 PyArrayObject *__pyx_v_inverseJ = 0;
11387 PyArrayObject *__pyx_v_dmt = 0;
11388 PyArrayObject *__pyx_v_df = 0;
11389 PyArrayObject *__pyx_v_a = 0;
11390 PyArrayObject *__pyx_v_da = 0;
11391 PyArrayObject *__pyx_v_grad_phi = 0;
11392 PyArrayObject *__pyx_v_dphi = 0;
11393 PyArrayObject *__pyx_v_dr = 0;
11394 PyArrayObject *__pyx_v_pe = 0;
11395 PyArrayObject *__pyx_v_cfl = 0;
11396 PyArrayObject *__pyx_v_tau = 0;
11397 PyArrayObject *__pyx_v_tau_gradient = 0;
11398 int __pyx_lineno = 0;
11399 const char *__pyx_filename = NULL;
11400 int __pyx_clineno = 0;
11401 PyObject *__pyx_r = 0;
11402 __Pyx_RefNannyDeclarations
11403 __Pyx_RefNannySetupContext(
"calculateSubgridError_ADR_Sangalli_tau_sd (wrapper)", 0);
11405 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rowptr,&__pyx_n_s_colind,&__pyx_n_s_inverseJ,&__pyx_n_s_dmt,&__pyx_n_s_df,&__pyx_n_s_a,&__pyx_n_s_da,&__pyx_n_s_grad_phi,&__pyx_n_s_dphi,&__pyx_n_s_dr,&__pyx_n_s_pe,&__pyx_n_s_cfl,&__pyx_n_s_tau,&__pyx_n_s_tau_gradient,0};
11406 PyObject* values[14] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0};
11407 if (unlikely(__pyx_kwds)) {
11408 Py_ssize_t kw_args;
11409 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
11410 switch (pos_args) {
11411 case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
11412 CYTHON_FALLTHROUGH;
11413 case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
11414 CYTHON_FALLTHROUGH;
11415 case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
11416 CYTHON_FALLTHROUGH;
11417 case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
11418 CYTHON_FALLTHROUGH;
11419 case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
11420 CYTHON_FALLTHROUGH;
11421 case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
11422 CYTHON_FALLTHROUGH;
11423 case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
11424 CYTHON_FALLTHROUGH;
11425 case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
11426 CYTHON_FALLTHROUGH;
11427 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
11428 CYTHON_FALLTHROUGH;
11429 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
11430 CYTHON_FALLTHROUGH;
11431 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
11432 CYTHON_FALLTHROUGH;
11433 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
11434 CYTHON_FALLTHROUGH;
11435 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
11436 CYTHON_FALLTHROUGH;
11437 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
11438 CYTHON_FALLTHROUGH;
11440 default:
goto __pyx_L5_argtuple_error;
11442 kw_args = PyDict_Size(__pyx_kwds);
11443 switch (pos_args) {
11445 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rowptr)) != 0)) kw_args--;
11446 else goto __pyx_L5_argtuple_error;
11447 CYTHON_FALLTHROUGH;
11449 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_colind)) != 0)) kw_args--;
11451 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_Sangalli_tau_sd", 1, 14, 14, 1); __PYX_ERR(0, 1867, __pyx_L3_error)
11453 CYTHON_FALLTHROUGH;
11455 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inverseJ)) != 0)) kw_args--;
11457 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_Sangalli_tau_sd", 1, 14, 14, 2); __PYX_ERR(0, 1867, __pyx_L3_error)
11459 CYTHON_FALLTHROUGH;
11461 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dmt)) != 0)) kw_args--;
11463 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_Sangalli_tau_sd", 1, 14, 14, 3); __PYX_ERR(0, 1867, __pyx_L3_error)
11465 CYTHON_FALLTHROUGH;
11467 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_df)) != 0)) kw_args--;
11469 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_Sangalli_tau_sd", 1, 14, 14, 4); __PYX_ERR(0, 1867, __pyx_L3_error)
11471 CYTHON_FALLTHROUGH;
11473 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
11475 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_Sangalli_tau_sd", 1, 14, 14, 5); __PYX_ERR(0, 1867, __pyx_L3_error)
11477 CYTHON_FALLTHROUGH;
11479 if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_da)) != 0)) kw_args--;
11481 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_Sangalli_tau_sd", 1, 14, 14, 6); __PYX_ERR(0, 1867, __pyx_L3_error)
11483 CYTHON_FALLTHROUGH;
11485 if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_phi)) != 0)) kw_args--;
11487 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_Sangalli_tau_sd", 1, 14, 14, 7); __PYX_ERR(0, 1867, __pyx_L3_error)
11489 CYTHON_FALLTHROUGH;
11491 if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dphi)) != 0)) kw_args--;
11493 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_Sangalli_tau_sd", 1, 14, 14, 8); __PYX_ERR(0, 1867, __pyx_L3_error)
11495 CYTHON_FALLTHROUGH;
11497 if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dr)) != 0)) kw_args--;
11499 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_Sangalli_tau_sd", 1, 14, 14, 9); __PYX_ERR(0, 1867, __pyx_L3_error)
11501 CYTHON_FALLTHROUGH;
11503 if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pe)) != 0)) kw_args--;
11505 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_Sangalli_tau_sd", 1, 14, 14, 10); __PYX_ERR(0, 1867, __pyx_L3_error)
11507 CYTHON_FALLTHROUGH;
11509 if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cfl)) != 0)) kw_args--;
11511 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_Sangalli_tau_sd", 1, 14, 14, 11); __PYX_ERR(0, 1867, __pyx_L3_error)
11513 CYTHON_FALLTHROUGH;
11515 if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tau)) != 0)) kw_args--;
11517 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_Sangalli_tau_sd", 1, 14, 14, 12); __PYX_ERR(0, 1867, __pyx_L3_error)
11519 CYTHON_FALLTHROUGH;
11521 if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tau_gradient)) != 0)) kw_args--;
11523 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_Sangalli_tau_sd", 1, 14, 14, 13); __PYX_ERR(0, 1867, __pyx_L3_error)
11526 if (unlikely(kw_args > 0)) {
11527 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"calculateSubgridError_ADR_Sangalli_tau_sd") < 0)) __PYX_ERR(0, 1867, __pyx_L3_error)
11529 }
else if (PyTuple_GET_SIZE(__pyx_args) != 14) {
11530 goto __pyx_L5_argtuple_error;
11532 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
11533 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
11534 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
11535 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
11536 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
11537 values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
11538 values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
11539 values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
11540 values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
11541 values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
11542 values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
11543 values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
11544 values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
11545 values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
11547 __pyx_v_rowptr = ((PyArrayObject *)values[0]);
11548 __pyx_v_colind = ((PyArrayObject *)values[1]);
11549 __pyx_v_inverseJ = ((PyArrayObject *)values[2]);
11550 __pyx_v_dmt = ((PyArrayObject *)values[3]);
11551 __pyx_v_df = ((PyArrayObject *)values[4]);
11552 __pyx_v_a = ((PyArrayObject *)values[5]);
11553 __pyx_v_da = ((PyArrayObject *)values[6]);
11554 __pyx_v_grad_phi = ((PyArrayObject *)values[7]);
11555 __pyx_v_dphi = ((PyArrayObject *)values[8]);
11556 __pyx_v_dr = ((PyArrayObject *)values[9]);
11557 __pyx_v_pe = ((PyArrayObject *)values[10]);
11558 __pyx_v_cfl = ((PyArrayObject *)values[11]);
11559 __pyx_v_tau = ((PyArrayObject *)values[12]);
11560 __pyx_v_tau_gradient = ((PyArrayObject *)values[13]);
11562 goto __pyx_L4_argument_unpacking_done;
11563 __pyx_L5_argtuple_error:;
11564 __Pyx_RaiseArgtupleInvalid(
"calculateSubgridError_ADR_Sangalli_tau_sd", 1, 14, 14, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1867, __pyx_L3_error)
11566 __Pyx_AddTraceback(
"csubgridError.calculateSubgridError_ADR_Sangalli_tau_sd", __pyx_clineno, __pyx_lineno, __pyx_filename);
11567 __Pyx_RefNannyFinishContext();
11569 __pyx_L4_argument_unpacking_done:;
11570 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rowptr), __pyx_ptype_5numpy_ndarray, 1,
"rowptr", 0))) __PYX_ERR(0, 1867, __pyx_L1_error)
11571 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_colind), __pyx_ptype_5numpy_ndarray, 1,
"colind", 0))) __PYX_ERR(0, 1868, __pyx_L1_error)
11572 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_inverseJ), __pyx_ptype_5numpy_ndarray, 1,
"inverseJ", 0))) __PYX_ERR(0, 1869, __pyx_L1_error)
11573 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dmt), __pyx_ptype_5numpy_ndarray, 1,
"dmt", 0))) __PYX_ERR(0, 1870, __pyx_L1_error)
11574 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_df), __pyx_ptype_5numpy_ndarray, 1,
"df", 0))) __PYX_ERR(0, 1871, __pyx_L1_error)
11575 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1,
"a", 0))) __PYX_ERR(0, 1872, __pyx_L1_error)
11576 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_da), __pyx_ptype_5numpy_ndarray, 1,
"da", 0))) __PYX_ERR(0, 1873, __pyx_L1_error)
11577 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_phi), __pyx_ptype_5numpy_ndarray, 1,
"grad_phi", 0))) __PYX_ERR(0, 1874, __pyx_L1_error)
11578 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dphi), __pyx_ptype_5numpy_ndarray, 1,
"dphi", 0))) __PYX_ERR(0, 1875, __pyx_L1_error)
11579 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dr), __pyx_ptype_5numpy_ndarray, 1,
"dr", 0))) __PYX_ERR(0, 1876, __pyx_L1_error)
11580 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pe), __pyx_ptype_5numpy_ndarray, 1,
"pe", 0))) __PYX_ERR(0, 1877, __pyx_L1_error)
11581 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cfl), __pyx_ptype_5numpy_ndarray, 1,
"cfl", 0))) __PYX_ERR(0, 1878, __pyx_L1_error)
11582 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tau), __pyx_ptype_5numpy_ndarray, 1,
"tau", 0))) __PYX_ERR(0, 1879, __pyx_L1_error)
11583 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tau_gradient), __pyx_ptype_5numpy_ndarray, 1,
"tau_gradient", 0))) __PYX_ERR(0, 1880, __pyx_L1_error)
11584 __pyx_r = __pyx_pf_13csubgridError_70calculateSubgridError_ADR_Sangalli_tau_sd(__pyx_self, __pyx_v_rowptr, __pyx_v_colind, __pyx_v_inverseJ, __pyx_v_dmt, __pyx_v_df, __pyx_v_a, __pyx_v_da, __pyx_v_grad_phi, __pyx_v_dphi, __pyx_v_dr, __pyx_v_pe, __pyx_v_cfl, __pyx_v_tau, __pyx_v_tau_gradient);
11591 __Pyx_RefNannyFinishContext();
11595 static PyObject *__pyx_pf_13csubgridError_70calculateSubgridError_ADR_Sangalli_tau_sd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_inverseJ, PyArrayObject *__pyx_v_dmt, PyArrayObject *__pyx_v_df, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_da, PyArrayObject *__pyx_v_grad_phi, PyArrayObject *__pyx_v_dphi, PyArrayObject *__pyx_v_dr, PyArrayObject *__pyx_v_pe, PyArrayObject *__pyx_v_cfl, PyArrayObject *__pyx_v_tau, PyArrayObject *__pyx_v_tau_gradient) {
11596 PyObject *__pyx_r = NULL;
11597 __Pyx_RefNannyDeclarations
11598 __Pyx_RefNannySetupContext(
"calculateSubgridError_ADR_Sangalli_tau_sd", 0);
11607 calculateSubgridError_ADR_Sangalli_tau_sd((__pyx_v_df->dimensions[0]), (__pyx_v_df->dimensions[1]), (__pyx_v_df->dimensions[2]), ((
int *)__pyx_v_rowptr->data), ((
int *)__pyx_v_colind->data), ((
double *)__pyx_v_inverseJ->data), ((
double *)__pyx_v_dmt->data), ((
double *)__pyx_v_df->data), ((
double *)__pyx_v_a->data), ((
double *)__pyx_v_da->data), ((
double *)__pyx_v_grad_phi->data), ((
double *)__pyx_v_dphi->data), ((
double *)__pyx_v_dr->data), ((
double *)__pyx_v_pe->data), ((
double *)__pyx_v_cfl->data), ((
double *)__pyx_v_tau->data), ((
double *)__pyx_v_tau_gradient->data));
11618 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11619 __Pyx_XGIVEREF(__pyx_r);
11620 __Pyx_RefNannyFinishContext();
11632 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
11633 PyObject *__pyx_r = NULL;
11634 __Pyx_RefNannyDeclarations
11635 PyObject *__pyx_t_1 = NULL;
11636 int __pyx_lineno = 0;
11637 const char *__pyx_filename = NULL;
11638 int __pyx_clineno = 0;
11639 __Pyx_RefNannySetupContext(
"PyArray_MultiIterNew1", 0);
11648 __Pyx_XDECREF(__pyx_r);
11649 __pyx_t_1 = PyArray_MultiIterNew(1, ((
void *)__pyx_v_a));
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 736, __pyx_L1_error)
11650 __Pyx_GOTREF(__pyx_t_1);
11651 __pyx_r = __pyx_t_1;
11665 __Pyx_XDECREF(__pyx_t_1);
11666 __Pyx_AddTraceback(
"numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename);
11669 __Pyx_XGIVEREF(__pyx_r);
11670 __Pyx_RefNannyFinishContext();
11682 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
11683 PyObject *__pyx_r = NULL;
11684 __Pyx_RefNannyDeclarations
11685 PyObject *__pyx_t_1 = NULL;
11686 int __pyx_lineno = 0;
11687 const char *__pyx_filename = NULL;
11688 int __pyx_clineno = 0;
11689 __Pyx_RefNannySetupContext(
"PyArray_MultiIterNew2", 0);
11698 __Pyx_XDECREF(__pyx_r);
11699 __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)
11700 __Pyx_GOTREF(__pyx_t_1);
11701 __pyx_r = __pyx_t_1;
11715 __Pyx_XDECREF(__pyx_t_1);
11716 __Pyx_AddTraceback(
"numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename);
11719 __Pyx_XGIVEREF(__pyx_r);
11720 __Pyx_RefNannyFinishContext();
11732 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
11733 PyObject *__pyx_r = NULL;
11734 __Pyx_RefNannyDeclarations
11735 PyObject *__pyx_t_1 = NULL;
11736 int __pyx_lineno = 0;
11737 const char *__pyx_filename = NULL;
11738 int __pyx_clineno = 0;
11739 __Pyx_RefNannySetupContext(
"PyArray_MultiIterNew3", 0);
11748 __Pyx_XDECREF(__pyx_r);
11749 __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)
11750 __Pyx_GOTREF(__pyx_t_1);
11751 __pyx_r = __pyx_t_1;
11765 __Pyx_XDECREF(__pyx_t_1);
11766 __Pyx_AddTraceback(
"numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename);
11769 __Pyx_XGIVEREF(__pyx_r);
11770 __Pyx_RefNannyFinishContext();
11782 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) {
11783 PyObject *__pyx_r = NULL;
11784 __Pyx_RefNannyDeclarations
11785 PyObject *__pyx_t_1 = NULL;
11786 int __pyx_lineno = 0;
11787 const char *__pyx_filename = NULL;
11788 int __pyx_clineno = 0;
11789 __Pyx_RefNannySetupContext(
"PyArray_MultiIterNew4", 0);
11798 __Pyx_XDECREF(__pyx_r);
11799 __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)
11800 __Pyx_GOTREF(__pyx_t_1);
11801 __pyx_r = __pyx_t_1;
11815 __Pyx_XDECREF(__pyx_t_1);
11816 __Pyx_AddTraceback(
"numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename);
11819 __Pyx_XGIVEREF(__pyx_r);
11820 __Pyx_RefNannyFinishContext();
11832 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) {
11833 PyObject *__pyx_r = NULL;
11834 __Pyx_RefNannyDeclarations
11835 PyObject *__pyx_t_1 = NULL;
11836 int __pyx_lineno = 0;
11837 const char *__pyx_filename = NULL;
11838 int __pyx_clineno = 0;
11839 __Pyx_RefNannySetupContext(
"PyArray_MultiIterNew5", 0);
11848 __Pyx_XDECREF(__pyx_r);
11849 __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)
11850 __Pyx_GOTREF(__pyx_t_1);
11851 __pyx_r = __pyx_t_1;
11865 __Pyx_XDECREF(__pyx_t_1);
11866 __Pyx_AddTraceback(
"numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename);
11869 __Pyx_XGIVEREF(__pyx_r);
11870 __Pyx_RefNannyFinishContext();
11882 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) {
11883 PyObject *__pyx_r = NULL;
11884 __Pyx_RefNannyDeclarations
11886 __Pyx_RefNannySetupContext(
"PyDataType_SHAPE", 0);
11895 __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0);
11905 __Pyx_XDECREF(__pyx_r);
11906 __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape));
11907 __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape);
11927 __Pyx_XDECREF(__pyx_r);
11928 __Pyx_INCREF(__pyx_empty_tuple);
11929 __pyx_r = __pyx_empty_tuple;
11943 __Pyx_XGIVEREF(__pyx_r);
11944 __Pyx_RefNannyFinishContext();
11956 static CYTHON_INLINE
void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
11957 __Pyx_RefNannyDeclarations
11958 __Pyx_RefNannySetupContext(
"set_array_base", 0);
11967 Py_INCREF(__pyx_v_base);
11976 (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base));
11987 __Pyx_RefNannyFinishContext();
11998 static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
11999 PyObject *__pyx_v_base;
12000 PyObject *__pyx_r = NULL;
12001 __Pyx_RefNannyDeclarations
12003 __Pyx_RefNannySetupContext(
"get_array_base", 0);
12012 __pyx_v_base = PyArray_BASE(__pyx_v_arr);
12021 __pyx_t_1 = ((__pyx_v_base == NULL) != 0);
12031 __Pyx_XDECREF(__pyx_r);
12032 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
12051 __Pyx_XDECREF(__pyx_r);
12052 __Pyx_INCREF(((PyObject *)__pyx_v_base));
12053 __pyx_r = ((PyObject *)__pyx_v_base);
12066 __Pyx_XGIVEREF(__pyx_r);
12067 __Pyx_RefNannyFinishContext();
12079 static CYTHON_INLINE
int __pyx_f_5numpy_import_array(
void) {
12081 __Pyx_RefNannyDeclarations
12082 PyObject *__pyx_t_1 = NULL;
12083 PyObject *__pyx_t_2 = NULL;
12084 PyObject *__pyx_t_3 = NULL;
12086 PyObject *__pyx_t_5 = NULL;
12087 PyObject *__pyx_t_6 = NULL;
12088 PyObject *__pyx_t_7 = NULL;
12089 PyObject *__pyx_t_8 = NULL;
12090 int __pyx_lineno = 0;
12091 const char *__pyx_filename = NULL;
12092 int __pyx_clineno = 0;
12093 __Pyx_RefNannySetupContext(
"import_array", 0);
12103 __Pyx_PyThreadState_declare
12104 __Pyx_PyThreadState_assign
12105 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
12106 __Pyx_XGOTREF(__pyx_t_1);
12107 __Pyx_XGOTREF(__pyx_t_2);
12108 __Pyx_XGOTREF(__pyx_t_3);
12118 __pyx_t_4 = _import_array();
if (unlikely(__pyx_t_4 == ((
int)-1))) __PYX_ERR(1, 943, __pyx_L3_error)
12128 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
12129 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12130 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
12131 goto __pyx_L8_try_end;
12141 __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
12143 __Pyx_AddTraceback(
"numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
12144 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 944, __pyx_L5_except_error)
12145 __Pyx_GOTREF(__pyx_t_5);
12146 __Pyx_GOTREF(__pyx_t_6);
12147 __Pyx_GOTREF(__pyx_t_7);
12156 __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)
12157 __Pyx_GOTREF(__pyx_t_8);
12158 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
12159 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12160 __PYX_ERR(1, 945, __pyx_L5_except_error)
12162 goto __pyx_L5_except_error;
12163 __pyx_L5_except_error:;
12172 __Pyx_XGIVEREF(__pyx_t_1);
12173 __Pyx_XGIVEREF(__pyx_t_2);
12174 __Pyx_XGIVEREF(__pyx_t_3);
12175 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
12176 goto __pyx_L1_error;
12192 __Pyx_XDECREF(__pyx_t_5);
12193 __Pyx_XDECREF(__pyx_t_6);
12194 __Pyx_XDECREF(__pyx_t_7);
12195 __Pyx_XDECREF(__pyx_t_8);
12196 __Pyx_AddTraceback(
"numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
12199 __Pyx_RefNannyFinishContext();
12211 static CYTHON_INLINE
int __pyx_f_5numpy_import_umath(
void) {
12213 __Pyx_RefNannyDeclarations
12214 PyObject *__pyx_t_1 = NULL;
12215 PyObject *__pyx_t_2 = NULL;
12216 PyObject *__pyx_t_3 = NULL;
12218 PyObject *__pyx_t_5 = NULL;
12219 PyObject *__pyx_t_6 = NULL;
12220 PyObject *__pyx_t_7 = NULL;
12221 PyObject *__pyx_t_8 = NULL;
12222 int __pyx_lineno = 0;
12223 const char *__pyx_filename = NULL;
12224 int __pyx_clineno = 0;
12225 __Pyx_RefNannySetupContext(
"import_umath", 0);
12235 __Pyx_PyThreadState_declare
12236 __Pyx_PyThreadState_assign
12237 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
12238 __Pyx_XGOTREF(__pyx_t_1);
12239 __Pyx_XGOTREF(__pyx_t_2);
12240 __Pyx_XGOTREF(__pyx_t_3);
12250 __pyx_t_4 = _import_umath();
if (unlikely(__pyx_t_4 == ((
int)-1))) __PYX_ERR(1, 949, __pyx_L3_error)
12260 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
12261 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12262 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
12263 goto __pyx_L8_try_end;
12273 __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
12275 __Pyx_AddTraceback(
"numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
12276 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 950, __pyx_L5_except_error)
12277 __Pyx_GOTREF(__pyx_t_5);
12278 __Pyx_GOTREF(__pyx_t_6);
12279 __Pyx_GOTREF(__pyx_t_7);
12288 __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)
12289 __Pyx_GOTREF(__pyx_t_8);
12290 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
12291 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12292 __PYX_ERR(1, 951, __pyx_L5_except_error)
12294 goto __pyx_L5_except_error;
12295 __pyx_L5_except_error:;
12304 __Pyx_XGIVEREF(__pyx_t_1);
12305 __Pyx_XGIVEREF(__pyx_t_2);
12306 __Pyx_XGIVEREF(__pyx_t_3);
12307 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
12308 goto __pyx_L1_error;
12324 __Pyx_XDECREF(__pyx_t_5);
12325 __Pyx_XDECREF(__pyx_t_6);
12326 __Pyx_XDECREF(__pyx_t_7);
12327 __Pyx_XDECREF(__pyx_t_8);
12328 __Pyx_AddTraceback(
"numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
12331 __Pyx_RefNannyFinishContext();
12343 static CYTHON_INLINE
int __pyx_f_5numpy_import_ufunc(
void) {
12345 __Pyx_RefNannyDeclarations
12346 PyObject *__pyx_t_1 = NULL;
12347 PyObject *__pyx_t_2 = NULL;
12348 PyObject *__pyx_t_3 = NULL;
12350 PyObject *__pyx_t_5 = NULL;
12351 PyObject *__pyx_t_6 = NULL;
12352 PyObject *__pyx_t_7 = NULL;
12353 PyObject *__pyx_t_8 = NULL;
12354 int __pyx_lineno = 0;
12355 const char *__pyx_filename = NULL;
12356 int __pyx_clineno = 0;
12357 __Pyx_RefNannySetupContext(
"import_ufunc", 0);
12367 __Pyx_PyThreadState_declare
12368 __Pyx_PyThreadState_assign
12369 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
12370 __Pyx_XGOTREF(__pyx_t_1);
12371 __Pyx_XGOTREF(__pyx_t_2);
12372 __Pyx_XGOTREF(__pyx_t_3);
12382 __pyx_t_4 = _import_umath();
if (unlikely(__pyx_t_4 == ((
int)-1))) __PYX_ERR(1, 955, __pyx_L3_error)
12392 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
12393 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12394 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
12395 goto __pyx_L8_try_end;
12405 __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
12407 __Pyx_AddTraceback(
"numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
12408 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 956, __pyx_L5_except_error)
12409 __Pyx_GOTREF(__pyx_t_5);
12410 __Pyx_GOTREF(__pyx_t_6);
12411 __Pyx_GOTREF(__pyx_t_7);
12420 __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)
12421 __Pyx_GOTREF(__pyx_t_8);
12422 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
12423 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12424 __PYX_ERR(1, 957, __pyx_L5_except_error)
12426 goto __pyx_L5_except_error;
12427 __pyx_L5_except_error:;
12436 __Pyx_XGIVEREF(__pyx_t_1);
12437 __Pyx_XGIVEREF(__pyx_t_2);
12438 __Pyx_XGIVEREF(__pyx_t_3);
12439 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
12440 goto __pyx_L1_error;
12456 __Pyx_XDECREF(__pyx_t_5);
12457 __Pyx_XDECREF(__pyx_t_6);
12458 __Pyx_XDECREF(__pyx_t_7);
12459 __Pyx_XDECREF(__pyx_t_8);
12460 __Pyx_AddTraceback(
"numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
12463 __Pyx_RefNannyFinishContext();
12475 static CYTHON_INLINE
int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) {
12477 __Pyx_RefNannyDeclarations
12478 __Pyx_RefNannySetupContext(
"is_timedelta64_object", 0);
12487 __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type));
12500 __Pyx_RefNannyFinishContext();
12512 static CYTHON_INLINE
int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) {
12514 __Pyx_RefNannyDeclarations
12515 __Pyx_RefNannySetupContext(
"is_datetime64_object", 0);
12524 __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type));
12537 __Pyx_RefNannyFinishContext();
12549 static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) {
12550 npy_datetime __pyx_r;
12559 __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval;
12583 static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) {
12584 npy_timedelta __pyx_r;
12593 __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval;
12617 static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) {
12618 NPY_DATETIMEUNIT __pyx_r;
12625 __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base);
12641 static PyMethodDef __pyx_methods[] = {
12645 #if PY_MAJOR_VERSION >= 3
12646 #if CYTHON_PEP489_MULTI_PHASE_INIT
12647 static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def);
12648 static int __pyx_pymod_exec_csubgridError(PyObject* module);
12649 static PyModuleDef_Slot __pyx_moduledef_slots[] = {
12650 {Py_mod_create, (
void*)__pyx_pymod_create},
12651 {Py_mod_exec, (
void*)__pyx_pymod_exec_csubgridError},
12656 static struct PyModuleDef __pyx_moduledef = {
12657 PyModuleDef_HEAD_INIT,
12660 #if CYTHON_PEP489_MULTI_PHASE_INIT
12666 #if CYTHON_PEP489_MULTI_PHASE_INIT
12667 __pyx_moduledef_slots,
12676 #ifndef CYTHON_SMALL_CODE
12677 #if defined(__clang__)
12678 #define CYTHON_SMALL_CODE
12679 #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
12680 #define CYTHON_SMALL_CODE __attribute__((cold))
12682 #define CYTHON_SMALL_CODE
12686 static __Pyx_StringTabEntry __pyx_string_tab[] = {
12687 {&__pyx_n_s_ImportError, __pyx_k_ImportError,
sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
12688 {&__pyx_n_s_a, __pyx_k_a,
sizeof(__pyx_k_a), 0, 0, 1, 1},
12689 {&__pyx_n_s_calculateSubgridErrorGradient_ta, __pyx_k_calculateSubgridErrorGradient_ta,
sizeof(__pyx_k_calculateSubgridErrorGradient_ta), 0, 0, 1, 1},
12690 {&__pyx_n_s_calculateSubgridErrorNavierStoke, __pyx_k_calculateSubgridErrorNavierStoke,
sizeof(__pyx_k_calculateSubgridErrorNavierStoke), 0, 0, 1, 1},
12691 {&__pyx_n_s_calculateSubgridErrorNavierStoke_10, __pyx_k_calculateSubgridErrorNavierStoke_10,
sizeof(__pyx_k_calculateSubgridErrorNavierStoke_10), 0, 0, 1, 1},
12692 {&__pyx_n_s_calculateSubgridErrorNavierStoke_2, __pyx_k_calculateSubgridErrorNavierStoke_2,
sizeof(__pyx_k_calculateSubgridErrorNavierStoke_2), 0, 0, 1, 1},
12693 {&__pyx_n_s_calculateSubgridErrorNavierStoke_3, __pyx_k_calculateSubgridErrorNavierStoke_3,
sizeof(__pyx_k_calculateSubgridErrorNavierStoke_3), 0, 0, 1, 1},
12694 {&__pyx_n_s_calculateSubgridErrorNavierStoke_4, __pyx_k_calculateSubgridErrorNavierStoke_4,
sizeof(__pyx_k_calculateSubgridErrorNavierStoke_4), 0, 0, 1, 1},
12695 {&__pyx_n_s_calculateSubgridErrorNavierStoke_5, __pyx_k_calculateSubgridErrorNavierStoke_5,
sizeof(__pyx_k_calculateSubgridErrorNavierStoke_5), 0, 0, 1, 1},
12696 {&__pyx_n_s_calculateSubgridErrorNavierStoke_6, __pyx_k_calculateSubgridErrorNavierStoke_6,
sizeof(__pyx_k_calculateSubgridErrorNavierStoke_6), 0, 0, 1, 1},
12697 {&__pyx_n_s_calculateSubgridErrorNavierStoke_7, __pyx_k_calculateSubgridErrorNavierStoke_7,
sizeof(__pyx_k_calculateSubgridErrorNavierStoke_7), 0, 0, 1, 1},
12698 {&__pyx_n_s_calculateSubgridErrorNavierStoke_8, __pyx_k_calculateSubgridErrorNavierStoke_8,
sizeof(__pyx_k_calculateSubgridErrorNavierStoke_8), 0, 0, 1, 1},
12699 {&__pyx_n_s_calculateSubgridErrorNavierStoke_9, __pyx_k_calculateSubgridErrorNavierStoke_9,
sizeof(__pyx_k_calculateSubgridErrorNavierStoke_9), 0, 0, 1, 1},
12700 {&__pyx_n_s_calculateSubgridErrorShallowWate, __pyx_k_calculateSubgridErrorShallowWate,
sizeof(__pyx_k_calculateSubgridErrorShallowWate), 0, 0, 1, 1},
12701 {&__pyx_n_s_calculateSubgridErrorShallowWate_2, __pyx_k_calculateSubgridErrorShallowWate_2,
sizeof(__pyx_k_calculateSubgridErrorShallowWate_2), 0, 0, 1, 1},
12702 {&__pyx_n_s_calculateSubgridErrorStokes2D_1, __pyx_k_calculateSubgridErrorStokes2D_1,
sizeof(__pyx_k_calculateSubgridErrorStokes2D_1), 0, 0, 1, 1},
12703 {&__pyx_n_s_calculateSubgridErrorStokes2D_1_2, __pyx_k_calculateSubgridErrorStokes2D_1_2,
sizeof(__pyx_k_calculateSubgridErrorStokes2D_1_2), 0, 0, 1, 1},
12704 {&__pyx_n_s_calculateSubgridErrorStokes2D_GL, __pyx_k_calculateSubgridErrorStokes2D_GL,
sizeof(__pyx_k_calculateSubgridErrorStokes2D_GL), 0, 0, 1, 1},
12705 {&__pyx_n_s_calculateSubgridErrorStokes2D_GL_2, __pyx_k_calculateSubgridErrorStokes2D_GL_2,
sizeof(__pyx_k_calculateSubgridErrorStokes2D_GL_2), 0, 0, 1, 1},
12706 {&__pyx_n_s_calculateSubgridErrorStokes2D_GL_3, __pyx_k_calculateSubgridErrorStokes2D_GL_3,
sizeof(__pyx_k_calculateSubgridErrorStokes2D_GL_3), 0, 0, 1, 1},
12707 {&__pyx_n_s_calculateSubgridErrorStokes2D_GL_4, __pyx_k_calculateSubgridErrorStokes2D_GL_4,
sizeof(__pyx_k_calculateSubgridErrorStokes2D_GL_4), 0, 0, 1, 1},
12708 {&__pyx_n_s_calculateSubgridErrorStokes2D_GL_5, __pyx_k_calculateSubgridErrorStokes2D_GL_5,
sizeof(__pyx_k_calculateSubgridErrorStokes2D_GL_5), 0, 0, 1, 1},
12709 {&__pyx_n_s_calculateSubgridErrorStokes3D_GL, __pyx_k_calculateSubgridErrorStokes3D_GL,
sizeof(__pyx_k_calculateSubgridErrorStokes3D_GL), 0, 0, 1, 1},
12710 {&__pyx_n_s_calculateSubgridErrorStokes3D_GL_2, __pyx_k_calculateSubgridErrorStokes3D_GL_2,
sizeof(__pyx_k_calculateSubgridErrorStokes3D_GL_2), 0, 0, 1, 1},
12711 {&__pyx_n_s_calculateSubgridErrorStokes3D_GL_3, __pyx_k_calculateSubgridErrorStokes3D_GL_3,
sizeof(__pyx_k_calculateSubgridErrorStokes3D_GL_3), 0, 0, 1, 1},
12712 {&__pyx_n_s_calculateSubgridErrorStokes3D_GL_4, __pyx_k_calculateSubgridErrorStokes3D_GL_4,
sizeof(__pyx_k_calculateSubgridErrorStokes3D_GL_4), 0, 0, 1, 1},
12713 {&__pyx_n_s_calculateSubgridErrorStokes3D_GL_5, __pyx_k_calculateSubgridErrorStokes3D_GL_5,
sizeof(__pyx_k_calculateSubgridErrorStokes3D_GL_5), 0, 0, 1, 1},
12714 {&__pyx_n_s_calculateSubgridErrorStokes_GLS, __pyx_k_calculateSubgridErrorStokes_GLS,
sizeof(__pyx_k_calculateSubgridErrorStokes_GLS), 0, 0, 1, 1},
12715 {&__pyx_n_s_calculateSubgridErrorStokes_GLS_2, __pyx_k_calculateSubgridErrorStokes_GLS_2,
sizeof(__pyx_k_calculateSubgridErrorStokes_GLS_2), 0, 0, 1, 1},
12716 {&__pyx_n_s_calculateSubgridError_ADR_Sangal, __pyx_k_calculateSubgridError_ADR_Sangal,
sizeof(__pyx_k_calculateSubgridError_ADR_Sangal), 0, 0, 1, 1},
12717 {&__pyx_n_s_calculateSubgridError_ADR_generi, __pyx_k_calculateSubgridError_ADR_generi,
sizeof(__pyx_k_calculateSubgridError_ADR_generi), 0, 0, 1, 1},
12718 {&__pyx_n_s_calculateSubgridError_ADR_generi_2, __pyx_k_calculateSubgridError_ADR_generi_2,
sizeof(__pyx_k_calculateSubgridError_ADR_generi_2), 0, 0, 1, 1},
12719 {&__pyx_n_s_calculateSubgridError_ADR_tau, __pyx_k_calculateSubgridError_ADR_tau,
sizeof(__pyx_k_calculateSubgridError_ADR_tau), 0, 0, 1, 1},
12720 {&__pyx_n_s_calculateSubgridError_ADR_tau_sd, __pyx_k_calculateSubgridError_ADR_tau_sd,
sizeof(__pyx_k_calculateSubgridError_ADR_tau_sd), 0, 0, 1, 1},
12721 {&__pyx_n_s_calculateSubgridError_A_tau, __pyx_k_calculateSubgridError_A_tau,
sizeof(__pyx_k_calculateSubgridError_A_tau), 0, 0, 1, 1},
12722 {&__pyx_n_s_calculateSubgridError_HJ_tau, __pyx_k_calculateSubgridError_HJ_tau,
sizeof(__pyx_k_calculateSubgridError_HJ_tau), 0, 0, 1, 1},
12723 {&__pyx_n_s_calculateSubgridError_Harari_tau, __pyx_k_calculateSubgridError_Harari_tau,
sizeof(__pyx_k_calculateSubgridError_Harari_tau), 0, 0, 1, 1},
12724 {&__pyx_n_s_calculateSubgridError_tauRes, __pyx_k_calculateSubgridError_tauRes,
sizeof(__pyx_k_calculateSubgridError_tauRes), 0, 0, 1, 1},
12725 {&__pyx_n_s_cfl, __pyx_k_cfl,
sizeof(__pyx_k_cfl), 0, 0, 1, 1},
12726 {&__pyx_n_s_cfl_1, __pyx_k_cfl_1,
sizeof(__pyx_k_cfl_1), 0, 0, 1, 1},
12727 {&__pyx_n_s_cfl_2, __pyx_k_cfl_2,
sizeof(__pyx_k_cfl_2), 0, 0, 1, 1},
12728 {&__pyx_n_s_cfl_3, __pyx_k_cfl_3,
sizeof(__pyx_k_cfl_3), 0, 0, 1, 1},
12729 {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback,
sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
12730 {&__pyx_n_s_colind, __pyx_k_colind,
sizeof(__pyx_k_colind), 0, 0, 1, 1},
12731 {&__pyx_n_s_csubgridError, __pyx_k_csubgridError,
sizeof(__pyx_k_csubgridError), 0, 0, 1, 1},
12732 {&__pyx_n_s_dH, __pyx_k_dH,
sizeof(__pyx_k_dH), 0, 0, 1, 1},
12733 {&__pyx_n_s_da, __pyx_k_da,
sizeof(__pyx_k_da), 0, 0, 1, 1},
12734 {&__pyx_n_s_df, __pyx_k_df,
sizeof(__pyx_k_df), 0, 0, 1, 1},
12735 {&__pyx_n_s_dm, __pyx_k_dm,
sizeof(__pyx_k_dm), 0, 0, 1, 1},
12736 {&__pyx_n_s_dmt, __pyx_k_dmt,
sizeof(__pyx_k_dmt), 0, 0, 1, 1},
12737 {&__pyx_n_s_dpdeResidual, __pyx_k_dpdeResidual,
sizeof(__pyx_k_dpdeResidual), 0, 0, 1, 1},
12738 {&__pyx_n_s_dpdeResidualP_du, __pyx_k_dpdeResidualP_du,
sizeof(__pyx_k_dpdeResidualP_du), 0, 0, 1, 1},
12739 {&__pyx_n_s_dpdeResidualP_dv, __pyx_k_dpdeResidualP_dv,
sizeof(__pyx_k_dpdeResidualP_dv), 0, 0, 1, 1},
12740 {&__pyx_n_s_dpdeResidualP_dw, __pyx_k_dpdeResidualP_dw,
sizeof(__pyx_k_dpdeResidualP_dw), 0, 0, 1, 1},
12741 {&__pyx_n_s_dpdeResidualU_dp, __pyx_k_dpdeResidualU_dp,
sizeof(__pyx_k_dpdeResidualU_dp), 0, 0, 1, 1},
12742 {&__pyx_n_s_dpdeResidualU_du, __pyx_k_dpdeResidualU_du,
sizeof(__pyx_k_dpdeResidualU_du), 0, 0, 1, 1},
12743 {&__pyx_n_s_dpdeResidualU_dv, __pyx_k_dpdeResidualU_dv,
sizeof(__pyx_k_dpdeResidualU_dv), 0, 0, 1, 1},
12744 {&__pyx_n_s_dpdeResidualU_dw, __pyx_k_dpdeResidualU_dw,
sizeof(__pyx_k_dpdeResidualU_dw), 0, 0, 1, 1},
12745 {&__pyx_n_s_dpdeResidualV_dp, __pyx_k_dpdeResidualV_dp,
sizeof(__pyx_k_dpdeResidualV_dp), 0, 0, 1, 1},
12746 {&__pyx_n_s_dpdeResidualV_du, __pyx_k_dpdeResidualV_du,
sizeof(__pyx_k_dpdeResidualV_du), 0, 0, 1, 1},
12747 {&__pyx_n_s_dpdeResidualV_dv, __pyx_k_dpdeResidualV_dv,
sizeof(__pyx_k_dpdeResidualV_dv), 0, 0, 1, 1},
12748 {&__pyx_n_s_dpdeResidualV_dw, __pyx_k_dpdeResidualV_dw,
sizeof(__pyx_k_dpdeResidualV_dw), 0, 0, 1, 1},
12749 {&__pyx_n_s_dpdeResidualW_dp, __pyx_k_dpdeResidualW_dp,
sizeof(__pyx_k_dpdeResidualW_dp), 0, 0, 1, 1},
12750 {&__pyx_n_s_dpdeResidualW_du, __pyx_k_dpdeResidualW_du,
sizeof(__pyx_k_dpdeResidualW_du), 0, 0, 1, 1},
12751 {&__pyx_n_s_dpdeResidualW_dv, __pyx_k_dpdeResidualW_dv,
sizeof(__pyx_k_dpdeResidualW_dv), 0, 0, 1, 1},
12752 {&__pyx_n_s_dpdeResidualW_dw, __pyx_k_dpdeResidualW_dw,
sizeof(__pyx_k_dpdeResidualW_dw), 0, 0, 1, 1},
12753 {&__pyx_n_s_dphi, __pyx_k_dphi,
sizeof(__pyx_k_dphi), 0, 0, 1, 1},
12754 {&__pyx_n_s_dr, __pyx_k_dr,
sizeof(__pyx_k_dr), 0, 0, 1, 1},
12755 {&__pyx_n_s_dsubgridError, __pyx_k_dsubgridError,
sizeof(__pyx_k_dsubgridError), 0, 0, 1, 1},
12756 {&__pyx_n_s_dsubgridErrorP_dp, __pyx_k_dsubgridErrorP_dp,
sizeof(__pyx_k_dsubgridErrorP_dp), 0, 0, 1, 1},
12757 {&__pyx_n_s_dsubgridErrorP_du, __pyx_k_dsubgridErrorP_du,
sizeof(__pyx_k_dsubgridErrorP_du), 0, 0, 1, 1},
12758 {&__pyx_n_s_dsubgridErrorP_dv, __pyx_k_dsubgridErrorP_dv,
sizeof(__pyx_k_dsubgridErrorP_dv), 0, 0, 1, 1},
12759 {&__pyx_n_s_dsubgridErrorP_dw, __pyx_k_dsubgridErrorP_dw,
sizeof(__pyx_k_dsubgridErrorP_dw), 0, 0, 1, 1},
12760 {&__pyx_n_s_dsubgridErrorU_dp, __pyx_k_dsubgridErrorU_dp,
sizeof(__pyx_k_dsubgridErrorU_dp), 0, 0, 1, 1},
12761 {&__pyx_n_s_dsubgridErrorU_du, __pyx_k_dsubgridErrorU_du,
sizeof(__pyx_k_dsubgridErrorU_du), 0, 0, 1, 1},
12762 {&__pyx_n_s_dsubgridErrorU_dv, __pyx_k_dsubgridErrorU_dv,
sizeof(__pyx_k_dsubgridErrorU_dv), 0, 0, 1, 1},
12763 {&__pyx_n_s_dsubgridErrorU_dw, __pyx_k_dsubgridErrorU_dw,
sizeof(__pyx_k_dsubgridErrorU_dw), 0, 0, 1, 1},
12764 {&__pyx_n_s_dsubgridErrorV_dp, __pyx_k_dsubgridErrorV_dp,
sizeof(__pyx_k_dsubgridErrorV_dp), 0, 0, 1, 1},
12765 {&__pyx_n_s_dsubgridErrorV_du, __pyx_k_dsubgridErrorV_du,
sizeof(__pyx_k_dsubgridErrorV_du), 0, 0, 1, 1},
12766 {&__pyx_n_s_dsubgridErrorV_dv, __pyx_k_dsubgridErrorV_dv,
sizeof(__pyx_k_dsubgridErrorV_dv), 0, 0, 1, 1},
12767 {&__pyx_n_s_dsubgridErrorV_dw, __pyx_k_dsubgridErrorV_dw,
sizeof(__pyx_k_dsubgridErrorV_dw), 0, 0, 1, 1},
12768 {&__pyx_n_s_dsubgridErrorW_dp, __pyx_k_dsubgridErrorW_dp,
sizeof(__pyx_k_dsubgridErrorW_dp), 0, 0, 1, 1},
12769 {&__pyx_n_s_dsubgridErrorW_du, __pyx_k_dsubgridErrorW_du,
sizeof(__pyx_k_dsubgridErrorW_du), 0, 0, 1, 1},
12770 {&__pyx_n_s_dsubgridErrorW_dv, __pyx_k_dsubgridErrorW_dv,
sizeof(__pyx_k_dsubgridErrorW_dv), 0, 0, 1, 1},
12771 {&__pyx_n_s_dsubgridErrorW_dw, __pyx_k_dsubgridErrorW_dw,
sizeof(__pyx_k_dsubgridErrorW_dw), 0, 0, 1, 1},
12772 {&__pyx_n_s_dt, __pyx_k_dt,
sizeof(__pyx_k_dt), 0, 0, 1, 1},
12773 {&__pyx_n_s_elementDiameter, __pyx_k_elementDiameter,
sizeof(__pyx_k_elementDiameter), 0, 0, 1, 1},
12774 {&__pyx_n_s_f, __pyx_k_f,
sizeof(__pyx_k_f), 0, 0, 1, 1},
12775 {&__pyx_n_s_g, __pyx_k_g,
sizeof(__pyx_k_g), 0, 0, 1, 1},
12776 {&__pyx_n_s_grad_pdeResidual, __pyx_k_grad_pdeResidual,
sizeof(__pyx_k_grad_pdeResidual), 0, 0, 1, 1},
12777 {&__pyx_n_s_grad_phi, __pyx_k_grad_phi,
sizeof(__pyx_k_grad_phi), 0, 0, 1, 1},
12778 {&__pyx_n_s_grad_subgridError, __pyx_k_grad_subgridError,
sizeof(__pyx_k_grad_subgridError), 0, 0, 1, 1},
12779 {&__pyx_n_s_h, __pyx_k_h,
sizeof(__pyx_k_h), 0, 0, 1, 1},
12780 {&__pyx_n_s_hFactor, __pyx_k_hFactor,
sizeof(__pyx_k_hFactor), 0, 0, 1, 1},
12781 {&__pyx_n_s_hu, __pyx_k_hu,
sizeof(__pyx_k_hu), 0, 0, 1, 1},
12782 {&__pyx_n_s_hv, __pyx_k_hv,
sizeof(__pyx_k_hv), 0, 0, 1, 1},
12783 {&__pyx_n_s_import, __pyx_k_import,
sizeof(__pyx_k_import), 0, 0, 1, 1},
12784 {&__pyx_n_s_inverseJ, __pyx_k_inverseJ,
sizeof(__pyx_k_inverseJ), 0, 0, 1, 1},
12785 {&__pyx_n_s_main, __pyx_k_main,
sizeof(__pyx_k_main), 0, 0, 1, 1},
12786 {&__pyx_n_s_nSpace, __pyx_k_nSpace,
sizeof(__pyx_k_nSpace), 0, 0, 1, 1},
12787 {&__pyx_n_s_name, __pyx_k_name,
sizeof(__pyx_k_name), 0, 0, 1, 1},
12788 {&__pyx_n_s_np, __pyx_k_np,
sizeof(__pyx_k_np), 0, 0, 1, 1},
12789 {&__pyx_n_s_numpy, __pyx_k_numpy,
sizeof(__pyx_k_numpy), 0, 0, 1, 1},
12790 {&__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},
12791 {&__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},
12792 {&__pyx_n_s_pdeResidual, __pyx_k_pdeResidual,
sizeof(__pyx_k_pdeResidual), 0, 0, 1, 1},
12793 {&__pyx_n_s_pdeResidualP, __pyx_k_pdeResidualP,
sizeof(__pyx_k_pdeResidualP), 0, 0, 1, 1},
12794 {&__pyx_n_s_pdeResidualU, __pyx_k_pdeResidualU,
sizeof(__pyx_k_pdeResidualU), 0, 0, 1, 1},
12795 {&__pyx_n_s_pdeResidualV, __pyx_k_pdeResidualV,
sizeof(__pyx_k_pdeResidualV), 0, 0, 1, 1},
12796 {&__pyx_n_s_pdeResidualW, __pyx_k_pdeResidualW,
sizeof(__pyx_k_pdeResidualW), 0, 0, 1, 1},
12797 {&__pyx_n_s_pe, __pyx_k_pe,
sizeof(__pyx_k_pe), 0, 0, 1, 1},
12798 {&__pyx_kp_s_proteus_csubgridError_pyx, __pyx_k_proteus_csubgridError_pyx,
sizeof(__pyx_k_proteus_csubgridError_pyx), 0, 0, 1, 0},
12799 {&__pyx_n_s_rowptr, __pyx_k_rowptr,
sizeof(__pyx_k_rowptr), 0, 0, 1, 1},
12800 {&__pyx_n_s_stabilization, __pyx_k_stabilization,
sizeof(__pyx_k_stabilization), 0, 0, 1, 1},
12801 {&__pyx_n_s_subgridError, __pyx_k_subgridError,
sizeof(__pyx_k_subgridError), 0, 0, 1, 1},
12802 {&__pyx_n_s_subgridErrorP, __pyx_k_subgridErrorP,
sizeof(__pyx_k_subgridErrorP), 0, 0, 1, 1},
12803 {&__pyx_n_s_subgridErrorU, __pyx_k_subgridErrorU,
sizeof(__pyx_k_subgridErrorU), 0, 0, 1, 1},
12804 {&__pyx_n_s_subgridErrorV, __pyx_k_subgridErrorV,
sizeof(__pyx_k_subgridErrorV), 0, 0, 1, 1},
12805 {&__pyx_n_s_subgridErrorW, __pyx_k_subgridErrorW,
sizeof(__pyx_k_subgridErrorW), 0, 0, 1, 1},
12806 {&__pyx_n_s_tau, __pyx_k_tau,
sizeof(__pyx_k_tau), 0, 0, 1, 1},
12807 {&__pyx_n_s_tau0, __pyx_k_tau0,
sizeof(__pyx_k_tau0), 0, 0, 1, 1},
12808 {&__pyx_n_s_tau1, __pyx_k_tau1,
sizeof(__pyx_k_tau1), 0, 0, 1, 1},
12809 {&__pyx_n_s_tau_gradient, __pyx_k_tau_gradient,
sizeof(__pyx_k_tau_gradient), 0, 0, 1, 1},
12810 {&__pyx_n_s_test, __pyx_k_test,
sizeof(__pyx_k_test), 0, 0, 1, 1},
12811 {&__pyx_n_s_u, __pyx_k_u,
sizeof(__pyx_k_u), 0, 0, 1, 1},
12812 {&__pyx_n_s_v, __pyx_k_v,
sizeof(__pyx_k_v), 0, 0, 1, 1},
12813 {0, 0, 0, 0, 0, 0, 0}
12815 static CYTHON_SMALL_CODE
int __Pyx_InitCachedBuiltins(
void) {
12816 __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError);
if (!__pyx_builtin_ImportError) __PYX_ERR(1, 945, __pyx_L1_error)
12822 static CYTHON_SMALL_CODE
int __Pyx_InitCachedConstants(
void) {
12823 __Pyx_RefNannyDeclarations
12824 __Pyx_RefNannySetupContext(
"__Pyx_InitCachedConstants", 0);
12833 __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to);
if (unlikely(!__pyx_tuple_)) __PYX_ERR(1, 945, __pyx_L1_error)
12834 __Pyx_GOTREF(__pyx_tuple_);
12835 __Pyx_GIVEREF(__pyx_tuple_);
12844 __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)
12845 __Pyx_GOTREF(__pyx_tuple__2);
12846 __Pyx_GIVEREF(__pyx_tuple__2);
12855 __pyx_tuple__3 = PyTuple_Pack(5, __pyx_n_s_tau, __pyx_n_s_pdeResidual, __pyx_n_s_dpdeResidual, __pyx_n_s_subgridError, __pyx_n_s_dsubgridError);
if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 670, __pyx_L1_error)
12856 __Pyx_GOTREF(__pyx_tuple__3);
12857 __Pyx_GIVEREF(__pyx_tuple__3);
12858 __pyx_codeobj__4 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 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_csubgridError_pyx, __pyx_n_s_calculateSubgridError_tauRes, 670, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__4)) __PYX_ERR(0, 670, __pyx_L1_error)
12867 __pyx_tuple__5 = PyTuple_Pack(11, __pyx_n_s_inverseJ, __pyx_n_s_dmt, __pyx_n_s_df, __pyx_n_s_a, __pyx_n_s_da, __pyx_n_s_grad_phi, __pyx_n_s_dphi, __pyx_n_s_dr, __pyx_n_s_pe, __pyx_n_s_cfl, __pyx_n_s_tau);
if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 683, __pyx_L1_error)
12868 __Pyx_GOTREF(__pyx_tuple__5);
12869 __Pyx_GIVEREF(__pyx_tuple__5);
12870 __pyx_codeobj__6 = (PyObject*)__Pyx_PyCode_New(11, 0, 11, 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_csubgridError_pyx, __pyx_n_s_calculateSubgridError_ADR_generi, 683, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__6)) __PYX_ERR(0, 683, __pyx_L1_error)
12879 __pyx_tuple__7 = PyTuple_Pack(13, __pyx_n_s_rowptr, __pyx_n_s_colind, __pyx_n_s_inverseJ, __pyx_n_s_dmt, __pyx_n_s_df, __pyx_n_s_a, __pyx_n_s_da, __pyx_n_s_grad_phi, __pyx_n_s_dphi, __pyx_n_s_dr, __pyx_n_s_pe, __pyx_n_s_cfl, __pyx_n_s_tau);
if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 708, __pyx_L1_error)
12880 __Pyx_GOTREF(__pyx_tuple__7);
12881 __Pyx_GIVEREF(__pyx_tuple__7);
12882 __pyx_codeobj__8 = (PyObject*)__Pyx_PyCode_New(13, 0, 13, 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_csubgridError_pyx, __pyx_n_s_calculateSubgridError_ADR_generi_2, 708, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__8)) __PYX_ERR(0, 708, __pyx_L1_error)
12891 __pyx_tuple__9 = PyTuple_Pack(12, __pyx_n_s_stabilization, __pyx_n_s_elementDiameter, __pyx_n_s_dmt, __pyx_n_s_df, __pyx_n_s_a, __pyx_n_s_da, __pyx_n_s_grad_phi, __pyx_n_s_dphi, __pyx_n_s_dr, __pyx_n_s_pe, __pyx_n_s_cfl, __pyx_n_s_tau);
if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 737, __pyx_L1_error)
12892 __Pyx_GOTREF(__pyx_tuple__9);
12893 __Pyx_GIVEREF(__pyx_tuple__9);
12894 __pyx_codeobj__10 = (PyObject*)__Pyx_PyCode_New(12, 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_csubgridError_pyx, __pyx_n_s_calculateSubgridError_ADR_tau, 737, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__10)) __PYX_ERR(0, 737, __pyx_L1_error)
12903 __pyx_tuple__11 = PyTuple_Pack(14, __pyx_n_s_stabilization, __pyx_n_s_rowptr, __pyx_n_s_colind, __pyx_n_s_elementDiameter, __pyx_n_s_dmt, __pyx_n_s_df, __pyx_n_s_a, __pyx_n_s_da, __pyx_n_s_grad_phi, __pyx_n_s_dphi, __pyx_n_s_dr, __pyx_n_s_pe, __pyx_n_s_cfl, __pyx_n_s_tau);
if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 764, __pyx_L1_error)
12904 __Pyx_GOTREF(__pyx_tuple__11);
12905 __Pyx_GIVEREF(__pyx_tuple__11);
12906 __pyx_codeobj__12 = (PyObject*)__Pyx_PyCode_New(14, 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_csubgridError_pyx, __pyx_n_s_calculateSubgridError_ADR_tau_sd, 764, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__12)) __PYX_ERR(0, 764, __pyx_L1_error)
12915 __pyx_tuple__13 = PyTuple_Pack(6, __pyx_n_s_stabilization, __pyx_n_s_elementDiameter, __pyx_n_s_dmt, __pyx_n_s_df, __pyx_n_s_cfl, __pyx_n_s_tau);
if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 795, __pyx_L1_error)
12916 __Pyx_GOTREF(__pyx_tuple__13);
12917 __Pyx_GIVEREF(__pyx_tuple__13);
12918 __pyx_codeobj__14 = (PyObject*)__Pyx_PyCode_New(6, 0, 6, 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_csubgridError_pyx, __pyx_n_s_calculateSubgridError_A_tau, 795, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__14)) __PYX_ERR(0, 795, __pyx_L1_error)
12927 __pyx_tuple__15 = PyTuple_Pack(6, __pyx_n_s_stabilization, __pyx_n_s_elementDiameter, __pyx_n_s_dmt, __pyx_n_s_dH, __pyx_n_s_cfl, __pyx_n_s_tau);
if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 810, __pyx_L1_error)
12928 __Pyx_GOTREF(__pyx_tuple__15);
12929 __Pyx_GIVEREF(__pyx_tuple__15);
12930 __pyx_codeobj__16 = (PyObject*)__Pyx_PyCode_New(6, 0, 6, 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_csubgridError_pyx, __pyx_n_s_calculateSubgridError_HJ_tau, 810, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__16)) __PYX_ERR(0, 810, __pyx_L1_error)
12939 __pyx_tuple__17 = PyTuple_Pack(14, __pyx_n_s_elementDiameter, __pyx_n_s_a, __pyx_n_s_pdeResidualU, __pyx_n_s_dpdeResidualU_dp, __pyx_n_s_dpdeResidualU_du, __pyx_n_s_pdeResidualV, __pyx_n_s_dpdeResidualV_dp, __pyx_n_s_dpdeResidualV_dv, __pyx_n_s_subgridErrorU, __pyx_n_s_dsubgridErrorU_dp, __pyx_n_s_dsubgridErrorU_du, __pyx_n_s_subgridErrorV, __pyx_n_s_dsubgridErrorV_dp, __pyx_n_s_dsubgridErrorV_dv);
if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 826, __pyx_L1_error)
12940 __Pyx_GOTREF(__pyx_tuple__17);
12941 __Pyx_GIVEREF(__pyx_tuple__17);
12942 __pyx_codeobj__18 = (PyObject*)__Pyx_PyCode_New(14, 0, 14, 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_csubgridError_pyx, __pyx_n_s_calculateSubgridErrorStokes2D_GL, 826, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__18)) __PYX_ERR(0, 826, __pyx_L1_error)
12951 __pyx_tuple__19 = PyTuple_Pack(14, __pyx_n_s_elementDiameter, __pyx_n_s_a, __pyx_n_s_pdeResidualU, __pyx_n_s_dpdeResidualU_dp, __pyx_n_s_dpdeResidualU_du, __pyx_n_s_pdeResidualV, __pyx_n_s_dpdeResidualV_dp, __pyx_n_s_dpdeResidualV_dv, __pyx_n_s_subgridErrorU, __pyx_n_s_dsubgridErrorU_dp, __pyx_n_s_dsubgridErrorU_du, __pyx_n_s_subgridErrorV, __pyx_n_s_dsubgridErrorV_dp, __pyx_n_s_dsubgridErrorV_dv);
if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 858, __pyx_L1_error)
12952 __Pyx_GOTREF(__pyx_tuple__19);
12953 __Pyx_GIVEREF(__pyx_tuple__19);
12954 __pyx_codeobj__20 = (PyObject*)__Pyx_PyCode_New(14, 0, 14, 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_csubgridError_pyx, __pyx_n_s_calculateSubgridErrorStokes2D_GL_2, 858, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__20)) __PYX_ERR(0, 858, __pyx_L1_error)
12963 __pyx_tuple__21 = PyTuple_Pack(20, __pyx_n_s_elementDiameter, __pyx_n_s_a, __pyx_n_s_pdeResidualU, __pyx_n_s_dpdeResidualU_dp, __pyx_n_s_dpdeResidualU_du, __pyx_n_s_pdeResidualV, __pyx_n_s_dpdeResidualV_dp, __pyx_n_s_dpdeResidualV_dv, __pyx_n_s_pdeResidualW, __pyx_n_s_dpdeResidualW_dp, __pyx_n_s_dpdeResidualW_dw, __pyx_n_s_subgridErrorU, __pyx_n_s_dsubgridErrorU_dp, __pyx_n_s_dsubgridErrorU_du, __pyx_n_s_subgridErrorV, __pyx_n_s_dsubgridErrorV_dp, __pyx_n_s_dsubgridErrorV_dv, __pyx_n_s_subgridErrorW, __pyx_n_s_dsubgridErrorW_dp, __pyx_n_s_dsubgridErrorW_dw);
if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 890, __pyx_L1_error)
12964 __Pyx_GOTREF(__pyx_tuple__21);
12965 __Pyx_GIVEREF(__pyx_tuple__21);
12966 __pyx_codeobj__22 = (PyObject*)__Pyx_PyCode_New(20, 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_csubgridError_pyx, __pyx_n_s_calculateSubgridErrorStokes3D_GL, 890, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__22)) __PYX_ERR(0, 890, __pyx_L1_error)
12975 __pyx_tuple__23 = PyTuple_Pack(20, __pyx_n_s_elementDiameter, __pyx_n_s_a, __pyx_n_s_pdeResidualU, __pyx_n_s_dpdeResidualU_dp, __pyx_n_s_dpdeResidualU_du, __pyx_n_s_pdeResidualV, __pyx_n_s_dpdeResidualV_dp, __pyx_n_s_dpdeResidualV_dv, __pyx_n_s_pdeResidualW, __pyx_n_s_dpdeResidualW_dp, __pyx_n_s_dpdeResidualW_dw, __pyx_n_s_subgridErrorU, __pyx_n_s_dsubgridErrorU_dp, __pyx_n_s_dsubgridErrorU_du, __pyx_n_s_subgridErrorV, __pyx_n_s_dsubgridErrorV_dp, __pyx_n_s_dsubgridErrorV_dv, __pyx_n_s_subgridErrorW, __pyx_n_s_dsubgridErrorW_dp, __pyx_n_s_dsubgridErrorW_dw);
if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 934, __pyx_L1_error)
12976 __Pyx_GOTREF(__pyx_tuple__23);
12977 __Pyx_GIVEREF(__pyx_tuple__23);
12978 __pyx_codeobj__24 = (PyObject*)__Pyx_PyCode_New(20, 0, 20, 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_csubgridError_pyx, __pyx_n_s_calculateSubgridErrorStokes3D_GL_2, 934, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__24)) __PYX_ERR(0, 934, __pyx_L1_error)
12987 __pyx_tuple__25 = PyTuple_Pack(20, __pyx_n_s_elementDiameter, __pyx_n_s_a, __pyx_n_s_pdeResidualP, __pyx_n_s_dpdeResidualP_du, __pyx_n_s_dpdeResidualP_dv, __pyx_n_s_pdeResidualU, __pyx_n_s_dpdeResidualU_dp, __pyx_n_s_dpdeResidualU_du, __pyx_n_s_pdeResidualV, __pyx_n_s_dpdeResidualV_dp, __pyx_n_s_dpdeResidualV_dv, __pyx_n_s_subgridErrorP, __pyx_n_s_dsubgridErrorP_du, __pyx_n_s_dsubgridErrorP_dv, __pyx_n_s_subgridErrorU, __pyx_n_s_dsubgridErrorU_dp, __pyx_n_s_dsubgridErrorU_du, __pyx_n_s_subgridErrorV, __pyx_n_s_dsubgridErrorV_dp, __pyx_n_s_dsubgridErrorV_dv);
if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 978, __pyx_L1_error)
12988 __Pyx_GOTREF(__pyx_tuple__25);
12989 __Pyx_GIVEREF(__pyx_tuple__25);
12990 __pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(20, 0, 20, 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_csubgridError_pyx, __pyx_n_s_calculateSubgridErrorStokes2D_GL_3, 978, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__26)) __PYX_ERR(0, 978, __pyx_L1_error)
12999 __pyx_tuple__27 = PyTuple_Pack(20, __pyx_n_s_elementDiameter, __pyx_n_s_a, __pyx_n_s_pdeResidualP, __pyx_n_s_dpdeResidualP_du, __pyx_n_s_dpdeResidualP_dv, __pyx_n_s_pdeResidualU, __pyx_n_s_dpdeResidualU_dp, __pyx_n_s_dpdeResidualU_du, __pyx_n_s_pdeResidualV, __pyx_n_s_dpdeResidualV_dp, __pyx_n_s_dpdeResidualV_dv, __pyx_n_s_subgridErrorP, __pyx_n_s_dsubgridErrorP_du, __pyx_n_s_dsubgridErrorP_dv, __pyx_n_s_subgridErrorU, __pyx_n_s_dsubgridErrorU_dp, __pyx_n_s_dsubgridErrorU_du, __pyx_n_s_subgridErrorV, __pyx_n_s_dsubgridErrorV_dp, __pyx_n_s_dsubgridErrorV_dv);
if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 1022, __pyx_L1_error)
13000 __Pyx_GOTREF(__pyx_tuple__27);
13001 __Pyx_GIVEREF(__pyx_tuple__27);
13002 __pyx_codeobj__28 = (PyObject*)__Pyx_PyCode_New(20, 0, 20, 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_csubgridError_pyx, __pyx_n_s_calculateSubgridErrorStokes2D_GL_4, 1022, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__28)) __PYX_ERR(0, 1022, __pyx_L1_error)
13011 __pyx_tuple__29 = PyTuple_Pack(28, __pyx_n_s_elementDiameter, __pyx_n_s_a, __pyx_n_s_pdeResidualP, __pyx_n_s_dpdeResidualP_du, __pyx_n_s_dpdeResidualP_dv, __pyx_n_s_dpdeResidualP_dw, __pyx_n_s_pdeResidualU, __pyx_n_s_dpdeResidualU_dp, __pyx_n_s_dpdeResidualU_du, __pyx_n_s_pdeResidualV, __pyx_n_s_dpdeResidualV_dp, __pyx_n_s_dpdeResidualV_dv, __pyx_n_s_pdeResidualW, __pyx_n_s_dpdeResidualW_dp, __pyx_n_s_dpdeResidualW_dw, __pyx_n_s_subgridErrorP, __pyx_n_s_dsubgridErrorP_du, __pyx_n_s_dsubgridErrorP_dv, __pyx_n_s_dsubgridErrorP_dw, __pyx_n_s_subgridErrorU, __pyx_n_s_dsubgridErrorU_dp, __pyx_n_s_dsubgridErrorU_du, __pyx_n_s_subgridErrorV, __pyx_n_s_dsubgridErrorV_dp, __pyx_n_s_dsubgridErrorV_dv, __pyx_n_s_subgridErrorW, __pyx_n_s_dsubgridErrorW_dp, __pyx_n_s_dsubgridErrorW_dw);
if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 1066, __pyx_L1_error)
13012 __Pyx_GOTREF(__pyx_tuple__29);
13013 __Pyx_GIVEREF(__pyx_tuple__29);
13014 __pyx_codeobj__30 = (PyObject*)__Pyx_PyCode_New(28, 0, 28, 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_csubgridError_pyx, __pyx_n_s_calculateSubgridErrorStokes3D_GL_3, 1066, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__30)) __PYX_ERR(0, 1066, __pyx_L1_error)
13023 __pyx_tuple__31 = PyTuple_Pack(28, __pyx_n_s_elementDiameter, __pyx_n_s_a, __pyx_n_s_pdeResidualP, __pyx_n_s_dpdeResidualP_du, __pyx_n_s_dpdeResidualP_dv, __pyx_n_s_dpdeResidualP_dw, __pyx_n_s_pdeResidualU, __pyx_n_s_dpdeResidualU_dp, __pyx_n_s_dpdeResidualU_du, __pyx_n_s_pdeResidualV, __pyx_n_s_dpdeResidualV_dp, __pyx_n_s_dpdeResidualV_dv, __pyx_n_s_pdeResidualW, __pyx_n_s_dpdeResidualW_dp, __pyx_n_s_dpdeResidualW_dw, __pyx_n_s_subgridErrorP, __pyx_n_s_dsubgridErrorP_du, __pyx_n_s_dsubgridErrorP_dv, __pyx_n_s_dsubgridErrorP_dw, __pyx_n_s_subgridErrorU, __pyx_n_s_dsubgridErrorU_dp, __pyx_n_s_dsubgridErrorU_du, __pyx_n_s_subgridErrorV, __pyx_n_s_dsubgridErrorV_dp, __pyx_n_s_dsubgridErrorV_dv, __pyx_n_s_subgridErrorW, __pyx_n_s_dsubgridErrorW_dp, __pyx_n_s_dsubgridErrorW_dw);
if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 1126, __pyx_L1_error)
13024 __Pyx_GOTREF(__pyx_tuple__31);
13025 __Pyx_GIVEREF(__pyx_tuple__31);
13026 __pyx_codeobj__32 = (PyObject*)__Pyx_PyCode_New(28, 0, 28, 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_csubgridError_pyx, __pyx_n_s_calculateSubgridErrorStokes3D_GL_4, 1126, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__32)) __PYX_ERR(0, 1126, __pyx_L1_error)
13035 __pyx_tuple__33 = PyTuple_Pack(9, __pyx_n_s_hFactor, __pyx_n_s_elementDiameter, __pyx_n_s_dmt, __pyx_n_s_dm, __pyx_n_s_f, __pyx_n_s_a, __pyx_n_s_tau0, __pyx_n_s_tau1, __pyx_n_s_cfl);
if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 1186, __pyx_L1_error)
13036 __Pyx_GOTREF(__pyx_tuple__33);
13037 __Pyx_GIVEREF(__pyx_tuple__33);
13038 __pyx_codeobj__34 = (PyObject*)__Pyx_PyCode_New(9, 0, 9, 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_csubgridError_pyx, __pyx_n_s_calculateSubgridErrorNavierStoke, 1186, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__34)) __PYX_ERR(0, 1186, __pyx_L1_error)
13047 __pyx_tuple__35 = PyTuple_Pack(9, __pyx_n_s_hFactor, __pyx_n_s_elementDiameter, __pyx_n_s_dmt, __pyx_n_s_dm, __pyx_n_s_f, __pyx_n_s_a, __pyx_n_s_tau0, __pyx_n_s_tau1, __pyx_n_s_cfl);
if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 1207, __pyx_L1_error)
13048 __Pyx_GOTREF(__pyx_tuple__35);
13049 __Pyx_GIVEREF(__pyx_tuple__35);
13050 __pyx_codeobj__36 = (PyObject*)__Pyx_PyCode_New(9, 0, 9, 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_csubgridError_pyx, __pyx_n_s_calculateSubgridErrorNavierStoke_2, 1207, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__36)) __PYX_ERR(0, 1207, __pyx_L1_error)
13059 __pyx_tuple__37 = PyTuple_Pack(8, __pyx_n_s_inverseJ, __pyx_n_s_dmt, __pyx_n_s_dm, __pyx_n_s_f, __pyx_n_s_a, __pyx_n_s_tau0, __pyx_n_s_tau1, __pyx_n_s_cfl);
if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 1228, __pyx_L1_error)
13060 __Pyx_GOTREF(__pyx_tuple__37);
13061 __Pyx_GIVEREF(__pyx_tuple__37);
13062 __pyx_codeobj__38 = (PyObject*)__Pyx_PyCode_New(8, 0, 8, 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_csubgridError_pyx, __pyx_n_s_calculateSubgridErrorNavierStoke_3, 1228, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__38)) __PYX_ERR(0, 1228, __pyx_L1_error)
13071 __pyx_tuple__39 = PyTuple_Pack(8, __pyx_n_s_inverseJ, __pyx_n_s_dmt, __pyx_n_s_dm, __pyx_n_s_f, __pyx_n_s_a, __pyx_n_s_tau0, __pyx_n_s_tau1, __pyx_n_s_cfl);
if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 1247, __pyx_L1_error)
13072 __Pyx_GOTREF(__pyx_tuple__39);
13073 __Pyx_GIVEREF(__pyx_tuple__39);
13074 __pyx_codeobj__40 = (PyObject*)__Pyx_PyCode_New(8, 0, 8, 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_csubgridError_pyx, __pyx_n_s_calculateSubgridErrorNavierStoke_4, 1247, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__40)) __PYX_ERR(0, 1247, __pyx_L1_error)
13083 __pyx_tuple__41 = PyTuple_Pack(9, __pyx_n_s_inverseJ, __pyx_n_s_dmt, __pyx_n_s_dm, __pyx_n_s_f, __pyx_n_s_a, __pyx_n_s_dr, __pyx_n_s_tau0, __pyx_n_s_tau1, __pyx_n_s_cfl);
if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 1266, __pyx_L1_error)
13084 __Pyx_GOTREF(__pyx_tuple__41);
13085 __Pyx_GIVEREF(__pyx_tuple__41);
13086 __pyx_codeobj__42 = (PyObject*)__Pyx_PyCode_New(9, 0, 9, 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_csubgridError_pyx, __pyx_n_s_calculateSubgridErrorNavierStoke_5, 1266, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__42)) __PYX_ERR(0, 1266, __pyx_L1_error)
13095 __pyx_tuple__43 = PyTuple_Pack(9, __pyx_n_s_inverseJ, __pyx_n_s_dmt, __pyx_n_s_dm, __pyx_n_s_f, __pyx_n_s_a, __pyx_n_s_dr, __pyx_n_s_tau0, __pyx_n_s_tau1, __pyx_n_s_cfl);
if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 1287, __pyx_L1_error)
13096 __Pyx_GOTREF(__pyx_tuple__43);
13097 __Pyx_GIVEREF(__pyx_tuple__43);
13098 __pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(9, 0, 9, 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_csubgridError_pyx, __pyx_n_s_calculateSubgridErrorNavierStoke_6, 1287, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__44)) __PYX_ERR(0, 1287, __pyx_L1_error)
13107 __pyx_tuple__45 = PyTuple_Pack(24, __pyx_n_s_tau0, __pyx_n_s_tau1, __pyx_n_s_pdeResidualP, __pyx_n_s_dpdeResidualP_du, __pyx_n_s_dpdeResidualP_dv, __pyx_n_s_pdeResidualU, __pyx_n_s_dpdeResidualU_dp, __pyx_n_s_dpdeResidualU_du, __pyx_n_s_dpdeResidualU_dv, __pyx_n_s_pdeResidualV, __pyx_n_s_dpdeResidualV_dp, __pyx_n_s_dpdeResidualV_du, __pyx_n_s_dpdeResidualV_dv, __pyx_n_s_subgridErrorP, __pyx_n_s_dsubgridErrorP_du, __pyx_n_s_dsubgridErrorP_dv, __pyx_n_s_subgridErrorU, __pyx_n_s_dsubgridErrorU_dp, __pyx_n_s_dsubgridErrorU_du, __pyx_n_s_dsubgridErrorU_dv, __pyx_n_s_subgridErrorV, __pyx_n_s_dsubgridErrorV_dp, __pyx_n_s_dsubgridErrorV_du, __pyx_n_s_dsubgridErrorV_dv);
if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 1308, __pyx_L1_error)
13108 __Pyx_GOTREF(__pyx_tuple__45);
13109 __Pyx_GIVEREF(__pyx_tuple__45);
13110 __pyx_codeobj__46 = (PyObject*)__Pyx_PyCode_New(24, 0, 24, 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_csubgridError_pyx, __pyx_n_s_calculateSubgridErrorNavierStoke_7, 1308, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__46)) __PYX_ERR(0, 1308, __pyx_L1_error)
13119 __pyx_tuple__47 = PyTuple_Pack(5, __pyx_n_s_elementDiameter, __pyx_n_s_dH, __pyx_n_s_a, __pyx_n_s_tau0, __pyx_n_s_tau1);
if (unlikely(!__pyx_tuple__47)) __PYX_ERR(0, 1360, __pyx_L1_error)
13120 __Pyx_GOTREF(__pyx_tuple__47);
13121 __Pyx_GIVEREF(__pyx_tuple__47);
13122 __pyx_codeobj__48 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__47, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_csubgridError_pyx, __pyx_n_s_calculateSubgridErrorStokes_GLS, 1360, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__48)) __PYX_ERR(0, 1360, __pyx_L1_error)
13131 __pyx_tuple__49 = PyTuple_Pack(5, __pyx_n_s_elementDiameter, __pyx_n_s_dH, __pyx_n_s_a, __pyx_n_s_tau0, __pyx_n_s_tau1);
if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 1373, __pyx_L1_error)
13132 __Pyx_GOTREF(__pyx_tuple__49);
13133 __Pyx_GIVEREF(__pyx_tuple__49);
13134 __pyx_codeobj__50 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 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_csubgridError_pyx, __pyx_n_s_calculateSubgridErrorStokes_GLS_2, 1373, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__50)) __PYX_ERR(0, 1373, __pyx_L1_error)
13143 __pyx_tuple__51 = PyTuple_Pack(20, __pyx_n_s_tau0, __pyx_n_s_tau1, __pyx_n_s_pdeResidualP, __pyx_n_s_dpdeResidualP_du, __pyx_n_s_dpdeResidualP_dv, __pyx_n_s_pdeResidualU, __pyx_n_s_dpdeResidualU_dp, __pyx_n_s_dpdeResidualU_du, __pyx_n_s_pdeResidualV, __pyx_n_s_dpdeResidualV_dp, __pyx_n_s_dpdeResidualV_dv, __pyx_n_s_subgridErrorP, __pyx_n_s_dsubgridErrorP_du, __pyx_n_s_dsubgridErrorP_dv, __pyx_n_s_subgridErrorU, __pyx_n_s_dsubgridErrorU_dp, __pyx_n_s_dsubgridErrorU_du, __pyx_n_s_subgridErrorV, __pyx_n_s_dsubgridErrorV_dp, __pyx_n_s_dsubgridErrorV_dv);
if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 1386, __pyx_L1_error)
13144 __Pyx_GOTREF(__pyx_tuple__51);
13145 __Pyx_GIVEREF(__pyx_tuple__51);
13146 __pyx_codeobj__52 = (PyObject*)__Pyx_PyCode_New(20, 0, 20, 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_csubgridError_pyx, __pyx_n_s_calculateSubgridErrorStokes2D_GL_5, 1386, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__52)) __PYX_ERR(0, 1386, __pyx_L1_error)
13155 __pyx_tuple__53 = PyTuple_Pack(28, __pyx_n_s_tau0, __pyx_n_s_tau1, __pyx_n_s_pdeResidualP, __pyx_n_s_dpdeResidualP_du, __pyx_n_s_dpdeResidualP_dv, __pyx_n_s_dpdeResidualP_dw, __pyx_n_s_pdeResidualU, __pyx_n_s_dpdeResidualU_dp, __pyx_n_s_dpdeResidualU_du, __pyx_n_s_pdeResidualV, __pyx_n_s_dpdeResidualV_dp, __pyx_n_s_dpdeResidualV_dv, __pyx_n_s_pdeResidualW, __pyx_n_s_dpdeResidualW_dp, __pyx_n_s_dpdeResidualW_dw, __pyx_n_s_subgridErrorP, __pyx_n_s_dsubgridErrorP_du, __pyx_n_s_dsubgridErrorP_dv, __pyx_n_s_dsubgridErrorP_dw, __pyx_n_s_subgridErrorU, __pyx_n_s_dsubgridErrorU_dp, __pyx_n_s_dsubgridErrorU_du, __pyx_n_s_subgridErrorV, __pyx_n_s_dsubgridErrorV_dp, __pyx_n_s_dsubgridErrorV_dv, __pyx_n_s_subgridErrorW, __pyx_n_s_dsubgridErrorW_dp, __pyx_n_s_dsubgridErrorW_dw);
if (unlikely(!__pyx_tuple__53)) __PYX_ERR(0, 1430, __pyx_L1_error)
13156 __Pyx_GOTREF(__pyx_tuple__53);
13157 __Pyx_GIVEREF(__pyx_tuple__53);
13158 __pyx_codeobj__54 = (PyObject*)__Pyx_PyCode_New(28, 0, 28, 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_csubgridError_pyx, __pyx_n_s_calculateSubgridErrorStokes3D_GL_5, 1430, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__54)) __PYX_ERR(0, 1430, __pyx_L1_error)
13167 __pyx_tuple__55 = PyTuple_Pack(40, __pyx_n_s_tau0, __pyx_n_s_tau1, __pyx_n_s_pdeResidualP, __pyx_n_s_dpdeResidualP_du, __pyx_n_s_dpdeResidualP_dv, __pyx_n_s_dpdeResidualP_dw, __pyx_n_s_pdeResidualU, __pyx_n_s_dpdeResidualU_dp, __pyx_n_s_dpdeResidualU_du, __pyx_n_s_dpdeResidualU_dv, __pyx_n_s_dpdeResidualU_dw, __pyx_n_s_pdeResidualV, __pyx_n_s_dpdeResidualV_dp, __pyx_n_s_dpdeResidualV_du, __pyx_n_s_dpdeResidualV_dv, __pyx_n_s_dpdeResidualV_dw, __pyx_n_s_pdeResidualW, __pyx_n_s_dpdeResidualW_dp, __pyx_n_s_dpdeResidualW_du, __pyx_n_s_dpdeResidualW_dv, __pyx_n_s_dpdeResidualW_dw, __pyx_n_s_subgridErrorP, __pyx_n_s_dsubgridErrorP_du, __pyx_n_s_dsubgridErrorP_dv, __pyx_n_s_dsubgridErrorP_dw, __pyx_n_s_subgridErrorU, __pyx_n_s_dsubgridErrorU_dp, __pyx_n_s_dsubgridErrorU_du, __pyx_n_s_dsubgridErrorU_dv, __pyx_n_s_dsubgridErrorU_dw, __pyx_n_s_subgridErrorV, __pyx_n_s_dsubgridErrorV_dp, __pyx_n_s_dsubgridErrorV_du, __pyx_n_s_dsubgridErrorV_dv, __pyx_n_s_dsubgridErrorV_dw, __pyx_n_s_subgridErrorW, __pyx_n_s_dsubgridErrorW_dp, __pyx_n_s_dsubgridErrorW_du, __pyx_n_s_dsubgridErrorW_dv, __pyx_n_s_dsubgridErrorW_dw);
if (unlikely(!__pyx_tuple__55)) __PYX_ERR(0, 1490, __pyx_L1_error)
13168 __Pyx_GOTREF(__pyx_tuple__55);
13169 __Pyx_GIVEREF(__pyx_tuple__55);
13170 __pyx_codeobj__56 = (PyObject*)__Pyx_PyCode_New(40, 0, 40, 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_csubgridError_pyx, __pyx_n_s_calculateSubgridErrorNavierStoke_8, 1490, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__56)) __PYX_ERR(0, 1490, __pyx_L1_error)
13179 __pyx_tuple__57 = PyTuple_Pack(30, __pyx_n_s_elementDiameter, __pyx_n_s_dm, __pyx_n_s_f, __pyx_n_s_a, __pyx_n_s_pdeResidualP, __pyx_n_s_dpdeResidualP_du, __pyx_n_s_dpdeResidualP_dv, __pyx_n_s_dpdeResidualP_dw, __pyx_n_s_pdeResidualU, __pyx_n_s_dpdeResidualU_dp, __pyx_n_s_dpdeResidualU_du, __pyx_n_s_pdeResidualV, __pyx_n_s_dpdeResidualV_dp, __pyx_n_s_dpdeResidualV_dv, __pyx_n_s_pdeResidualW, __pyx_n_s_dpdeResidualW_dp, __pyx_n_s_dpdeResidualW_dw, __pyx_n_s_subgridErrorP, __pyx_n_s_dsubgridErrorP_du, __pyx_n_s_dsubgridErrorP_dv, __pyx_n_s_dsubgridErrorP_dw, __pyx_n_s_subgridErrorU, __pyx_n_s_dsubgridErrorU_dp, __pyx_n_s_dsubgridErrorU_du, __pyx_n_s_subgridErrorV, __pyx_n_s_dsubgridErrorV_dp, __pyx_n_s_dsubgridErrorV_dv, __pyx_n_s_subgridErrorW, __pyx_n_s_dsubgridErrorW_dp, __pyx_n_s_dsubgridErrorW_dw);
if (unlikely(!__pyx_tuple__57)) __PYX_ERR(0, 1574, __pyx_L1_error)
13180 __Pyx_GOTREF(__pyx_tuple__57);
13181 __Pyx_GIVEREF(__pyx_tuple__57);
13182 __pyx_codeobj__58 = (PyObject*)__Pyx_PyCode_New(30, 0, 30, 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_csubgridError_pyx, __pyx_n_s_calculateSubgridErrorNavierStoke_9, 1574, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__58)) __PYX_ERR(0, 1574, __pyx_L1_error)
13191 __pyx_tuple__59 = PyTuple_Pack(30, __pyx_n_s_elementDiameter, __pyx_n_s_dm, __pyx_n_s_f, __pyx_n_s_a, __pyx_n_s_pdeResidualP, __pyx_n_s_dpdeResidualP_du, __pyx_n_s_dpdeResidualP_dv, __pyx_n_s_dpdeResidualP_dw, __pyx_n_s_pdeResidualU, __pyx_n_s_dpdeResidualU_dp, __pyx_n_s_dpdeResidualU_du, __pyx_n_s_pdeResidualV, __pyx_n_s_dpdeResidualV_dp, __pyx_n_s_dpdeResidualV_dv, __pyx_n_s_pdeResidualW, __pyx_n_s_dpdeResidualW_dp, __pyx_n_s_dpdeResidualW_dw, __pyx_n_s_subgridErrorP, __pyx_n_s_dsubgridErrorP_du, __pyx_n_s_dsubgridErrorP_dv, __pyx_n_s_dsubgridErrorP_dw, __pyx_n_s_subgridErrorU, __pyx_n_s_dsubgridErrorU_dp, __pyx_n_s_dsubgridErrorU_du, __pyx_n_s_subgridErrorV, __pyx_n_s_dsubgridErrorV_dp, __pyx_n_s_dsubgridErrorV_dv, __pyx_n_s_subgridErrorW, __pyx_n_s_dsubgridErrorW_dp, __pyx_n_s_dsubgridErrorW_dw);
if (unlikely(!__pyx_tuple__59)) __PYX_ERR(0, 1638, __pyx_L1_error)
13192 __Pyx_GOTREF(__pyx_tuple__59);
13193 __Pyx_GIVEREF(__pyx_tuple__59);
13194 __pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(30, 0, 30, 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_csubgridError_pyx, __pyx_n_s_calculateSubgridErrorNavierStoke_10, 1638, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__60)) __PYX_ERR(0, 1638, __pyx_L1_error)
13203 __pyx_tuple__61 = PyTuple_Pack(25, __pyx_n_s_elementDiameter, __pyx_n_s_u, __pyx_n_s_v, __pyx_n_s_a, __pyx_n_s_pdeResidualP, __pyx_n_s_dpdeResidualP_du, __pyx_n_s_dpdeResidualP_dv, __pyx_n_s_pdeResidualU, __pyx_n_s_dpdeResidualU_dp, __pyx_n_s_dpdeResidualU_du, __pyx_n_s_pdeResidualV, __pyx_n_s_dpdeResidualV_dp, __pyx_n_s_dpdeResidualV_dv, __pyx_n_s_subgridErrorP, __pyx_n_s_dsubgridErrorP_dp, __pyx_n_s_dsubgridErrorP_du, __pyx_n_s_dsubgridErrorP_dv, __pyx_n_s_subgridErrorU, __pyx_n_s_dsubgridErrorU_dp, __pyx_n_s_dsubgridErrorU_du, __pyx_n_s_dsubgridErrorU_dv, __pyx_n_s_subgridErrorV, __pyx_n_s_dsubgridErrorV_dp, __pyx_n_s_dsubgridErrorV_du, __pyx_n_s_dsubgridErrorV_dv);
if (unlikely(!__pyx_tuple__61)) __PYX_ERR(0, 1702, __pyx_L1_error)
13204 __Pyx_GOTREF(__pyx_tuple__61);
13205 __Pyx_GIVEREF(__pyx_tuple__61);
13206 __pyx_codeobj__62 = (PyObject*)__Pyx_PyCode_New(25, 0, 25, 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_csubgridError_pyx, __pyx_n_s_calculateSubgridErrorStokes2D_1, 1702, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__62)) __PYX_ERR(0, 1702, __pyx_L1_error)
13215 __pyx_tuple__63 = PyTuple_Pack(25, __pyx_n_s_elementDiameter, __pyx_n_s_u, __pyx_n_s_v, __pyx_n_s_a, __pyx_n_s_pdeResidualP, __pyx_n_s_dpdeResidualP_du, __pyx_n_s_dpdeResidualP_dv, __pyx_n_s_pdeResidualU, __pyx_n_s_dpdeResidualU_dp, __pyx_n_s_dpdeResidualU_du, __pyx_n_s_pdeResidualV, __pyx_n_s_dpdeResidualV_dp, __pyx_n_s_dpdeResidualV_dv, __pyx_n_s_subgridErrorP, __pyx_n_s_dsubgridErrorP_dp, __pyx_n_s_dsubgridErrorP_du, __pyx_n_s_dsubgridErrorP_dv, __pyx_n_s_subgridErrorU, __pyx_n_s_dsubgridErrorU_dp, __pyx_n_s_dsubgridErrorU_du, __pyx_n_s_dsubgridErrorU_dv, __pyx_n_s_subgridErrorV, __pyx_n_s_dsubgridErrorV_dp, __pyx_n_s_dsubgridErrorV_du, __pyx_n_s_dsubgridErrorV_dv);
if (unlikely(!__pyx_tuple__63)) __PYX_ERR(0, 1756, __pyx_L1_error)
13216 __Pyx_GOTREF(__pyx_tuple__63);
13217 __Pyx_GIVEREF(__pyx_tuple__63);
13218 __pyx_codeobj__64 = (PyObject*)__Pyx_PyCode_New(25, 0, 25, 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_csubgridError_pyx, __pyx_n_s_calculateSubgridErrorStokes2D_1_2, 1756, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__64)) __PYX_ERR(0, 1756, __pyx_L1_error)
13227 __pyx_tuple__65 = PyTuple_Pack(6, __pyx_n_s_g, __pyx_n_s_elementDiameter, __pyx_n_s_h, __pyx_n_s_hu, __pyx_n_s_cfl_1, __pyx_n_s_cfl_2);
if (unlikely(!__pyx_tuple__65)) __PYX_ERR(0, 1810, __pyx_L1_error)
13228 __Pyx_GOTREF(__pyx_tuple__65);
13229 __Pyx_GIVEREF(__pyx_tuple__65);
13230 __pyx_codeobj__66 = (PyObject*)__Pyx_PyCode_New(6, 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_csubgridError_pyx, __pyx_n_s_calculateSubgridErrorShallowWate, 1810, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__66)) __PYX_ERR(0, 1810, __pyx_L1_error)
13239 __pyx_tuple__67 = PyTuple_Pack(8, __pyx_n_s_g, __pyx_n_s_elementDiameter, __pyx_n_s_h, __pyx_n_s_hu, __pyx_n_s_hv, __pyx_n_s_cfl_1, __pyx_n_s_cfl_2, __pyx_n_s_cfl_3);
if (unlikely(!__pyx_tuple__67)) __PYX_ERR(0, 1824, __pyx_L1_error)
13240 __Pyx_GOTREF(__pyx_tuple__67);
13241 __Pyx_GIVEREF(__pyx_tuple__67);
13242 __pyx_codeobj__68 = (PyObject*)__Pyx_PyCode_New(8, 0, 8, 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_csubgridError_pyx, __pyx_n_s_calculateSubgridErrorShallowWate_2, 1824, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__68)) __PYX_ERR(0, 1824, __pyx_L1_error)
13251 __pyx_tuple__69 = PyTuple_Pack(7, __pyx_n_s_nSpace, __pyx_n_s_dt, __pyx_n_s_rowptr, __pyx_n_s_colind, __pyx_n_s_elementDiameter, __pyx_n_s_a, __pyx_n_s_tau);
if (unlikely(!__pyx_tuple__69)) __PYX_ERR(0, 1842, __pyx_L1_error)
13252 __Pyx_GOTREF(__pyx_tuple__69);
13253 __Pyx_GIVEREF(__pyx_tuple__69);
13254 __pyx_codeobj__70 = (PyObject*)__Pyx_PyCode_New(7, 0, 7, 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_csubgridError_pyx, __pyx_n_s_calculateSubgridError_Harari_tau, 1842, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__70)) __PYX_ERR(0, 1842, __pyx_L1_error)
13263 __pyx_tuple__71 = PyTuple_Pack(3, __pyx_n_s_tau_gradient, __pyx_n_s_grad_pdeResidual, __pyx_n_s_grad_subgridError);
if (unlikely(!__pyx_tuple__71)) __PYX_ERR(0, 1858, __pyx_L1_error)
13264 __Pyx_GOTREF(__pyx_tuple__71);
13265 __Pyx_GIVEREF(__pyx_tuple__71);
13266 __pyx_codeobj__72 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 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_csubgridError_pyx, __pyx_n_s_calculateSubgridErrorGradient_ta, 1858, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__72)) __PYX_ERR(0, 1858, __pyx_L1_error)
13275 __pyx_tuple__73 = PyTuple_Pack(14, __pyx_n_s_rowptr, __pyx_n_s_colind, __pyx_n_s_inverseJ, __pyx_n_s_dmt, __pyx_n_s_df, __pyx_n_s_a, __pyx_n_s_da, __pyx_n_s_grad_phi, __pyx_n_s_dphi, __pyx_n_s_dr, __pyx_n_s_pe, __pyx_n_s_cfl, __pyx_n_s_tau, __pyx_n_s_tau_gradient);
if (unlikely(!__pyx_tuple__73)) __PYX_ERR(0, 1867, __pyx_L1_error)
13276 __Pyx_GOTREF(__pyx_tuple__73);
13277 __Pyx_GIVEREF(__pyx_tuple__73);
13278 __pyx_codeobj__74 = (PyObject*)__Pyx_PyCode_New(14, 0, 14, 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_csubgridError_pyx, __pyx_n_s_calculateSubgridError_ADR_Sangal, 1867, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__74)) __PYX_ERR(0, 1867, __pyx_L1_error)
13279 __Pyx_RefNannyFinishContext();
13282 __Pyx_RefNannyFinishContext();
13286 static CYTHON_SMALL_CODE
int __Pyx_InitGlobals(
void) {
13287 if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
13293 static CYTHON_SMALL_CODE
int __Pyx_modinit_global_init_code(
void);
13294 static CYTHON_SMALL_CODE
int __Pyx_modinit_variable_export_code(
void);
13295 static CYTHON_SMALL_CODE
int __Pyx_modinit_function_export_code(
void);
13296 static CYTHON_SMALL_CODE
int __Pyx_modinit_type_init_code(
void);
13297 static CYTHON_SMALL_CODE
int __Pyx_modinit_type_import_code(
void);
13298 static CYTHON_SMALL_CODE
int __Pyx_modinit_variable_import_code(
void);
13299 static CYTHON_SMALL_CODE
int __Pyx_modinit_function_import_code(
void);
13301 static int __Pyx_modinit_global_init_code(
void) {
13302 __Pyx_RefNannyDeclarations
13303 __Pyx_RefNannySetupContext(
"__Pyx_modinit_global_init_code", 0);
13305 __Pyx_RefNannyFinishContext();
13309 static int __Pyx_modinit_variable_export_code(
void) {
13310 __Pyx_RefNannyDeclarations
13311 __Pyx_RefNannySetupContext(
"__Pyx_modinit_variable_export_code", 0);
13313 __Pyx_RefNannyFinishContext();
13317 static int __Pyx_modinit_function_export_code(
void) {
13318 __Pyx_RefNannyDeclarations
13319 __Pyx_RefNannySetupContext(
"__Pyx_modinit_function_export_code", 0);
13321 __Pyx_RefNannyFinishContext();
13325 static int __Pyx_modinit_type_init_code(
void) {
13326 __Pyx_RefNannyDeclarations
13327 __Pyx_RefNannySetupContext(
"__Pyx_modinit_type_init_code", 0);
13329 __Pyx_RefNannyFinishContext();
13333 static int __Pyx_modinit_type_import_code(
void) {
13334 __Pyx_RefNannyDeclarations
13335 PyObject *__pyx_t_1 = NULL;
13336 int __pyx_lineno = 0;
13337 const char *__pyx_filename = NULL;
13338 int __pyx_clineno = 0;
13339 __Pyx_RefNannySetupContext(
"__Pyx_modinit_type_import_code", 0);
13341 __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME);
if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 9, __pyx_L1_error)
13342 __Pyx_GOTREF(__pyx_t_1);
13343 __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME,
"type",
13344 #
if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
13345 sizeof(PyTypeObject),
13347 sizeof(PyHeapTypeObject),
13349 __Pyx_ImportType_CheckSize_Warn);
13350 if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(2, 9, __pyx_L1_error)
13351 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13352 __pyx_t_1 = PyImport_ImportModule(
"numpy");
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 200, __pyx_L1_error)
13353 __Pyx_GOTREF(__pyx_t_1);
13354 __pyx_ptype_5numpy_dtype = __Pyx_ImportType(__pyx_t_1,
"numpy",
"dtype",
sizeof(PyArray_Descr), __Pyx_ImportType_CheckSize_Ignore);
13355 if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(1, 200, __pyx_L1_error)
13356 __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1,
"numpy",
"flatiter",
sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Ignore);
13357 if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(1, 223, __pyx_L1_error)
13358 __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1,
"numpy",
"broadcast",
sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Ignore);
13359 if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(1, 227, __pyx_L1_error)
13360 __pyx_ptype_5numpy_ndarray = __Pyx_ImportType(__pyx_t_1,
"numpy",
"ndarray",
sizeof(PyArrayObject), __Pyx_ImportType_CheckSize_Ignore);
13361 if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(1, 239, __pyx_L1_error)
13362 __pyx_ptype_5numpy_generic = __Pyx_ImportType(__pyx_t_1,
"numpy",
"generic",
sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
13363 if (!__pyx_ptype_5numpy_generic) __PYX_ERR(1, 771, __pyx_L1_error)
13364 __pyx_ptype_5numpy_number = __Pyx_ImportType(__pyx_t_1,
"numpy",
"number",
sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
13365 if (!__pyx_ptype_5numpy_number) __PYX_ERR(1, 773, __pyx_L1_error)
13366 __pyx_ptype_5numpy_integer = __Pyx_ImportType(__pyx_t_1,
"numpy",
"integer",
sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
13367 if (!__pyx_ptype_5numpy_integer) __PYX_ERR(1, 775, __pyx_L1_error)
13368 __pyx_ptype_5numpy_signedinteger = __Pyx_ImportType(__pyx_t_1,
"numpy",
"signedinteger",
sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
13369 if (!__pyx_ptype_5numpy_signedinteger) __PYX_ERR(1, 777, __pyx_L1_error)
13370 __pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType(__pyx_t_1,
"numpy",
"unsignedinteger",
sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
13371 if (!__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(1, 779, __pyx_L1_error)
13372 __pyx_ptype_5numpy_inexact = __Pyx_ImportType(__pyx_t_1,
"numpy",
"inexact",
sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
13373 if (!__pyx_ptype_5numpy_inexact) __PYX_ERR(1, 781, __pyx_L1_error)
13374 __pyx_ptype_5numpy_floating = __Pyx_ImportType(__pyx_t_1,
"numpy",
"floating",
sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
13375 if (!__pyx_ptype_5numpy_floating) __PYX_ERR(1, 783, __pyx_L1_error)
13376 __pyx_ptype_5numpy_complexfloating = __Pyx_ImportType(__pyx_t_1,
"numpy",
"complexfloating",
sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
13377 if (!__pyx_ptype_5numpy_complexfloating) __PYX_ERR(1, 785, __pyx_L1_error)
13378 __pyx_ptype_5numpy_flexible = __Pyx_ImportType(__pyx_t_1,
"numpy",
"flexible",
sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
13379 if (!__pyx_ptype_5numpy_flexible) __PYX_ERR(1, 787, __pyx_L1_error)
13380 __pyx_ptype_5numpy_character = __Pyx_ImportType(__pyx_t_1,
"numpy",
"character",
sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
13381 if (!__pyx_ptype_5numpy_character) __PYX_ERR(1, 789, __pyx_L1_error)
13382 __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1,
"numpy",
"ufunc",
sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Ignore);
13383 if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(1, 827, __pyx_L1_error)
13384 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13385 __Pyx_RefNannyFinishContext();
13388 __Pyx_XDECREF(__pyx_t_1);
13389 __Pyx_RefNannyFinishContext();
13393 static int __Pyx_modinit_variable_import_code(
void) {
13394 __Pyx_RefNannyDeclarations
13395 __Pyx_RefNannySetupContext(
"__Pyx_modinit_variable_import_code", 0);
13397 __Pyx_RefNannyFinishContext();
13401 static int __Pyx_modinit_function_import_code(
void) {
13402 __Pyx_RefNannyDeclarations
13403 __Pyx_RefNannySetupContext(
"__Pyx_modinit_function_import_code", 0);
13405 __Pyx_RefNannyFinishContext();
13410 #ifndef CYTHON_NO_PYINIT_EXPORT
13411 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
13412 #elif PY_MAJOR_VERSION < 3
13414 #define __Pyx_PyMODINIT_FUNC extern "C" void
13416 #define __Pyx_PyMODINIT_FUNC void
13420 #define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
13422 #define __Pyx_PyMODINIT_FUNC PyObject *
13427 #if PY_MAJOR_VERSION < 3
13428 __Pyx_PyMODINIT_FUNC initcsubgridError(
void) CYTHON_SMALL_CODE;
13429 __Pyx_PyMODINIT_FUNC initcsubgridError(
void)
13431 __Pyx_PyMODINIT_FUNC PyInit_csubgridError(
void) CYTHON_SMALL_CODE;
13432 __Pyx_PyMODINIT_FUNC PyInit_csubgridError(
void)
13433 #if CYTHON_PEP489_MULTI_PHASE_INIT
13435 return PyModuleDef_Init(&__pyx_moduledef);
13437 static CYTHON_SMALL_CODE
int __Pyx_check_single_interpreter(
void) {
13438 #if PY_VERSION_HEX >= 0x030700A1
13439 static PY_INT64_T main_interpreter_id = -1;
13440 PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
13441 if (main_interpreter_id == -1) {
13442 main_interpreter_id = current_id;
13443 return (unlikely(current_id == -1)) ? -1 : 0;
13444 }
else if (unlikely(main_interpreter_id != current_id))
13446 static PyInterpreterState *main_interpreter = NULL;
13447 PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
13448 if (!main_interpreter) {
13449 main_interpreter = current_interpreter;
13450 }
else if (unlikely(main_interpreter != current_interpreter))
13455 "Interpreter change detected - this module can only be loaded into one interpreter per process.");
13460 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) {
13461 PyObject *value = PyObject_GetAttrString(spec, from_name);
13463 if (likely(value)) {
13464 if (allow_none || value != Py_None) {
13465 result = PyDict_SetItemString(moddict, to_name, value);
13468 }
else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
13475 static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
13476 PyObject *module = NULL, *moddict, *modname;
13477 if (__Pyx_check_single_interpreter())
13480 return __Pyx_NewRef(__pyx_m);
13481 modname = PyObject_GetAttrString(spec,
"name");
13482 if (unlikely(!modname))
goto bad;
13483 module = PyModule_NewObject(modname);
13484 Py_DECREF(modname);
13485 if (unlikely(!module))
goto bad;
13486 moddict = PyModule_GetDict(module);
13487 if (unlikely(!moddict))
goto bad;
13488 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict,
"loader",
"__loader__", 1) < 0))
goto bad;
13489 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict,
"origin",
"__file__", 1) < 0))
goto bad;
13490 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict,
"parent",
"__package__", 1) < 0))
goto bad;
13491 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict,
"submodule_search_locations",
"__path__", 0) < 0))
goto bad;
13494 Py_XDECREF(module);
13499 static CYTHON_SMALL_CODE
int __pyx_pymod_exec_csubgridError(PyObject *__pyx_pyinit_module)
13503 PyObject *__pyx_t_1 = NULL;
13504 int __pyx_lineno = 0;
13505 const char *__pyx_filename = NULL;
13506 int __pyx_clineno = 0;
13507 __Pyx_RefNannyDeclarations
13508 #if CYTHON_PEP489_MULTI_PHASE_INIT
13510 if (__pyx_m == __pyx_pyinit_module)
return 0;
13511 PyErr_SetString(PyExc_RuntimeError,
"Module 'csubgridError' has already been imported. Re-initialisation is not supported.");
13514 #elif PY_MAJOR_VERSION >= 3
13515 if (__pyx_m)
return __Pyx_NewRef(__pyx_m);
13517 #if CYTHON_REFNANNY
13518 __Pyx_RefNanny = __Pyx_RefNannyImportAPI(
"refnanny");
13519 if (!__Pyx_RefNanny) {
13521 __Pyx_RefNanny = __Pyx_RefNannyImportAPI(
"Cython.Runtime.refnanny");
13522 if (!__Pyx_RefNanny)
13523 Py_FatalError(
"failed to import 'refnanny' module");
13526 __Pyx_RefNannySetupContext(
"__Pyx_PyMODINIT_FUNC PyInit_csubgridError(void)", 0);
13527 if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
13528 #ifdef __Pxy_PyFrame_Initialize_Offsets
13529 __Pxy_PyFrame_Initialize_Offsets();
13531 __pyx_empty_tuple = PyTuple_New(0);
if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
13532 __pyx_empty_bytes = PyBytes_FromStringAndSize(
"", 0);
if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
13533 __pyx_empty_unicode = PyUnicode_FromStringAndSize(
"", 0);
if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
13534 #ifdef __Pyx_CyFunction_USED
13535 if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
13537 #ifdef __Pyx_FusedFunction_USED
13538 if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
13540 #ifdef __Pyx_Coroutine_USED
13541 if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
13543 #ifdef __Pyx_Generator_USED
13544 if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
13546 #ifdef __Pyx_AsyncGen_USED
13547 if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
13549 #ifdef __Pyx_StopAsyncIteration_USED
13550 if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
13554 #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
13555 PyEval_InitThreads();
13558 #if CYTHON_PEP489_MULTI_PHASE_INIT
13559 __pyx_m = __pyx_pyinit_module;
13560 Py_INCREF(__pyx_m);
13562 #if PY_MAJOR_VERSION < 3
13563 __pyx_m = Py_InitModule4(
"csubgridError", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
13565 __pyx_m = PyModule_Create(&__pyx_moduledef);
13567 if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
13569 __pyx_d = PyModule_GetDict(__pyx_m);
if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
13570 Py_INCREF(__pyx_d);
13571 __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME);
if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
13572 Py_INCREF(__pyx_b);
13573 __pyx_cython_runtime = PyImport_AddModule((
char *)
"cython_runtime");
if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
13574 Py_INCREF(__pyx_cython_runtime);
13575 if (PyObject_SetAttrString(__pyx_m,
"__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
13577 if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
13578 #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
13579 if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
13581 if (__pyx_module_is_main_csubgridError) {
13582 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
13584 #if PY_MAJOR_VERSION >= 3
13586 PyObject *modules = PyImport_GetModuleDict();
if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
13587 if (!PyDict_GetItemString(modules,
"csubgridError")) {
13588 if (unlikely(PyDict_SetItemString(modules,
"csubgridError", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
13593 if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
13595 if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
13597 (void)__Pyx_modinit_global_init_code();
13598 (void)__Pyx_modinit_variable_export_code();
13599 (void)__Pyx_modinit_function_export_code();
13600 (void)__Pyx_modinit_type_init_code();
13601 if (unlikely(__Pyx_modinit_type_import_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
13602 (void)__Pyx_modinit_variable_import_code();
13603 (void)__Pyx_modinit_function_import_code();
13605 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
13606 if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
13615 __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, -1);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
13616 __Pyx_GOTREF(__pyx_t_1);
13617 if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) __PYX_ERR(0, 2, __pyx_L1_error)
13618 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13627 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13csubgridError_1calculateSubgridError_tauRes, NULL, __pyx_n_s_csubgridError);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 670, __pyx_L1_error)
13628 __Pyx_GOTREF(__pyx_t_1);
13629 if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateSubgridError_tauRes, __pyx_t_1) < 0) __PYX_ERR(0, 670, __pyx_L1_error)
13630 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13639 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13csubgridError_3calculateSubgridError_ADR_generic_tau, NULL, __pyx_n_s_csubgridError);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 683, __pyx_L1_error)
13640 __Pyx_GOTREF(__pyx_t_1);
13641 if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateSubgridError_ADR_generi, __pyx_t_1) < 0) __PYX_ERR(0, 683, __pyx_L1_error)
13642 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13651 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13csubgridError_5calculateSubgridError_ADR_generic_tau_sd, NULL, __pyx_n_s_csubgridError);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 708, __pyx_L1_error)
13652 __Pyx_GOTREF(__pyx_t_1);
13653 if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateSubgridError_ADR_generi_2, __pyx_t_1) < 0) __PYX_ERR(0, 708, __pyx_L1_error)
13654 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13663 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13csubgridError_7calculateSubgridError_ADR_tau, NULL, __pyx_n_s_csubgridError);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 737, __pyx_L1_error)
13664 __Pyx_GOTREF(__pyx_t_1);
13665 if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateSubgridError_ADR_tau, __pyx_t_1) < 0) __PYX_ERR(0, 737, __pyx_L1_error)
13666 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13675 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13csubgridError_9calculateSubgridError_ADR_tau_sd, NULL, __pyx_n_s_csubgridError);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 764, __pyx_L1_error)
13676 __Pyx_GOTREF(__pyx_t_1);
13677 if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateSubgridError_ADR_tau_sd, __pyx_t_1) < 0) __PYX_ERR(0, 764, __pyx_L1_error)
13678 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13687 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13csubgridError_11calculateSubgridError_A_tau, NULL, __pyx_n_s_csubgridError);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 795, __pyx_L1_error)
13688 __Pyx_GOTREF(__pyx_t_1);
13689 if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateSubgridError_A_tau, __pyx_t_1) < 0) __PYX_ERR(0, 795, __pyx_L1_error)
13690 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13699 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13csubgridError_13calculateSubgridError_HJ_tau, NULL, __pyx_n_s_csubgridError);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 810, __pyx_L1_error)
13700 __Pyx_GOTREF(__pyx_t_1);
13701 if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateSubgridError_HJ_tau, __pyx_t_1) < 0) __PYX_ERR(0, 810, __pyx_L1_error)
13702 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13711 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13csubgridError_15calculateSubgridErrorStokes2D_GLS_velocity, NULL, __pyx_n_s_csubgridError);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 826, __pyx_L1_error)
13712 __Pyx_GOTREF(__pyx_t_1);
13713 if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateSubgridErrorStokes2D_GL, __pyx_t_1) < 0) __PYX_ERR(0, 826, __pyx_L1_error)
13714 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13723 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13csubgridError_17calculateSubgridErrorStokes2D_GLS_velocity_sd, NULL, __pyx_n_s_csubgridError);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 858, __pyx_L1_error)
13724 __Pyx_GOTREF(__pyx_t_1);
13725 if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateSubgridErrorStokes2D_GL_2, __pyx_t_1) < 0) __PYX_ERR(0, 858, __pyx_L1_error)
13726 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13735 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13csubgridError_19calculateSubgridErrorStokes3D_GLS_velocity, NULL, __pyx_n_s_csubgridError);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 890, __pyx_L1_error)
13736 __Pyx_GOTREF(__pyx_t_1);
13737 if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateSubgridErrorStokes3D_GL, __pyx_t_1) < 0) __PYX_ERR(0, 890, __pyx_L1_error)
13738 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13747 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13csubgridError_21calculateSubgridErrorStokes3D_GLS_velocity_sd, NULL, __pyx_n_s_csubgridError);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 934, __pyx_L1_error)
13748 __Pyx_GOTREF(__pyx_t_1);
13749 if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateSubgridErrorStokes3D_GL_2, __pyx_t_1) < 0) __PYX_ERR(0, 934, __pyx_L1_error)
13750 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13759 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13csubgridError_23calculateSubgridErrorStokes2D_GLS_velocity_pressure, NULL, __pyx_n_s_csubgridError);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 978, __pyx_L1_error)
13760 __Pyx_GOTREF(__pyx_t_1);
13761 if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateSubgridErrorStokes2D_GL_3, __pyx_t_1) < 0) __PYX_ERR(0, 978, __pyx_L1_error)
13762 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13771 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13csubgridError_25calculateSubgridErrorStokes2D_GLS_velocity_pressure_sd, NULL, __pyx_n_s_csubgridError);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1022, __pyx_L1_error)
13772 __Pyx_GOTREF(__pyx_t_1);
13773 if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateSubgridErrorStokes2D_GL_4, __pyx_t_1) < 0) __PYX_ERR(0, 1022, __pyx_L1_error)
13774 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13783 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13csubgridError_27calculateSubgridErrorStokes3D_GLS_velocity_pressure, NULL, __pyx_n_s_csubgridError);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1066, __pyx_L1_error)
13784 __Pyx_GOTREF(__pyx_t_1);
13785 if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateSubgridErrorStokes3D_GL_3, __pyx_t_1) < 0) __PYX_ERR(0, 1066, __pyx_L1_error)
13786 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13795 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13csubgridError_29calculateSubgridErrorStokes3D_GLS_velocity_pressure_sd, NULL, __pyx_n_s_csubgridError);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1126, __pyx_L1_error)
13796 __Pyx_GOTREF(__pyx_t_1);
13797 if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateSubgridErrorStokes3D_GL_4, __pyx_t_1) < 0) __PYX_ERR(0, 1126, __pyx_L1_error)
13798 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13807 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13csubgridError_31calculateSubgridErrorNavierStokes2D_GLS_tau, NULL, __pyx_n_s_csubgridError);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1186, __pyx_L1_error)
13808 __Pyx_GOTREF(__pyx_t_1);
13809 if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateSubgridErrorNavierStoke, __pyx_t_1) < 0) __PYX_ERR(0, 1186, __pyx_L1_error)
13810 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13819 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13csubgridError_33calculateSubgridErrorNavierStokes2D_GLS_tau_sd, NULL, __pyx_n_s_csubgridError);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1207, __pyx_L1_error)
13820 __Pyx_GOTREF(__pyx_t_1);
13821 if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateSubgridErrorNavierStoke_2, __pyx_t_1) < 0) __PYX_ERR(0, 1207, __pyx_L1_error)
13822 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13831 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13csubgridError_35calculateSubgridErrorNavierStokes2D_generic_tau, NULL, __pyx_n_s_csubgridError);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1228, __pyx_L1_error)
13832 __Pyx_GOTREF(__pyx_t_1);
13833 if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateSubgridErrorNavierStoke_3, __pyx_t_1) < 0) __PYX_ERR(0, 1228, __pyx_L1_error)
13834 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13843 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13csubgridError_37calculateSubgridErrorNavierStokes2D_generic_tau_sd, NULL, __pyx_n_s_csubgridError);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1247, __pyx_L1_error)
13844 __Pyx_GOTREF(__pyx_t_1);
13845 if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateSubgridErrorNavierStoke_4, __pyx_t_1) < 0) __PYX_ERR(0, 1247, __pyx_L1_error)
13846 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13855 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13csubgridError_39calculateSubgridErrorNavierStokes2D_generic_withBodyForce_tau, NULL, __pyx_n_s_csubgridError);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1266, __pyx_L1_error)
13856 __Pyx_GOTREF(__pyx_t_1);
13857 if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateSubgridErrorNavierStoke_5, __pyx_t_1) < 0) __PYX_ERR(0, 1266, __pyx_L1_error)
13858 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13867 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13csubgridError_41calculateSubgridErrorNavierStokes2D_generic_withBodyForce_tau_sd, NULL, __pyx_n_s_csubgridError);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1287, __pyx_L1_error)
13868 __Pyx_GOTREF(__pyx_t_1);
13869 if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateSubgridErrorNavierStoke_6, __pyx_t_1) < 0) __PYX_ERR(0, 1287, __pyx_L1_error)
13870 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13879 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13csubgridError_43calculateSubgridErrorNavierStokes2D_GLS_tauRes, NULL, __pyx_n_s_csubgridError);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1308, __pyx_L1_error)
13880 __Pyx_GOTREF(__pyx_t_1);
13881 if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateSubgridErrorNavierStoke_7, __pyx_t_1) < 0) __PYX_ERR(0, 1308, __pyx_L1_error)
13882 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13891 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13csubgridError_45calculateSubgridErrorStokes_GLS_tau, NULL, __pyx_n_s_csubgridError);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1360, __pyx_L1_error)
13892 __Pyx_GOTREF(__pyx_t_1);
13893 if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateSubgridErrorStokes_GLS, __pyx_t_1) < 0) __PYX_ERR(0, 1360, __pyx_L1_error)
13894 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13903 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13csubgridError_47calculateSubgridErrorStokes_GLS_tau_sd, NULL, __pyx_n_s_csubgridError);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1373, __pyx_L1_error)
13904 __Pyx_GOTREF(__pyx_t_1);
13905 if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateSubgridErrorStokes_GLS_2, __pyx_t_1) < 0) __PYX_ERR(0, 1373, __pyx_L1_error)
13906 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13915 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13csubgridError_49calculateSubgridErrorStokes2D_GLS_tauRes, NULL, __pyx_n_s_csubgridError);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1386, __pyx_L1_error)
13916 __Pyx_GOTREF(__pyx_t_1);
13917 if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateSubgridErrorStokes2D_GL_5, __pyx_t_1) < 0) __PYX_ERR(0, 1386, __pyx_L1_error)
13918 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13927 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13csubgridError_51calculateSubgridErrorStokes3D_GLS_tauRes, NULL, __pyx_n_s_csubgridError);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1430, __pyx_L1_error)
13928 __Pyx_GOTREF(__pyx_t_1);
13929 if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateSubgridErrorStokes3D_GL_5, __pyx_t_1) < 0) __PYX_ERR(0, 1430, __pyx_L1_error)
13930 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13939 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13csubgridError_53calculateSubgridErrorNavierStokes3D_GLS_tauRes, NULL, __pyx_n_s_csubgridError);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1490, __pyx_L1_error)
13940 __Pyx_GOTREF(__pyx_t_1);
13941 if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateSubgridErrorNavierStoke_8, __pyx_t_1) < 0) __PYX_ERR(0, 1490, __pyx_L1_error)
13942 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13951 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13csubgridError_55calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure, NULL, __pyx_n_s_csubgridError);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1574, __pyx_L1_error)
13952 __Pyx_GOTREF(__pyx_t_1);
13953 if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateSubgridErrorNavierStoke_9, __pyx_t_1) < 0) __PYX_ERR(0, 1574, __pyx_L1_error)
13954 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13963 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13csubgridError_57calculateSubgridErrorNavierStokes3D_GLS_velocity_pressure_sd, NULL, __pyx_n_s_csubgridError);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1638, __pyx_L1_error)
13964 __Pyx_GOTREF(__pyx_t_1);
13965 if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateSubgridErrorNavierStoke_10, __pyx_t_1) < 0) __PYX_ERR(0, 1638, __pyx_L1_error)
13966 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13975 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13csubgridError_59calculateSubgridErrorStokes2D_1, NULL, __pyx_n_s_csubgridError);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1702, __pyx_L1_error)
13976 __Pyx_GOTREF(__pyx_t_1);
13977 if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateSubgridErrorStokes2D_1, __pyx_t_1) < 0) __PYX_ERR(0, 1702, __pyx_L1_error)
13978 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13987 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13csubgridError_61calculateSubgridErrorStokes2D_1_sd, NULL, __pyx_n_s_csubgridError);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1756, __pyx_L1_error)
13988 __Pyx_GOTREF(__pyx_t_1);
13989 if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateSubgridErrorStokes2D_1_2, __pyx_t_1) < 0) __PYX_ERR(0, 1756, __pyx_L1_error)
13990 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13999 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13csubgridError_63calculateSubgridErrorShallowWater1D, NULL, __pyx_n_s_csubgridError);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1810, __pyx_L1_error)
14000 __Pyx_GOTREF(__pyx_t_1);
14001 if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateSubgridErrorShallowWate, __pyx_t_1) < 0) __PYX_ERR(0, 1810, __pyx_L1_error)
14002 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14011 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13csubgridError_65calculateSubgridErrorShallowWater2D, NULL, __pyx_n_s_csubgridError);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1824, __pyx_L1_error)
14012 __Pyx_GOTREF(__pyx_t_1);
14013 if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateSubgridErrorShallowWate_2, __pyx_t_1) < 0) __PYX_ERR(0, 1824, __pyx_L1_error)
14014 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14023 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13csubgridError_67calculateSubgridError_Harari_tau_sd, NULL, __pyx_n_s_csubgridError);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1842, __pyx_L1_error)
14024 __Pyx_GOTREF(__pyx_t_1);
14025 if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateSubgridError_Harari_tau, __pyx_t_1) < 0) __PYX_ERR(0, 1842, __pyx_L1_error)
14026 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14035 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13csubgridError_69calculateSubgridErrorGradient_tauRes, NULL, __pyx_n_s_csubgridError);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1858, __pyx_L1_error)
14036 __Pyx_GOTREF(__pyx_t_1);
14037 if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateSubgridErrorGradient_ta, __pyx_t_1) < 0) __PYX_ERR(0, 1858, __pyx_L1_error)
14038 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14047 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13csubgridError_71calculateSubgridError_ADR_Sangalli_tau_sd, NULL, __pyx_n_s_csubgridError);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1867, __pyx_L1_error)
14048 __Pyx_GOTREF(__pyx_t_1);
14049 if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculateSubgridError_ADR_Sangal, __pyx_t_1) < 0) __PYX_ERR(0, 1867, __pyx_L1_error)
14050 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14057 __pyx_t_1 = __Pyx_PyDict_NewPresized(0);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
14058 __Pyx_GOTREF(__pyx_t_1);
14059 if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
14060 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14074 __Pyx_XDECREF(__pyx_t_1);
14077 __Pyx_AddTraceback(
"init csubgridError", __pyx_clineno, __pyx_lineno, __pyx_filename);
14080 }
else if (!PyErr_Occurred()) {
14081 PyErr_SetString(PyExc_ImportError,
"init csubgridError");
14084 __Pyx_RefNannyFinishContext();
14085 #if CYTHON_PEP489_MULTI_PHASE_INIT
14086 return (__pyx_m != NULL) ? 0 : -1;
14087 #elif PY_MAJOR_VERSION >= 3
14096 #if CYTHON_REFNANNY
14097 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(
const char *modname) {
14098 PyObject *m = NULL, *p = NULL;
14100 m = PyImport_ImportModule(modname);
14102 p = PyObject_GetAttrString(m,
"RefNannyAPI");
14104 r = PyLong_AsVoidPtr(p);
14108 return (__Pyx_RefNannyAPIStruct *)
r;
14113 static void __Pyx_RaiseArgtupleInvalid(
14114 const char* func_name,
14116 Py_ssize_t num_min,
14117 Py_ssize_t num_max,
14118 Py_ssize_t num_found)
14120 Py_ssize_t num_expected;
14121 const char *more_or_less;
14122 if (num_found < num_min) {
14123 num_expected = num_min;
14124 more_or_less =
"at least";
14126 num_expected = num_max;
14127 more_or_less =
"at most";
14130 more_or_less =
"exactly";
14132 PyErr_Format(PyExc_TypeError,
14133 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T
"d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T
"d given)",
14134 func_name, more_or_less, num_expected,
14135 (num_expected == 1) ?
"" :
"s", num_found);
14139 static void __Pyx_RaiseDoubleKeywordsError(
14140 const char* func_name,
14143 PyErr_Format(PyExc_TypeError,
14144 #
if PY_MAJOR_VERSION >= 3
14145 "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
14147 "%s() got multiple values for keyword argument '%s'", func_name,
14148 PyString_AsString(kw_name));
14153 static int __Pyx_ParseOptionalKeywords(
14155 PyObject **argnames[],
14157 PyObject *values[],
14158 Py_ssize_t num_pos_args,
14159 const char* function_name)
14161 PyObject *key = 0, *value = 0;
14162 Py_ssize_t
pos = 0;
14164 PyObject*** first_kw_arg = argnames + num_pos_args;
14165 while (PyDict_Next(kwds, &
pos, &key, &value)) {
14166 name = first_kw_arg;
14167 while (*name && (**name != key)) name++;
14169 values[name-argnames] = value;
14172 name = first_kw_arg;
14173 #if PY_MAJOR_VERSION < 3
14174 if (likely(PyString_Check(key))) {
14176 if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
14177 && _PyString_Eq(**name, key)) {
14178 values[name-argnames] = value;
14183 if (*name)
continue;
14185 PyObject*** argname = argnames;
14186 while (argname != first_kw_arg) {
14187 if ((**argname == key) || (
14188 (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
14189 && _PyString_Eq(**argname, key))) {
14190 goto arg_passed_twice;
14197 if (likely(PyUnicode_Check(key))) {
14199 int cmp = (**name == key) ? 0 :
14200 #
if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
14201 (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
14203 PyUnicode_Compare(**name, key);
14204 if (cmp < 0 && unlikely(PyErr_Occurred()))
goto bad;
14206 values[name-argnames] = value;
14211 if (*name)
continue;
14213 PyObject*** argname = argnames;
14214 while (argname != first_kw_arg) {
14215 int cmp = (**argname == key) ? 0 :
14216 #
if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
14217 (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
14219 PyUnicode_Compare(**argname, key);
14220 if (cmp < 0 && unlikely(PyErr_Occurred()))
goto bad;
14221 if (cmp == 0)
goto arg_passed_twice;
14226 goto invalid_keyword_type;
14228 if (unlikely(PyDict_SetItem(kwds2, key, value)))
goto bad;
14230 goto invalid_keyword;
14235 __Pyx_RaiseDoubleKeywordsError(function_name, key);
14237 invalid_keyword_type:
14238 PyErr_Format(PyExc_TypeError,
14239 "%.200s() keywords must be strings", function_name);
14242 PyErr_Format(PyExc_TypeError,
14243 #
if PY_MAJOR_VERSION < 3
14244 "%.200s() got an unexpected keyword argument '%.200s'",
14245 function_name, PyString_AsString(key));
14247 "%s() got an unexpected keyword argument '%U'",
14248 function_name, key);
14255 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type,
const char *name,
int exact)
14257 if (unlikely(!type)) {
14258 PyErr_SetString(PyExc_SystemError,
"Missing type object");
14262 #if PY_MAJOR_VERSION == 2
14263 if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj)))
return 1;
14267 if (likely(__Pyx_TypeCheck(obj, type)))
return 1;
14269 PyErr_Format(PyExc_TypeError,
14270 "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
14271 name, type->tp_name, Py_TYPE(obj)->tp_name);
14276 #if CYTHON_USE_TYPE_SLOTS
14277 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
14278 PyTypeObject* tp = Py_TYPE(obj);
14279 if (likely(tp->tp_getattro))
14280 return tp->tp_getattro(obj, attr_name);
14281 #if PY_MAJOR_VERSION < 3
14282 if (likely(tp->tp_getattr))
14283 return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
14285 return PyObject_GetAttr(obj, attr_name);
14290 static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
14291 PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
14292 if (unlikely(!result)) {
14293 PyErr_Format(PyExc_NameError,
14294 #
if PY_MAJOR_VERSION >= 3
14295 "name '%U' is not defined", name);
14297 "name '%.200s' is not defined", PyString_AS_STRING(name));
14304 #if CYTHON_USE_EXC_INFO_STACK
14305 static _PyErr_StackItem *
14306 __Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
14308 _PyErr_StackItem *exc_info = tstate->exc_info;
14309 while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
14310 exc_info->previous_item != NULL)
14312 exc_info = exc_info->previous_item;
14319 #if CYTHON_FAST_THREAD_STATE
14320 static CYTHON_INLINE
void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
14321 #if CYTHON_USE_EXC_INFO_STACK
14322 _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
14323 *type = exc_info->exc_type;
14324 *value = exc_info->exc_value;
14325 *tb = exc_info->exc_traceback;
14327 *type = tstate->exc_type;
14328 *value = tstate->exc_value;
14329 *tb = tstate->exc_traceback;
14332 Py_XINCREF(*value);
14335 static CYTHON_INLINE
void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
14336 PyObject *tmp_type, *tmp_value, *tmp_tb;
14337 #if CYTHON_USE_EXC_INFO_STACK
14338 _PyErr_StackItem *exc_info = tstate->exc_info;
14339 tmp_type = exc_info->exc_type;
14340 tmp_value = exc_info->exc_value;
14341 tmp_tb = exc_info->exc_traceback;
14342 exc_info->exc_type = type;
14343 exc_info->exc_value = value;
14344 exc_info->exc_traceback = tb;
14346 tmp_type = tstate->exc_type;
14347 tmp_value = tstate->exc_value;
14348 tmp_tb = tstate->exc_traceback;
14349 tstate->exc_type = type;
14350 tstate->exc_value = value;
14351 tstate->exc_traceback = tb;
14353 Py_XDECREF(tmp_type);
14354 Py_XDECREF(tmp_value);
14355 Py_XDECREF(tmp_tb);
14360 #if CYTHON_FAST_THREAD_STATE
14361 static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
14363 n = PyTuple_GET_SIZE(tuple);
14364 #if PY_MAJOR_VERSION >= 3
14365 for (i=0; i<
n; i++) {
14366 if (exc_type == PyTuple_GET_ITEM(tuple, i))
return 1;
14369 for (i=0; i<
n; i++) {
14370 if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i)))
return 1;
14374 static CYTHON_INLINE
int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
14375 PyObject *exc_type = tstate->curexc_type;
14376 if (exc_type == err)
return 1;
14377 if (unlikely(!exc_type))
return 0;
14378 if (unlikely(PyTuple_Check(err)))
14379 return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
14380 return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
14385 #if CYTHON_FAST_THREAD_STATE
14386 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
14388 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
14391 PyObject *local_type, *local_value, *local_tb;
14392 #if CYTHON_FAST_THREAD_STATE
14393 PyObject *tmp_type, *tmp_value, *tmp_tb;
14394 local_type = tstate->curexc_type;
14395 local_value = tstate->curexc_value;
14396 local_tb = tstate->curexc_traceback;
14397 tstate->curexc_type = 0;
14398 tstate->curexc_value = 0;
14399 tstate->curexc_traceback = 0;
14401 PyErr_Fetch(&local_type, &local_value, &local_tb);
14403 PyErr_NormalizeException(&local_type, &local_value, &local_tb);
14404 #if CYTHON_FAST_THREAD_STATE
14405 if (unlikely(tstate->curexc_type))
14407 if (unlikely(PyErr_Occurred()))
14410 #if PY_MAJOR_VERSION >= 3
14412 if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
14416 Py_XINCREF(local_tb);
14417 Py_XINCREF(local_type);
14418 Py_XINCREF(local_value);
14419 *type = local_type;
14420 *value = local_value;
14422 #if CYTHON_FAST_THREAD_STATE
14423 #if CYTHON_USE_EXC_INFO_STACK
14425 _PyErr_StackItem *exc_info = tstate->exc_info;
14426 tmp_type = exc_info->exc_type;
14427 tmp_value = exc_info->exc_value;
14428 tmp_tb = exc_info->exc_traceback;
14429 exc_info->exc_type = local_type;
14430 exc_info->exc_value = local_value;
14431 exc_info->exc_traceback = local_tb;
14434 tmp_type = tstate->exc_type;
14435 tmp_value = tstate->exc_value;
14436 tmp_tb = tstate->exc_traceback;
14437 tstate->exc_type = local_type;
14438 tstate->exc_value = local_value;
14439 tstate->exc_traceback = local_tb;
14441 Py_XDECREF(tmp_type);
14442 Py_XDECREF(tmp_value);
14443 Py_XDECREF(tmp_tb);
14445 PyErr_SetExcInfo(local_type, local_value, local_tb);
14452 Py_XDECREF(local_type);
14453 Py_XDECREF(local_value);
14454 Py_XDECREF(local_tb);
14459 #if CYTHON_COMPILING_IN_CPYTHON
14460 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
14462 ternaryfunc call = Py_TYPE(func)->tp_call;
14463 if (unlikely(!call))
14464 return PyObject_Call(func, arg, kw);
14465 if (unlikely(Py_EnterRecursiveCall((
char*)
" while calling a Python object")))
14467 result = (*call)(func, arg, kw);
14468 Py_LeaveRecursiveCall();
14469 if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
14472 "NULL result without error in PyObject_Call");
14479 #if CYTHON_FAST_THREAD_STATE
14480 static CYTHON_INLINE
void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
14481 PyObject *tmp_type, *tmp_value, *tmp_tb;
14482 tmp_type = tstate->curexc_type;
14483 tmp_value = tstate->curexc_value;
14484 tmp_tb = tstate->curexc_traceback;
14485 tstate->curexc_type = type;
14486 tstate->curexc_value = value;
14487 tstate->curexc_traceback = tb;
14488 Py_XDECREF(tmp_type);
14489 Py_XDECREF(tmp_value);
14490 Py_XDECREF(tmp_tb);
14492 static CYTHON_INLINE
void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
14493 *type = tstate->curexc_type;
14494 *value = tstate->curexc_value;
14495 *tb = tstate->curexc_traceback;
14496 tstate->curexc_type = 0;
14497 tstate->curexc_value = 0;
14498 tstate->curexc_traceback = 0;
14503 #if PY_MAJOR_VERSION < 3
14504 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
14505 CYTHON_UNUSED PyObject *cause) {
14506 __Pyx_PyThreadState_declare
14508 if (!value || value == Py_None)
14512 if (!tb || tb == Py_None)
14516 if (!PyTraceBack_Check(tb)) {
14517 PyErr_SetString(PyExc_TypeError,
14518 "raise: arg 3 must be a traceback or None");
14522 if (PyType_Check(type)) {
14523 #if CYTHON_COMPILING_IN_PYPY
14525 Py_INCREF(Py_None);
14529 PyErr_NormalizeException(&type, &value, &tb);
14532 PyErr_SetString(PyExc_TypeError,
14533 "instance exception may not have a separate value");
14537 type = (PyObject*) Py_TYPE(type);
14539 if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
14540 PyErr_SetString(PyExc_TypeError,
14541 "raise: exception class must be a subclass of BaseException");
14545 __Pyx_PyThreadState_assign
14546 __Pyx_ErrRestore(type, value, tb);
14555 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
14556 PyObject* owned_instance = NULL;
14557 if (tb == Py_None) {
14559 }
else if (tb && !PyTraceBack_Check(tb)) {
14560 PyErr_SetString(PyExc_TypeError,
14561 "raise: arg 3 must be a traceback or None");
14564 if (value == Py_None)
14566 if (PyExceptionInstance_Check(type)) {
14568 PyErr_SetString(PyExc_TypeError,
14569 "instance exception may not have a separate value");
14573 type = (PyObject*) Py_TYPE(value);
14574 }
else if (PyExceptionClass_Check(type)) {
14575 PyObject *instance_class = NULL;
14576 if (value && PyExceptionInstance_Check(value)) {
14577 instance_class = (PyObject*) Py_TYPE(value);
14578 if (instance_class != type) {
14579 int is_subclass = PyObject_IsSubclass(instance_class, type);
14580 if (!is_subclass) {
14581 instance_class = NULL;
14582 }
else if (unlikely(is_subclass == -1)) {
14585 type = instance_class;
14589 if (!instance_class) {
14592 args = PyTuple_New(0);
14593 else if (PyTuple_Check(value)) {
14597 args = PyTuple_Pack(1, value);
14600 owned_instance = PyObject_Call(type, args, NULL);
14602 if (!owned_instance)
14604 value = owned_instance;
14605 if (!PyExceptionInstance_Check(value)) {
14606 PyErr_Format(PyExc_TypeError,
14607 "calling %R should have returned an instance of "
14608 "BaseException, not %R",
14609 type, Py_TYPE(value));
14614 PyErr_SetString(PyExc_TypeError,
14615 "raise: exception class must be a subclass of BaseException");
14619 PyObject *fixed_cause;
14620 if (cause == Py_None) {
14621 fixed_cause = NULL;
14622 }
else if (PyExceptionClass_Check(cause)) {
14623 fixed_cause = PyObject_CallObject(cause, NULL);
14624 if (fixed_cause == NULL)
14626 }
else if (PyExceptionInstance_Check(cause)) {
14627 fixed_cause = cause;
14628 Py_INCREF(fixed_cause);
14630 PyErr_SetString(PyExc_TypeError,
14631 "exception causes must derive from "
14635 PyException_SetCause(value, fixed_cause);
14637 PyErr_SetObject(type, value);
14639 #if CYTHON_COMPILING_IN_PYPY
14640 PyObject *tmp_type, *tmp_value, *tmp_tb;
14641 PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
14643 PyErr_Restore(tmp_type, tmp_value, tb);
14644 Py_XDECREF(tmp_tb);
14646 PyThreadState *tstate = __Pyx_PyThreadState_Current;
14647 PyObject* tmp_tb = tstate->curexc_traceback;
14648 if (tb != tmp_tb) {
14650 tstate->curexc_traceback = tb;
14651 Py_XDECREF(tmp_tb);
14656 Py_XDECREF(owned_instance);
14662 #ifndef __PYX_HAVE_RT_ImportType
14663 #define __PYX_HAVE_RT_ImportType
14664 static PyTypeObject *__Pyx_ImportType(PyObject *module,
const char *module_name,
const char *class_name,
14665 size_t size,
enum __Pyx_ImportType_CheckSize check_size)
14667 PyObject *result = 0;
14669 Py_ssize_t basicsize;
14670 #ifdef Py_LIMITED_API
14671 PyObject *py_basicsize;
14673 result = PyObject_GetAttrString(module, class_name);
14676 if (!PyType_Check(result)) {
14677 PyErr_Format(PyExc_TypeError,
14678 "%.200s.%.200s is not a type object",
14679 module_name, class_name);
14682 #ifndef Py_LIMITED_API
14683 basicsize = ((PyTypeObject *)result)->tp_basicsize;
14685 py_basicsize = PyObject_GetAttrString(result,
"__basicsize__");
14688 basicsize = PyLong_AsSsize_t(py_basicsize);
14689 Py_DECREF(py_basicsize);
14691 if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
14694 if ((
size_t)basicsize < size) {
14695 PyErr_Format(PyExc_ValueError,
14696 "%.200s.%.200s size changed, may indicate binary incompatibility. "
14697 "Expected %zd from C header, got %zd from PyObject",
14698 module_name, class_name, size, basicsize);
14701 if (check_size == __Pyx_ImportType_CheckSize_Error && (
size_t)basicsize != size) {
14702 PyErr_Format(PyExc_ValueError,
14703 "%.200s.%.200s size changed, may indicate binary incompatibility. "
14704 "Expected %zd from C header, got %zd from PyObject",
14705 module_name, class_name, size, basicsize);
14708 else if (check_size == __Pyx_ImportType_CheckSize_Warn && (
size_t)basicsize > size) {
14709 PyOS_snprintf(warning,
sizeof(warning),
14710 "%s.%s size changed, may indicate binary incompatibility. "
14711 "Expected %zd from C header, got %zd from PyObject",
14712 module_name, class_name, size, basicsize);
14713 if (PyErr_WarnEx(NULL, warning, 0) < 0)
goto bad;
14715 return (PyTypeObject *)result;
14717 Py_XDECREF(result);
14723 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list,
int level) {
14724 PyObject *empty_list = 0;
14725 PyObject *module = 0;
14726 PyObject *global_dict = 0;
14727 PyObject *empty_dict = 0;
14729 #if PY_MAJOR_VERSION < 3
14730 PyObject *py_import;
14731 py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
14738 empty_list = PyList_New(0);
14743 global_dict = PyModule_GetDict(__pyx_m);
14746 empty_dict = PyDict_New();
14750 #if PY_MAJOR_VERSION >= 3
14752 if ((1) && (strchr(__Pyx_MODULE_NAME,
'.'))) {
14753 module = PyImport_ImportModuleLevelObject(
14754 name, global_dict, empty_dict, list, 1);
14756 if (!PyErr_ExceptionMatches(PyExc_ImportError))
14765 #if PY_MAJOR_VERSION < 3
14766 PyObject *py_level = PyInt_FromLong(level);
14769 module = PyObject_CallFunctionObjArgs(py_import,
14770 name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
14771 Py_DECREF(py_level);
14773 module = PyImport_ImportModuleLevelObject(
14774 name, global_dict, empty_dict, list, level);
14779 #if PY_MAJOR_VERSION < 3
14780 Py_XDECREF(py_import);
14782 Py_XDECREF(empty_list);
14783 Py_XDECREF(empty_dict);
14788 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
14789 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
14790 PyObject *dict = Py_TYPE(obj)->tp_dict;
14791 return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
14793 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
14794 PyObject **dictptr = NULL;
14795 Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
14797 #if CYTHON_COMPILING_IN_CPYTHON
14798 dictptr = (likely(offset > 0)) ? (PyObject **) ((
char *)obj + offset) : _PyObject_GetDictPtr(obj);
14800 dictptr = _PyObject_GetDictPtr(obj);
14803 return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
14805 static CYTHON_INLINE
int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
14806 PyObject *dict = Py_TYPE(obj)->tp_dict;
14807 if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
14809 return obj_dict_version == __Pyx_get_object_dict_version(obj);
14814 #ifndef CYTHON_CLINE_IN_TRACEBACK
14815 static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate,
int c_line) {
14816 PyObject *use_cline;
14817 PyObject *ptype, *pvalue, *ptraceback;
14818 #if CYTHON_COMPILING_IN_CPYTHON
14819 PyObject **cython_runtime_dict;
14821 if (unlikely(!__pyx_cython_runtime)) {
14824 __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
14825 #if CYTHON_COMPILING_IN_CPYTHON
14826 cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
14827 if (likely(cython_runtime_dict)) {
14828 __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
14829 use_cline, *cython_runtime_dict,
14830 __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
14834 PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
14835 if (use_cline_obj) {
14836 use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
14837 Py_DECREF(use_cline_obj);
14845 (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
14847 else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
14850 __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
14856 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries,
int count,
int code_line) {
14857 int start = 0, mid = 0, end = count - 1;
14858 if (end >= 0 && code_line > entries[end].code_line) {
14861 while (start < end) {
14862 mid = start + (end - start) / 2;
14863 if (code_line < entries[mid].code_line) {
14865 }
else if (code_line > entries[mid].code_line) {
14871 if (code_line <= entries[mid].code_line) {
14877 static PyCodeObject *__pyx_find_code_object(
int code_line) {
14878 PyCodeObject* code_object;
14880 if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
14883 pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
14884 if (unlikely(
pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[
pos].code_line != code_line)) {
14887 code_object = __pyx_code_cache.entries[
pos].code_object;
14888 Py_INCREF(code_object);
14889 return code_object;
14891 static void __pyx_insert_code_object(
int code_line, PyCodeObject* code_object) {
14893 __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
14894 if (unlikely(!code_line)) {
14897 if (unlikely(!entries)) {
14898 entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*
sizeof(__Pyx_CodeObjectCacheEntry));
14899 if (likely(entries)) {
14900 __pyx_code_cache.entries = entries;
14901 __pyx_code_cache.max_count = 64;
14902 __pyx_code_cache.count = 1;
14903 entries[0].code_line = code_line;
14904 entries[0].code_object = code_object;
14905 Py_INCREF(code_object);
14909 pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
14910 if ((
pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[
pos].code_line == code_line)) {
14911 PyCodeObject* tmp = entries[
pos].code_object;
14912 entries[
pos].code_object = code_object;
14916 if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
14917 int new_max = __pyx_code_cache.max_count + 64;
14918 entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
14919 __pyx_code_cache.entries, ((
size_t)new_max) *
sizeof(__Pyx_CodeObjectCacheEntry));
14920 if (unlikely(!entries)) {
14923 __pyx_code_cache.entries = entries;
14924 __pyx_code_cache.max_count = new_max;
14926 for (i=__pyx_code_cache.count; i>
pos; i--) {
14927 entries[i] = entries[i-1];
14929 entries[
pos].code_line = code_line;
14930 entries[
pos].code_object = code_object;
14931 __pyx_code_cache.count++;
14932 Py_INCREF(code_object);
14936 #include "compile.h"
14937 #include "frameobject.h"
14938 #include "traceback.h"
14939 #if PY_VERSION_HEX >= 0x030b00a6
14940 #ifndef Py_BUILD_CORE
14941 #define Py_BUILD_CORE 1
14943 #include "internal/pycore_frame.h"
14945 static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
14946 const char *funcname,
int c_line,
14947 int py_line,
const char *filename) {
14948 PyCodeObject *py_code = NULL;
14949 PyObject *py_funcname = NULL;
14950 #if PY_MAJOR_VERSION < 3
14951 PyObject *py_srcfile = NULL;
14952 py_srcfile = PyString_FromString(filename);
14953 if (!py_srcfile)
goto bad;
14956 #if PY_MAJOR_VERSION < 3
14957 py_funcname = PyString_FromFormat(
"%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
14958 if (!py_funcname)
goto bad;
14960 py_funcname = PyUnicode_FromFormat(
"%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
14961 if (!py_funcname)
goto bad;
14962 funcname = PyUnicode_AsUTF8(py_funcname);
14963 if (!funcname)
goto bad;
14967 #if PY_MAJOR_VERSION < 3
14968 py_funcname = PyString_FromString(funcname);
14969 if (!py_funcname)
goto bad;
14972 #if PY_MAJOR_VERSION < 3
14973 py_code = __Pyx_PyCode_New(
14990 Py_DECREF(py_srcfile);
14992 py_code = PyCode_NewEmpty(filename, funcname, py_line);
14994 Py_XDECREF(py_funcname);
14997 Py_XDECREF(py_funcname);
14998 #if PY_MAJOR_VERSION < 3
14999 Py_XDECREF(py_srcfile);
15003 static void __Pyx_AddTraceback(
const char *funcname,
int c_line,
15004 int py_line,
const char *filename) {
15005 PyCodeObject *py_code = 0;
15006 PyFrameObject *py_frame = 0;
15007 PyThreadState *tstate = __Pyx_PyThreadState_Current;
15008 PyObject *ptype, *pvalue, *ptraceback;
15010 c_line = __Pyx_CLineForTraceback(tstate, c_line);
15012 py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
15014 __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
15015 py_code = __Pyx_CreateCodeObjectForTraceback(
15016 funcname, c_line, py_line, filename);
15021 Py_XDECREF(pvalue);
15022 Py_XDECREF(ptraceback);
15025 __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
15026 __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
15028 py_frame = PyFrame_New(
15034 if (!py_frame)
goto bad;
15035 __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
15036 PyTraceBack_Here(py_frame);
15038 Py_XDECREF(py_code);
15039 Py_XDECREF(py_frame);
15043 #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
15044 __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
15045 #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
15046 __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
15047 #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
15049 func_type value = func_value;\
15050 if (sizeof(target_type) < sizeof(func_type)) {\
15051 if (unlikely(value != (func_type) (target_type) value)) {\
15052 func_type zero = 0;\
15053 if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
15054 return (target_type) -1;\
15055 if (is_unsigned && unlikely(value < zero))\
15056 goto raise_neg_overflow;\
15058 goto raise_overflow;\
15061 return (target_type) value;\
15065 #if CYTHON_CCOMPLEX
15067 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(
float x,
float y) {
15068 return ::std::complex< float >(x, y);
15071 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(
float x,
float y) {
15072 return x + y*(__pyx_t_float_complex)_Complex_I;
15076 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(
float x,
float y) {
15077 __pyx_t_float_complex
z;
15085 #if CYTHON_CCOMPLEX
15087 static CYTHON_INLINE
int __Pyx_c_eq_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
15088 return (a.real == b.real) && (a.imag == b.imag);
15090 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
15091 __pyx_t_float_complex
z;
15092 z.real = a.real + b.real;
15093 z.imag = a.imag + b.imag;
15096 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
15097 __pyx_t_float_complex
z;
15098 z.real = a.real - b.real;
15099 z.imag = a.imag - b.imag;
15102 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
15103 __pyx_t_float_complex
z;
15104 z.real = a.real * b.real - a.imag * b.imag;
15105 z.imag = a.real * b.imag + a.imag * b.real;
15109 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
15111 return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
15112 }
else if (fabsf(b.real) >= fabsf(b.imag)) {
15113 if (b.real == 0 && b.imag == 0) {
15114 return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.imag);
15116 float r = b.imag / b.real;
15117 float s = (float)(1.0) / (b.real + b.imag *
r);
15118 return __pyx_t_float_complex_from_parts(
15119 (a.real + a.imag *
r) *
s, (a.imag - a.real *
r) *
s);
15122 float r = b.real / b.imag;
15123 float s = (float)(1.0) / (b.imag + b.real *
r);
15124 return __pyx_t_float_complex_from_parts(
15125 (a.real *
r + a.imag) *
s, (a.imag *
r - a.real) *
s);
15129 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
15131 return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
15133 float denom = b.real * b.real + b.imag * b.imag;
15134 return __pyx_t_float_complex_from_parts(
15135 (a.real * b.real + a.imag * b.imag) / denom,
15136 (a.imag * b.real - a.real * b.imag) / denom);
15140 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex a) {
15141 __pyx_t_float_complex
z;
15146 static CYTHON_INLINE
int __Pyx_c_is_zero_float(__pyx_t_float_complex a) {
15147 return (a.real == 0) && (a.imag == 0);
15149 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex a) {
15150 __pyx_t_float_complex
z;
15156 static CYTHON_INLINE
float __Pyx_c_abs_float(__pyx_t_float_complex
z) {
15157 #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
15158 return sqrtf(
z.real*
z.real +
z.imag*
z.imag);
15160 return hypotf(
z.real,
z.imag);
15163 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
15164 __pyx_t_float_complex
z;
15165 float r, lnr, theta, z_r, z_theta;
15166 if (b.imag == 0 && b.real == (
int)b.real) {
15168 float denom = a.real * a.real + a.imag * a.imag;
15169 a.real = a.real / denom;
15170 a.imag = -a.imag / denom;
15173 switch ((
int)b.real) {
15181 return __Pyx_c_prod_float(a, a);
15183 z = __Pyx_c_prod_float(a, a);
15184 return __Pyx_c_prod_float(
z, a);
15186 z = __Pyx_c_prod_float(a, a);
15187 return __Pyx_c_prod_float(
z,
z);
15193 }
else if (b.imag == 0) {
15194 z.real = powf(a.real, b.real);
15197 }
else if (a.real > 0) {
15202 theta = atan2f(0.0, -1.0);
15205 r = __Pyx_c_abs_float(a);
15206 theta = atan2f(a.imag, a.real);
15209 z_r = expf(lnr * b.real - theta * b.imag);
15210 z_theta = theta * b.real + lnr * b.imag;
15211 z.real = z_r * cosf(z_theta);
15212 z.imag = z_r * sinf(z_theta);
15219 #if CYTHON_CCOMPLEX
15221 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(
double x,
double y) {
15222 return ::std::complex< double >(x, y);
15225 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(
double x,
double y) {
15226 return x + y*(__pyx_t_double_complex)_Complex_I;
15230 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(
double x,
double y) {
15231 __pyx_t_double_complex
z;
15239 #if CYTHON_CCOMPLEX
15241 static CYTHON_INLINE
int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
15242 return (a.real == b.real) && (a.imag == b.imag);
15244 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
15245 __pyx_t_double_complex
z;
15246 z.real = a.real + b.real;
15247 z.imag = a.imag + b.imag;
15250 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
15251 __pyx_t_double_complex
z;
15252 z.real = a.real - b.real;
15253 z.imag = a.imag - b.imag;
15256 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
15257 __pyx_t_double_complex
z;
15258 z.real = a.real * b.real - a.imag * b.imag;
15259 z.imag = a.real * b.imag + a.imag * b.real;
15263 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
15265 return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
15266 }
else if (fabs(b.real) >= fabs(b.imag)) {
15267 if (b.real == 0 && b.imag == 0) {
15268 return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.imag);
15270 double r = b.imag / b.real;
15271 double s = (double)(1.0) / (b.real + b.imag *
r);
15272 return __pyx_t_double_complex_from_parts(
15273 (a.real + a.imag *
r) *
s, (a.imag - a.real *
r) *
s);
15276 double r = b.real / b.imag;
15277 double s = (double)(1.0) / (b.imag + b.real *
r);
15278 return __pyx_t_double_complex_from_parts(
15279 (a.real *
r + a.imag) *
s, (a.imag *
r - a.real) *
s);
15283 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
15285 return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
15287 double denom = b.real * b.real + b.imag * b.imag;
15288 return __pyx_t_double_complex_from_parts(
15289 (a.real * b.real + a.imag * b.imag) / denom,
15290 (a.imag * b.real - a.real * b.imag) / denom);
15294 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex a) {
15295 __pyx_t_double_complex
z;
15300 static CYTHON_INLINE
int __Pyx_c_is_zero_double(__pyx_t_double_complex a) {
15301 return (a.real == 0) && (a.imag == 0);
15303 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex a) {
15304 __pyx_t_double_complex
z;
15310 static CYTHON_INLINE
double __Pyx_c_abs_double(__pyx_t_double_complex
z) {
15311 #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
15312 return sqrt(
z.real*
z.real +
z.imag*
z.imag);
15314 return hypot(
z.real,
z.imag);
15317 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
15318 __pyx_t_double_complex
z;
15319 double r, lnr, theta, z_r, z_theta;
15320 if (b.imag == 0 && b.real == (
int)b.real) {
15322 double denom = a.real * a.real + a.imag * a.imag;
15323 a.real = a.real / denom;
15324 a.imag = -a.imag / denom;
15327 switch ((
int)b.real) {
15335 return __Pyx_c_prod_double(a, a);
15337 z = __Pyx_c_prod_double(a, a);
15338 return __Pyx_c_prod_double(
z, a);
15340 z = __Pyx_c_prod_double(a, a);
15341 return __Pyx_c_prod_double(
z,
z);
15347 }
else if (b.imag == 0) {
15348 z.real = pow(a.real, b.real);
15351 }
else if (a.real > 0) {
15356 theta = atan2(0.0, -1.0);
15359 r = __Pyx_c_abs_double(a);
15360 theta = atan2(a.imag, a.real);
15363 z_r = exp(lnr * b.real - theta * b.imag);
15364 z_theta = theta * b.real + lnr * b.imag;
15365 z.real = z_r * cos(z_theta);
15366 z.imag = z_r * sin(z_theta);
15373 static CYTHON_INLINE
char __Pyx_PyInt_As_char(PyObject *x) {
15374 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
15375 #pragma GCC diagnostic push
15376 #pragma GCC diagnostic ignored "-Wconversion"
15378 const char neg_one = (char) -1, const_zero = (
char) 0;
15379 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
15380 #pragma GCC diagnostic pop
15382 const int is_unsigned = neg_one > const_zero;
15383 #if PY_MAJOR_VERSION < 3
15384 if (likely(PyInt_Check(x))) {
15385 if (
sizeof(
char) <
sizeof(long)) {
15386 __PYX_VERIFY_RETURN_INT(
char,
long, PyInt_AS_LONG(x))
15388 long val = PyInt_AS_LONG(x);
15389 if (is_unsigned && unlikely(val < 0)) {
15390 goto raise_neg_overflow;
15396 if (likely(PyLong_Check(x))) {
15398 #if CYTHON_USE_PYLONG_INTERNALS
15399 const digit* digits = ((PyLongObject*)x)->ob_digit;
15400 switch (Py_SIZE(x)) {
15401 case 0:
return (
char) 0;
15402 case 1: __PYX_VERIFY_RETURN_INT(
char, digit, digits[0])
15404 if (8 *
sizeof(
char) > 1 * PyLong_SHIFT) {
15405 if (8 *
sizeof(
unsigned long) > 2 * PyLong_SHIFT) {
15406 __PYX_VERIFY_RETURN_INT(
char,
unsigned long, (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
15407 }
else if (8 *
sizeof(
char) >= 2 * PyLong_SHIFT) {
15408 return (
char) (((((char)digits[1]) << PyLong_SHIFT) | (
char)digits[0]));
15413 if (8 *
sizeof(
char) > 2 * PyLong_SHIFT) {
15414 if (8 *
sizeof(
unsigned long) > 3 * PyLong_SHIFT) {
15415 __PYX_VERIFY_RETURN_INT(
char,
unsigned long, (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
15416 }
else if (8 *
sizeof(
char) >= 3 * PyLong_SHIFT) {
15417 return (
char) (((((((char)digits[2]) << PyLong_SHIFT) | (
char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
15422 if (8 *
sizeof(
char) > 3 * PyLong_SHIFT) {
15423 if (8 *
sizeof(
unsigned long) > 4 * PyLong_SHIFT) {
15424 __PYX_VERIFY_RETURN_INT(
char,
unsigned long, (((((((((
unsigned long)digits[3]) << PyLong_SHIFT) | (
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
15425 }
else if (8 *
sizeof(
char) >= 4 * PyLong_SHIFT) {
15426 return (
char) (((((((((char)digits[3]) << PyLong_SHIFT) | (
char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (
char)digits[0]));
15432 #if CYTHON_COMPILING_IN_CPYTHON
15433 if (unlikely(Py_SIZE(x) < 0)) {
15434 goto raise_neg_overflow;
15438 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
15439 if (unlikely(result < 0))
15441 if (unlikely(result == 1))
15442 goto raise_neg_overflow;
15445 if (
sizeof(
char) <=
sizeof(
unsigned long)) {
15446 __PYX_VERIFY_RETURN_INT_EXC(
char,
unsigned long, PyLong_AsUnsignedLong(x))
15447 #ifdef HAVE_LONG_LONG
15448 }
else if (
sizeof(
char) <=
sizeof(
unsigned PY_LONG_LONG)) {
15449 __PYX_VERIFY_RETURN_INT_EXC(
char,
unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
15453 #if CYTHON_USE_PYLONG_INTERNALS
15454 const digit* digits = ((PyLongObject*)x)->ob_digit;
15455 switch (Py_SIZE(x)) {
15456 case 0:
return (
char) 0;
15457 case -1: __PYX_VERIFY_RETURN_INT(
char, sdigit, (sdigit) (-(sdigit)digits[0]))
15458 case 1: __PYX_VERIFY_RETURN_INT(
char, digit, +digits[0])
15460 if (8 *
sizeof(
char) - 1 > 1 * PyLong_SHIFT) {
15461 if (8 *
sizeof(
unsigned long) > 2 * PyLong_SHIFT) {
15462 __PYX_VERIFY_RETURN_INT(
char,
long, -(
long) (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
15463 }
else if (8 *
sizeof(
char) - 1 > 2 * PyLong_SHIFT) {
15464 return (
char) (((char)-1)*(((((char)digits[1]) << PyLong_SHIFT) | (
char)digits[0])));
15469 if (8 *
sizeof(
char) > 1 * PyLong_SHIFT) {
15470 if (8 *
sizeof(
unsigned long) > 2 * PyLong_SHIFT) {
15471 __PYX_VERIFY_RETURN_INT(
char,
unsigned long, (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
15472 }
else if (8 *
sizeof(
char) - 1 > 2 * PyLong_SHIFT) {
15473 return (
char) ((((((char)digits[1]) << PyLong_SHIFT) | (
char)digits[0])));
15478 if (8 *
sizeof(
char) - 1 > 2 * PyLong_SHIFT) {
15479 if (8 *
sizeof(
unsigned long) > 3 * PyLong_SHIFT) {
15480 __PYX_VERIFY_RETURN_INT(
char,
long, -(
long) (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
15481 }
else if (8 *
sizeof(
char) - 1 > 3 * PyLong_SHIFT) {
15482 return (
char) (((char)-1)*(((((((char)digits[2]) << PyLong_SHIFT) | (
char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
15487 if (8 *
sizeof(
char) > 2 * PyLong_SHIFT) {
15488 if (8 *
sizeof(
unsigned long) > 3 * PyLong_SHIFT) {
15489 __PYX_VERIFY_RETURN_INT(
char,
unsigned long, (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
15490 }
else if (8 *
sizeof(
char) - 1 > 3 * PyLong_SHIFT) {
15491 return (
char) ((((((((char)digits[2]) << PyLong_SHIFT) | (
char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
15496 if (8 *
sizeof(
char) - 1 > 3 * PyLong_SHIFT) {
15497 if (8 *
sizeof(
unsigned long) > 4 * PyLong_SHIFT) {
15498 __PYX_VERIFY_RETURN_INT(
char,
long, -(
long) (((((((((
unsigned long)digits[3]) << PyLong_SHIFT) | (
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
15499 }
else if (8 *
sizeof(
char) - 1 > 4 * PyLong_SHIFT) {
15500 return (
char) (((char)-1)*(((((((((char)digits[3]) << PyLong_SHIFT) | (
char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (
char)digits[0])));
15505 if (8 *
sizeof(
char) > 3 * PyLong_SHIFT) {
15506 if (8 *
sizeof(
unsigned long) > 4 * PyLong_SHIFT) {
15507 __PYX_VERIFY_RETURN_INT(
char,
unsigned long, (((((((((
unsigned long)digits[3]) << PyLong_SHIFT) | (
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
15508 }
else if (8 *
sizeof(
char) - 1 > 4 * PyLong_SHIFT) {
15509 return (
char) ((((((((((char)digits[3]) << PyLong_SHIFT) | (
char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (
char)digits[0])));
15515 if (
sizeof(
char) <=
sizeof(long)) {
15516 __PYX_VERIFY_RETURN_INT_EXC(
char,
long, PyLong_AsLong(x))
15517 #ifdef HAVE_LONG_LONG
15518 }
else if (
sizeof(
char) <=
sizeof(PY_LONG_LONG)) {
15519 __PYX_VERIFY_RETURN_INT_EXC(
char, PY_LONG_LONG, PyLong_AsLongLong(x))
15524 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
15525 PyErr_SetString(PyExc_RuntimeError,
15526 "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
15529 PyObject *
v = __Pyx_PyNumber_IntOrLong(x);
15530 #if PY_MAJOR_VERSION < 3
15531 if (likely(
v) && !PyLong_Check(
v)) {
15533 v = PyNumber_Long(tmp);
15538 int one = 1;
int is_little = (int)*(
unsigned char *)&one;
15539 unsigned char *bytes = (
unsigned char *)&val;
15540 int ret = _PyLong_AsByteArray((PyLongObject *)
v,
15541 bytes,
sizeof(val),
15542 is_little, !is_unsigned);
15552 PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
15553 if (!tmp)
return (
char) -1;
15554 val = __Pyx_PyInt_As_char(tmp);
15559 PyErr_SetString(PyExc_OverflowError,
15560 "value too large to convert to char");
15562 raise_neg_overflow:
15563 PyErr_SetString(PyExc_OverflowError,
15564 "can't convert negative value to char");
15569 static CYTHON_INLINE
int __Pyx_PyInt_As_int(PyObject *x) {
15570 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
15571 #pragma GCC diagnostic push
15572 #pragma GCC diagnostic ignored "-Wconversion"
15574 const int neg_one = (int) -1, const_zero = (
int) 0;
15575 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
15576 #pragma GCC diagnostic pop
15578 const int is_unsigned = neg_one > const_zero;
15579 #if PY_MAJOR_VERSION < 3
15580 if (likely(PyInt_Check(x))) {
15581 if (
sizeof(
int) <
sizeof(long)) {
15582 __PYX_VERIFY_RETURN_INT(
int,
long, PyInt_AS_LONG(x))
15584 long val = PyInt_AS_LONG(x);
15585 if (is_unsigned && unlikely(val < 0)) {
15586 goto raise_neg_overflow;
15592 if (likely(PyLong_Check(x))) {
15594 #if CYTHON_USE_PYLONG_INTERNALS
15595 const digit* digits = ((PyLongObject*)x)->ob_digit;
15596 switch (Py_SIZE(x)) {
15597 case 0:
return (
int) 0;
15598 case 1: __PYX_VERIFY_RETURN_INT(
int, digit, digits[0])
15600 if (8 *
sizeof(
int) > 1 * PyLong_SHIFT) {
15601 if (8 *
sizeof(
unsigned long) > 2 * PyLong_SHIFT) {
15602 __PYX_VERIFY_RETURN_INT(
int,
unsigned long, (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
15603 }
else if (8 *
sizeof(
int) >= 2 * PyLong_SHIFT) {
15604 return (
int) (((((int)digits[1]) << PyLong_SHIFT) | (
int)digits[0]));
15609 if (8 *
sizeof(
int) > 2 * PyLong_SHIFT) {
15610 if (8 *
sizeof(
unsigned long) > 3 * PyLong_SHIFT) {
15611 __PYX_VERIFY_RETURN_INT(
int,
unsigned long, (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
15612 }
else if (8 *
sizeof(
int) >= 3 * PyLong_SHIFT) {
15613 return (
int) (((((((int)digits[2]) << PyLong_SHIFT) | (
int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
15618 if (8 *
sizeof(
int) > 3 * PyLong_SHIFT) {
15619 if (8 *
sizeof(
unsigned long) > 4 * PyLong_SHIFT) {
15620 __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])))
15621 }
else if (8 *
sizeof(
int) >= 4 * PyLong_SHIFT) {
15622 return (
int) (((((((((int)digits[3]) << PyLong_SHIFT) | (
int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (
int)digits[0]));
15628 #if CYTHON_COMPILING_IN_CPYTHON
15629 if (unlikely(Py_SIZE(x) < 0)) {
15630 goto raise_neg_overflow;
15634 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
15635 if (unlikely(result < 0))
15637 if (unlikely(result == 1))
15638 goto raise_neg_overflow;
15641 if (
sizeof(
int) <=
sizeof(
unsigned long)) {
15642 __PYX_VERIFY_RETURN_INT_EXC(
int,
unsigned long, PyLong_AsUnsignedLong(x))
15643 #ifdef HAVE_LONG_LONG
15644 }
else if (
sizeof(
int) <=
sizeof(
unsigned PY_LONG_LONG)) {
15645 __PYX_VERIFY_RETURN_INT_EXC(
int,
unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
15649 #if CYTHON_USE_PYLONG_INTERNALS
15650 const digit* digits = ((PyLongObject*)x)->ob_digit;
15651 switch (Py_SIZE(x)) {
15652 case 0:
return (
int) 0;
15653 case -1: __PYX_VERIFY_RETURN_INT(
int, sdigit, (sdigit) (-(sdigit)digits[0]))
15654 case 1: __PYX_VERIFY_RETURN_INT(
int, digit, +digits[0])
15656 if (8 *
sizeof(
int) - 1 > 1 * PyLong_SHIFT) {
15657 if (8 *
sizeof(
unsigned long) > 2 * PyLong_SHIFT) {
15658 __PYX_VERIFY_RETURN_INT(
int,
long, -(
long) (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
15659 }
else if (8 *
sizeof(
int) - 1 > 2 * PyLong_SHIFT) {
15660 return (
int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (
int)digits[0])));
15665 if (8 *
sizeof(
int) > 1 * PyLong_SHIFT) {
15666 if (8 *
sizeof(
unsigned long) > 2 * PyLong_SHIFT) {
15667 __PYX_VERIFY_RETURN_INT(
int,
unsigned long, (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
15668 }
else if (8 *
sizeof(
int) - 1 > 2 * PyLong_SHIFT) {
15669 return (
int) ((((((int)digits[1]) << PyLong_SHIFT) | (
int)digits[0])));
15674 if (8 *
sizeof(
int) - 1 > 2 * PyLong_SHIFT) {
15675 if (8 *
sizeof(
unsigned long) > 3 * PyLong_SHIFT) {
15676 __PYX_VERIFY_RETURN_INT(
int,
long, -(
long) (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
15677 }
else if (8 *
sizeof(
int) - 1 > 3 * PyLong_SHIFT) {
15678 return (
int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (
int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
15683 if (8 *
sizeof(
int) > 2 * PyLong_SHIFT) {
15684 if (8 *
sizeof(
unsigned long) > 3 * PyLong_SHIFT) {
15685 __PYX_VERIFY_RETURN_INT(
int,
unsigned long, (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
15686 }
else if (8 *
sizeof(
int) - 1 > 3 * PyLong_SHIFT) {
15687 return (
int) ((((((((int)digits[2]) << PyLong_SHIFT) | (
int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
15692 if (8 *
sizeof(
int) - 1 > 3 * PyLong_SHIFT) {
15693 if (8 *
sizeof(
unsigned long) > 4 * PyLong_SHIFT) {
15694 __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])))
15695 }
else if (8 *
sizeof(
int) - 1 > 4 * PyLong_SHIFT) {
15696 return (
int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (
int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (
int)digits[0])));
15701 if (8 *
sizeof(
int) > 3 * PyLong_SHIFT) {
15702 if (8 *
sizeof(
unsigned long) > 4 * PyLong_SHIFT) {
15703 __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])))
15704 }
else if (8 *
sizeof(
int) - 1 > 4 * PyLong_SHIFT) {
15705 return (
int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (
int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (
int)digits[0])));
15711 if (
sizeof(
int) <=
sizeof(long)) {
15712 __PYX_VERIFY_RETURN_INT_EXC(
int,
long, PyLong_AsLong(x))
15713 #ifdef HAVE_LONG_LONG
15714 }
else if (
sizeof(
int) <=
sizeof(PY_LONG_LONG)) {
15715 __PYX_VERIFY_RETURN_INT_EXC(
int, PY_LONG_LONG, PyLong_AsLongLong(x))
15720 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
15721 PyErr_SetString(PyExc_RuntimeError,
15722 "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
15725 PyObject *
v = __Pyx_PyNumber_IntOrLong(x);
15726 #if PY_MAJOR_VERSION < 3
15727 if (likely(
v) && !PyLong_Check(
v)) {
15729 v = PyNumber_Long(tmp);
15734 int one = 1;
int is_little = (int)*(
unsigned char *)&one;
15735 unsigned char *bytes = (
unsigned char *)&val;
15736 int ret = _PyLong_AsByteArray((PyLongObject *)
v,
15737 bytes,
sizeof(val),
15738 is_little, !is_unsigned);
15748 PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
15749 if (!tmp)
return (
int) -1;
15750 val = __Pyx_PyInt_As_int(tmp);
15755 PyErr_SetString(PyExc_OverflowError,
15756 "value too large to convert to int");
15758 raise_neg_overflow:
15759 PyErr_SetString(PyExc_OverflowError,
15760 "can't convert negative value to int");
15765 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(
long value) {
15766 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
15767 #pragma GCC diagnostic push
15768 #pragma GCC diagnostic ignored "-Wconversion"
15770 const long neg_one = (long) -1, const_zero = (
long) 0;
15771 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
15772 #pragma GCC diagnostic pop
15774 const int is_unsigned = neg_one > const_zero;
15776 if (
sizeof(
long) <
sizeof(long)) {
15777 return PyInt_FromLong((
long) value);
15778 }
else if (
sizeof(
long) <=
sizeof(
unsigned long)) {
15779 return PyLong_FromUnsignedLong((
unsigned long) value);
15780 #ifdef HAVE_LONG_LONG
15781 }
else if (
sizeof(
long) <=
sizeof(
unsigned PY_LONG_LONG)) {
15782 return PyLong_FromUnsignedLongLong((
unsigned PY_LONG_LONG) value);
15786 if (
sizeof(
long) <=
sizeof(
long)) {
15787 return PyInt_FromLong((
long) value);
15788 #ifdef HAVE_LONG_LONG
15789 }
else if (
sizeof(
long) <=
sizeof(PY_LONG_LONG)) {
15790 return PyLong_FromLongLong((PY_LONG_LONG) value);
15795 int one = 1;
int little = (int)*(
unsigned char *)&one;
15796 unsigned char *bytes = (
unsigned char *)&value;
15797 return _PyLong_FromByteArray(bytes,
sizeof(
long),
15798 little, !is_unsigned);
15803 static CYTHON_INLINE
long __Pyx_PyInt_As_long(PyObject *x) {
15804 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
15805 #pragma GCC diagnostic push
15806 #pragma GCC diagnostic ignored "-Wconversion"
15808 const long neg_one = (long) -1, const_zero = (
long) 0;
15809 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
15810 #pragma GCC diagnostic pop
15812 const int is_unsigned = neg_one > const_zero;
15813 #if PY_MAJOR_VERSION < 3
15814 if (likely(PyInt_Check(x))) {
15815 if (
sizeof(
long) <
sizeof(long)) {
15816 __PYX_VERIFY_RETURN_INT(
long,
long, PyInt_AS_LONG(x))
15818 long val = PyInt_AS_LONG(x);
15819 if (is_unsigned && unlikely(val < 0)) {
15820 goto raise_neg_overflow;
15826 if (likely(PyLong_Check(x))) {
15828 #if CYTHON_USE_PYLONG_INTERNALS
15829 const digit* digits = ((PyLongObject*)x)->ob_digit;
15830 switch (Py_SIZE(x)) {
15831 case 0:
return (
long) 0;
15832 case 1: __PYX_VERIFY_RETURN_INT(
long, digit, digits[0])
15834 if (8 *
sizeof(
long) > 1 * PyLong_SHIFT) {
15835 if (8 *
sizeof(
unsigned long) > 2 * PyLong_SHIFT) {
15836 __PYX_VERIFY_RETURN_INT(
long,
unsigned long, (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
15837 }
else if (8 *
sizeof(
long) >= 2 * PyLong_SHIFT) {
15838 return (
long) (((((long)digits[1]) << PyLong_SHIFT) | (
long)digits[0]));
15843 if (8 *
sizeof(
long) > 2 * PyLong_SHIFT) {
15844 if (8 *
sizeof(
unsigned long) > 3 * PyLong_SHIFT) {
15845 __PYX_VERIFY_RETURN_INT(
long,
unsigned long, (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
15846 }
else if (8 *
sizeof(
long) >= 3 * PyLong_SHIFT) {
15847 return (
long) (((((((long)digits[2]) << PyLong_SHIFT) | (
long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
15852 if (8 *
sizeof(
long) > 3 * PyLong_SHIFT) {
15853 if (8 *
sizeof(
unsigned long) > 4 * PyLong_SHIFT) {
15854 __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])))
15855 }
else if (8 *
sizeof(
long) >= 4 * PyLong_SHIFT) {
15856 return (
long) (((((((((long)digits[3]) << PyLong_SHIFT) | (
long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (
long)digits[0]));
15862 #if CYTHON_COMPILING_IN_CPYTHON
15863 if (unlikely(Py_SIZE(x) < 0)) {
15864 goto raise_neg_overflow;
15868 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
15869 if (unlikely(result < 0))
15871 if (unlikely(result == 1))
15872 goto raise_neg_overflow;
15875 if (
sizeof(
long) <=
sizeof(
unsigned long)) {
15876 __PYX_VERIFY_RETURN_INT_EXC(
long,
unsigned long, PyLong_AsUnsignedLong(x))
15877 #ifdef HAVE_LONG_LONG
15878 }
else if (
sizeof(
long) <=
sizeof(
unsigned PY_LONG_LONG)) {
15879 __PYX_VERIFY_RETURN_INT_EXC(
long,
unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
15883 #if CYTHON_USE_PYLONG_INTERNALS
15884 const digit* digits = ((PyLongObject*)x)->ob_digit;
15885 switch (Py_SIZE(x)) {
15886 case 0:
return (
long) 0;
15887 case -1: __PYX_VERIFY_RETURN_INT(
long, sdigit, (sdigit) (-(sdigit)digits[0]))
15888 case 1: __PYX_VERIFY_RETURN_INT(
long, digit, +digits[0])
15890 if (8 *
sizeof(
long) - 1 > 1 * PyLong_SHIFT) {
15891 if (8 *
sizeof(
unsigned long) > 2 * PyLong_SHIFT) {
15892 __PYX_VERIFY_RETURN_INT(
long,
long, -(
long) (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
15893 }
else if (8 *
sizeof(
long) - 1 > 2 * PyLong_SHIFT) {
15894 return (
long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (
long)digits[0])));
15899 if (8 *
sizeof(
long) > 1 * PyLong_SHIFT) {
15900 if (8 *
sizeof(
unsigned long) > 2 * PyLong_SHIFT) {
15901 __PYX_VERIFY_RETURN_INT(
long,
unsigned long, (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
15902 }
else if (8 *
sizeof(
long) - 1 > 2 * PyLong_SHIFT) {
15903 return (
long) ((((((long)digits[1]) << PyLong_SHIFT) | (
long)digits[0])));
15908 if (8 *
sizeof(
long) - 1 > 2 * PyLong_SHIFT) {
15909 if (8 *
sizeof(
unsigned long) > 3 * PyLong_SHIFT) {
15910 __PYX_VERIFY_RETURN_INT(
long,
long, -(
long) (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
15911 }
else if (8 *
sizeof(
long) - 1 > 3 * PyLong_SHIFT) {
15912 return (
long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (
long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
15917 if (8 *
sizeof(
long) > 2 * PyLong_SHIFT) {
15918 if (8 *
sizeof(
unsigned long) > 3 * PyLong_SHIFT) {
15919 __PYX_VERIFY_RETURN_INT(
long,
unsigned long, (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
15920 }
else if (8 *
sizeof(
long) - 1 > 3 * PyLong_SHIFT) {
15921 return (
long) ((((((((long)digits[2]) << PyLong_SHIFT) | (
long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
15926 if (8 *
sizeof(
long) - 1 > 3 * PyLong_SHIFT) {
15927 if (8 *
sizeof(
unsigned long) > 4 * PyLong_SHIFT) {
15928 __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])))
15929 }
else if (8 *
sizeof(
long) - 1 > 4 * PyLong_SHIFT) {
15930 return (
long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (
long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (
long)digits[0])));
15935 if (8 *
sizeof(
long) > 3 * PyLong_SHIFT) {
15936 if (8 *
sizeof(
unsigned long) > 4 * PyLong_SHIFT) {
15937 __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])))
15938 }
else if (8 *
sizeof(
long) - 1 > 4 * PyLong_SHIFT) {
15939 return (
long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (
long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (
long)digits[0])));
15945 if (
sizeof(
long) <=
sizeof(long)) {
15946 __PYX_VERIFY_RETURN_INT_EXC(
long,
long, PyLong_AsLong(x))
15947 #ifdef HAVE_LONG_LONG
15948 }
else if (
sizeof(
long) <=
sizeof(PY_LONG_LONG)) {
15949 __PYX_VERIFY_RETURN_INT_EXC(
long, PY_LONG_LONG, PyLong_AsLongLong(x))
15954 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
15955 PyErr_SetString(PyExc_RuntimeError,
15956 "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
15959 PyObject *
v = __Pyx_PyNumber_IntOrLong(x);
15960 #if PY_MAJOR_VERSION < 3
15961 if (likely(
v) && !PyLong_Check(
v)) {
15963 v = PyNumber_Long(tmp);
15968 int one = 1;
int is_little = (int)*(
unsigned char *)&one;
15969 unsigned char *bytes = (
unsigned char *)&val;
15970 int ret = _PyLong_AsByteArray((PyLongObject *)
v,
15971 bytes,
sizeof(val),
15972 is_little, !is_unsigned);
15982 PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
15983 if (!tmp)
return (
long) -1;
15984 val = __Pyx_PyInt_As_long(tmp);
15989 PyErr_SetString(PyExc_OverflowError,
15990 "value too large to convert to long");
15992 raise_neg_overflow:
15993 PyErr_SetString(PyExc_OverflowError,
15994 "can't convert negative value to long");
15999 #if CYTHON_COMPILING_IN_CPYTHON
16000 static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
16006 return b == &PyBaseObject_Type;
16008 static CYTHON_INLINE
int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
16010 if (a == b)
return 1;
16014 n = PyTuple_GET_SIZE(mro);
16015 for (i = 0; i <
n; i++) {
16016 if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
16021 return __Pyx_InBases(a, b);
16023 #if PY_MAJOR_VERSION == 2
16024 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
16025 PyObject *exception, *value, *tb;
16027 __Pyx_PyThreadState_declare
16028 __Pyx_PyThreadState_assign
16029 __Pyx_ErrFetch(&exception, &value, &tb);
16030 res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
16031 if (unlikely(res == -1)) {
16032 PyErr_WriteUnraisable(err);
16036 res = PyObject_IsSubclass(err, exc_type2);
16037 if (unlikely(res == -1)) {
16038 PyErr_WriteUnraisable(err);
16042 __Pyx_ErrRestore(exception, value, tb);
16046 static CYTHON_INLINE
int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
16047 int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
16049 res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
16054 static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
16056 assert(PyExceptionClass_Check(exc_type));
16057 n = PyTuple_GET_SIZE(tuple);
16058 #if PY_MAJOR_VERSION >= 3
16059 for (i=0; i<
n; i++) {
16060 if (exc_type == PyTuple_GET_ITEM(tuple, i))
return 1;
16063 for (i=0; i<
n; i++) {
16064 PyObject *t = PyTuple_GET_ITEM(tuple, i);
16065 #if PY_MAJOR_VERSION < 3
16066 if (likely(exc_type == t))
return 1;
16068 if (likely(PyExceptionClass_Check(t))) {
16069 if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t))
return 1;
16075 static CYTHON_INLINE
int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
16076 if (likely(err == exc_type))
return 1;
16077 if (likely(PyExceptionClass_Check(err))) {
16078 if (likely(PyExceptionClass_Check(exc_type))) {
16079 return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
16080 }
else if (likely(PyTuple_Check(exc_type))) {
16081 return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
16085 return PyErr_GivenExceptionMatches(err, exc_type);
16087 static CYTHON_INLINE
int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
16088 assert(PyExceptionClass_Check(exc_type1));
16089 assert(PyExceptionClass_Check(exc_type2));
16090 if (likely(err == exc_type1 || err == exc_type2))
return 1;
16091 if (likely(PyExceptionClass_Check(err))) {
16092 return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
16094 return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
16099 static int __Pyx_check_binary_version(
void) {
16101 int same=1, i, found_dot;
16102 const char* rt_from_call = Py_GetVersion();
16103 PyOS_snprintf(ctversion, 5,
"%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
16105 for (i = 0; i < 4; i++) {
16106 if (!ctversion[i]) {
16107 same = (rt_from_call[i] <
'0' || rt_from_call[i] >
'9');
16110 if (rt_from_call[i] != ctversion[i]) {
16116 char rtversion[5] = {
'\0'};
16118 for (i=0; i<4; ++i) {
16119 if (rt_from_call[i] ==
'.') {
16120 if (found_dot)
break;
16122 }
else if (rt_from_call[i] <
'0' || rt_from_call[i] >
'9') {
16125 rtversion[i] = rt_from_call[i];
16127 PyOS_snprintf(message,
sizeof(message),
16128 "compiletime version %s of module '%.100s' "
16129 "does not match runtime version %s",
16130 ctversion, __Pyx_MODULE_NAME, rtversion);
16131 return PyErr_WarnEx(NULL, message, 1);
16137 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
16139 #if PY_MAJOR_VERSION < 3
16140 if (t->is_unicode) {
16141 *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
16142 }
else if (t->intern) {
16143 *t->p = PyString_InternFromString(t->s);
16145 *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
16148 if (t->is_unicode | t->is_str) {
16150 *t->p = PyUnicode_InternFromString(t->s);
16151 }
else if (t->encoding) {
16152 *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
16154 *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
16157 *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
16162 if (PyObject_Hash(*t->p) == -1)
16169 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(
const char* c_str) {
16170 return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
16172 static CYTHON_INLINE
const char* __Pyx_PyObject_AsString(PyObject* o) {
16174 return __Pyx_PyObject_AsStringAndSize(o, &ignore);
16176 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
16177 #if !CYTHON_PEP393_ENABLED
16178 static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
16180 PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
16181 if (!defenc)
return NULL;
16182 defenc_c = PyBytes_AS_STRING(defenc);
16183 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
16185 char* end = defenc_c + PyBytes_GET_SIZE(defenc);
16187 for (
c = defenc_c;
c < end;
c++) {
16188 if ((
unsigned char) (*
c) >= 128) {
16189 PyUnicode_AsASCIIString(o);
16195 *length = PyBytes_GET_SIZE(defenc);
16199 static CYTHON_INLINE
const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
16200 if (unlikely(__Pyx_PyUnicode_READY(o) == -1))
return NULL;
16201 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
16202 if (likely(PyUnicode_IS_ASCII(o))) {
16203 *length = PyUnicode_GET_LENGTH(o);
16204 return PyUnicode_AsUTF8(o);
16206 PyUnicode_AsASCIIString(o);
16210 return PyUnicode_AsUTF8AndSize(o, length);
16215 static CYTHON_INLINE
const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
16216 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
16218 #
if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
16219 __Pyx_sys_getdefaultencoding_not_ascii &&
16221 PyUnicode_Check(o)) {
16222 return __Pyx_PyUnicode_AsStringAndSize(o, length);
16225 #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
16226 if (PyByteArray_Check(o)) {
16227 *length = PyByteArray_GET_SIZE(o);
16228 return PyByteArray_AS_STRING(o);
16233 int r = PyBytes_AsStringAndSize(o, &result, length);
16234 if (unlikely(
r < 0)) {
16241 static CYTHON_INLINE
int __Pyx_PyObject_IsTrue(PyObject* x) {
16242 int is_true = x == Py_True;
16243 if (is_true | (x == Py_False) | (x == Py_None))
return is_true;
16244 else return PyObject_IsTrue(x);
16246 static CYTHON_INLINE
int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
16248 if (unlikely(!x))
return -1;
16249 retval = __Pyx_PyObject_IsTrue(x);
16253 static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result,
const char* type_name) {
16254 #if PY_MAJOR_VERSION >= 3
16255 if (PyLong_Check(result)) {
16256 if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
16257 "__int__ returned non-int (type %.200s). "
16258 "The ability to return an instance of a strict subclass of int "
16259 "is deprecated, and may be removed in a future version of Python.",
16260 Py_TYPE(result)->tp_name)) {
16267 PyErr_Format(PyExc_TypeError,
16268 "__%.4s__ returned non-%.4s (type %.200s)",
16269 type_name, type_name, Py_TYPE(result)->tp_name);
16273 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
16274 #if CYTHON_USE_TYPE_SLOTS
16275 PyNumberMethods *m;
16277 const char *name = NULL;
16278 PyObject *res = NULL;
16279 #if PY_MAJOR_VERSION < 3
16280 if (likely(PyInt_Check(x) || PyLong_Check(x)))
16282 if (likely(PyLong_Check(x)))
16284 return __Pyx_NewRef(x);
16285 #if CYTHON_USE_TYPE_SLOTS
16286 m = Py_TYPE(x)->tp_as_number;
16287 #if PY_MAJOR_VERSION < 3
16288 if (m && m->nb_int) {
16290 res = m->nb_int(x);
16292 else if (m && m->nb_long) {
16294 res = m->nb_long(x);
16297 if (likely(m && m->nb_int)) {
16299 res = m->nb_int(x);
16303 if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
16304 res = PyNumber_Int(x);
16308 #if PY_MAJOR_VERSION < 3
16309 if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
16311 if (unlikely(!PyLong_CheckExact(res))) {
16313 return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
16316 else if (!PyErr_Occurred()) {
16317 PyErr_SetString(PyExc_TypeError,
16318 "an integer is required");
16322 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
16325 #if PY_MAJOR_VERSION < 3
16326 if (likely(PyInt_CheckExact(b))) {
16327 if (
sizeof(Py_ssize_t) >=
sizeof(
long))
16328 return PyInt_AS_LONG(b);
16330 return PyInt_AsSsize_t(b);
16333 if (likely(PyLong_CheckExact(b))) {
16334 #if CYTHON_USE_PYLONG_INTERNALS
16335 const digit* digits = ((PyLongObject*)b)->ob_digit;
16336 const Py_ssize_t size = Py_SIZE(b);
16337 if (likely(__Pyx_sst_abs(size) <= 1)) {
16338 ival = likely(size) ? digits[0] : 0;
16339 if (size == -1) ival = -ival;
16344 if (8 *
sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
16345 return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (
size_t)digits[0]));
16349 if (8 *
sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
16350 return -(Py_ssize_t) (((((
size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
16354 if (8 *
sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
16355 return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (
size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
16359 if (8 *
sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
16360 return -(Py_ssize_t) (((((((
size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (
size_t)digits[0]));
16364 if (8 *
sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
16365 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]));
16369 if (8 *
sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
16370 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]));
16376 return PyLong_AsSsize_t(b);
16378 x = PyNumber_Index(b);
16380 ival = PyInt_AsSsize_t(x);
16384 static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
16385 if (
sizeof(Py_hash_t) ==
sizeof(Py_ssize_t)) {
16386 return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
16387 #if PY_MAJOR_VERSION < 3
16388 }
else if (likely(PyInt_CheckExact(o))) {
16389 return PyInt_AS_LONG(o);
16394 x = PyNumber_Index(o);
16396 ival = PyInt_AsLong(x);
16401 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(
long b) {
16402 return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
16404 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(
size_t ival) {
16405 return PyInt_FromSize_t(ival);