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
307 #error "Cython files generated with the C++ option must be compiled with a C++ compiler."
309 #ifndef CYTHON_INLINE
310 #if defined(__clang__)
311 #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
313 #define CYTHON_INLINE inline
317 void __Pyx_call_destructor(
T& x) {
321 class __Pyx_FakeReference {
323 __Pyx_FakeReference() : ptr(NULL) { }
324 __Pyx_FakeReference(
const T& ref) : ptr(const_cast<
T*>(&ref)) { }
325 T *operator->() {
return ptr; }
326 T *operator&() {
return ptr; }
327 operator T&() {
return *ptr; }
328 template<
typename U>
bool operator ==(
U other) {
return *ptr == other; }
329 template<
typename U>
bool operator !=(
U other) {
return *ptr != other; }
334 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
335 #define Py_OptimizeFlag 0
337 #define __PYX_BUILD_PY_SSIZE_T "n"
338 #define CYTHON_FORMAT_SSIZE_T "z"
339 #if PY_MAJOR_VERSION < 3
340 #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
341 #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
342 PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
343 #define __Pyx_DefaultClassType PyClass_Type
345 #define __Pyx_BUILTIN_MODULE_NAME "builtins"
346 #define __Pyx_DefaultClassType PyType_Type
347 #if PY_VERSION_HEX >= 0x030B00A1
348 static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(
int a,
int k,
int l,
int s,
int f,
349 PyObject *code, PyObject *
c, PyObject*
n, PyObject *
v,
350 PyObject *fv, PyObject *cell, PyObject* fn,
351 PyObject *name,
int fline, PyObject *lnos) {
352 PyObject *kwds=NULL, *argcount=NULL, *posonlyargcount=NULL, *kwonlyargcount=NULL;
353 PyObject *nlocals=NULL, *stacksize=NULL, *flags=NULL, *replace=NULL, *call_result=NULL, *empty=NULL;
354 const char *fn_cstr=NULL;
355 const char *name_cstr=NULL;
356 PyCodeObject* co=NULL;
357 PyObject *type, *value, *traceback;
358 PyErr_Fetch(&type, &value, &traceback);
359 if (!(kwds=PyDict_New()))
goto end;
360 if (!(argcount=PyLong_FromLong(a)))
goto end;
361 if (PyDict_SetItemString(kwds,
"co_argcount", argcount) != 0)
goto end;
362 if (!(posonlyargcount=PyLong_FromLong(0)))
goto end;
363 if (PyDict_SetItemString(kwds,
"co_posonlyargcount", posonlyargcount) != 0)
goto end;
364 if (!(kwonlyargcount=PyLong_FromLong(k)))
goto end;
365 if (PyDict_SetItemString(kwds,
"co_kwonlyargcount", kwonlyargcount) != 0)
goto end;
366 if (!(nlocals=PyLong_FromLong(l)))
goto end;
367 if (PyDict_SetItemString(kwds,
"co_nlocals", nlocals) != 0)
goto end;
368 if (!(stacksize=PyLong_FromLong(
s)))
goto end;
369 if (PyDict_SetItemString(kwds,
"co_stacksize", stacksize) != 0)
goto end;
370 if (!(flags=PyLong_FromLong(
f)))
goto end;
371 if (PyDict_SetItemString(kwds,
"co_flags", flags) != 0)
goto end;
372 if (PyDict_SetItemString(kwds,
"co_code", code) != 0)
goto end;
373 if (PyDict_SetItemString(kwds,
"co_consts",
c) != 0)
goto end;
374 if (PyDict_SetItemString(kwds,
"co_names",
n) != 0)
goto end;
375 if (PyDict_SetItemString(kwds,
"co_varnames",
v) != 0)
goto end;
376 if (PyDict_SetItemString(kwds,
"co_freevars", fv) != 0)
goto end;
377 if (PyDict_SetItemString(kwds,
"co_cellvars", cell) != 0)
goto end;
378 if (PyDict_SetItemString(kwds,
"co_linetable", lnos) != 0)
goto end;
379 if (!(fn_cstr=PyUnicode_AsUTF8AndSize(fn, NULL)))
goto end;
380 if (!(name_cstr=PyUnicode_AsUTF8AndSize(name, NULL)))
goto end;
381 if (!(co = PyCode_NewEmpty(fn_cstr, name_cstr, fline)))
goto end;
382 if (!(replace = PyObject_GetAttrString((PyObject*)co,
"replace")))
goto cleanup_code_too;
383 if (!(empty = PyTuple_New(0)))
goto cleanup_code_too;
384 if (!(call_result = PyObject_Call(replace, empty, kwds)))
goto cleanup_code_too;
385 Py_XDECREF((PyObject*)co);
386 co = (PyCodeObject*)call_result;
390 Py_XDECREF((PyObject*)co);
395 Py_XDECREF(argcount);
396 Py_XDECREF(posonlyargcount);
397 Py_XDECREF(kwonlyargcount);
399 Py_XDECREF(stacksize);
401 Py_XDECREF(call_result);
404 PyErr_Restore(type, value, traceback);
409 #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
410 PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
412 #define __Pyx_DefaultClassType PyType_Type
414 #ifndef Py_TPFLAGS_CHECKTYPES
415 #define Py_TPFLAGS_CHECKTYPES 0
417 #ifndef Py_TPFLAGS_HAVE_INDEX
418 #define Py_TPFLAGS_HAVE_INDEX 0
420 #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
421 #define Py_TPFLAGS_HAVE_NEWBUFFER 0
423 #ifndef Py_TPFLAGS_HAVE_FINALIZE
424 #define Py_TPFLAGS_HAVE_FINALIZE 0
426 #ifndef METH_STACKLESS
427 #define METH_STACKLESS 0
429 #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
430 #ifndef METH_FASTCALL
431 #define METH_FASTCALL 0x80
433 typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *
self, PyObject *
const *args, Py_ssize_t nargs);
434 typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *
self, PyObject *
const *args,
435 Py_ssize_t nargs, PyObject *kwnames);
437 #define __Pyx_PyCFunctionFast _PyCFunctionFast
438 #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
440 #if CYTHON_FAST_PYCCALL
441 #define __Pyx_PyFastCFunction_Check(func)\
442 ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
444 #define __Pyx_PyFastCFunction_Check(func) 0
446 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
447 #define PyObject_Malloc(s) PyMem_Malloc(s)
448 #define PyObject_Free(p) PyMem_Free(p)
449 #define PyObject_Realloc(p) PyMem_Realloc(p)
451 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1
452 #define PyMem_RawMalloc(n) PyMem_Malloc(n)
453 #define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n)
454 #define PyMem_RawFree(p) PyMem_Free(p)
456 #if CYTHON_COMPILING_IN_PYSTON
457 #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co)
458 #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
460 #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
461 #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
463 #if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
464 #define __Pyx_PyThreadState_Current PyThreadState_GET()
465 #elif PY_VERSION_HEX >= 0x03060000
466 #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
467 #elif PY_VERSION_HEX >= 0x03000000
468 #define __Pyx_PyThreadState_Current PyThreadState_GET()
470 #define __Pyx_PyThreadState_Current _PyThreadState_Current
472 #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
473 #include "pythread.h"
474 #define Py_tss_NEEDS_INIT 0
475 typedef int Py_tss_t;
476 static CYTHON_INLINE
int PyThread_tss_create(Py_tss_t *key) {
477 *key = PyThread_create_key();
480 static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(
void) {
481 Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(
sizeof(Py_tss_t));
482 *key = Py_tss_NEEDS_INIT;
485 static CYTHON_INLINE
void PyThread_tss_free(Py_tss_t *key) {
488 static CYTHON_INLINE
int PyThread_tss_is_created(Py_tss_t *key) {
489 return *key != Py_tss_NEEDS_INIT;
491 static CYTHON_INLINE
void PyThread_tss_delete(Py_tss_t *key) {
492 PyThread_delete_key(*key);
493 *key = Py_tss_NEEDS_INIT;
495 static CYTHON_INLINE
int PyThread_tss_set(Py_tss_t *key,
void *value) {
496 return PyThread_set_key_value(*key, value);
498 static CYTHON_INLINE
void * PyThread_tss_get(Py_tss_t *key) {
499 return PyThread_get_key_value(*key);
502 #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
503 #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
505 #define __Pyx_PyDict_NewPresized(n) PyDict_New()
507 #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
508 #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
509 #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
511 #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
512 #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
514 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
515 #define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
517 #define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name)
519 #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
520 #define CYTHON_PEP393_ENABLED 1
521 #if defined(PyUnicode_IS_READY)
522 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
523 0 : _PyUnicode_Ready((PyObject *)(op)))
525 #define __Pyx_PyUnicode_READY(op) (0)
527 #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
528 #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
529 #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
530 #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
531 #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
532 #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
533 #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
534 #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE)
535 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000
536 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length))
538 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
541 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u))
544 #define CYTHON_PEP393_ENABLED 0
545 #define PyUnicode_1BYTE_KIND 1
546 #define PyUnicode_2BYTE_KIND 2
547 #define PyUnicode_4BYTE_KIND 4
548 #define __Pyx_PyUnicode_READY(op) (0)
549 #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
550 #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
551 #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
552 #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
553 #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
554 #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
555 #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
556 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
558 #if CYTHON_COMPILING_IN_PYPY
559 #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
560 #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
562 #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
563 #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
564 PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
566 #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
567 #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
569 #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
570 #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
572 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
573 #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
575 #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
576 #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
577 #if PY_MAJOR_VERSION >= 3
578 #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
580 #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
582 #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
583 #define PyObject_ASCII(o) PyObject_Repr(o)
585 #if PY_MAJOR_VERSION >= 3
586 #define PyBaseString_Type PyUnicode_Type
587 #define PyStringObject PyUnicodeObject
588 #define PyString_Type PyUnicode_Type
589 #define PyString_Check PyUnicode_Check
590 #define PyString_CheckExact PyUnicode_CheckExact
591 #ifndef PyObject_Unicode
592 #define PyObject_Unicode PyObject_Str
595 #if PY_MAJOR_VERSION >= 3
596 #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
597 #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
599 #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
600 #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
602 #ifndef PySet_CheckExact
603 #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
605 #if PY_VERSION_HEX >= 0x030900A4
606 #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
607 #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
609 #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
610 #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
612 #if CYTHON_ASSUME_SAFE_MACROS
613 #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
615 #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
617 #if PY_MAJOR_VERSION >= 3
618 #define PyIntObject PyLongObject
619 #define PyInt_Type PyLong_Type
620 #define PyInt_Check(op) PyLong_Check(op)
621 #define PyInt_CheckExact(op) PyLong_CheckExact(op)
622 #define PyInt_FromString PyLong_FromString
623 #define PyInt_FromUnicode PyLong_FromUnicode
624 #define PyInt_FromLong PyLong_FromLong
625 #define PyInt_FromSize_t PyLong_FromSize_t
626 #define PyInt_FromSsize_t PyLong_FromSsize_t
627 #define PyInt_AsLong PyLong_AsLong
628 #define PyInt_AS_LONG PyLong_AS_LONG
629 #define PyInt_AsSsize_t PyLong_AsSsize_t
630 #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
631 #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
632 #define PyNumber_Int PyNumber_Long
634 #if PY_MAJOR_VERSION >= 3
635 #define PyBoolObject PyLongObject
637 #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
638 #ifndef PyUnicode_InternFromString
639 #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
642 #if PY_VERSION_HEX < 0x030200A4
643 typedef long Py_hash_t;
644 #define __Pyx_PyInt_FromHash_t PyInt_FromLong
645 #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsHash_t
647 #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
648 #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t
650 #if PY_MAJOR_VERSION >= 3
651 #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func))
653 #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
655 #if CYTHON_USE_ASYNC_SLOTS
656 #if PY_VERSION_HEX >= 0x030500B1
657 #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
658 #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
660 #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
663 #define __Pyx_PyType_AsAsync(obj) NULL
665 #ifndef __Pyx_PyAsyncMethodsStruct
670 } __Pyx_PyAsyncMethodsStruct;
673 #if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
674 #if !defined(_USE_MATH_DEFINES)
675 #define _USE_MATH_DEFINES
680 #define __PYX_NAN() ((float) NAN)
682 static CYTHON_INLINE
float __PYX_NAN() {
684 memset(&value, 0xFF,
sizeof(value));
688 #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
689 #define __Pyx_truncl trunc
691 #define __Pyx_truncl truncl
694 #define __PYX_MARK_ERR_POS(f_index, lineno) \
695 { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; }
696 #define __PYX_ERR(f_index, lineno, Ln_error) \
697 { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }
699 #ifndef __PYX_EXTERN_C
701 #define __PYX_EXTERN_C extern "C"
703 #define __PYX_EXTERN_C extern
707 #define __PYX_HAVE__cTwophaseDarcyCoefficients
708 #define __PYX_HAVE_API__cTwophaseDarcyCoefficients
712 #include "numpy/arrayobject.h"
713 #include "numpy/ndarrayobject.h"
714 #include "numpy/ndarraytypes.h"
715 #include "numpy/arrayscalars.h"
716 #include "numpy/ufuncobject.h"
727 #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
728 #define CYTHON_WITHOUT_ASSERTIONS
731 typedef struct {PyObject **p;
const char *
s;
const Py_ssize_t
n;
const char* encoding;
732 const char is_unicode;
const char is_str;
const char intern; } __Pyx_StringTabEntry;
734 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
735 #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
736 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
737 #define __PYX_DEFAULT_STRING_ENCODING ""
738 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
739 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
740 #define __Pyx_uchar_cast(c) ((unsigned char)c)
741 #define __Pyx_long_cast(x) ((long)x)
742 #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
743 (sizeof(type) < sizeof(Py_ssize_t)) ||\
744 (sizeof(type) > sizeof(Py_ssize_t) &&\
745 likely(v < (type)PY_SSIZE_T_MAX ||\
746 v == (type)PY_SSIZE_T_MAX) &&\
747 (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
748 v == (type)PY_SSIZE_T_MIN))) ||\
749 (sizeof(type) == sizeof(Py_ssize_t) &&\
750 (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
751 v == (type)PY_SSIZE_T_MAX))) )
752 static CYTHON_INLINE
int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
753 return (
size_t) i < (size_t) limit;
755 #if defined (__cplusplus) && __cplusplus >= 201103L
757 #define __Pyx_sst_abs(value) std::abs(value)
758 #elif SIZEOF_INT >= SIZEOF_SIZE_T
759 #define __Pyx_sst_abs(value) abs(value)
760 #elif SIZEOF_LONG >= SIZEOF_SIZE_T
761 #define __Pyx_sst_abs(value) labs(value)
762 #elif defined (_MSC_VER)
763 #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
764 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
765 #define __Pyx_sst_abs(value) llabs(value)
766 #elif defined (__GNUC__)
767 #define __Pyx_sst_abs(value) __builtin_llabs(value)
769 #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
771 static CYTHON_INLINE
const char* __Pyx_PyObject_AsString(PyObject*);
772 static CYTHON_INLINE
const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
773 #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
774 #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
775 #define __Pyx_PyBytes_FromString PyBytes_FromString
776 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
777 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(
const char*);
778 #if PY_MAJOR_VERSION < 3
779 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
780 #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
782 #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
783 #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
785 #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
786 #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
787 #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
788 #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
789 #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
790 #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
791 #define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s))
792 #define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
793 #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
794 #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
795 #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
796 #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
797 #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
798 #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
799 #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
800 #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
801 static CYTHON_INLINE
size_t __Pyx_Py_UNICODE_strlen(
const Py_UNICODE *
u) {
802 const Py_UNICODE *u_end =
u;
804 return (
size_t)(u_end -
u - 1);
806 #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
807 #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
808 #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
809 #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
810 #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
811 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(
long b);
812 static CYTHON_INLINE
int __Pyx_PyObject_IsTrue(PyObject*);
813 static CYTHON_INLINE
int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
814 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
815 #define __Pyx_PySequence_Tuple(obj)\
816 (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
817 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
818 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(
size_t);
819 static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
820 #if CYTHON_ASSUME_SAFE_MACROS
821 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
823 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
825 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
826 #if PY_MAJOR_VERSION >= 3
827 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
829 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
831 #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
832 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
833 static int __Pyx_sys_getdefaultencoding_not_ascii;
834 static int __Pyx_init_sys_getdefaultencoding_params(
void) {
836 PyObject* default_encoding = NULL;
837 PyObject* ascii_chars_u = NULL;
838 PyObject* ascii_chars_b = NULL;
839 const char* default_encoding_c;
840 sys = PyImport_ImportModule(
"sys");
842 default_encoding = PyObject_CallMethod(sys, (
char*)
"getdefaultencoding", NULL);
844 if (!default_encoding)
goto bad;
845 default_encoding_c = PyBytes_AsString(default_encoding);
846 if (!default_encoding_c)
goto bad;
847 if (strcmp(default_encoding_c,
"ascii") == 0) {
848 __Pyx_sys_getdefaultencoding_not_ascii = 0;
850 char ascii_chars[128];
852 for (
c = 0;
c < 128;
c++) {
855 __Pyx_sys_getdefaultencoding_not_ascii = 1;
856 ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
857 if (!ascii_chars_u)
goto bad;
858 ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
859 if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
862 "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
866 Py_DECREF(ascii_chars_u);
867 Py_DECREF(ascii_chars_b);
869 Py_DECREF(default_encoding);
872 Py_XDECREF(default_encoding);
873 Py_XDECREF(ascii_chars_u);
874 Py_XDECREF(ascii_chars_b);
878 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
879 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
881 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
882 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
883 static char* __PYX_DEFAULT_STRING_ENCODING;
884 static int __Pyx_init_sys_getdefaultencoding_params(
void) {
886 PyObject* default_encoding = NULL;
887 char* default_encoding_c;
888 sys = PyImport_ImportModule(
"sys");
890 default_encoding = PyObject_CallMethod(sys, (
char*) (
const char*)
"getdefaultencoding", NULL);
892 if (!default_encoding)
goto bad;
893 default_encoding_c = PyBytes_AsString(default_encoding);
894 if (!default_encoding_c)
goto bad;
895 __PYX_DEFAULT_STRING_ENCODING = (
char*) malloc(strlen(default_encoding_c) + 1);
896 if (!__PYX_DEFAULT_STRING_ENCODING)
goto bad;
897 strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
898 Py_DECREF(default_encoding);
901 Py_XDECREF(default_encoding);
909 #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
910 #define likely(x) __builtin_expect(!!(x), 1)
911 #define unlikely(x) __builtin_expect(!!(x), 0)
913 #define likely(x) (x)
914 #define unlikely(x) (x)
916 static CYTHON_INLINE
void __Pyx_pretend_to_initialize(
void* ptr) { (void)ptr; }
918 static PyObject *__pyx_m = NULL;
919 static PyObject *__pyx_d;
920 static PyObject *__pyx_b;
921 static PyObject *__pyx_cython_runtime = NULL;
922 static PyObject *__pyx_empty_tuple;
923 static PyObject *__pyx_empty_bytes;
924 static PyObject *__pyx_empty_unicode;
925 static int __pyx_lineno;
926 static int __pyx_clineno = 0;
927 static const char * __pyx_cfilenm= __FILE__;
928 static const char *__pyx_filename;
931 #if !defined(CYTHON_CCOMPLEX)
932 #if defined(__cplusplus)
933 #define CYTHON_CCOMPLEX 1
934 #elif defined(_Complex_I)
935 #define CYTHON_CCOMPLEX 1
937 #define CYTHON_CCOMPLEX 0
947 #if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
949 #define _Complex_I 1.0fj
953 static const char *__pyx_f[] = {
954 "proteus/cTwophaseDarcyCoefficients.pyx",
966 typedef npy_int8 __pyx_t_5numpy_int8_t;
975 typedef npy_int16 __pyx_t_5numpy_int16_t;
984 typedef npy_int32 __pyx_t_5numpy_int32_t;
993 typedef npy_int64 __pyx_t_5numpy_int64_t;
1002 typedef npy_uint8 __pyx_t_5numpy_uint8_t;
1011 typedef npy_uint16 __pyx_t_5numpy_uint16_t;
1020 typedef npy_uint32 __pyx_t_5numpy_uint32_t;
1029 typedef npy_uint64 __pyx_t_5numpy_uint64_t;
1038 typedef npy_float32 __pyx_t_5numpy_float32_t;
1047 typedef npy_float64 __pyx_t_5numpy_float64_t;
1056 typedef npy_long __pyx_t_5numpy_int_t;
1065 typedef npy_longlong __pyx_t_5numpy_long_t;
1074 typedef npy_longlong __pyx_t_5numpy_longlong_t;
1083 typedef npy_ulong __pyx_t_5numpy_uint_t;
1092 typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
1101 typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
1110 typedef npy_intp __pyx_t_5numpy_intp_t;
1119 typedef npy_uintp __pyx_t_5numpy_uintp_t;
1128 typedef npy_double __pyx_t_5numpy_float_t;
1137 typedef npy_double __pyx_t_5numpy_double_t;
1146 typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
1150 typedef ::std::complex< float > __pyx_t_float_complex;
1152 typedef float _Complex __pyx_t_float_complex;
1155 typedef struct {
float real, imag; } __pyx_t_float_complex;
1157 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(
float,
float);
1162 typedef ::std::complex< double > __pyx_t_double_complex;
1164 typedef double _Complex __pyx_t_double_complex;
1167 typedef struct {
double real, imag; } __pyx_t_double_complex;
1169 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(
double,
double);
1181 typedef npy_cfloat __pyx_t_5numpy_cfloat_t;
1190 typedef npy_cdouble __pyx_t_5numpy_cdouble_t;
1199 typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;
1208 typedef npy_cdouble __pyx_t_5numpy_complex_t;
1212 #ifndef CYTHON_REFNANNY
1213 #define CYTHON_REFNANNY 0
1217 void (*INCREF)(
void*, PyObject*, int);
1218 void (*DECREF)(
void*, PyObject*, int);
1219 void (*GOTREF)(
void*, PyObject*, int);
1220 void (*GIVEREF)(
void*, PyObject*, int);
1221 void* (*SetupContext)(
const char*, int,
const char*);
1222 void (*FinishContext)(
void**);
1223 } __Pyx_RefNannyAPIStruct;
1224 static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
1225 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(
const char *modname);
1226 #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
1228 #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1230 PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
1231 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1232 PyGILState_Release(__pyx_gilstate_save);\
1234 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1237 #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1238 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
1240 #define __Pyx_RefNannyFinishContext()\
1241 __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
1242 #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1243 #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1244 #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1245 #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1246 #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
1247 #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
1248 #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
1249 #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
1251 #define __Pyx_RefNannyDeclarations
1252 #define __Pyx_RefNannySetupContext(name, acquire_gil)
1253 #define __Pyx_RefNannyFinishContext()
1254 #define __Pyx_INCREF(r) Py_INCREF(r)
1255 #define __Pyx_DECREF(r) Py_DECREF(r)
1256 #define __Pyx_GOTREF(r)
1257 #define __Pyx_GIVEREF(r)
1258 #define __Pyx_XINCREF(r) Py_XINCREF(r)
1259 #define __Pyx_XDECREF(r) Py_XDECREF(r)
1260 #define __Pyx_XGOTREF(r)
1261 #define __Pyx_XGIVEREF(r)
1263 #define __Pyx_XDECREF_SET(r, v) do {\
1264 PyObject *tmp = (PyObject *) r;\
1265 r = v; __Pyx_XDECREF(tmp);\
1267 #define __Pyx_DECREF_SET(r, v) do {\
1268 PyObject *tmp = (PyObject *) r;\
1269 r = v; __Pyx_DECREF(tmp);\
1271 #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
1272 #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
1275 static void __Pyx_RaiseArgtupleInvalid(
const char* func_name,
int exact,
1276 Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
1279 static void __Pyx_RaiseDoubleKeywordsError(
const char* func_name, PyObject* kw_name);
1282 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
1283 PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
1284 const char* function_name);
1287 #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
1288 ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
1289 __Pyx__ArgTypeTest(obj, type, name, exact))
1290 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type,
const char *name,
int exact);
1293 #if CYTHON_USE_TYPE_SLOTS
1294 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
1296 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
1300 #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1301 (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1302 __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
1303 (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
1304 __Pyx_GetItemInt_Generic(o, to_py_func(i))))
1305 #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1306 (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1307 __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
1308 (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
1309 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
1310 int wraparound,
int boundscheck);
1311 #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1312 (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1313 __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
1314 (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
1315 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
1316 int wraparound,
int boundscheck);
1317 static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
1318 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
1319 int is_list,
int wraparound,
int boundscheck);
1322 #if CYTHON_FAST_PYCALL
1323 #define __Pyx_PyFunction_FastCall(func, args, nargs)\
1324 __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
1325 #if 1 || PY_VERSION_HEX < 0x030600B1
1326 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
1328 #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
1330 #define __Pyx_BUILD_ASSERT_EXPR(cond)\
1331 (sizeof(char [1 - 2*!(cond)]) - 1)
1332 #ifndef Py_MEMBER_SIZE
1333 #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
1335 #if CYTHON_FAST_PYCALL
1336 static size_t __pyx_pyframe_localsplus_offset = 0;
1337 #include "frameobject.h"
1338 #if PY_VERSION_HEX >= 0x030b00a6
1339 #ifndef Py_BUILD_CORE
1340 #define Py_BUILD_CORE 1
1342 #include "internal/pycore_frame.h"
1344 #define __Pxy_PyFrame_Initialize_Offsets()\
1345 ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
1346 (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
1347 #define __Pyx_PyFrame_GetLocalsplus(frame)\
1348 (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
1349 #endif // CYTHON_FAST_PYCALL
1353 #if CYTHON_FAST_PYCCALL
1354 static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
1356 #define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)
1360 #if CYTHON_COMPILING_IN_CPYTHON
1361 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
1363 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
1367 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
1370 #if CYTHON_USE_EXC_INFO_STACK
1371 static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
1375 #if CYTHON_FAST_THREAD_STATE
1376 #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
1377 #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
1378 #define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type
1380 #define __Pyx_PyThreadState_declare
1381 #define __Pyx_PyThreadState_assign
1382 #define __Pyx_PyErr_Occurred() PyErr_Occurred()
1386 #if CYTHON_FAST_THREAD_STATE
1387 #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
1388 static CYTHON_INLINE
void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1389 #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
1390 static CYTHON_INLINE
void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1392 #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
1393 #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
1397 #if CYTHON_FAST_THREAD_STATE
1398 #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
1399 static CYTHON_INLINE
int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
1401 #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
1405 #if CYTHON_FAST_THREAD_STATE
1406 #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
1407 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1409 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
1413 #if CYTHON_FAST_THREAD_STATE
1414 #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
1415 #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
1416 #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
1417 #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
1418 #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
1419 static CYTHON_INLINE
void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1420 static CYTHON_INLINE
void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1421 #if CYTHON_COMPILING_IN_CPYTHON
1422 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
1424 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1427 #define __Pyx_PyErr_Clear() PyErr_Clear()
1428 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1429 #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
1430 #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
1431 #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
1432 #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
1433 #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
1434 #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
1438 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
1441 #ifndef __PYX_HAVE_RT_ImportType_proto
1442 #define __PYX_HAVE_RT_ImportType_proto
1443 enum __Pyx_ImportType_CheckSize {
1444 __Pyx_ImportType_CheckSize_Error = 0,
1445 __Pyx_ImportType_CheckSize_Warn = 1,
1446 __Pyx_ImportType_CheckSize_Ignore = 2
1448 static PyTypeObject *__Pyx_ImportType(PyObject* module,
const char *module_name,
const char *class_name,
size_t size,
enum __Pyx_ImportType_CheckSize check_size);
1452 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list,
int level);
1455 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
1456 #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1)
1457 #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)
1458 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
1459 (version_var) = __PYX_GET_DICT_VERSION(dict);\
1460 (cache_var) = (value);
1461 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
1462 static PY_UINT64_T __pyx_dict_version = 0;\
1463 static PyObject *__pyx_dict_cached_value = NULL;\
1464 if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
1465 (VAR) = __pyx_dict_cached_value;\
1467 (VAR) = __pyx_dict_cached_value = (LOOKUP);\
1468 __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
1471 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
1472 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
1473 static CYTHON_INLINE
int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
1475 #define __PYX_GET_DICT_VERSION(dict) (0)
1476 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
1477 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);
1481 #ifdef CYTHON_CLINE_IN_TRACEBACK
1482 #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
1484 static int __Pyx_CLineForTraceback(PyThreadState *tstate,
int c_line);
1489 PyCodeObject* code_object;
1491 } __Pyx_CodeObjectCacheEntry;
1492 struct __Pyx_CodeObjectCache {
1495 __Pyx_CodeObjectCacheEntry* entries;
1497 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
1498 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries,
int count,
int code_line);
1499 static PyCodeObject *__pyx_find_code_object(
int code_line);
1500 static void __pyx_insert_code_object(
int code_line, PyCodeObject* code_object);
1503 static void __Pyx_AddTraceback(
const char *funcname,
int c_line,
1504 int py_line,
const char *filename);
1507 #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
1508 #define __Pyx_HAS_GCC_DIAGNOSTIC
1514 #define __Pyx_CREAL(z) ((z).real())
1515 #define __Pyx_CIMAG(z) ((z).imag())
1517 #define __Pyx_CREAL(z) (__real__(z))
1518 #define __Pyx_CIMAG(z) (__imag__(z))
1521 #define __Pyx_CREAL(z) ((z).real)
1522 #define __Pyx_CIMAG(z) ((z).imag)
1524 #if defined(__cplusplus) && CYTHON_CCOMPLEX\
1525 && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103)
1526 #define __Pyx_SET_CREAL(z,x) ((z).real(x))
1527 #define __Pyx_SET_CIMAG(z,y) ((z).imag(y))
1529 #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
1530 #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
1535 #define __Pyx_c_eq_float(a, b) ((a)==(b))
1536 #define __Pyx_c_sum_float(a, b) ((a)+(b))
1537 #define __Pyx_c_diff_float(a, b) ((a)-(b))
1538 #define __Pyx_c_prod_float(a, b) ((a)*(b))
1539 #define __Pyx_c_quot_float(a, b) ((a)/(b))
1540 #define __Pyx_c_neg_float(a) (-(a))
1542 #define __Pyx_c_is_zero_float(z) ((z)==(float)0)
1543 #define __Pyx_c_conj_float(z) (::std::conj(z))
1545 #define __Pyx_c_abs_float(z) (::std::abs(z))
1546 #define __Pyx_c_pow_float(a, b) (::std::pow(a, b))
1549 #define __Pyx_c_is_zero_float(z) ((z)==0)
1550 #define __Pyx_c_conj_float(z) (conjf(z))
1552 #define __Pyx_c_abs_float(z) (cabsf(z))
1553 #define __Pyx_c_pow_float(a, b) (cpowf(a, b))
1557 static CYTHON_INLINE
int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex);
1558 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex);
1559 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex);
1560 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex);
1561 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex);
1562 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex);
1563 static CYTHON_INLINE
int __Pyx_c_is_zero_float(__pyx_t_float_complex);
1564 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex);
1566 static CYTHON_INLINE
float __Pyx_c_abs_float(__pyx_t_float_complex);
1567 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex);
1573 #define __Pyx_c_eq_double(a, b) ((a)==(b))
1574 #define __Pyx_c_sum_double(a, b) ((a)+(b))
1575 #define __Pyx_c_diff_double(a, b) ((a)-(b))
1576 #define __Pyx_c_prod_double(a, b) ((a)*(b))
1577 #define __Pyx_c_quot_double(a, b) ((a)/(b))
1578 #define __Pyx_c_neg_double(a) (-(a))
1580 #define __Pyx_c_is_zero_double(z) ((z)==(double)0)
1581 #define __Pyx_c_conj_double(z) (::std::conj(z))
1583 #define __Pyx_c_abs_double(z) (::std::abs(z))
1584 #define __Pyx_c_pow_double(a, b) (::std::pow(a, b))
1587 #define __Pyx_c_is_zero_double(z) ((z)==0)
1588 #define __Pyx_c_conj_double(z) (conj(z))
1590 #define __Pyx_c_abs_double(z) (cabs(z))
1591 #define __Pyx_c_pow_double(a, b) (cpow(a, b))
1595 static CYTHON_INLINE
int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex);
1596 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex);
1597 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex);
1598 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex);
1599 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex);
1600 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex);
1601 static CYTHON_INLINE
int __Pyx_c_is_zero_double(__pyx_t_double_complex);
1602 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex);
1604 static CYTHON_INLINE
double __Pyx_c_abs_double(__pyx_t_double_complex);
1605 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex);
1610 static CYTHON_INLINE
int __Pyx_PyInt_As_int(PyObject *);
1613 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(
int value);
1616 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(
long value);
1619 static CYTHON_INLINE
long __Pyx_PyInt_As_long(PyObject *);
1622 #if CYTHON_COMPILING_IN_CPYTHON
1623 #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
1624 static CYTHON_INLINE
int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
1625 static CYTHON_INLINE
int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
1626 static CYTHON_INLINE
int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
1628 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
1629 #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
1630 #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
1632 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
1635 static int __Pyx_check_binary_version(
void);
1638 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
1650 static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;
1663 static PyTypeObject *__pyx_ptype_5numpy_dtype = 0;
1664 static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0;
1665 static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0;
1666 static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0;
1667 static PyTypeObject *__pyx_ptype_5numpy_generic = 0;
1668 static PyTypeObject *__pyx_ptype_5numpy_number = 0;
1669 static PyTypeObject *__pyx_ptype_5numpy_integer = 0;
1670 static PyTypeObject *__pyx_ptype_5numpy_signedinteger = 0;
1671 static PyTypeObject *__pyx_ptype_5numpy_unsignedinteger = 0;
1672 static PyTypeObject *__pyx_ptype_5numpy_inexact = 0;
1673 static PyTypeObject *__pyx_ptype_5numpy_floating = 0;
1674 static PyTypeObject *__pyx_ptype_5numpy_complexfloating = 0;
1675 static PyTypeObject *__pyx_ptype_5numpy_flexible = 0;
1676 static PyTypeObject *__pyx_ptype_5numpy_character = 0;
1677 static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0;
1682 #define __Pyx_MODULE_NAME "cTwophaseDarcyCoefficients"
1683 extern int __pyx_module_is_main_cTwophaseDarcyCoefficients;
1684 int __pyx_module_is_main_cTwophaseDarcyCoefficients = 0;
1687 static PyObject *__pyx_builtin_ImportError;
1688 static const char __pyx_k_a[] =
"a";
1689 static const char __pyx_k_b[] =
"b";
1690 static const char __pyx_k_f[] =
"f";
1691 static const char __pyx_k_g[] =
"g";
1692 static const char __pyx_k_m[] =
"m";
1693 static const char __pyx_k_u[] =
"u";
1694 static const char __pyx_k_x[] =
"x";
1695 static const char __pyx_k_an[] =
"an";
1696 static const char __pyx_k_aw[] =
"aw";
1697 static const char __pyx_k_da[] =
"da";
1698 static const char __pyx_k_df[] =
"df";
1699 static const char __pyx_k_dm[] =
"dm";
1700 static const char __pyx_k_fn[] =
"fn";
1701 static const char __pyx_k_fw[] =
"fw";
1702 static const char __pyx_k_mn[] =
"mn";
1703 static const char __pyx_k_mw[] =
"mw";
1704 static const char __pyx_k_np[] =
"np";
1705 static const char __pyx_k_qt[] =
"qt";
1706 static const char __pyx_k_sw[] =
"sw";
1707 static const char __pyx_k_dan[] =
"dan";
1708 static const char __pyx_k_daw[] =
"daw";
1709 static const char __pyx_k_dmn[] =
"dmn";
1710 static const char __pyx_k_dmw[] =
"dmw";
1711 static const char __pyx_k_mun[] =
"mun";
1712 static const char __pyx_k_muw[] =
"muw";
1713 static const char __pyx_k_phi[] =
"phi";
1714 static const char __pyx_k_Kbar[] =
"Kbar";
1715 static const char __pyx_k_dphi[] =
"dphi";
1716 static const char __pyx_k_main[] =
"__main__";
1717 static const char __pyx_k_name[] =
"__name__";
1718 static const char __pyx_k_psic[] =
"psic";
1719 static const char __pyx_k_psin[] =
"psin";
1720 static const char __pyx_k_psiw[] =
"psiw";
1721 static const char __pyx_k_size[] =
"size";
1722 static const char __pyx_k_test[] =
"__test__";
1723 static const char __pyx_k_dpsin[] =
"dpsin";
1724 static const char __pyx_k_numpy[] =
"numpy";
1725 static const char __pyx_k_omega[] =
"omega";
1726 static const char __pyx_k_colind[] =
"colind";
1727 static const char __pyx_k_domain[] =
"domain";
1728 static const char __pyx_k_format[] =
"format";
1729 static const char __pyx_k_import[] =
"__import__";
1730 static const char __pyx_k_nknots[] =
"nknots";
1731 static const char __pyx_k_rowptr[] =
"rowptr";
1732 static const char __pyx_k_dfn_dsw[] =
"dfn_dsw";
1733 static const char __pyx_k_dfw_dsw[] =
"dfw_dsw";
1734 static const char __pyx_k_matType[] =
"matType";
1735 static const char __pyx_k_calcFlag[] =
"calcFlag";
1736 static const char __pyx_k_nSimplex[] =
"nSimplex";
1737 static const char __pyx_k_phi_psin[] =
"phi_psin";
1738 static const char __pyx_k_phi_psiw[] =
"phi_psiw";
1739 static const char __pyx_k_dan_dpsic[] =
"dan_dpsic";
1740 static const char __pyx_k_dan_dpsiw[] =
"dan_dpsiw";
1741 static const char __pyx_k_daw_dpsic[] =
"daw_dpsic";
1742 static const char __pyx_k_daw_dpsiw[] =
"daw_dpsiw";
1743 static const char __pyx_k_dfn_dpsiw[] =
"dfn_dpsiw";
1744 static const char __pyx_k_dfw_dpsiw[] =
"dfw_dpsiw";
1745 static const char __pyx_k_dmn_dpsic[] =
"dmn_dpsic";
1746 static const char __pyx_k_dmn_dpsiw[] =
"dmn_dpsiw";
1747 static const char __pyx_k_dmw_dpsic[] =
"dmw_dpsic";
1748 static const char __pyx_k_dmw_dpsiw[] =
"dmw_dpsiw";
1749 static const char __pyx_k_grad_psic[] =
"grad_psic";
1750 static const char __pyx_k_iwork_psk[] =
"iwork_psk";
1751 static const char __pyx_k_rwork_psk[] =
"rwork_psk";
1752 static const char __pyx_k_startIndex[] =
"startIndex";
1753 static const char __pyx_k_vol_frac_n[] =
"vol_frac_n";
1754 static const char __pyx_k_vol_frac_w[] =
"vol_frac_w";
1755 static const char __pyx_k_ImportError[] =
"ImportError";
1756 static const char __pyx_k_dpsin_dpsiw[] =
"dpsin_dpsiw";
1757 static const char __pyx_k_splineTable[] =
"splineTable";
1758 static const char __pyx_k_pskModelFlag[] =
"pskModelFlag";
1759 static const char __pyx_k_dphi_psin_dsw[] =
"dphi_psin_dsw";
1760 static const char __pyx_k_rwork_psk_tol[] =
"rwork_psk_tol";
1761 static const char __pyx_k_density_n_flag[] =
"density_n_flag";
1762 static const char __pyx_k_density_w_flag[] =
"density_w_flag";
1763 static const char __pyx_k_dphi_psin_dpsic[] =
"dphi_psin_dpsic";
1764 static const char __pyx_k_dphi_psin_dpsiw[] =
"dphi_psin_dpsiw";
1765 static const char __pyx_k_dphi_psiw_dpsiw[] =
"dphi_psiw_dpsiw";
1766 static const char __pyx_k_rwork_density_n[] =
"rwork_density_n";
1767 static const char __pyx_k_rwork_density_w[] =
"rwork_density_w";
1768 static const char __pyx_k_advectionScaling[] =
"advectionScaling";
1769 static const char __pyx_k_nPointsPerSimplex[] =
"nPointsPerSimplex";
1770 static const char __pyx_k_cline_in_traceback[] =
"cline_in_traceback";
1771 static const char __pyx_k_compressibilityFlag[] =
"compressibilityFlag";
1772 static const char __pyx_k_generateSplineTables[] =
"generateSplineTables";
1773 static const char __pyx_k_twophaseDarcy_vol_frac[] =
"twophaseDarcy_vol_frac";
1774 static const char __pyx_k_capillaryDiffusionScaling[] =
"capillaryDiffusionScaling";
1775 static const char __pyx_k_cTwophaseDarcyCoefficients[] =
"cTwophaseDarcyCoefficients";
1776 static const char __pyx_k_numpy_core_multiarray_failed_to[] =
"numpy.core.multiarray failed to import";
1777 static const char __pyx_k_twophaseDarcy_fc_sd_het_matType[] =
"twophaseDarcy_fc_sd_het_matType";
1778 static const char __pyx_k_configuration_density_w_flag_0_a[] =
"configuration density_w_flag= {0} and density_n_flag= {1} not found ";
1779 static const char __pyx_k_numpy_core_umath_failed_to_impor[] =
"numpy.core.umath failed to import";
1780 static const char __pyx_k_proteus_cTwophaseDarcyCoefficien[] =
"proteus/cTwophaseDarcyCoefficients.pyx";
1781 static const char __pyx_k_twophaseDarcy_compressibleN_spli[] =
"twophaseDarcy_compressibleN_split_sd_pressure_het_matType";
1782 static const char __pyx_k_twophaseDarcy_fc_pp_sd_het_matTy[] =
"twophaseDarcy_fc_pp_sd_het_matType";
1783 static const char __pyx_k_twophaseDarcy_incompressible_spl[] =
"twophaseDarcy_incompressible_split_sd_pressure_het_matType";
1784 static const char __pyx_k_twophaseDarcy_slightCompressible[] =
"twophaseDarcy_slightCompressible_split_sd_pressure_het_matType";
1785 static const char __pyx_k_twophaseDarcy_fc_sd_het_matType_2[] =
"twophaseDarcy_fc_sd_het_matType_nonPotentialForm";
1786 static const char __pyx_k_twophaseDarcy_compressibleN_spli_2[] =
"twophaseDarcy_compressibleN_split_sd_saturation_het_matType";
1787 static const char __pyx_k_twophaseDarcy_incompressible_spl_2[] =
"twophaseDarcy_incompressible_split_sd_saturation_het_matType";
1788 static const char __pyx_k_twophaseDarcy_incompressible_spl_3[] =
"twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType";
1789 static const char __pyx_k_twophaseDarcy_slightCompressible_2[] =
"twophaseDarcy_slightCompressible_split_sd_saturation_het_matType";
1790 static PyObject *__pyx_n_s_ImportError;
1791 static PyObject *__pyx_n_s_Kbar;
1792 static PyObject *__pyx_n_s_a;
1793 static PyObject *__pyx_n_s_advectionScaling;
1794 static PyObject *__pyx_n_s_an;
1795 static PyObject *__pyx_n_s_aw;
1796 static PyObject *__pyx_n_s_b;
1797 static PyObject *__pyx_n_s_cTwophaseDarcyCoefficients;
1798 static PyObject *__pyx_n_s_calcFlag;
1799 static PyObject *__pyx_n_s_capillaryDiffusionScaling;
1800 static PyObject *__pyx_n_s_cline_in_traceback;
1801 static PyObject *__pyx_n_s_colind;
1802 static PyObject *__pyx_n_s_compressibilityFlag;
1803 static PyObject *__pyx_kp_s_configuration_density_w_flag_0_a;
1804 static PyObject *__pyx_n_s_da;
1805 static PyObject *__pyx_n_s_dan;
1806 static PyObject *__pyx_n_s_dan_dpsic;
1807 static PyObject *__pyx_n_s_dan_dpsiw;
1808 static PyObject *__pyx_n_s_daw;
1809 static PyObject *__pyx_n_s_daw_dpsic;
1810 static PyObject *__pyx_n_s_daw_dpsiw;
1811 static PyObject *__pyx_n_s_density_n_flag;
1812 static PyObject *__pyx_n_s_density_w_flag;
1813 static PyObject *__pyx_n_s_df;
1814 static PyObject *__pyx_n_s_dfn_dpsiw;
1815 static PyObject *__pyx_n_s_dfn_dsw;
1816 static PyObject *__pyx_n_s_dfw_dpsiw;
1817 static PyObject *__pyx_n_s_dfw_dsw;
1818 static PyObject *__pyx_n_s_dm;
1819 static PyObject *__pyx_n_s_dmn;
1820 static PyObject *__pyx_n_s_dmn_dpsic;
1821 static PyObject *__pyx_n_s_dmn_dpsiw;
1822 static PyObject *__pyx_n_s_dmw;
1823 static PyObject *__pyx_n_s_dmw_dpsic;
1824 static PyObject *__pyx_n_s_dmw_dpsiw;
1825 static PyObject *__pyx_n_s_domain;
1826 static PyObject *__pyx_n_s_dphi;
1827 static PyObject *__pyx_n_s_dphi_psin_dpsic;
1828 static PyObject *__pyx_n_s_dphi_psin_dpsiw;
1829 static PyObject *__pyx_n_s_dphi_psin_dsw;
1830 static PyObject *__pyx_n_s_dphi_psiw_dpsiw;
1831 static PyObject *__pyx_n_s_dpsin;
1832 static PyObject *__pyx_n_s_dpsin_dpsiw;
1833 static PyObject *__pyx_n_s_f;
1834 static PyObject *__pyx_n_s_fn;
1835 static PyObject *__pyx_n_s_format;
1836 static PyObject *__pyx_n_s_fw;
1837 static PyObject *__pyx_n_s_g;
1838 static PyObject *__pyx_n_s_generateSplineTables;
1839 static PyObject *__pyx_n_s_grad_psic;
1840 static PyObject *__pyx_n_s_import;
1841 static PyObject *__pyx_n_s_iwork_psk;
1842 static PyObject *__pyx_n_s_m;
1843 static PyObject *__pyx_n_s_main;
1844 static PyObject *__pyx_n_s_matType;
1845 static PyObject *__pyx_n_s_mn;
1846 static PyObject *__pyx_n_s_mun;
1847 static PyObject *__pyx_n_s_muw;
1848 static PyObject *__pyx_n_s_mw;
1849 static PyObject *__pyx_n_s_nPointsPerSimplex;
1850 static PyObject *__pyx_n_s_nSimplex;
1851 static PyObject *__pyx_n_s_name;
1852 static PyObject *__pyx_n_s_nknots;
1853 static PyObject *__pyx_n_s_np;
1854 static PyObject *__pyx_n_s_numpy;
1855 static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to;
1856 static PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor;
1857 static PyObject *__pyx_n_s_omega;
1858 static PyObject *__pyx_n_s_phi;
1859 static PyObject *__pyx_n_s_phi_psin;
1860 static PyObject *__pyx_n_s_phi_psiw;
1861 static PyObject *__pyx_kp_s_proteus_cTwophaseDarcyCoefficien;
1862 static PyObject *__pyx_n_s_psic;
1863 static PyObject *__pyx_n_s_psin;
1864 static PyObject *__pyx_n_s_psiw;
1865 static PyObject *__pyx_n_s_pskModelFlag;
1866 static PyObject *__pyx_n_s_qt;
1867 static PyObject *__pyx_n_s_rowptr;
1868 static PyObject *__pyx_n_s_rwork_density_n;
1869 static PyObject *__pyx_n_s_rwork_density_w;
1870 static PyObject *__pyx_n_s_rwork_psk;
1871 static PyObject *__pyx_n_s_rwork_psk_tol;
1872 static PyObject *__pyx_n_s_size;
1873 static PyObject *__pyx_n_s_splineTable;
1874 static PyObject *__pyx_n_s_startIndex;
1875 static PyObject *__pyx_n_s_sw;
1876 static PyObject *__pyx_n_s_test;
1877 static PyObject *__pyx_n_s_twophaseDarcy_compressibleN_spli;
1878 static PyObject *__pyx_n_s_twophaseDarcy_compressibleN_spli_2;
1879 static PyObject *__pyx_n_s_twophaseDarcy_fc_pp_sd_het_matTy;
1880 static PyObject *__pyx_n_s_twophaseDarcy_fc_sd_het_matType;
1881 static PyObject *__pyx_n_s_twophaseDarcy_fc_sd_het_matType_2;
1882 static PyObject *__pyx_n_s_twophaseDarcy_incompressible_spl;
1883 static PyObject *__pyx_n_s_twophaseDarcy_incompressible_spl_2;
1884 static PyObject *__pyx_n_s_twophaseDarcy_incompressible_spl_3;
1885 static PyObject *__pyx_n_s_twophaseDarcy_slightCompressible;
1886 static PyObject *__pyx_n_s_twophaseDarcy_slightCompressible_2;
1887 static PyObject *__pyx_n_s_twophaseDarcy_vol_frac;
1888 static PyObject *__pyx_n_s_u;
1889 static PyObject *__pyx_n_s_vol_frac_n;
1890 static PyObject *__pyx_n_s_vol_frac_w;
1891 static PyObject *__pyx_n_s_x;
1892 static PyObject *__pyx_pf_26cTwophaseDarcyCoefficients_twophaseDarcy_fc_sd_het_matType(CYTHON_UNUSED PyObject *__pyx_self,
int __pyx_v_pskModelFlag,
int __pyx_v_density_w_flag,
int __pyx_v_density_n_flag, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_matType,
double __pyx_v_muw,
double __pyx_v_mun, PyArrayObject *__pyx_v_omega, PyArrayObject *__pyx_v_Kbar,
double __pyx_v_b, PyArrayObject *__pyx_v_rwork_psk, PyArrayObject *__pyx_v_iwork_psk, PyArrayObject *__pyx_v_rwork_psk_tol, PyArrayObject *__pyx_v_rwork_density_w, PyArrayObject *__pyx_v_rwork_density_n, PyArrayObject *__pyx_v_g, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_sw, PyArrayObject *__pyx_v_psiw, PyArrayObject *__pyx_v_mw, PyArrayObject *__pyx_v_dmw, PyArrayObject *__pyx_v_dmw_dpsiw, PyArrayObject *__pyx_v_mn, PyArrayObject *__pyx_v_dmn, PyArrayObject *__pyx_v_dmn_dpsiw, PyArrayObject *__pyx_v_psin, PyArrayObject *__pyx_v_dpsin, PyArrayObject *__pyx_v_dpsin_dpsiw, PyArrayObject *__pyx_v_phi_psiw, PyArrayObject *__pyx_v_dphi_psiw_dpsiw, PyArrayObject *__pyx_v_phi_psin, PyArrayObject *__pyx_v_dphi_psin_dpsiw, PyArrayObject *__pyx_v_dphi_psin_dsw, PyArrayObject *__pyx_v_aw, PyArrayObject *__pyx_v_daw, PyArrayObject *__pyx_v_daw_dpsiw, PyArrayObject *__pyx_v_an, PyArrayObject *__pyx_v_dan, PyArrayObject *__pyx_v_dan_dpsiw);
1893 static PyObject *__pyx_pf_26cTwophaseDarcyCoefficients_2twophaseDarcy_fc_sd_het_matType_nonPotentialForm(CYTHON_UNUSED PyObject *__pyx_self,
int __pyx_v_pskModelFlag,
int __pyx_v_density_w_flag,
int __pyx_v_density_n_flag, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_matType,
double __pyx_v_muw,
double __pyx_v_mun, PyArrayObject *__pyx_v_omega, PyArrayObject *__pyx_v_Kbar,
double __pyx_v_b, PyArrayObject *__pyx_v_rwork_psk, PyArrayObject *__pyx_v_iwork_psk, PyArrayObject *__pyx_v_rwork_psk_tol, PyArrayObject *__pyx_v_rwork_density_w, PyArrayObject *__pyx_v_rwork_density_n, PyArrayObject *__pyx_v_g, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_sw, PyArrayObject *__pyx_v_psiw, PyArrayObject *__pyx_v_mw, PyArrayObject *__pyx_v_dmw, PyArrayObject *__pyx_v_dmw_dpsiw, PyArrayObject *__pyx_v_mn, PyArrayObject *__pyx_v_dmn, PyArrayObject *__pyx_v_dmn_dpsiw, PyArrayObject *__pyx_v_psin, PyArrayObject *__pyx_v_dpsin, PyArrayObject *__pyx_v_dpsin_dpsiw, PyArrayObject *__pyx_v_phi_psiw, PyArrayObject *__pyx_v_dphi_psiw_dpsiw, PyArrayObject *__pyx_v_phi_psin, PyArrayObject *__pyx_v_dphi_psin_dpsiw, PyArrayObject *__pyx_v_dphi_psin_dsw, PyArrayObject *__pyx_v_fw, PyArrayObject *__pyx_v_dfw_dsw, PyArrayObject *__pyx_v_dfw_dpsiw, PyArrayObject *__pyx_v_fn, PyArrayObject *__pyx_v_dfn_dsw, PyArrayObject *__pyx_v_dfn_dpsiw, PyArrayObject *__pyx_v_aw, PyArrayObject *__pyx_v_daw, PyArrayObject *__pyx_v_daw_dpsiw, PyArrayObject *__pyx_v_an, PyArrayObject *__pyx_v_dan, PyArrayObject *__pyx_v_dan_dpsiw,
int __pyx_v_compressibilityFlag);
1894 static PyObject *__pyx_pf_26cTwophaseDarcyCoefficients_4twophaseDarcy_fc_pp_sd_het_matType(CYTHON_UNUSED PyObject *__pyx_self,
int __pyx_v_pskModelFlag,
int __pyx_v_density_w_flag,
int __pyx_v_density_n_flag, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_matType,
double __pyx_v_muw,
double __pyx_v_mun, PyArrayObject *__pyx_v_omega, PyArrayObject *__pyx_v_Kbar,
double __pyx_v_b, PyArrayObject *__pyx_v_rwork_psk, PyArrayObject *__pyx_v_iwork_psk, PyArrayObject *__pyx_v_rwork_psk_tol, PyArrayObject *__pyx_v_rwork_density_w, PyArrayObject *__pyx_v_rwork_density_n, PyArrayObject *__pyx_v_g, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_psiw, PyArrayObject *__pyx_v_psic, PyArrayObject *__pyx_v_sw, PyArrayObject *__pyx_v_mw, PyArrayObject *__pyx_v_dmw_dpsiw, PyArrayObject *__pyx_v_dmw_dpsic, PyArrayObject *__pyx_v_mn, PyArrayObject *__pyx_v_dmn_dpsiw, PyArrayObject *__pyx_v_dmn_dpsic, PyArrayObject *__pyx_v_phi_psiw, PyArrayObject *__pyx_v_dphi_psiw_dpsiw, PyArrayObject *__pyx_v_phi_psin, PyArrayObject *__pyx_v_dphi_psin_dpsiw, PyArrayObject *__pyx_v_dphi_psin_dpsic, PyArrayObject *__pyx_v_aw, PyArrayObject *__pyx_v_daw_dpsiw, PyArrayObject *__pyx_v_daw_dpsic, PyArrayObject *__pyx_v_an, PyArrayObject *__pyx_v_dan_dpsiw, PyArrayObject *__pyx_v_dan_dpsic);
1895 static PyObject *__pyx_pf_26cTwophaseDarcyCoefficients_6twophaseDarcy_incompressible_split_sd_pressure_het_matType(CYTHON_UNUSED PyObject *__pyx_self,
int __pyx_v_pskModelFlag, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_matType,
double __pyx_v_muw,
double __pyx_v_mun, PyArrayObject *__pyx_v_omega, PyArrayObject *__pyx_v_Kbar,
double __pyx_v_b, PyArrayObject *__pyx_v_capillaryDiffusionScaling, PyArrayObject *__pyx_v_rwork_psk, PyArrayObject *__pyx_v_iwork_psk, PyArrayObject *__pyx_v_rwork_psk_tol, PyArrayObject *__pyx_v_rwork_density_w, PyArrayObject *__pyx_v_rwork_density_n, PyArrayObject *__pyx_v_g, PyArrayObject *__pyx_v_sw, PyArrayObject *__pyx_v_grad_psic, PyArrayObject *__pyx_v_f, PyArrayObject *__pyx_v_a);
1896 static PyObject *__pyx_pf_26cTwophaseDarcyCoefficients_8twophaseDarcy_incompressible_split_sd_saturation_het_matType(CYTHON_UNUSED PyObject *__pyx_self,
int __pyx_v_pskModelFlag,
int __pyx_v_density_w_flag, CYTHON_UNUSED
int __pyx_v_density_n_flag, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_matType,
double __pyx_v_muw,
double __pyx_v_mun, PyArrayObject *__pyx_v_omega, PyArrayObject *__pyx_v_Kbar,
double __pyx_v_b,
double __pyx_v_capillaryDiffusionScaling,
double __pyx_v_advectionScaling, PyArrayObject *__pyx_v_rwork_psk, PyArrayObject *__pyx_v_iwork_psk, PyArrayObject *__pyx_v_rwork_psk_tol, PyArrayObject *__pyx_v_rwork_density_w, PyArrayObject *__pyx_v_rwork_density_n, PyArrayObject *__pyx_v_g, PyArrayObject *__pyx_v_qt, PyArrayObject *__pyx_v_psiw, PyArrayObject *__pyx_v_sw, PyArrayObject *__pyx_v_m, PyArrayObject *__pyx_v_dm, PyArrayObject *__pyx_v_phi, PyArrayObject *__pyx_v_dphi, PyArrayObject *__pyx_v_f, PyArrayObject *__pyx_v_df, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_da);
1897 static PyObject *__pyx_pf_26cTwophaseDarcyCoefficients_10twophaseDarcy_slightCompressible_split_sd_pressure_het_matType(CYTHON_UNUSED PyObject *__pyx_self,
int __pyx_v_pskModelFlag,
int __pyx_v_density_w_flag, CYTHON_UNUSED
int __pyx_v_density_n_flag, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_matType,
double __pyx_v_muw,
double __pyx_v_mun, PyArrayObject *__pyx_v_omega, PyArrayObject *__pyx_v_Kbar,
double __pyx_v_b,
double __pyx_v_capillaryDiffusionScaling,
double __pyx_v_advectionScaling, PyArrayObject *__pyx_v_rwork_psk, PyArrayObject *__pyx_v_iwork_psk, PyArrayObject *__pyx_v_rwork_psk_tol, PyArrayObject *__pyx_v_rwork_density_w, PyArrayObject *__pyx_v_rwork_density_n, PyArrayObject *__pyx_v_g, PyArrayObject *__pyx_v_qt, PyArrayObject *__pyx_v_psiw, PyArrayObject *__pyx_v_sw, PyArrayObject *__pyx_v_m, PyArrayObject *__pyx_v_dm, PyArrayObject *__pyx_v_phi, PyArrayObject *__pyx_v_dphi, PyArrayObject *__pyx_v_f, PyArrayObject *__pyx_v_df, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_da);
1898 static PyObject *__pyx_pf_26cTwophaseDarcyCoefficients_12twophaseDarcy_slightCompressible_split_sd_saturation_het_matType(CYTHON_UNUSED PyObject *__pyx_self,
int __pyx_v_pskModelFlag,
int __pyx_v_density_w_flag,
int __pyx_v_density_n_flag, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_matType,
double __pyx_v_muw,
double __pyx_v_mun, PyArrayObject *__pyx_v_omega, PyArrayObject *__pyx_v_Kbar,
double __pyx_v_b,
double __pyx_v_capillaryDiffusionScaling,
double __pyx_v_advectionScaling, PyArrayObject *__pyx_v_rwork_psk, PyArrayObject *__pyx_v_iwork_psk, PyArrayObject *__pyx_v_rwork_psk_tol, PyArrayObject *__pyx_v_rwork_density_w, PyArrayObject *__pyx_v_rwork_density_n, PyArrayObject *__pyx_v_g, PyArrayObject *__pyx_v_qt, PyArrayObject *__pyx_v_psiw, PyArrayObject *__pyx_v_sw, PyArrayObject *__pyx_v_m, PyArrayObject *__pyx_v_dm, PyArrayObject *__pyx_v_phi, PyArrayObject *__pyx_v_dphi, PyArrayObject *__pyx_v_f, PyArrayObject *__pyx_v_df, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_da);
1899 static PyObject *__pyx_pf_26cTwophaseDarcyCoefficients_14twophaseDarcy_compressibleN_split_sd_pressure_het_matType(CYTHON_UNUSED PyObject *__pyx_self,
int __pyx_v_pskModelFlag,
int __pyx_v_density_w_flag,
int __pyx_v_density_n_flag, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_matType,
double __pyx_v_muw,
double __pyx_v_mun, PyArrayObject *__pyx_v_omega, PyArrayObject *__pyx_v_Kbar,
double __pyx_v_b,
double __pyx_v_capillaryDiffusionScaling, PyArrayObject *__pyx_v_rwork_psk, PyArrayObject *__pyx_v_iwork_psk, PyArrayObject *__pyx_v_rwork_psk_tol, PyArrayObject *__pyx_v_rwork_density_w, PyArrayObject *__pyx_v_rwork_density_n, PyArrayObject *__pyx_v_g, PyArrayObject *__pyx_v_sw, PyArrayObject *__pyx_v_psiw, PyArrayObject *__pyx_v_psin, PyArrayObject *__pyx_v_grad_psic, PyArrayObject *__pyx_v_m, PyArrayObject *__pyx_v_dm, PyArrayObject *__pyx_v_f, PyArrayObject *__pyx_v_a);
1900 static PyObject *__pyx_pf_26cTwophaseDarcyCoefficients_16twophaseDarcy_compressibleN_split_sd_saturation_het_matType(CYTHON_UNUSED PyObject *__pyx_self,
int __pyx_v_pskModelFlag,
int __pyx_v_density_w_flag,
int __pyx_v_density_n_flag, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_matType,
double __pyx_v_muw,
double __pyx_v_mun, PyArrayObject *__pyx_v_omega, PyArrayObject *__pyx_v_Kbar,
double __pyx_v_b,
double __pyx_v_capillaryDiffusionScaling,
double __pyx_v_advectionScaling, PyArrayObject *__pyx_v_rwork_psk, PyArrayObject *__pyx_v_iwork_psk, PyArrayObject *__pyx_v_rwork_psk_tol, PyArrayObject *__pyx_v_rwork_density_w, PyArrayObject *__pyx_v_rwork_density_n, PyArrayObject *__pyx_v_g, PyArrayObject *__pyx_v_qt, PyArrayObject *__pyx_v_psiw, PyArrayObject *__pyx_v_sw, PyArrayObject *__pyx_v_m, PyArrayObject *__pyx_v_dm, PyArrayObject *__pyx_v_phi, PyArrayObject *__pyx_v_dphi, PyArrayObject *__pyx_v_f, PyArrayObject *__pyx_v_df, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_da);
1901 static PyObject *__pyx_pf_26cTwophaseDarcyCoefficients_18twophaseDarcy_vol_frac(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_matType, PyArrayObject *__pyx_v_omega, PyArrayObject *__pyx_v_sw, PyArrayObject *__pyx_v_vol_frac_w, PyArrayObject *__pyx_v_vol_frac_n);
1902 static PyObject *__pyx_pf_26cTwophaseDarcyCoefficients_20generateSplineTables(CYTHON_UNUSED PyObject *__pyx_self,
int __pyx_v_pskModelFlag,
int __pyx_v_startIndex,
int __pyx_v_calcFlag, PyArrayObject *__pyx_v_domain, PyArrayObject *__pyx_v_rwork_psk, PyArrayObject *__pyx_v_iwork_psk, PyArrayObject *__pyx_v_rwork_psk_tol, PyArrayObject *__pyx_v_splineTable);
1903 static PyObject *__pyx_pf_26cTwophaseDarcyCoefficients_22twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType(CYTHON_UNUSED PyObject *__pyx_self,
int __pyx_v_pskModelFlag, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_matType,
double __pyx_v_muw,
double __pyx_v_mun, PyArrayObject *__pyx_v_omega, PyArrayObject *__pyx_v_Kbar,
double __pyx_v_b,
double __pyx_v_capillaryDiffusionScaling,
double __pyx_v_advectionScaling, PyArrayObject *__pyx_v_rwork_psk, PyArrayObject *__pyx_v_iwork_psk, PyArrayObject *__pyx_v_rwork_psk_tol, PyArrayObject *__pyx_v_rwork_density_w, PyArrayObject *__pyx_v_rwork_density_n, PyArrayObject *__pyx_v_g, PyArrayObject *__pyx_v_qt, PyArrayObject *__pyx_v_u, PyArrayObject *__pyx_v_sw, PyArrayObject *__pyx_v_m, PyArrayObject *__pyx_v_dm, PyArrayObject *__pyx_v_phi, PyArrayObject *__pyx_v_dphi, PyArrayObject *__pyx_v_f, PyArrayObject *__pyx_v_df, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_da);
1904 static PyObject *__pyx_tuple_;
1905 static PyObject *__pyx_tuple__2;
1906 static PyObject *__pyx_tuple__3;
1907 static PyObject *__pyx_tuple__5;
1908 static PyObject *__pyx_tuple__7;
1909 static PyObject *__pyx_tuple__9;
1910 static PyObject *__pyx_tuple__11;
1911 static PyObject *__pyx_tuple__13;
1912 static PyObject *__pyx_tuple__15;
1913 static PyObject *__pyx_tuple__17;
1914 static PyObject *__pyx_tuple__19;
1915 static PyObject *__pyx_tuple__21;
1916 static PyObject *__pyx_tuple__23;
1917 static PyObject *__pyx_tuple__25;
1918 static PyObject *__pyx_codeobj__4;
1919 static PyObject *__pyx_codeobj__6;
1920 static PyObject *__pyx_codeobj__8;
1921 static PyObject *__pyx_codeobj__10;
1922 static PyObject *__pyx_codeobj__12;
1923 static PyObject *__pyx_codeobj__14;
1924 static PyObject *__pyx_codeobj__16;
1925 static PyObject *__pyx_codeobj__18;
1926 static PyObject *__pyx_codeobj__20;
1927 static PyObject *__pyx_codeobj__22;
1928 static PyObject *__pyx_codeobj__24;
1929 static PyObject *__pyx_codeobj__26;
1941 static PyObject *__pyx_pw_26cTwophaseDarcyCoefficients_1twophaseDarcy_fc_sd_het_matType(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
1942 static char __pyx_doc_26cTwophaseDarcyCoefficients_twophaseDarcy_fc_sd_het_matType[] =
"Evaluate the coefficients of the fully coupled formulation of\n (slightly) compressible, two-phase Darcy flow for a heterogeneous\n medium, sparse diffusion rep. for het\n\n ";
1943 static PyMethodDef __pyx_mdef_26cTwophaseDarcyCoefficients_1twophaseDarcy_fc_sd_het_matType = {
"twophaseDarcy_fc_sd_het_matType", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_26cTwophaseDarcyCoefficients_1twophaseDarcy_fc_sd_het_matType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_26cTwophaseDarcyCoefficients_twophaseDarcy_fc_sd_het_matType};
1944 static PyObject *__pyx_pw_26cTwophaseDarcyCoefficients_1twophaseDarcy_fc_sd_het_matType(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
1945 int __pyx_v_pskModelFlag;
1946 int __pyx_v_density_w_flag;
1947 int __pyx_v_density_n_flag;
1948 PyArrayObject *__pyx_v_rowptr = 0;
1949 PyArrayObject *__pyx_v_colind = 0;
1950 PyArrayObject *__pyx_v_matType = 0;
1953 PyArrayObject *__pyx_v_omega = 0;
1954 PyArrayObject *__pyx_v_Kbar = 0;
1956 PyArrayObject *__pyx_v_rwork_psk = 0;
1957 PyArrayObject *__pyx_v_iwork_psk = 0;
1958 PyArrayObject *__pyx_v_rwork_psk_tol = 0;
1959 PyArrayObject *__pyx_v_rwork_density_w = 0;
1960 PyArrayObject *__pyx_v_rwork_density_n = 0;
1961 PyArrayObject *__pyx_v_g = 0;
1962 PyArrayObject *__pyx_v_x = 0;
1963 PyArrayObject *__pyx_v_sw = 0;
1964 PyArrayObject *__pyx_v_psiw = 0;
1965 PyArrayObject *__pyx_v_mw = 0;
1966 PyArrayObject *__pyx_v_dmw = 0;
1967 PyArrayObject *__pyx_v_dmw_dpsiw = 0;
1968 PyArrayObject *__pyx_v_mn = 0;
1969 PyArrayObject *__pyx_v_dmn = 0;
1970 PyArrayObject *__pyx_v_dmn_dpsiw = 0;
1971 PyArrayObject *__pyx_v_psin = 0;
1972 PyArrayObject *__pyx_v_dpsin = 0;
1973 PyArrayObject *__pyx_v_dpsin_dpsiw = 0;
1974 PyArrayObject *__pyx_v_phi_psiw = 0;
1975 PyArrayObject *__pyx_v_dphi_psiw_dpsiw = 0;
1976 PyArrayObject *__pyx_v_phi_psin = 0;
1977 PyArrayObject *__pyx_v_dphi_psin_dpsiw = 0;
1978 PyArrayObject *__pyx_v_dphi_psin_dsw = 0;
1979 PyArrayObject *__pyx_v_aw = 0;
1980 PyArrayObject *__pyx_v_daw = 0;
1981 PyArrayObject *__pyx_v_daw_dpsiw = 0;
1982 PyArrayObject *__pyx_v_an = 0;
1983 PyArrayObject *__pyx_v_dan = 0;
1984 PyArrayObject *__pyx_v_dan_dpsiw = 0;
1985 int __pyx_lineno = 0;
1986 const char *__pyx_filename = NULL;
1987 int __pyx_clineno = 0;
1988 PyObject *__pyx_r = 0;
1989 __Pyx_RefNannyDeclarations
1990 __Pyx_RefNannySetupContext(
"twophaseDarcy_fc_sd_het_matType (wrapper)", 0);
1992 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pskModelFlag,&__pyx_n_s_density_w_flag,&__pyx_n_s_density_n_flag,&__pyx_n_s_rowptr,&__pyx_n_s_colind,&__pyx_n_s_matType,&__pyx_n_s_muw,&__pyx_n_s_mun,&__pyx_n_s_omega,&__pyx_n_s_Kbar,&__pyx_n_s_b,&__pyx_n_s_rwork_psk,&__pyx_n_s_iwork_psk,&__pyx_n_s_rwork_psk_tol,&__pyx_n_s_rwork_density_w,&__pyx_n_s_rwork_density_n,&__pyx_n_s_g,&__pyx_n_s_x,&__pyx_n_s_sw,&__pyx_n_s_psiw,&__pyx_n_s_mw,&__pyx_n_s_dmw,&__pyx_n_s_dmw_dpsiw,&__pyx_n_s_mn,&__pyx_n_s_dmn,&__pyx_n_s_dmn_dpsiw,&__pyx_n_s_psin,&__pyx_n_s_dpsin,&__pyx_n_s_dpsin_dpsiw,&__pyx_n_s_phi_psiw,&__pyx_n_s_dphi_psiw_dpsiw,&__pyx_n_s_phi_psin,&__pyx_n_s_dphi_psin_dpsiw,&__pyx_n_s_dphi_psin_dsw,&__pyx_n_s_aw,&__pyx_n_s_daw,&__pyx_n_s_daw_dpsiw,&__pyx_n_s_an,&__pyx_n_s_dan,&__pyx_n_s_dan_dpsiw,0};
1993 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};
1994 if (unlikely(__pyx_kwds)) {
1996 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
1998 case 40: values[39] = PyTuple_GET_ITEM(__pyx_args, 39);
2000 case 39: values[38] = PyTuple_GET_ITEM(__pyx_args, 38);
2002 case 38: values[37] = PyTuple_GET_ITEM(__pyx_args, 37);
2004 case 37: values[36] = PyTuple_GET_ITEM(__pyx_args, 36);
2006 case 36: values[35] = PyTuple_GET_ITEM(__pyx_args, 35);
2008 case 35: values[34] = PyTuple_GET_ITEM(__pyx_args, 34);
2010 case 34: values[33] = PyTuple_GET_ITEM(__pyx_args, 33);
2012 case 33: values[32] = PyTuple_GET_ITEM(__pyx_args, 32);
2014 case 32: values[31] = PyTuple_GET_ITEM(__pyx_args, 31);
2016 case 31: values[30] = PyTuple_GET_ITEM(__pyx_args, 30);
2018 case 30: values[29] = PyTuple_GET_ITEM(__pyx_args, 29);
2020 case 29: values[28] = PyTuple_GET_ITEM(__pyx_args, 28);
2022 case 28: values[27] = PyTuple_GET_ITEM(__pyx_args, 27);
2024 case 27: values[26] = PyTuple_GET_ITEM(__pyx_args, 26);
2026 case 26: values[25] = PyTuple_GET_ITEM(__pyx_args, 25);
2028 case 25: values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
2030 case 24: values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
2032 case 23: values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
2034 case 22: values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
2036 case 21: values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
2038 case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
2040 case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
2042 case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
2044 case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
2046 case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
2048 case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
2050 case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
2052 case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
2054 case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
2056 case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
2058 case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
2060 case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
2062 case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
2064 case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
2066 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
2068 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
2070 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
2072 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2074 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2076 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2079 default:
goto __pyx_L5_argtuple_error;
2081 kw_args = PyDict_Size(__pyx_kwds);
2084 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pskModelFlag)) != 0)) kw_args--;
2085 else goto __pyx_L5_argtuple_error;
2088 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_density_w_flag)) != 0)) kw_args--;
2090 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType", 1, 40, 40, 1); __PYX_ERR(0, 32, __pyx_L3_error)
2094 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_density_n_flag)) != 0)) kw_args--;
2096 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType", 1, 40, 40, 2); __PYX_ERR(0, 32, __pyx_L3_error)
2100 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rowptr)) != 0)) kw_args--;
2102 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType", 1, 40, 40, 3); __PYX_ERR(0, 32, __pyx_L3_error)
2106 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_colind)) != 0)) kw_args--;
2108 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType", 1, 40, 40, 4); __PYX_ERR(0, 32, __pyx_L3_error)
2112 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_matType)) != 0)) kw_args--;
2114 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType", 1, 40, 40, 5); __PYX_ERR(0, 32, __pyx_L3_error)
2118 if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_muw)) != 0)) kw_args--;
2120 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType", 1, 40, 40, 6); __PYX_ERR(0, 32, __pyx_L3_error)
2124 if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mun)) != 0)) kw_args--;
2126 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType", 1, 40, 40, 7); __PYX_ERR(0, 32, __pyx_L3_error)
2130 if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_omega)) != 0)) kw_args--;
2132 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType", 1, 40, 40, 8); __PYX_ERR(0, 32, __pyx_L3_error)
2136 if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Kbar)) != 0)) kw_args--;
2138 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType", 1, 40, 40, 9); __PYX_ERR(0, 32, __pyx_L3_error)
2142 if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--;
2144 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType", 1, 40, 40, 10); __PYX_ERR(0, 32, __pyx_L3_error)
2148 if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork_psk)) != 0)) kw_args--;
2150 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType", 1, 40, 40, 11); __PYX_ERR(0, 32, __pyx_L3_error)
2154 if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iwork_psk)) != 0)) kw_args--;
2156 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType", 1, 40, 40, 12); __PYX_ERR(0, 32, __pyx_L3_error)
2160 if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork_psk_tol)) != 0)) kw_args--;
2162 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType", 1, 40, 40, 13); __PYX_ERR(0, 32, __pyx_L3_error)
2166 if (likely((values[14] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork_density_w)) != 0)) kw_args--;
2168 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType", 1, 40, 40, 14); __PYX_ERR(0, 32, __pyx_L3_error)
2172 if (likely((values[15] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork_density_n)) != 0)) kw_args--;
2174 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType", 1, 40, 40, 15); __PYX_ERR(0, 32, __pyx_L3_error)
2178 if (likely((values[16] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_g)) != 0)) kw_args--;
2180 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType", 1, 40, 40, 16); __PYX_ERR(0, 32, __pyx_L3_error)
2184 if (likely((values[17] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
2186 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType", 1, 40, 40, 17); __PYX_ERR(0, 32, __pyx_L3_error)
2190 if (likely((values[18] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sw)) != 0)) kw_args--;
2192 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType", 1, 40, 40, 18); __PYX_ERR(0, 32, __pyx_L3_error)
2196 if (likely((values[19] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_psiw)) != 0)) kw_args--;
2198 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType", 1, 40, 40, 19); __PYX_ERR(0, 32, __pyx_L3_error)
2202 if (likely((values[20] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mw)) != 0)) kw_args--;
2204 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType", 1, 40, 40, 20); __PYX_ERR(0, 32, __pyx_L3_error)
2208 if (likely((values[21] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dmw)) != 0)) kw_args--;
2210 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType", 1, 40, 40, 21); __PYX_ERR(0, 32, __pyx_L3_error)
2214 if (likely((values[22] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dmw_dpsiw)) != 0)) kw_args--;
2216 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType", 1, 40, 40, 22); __PYX_ERR(0, 32, __pyx_L3_error)
2220 if (likely((values[23] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mn)) != 0)) kw_args--;
2222 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType", 1, 40, 40, 23); __PYX_ERR(0, 32, __pyx_L3_error)
2226 if (likely((values[24] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dmn)) != 0)) kw_args--;
2228 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType", 1, 40, 40, 24); __PYX_ERR(0, 32, __pyx_L3_error)
2232 if (likely((values[25] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dmn_dpsiw)) != 0)) kw_args--;
2234 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType", 1, 40, 40, 25); __PYX_ERR(0, 32, __pyx_L3_error)
2238 if (likely((values[26] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_psin)) != 0)) kw_args--;
2240 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType", 1, 40, 40, 26); __PYX_ERR(0, 32, __pyx_L3_error)
2244 if (likely((values[27] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpsin)) != 0)) kw_args--;
2246 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType", 1, 40, 40, 27); __PYX_ERR(0, 32, __pyx_L3_error)
2250 if (likely((values[28] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpsin_dpsiw)) != 0)) kw_args--;
2252 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType", 1, 40, 40, 28); __PYX_ERR(0, 32, __pyx_L3_error)
2256 if (likely((values[29] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_phi_psiw)) != 0)) kw_args--;
2258 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType", 1, 40, 40, 29); __PYX_ERR(0, 32, __pyx_L3_error)
2262 if (likely((values[30] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dphi_psiw_dpsiw)) != 0)) kw_args--;
2264 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType", 1, 40, 40, 30); __PYX_ERR(0, 32, __pyx_L3_error)
2268 if (likely((values[31] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_phi_psin)) != 0)) kw_args--;
2270 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType", 1, 40, 40, 31); __PYX_ERR(0, 32, __pyx_L3_error)
2274 if (likely((values[32] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dphi_psin_dpsiw)) != 0)) kw_args--;
2276 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType", 1, 40, 40, 32); __PYX_ERR(0, 32, __pyx_L3_error)
2280 if (likely((values[33] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dphi_psin_dsw)) != 0)) kw_args--;
2282 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType", 1, 40, 40, 33); __PYX_ERR(0, 32, __pyx_L3_error)
2286 if (likely((values[34] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_aw)) != 0)) kw_args--;
2288 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType", 1, 40, 40, 34); __PYX_ERR(0, 32, __pyx_L3_error)
2292 if (likely((values[35] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_daw)) != 0)) kw_args--;
2294 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType", 1, 40, 40, 35); __PYX_ERR(0, 32, __pyx_L3_error)
2298 if (likely((values[36] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_daw_dpsiw)) != 0)) kw_args--;
2300 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType", 1, 40, 40, 36); __PYX_ERR(0, 32, __pyx_L3_error)
2304 if (likely((values[37] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_an)) != 0)) kw_args--;
2306 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType", 1, 40, 40, 37); __PYX_ERR(0, 32, __pyx_L3_error)
2310 if (likely((values[38] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dan)) != 0)) kw_args--;
2312 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType", 1, 40, 40, 38); __PYX_ERR(0, 32, __pyx_L3_error)
2316 if (likely((values[39] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dan_dpsiw)) != 0)) kw_args--;
2318 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType", 1, 40, 40, 39); __PYX_ERR(0, 32, __pyx_L3_error)
2321 if (unlikely(kw_args > 0)) {
2322 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"twophaseDarcy_fc_sd_het_matType") < 0)) __PYX_ERR(0, 32, __pyx_L3_error)
2324 }
else if (PyTuple_GET_SIZE(__pyx_args) != 40) {
2325 goto __pyx_L5_argtuple_error;
2327 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2328 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2329 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2330 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
2331 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
2332 values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
2333 values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
2334 values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
2335 values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
2336 values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
2337 values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
2338 values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
2339 values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
2340 values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
2341 values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
2342 values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
2343 values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
2344 values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
2345 values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
2346 values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
2347 values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
2348 values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
2349 values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
2350 values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
2351 values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
2352 values[25] = PyTuple_GET_ITEM(__pyx_args, 25);
2353 values[26] = PyTuple_GET_ITEM(__pyx_args, 26);
2354 values[27] = PyTuple_GET_ITEM(__pyx_args, 27);
2355 values[28] = PyTuple_GET_ITEM(__pyx_args, 28);
2356 values[29] = PyTuple_GET_ITEM(__pyx_args, 29);
2357 values[30] = PyTuple_GET_ITEM(__pyx_args, 30);
2358 values[31] = PyTuple_GET_ITEM(__pyx_args, 31);
2359 values[32] = PyTuple_GET_ITEM(__pyx_args, 32);
2360 values[33] = PyTuple_GET_ITEM(__pyx_args, 33);
2361 values[34] = PyTuple_GET_ITEM(__pyx_args, 34);
2362 values[35] = PyTuple_GET_ITEM(__pyx_args, 35);
2363 values[36] = PyTuple_GET_ITEM(__pyx_args, 36);
2364 values[37] = PyTuple_GET_ITEM(__pyx_args, 37);
2365 values[38] = PyTuple_GET_ITEM(__pyx_args, 38);
2366 values[39] = PyTuple_GET_ITEM(__pyx_args, 39);
2368 __pyx_v_pskModelFlag = __Pyx_PyInt_As_int(values[0]);
if (unlikely((__pyx_v_pskModelFlag == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 32, __pyx_L3_error)
2369 __pyx_v_density_w_flag = __Pyx_PyInt_As_int(values[1]);
if (unlikely((__pyx_v_density_w_flag == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 33, __pyx_L3_error)
2370 __pyx_v_density_n_flag = __Pyx_PyInt_As_int(values[2]);
if (unlikely((__pyx_v_density_n_flag == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 34, __pyx_L3_error)
2371 __pyx_v_rowptr = ((PyArrayObject *)values[3]);
2372 __pyx_v_colind = ((PyArrayObject *)values[4]);
2373 __pyx_v_matType = ((PyArrayObject *)values[5]);
2374 __pyx_v_muw = __pyx_PyFloat_AsDouble(values[6]);
if (unlikely((__pyx_v_muw == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 38, __pyx_L3_error)
2375 __pyx_v_mun = __pyx_PyFloat_AsDouble(values[7]);
if (unlikely((__pyx_v_mun == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 39, __pyx_L3_error)
2376 __pyx_v_omega = ((PyArrayObject *)values[8]);
2377 __pyx_v_Kbar = ((PyArrayObject *)values[9]);
2378 __pyx_v_b = __pyx_PyFloat_AsDouble(values[10]);
if (unlikely((__pyx_v_b == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 42, __pyx_L3_error)
2379 __pyx_v_rwork_psk = ((PyArrayObject *)values[11]);
2380 __pyx_v_iwork_psk = ((PyArrayObject *)values[12]);
2381 __pyx_v_rwork_psk_tol = ((PyArrayObject *)values[13]);
2382 __pyx_v_rwork_density_w = ((PyArrayObject *)values[14]);
2383 __pyx_v_rwork_density_n = ((PyArrayObject *)values[15]);
2384 __pyx_v_g = ((PyArrayObject *)values[16]);
2385 __pyx_v_x = ((PyArrayObject *)values[17]);
2386 __pyx_v_sw = ((PyArrayObject *)values[18]);
2387 __pyx_v_psiw = ((PyArrayObject *)values[19]);
2388 __pyx_v_mw = ((PyArrayObject *)values[20]);
2389 __pyx_v_dmw = ((PyArrayObject *)values[21]);
2390 __pyx_v_dmw_dpsiw = ((PyArrayObject *)values[22]);
2391 __pyx_v_mn = ((PyArrayObject *)values[23]);
2392 __pyx_v_dmn = ((PyArrayObject *)values[24]);
2393 __pyx_v_dmn_dpsiw = ((PyArrayObject *)values[25]);
2394 __pyx_v_psin = ((PyArrayObject *)values[26]);
2395 __pyx_v_dpsin = ((PyArrayObject *)values[27]);
2396 __pyx_v_dpsin_dpsiw = ((PyArrayObject *)values[28]);
2397 __pyx_v_phi_psiw = ((PyArrayObject *)values[29]);
2398 __pyx_v_dphi_psiw_dpsiw = ((PyArrayObject *)values[30]);
2399 __pyx_v_phi_psin = ((PyArrayObject *)values[31]);
2400 __pyx_v_dphi_psin_dpsiw = ((PyArrayObject *)values[32]);
2401 __pyx_v_dphi_psin_dsw = ((PyArrayObject *)values[33]);
2402 __pyx_v_aw = ((PyArrayObject *)values[34]);
2403 __pyx_v_daw = ((PyArrayObject *)values[35]);
2404 __pyx_v_daw_dpsiw = ((PyArrayObject *)values[36]);
2405 __pyx_v_an = ((PyArrayObject *)values[37]);
2406 __pyx_v_dan = ((PyArrayObject *)values[38]);
2407 __pyx_v_dan_dpsiw = ((PyArrayObject *)values[39]);
2409 goto __pyx_L4_argument_unpacking_done;
2410 __pyx_L5_argtuple_error:;
2411 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType", 1, 40, 40, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 32, __pyx_L3_error)
2413 __Pyx_AddTraceback(
"cTwophaseDarcyCoefficients.twophaseDarcy_fc_sd_het_matType", __pyx_clineno, __pyx_lineno, __pyx_filename);
2414 __Pyx_RefNannyFinishContext();
2416 __pyx_L4_argument_unpacking_done:;
2417 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rowptr), __pyx_ptype_5numpy_ndarray, 1,
"rowptr", 0))) __PYX_ERR(0, 35, __pyx_L1_error)
2418 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_colind), __pyx_ptype_5numpy_ndarray, 1,
"colind", 0))) __PYX_ERR(0, 36, __pyx_L1_error)
2419 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_matType), __pyx_ptype_5numpy_ndarray, 1,
"matType", 0))) __PYX_ERR(0, 37, __pyx_L1_error)
2420 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_omega), __pyx_ptype_5numpy_ndarray, 1,
"omega", 0))) __PYX_ERR(0, 40, __pyx_L1_error)
2421 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Kbar), __pyx_ptype_5numpy_ndarray, 1,
"Kbar", 0))) __PYX_ERR(0, 41, __pyx_L1_error)
2422 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_psk), __pyx_ptype_5numpy_ndarray, 1,
"rwork_psk", 0))) __PYX_ERR(0, 43, __pyx_L1_error)
2423 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork_psk), __pyx_ptype_5numpy_ndarray, 1,
"iwork_psk", 0))) __PYX_ERR(0, 44, __pyx_L1_error)
2424 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_psk_tol), __pyx_ptype_5numpy_ndarray, 1,
"rwork_psk_tol", 0))) __PYX_ERR(0, 45, __pyx_L1_error)
2425 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_density_w), __pyx_ptype_5numpy_ndarray, 1,
"rwork_density_w", 0))) __PYX_ERR(0, 46, __pyx_L1_error)
2426 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_density_n), __pyx_ptype_5numpy_ndarray, 1,
"rwork_density_n", 0))) __PYX_ERR(0, 47, __pyx_L1_error)
2427 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_g), __pyx_ptype_5numpy_ndarray, 1,
"g", 0))) __PYX_ERR(0, 48, __pyx_L1_error)
2428 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1,
"x", 0))) __PYX_ERR(0, 49, __pyx_L1_error)
2429 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sw), __pyx_ptype_5numpy_ndarray, 1,
"sw", 0))) __PYX_ERR(0, 50, __pyx_L1_error)
2430 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_psiw), __pyx_ptype_5numpy_ndarray, 1,
"psiw", 0))) __PYX_ERR(0, 51, __pyx_L1_error)
2431 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mw), __pyx_ptype_5numpy_ndarray, 1,
"mw", 0))) __PYX_ERR(0, 52, __pyx_L1_error)
2432 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dmw), __pyx_ptype_5numpy_ndarray, 1,
"dmw", 0))) __PYX_ERR(0, 53, __pyx_L1_error)
2433 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dmw_dpsiw), __pyx_ptype_5numpy_ndarray, 1,
"dmw_dpsiw", 0))) __PYX_ERR(0, 54, __pyx_L1_error)
2434 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mn), __pyx_ptype_5numpy_ndarray, 1,
"mn", 0))) __PYX_ERR(0, 55, __pyx_L1_error)
2435 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dmn), __pyx_ptype_5numpy_ndarray, 1,
"dmn", 0))) __PYX_ERR(0, 56, __pyx_L1_error)
2436 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dmn_dpsiw), __pyx_ptype_5numpy_ndarray, 1,
"dmn_dpsiw", 0))) __PYX_ERR(0, 57, __pyx_L1_error)
2437 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_psin), __pyx_ptype_5numpy_ndarray, 1,
"psin", 0))) __PYX_ERR(0, 58, __pyx_L1_error)
2438 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpsin), __pyx_ptype_5numpy_ndarray, 1,
"dpsin", 0))) __PYX_ERR(0, 59, __pyx_L1_error)
2439 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpsin_dpsiw), __pyx_ptype_5numpy_ndarray, 1,
"dpsin_dpsiw", 0))) __PYX_ERR(0, 60, __pyx_L1_error)
2440 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_phi_psiw), __pyx_ptype_5numpy_ndarray, 1,
"phi_psiw", 0))) __PYX_ERR(0, 61, __pyx_L1_error)
2441 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dphi_psiw_dpsiw), __pyx_ptype_5numpy_ndarray, 1,
"dphi_psiw_dpsiw", 0))) __PYX_ERR(0, 62, __pyx_L1_error)
2442 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_phi_psin), __pyx_ptype_5numpy_ndarray, 1,
"phi_psin", 0))) __PYX_ERR(0, 63, __pyx_L1_error)
2443 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dphi_psin_dpsiw), __pyx_ptype_5numpy_ndarray, 1,
"dphi_psin_dpsiw", 0))) __PYX_ERR(0, 64, __pyx_L1_error)
2444 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dphi_psin_dsw), __pyx_ptype_5numpy_ndarray, 1,
"dphi_psin_dsw", 0))) __PYX_ERR(0, 65, __pyx_L1_error)
2445 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_aw), __pyx_ptype_5numpy_ndarray, 1,
"aw", 0))) __PYX_ERR(0, 66, __pyx_L1_error)
2446 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_daw), __pyx_ptype_5numpy_ndarray, 1,
"daw", 0))) __PYX_ERR(0, 67, __pyx_L1_error)
2447 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_daw_dpsiw), __pyx_ptype_5numpy_ndarray, 1,
"daw_dpsiw", 0))) __PYX_ERR(0, 68, __pyx_L1_error)
2448 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_an), __pyx_ptype_5numpy_ndarray, 1,
"an", 0))) __PYX_ERR(0, 69, __pyx_L1_error)
2449 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dan), __pyx_ptype_5numpy_ndarray, 1,
"dan", 0))) __PYX_ERR(0, 70, __pyx_L1_error)
2450 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dan_dpsiw), __pyx_ptype_5numpy_ndarray, 1,
"dan_dpsiw", 0))) __PYX_ERR(0, 71, __pyx_L1_error)
2451 __pyx_r = __pyx_pf_26cTwophaseDarcyCoefficients_twophaseDarcy_fc_sd_het_matType(__pyx_self, __pyx_v_pskModelFlag, __pyx_v_density_w_flag, __pyx_v_density_n_flag, __pyx_v_rowptr, __pyx_v_colind, __pyx_v_matType, __pyx_v_muw, __pyx_v_mun, __pyx_v_omega, __pyx_v_Kbar, __pyx_v_b, __pyx_v_rwork_psk, __pyx_v_iwork_psk, __pyx_v_rwork_psk_tol, __pyx_v_rwork_density_w, __pyx_v_rwork_density_n, __pyx_v_g, __pyx_v_x, __pyx_v_sw, __pyx_v_psiw, __pyx_v_mw, __pyx_v_dmw, __pyx_v_dmw_dpsiw, __pyx_v_mn, __pyx_v_dmn, __pyx_v_dmn_dpsiw, __pyx_v_psin, __pyx_v_dpsin, __pyx_v_dpsin_dpsiw, __pyx_v_phi_psiw, __pyx_v_dphi_psiw_dpsiw, __pyx_v_phi_psin, __pyx_v_dphi_psin_dpsiw, __pyx_v_dphi_psin_dsw, __pyx_v_aw, __pyx_v_daw, __pyx_v_daw_dpsiw, __pyx_v_an, __pyx_v_dan, __pyx_v_dan_dpsiw);
2458 __Pyx_RefNannyFinishContext();
2462 static PyObject *__pyx_pf_26cTwophaseDarcyCoefficients_twophaseDarcy_fc_sd_het_matType(CYTHON_UNUSED PyObject *__pyx_self,
int __pyx_v_pskModelFlag,
int __pyx_v_density_w_flag,
int __pyx_v_density_n_flag, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_matType,
double __pyx_v_muw,
double __pyx_v_mun, PyArrayObject *__pyx_v_omega, PyArrayObject *__pyx_v_Kbar,
double __pyx_v_b, PyArrayObject *__pyx_v_rwork_psk, PyArrayObject *__pyx_v_iwork_psk, PyArrayObject *__pyx_v_rwork_psk_tol, PyArrayObject *__pyx_v_rwork_density_w, PyArrayObject *__pyx_v_rwork_density_n, PyArrayObject *__pyx_v_g, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_sw, PyArrayObject *__pyx_v_psiw, PyArrayObject *__pyx_v_mw, PyArrayObject *__pyx_v_dmw, PyArrayObject *__pyx_v_dmw_dpsiw, PyArrayObject *__pyx_v_mn, PyArrayObject *__pyx_v_dmn, PyArrayObject *__pyx_v_dmn_dpsiw, PyArrayObject *__pyx_v_psin, PyArrayObject *__pyx_v_dpsin, PyArrayObject *__pyx_v_dpsin_dpsiw, PyArrayObject *__pyx_v_phi_psiw, PyArrayObject *__pyx_v_dphi_psiw_dpsiw, PyArrayObject *__pyx_v_phi_psin, PyArrayObject *__pyx_v_dphi_psin_dpsiw, PyArrayObject *__pyx_v_dphi_psin_dsw, PyArrayObject *__pyx_v_aw, PyArrayObject *__pyx_v_daw, PyArrayObject *__pyx_v_daw_dpsiw, PyArrayObject *__pyx_v_an, PyArrayObject *__pyx_v_dan, PyArrayObject *__pyx_v_dan_dpsiw) {
2463 int __pyx_v_nPointsPerSimplex;
2464 int __pyx_v_nSimplex;
2465 PyObject *__pyx_r = NULL;
2466 __Pyx_RefNannyDeclarations
2467 PyObject *__pyx_t_1 = NULL;
2468 PyObject *__pyx_t_2 = NULL;
2469 PyObject *__pyx_t_3 = NULL;
2471 PyObject *__pyx_t_5 = NULL;
2472 PyObject *__pyx_t_6 = NULL;
2473 PyObject *__pyx_t_7 = NULL;
2474 int __pyx_lineno = 0;
2475 const char *__pyx_filename = NULL;
2476 int __pyx_clineno = 0;
2477 __Pyx_RefNannySetupContext(
"twophaseDarcy_fc_sd_het_matType", 0);
2486 __pyx_v_nPointsPerSimplex = (__pyx_v_sw->dimensions[(__pyx_v_sw->nd - 1)]);
2495 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_sw), __pyx_n_s_size);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 78, __pyx_L1_error)
2496 __Pyx_GOTREF(__pyx_t_1);
2497 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_nPointsPerSimplex);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 78, __pyx_L1_error)
2498 __Pyx_GOTREF(__pyx_t_2);
2499 __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 78, __pyx_L1_error)
2500 __Pyx_GOTREF(__pyx_t_3);
2501 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2502 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2503 __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3);
if (unlikely((__pyx_t_4 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 78, __pyx_L1_error)
2504 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2505 __pyx_v_nSimplex = __pyx_t_4;
2514 #ifndef CYTHON_WITHOUT_ASSERTIONS
2515 if (unlikely(!Py_OptimizeFlag)) {
2516 if (unlikely(!((__pyx_v_density_w_flag == 1) != 0))) {
2517 PyErr_SetNone(PyExc_AssertionError);
2518 __PYX_ERR(0, 81, __pyx_L1_error)
2530 switch (__pyx_v_density_n_flag) {
2540 switch (__pyx_v_pskModelFlag) {
2550 (void)(twophaseDarcy_fc_sd_het_matType<SimplePSK,ExponentialDensity,ExponentialDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_v_g->dimensions[0]), 2, ((
int *)__pyx_v_rowptr->data), ((
int *)__pyx_v_colind->data), ((
int *)__pyx_v_matType->data), __pyx_v_muw, __pyx_v_mun, ((
double *)__pyx_v_omega->data), ((
double *)__pyx_v_Kbar->data), __pyx_v_b, ((
double *)__pyx_v_rwork_psk->data), ((
int *)__pyx_v_iwork_psk->data), ((
double *)__pyx_v_rwork_psk_tol->data), ((
double *)__pyx_v_rwork_density_w->data), ((
double *)__pyx_v_rwork_density_n->data), ((
double *)__pyx_v_g->data), ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_sw->data), ((
double *)__pyx_v_psiw->data), ((
double *)__pyx_v_mw->data), ((
double *)__pyx_v_dmw->data), ((
double *)__pyx_v_dmw_dpsiw->data), ((
double *)__pyx_v_mn->data), ((
double *)__pyx_v_dmn->data), ((
double *)__pyx_v_dmn_dpsiw->data), ((
double *)__pyx_v_psin->data), ((
double *)__pyx_v_dpsin->data), ((
double *)__pyx_v_dpsin_dpsiw->data), ((
double *)__pyx_v_phi_psiw->data), ((
double *)__pyx_v_dphi_psiw_dpsiw->data), ((
double *)__pyx_v_phi_psin->data), ((
double *)__pyx_v_dphi_psin_dpsiw->data), ((
double *)__pyx_v_dphi_psin_dsw->data), ((
double *)__pyx_v_aw->data), ((
double *)__pyx_v_daw->data), ((
double *)__pyx_v_daw_dpsiw->data), ((
double *)__pyx_v_an->data), ((
double *)__pyx_v_dan->data), ((
double *)__pyx_v_dan_dpsiw->data)));
2569 (void)(twophaseDarcy_fc_sd_het_matType<VGM,ExponentialDensity,ExponentialDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_v_g->dimensions[0]), 4, ((
int *)__pyx_v_rowptr->data), ((
int *)__pyx_v_colind->data), ((
int *)__pyx_v_matType->data), __pyx_v_muw, __pyx_v_mun, ((
double *)__pyx_v_omega->data), ((
double *)__pyx_v_Kbar->data), __pyx_v_b, ((
double *)__pyx_v_rwork_psk->data), ((
int *)__pyx_v_iwork_psk->data), ((
double *)__pyx_v_rwork_psk_tol->data), ((
double *)__pyx_v_rwork_density_w->data), ((
double *)__pyx_v_rwork_density_n->data), ((
double *)__pyx_v_g->data), ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_sw->data), ((
double *)__pyx_v_psiw->data), ((
double *)__pyx_v_mw->data), ((
double *)__pyx_v_dmw->data), ((
double *)__pyx_v_dmw_dpsiw->data), ((
double *)__pyx_v_mn->data), ((
double *)__pyx_v_dmn->data), ((
double *)__pyx_v_dmn_dpsiw->data), ((
double *)__pyx_v_psin->data), ((
double *)__pyx_v_dpsin->data), ((
double *)__pyx_v_dpsin_dpsiw->data), ((
double *)__pyx_v_phi_psiw->data), ((
double *)__pyx_v_dphi_psiw_dpsiw->data), ((
double *)__pyx_v_phi_psin->data), ((
double *)__pyx_v_dphi_psin_dpsiw->data), ((
double *)__pyx_v_dphi_psin_dsw->data), ((
double *)__pyx_v_aw->data), ((
double *)__pyx_v_daw->data), ((
double *)__pyx_v_daw_dpsiw->data), ((
double *)__pyx_v_an->data), ((
double *)__pyx_v_dan->data), ((
double *)__pyx_v_dan_dpsiw->data)));
2588 __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_iwork_psk), 1,
long, 1, __Pyx_PyInt_From_long, 0, 0, 1);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 171, __pyx_L1_error)
2589 __Pyx_GOTREF(__pyx_t_3);
2590 __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3);
if (unlikely((__pyx_t_4 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 171, __pyx_L1_error)
2591 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2600 (void)(twophaseDarcy_fc_sd_het_matType<PskSpline,ExponentialDensity,ExponentialDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_v_g->dimensions[0]), __pyx_t_4, ((
int *)__pyx_v_rowptr->data), ((
int *)__pyx_v_colind->data), ((
int *)__pyx_v_matType->data), __pyx_v_muw, __pyx_v_mun, ((
double *)__pyx_v_omega->data), ((
double *)__pyx_v_Kbar->data), __pyx_v_b, ((
double *)__pyx_v_rwork_psk->data), ((
int *)__pyx_v_iwork_psk->data), ((
double *)__pyx_v_rwork_psk_tol->data), ((
double *)__pyx_v_rwork_density_w->data), ((
double *)__pyx_v_rwork_density_n->data), ((
double *)__pyx_v_g->data), ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_sw->data), ((
double *)__pyx_v_psiw->data), ((
double *)__pyx_v_mw->data), ((
double *)__pyx_v_dmw->data), ((
double *)__pyx_v_dmw_dpsiw->data), ((
double *)__pyx_v_mn->data), ((
double *)__pyx_v_dmn->data), ((
double *)__pyx_v_dmn_dpsiw->data), ((
double *)__pyx_v_psin->data), ((
double *)__pyx_v_dpsin->data), ((
double *)__pyx_v_dpsin_dpsiw->data), ((
double *)__pyx_v_phi_psiw->data), ((
double *)__pyx_v_dphi_psiw_dpsiw->data), ((
double *)__pyx_v_phi_psin->data), ((
double *)__pyx_v_dphi_psin_dpsiw->data), ((
double *)__pyx_v_dphi_psin_dsw->data), ((
double *)__pyx_v_aw->data), ((
double *)__pyx_v_daw->data), ((
double *)__pyx_v_daw_dpsiw->data), ((
double *)__pyx_v_an->data), ((
double *)__pyx_v_dan->data), ((
double *)__pyx_v_dan_dpsiw->data)));
2619 (void)(twophaseDarcy_fc_sd_het_matType<SimplePSK,ExponentialDensity,ExponentialDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_v_g->dimensions[0]), 2, ((
int *)__pyx_v_rowptr->data), ((
int *)__pyx_v_colind->data), ((
int *)__pyx_v_matType->data), __pyx_v_muw, __pyx_v_mun, ((
double *)__pyx_v_omega->data), ((
double *)__pyx_v_Kbar->data), __pyx_v_b, ((
double *)__pyx_v_rwork_psk->data), ((
int *)__pyx_v_iwork_psk->data), ((
double *)__pyx_v_rwork_psk_tol->data), ((
double *)__pyx_v_rwork_density_w->data), ((
double *)__pyx_v_rwork_density_n->data), ((
double *)__pyx_v_g->data), ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_sw->data), ((
double *)__pyx_v_psiw->data), ((
double *)__pyx_v_mw->data), ((
double *)__pyx_v_dmw->data), ((
double *)__pyx_v_dmw_dpsiw->data), ((
double *)__pyx_v_mn->data), ((
double *)__pyx_v_dmn->data), ((
double *)__pyx_v_dmn_dpsiw->data), ((
double *)__pyx_v_psin->data), ((
double *)__pyx_v_dpsin->data), ((
double *)__pyx_v_dpsin_dpsiw->data), ((
double *)__pyx_v_phi_psiw->data), ((
double *)__pyx_v_dphi_psiw_dpsiw->data), ((
double *)__pyx_v_phi_psin->data), ((
double *)__pyx_v_dphi_psin_dpsiw->data), ((
double *)__pyx_v_dphi_psin_dsw->data), ((
double *)__pyx_v_aw->data), ((
double *)__pyx_v_daw->data), ((
double *)__pyx_v_daw_dpsiw->data), ((
double *)__pyx_v_an->data), ((
double *)__pyx_v_dan->data), ((
double *)__pyx_v_dan_dpsiw->data)));
2640 switch (__pyx_v_pskModelFlag) {
2650 (void)(twophaseDarcy_fc_sd_het_matType<SimplePSK,ExponentialDensity,IdealGasDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_v_g->dimensions[0]), 2, ((
int *)__pyx_v_rowptr->data), ((
int *)__pyx_v_colind->data), ((
int *)__pyx_v_matType->data), __pyx_v_muw, __pyx_v_mun, ((
double *)__pyx_v_omega->data), ((
double *)__pyx_v_Kbar->data), __pyx_v_b, ((
double *)__pyx_v_rwork_psk->data), ((
int *)__pyx_v_iwork_psk->data), ((
double *)__pyx_v_rwork_psk_tol->data), ((
double *)__pyx_v_rwork_density_w->data), ((
double *)__pyx_v_rwork_density_n->data), ((
double *)__pyx_v_g->data), ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_sw->data), ((
double *)__pyx_v_psiw->data), ((
double *)__pyx_v_mw->data), ((
double *)__pyx_v_dmw->data), ((
double *)__pyx_v_dmw_dpsiw->data), ((
double *)__pyx_v_mn->data), ((
double *)__pyx_v_dmn->data), ((
double *)__pyx_v_dmn_dpsiw->data), ((
double *)__pyx_v_psin->data), ((
double *)__pyx_v_dpsin->data), ((
double *)__pyx_v_dpsin_dpsiw->data), ((
double *)__pyx_v_phi_psiw->data), ((
double *)__pyx_v_dphi_psiw_dpsiw->data), ((
double *)__pyx_v_phi_psin->data), ((
double *)__pyx_v_dphi_psin_dpsiw->data), ((
double *)__pyx_v_dphi_psin_dsw->data), ((
double *)__pyx_v_aw->data), ((
double *)__pyx_v_daw->data), ((
double *)__pyx_v_daw_dpsiw->data), ((
double *)__pyx_v_an->data), ((
double *)__pyx_v_dan->data), ((
double *)__pyx_v_dan_dpsiw->data)));
2669 (void)(twophaseDarcy_fc_sd_het_matType<VGM,ExponentialDensity,IdealGasDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_v_g->dimensions[0]), 4, ((
int *)__pyx_v_rowptr->data), ((
int *)__pyx_v_colind->data), ((
int *)__pyx_v_matType->data), __pyx_v_muw, __pyx_v_mun, ((
double *)__pyx_v_omega->data), ((
double *)__pyx_v_Kbar->data), __pyx_v_b, ((
double *)__pyx_v_rwork_psk->data), ((
int *)__pyx_v_iwork_psk->data), ((
double *)__pyx_v_rwork_psk_tol->data), ((
double *)__pyx_v_rwork_density_w->data), ((
double *)__pyx_v_rwork_density_n->data), ((
double *)__pyx_v_g->data), ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_sw->data), ((
double *)__pyx_v_psiw->data), ((
double *)__pyx_v_mw->data), ((
double *)__pyx_v_dmw->data), ((
double *)__pyx_v_dmw_dpsiw->data), ((
double *)__pyx_v_mn->data), ((
double *)__pyx_v_dmn->data), ((
double *)__pyx_v_dmn_dpsiw->data), ((
double *)__pyx_v_psin->data), ((
double *)__pyx_v_dpsin->data), ((
double *)__pyx_v_dpsin_dpsiw->data), ((
double *)__pyx_v_phi_psiw->data), ((
double *)__pyx_v_dphi_psiw_dpsiw->data), ((
double *)__pyx_v_phi_psin->data), ((
double *)__pyx_v_dphi_psin_dpsiw->data), ((
double *)__pyx_v_dphi_psin_dsw->data), ((
double *)__pyx_v_aw->data), ((
double *)__pyx_v_daw->data), ((
double *)__pyx_v_daw_dpsiw->data), ((
double *)__pyx_v_an->data), ((
double *)__pyx_v_dan->data), ((
double *)__pyx_v_dan_dpsiw->data)));
2688 __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_iwork_psk), 1,
long, 1, __Pyx_PyInt_From_long, 0, 0, 1);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 340, __pyx_L1_error)
2689 __Pyx_GOTREF(__pyx_t_3);
2690 __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3);
if (unlikely((__pyx_t_4 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 340, __pyx_L1_error)
2691 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2700 (void)(twophaseDarcy_fc_sd_het_matType<PskSpline,ExponentialDensity,IdealGasDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_v_g->dimensions[0]), __pyx_t_4, ((
int *)__pyx_v_rowptr->data), ((
int *)__pyx_v_colind->data), ((
int *)__pyx_v_matType->data), __pyx_v_muw, __pyx_v_mun, ((
double *)__pyx_v_omega->data), ((
double *)__pyx_v_Kbar->data), __pyx_v_b, ((
double *)__pyx_v_rwork_psk->data), ((
int *)__pyx_v_iwork_psk->data), ((
double *)__pyx_v_rwork_psk_tol->data), ((
double *)__pyx_v_rwork_density_w->data), ((
double *)__pyx_v_rwork_density_n->data), ((
double *)__pyx_v_g->data), ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_sw->data), ((
double *)__pyx_v_psiw->data), ((
double *)__pyx_v_mw->data), ((
double *)__pyx_v_dmw->data), ((
double *)__pyx_v_dmw_dpsiw->data), ((
double *)__pyx_v_mn->data), ((
double *)__pyx_v_dmn->data), ((
double *)__pyx_v_dmn_dpsiw->data), ((
double *)__pyx_v_psin->data), ((
double *)__pyx_v_dpsin->data), ((
double *)__pyx_v_dpsin_dpsiw->data), ((
double *)__pyx_v_phi_psiw->data), ((
double *)__pyx_v_dphi_psiw_dpsiw->data), ((
double *)__pyx_v_phi_psin->data), ((
double *)__pyx_v_dphi_psin_dpsiw->data), ((
double *)__pyx_v_dphi_psin_dsw->data), ((
double *)__pyx_v_aw->data), ((
double *)__pyx_v_daw->data), ((
double *)__pyx_v_daw_dpsiw->data), ((
double *)__pyx_v_an->data), ((
double *)__pyx_v_dan->data), ((
double *)__pyx_v_dan_dpsiw->data)));
2719 (void)(twophaseDarcy_fc_sd_het_matType<SimplePSK,ExponentialDensity,IdealGasDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_v_g->dimensions[0]), 2, ((
int *)__pyx_v_rowptr->data), ((
int *)__pyx_v_colind->data), ((
int *)__pyx_v_matType->data), __pyx_v_muw, __pyx_v_mun, ((
double *)__pyx_v_omega->data), ((
double *)__pyx_v_Kbar->data), __pyx_v_b, ((
double *)__pyx_v_rwork_psk->data), ((
int *)__pyx_v_iwork_psk->data), ((
double *)__pyx_v_rwork_psk_tol->data), ((
double *)__pyx_v_rwork_density_w->data), ((
double *)__pyx_v_rwork_density_n->data), ((
double *)__pyx_v_g->data), ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_sw->data), ((
double *)__pyx_v_psiw->data), ((
double *)__pyx_v_mw->data), ((
double *)__pyx_v_dmw->data), ((
double *)__pyx_v_dmw_dpsiw->data), ((
double *)__pyx_v_mn->data), ((
double *)__pyx_v_dmn->data), ((
double *)__pyx_v_dmn_dpsiw->data), ((
double *)__pyx_v_psin->data), ((
double *)__pyx_v_dpsin->data), ((
double *)__pyx_v_dpsin_dpsiw->data), ((
double *)__pyx_v_phi_psiw->data), ((
double *)__pyx_v_dphi_psiw_dpsiw->data), ((
double *)__pyx_v_phi_psin->data), ((
double *)__pyx_v_dphi_psin_dpsiw->data), ((
double *)__pyx_v_dphi_psin_dsw->data), ((
double *)__pyx_v_aw->data), ((
double *)__pyx_v_daw->data), ((
double *)__pyx_v_daw_dpsiw->data), ((
double *)__pyx_v_an->data), ((
double *)__pyx_v_dan->data), ((
double *)__pyx_v_dan_dpsiw->data)));
2740 #ifndef CYTHON_WITHOUT_ASSERTIONS
2741 if (unlikely(!Py_OptimizeFlag)) {
2743 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_configuration_density_w_flag_0_a, __pyx_n_s_format);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 421, __pyx_L1_error)
2744 __Pyx_GOTREF(__pyx_t_2);
2745 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_density_w_flag);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 421, __pyx_L1_error)
2746 __Pyx_GOTREF(__pyx_t_1);
2747 __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_density_n_flag);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 421, __pyx_L1_error)
2748 __Pyx_GOTREF(__pyx_t_5);
2751 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
2752 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
2753 if (likely(__pyx_t_6)) {
2754 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_2);
2755 __Pyx_INCREF(__pyx_t_6);
2756 __Pyx_INCREF(
function);
2757 __Pyx_DECREF_SET(__pyx_t_2,
function);
2761 #if CYTHON_FAST_PYCALL
2762 if (PyFunction_Check(__pyx_t_2)) {
2763 PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_1, __pyx_t_5};
2764 __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 421, __pyx_L1_error)
2765 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
2766 __Pyx_GOTREF(__pyx_t_3);
2767 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2768 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2771 #if CYTHON_FAST_PYCCALL
2772 if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
2773 PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_1, __pyx_t_5};
2774 __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 421, __pyx_L1_error)
2775 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
2776 __Pyx_GOTREF(__pyx_t_3);
2777 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2778 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2782 __pyx_t_7 = PyTuple_New(2+__pyx_t_4);
if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 421, __pyx_L1_error)
2783 __Pyx_GOTREF(__pyx_t_7);
2785 __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
2787 __Pyx_GIVEREF(__pyx_t_1);
2788 PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_4, __pyx_t_1);
2789 __Pyx_GIVEREF(__pyx_t_5);
2790 PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_4, __pyx_t_5);
2793 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 421, __pyx_L1_error)
2794 __Pyx_GOTREF(__pyx_t_3);
2795 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
2797 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2798 __pyx_t_2 = PyTuple_Pack(1, __pyx_t_3);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 421, __pyx_L1_error)
2799 __Pyx_GOTREF(__pyx_t_2);
2800 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2801 PyErr_SetObject(PyExc_AssertionError, __pyx_t_2);
2802 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2803 __PYX_ERR(0, 421, __pyx_L1_error)
2819 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2822 __Pyx_XDECREF(__pyx_t_1);
2823 __Pyx_XDECREF(__pyx_t_2);
2824 __Pyx_XDECREF(__pyx_t_3);
2825 __Pyx_XDECREF(__pyx_t_5);
2826 __Pyx_XDECREF(__pyx_t_6);
2827 __Pyx_XDECREF(__pyx_t_7);
2828 __Pyx_AddTraceback(
"cTwophaseDarcyCoefficients.twophaseDarcy_fc_sd_het_matType", __pyx_clineno, __pyx_lineno, __pyx_filename);
2831 __Pyx_XGIVEREF(__pyx_r);
2832 __Pyx_RefNannyFinishContext();
2845 static PyObject *__pyx_pw_26cTwophaseDarcyCoefficients_3twophaseDarcy_fc_sd_het_matType_nonPotentialForm(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
2846 static char __pyx_doc_26cTwophaseDarcyCoefficients_2twophaseDarcy_fc_sd_het_matType_nonPotentialForm[] =
"\"Evaluate the coefficients of the fully coupled formulation of\n (slightly) compressible, two-phase Darcy flow for a heterogeneous\n medium, sparse diffusion rep. for het\n\n ";
2847 static PyMethodDef __pyx_mdef_26cTwophaseDarcyCoefficients_3twophaseDarcy_fc_sd_het_matType_nonPotentialForm = {
"twophaseDarcy_fc_sd_het_matType_nonPotentialForm", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_26cTwophaseDarcyCoefficients_3twophaseDarcy_fc_sd_het_matType_nonPotentialForm, METH_VARARGS|METH_KEYWORDS, __pyx_doc_26cTwophaseDarcyCoefficients_2twophaseDarcy_fc_sd_het_matType_nonPotentialForm};
2848 static PyObject *__pyx_pw_26cTwophaseDarcyCoefficients_3twophaseDarcy_fc_sd_het_matType_nonPotentialForm(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2849 int __pyx_v_pskModelFlag;
2850 int __pyx_v_density_w_flag;
2851 int __pyx_v_density_n_flag;
2852 PyArrayObject *__pyx_v_rowptr = 0;
2853 PyArrayObject *__pyx_v_colind = 0;
2854 PyArrayObject *__pyx_v_matType = 0;
2857 PyArrayObject *__pyx_v_omega = 0;
2858 PyArrayObject *__pyx_v_Kbar = 0;
2860 PyArrayObject *__pyx_v_rwork_psk = 0;
2861 PyArrayObject *__pyx_v_iwork_psk = 0;
2862 PyArrayObject *__pyx_v_rwork_psk_tol = 0;
2863 PyArrayObject *__pyx_v_rwork_density_w = 0;
2864 PyArrayObject *__pyx_v_rwork_density_n = 0;
2865 PyArrayObject *__pyx_v_g = 0;
2866 PyArrayObject *__pyx_v_x = 0;
2867 PyArrayObject *__pyx_v_sw = 0;
2868 PyArrayObject *__pyx_v_psiw = 0;
2869 PyArrayObject *__pyx_v_mw = 0;
2870 PyArrayObject *__pyx_v_dmw = 0;
2871 PyArrayObject *__pyx_v_dmw_dpsiw = 0;
2872 PyArrayObject *__pyx_v_mn = 0;
2873 PyArrayObject *__pyx_v_dmn = 0;
2874 PyArrayObject *__pyx_v_dmn_dpsiw = 0;
2875 PyArrayObject *__pyx_v_psin = 0;
2876 PyArrayObject *__pyx_v_dpsin = 0;
2877 PyArrayObject *__pyx_v_dpsin_dpsiw = 0;
2878 PyArrayObject *__pyx_v_phi_psiw = 0;
2879 PyArrayObject *__pyx_v_dphi_psiw_dpsiw = 0;
2880 PyArrayObject *__pyx_v_phi_psin = 0;
2881 PyArrayObject *__pyx_v_dphi_psin_dpsiw = 0;
2882 PyArrayObject *__pyx_v_dphi_psin_dsw = 0;
2883 PyArrayObject *__pyx_v_fw = 0;
2884 PyArrayObject *__pyx_v_dfw_dsw = 0;
2885 PyArrayObject *__pyx_v_dfw_dpsiw = 0;
2886 PyArrayObject *__pyx_v_fn = 0;
2887 PyArrayObject *__pyx_v_dfn_dsw = 0;
2888 PyArrayObject *__pyx_v_dfn_dpsiw = 0;
2889 PyArrayObject *__pyx_v_aw = 0;
2890 PyArrayObject *__pyx_v_daw = 0;
2891 PyArrayObject *__pyx_v_daw_dpsiw = 0;
2892 PyArrayObject *__pyx_v_an = 0;
2893 PyArrayObject *__pyx_v_dan = 0;
2894 PyArrayObject *__pyx_v_dan_dpsiw = 0;
2895 int __pyx_v_compressibilityFlag;
2896 int __pyx_lineno = 0;
2897 const char *__pyx_filename = NULL;
2898 int __pyx_clineno = 0;
2899 PyObject *__pyx_r = 0;
2900 __Pyx_RefNannyDeclarations
2901 __Pyx_RefNannySetupContext(
"twophaseDarcy_fc_sd_het_matType_nonPotentialForm (wrapper)", 0);
2903 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pskModelFlag,&__pyx_n_s_density_w_flag,&__pyx_n_s_density_n_flag,&__pyx_n_s_rowptr,&__pyx_n_s_colind,&__pyx_n_s_matType,&__pyx_n_s_muw,&__pyx_n_s_mun,&__pyx_n_s_omega,&__pyx_n_s_Kbar,&__pyx_n_s_b,&__pyx_n_s_rwork_psk,&__pyx_n_s_iwork_psk,&__pyx_n_s_rwork_psk_tol,&__pyx_n_s_rwork_density_w,&__pyx_n_s_rwork_density_n,&__pyx_n_s_g,&__pyx_n_s_x,&__pyx_n_s_sw,&__pyx_n_s_psiw,&__pyx_n_s_mw,&__pyx_n_s_dmw,&__pyx_n_s_dmw_dpsiw,&__pyx_n_s_mn,&__pyx_n_s_dmn,&__pyx_n_s_dmn_dpsiw,&__pyx_n_s_psin,&__pyx_n_s_dpsin,&__pyx_n_s_dpsin_dpsiw,&__pyx_n_s_phi_psiw,&__pyx_n_s_dphi_psiw_dpsiw,&__pyx_n_s_phi_psin,&__pyx_n_s_dphi_psin_dpsiw,&__pyx_n_s_dphi_psin_dsw,&__pyx_n_s_fw,&__pyx_n_s_dfw_dsw,&__pyx_n_s_dfw_dpsiw,&__pyx_n_s_fn,&__pyx_n_s_dfn_dsw,&__pyx_n_s_dfn_dpsiw,&__pyx_n_s_aw,&__pyx_n_s_daw,&__pyx_n_s_daw_dpsiw,&__pyx_n_s_an,&__pyx_n_s_dan,&__pyx_n_s_dan_dpsiw,&__pyx_n_s_compressibilityFlag,0};
2904 PyObject* values[47] = {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,0,0,0,0,0,0,0};
2905 if (unlikely(__pyx_kwds)) {
2907 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2909 case 47: values[46] = PyTuple_GET_ITEM(__pyx_args, 46);
2911 case 46: values[45] = PyTuple_GET_ITEM(__pyx_args, 45);
2913 case 45: values[44] = PyTuple_GET_ITEM(__pyx_args, 44);
2915 case 44: values[43] = PyTuple_GET_ITEM(__pyx_args, 43);
2917 case 43: values[42] = PyTuple_GET_ITEM(__pyx_args, 42);
2919 case 42: values[41] = PyTuple_GET_ITEM(__pyx_args, 41);
2921 case 41: values[40] = PyTuple_GET_ITEM(__pyx_args, 40);
2923 case 40: values[39] = PyTuple_GET_ITEM(__pyx_args, 39);
2925 case 39: values[38] = PyTuple_GET_ITEM(__pyx_args, 38);
2927 case 38: values[37] = PyTuple_GET_ITEM(__pyx_args, 37);
2929 case 37: values[36] = PyTuple_GET_ITEM(__pyx_args, 36);
2931 case 36: values[35] = PyTuple_GET_ITEM(__pyx_args, 35);
2933 case 35: values[34] = PyTuple_GET_ITEM(__pyx_args, 34);
2935 case 34: values[33] = PyTuple_GET_ITEM(__pyx_args, 33);
2937 case 33: values[32] = PyTuple_GET_ITEM(__pyx_args, 32);
2939 case 32: values[31] = PyTuple_GET_ITEM(__pyx_args, 31);
2941 case 31: values[30] = PyTuple_GET_ITEM(__pyx_args, 30);
2943 case 30: values[29] = PyTuple_GET_ITEM(__pyx_args, 29);
2945 case 29: values[28] = PyTuple_GET_ITEM(__pyx_args, 28);
2947 case 28: values[27] = PyTuple_GET_ITEM(__pyx_args, 27);
2949 case 27: values[26] = PyTuple_GET_ITEM(__pyx_args, 26);
2951 case 26: values[25] = PyTuple_GET_ITEM(__pyx_args, 25);
2953 case 25: values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
2955 case 24: values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
2957 case 23: values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
2959 case 22: values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
2961 case 21: values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
2963 case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
2965 case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
2967 case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
2969 case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
2971 case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
2973 case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
2975 case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
2977 case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
2979 case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
2981 case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
2983 case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
2985 case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
2987 case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
2989 case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
2991 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
2993 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
2995 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
2997 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2999 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3001 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3004 default:
goto __pyx_L5_argtuple_error;
3006 kw_args = PyDict_Size(__pyx_kwds);
3009 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pskModelFlag)) != 0)) kw_args--;
3010 else goto __pyx_L5_argtuple_error;
3013 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_density_w_flag)) != 0)) kw_args--;
3015 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType_nonPotentialForm", 1, 47, 47, 1); __PYX_ERR(0, 423, __pyx_L3_error)
3019 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_density_n_flag)) != 0)) kw_args--;
3021 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType_nonPotentialForm", 1, 47, 47, 2); __PYX_ERR(0, 423, __pyx_L3_error)
3025 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rowptr)) != 0)) kw_args--;
3027 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType_nonPotentialForm", 1, 47, 47, 3); __PYX_ERR(0, 423, __pyx_L3_error)
3031 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_colind)) != 0)) kw_args--;
3033 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType_nonPotentialForm", 1, 47, 47, 4); __PYX_ERR(0, 423, __pyx_L3_error)
3037 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_matType)) != 0)) kw_args--;
3039 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType_nonPotentialForm", 1, 47, 47, 5); __PYX_ERR(0, 423, __pyx_L3_error)
3043 if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_muw)) != 0)) kw_args--;
3045 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType_nonPotentialForm", 1, 47, 47, 6); __PYX_ERR(0, 423, __pyx_L3_error)
3049 if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mun)) != 0)) kw_args--;
3051 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType_nonPotentialForm", 1, 47, 47, 7); __PYX_ERR(0, 423, __pyx_L3_error)
3055 if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_omega)) != 0)) kw_args--;
3057 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType_nonPotentialForm", 1, 47, 47, 8); __PYX_ERR(0, 423, __pyx_L3_error)
3061 if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Kbar)) != 0)) kw_args--;
3063 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType_nonPotentialForm", 1, 47, 47, 9); __PYX_ERR(0, 423, __pyx_L3_error)
3067 if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--;
3069 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType_nonPotentialForm", 1, 47, 47, 10); __PYX_ERR(0, 423, __pyx_L3_error)
3073 if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork_psk)) != 0)) kw_args--;
3075 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType_nonPotentialForm", 1, 47, 47, 11); __PYX_ERR(0, 423, __pyx_L3_error)
3079 if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iwork_psk)) != 0)) kw_args--;
3081 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType_nonPotentialForm", 1, 47, 47, 12); __PYX_ERR(0, 423, __pyx_L3_error)
3085 if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork_psk_tol)) != 0)) kw_args--;
3087 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType_nonPotentialForm", 1, 47, 47, 13); __PYX_ERR(0, 423, __pyx_L3_error)
3091 if (likely((values[14] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork_density_w)) != 0)) kw_args--;
3093 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType_nonPotentialForm", 1, 47, 47, 14); __PYX_ERR(0, 423, __pyx_L3_error)
3097 if (likely((values[15] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork_density_n)) != 0)) kw_args--;
3099 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType_nonPotentialForm", 1, 47, 47, 15); __PYX_ERR(0, 423, __pyx_L3_error)
3103 if (likely((values[16] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_g)) != 0)) kw_args--;
3105 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType_nonPotentialForm", 1, 47, 47, 16); __PYX_ERR(0, 423, __pyx_L3_error)
3109 if (likely((values[17] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
3111 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType_nonPotentialForm", 1, 47, 47, 17); __PYX_ERR(0, 423, __pyx_L3_error)
3115 if (likely((values[18] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sw)) != 0)) kw_args--;
3117 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType_nonPotentialForm", 1, 47, 47, 18); __PYX_ERR(0, 423, __pyx_L3_error)
3121 if (likely((values[19] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_psiw)) != 0)) kw_args--;
3123 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType_nonPotentialForm", 1, 47, 47, 19); __PYX_ERR(0, 423, __pyx_L3_error)
3127 if (likely((values[20] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mw)) != 0)) kw_args--;
3129 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType_nonPotentialForm", 1, 47, 47, 20); __PYX_ERR(0, 423, __pyx_L3_error)
3133 if (likely((values[21] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dmw)) != 0)) kw_args--;
3135 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType_nonPotentialForm", 1, 47, 47, 21); __PYX_ERR(0, 423, __pyx_L3_error)
3139 if (likely((values[22] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dmw_dpsiw)) != 0)) kw_args--;
3141 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType_nonPotentialForm", 1, 47, 47, 22); __PYX_ERR(0, 423, __pyx_L3_error)
3145 if (likely((values[23] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mn)) != 0)) kw_args--;
3147 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType_nonPotentialForm", 1, 47, 47, 23); __PYX_ERR(0, 423, __pyx_L3_error)
3151 if (likely((values[24] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dmn)) != 0)) kw_args--;
3153 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType_nonPotentialForm", 1, 47, 47, 24); __PYX_ERR(0, 423, __pyx_L3_error)
3157 if (likely((values[25] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dmn_dpsiw)) != 0)) kw_args--;
3159 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType_nonPotentialForm", 1, 47, 47, 25); __PYX_ERR(0, 423, __pyx_L3_error)
3163 if (likely((values[26] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_psin)) != 0)) kw_args--;
3165 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType_nonPotentialForm", 1, 47, 47, 26); __PYX_ERR(0, 423, __pyx_L3_error)
3169 if (likely((values[27] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpsin)) != 0)) kw_args--;
3171 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType_nonPotentialForm", 1, 47, 47, 27); __PYX_ERR(0, 423, __pyx_L3_error)
3175 if (likely((values[28] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpsin_dpsiw)) != 0)) kw_args--;
3177 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType_nonPotentialForm", 1, 47, 47, 28); __PYX_ERR(0, 423, __pyx_L3_error)
3181 if (likely((values[29] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_phi_psiw)) != 0)) kw_args--;
3183 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType_nonPotentialForm", 1, 47, 47, 29); __PYX_ERR(0, 423, __pyx_L3_error)
3187 if (likely((values[30] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dphi_psiw_dpsiw)) != 0)) kw_args--;
3189 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType_nonPotentialForm", 1, 47, 47, 30); __PYX_ERR(0, 423, __pyx_L3_error)
3193 if (likely((values[31] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_phi_psin)) != 0)) kw_args--;
3195 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType_nonPotentialForm", 1, 47, 47, 31); __PYX_ERR(0, 423, __pyx_L3_error)
3199 if (likely((values[32] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dphi_psin_dpsiw)) != 0)) kw_args--;
3201 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType_nonPotentialForm", 1, 47, 47, 32); __PYX_ERR(0, 423, __pyx_L3_error)
3205 if (likely((values[33] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dphi_psin_dsw)) != 0)) kw_args--;
3207 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType_nonPotentialForm", 1, 47, 47, 33); __PYX_ERR(0, 423, __pyx_L3_error)
3211 if (likely((values[34] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fw)) != 0)) kw_args--;
3213 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType_nonPotentialForm", 1, 47, 47, 34); __PYX_ERR(0, 423, __pyx_L3_error)
3217 if (likely((values[35] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dfw_dsw)) != 0)) kw_args--;
3219 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType_nonPotentialForm", 1, 47, 47, 35); __PYX_ERR(0, 423, __pyx_L3_error)
3223 if (likely((values[36] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dfw_dpsiw)) != 0)) kw_args--;
3225 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType_nonPotentialForm", 1, 47, 47, 36); __PYX_ERR(0, 423, __pyx_L3_error)
3229 if (likely((values[37] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fn)) != 0)) kw_args--;
3231 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType_nonPotentialForm", 1, 47, 47, 37); __PYX_ERR(0, 423, __pyx_L3_error)
3235 if (likely((values[38] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dfn_dsw)) != 0)) kw_args--;
3237 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType_nonPotentialForm", 1, 47, 47, 38); __PYX_ERR(0, 423, __pyx_L3_error)
3241 if (likely((values[39] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dfn_dpsiw)) != 0)) kw_args--;
3243 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType_nonPotentialForm", 1, 47, 47, 39); __PYX_ERR(0, 423, __pyx_L3_error)
3247 if (likely((values[40] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_aw)) != 0)) kw_args--;
3249 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType_nonPotentialForm", 1, 47, 47, 40); __PYX_ERR(0, 423, __pyx_L3_error)
3253 if (likely((values[41] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_daw)) != 0)) kw_args--;
3255 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType_nonPotentialForm", 1, 47, 47, 41); __PYX_ERR(0, 423, __pyx_L3_error)
3259 if (likely((values[42] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_daw_dpsiw)) != 0)) kw_args--;
3261 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType_nonPotentialForm", 1, 47, 47, 42); __PYX_ERR(0, 423, __pyx_L3_error)
3265 if (likely((values[43] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_an)) != 0)) kw_args--;
3267 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType_nonPotentialForm", 1, 47, 47, 43); __PYX_ERR(0, 423, __pyx_L3_error)
3271 if (likely((values[44] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dan)) != 0)) kw_args--;
3273 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType_nonPotentialForm", 1, 47, 47, 44); __PYX_ERR(0, 423, __pyx_L3_error)
3277 if (likely((values[45] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dan_dpsiw)) != 0)) kw_args--;
3279 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType_nonPotentialForm", 1, 47, 47, 45); __PYX_ERR(0, 423, __pyx_L3_error)
3283 if (likely((values[46] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_compressibilityFlag)) != 0)) kw_args--;
3285 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType_nonPotentialForm", 1, 47, 47, 46); __PYX_ERR(0, 423, __pyx_L3_error)
3288 if (unlikely(kw_args > 0)) {
3289 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"twophaseDarcy_fc_sd_het_matType_nonPotentialForm") < 0)) __PYX_ERR(0, 423, __pyx_L3_error)
3291 }
else if (PyTuple_GET_SIZE(__pyx_args) != 47) {
3292 goto __pyx_L5_argtuple_error;
3294 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3295 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3296 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3297 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3298 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
3299 values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
3300 values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
3301 values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
3302 values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
3303 values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
3304 values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
3305 values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
3306 values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
3307 values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
3308 values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
3309 values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
3310 values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
3311 values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
3312 values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
3313 values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
3314 values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
3315 values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
3316 values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
3317 values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
3318 values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
3319 values[25] = PyTuple_GET_ITEM(__pyx_args, 25);
3320 values[26] = PyTuple_GET_ITEM(__pyx_args, 26);
3321 values[27] = PyTuple_GET_ITEM(__pyx_args, 27);
3322 values[28] = PyTuple_GET_ITEM(__pyx_args, 28);
3323 values[29] = PyTuple_GET_ITEM(__pyx_args, 29);
3324 values[30] = PyTuple_GET_ITEM(__pyx_args, 30);
3325 values[31] = PyTuple_GET_ITEM(__pyx_args, 31);
3326 values[32] = PyTuple_GET_ITEM(__pyx_args, 32);
3327 values[33] = PyTuple_GET_ITEM(__pyx_args, 33);
3328 values[34] = PyTuple_GET_ITEM(__pyx_args, 34);
3329 values[35] = PyTuple_GET_ITEM(__pyx_args, 35);
3330 values[36] = PyTuple_GET_ITEM(__pyx_args, 36);
3331 values[37] = PyTuple_GET_ITEM(__pyx_args, 37);
3332 values[38] = PyTuple_GET_ITEM(__pyx_args, 38);
3333 values[39] = PyTuple_GET_ITEM(__pyx_args, 39);
3334 values[40] = PyTuple_GET_ITEM(__pyx_args, 40);
3335 values[41] = PyTuple_GET_ITEM(__pyx_args, 41);
3336 values[42] = PyTuple_GET_ITEM(__pyx_args, 42);
3337 values[43] = PyTuple_GET_ITEM(__pyx_args, 43);
3338 values[44] = PyTuple_GET_ITEM(__pyx_args, 44);
3339 values[45] = PyTuple_GET_ITEM(__pyx_args, 45);
3340 values[46] = PyTuple_GET_ITEM(__pyx_args, 46);
3342 __pyx_v_pskModelFlag = __Pyx_PyInt_As_int(values[0]);
if (unlikely((__pyx_v_pskModelFlag == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 423, __pyx_L3_error)
3343 __pyx_v_density_w_flag = __Pyx_PyInt_As_int(values[1]);
if (unlikely((__pyx_v_density_w_flag == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 424, __pyx_L3_error)
3344 __pyx_v_density_n_flag = __Pyx_PyInt_As_int(values[2]);
if (unlikely((__pyx_v_density_n_flag == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 425, __pyx_L3_error)
3345 __pyx_v_rowptr = ((PyArrayObject *)values[3]);
3346 __pyx_v_colind = ((PyArrayObject *)values[4]);
3347 __pyx_v_matType = ((PyArrayObject *)values[5]);
3348 __pyx_v_muw = __pyx_PyFloat_AsDouble(values[6]);
if (unlikely((__pyx_v_muw == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 429, __pyx_L3_error)
3349 __pyx_v_mun = __pyx_PyFloat_AsDouble(values[7]);
if (unlikely((__pyx_v_mun == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 430, __pyx_L3_error)
3350 __pyx_v_omega = ((PyArrayObject *)values[8]);
3351 __pyx_v_Kbar = ((PyArrayObject *)values[9]);
3352 __pyx_v_b = __pyx_PyFloat_AsDouble(values[10]);
if (unlikely((__pyx_v_b == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 433, __pyx_L3_error)
3353 __pyx_v_rwork_psk = ((PyArrayObject *)values[11]);
3354 __pyx_v_iwork_psk = ((PyArrayObject *)values[12]);
3355 __pyx_v_rwork_psk_tol = ((PyArrayObject *)values[13]);
3356 __pyx_v_rwork_density_w = ((PyArrayObject *)values[14]);
3357 __pyx_v_rwork_density_n = ((PyArrayObject *)values[15]);
3358 __pyx_v_g = ((PyArrayObject *)values[16]);
3359 __pyx_v_x = ((PyArrayObject *)values[17]);
3360 __pyx_v_sw = ((PyArrayObject *)values[18]);
3361 __pyx_v_psiw = ((PyArrayObject *)values[19]);
3362 __pyx_v_mw = ((PyArrayObject *)values[20]);
3363 __pyx_v_dmw = ((PyArrayObject *)values[21]);
3364 __pyx_v_dmw_dpsiw = ((PyArrayObject *)values[22]);
3365 __pyx_v_mn = ((PyArrayObject *)values[23]);
3366 __pyx_v_dmn = ((PyArrayObject *)values[24]);
3367 __pyx_v_dmn_dpsiw = ((PyArrayObject *)values[25]);
3368 __pyx_v_psin = ((PyArrayObject *)values[26]);
3369 __pyx_v_dpsin = ((PyArrayObject *)values[27]);
3370 __pyx_v_dpsin_dpsiw = ((PyArrayObject *)values[28]);
3371 __pyx_v_phi_psiw = ((PyArrayObject *)values[29]);
3372 __pyx_v_dphi_psiw_dpsiw = ((PyArrayObject *)values[30]);
3373 __pyx_v_phi_psin = ((PyArrayObject *)values[31]);
3374 __pyx_v_dphi_psin_dpsiw = ((PyArrayObject *)values[32]);
3375 __pyx_v_dphi_psin_dsw = ((PyArrayObject *)values[33]);
3376 __pyx_v_fw = ((PyArrayObject *)values[34]);
3377 __pyx_v_dfw_dsw = ((PyArrayObject *)values[35]);
3378 __pyx_v_dfw_dpsiw = ((PyArrayObject *)values[36]);
3379 __pyx_v_fn = ((PyArrayObject *)values[37]);
3380 __pyx_v_dfn_dsw = ((PyArrayObject *)values[38]);
3381 __pyx_v_dfn_dpsiw = ((PyArrayObject *)values[39]);
3382 __pyx_v_aw = ((PyArrayObject *)values[40]);
3383 __pyx_v_daw = ((PyArrayObject *)values[41]);
3384 __pyx_v_daw_dpsiw = ((PyArrayObject *)values[42]);
3385 __pyx_v_an = ((PyArrayObject *)values[43]);
3386 __pyx_v_dan = ((PyArrayObject *)values[44]);
3387 __pyx_v_dan_dpsiw = ((PyArrayObject *)values[45]);
3388 __pyx_v_compressibilityFlag = __Pyx_PyInt_As_int(values[46]);
if (unlikely((__pyx_v_compressibilityFlag == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 469, __pyx_L3_error)
3390 goto __pyx_L4_argument_unpacking_done;
3391 __pyx_L5_argtuple_error:;
3392 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_sd_het_matType_nonPotentialForm", 1, 47, 47, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 423, __pyx_L3_error)
3394 __Pyx_AddTraceback(
"cTwophaseDarcyCoefficients.twophaseDarcy_fc_sd_het_matType_nonPotentialForm", __pyx_clineno, __pyx_lineno, __pyx_filename);
3395 __Pyx_RefNannyFinishContext();
3397 __pyx_L4_argument_unpacking_done:;
3398 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rowptr), __pyx_ptype_5numpy_ndarray, 1,
"rowptr", 0))) __PYX_ERR(0, 426, __pyx_L1_error)
3399 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_colind), __pyx_ptype_5numpy_ndarray, 1,
"colind", 0))) __PYX_ERR(0, 427, __pyx_L1_error)
3400 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_matType), __pyx_ptype_5numpy_ndarray, 1,
"matType", 0))) __PYX_ERR(0, 428, __pyx_L1_error)
3401 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_omega), __pyx_ptype_5numpy_ndarray, 1,
"omega", 0))) __PYX_ERR(0, 431, __pyx_L1_error)
3402 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Kbar), __pyx_ptype_5numpy_ndarray, 1,
"Kbar", 0))) __PYX_ERR(0, 432, __pyx_L1_error)
3403 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_psk), __pyx_ptype_5numpy_ndarray, 1,
"rwork_psk", 0))) __PYX_ERR(0, 434, __pyx_L1_error)
3404 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork_psk), __pyx_ptype_5numpy_ndarray, 1,
"iwork_psk", 0))) __PYX_ERR(0, 435, __pyx_L1_error)
3405 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_psk_tol), __pyx_ptype_5numpy_ndarray, 1,
"rwork_psk_tol", 0))) __PYX_ERR(0, 436, __pyx_L1_error)
3406 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_density_w), __pyx_ptype_5numpy_ndarray, 1,
"rwork_density_w", 0))) __PYX_ERR(0, 437, __pyx_L1_error)
3407 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_density_n), __pyx_ptype_5numpy_ndarray, 1,
"rwork_density_n", 0))) __PYX_ERR(0, 438, __pyx_L1_error)
3408 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_g), __pyx_ptype_5numpy_ndarray, 1,
"g", 0))) __PYX_ERR(0, 439, __pyx_L1_error)
3409 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1,
"x", 0))) __PYX_ERR(0, 440, __pyx_L1_error)
3410 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sw), __pyx_ptype_5numpy_ndarray, 1,
"sw", 0))) __PYX_ERR(0, 441, __pyx_L1_error)
3411 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_psiw), __pyx_ptype_5numpy_ndarray, 1,
"psiw", 0))) __PYX_ERR(0, 442, __pyx_L1_error)
3412 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mw), __pyx_ptype_5numpy_ndarray, 1,
"mw", 0))) __PYX_ERR(0, 443, __pyx_L1_error)
3413 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dmw), __pyx_ptype_5numpy_ndarray, 1,
"dmw", 0))) __PYX_ERR(0, 444, __pyx_L1_error)
3414 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dmw_dpsiw), __pyx_ptype_5numpy_ndarray, 1,
"dmw_dpsiw", 0))) __PYX_ERR(0, 445, __pyx_L1_error)
3415 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mn), __pyx_ptype_5numpy_ndarray, 1,
"mn", 0))) __PYX_ERR(0, 446, __pyx_L1_error)
3416 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dmn), __pyx_ptype_5numpy_ndarray, 1,
"dmn", 0))) __PYX_ERR(0, 447, __pyx_L1_error)
3417 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dmn_dpsiw), __pyx_ptype_5numpy_ndarray, 1,
"dmn_dpsiw", 0))) __PYX_ERR(0, 448, __pyx_L1_error)
3418 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_psin), __pyx_ptype_5numpy_ndarray, 1,
"psin", 0))) __PYX_ERR(0, 449, __pyx_L1_error)
3419 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpsin), __pyx_ptype_5numpy_ndarray, 1,
"dpsin", 0))) __PYX_ERR(0, 450, __pyx_L1_error)
3420 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpsin_dpsiw), __pyx_ptype_5numpy_ndarray, 1,
"dpsin_dpsiw", 0))) __PYX_ERR(0, 451, __pyx_L1_error)
3421 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_phi_psiw), __pyx_ptype_5numpy_ndarray, 1,
"phi_psiw", 0))) __PYX_ERR(0, 452, __pyx_L1_error)
3422 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dphi_psiw_dpsiw), __pyx_ptype_5numpy_ndarray, 1,
"dphi_psiw_dpsiw", 0))) __PYX_ERR(0, 453, __pyx_L1_error)
3423 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_phi_psin), __pyx_ptype_5numpy_ndarray, 1,
"phi_psin", 0))) __PYX_ERR(0, 454, __pyx_L1_error)
3424 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dphi_psin_dpsiw), __pyx_ptype_5numpy_ndarray, 1,
"dphi_psin_dpsiw", 0))) __PYX_ERR(0, 455, __pyx_L1_error)
3425 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dphi_psin_dsw), __pyx_ptype_5numpy_ndarray, 1,
"dphi_psin_dsw", 0))) __PYX_ERR(0, 456, __pyx_L1_error)
3426 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fw), __pyx_ptype_5numpy_ndarray, 1,
"fw", 0))) __PYX_ERR(0, 457, __pyx_L1_error)
3427 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dfw_dsw), __pyx_ptype_5numpy_ndarray, 1,
"dfw_dsw", 0))) __PYX_ERR(0, 458, __pyx_L1_error)
3428 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dfw_dpsiw), __pyx_ptype_5numpy_ndarray, 1,
"dfw_dpsiw", 0))) __PYX_ERR(0, 459, __pyx_L1_error)
3429 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fn), __pyx_ptype_5numpy_ndarray, 1,
"fn", 0))) __PYX_ERR(0, 460, __pyx_L1_error)
3430 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dfn_dsw), __pyx_ptype_5numpy_ndarray, 1,
"dfn_dsw", 0))) __PYX_ERR(0, 461, __pyx_L1_error)
3431 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dfn_dpsiw), __pyx_ptype_5numpy_ndarray, 1,
"dfn_dpsiw", 0))) __PYX_ERR(0, 462, __pyx_L1_error)
3432 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_aw), __pyx_ptype_5numpy_ndarray, 1,
"aw", 0))) __PYX_ERR(0, 463, __pyx_L1_error)
3433 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_daw), __pyx_ptype_5numpy_ndarray, 1,
"daw", 0))) __PYX_ERR(0, 464, __pyx_L1_error)
3434 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_daw_dpsiw), __pyx_ptype_5numpy_ndarray, 1,
"daw_dpsiw", 0))) __PYX_ERR(0, 465, __pyx_L1_error)
3435 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_an), __pyx_ptype_5numpy_ndarray, 1,
"an", 0))) __PYX_ERR(0, 466, __pyx_L1_error)
3436 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dan), __pyx_ptype_5numpy_ndarray, 1,
"dan", 0))) __PYX_ERR(0, 467, __pyx_L1_error)
3437 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dan_dpsiw), __pyx_ptype_5numpy_ndarray, 1,
"dan_dpsiw", 0))) __PYX_ERR(0, 468, __pyx_L1_error)
3438 __pyx_r = __pyx_pf_26cTwophaseDarcyCoefficients_2twophaseDarcy_fc_sd_het_matType_nonPotentialForm(__pyx_self, __pyx_v_pskModelFlag, __pyx_v_density_w_flag, __pyx_v_density_n_flag, __pyx_v_rowptr, __pyx_v_colind, __pyx_v_matType, __pyx_v_muw, __pyx_v_mun, __pyx_v_omega, __pyx_v_Kbar, __pyx_v_b, __pyx_v_rwork_psk, __pyx_v_iwork_psk, __pyx_v_rwork_psk_tol, __pyx_v_rwork_density_w, __pyx_v_rwork_density_n, __pyx_v_g, __pyx_v_x, __pyx_v_sw, __pyx_v_psiw, __pyx_v_mw, __pyx_v_dmw, __pyx_v_dmw_dpsiw, __pyx_v_mn, __pyx_v_dmn, __pyx_v_dmn_dpsiw, __pyx_v_psin, __pyx_v_dpsin, __pyx_v_dpsin_dpsiw, __pyx_v_phi_psiw, __pyx_v_dphi_psiw_dpsiw, __pyx_v_phi_psin, __pyx_v_dphi_psin_dpsiw, __pyx_v_dphi_psin_dsw, __pyx_v_fw, __pyx_v_dfw_dsw, __pyx_v_dfw_dpsiw, __pyx_v_fn, __pyx_v_dfn_dsw, __pyx_v_dfn_dpsiw, __pyx_v_aw, __pyx_v_daw, __pyx_v_daw_dpsiw, __pyx_v_an, __pyx_v_dan, __pyx_v_dan_dpsiw, __pyx_v_compressibilityFlag);
3445 __Pyx_RefNannyFinishContext();
3449 static PyObject *__pyx_pf_26cTwophaseDarcyCoefficients_2twophaseDarcy_fc_sd_het_matType_nonPotentialForm(CYTHON_UNUSED PyObject *__pyx_self,
int __pyx_v_pskModelFlag,
int __pyx_v_density_w_flag,
int __pyx_v_density_n_flag, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_matType,
double __pyx_v_muw,
double __pyx_v_mun, PyArrayObject *__pyx_v_omega, PyArrayObject *__pyx_v_Kbar,
double __pyx_v_b, PyArrayObject *__pyx_v_rwork_psk, PyArrayObject *__pyx_v_iwork_psk, PyArrayObject *__pyx_v_rwork_psk_tol, PyArrayObject *__pyx_v_rwork_density_w, PyArrayObject *__pyx_v_rwork_density_n, PyArrayObject *__pyx_v_g, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_sw, PyArrayObject *__pyx_v_psiw, PyArrayObject *__pyx_v_mw, PyArrayObject *__pyx_v_dmw, PyArrayObject *__pyx_v_dmw_dpsiw, PyArrayObject *__pyx_v_mn, PyArrayObject *__pyx_v_dmn, PyArrayObject *__pyx_v_dmn_dpsiw, PyArrayObject *__pyx_v_psin, PyArrayObject *__pyx_v_dpsin, PyArrayObject *__pyx_v_dpsin_dpsiw, PyArrayObject *__pyx_v_phi_psiw, PyArrayObject *__pyx_v_dphi_psiw_dpsiw, PyArrayObject *__pyx_v_phi_psin, PyArrayObject *__pyx_v_dphi_psin_dpsiw, PyArrayObject *__pyx_v_dphi_psin_dsw, PyArrayObject *__pyx_v_fw, PyArrayObject *__pyx_v_dfw_dsw, PyArrayObject *__pyx_v_dfw_dpsiw, PyArrayObject *__pyx_v_fn, PyArrayObject *__pyx_v_dfn_dsw, PyArrayObject *__pyx_v_dfn_dpsiw, PyArrayObject *__pyx_v_aw, PyArrayObject *__pyx_v_daw, PyArrayObject *__pyx_v_daw_dpsiw, PyArrayObject *__pyx_v_an, PyArrayObject *__pyx_v_dan, PyArrayObject *__pyx_v_dan_dpsiw,
int __pyx_v_compressibilityFlag) {
3450 int __pyx_v_nPointsPerSimplex;
3451 int __pyx_v_nSimplex;
3452 PyObject *__pyx_r = NULL;
3453 __Pyx_RefNannyDeclarations
3454 PyObject *__pyx_t_1 = NULL;
3455 PyObject *__pyx_t_2 = NULL;
3456 PyObject *__pyx_t_3 = NULL;
3459 PyObject *__pyx_t_6 = NULL;
3460 PyObject *__pyx_t_7 = NULL;
3461 PyObject *__pyx_t_8 = NULL;
3462 int __pyx_lineno = 0;
3463 const char *__pyx_filename = NULL;
3464 int __pyx_clineno = 0;
3465 __Pyx_RefNannySetupContext(
"twophaseDarcy_fc_sd_het_matType_nonPotentialForm", 0);
3474 __pyx_v_nPointsPerSimplex = (__pyx_v_sw->dimensions[(__pyx_v_sw->nd - 1)]);
3483 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_sw), __pyx_n_s_size);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 476, __pyx_L1_error)
3484 __Pyx_GOTREF(__pyx_t_1);
3485 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_nPointsPerSimplex);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 476, __pyx_L1_error)
3486 __Pyx_GOTREF(__pyx_t_2);
3487 __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 476, __pyx_L1_error)
3488 __Pyx_GOTREF(__pyx_t_3);
3489 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3490 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3491 __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3);
if (unlikely((__pyx_t_4 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 476, __pyx_L1_error)
3492 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3493 __pyx_v_nSimplex = __pyx_t_4;
3502 #ifndef CYTHON_WITHOUT_ASSERTIONS
3503 if (unlikely(!Py_OptimizeFlag)) {
3504 if (unlikely(!((__pyx_v_density_w_flag == 1) != 0))) {
3505 PyErr_SetNone(PyExc_AssertionError);
3506 __PYX_ERR(0, 477, __pyx_L1_error)
3518 switch (__pyx_v_density_n_flag) {
3528 switch (__pyx_v_pskModelFlag) {
3538 (void)(twophaseDarcy_fc_sd_het_matType_nonPotentialForm<SimplePSK,ExponentialDensity,ExponentialDensity>(__pyx_v_compressibilityFlag, __pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_v_g->dimensions[0]), 2, ((
int *)__pyx_v_rowptr->data), ((
int *)__pyx_v_colind->data), ((
int *)__pyx_v_matType->data), __pyx_v_muw, __pyx_v_mun, ((
double *)__pyx_v_omega->data), ((
double *)__pyx_v_Kbar->data), __pyx_v_b, ((
double *)__pyx_v_rwork_psk->data), ((
int *)__pyx_v_iwork_psk->data), ((
double *)__pyx_v_rwork_psk_tol->data), ((
double *)__pyx_v_rwork_density_w->data), ((
double *)__pyx_v_rwork_density_n->data), ((
double *)__pyx_v_g->data), ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_sw->data), ((
double *)__pyx_v_psiw->data), ((
double *)__pyx_v_mw->data), ((
double *)__pyx_v_dmw->data), ((
double *)__pyx_v_dmw_dpsiw->data), ((
double *)__pyx_v_mn->data), ((
double *)__pyx_v_dmn->data), ((
double *)__pyx_v_dmn_dpsiw->data), ((
double *)__pyx_v_psin->data), ((
double *)__pyx_v_dpsin->data), ((
double *)__pyx_v_dpsin_dpsiw->data), ((
double *)__pyx_v_phi_psiw->data), ((
double *)__pyx_v_dphi_psiw_dpsiw->data), ((
double *)__pyx_v_phi_psin->data), ((
double *)__pyx_v_dphi_psin_dpsiw->data), ((
double *)__pyx_v_dphi_psin_dsw->data), ((
double *)__pyx_v_fw->data), ((
double *)__pyx_v_dfw_dsw->data), ((
double *)__pyx_v_dfw_dpsiw->data), ((
double *)__pyx_v_fn->data), ((
double *)__pyx_v_dfn_dsw->data), ((
double *)__pyx_v_dfn_dpsiw->data), ((
double *)__pyx_v_aw->data), ((
double *)__pyx_v_daw->data), ((
double *)__pyx_v_daw_dpsiw->data), ((
double *)__pyx_v_an->data), ((
double *)__pyx_v_dan->data), ((
double *)__pyx_v_dan_dpsiw->data)));
3557 (void)(twophaseDarcy_fc_sd_het_matType_nonPotentialForm<VGM,ExponentialDensity,ExponentialDensity>(__pyx_v_compressibilityFlag, __pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_v_g->dimensions[0]), 4, ((
int *)__pyx_v_rowptr->data), ((
int *)__pyx_v_colind->data), ((
int *)__pyx_v_matType->data), __pyx_v_muw, __pyx_v_mun, ((
double *)__pyx_v_omega->data), ((
double *)__pyx_v_Kbar->data), __pyx_v_b, ((
double *)__pyx_v_rwork_psk->data), ((
int *)__pyx_v_iwork_psk->data), ((
double *)__pyx_v_rwork_psk_tol->data), ((
double *)__pyx_v_rwork_density_w->data), ((
double *)__pyx_v_rwork_density_n->data), ((
double *)__pyx_v_g->data), ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_sw->data), ((
double *)__pyx_v_psiw->data), ((
double *)__pyx_v_mw->data), ((
double *)__pyx_v_dmw->data), ((
double *)__pyx_v_dmw_dpsiw->data), ((
double *)__pyx_v_mn->data), ((
double *)__pyx_v_dmn->data), ((
double *)__pyx_v_dmn_dpsiw->data), ((
double *)__pyx_v_psin->data), ((
double *)__pyx_v_dpsin->data), ((
double *)__pyx_v_dpsin_dpsiw->data), ((
double *)__pyx_v_phi_psiw->data), ((
double *)__pyx_v_dphi_psiw_dpsiw->data), ((
double *)__pyx_v_phi_psin->data), ((
double *)__pyx_v_dphi_psin_dpsiw->data), ((
double *)__pyx_v_dphi_psin_dsw->data), ((
double *)__pyx_v_fw->data), ((
double *)__pyx_v_dfw_dsw->data), ((
double *)__pyx_v_dfw_dpsiw->data), ((
double *)__pyx_v_fn->data), ((
double *)__pyx_v_dfn_dsw->data), ((
double *)__pyx_v_dfn_dpsiw->data), ((
double *)__pyx_v_aw->data), ((
double *)__pyx_v_daw->data), ((
double *)__pyx_v_daw_dpsiw->data), ((
double *)__pyx_v_an->data), ((
double *)__pyx_v_dan->data), ((
double *)__pyx_v_dan_dpsiw->data)));
3576 (void)(twophaseDarcy_fc_sd_het_matType_nonPotentialForm<SimplePSK,ExponentialDensity,ExponentialDensity>(__pyx_v_compressibilityFlag, __pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_v_g->dimensions[0]), 2, ((
int *)__pyx_v_rowptr->data), ((
int *)__pyx_v_colind->data), ((
int *)__pyx_v_matType->data), __pyx_v_muw, __pyx_v_mun, ((
double *)__pyx_v_omega->data), ((
double *)__pyx_v_Kbar->data), __pyx_v_b, ((
double *)__pyx_v_rwork_psk->data), ((
int *)__pyx_v_iwork_psk->data), ((
double *)__pyx_v_rwork_psk_tol->data), ((
double *)__pyx_v_rwork_density_w->data), ((
double *)__pyx_v_rwork_density_n->data), ((
double *)__pyx_v_g->data), ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_sw->data), ((
double *)__pyx_v_psiw->data), ((
double *)__pyx_v_mw->data), ((
double *)__pyx_v_dmw->data), ((
double *)__pyx_v_dmw_dpsiw->data), ((
double *)__pyx_v_mn->data), ((
double *)__pyx_v_dmn->data), ((
double *)__pyx_v_dmn_dpsiw->data), ((
double *)__pyx_v_psin->data), ((
double *)__pyx_v_dpsin->data), ((
double *)__pyx_v_dpsin_dpsiw->data), ((
double *)__pyx_v_phi_psiw->data), ((
double *)__pyx_v_dphi_psiw_dpsiw->data), ((
double *)__pyx_v_phi_psin->data), ((
double *)__pyx_v_dphi_psin_dpsiw->data), ((
double *)__pyx_v_dphi_psin_dsw->data), ((
double *)__pyx_v_fw->data), ((
double *)__pyx_v_dfw_dsw->data), ((
double *)__pyx_v_dfw_dpsiw->data), ((
double *)__pyx_v_fn->data), ((
double *)__pyx_v_dfn_dsw->data), ((
double *)__pyx_v_dfn_dpsiw->data), ((
double *)__pyx_v_aw->data), ((
double *)__pyx_v_daw->data), ((
double *)__pyx_v_daw_dpsiw->data), ((
double *)__pyx_v_an->data), ((
double *)__pyx_v_dan->data), ((
double *)__pyx_v_dan_dpsiw->data)));
3597 __pyx_t_5 = ((__pyx_v_pskModelFlag == 1) != 0);
3607 (void)(twophaseDarcy_fc_sd_het_matType_nonPotentialForm<VGM,ExponentialDensity,IdealGasDensity>(__pyx_v_compressibilityFlag, __pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_v_g->dimensions[0]), 4, ((
int *)__pyx_v_rowptr->data), ((
int *)__pyx_v_colind->data), ((
int *)__pyx_v_matType->data), __pyx_v_muw, __pyx_v_mun, ((
double *)__pyx_v_omega->data), ((
double *)__pyx_v_Kbar->data), __pyx_v_b, ((
double *)__pyx_v_rwork_psk->data), ((
int *)__pyx_v_iwork_psk->data), ((
double *)__pyx_v_rwork_psk_tol->data), ((
double *)__pyx_v_rwork_density_w->data), ((
double *)__pyx_v_rwork_density_n->data), ((
double *)__pyx_v_g->data), ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_sw->data), ((
double *)__pyx_v_psiw->data), ((
double *)__pyx_v_mw->data), ((
double *)__pyx_v_dmw->data), ((
double *)__pyx_v_dmw_dpsiw->data), ((
double *)__pyx_v_mn->data), ((
double *)__pyx_v_dmn->data), ((
double *)__pyx_v_dmn_dpsiw->data), ((
double *)__pyx_v_psin->data), ((
double *)__pyx_v_dpsin->data), ((
double *)__pyx_v_dpsin_dpsiw->data), ((
double *)__pyx_v_phi_psiw->data), ((
double *)__pyx_v_dphi_psiw_dpsiw->data), ((
double *)__pyx_v_phi_psin->data), ((
double *)__pyx_v_dphi_psin_dpsiw->data), ((
double *)__pyx_v_dphi_psin_dsw->data), ((
double *)__pyx_v_fw->data), ((
double *)__pyx_v_dfw_dsw->data), ((
double *)__pyx_v_dfw_dpsiw->data), ((
double *)__pyx_v_fn->data), ((
double *)__pyx_v_dfn_dsw->data), ((
double *)__pyx_v_dfn_dpsiw->data), ((
double *)__pyx_v_aw->data), ((
double *)__pyx_v_daw->data), ((
double *)__pyx_v_daw_dpsiw->data), ((
double *)__pyx_v_an->data), ((
double *)__pyx_v_dan->data), ((
double *)__pyx_v_dan_dpsiw->data)));
3635 (void)(twophaseDarcy_fc_sd_het_matType_nonPotentialForm<SimplePSK,ExponentialDensity,IdealGasDensity>(__pyx_v_compressibilityFlag, __pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_v_g->dimensions[0]), 2, ((
int *)__pyx_v_rowptr->data), ((
int *)__pyx_v_colind->data), ((
int *)__pyx_v_matType->data), __pyx_v_muw, __pyx_v_mun, ((
double *)__pyx_v_omega->data), ((
double *)__pyx_v_Kbar->data), __pyx_v_b, ((
double *)__pyx_v_rwork_psk->data), ((
int *)__pyx_v_iwork_psk->data), ((
double *)__pyx_v_rwork_psk_tol->data), ((
double *)__pyx_v_rwork_density_w->data), ((
double *)__pyx_v_rwork_density_n->data), ((
double *)__pyx_v_g->data), ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_sw->data), ((
double *)__pyx_v_psiw->data), ((
double *)__pyx_v_mw->data), ((
double *)__pyx_v_dmw->data), ((
double *)__pyx_v_dmw_dpsiw->data), ((
double *)__pyx_v_mn->data), ((
double *)__pyx_v_dmn->data), ((
double *)__pyx_v_dmn_dpsiw->data), ((
double *)__pyx_v_psin->data), ((
double *)__pyx_v_dpsin->data), ((
double *)__pyx_v_dpsin_dpsiw->data), ((
double *)__pyx_v_phi_psiw->data), ((
double *)__pyx_v_dphi_psiw_dpsiw->data), ((
double *)__pyx_v_phi_psin->data), ((
double *)__pyx_v_dphi_psin_dpsiw->data), ((
double *)__pyx_v_dphi_psin_dsw->data), ((
double *)__pyx_v_fw->data), ((
double *)__pyx_v_dfw_dsw->data), ((
double *)__pyx_v_dfw_dpsiw->data), ((
double *)__pyx_v_fn->data), ((
double *)__pyx_v_dfn_dsw->data), ((
double *)__pyx_v_dfn_dpsiw->data), ((
double *)__pyx_v_aw->data), ((
double *)__pyx_v_daw->data), ((
double *)__pyx_v_daw_dpsiw->data), ((
double *)__pyx_v_an->data), ((
double *)__pyx_v_dan->data), ((
double *)__pyx_v_dan_dpsiw->data)));
3656 #ifndef CYTHON_WITHOUT_ASSERTIONS
3657 if (unlikely(!Py_OptimizeFlag)) {
3659 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_configuration_density_w_flag_0_a, __pyx_n_s_format);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 721, __pyx_L1_error)
3660 __Pyx_GOTREF(__pyx_t_2);
3661 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_density_w_flag);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 721, __pyx_L1_error)
3662 __Pyx_GOTREF(__pyx_t_1);
3663 __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_density_n_flag);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 721, __pyx_L1_error)
3664 __Pyx_GOTREF(__pyx_t_6);
3667 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
3668 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
3669 if (likely(__pyx_t_7)) {
3670 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_2);
3671 __Pyx_INCREF(__pyx_t_7);
3672 __Pyx_INCREF(
function);
3673 __Pyx_DECREF_SET(__pyx_t_2,
function);
3677 #if CYTHON_FAST_PYCALL
3678 if (PyFunction_Check(__pyx_t_2)) {
3679 PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_1, __pyx_t_6};
3680 __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 721, __pyx_L1_error)
3681 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
3682 __Pyx_GOTREF(__pyx_t_3);
3683 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3684 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
3687 #if CYTHON_FAST_PYCCALL
3688 if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
3689 PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_1, __pyx_t_6};
3690 __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 721, __pyx_L1_error)
3691 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
3692 __Pyx_GOTREF(__pyx_t_3);
3693 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3694 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
3698 __pyx_t_8 = PyTuple_New(2+__pyx_t_4);
if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 721, __pyx_L1_error)
3699 __Pyx_GOTREF(__pyx_t_8);
3701 __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
3703 __Pyx_GIVEREF(__pyx_t_1);
3704 PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_4, __pyx_t_1);
3705 __Pyx_GIVEREF(__pyx_t_6);
3706 PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_4, __pyx_t_6);
3709 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 721, __pyx_L1_error)
3710 __Pyx_GOTREF(__pyx_t_3);
3711 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
3713 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3714 __pyx_t_2 = PyTuple_Pack(1, __pyx_t_3);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 721, __pyx_L1_error)
3715 __Pyx_GOTREF(__pyx_t_2);
3716 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3717 PyErr_SetObject(PyExc_AssertionError, __pyx_t_2);
3718 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3719 __PYX_ERR(0, 721, __pyx_L1_error)
3735 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3738 __Pyx_XDECREF(__pyx_t_1);
3739 __Pyx_XDECREF(__pyx_t_2);
3740 __Pyx_XDECREF(__pyx_t_3);
3741 __Pyx_XDECREF(__pyx_t_6);
3742 __Pyx_XDECREF(__pyx_t_7);
3743 __Pyx_XDECREF(__pyx_t_8);
3744 __Pyx_AddTraceback(
"cTwophaseDarcyCoefficients.twophaseDarcy_fc_sd_het_matType_nonPotentialForm", __pyx_clineno, __pyx_lineno, __pyx_filename);
3747 __Pyx_XGIVEREF(__pyx_r);
3748 __Pyx_RefNannyFinishContext();
3761 static PyObject *__pyx_pw_26cTwophaseDarcyCoefficients_5twophaseDarcy_fc_pp_sd_het_matType(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
3762 static char __pyx_doc_26cTwophaseDarcyCoefficients_4twophaseDarcy_fc_pp_sd_het_matType[] =
"Evaluate the coefficients of the fully coupled formulation of\n (slightly) compressible, two-phase Darcy flow for a heterogeneous\n medium, pressure-pressure sparse diffusion rep. for het\n\n ";
3763 static PyMethodDef __pyx_mdef_26cTwophaseDarcyCoefficients_5twophaseDarcy_fc_pp_sd_het_matType = {
"twophaseDarcy_fc_pp_sd_het_matType", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_26cTwophaseDarcyCoefficients_5twophaseDarcy_fc_pp_sd_het_matType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_26cTwophaseDarcyCoefficients_4twophaseDarcy_fc_pp_sd_het_matType};
3764 static PyObject *__pyx_pw_26cTwophaseDarcyCoefficients_5twophaseDarcy_fc_pp_sd_het_matType(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3765 int __pyx_v_pskModelFlag;
3766 int __pyx_v_density_w_flag;
3767 int __pyx_v_density_n_flag;
3768 PyArrayObject *__pyx_v_rowptr = 0;
3769 PyArrayObject *__pyx_v_colind = 0;
3770 PyArrayObject *__pyx_v_matType = 0;
3773 PyArrayObject *__pyx_v_omega = 0;
3774 PyArrayObject *__pyx_v_Kbar = 0;
3776 PyArrayObject *__pyx_v_rwork_psk = 0;
3777 PyArrayObject *__pyx_v_iwork_psk = 0;
3778 PyArrayObject *__pyx_v_rwork_psk_tol = 0;
3779 PyArrayObject *__pyx_v_rwork_density_w = 0;
3780 PyArrayObject *__pyx_v_rwork_density_n = 0;
3781 PyArrayObject *__pyx_v_g = 0;
3782 PyArrayObject *__pyx_v_x = 0;
3783 PyArrayObject *__pyx_v_psiw = 0;
3784 PyArrayObject *__pyx_v_psic = 0;
3785 PyArrayObject *__pyx_v_sw = 0;
3786 PyArrayObject *__pyx_v_mw = 0;
3787 PyArrayObject *__pyx_v_dmw_dpsiw = 0;
3788 PyArrayObject *__pyx_v_dmw_dpsic = 0;
3789 PyArrayObject *__pyx_v_mn = 0;
3790 PyArrayObject *__pyx_v_dmn_dpsiw = 0;
3791 PyArrayObject *__pyx_v_dmn_dpsic = 0;
3792 PyArrayObject *__pyx_v_phi_psiw = 0;
3793 PyArrayObject *__pyx_v_dphi_psiw_dpsiw = 0;
3794 PyArrayObject *__pyx_v_phi_psin = 0;
3795 PyArrayObject *__pyx_v_dphi_psin_dpsiw = 0;
3796 PyArrayObject *__pyx_v_dphi_psin_dpsic = 0;
3797 PyArrayObject *__pyx_v_aw = 0;
3798 PyArrayObject *__pyx_v_daw_dpsiw = 0;
3799 PyArrayObject *__pyx_v_daw_dpsic = 0;
3800 PyArrayObject *__pyx_v_an = 0;
3801 PyArrayObject *__pyx_v_dan_dpsiw = 0;
3802 PyArrayObject *__pyx_v_dan_dpsic = 0;
3803 int __pyx_lineno = 0;
3804 const char *__pyx_filename = NULL;
3805 int __pyx_clineno = 0;
3806 PyObject *__pyx_r = 0;
3807 __Pyx_RefNannyDeclarations
3808 __Pyx_RefNannySetupContext(
"twophaseDarcy_fc_pp_sd_het_matType (wrapper)", 0);
3810 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pskModelFlag,&__pyx_n_s_density_w_flag,&__pyx_n_s_density_n_flag,&__pyx_n_s_rowptr,&__pyx_n_s_colind,&__pyx_n_s_matType,&__pyx_n_s_muw,&__pyx_n_s_mun,&__pyx_n_s_omega,&__pyx_n_s_Kbar,&__pyx_n_s_b,&__pyx_n_s_rwork_psk,&__pyx_n_s_iwork_psk,&__pyx_n_s_rwork_psk_tol,&__pyx_n_s_rwork_density_w,&__pyx_n_s_rwork_density_n,&__pyx_n_s_g,&__pyx_n_s_x,&__pyx_n_s_psiw,&__pyx_n_s_psic,&__pyx_n_s_sw,&__pyx_n_s_mw,&__pyx_n_s_dmw_dpsiw,&__pyx_n_s_dmw_dpsic,&__pyx_n_s_mn,&__pyx_n_s_dmn_dpsiw,&__pyx_n_s_dmn_dpsic,&__pyx_n_s_phi_psiw,&__pyx_n_s_dphi_psiw_dpsiw,&__pyx_n_s_phi_psin,&__pyx_n_s_dphi_psin_dpsiw,&__pyx_n_s_dphi_psin_dpsic,&__pyx_n_s_aw,&__pyx_n_s_daw_dpsiw,&__pyx_n_s_daw_dpsic,&__pyx_n_s_an,&__pyx_n_s_dan_dpsiw,&__pyx_n_s_dan_dpsic,0};
3811 PyObject* values[38] = {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};
3812 if (unlikely(__pyx_kwds)) {
3814 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
3816 case 38: values[37] = PyTuple_GET_ITEM(__pyx_args, 37);
3818 case 37: values[36] = PyTuple_GET_ITEM(__pyx_args, 36);
3820 case 36: values[35] = PyTuple_GET_ITEM(__pyx_args, 35);
3822 case 35: values[34] = PyTuple_GET_ITEM(__pyx_args, 34);
3824 case 34: values[33] = PyTuple_GET_ITEM(__pyx_args, 33);
3826 case 33: values[32] = PyTuple_GET_ITEM(__pyx_args, 32);
3828 case 32: values[31] = PyTuple_GET_ITEM(__pyx_args, 31);
3830 case 31: values[30] = PyTuple_GET_ITEM(__pyx_args, 30);
3832 case 30: values[29] = PyTuple_GET_ITEM(__pyx_args, 29);
3834 case 29: values[28] = PyTuple_GET_ITEM(__pyx_args, 28);
3836 case 28: values[27] = PyTuple_GET_ITEM(__pyx_args, 27);
3838 case 27: values[26] = PyTuple_GET_ITEM(__pyx_args, 26);
3840 case 26: values[25] = PyTuple_GET_ITEM(__pyx_args, 25);
3842 case 25: values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
3844 case 24: values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
3846 case 23: values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
3848 case 22: values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
3850 case 21: values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
3852 case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
3854 case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
3856 case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
3858 case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
3860 case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
3862 case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
3864 case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
3866 case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
3868 case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
3870 case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
3872 case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
3874 case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
3876 case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
3878 case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
3880 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
3882 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
3884 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3886 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3888 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3890 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3893 default:
goto __pyx_L5_argtuple_error;
3895 kw_args = PyDict_Size(__pyx_kwds);
3898 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pskModelFlag)) != 0)) kw_args--;
3899 else goto __pyx_L5_argtuple_error;
3902 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_density_w_flag)) != 0)) kw_args--;
3904 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_pp_sd_het_matType", 1, 38, 38, 1); __PYX_ERR(0, 723, __pyx_L3_error)
3908 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_density_n_flag)) != 0)) kw_args--;
3910 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_pp_sd_het_matType", 1, 38, 38, 2); __PYX_ERR(0, 723, __pyx_L3_error)
3914 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rowptr)) != 0)) kw_args--;
3916 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_pp_sd_het_matType", 1, 38, 38, 3); __PYX_ERR(0, 723, __pyx_L3_error)
3920 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_colind)) != 0)) kw_args--;
3922 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_pp_sd_het_matType", 1, 38, 38, 4); __PYX_ERR(0, 723, __pyx_L3_error)
3926 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_matType)) != 0)) kw_args--;
3928 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_pp_sd_het_matType", 1, 38, 38, 5); __PYX_ERR(0, 723, __pyx_L3_error)
3932 if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_muw)) != 0)) kw_args--;
3934 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_pp_sd_het_matType", 1, 38, 38, 6); __PYX_ERR(0, 723, __pyx_L3_error)
3938 if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mun)) != 0)) kw_args--;
3940 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_pp_sd_het_matType", 1, 38, 38, 7); __PYX_ERR(0, 723, __pyx_L3_error)
3944 if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_omega)) != 0)) kw_args--;
3946 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_pp_sd_het_matType", 1, 38, 38, 8); __PYX_ERR(0, 723, __pyx_L3_error)
3950 if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Kbar)) != 0)) kw_args--;
3952 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_pp_sd_het_matType", 1, 38, 38, 9); __PYX_ERR(0, 723, __pyx_L3_error)
3956 if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--;
3958 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_pp_sd_het_matType", 1, 38, 38, 10); __PYX_ERR(0, 723, __pyx_L3_error)
3962 if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork_psk)) != 0)) kw_args--;
3964 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_pp_sd_het_matType", 1, 38, 38, 11); __PYX_ERR(0, 723, __pyx_L3_error)
3968 if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iwork_psk)) != 0)) kw_args--;
3970 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_pp_sd_het_matType", 1, 38, 38, 12); __PYX_ERR(0, 723, __pyx_L3_error)
3974 if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork_psk_tol)) != 0)) kw_args--;
3976 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_pp_sd_het_matType", 1, 38, 38, 13); __PYX_ERR(0, 723, __pyx_L3_error)
3980 if (likely((values[14] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork_density_w)) != 0)) kw_args--;
3982 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_pp_sd_het_matType", 1, 38, 38, 14); __PYX_ERR(0, 723, __pyx_L3_error)
3986 if (likely((values[15] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork_density_n)) != 0)) kw_args--;
3988 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_pp_sd_het_matType", 1, 38, 38, 15); __PYX_ERR(0, 723, __pyx_L3_error)
3992 if (likely((values[16] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_g)) != 0)) kw_args--;
3994 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_pp_sd_het_matType", 1, 38, 38, 16); __PYX_ERR(0, 723, __pyx_L3_error)
3998 if (likely((values[17] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
4000 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_pp_sd_het_matType", 1, 38, 38, 17); __PYX_ERR(0, 723, __pyx_L3_error)
4004 if (likely((values[18] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_psiw)) != 0)) kw_args--;
4006 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_pp_sd_het_matType", 1, 38, 38, 18); __PYX_ERR(0, 723, __pyx_L3_error)
4010 if (likely((values[19] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_psic)) != 0)) kw_args--;
4012 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_pp_sd_het_matType", 1, 38, 38, 19); __PYX_ERR(0, 723, __pyx_L3_error)
4016 if (likely((values[20] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sw)) != 0)) kw_args--;
4018 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_pp_sd_het_matType", 1, 38, 38, 20); __PYX_ERR(0, 723, __pyx_L3_error)
4022 if (likely((values[21] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mw)) != 0)) kw_args--;
4024 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_pp_sd_het_matType", 1, 38, 38, 21); __PYX_ERR(0, 723, __pyx_L3_error)
4028 if (likely((values[22] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dmw_dpsiw)) != 0)) kw_args--;
4030 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_pp_sd_het_matType", 1, 38, 38, 22); __PYX_ERR(0, 723, __pyx_L3_error)
4034 if (likely((values[23] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dmw_dpsic)) != 0)) kw_args--;
4036 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_pp_sd_het_matType", 1, 38, 38, 23); __PYX_ERR(0, 723, __pyx_L3_error)
4040 if (likely((values[24] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mn)) != 0)) kw_args--;
4042 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_pp_sd_het_matType", 1, 38, 38, 24); __PYX_ERR(0, 723, __pyx_L3_error)
4046 if (likely((values[25] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dmn_dpsiw)) != 0)) kw_args--;
4048 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_pp_sd_het_matType", 1, 38, 38, 25); __PYX_ERR(0, 723, __pyx_L3_error)
4052 if (likely((values[26] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dmn_dpsic)) != 0)) kw_args--;
4054 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_pp_sd_het_matType", 1, 38, 38, 26); __PYX_ERR(0, 723, __pyx_L3_error)
4058 if (likely((values[27] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_phi_psiw)) != 0)) kw_args--;
4060 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_pp_sd_het_matType", 1, 38, 38, 27); __PYX_ERR(0, 723, __pyx_L3_error)
4064 if (likely((values[28] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dphi_psiw_dpsiw)) != 0)) kw_args--;
4066 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_pp_sd_het_matType", 1, 38, 38, 28); __PYX_ERR(0, 723, __pyx_L3_error)
4070 if (likely((values[29] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_phi_psin)) != 0)) kw_args--;
4072 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_pp_sd_het_matType", 1, 38, 38, 29); __PYX_ERR(0, 723, __pyx_L3_error)
4076 if (likely((values[30] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dphi_psin_dpsiw)) != 0)) kw_args--;
4078 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_pp_sd_het_matType", 1, 38, 38, 30); __PYX_ERR(0, 723, __pyx_L3_error)
4082 if (likely((values[31] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dphi_psin_dpsic)) != 0)) kw_args--;
4084 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_pp_sd_het_matType", 1, 38, 38, 31); __PYX_ERR(0, 723, __pyx_L3_error)
4088 if (likely((values[32] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_aw)) != 0)) kw_args--;
4090 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_pp_sd_het_matType", 1, 38, 38, 32); __PYX_ERR(0, 723, __pyx_L3_error)
4094 if (likely((values[33] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_daw_dpsiw)) != 0)) kw_args--;
4096 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_pp_sd_het_matType", 1, 38, 38, 33); __PYX_ERR(0, 723, __pyx_L3_error)
4100 if (likely((values[34] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_daw_dpsic)) != 0)) kw_args--;
4102 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_pp_sd_het_matType", 1, 38, 38, 34); __PYX_ERR(0, 723, __pyx_L3_error)
4106 if (likely((values[35] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_an)) != 0)) kw_args--;
4108 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_pp_sd_het_matType", 1, 38, 38, 35); __PYX_ERR(0, 723, __pyx_L3_error)
4112 if (likely((values[36] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dan_dpsiw)) != 0)) kw_args--;
4114 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_pp_sd_het_matType", 1, 38, 38, 36); __PYX_ERR(0, 723, __pyx_L3_error)
4118 if (likely((values[37] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dan_dpsic)) != 0)) kw_args--;
4120 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_pp_sd_het_matType", 1, 38, 38, 37); __PYX_ERR(0, 723, __pyx_L3_error)
4123 if (unlikely(kw_args > 0)) {
4124 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"twophaseDarcy_fc_pp_sd_het_matType") < 0)) __PYX_ERR(0, 723, __pyx_L3_error)
4126 }
else if (PyTuple_GET_SIZE(__pyx_args) != 38) {
4127 goto __pyx_L5_argtuple_error;
4129 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4130 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4131 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4132 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
4133 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
4134 values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
4135 values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
4136 values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
4137 values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
4138 values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
4139 values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
4140 values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
4141 values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
4142 values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
4143 values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
4144 values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
4145 values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
4146 values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
4147 values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
4148 values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
4149 values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
4150 values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
4151 values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
4152 values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
4153 values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
4154 values[25] = PyTuple_GET_ITEM(__pyx_args, 25);
4155 values[26] = PyTuple_GET_ITEM(__pyx_args, 26);
4156 values[27] = PyTuple_GET_ITEM(__pyx_args, 27);
4157 values[28] = PyTuple_GET_ITEM(__pyx_args, 28);
4158 values[29] = PyTuple_GET_ITEM(__pyx_args, 29);
4159 values[30] = PyTuple_GET_ITEM(__pyx_args, 30);
4160 values[31] = PyTuple_GET_ITEM(__pyx_args, 31);
4161 values[32] = PyTuple_GET_ITEM(__pyx_args, 32);
4162 values[33] = PyTuple_GET_ITEM(__pyx_args, 33);
4163 values[34] = PyTuple_GET_ITEM(__pyx_args, 34);
4164 values[35] = PyTuple_GET_ITEM(__pyx_args, 35);
4165 values[36] = PyTuple_GET_ITEM(__pyx_args, 36);
4166 values[37] = PyTuple_GET_ITEM(__pyx_args, 37);
4168 __pyx_v_pskModelFlag = __Pyx_PyInt_As_int(values[0]);
if (unlikely((__pyx_v_pskModelFlag == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 723, __pyx_L3_error)
4169 __pyx_v_density_w_flag = __Pyx_PyInt_As_int(values[1]);
if (unlikely((__pyx_v_density_w_flag == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 724, __pyx_L3_error)
4170 __pyx_v_density_n_flag = __Pyx_PyInt_As_int(values[2]);
if (unlikely((__pyx_v_density_n_flag == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 725, __pyx_L3_error)
4171 __pyx_v_rowptr = ((PyArrayObject *)values[3]);
4172 __pyx_v_colind = ((PyArrayObject *)values[4]);
4173 __pyx_v_matType = ((PyArrayObject *)values[5]);
4174 __pyx_v_muw = __pyx_PyFloat_AsDouble(values[6]);
if (unlikely((__pyx_v_muw == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 729, __pyx_L3_error)
4175 __pyx_v_mun = __pyx_PyFloat_AsDouble(values[7]);
if (unlikely((__pyx_v_mun == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 730, __pyx_L3_error)
4176 __pyx_v_omega = ((PyArrayObject *)values[8]);
4177 __pyx_v_Kbar = ((PyArrayObject *)values[9]);
4178 __pyx_v_b = __pyx_PyFloat_AsDouble(values[10]);
if (unlikely((__pyx_v_b == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 733, __pyx_L3_error)
4179 __pyx_v_rwork_psk = ((PyArrayObject *)values[11]);
4180 __pyx_v_iwork_psk = ((PyArrayObject *)values[12]);
4181 __pyx_v_rwork_psk_tol = ((PyArrayObject *)values[13]);
4182 __pyx_v_rwork_density_w = ((PyArrayObject *)values[14]);
4183 __pyx_v_rwork_density_n = ((PyArrayObject *)values[15]);
4184 __pyx_v_g = ((PyArrayObject *)values[16]);
4185 __pyx_v_x = ((PyArrayObject *)values[17]);
4186 __pyx_v_psiw = ((PyArrayObject *)values[18]);
4187 __pyx_v_psic = ((PyArrayObject *)values[19]);
4188 __pyx_v_sw = ((PyArrayObject *)values[20]);
4189 __pyx_v_mw = ((PyArrayObject *)values[21]);
4190 __pyx_v_dmw_dpsiw = ((PyArrayObject *)values[22]);
4191 __pyx_v_dmw_dpsic = ((PyArrayObject *)values[23]);
4192 __pyx_v_mn = ((PyArrayObject *)values[24]);
4193 __pyx_v_dmn_dpsiw = ((PyArrayObject *)values[25]);
4194 __pyx_v_dmn_dpsic = ((PyArrayObject *)values[26]);
4195 __pyx_v_phi_psiw = ((PyArrayObject *)values[27]);
4196 __pyx_v_dphi_psiw_dpsiw = ((PyArrayObject *)values[28]);
4197 __pyx_v_phi_psin = ((PyArrayObject *)values[29]);
4198 __pyx_v_dphi_psin_dpsiw = ((PyArrayObject *)values[30]);
4199 __pyx_v_dphi_psin_dpsic = ((PyArrayObject *)values[31]);
4200 __pyx_v_aw = ((PyArrayObject *)values[32]);
4201 __pyx_v_daw_dpsiw = ((PyArrayObject *)values[33]);
4202 __pyx_v_daw_dpsic = ((PyArrayObject *)values[34]);
4203 __pyx_v_an = ((PyArrayObject *)values[35]);
4204 __pyx_v_dan_dpsiw = ((PyArrayObject *)values[36]);
4205 __pyx_v_dan_dpsic = ((PyArrayObject *)values[37]);
4207 goto __pyx_L4_argument_unpacking_done;
4208 __pyx_L5_argtuple_error:;
4209 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_fc_pp_sd_het_matType", 1, 38, 38, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 723, __pyx_L3_error)
4211 __Pyx_AddTraceback(
"cTwophaseDarcyCoefficients.twophaseDarcy_fc_pp_sd_het_matType", __pyx_clineno, __pyx_lineno, __pyx_filename);
4212 __Pyx_RefNannyFinishContext();
4214 __pyx_L4_argument_unpacking_done:;
4215 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rowptr), __pyx_ptype_5numpy_ndarray, 1,
"rowptr", 0))) __PYX_ERR(0, 726, __pyx_L1_error)
4216 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_colind), __pyx_ptype_5numpy_ndarray, 1,
"colind", 0))) __PYX_ERR(0, 727, __pyx_L1_error)
4217 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_matType), __pyx_ptype_5numpy_ndarray, 1,
"matType", 0))) __PYX_ERR(0, 728, __pyx_L1_error)
4218 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_omega), __pyx_ptype_5numpy_ndarray, 1,
"omega", 0))) __PYX_ERR(0, 731, __pyx_L1_error)
4219 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Kbar), __pyx_ptype_5numpy_ndarray, 1,
"Kbar", 0))) __PYX_ERR(0, 732, __pyx_L1_error)
4220 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_psk), __pyx_ptype_5numpy_ndarray, 1,
"rwork_psk", 0))) __PYX_ERR(0, 734, __pyx_L1_error)
4221 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork_psk), __pyx_ptype_5numpy_ndarray, 1,
"iwork_psk", 0))) __PYX_ERR(0, 735, __pyx_L1_error)
4222 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_psk_tol), __pyx_ptype_5numpy_ndarray, 1,
"rwork_psk_tol", 0))) __PYX_ERR(0, 736, __pyx_L1_error)
4223 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_density_w), __pyx_ptype_5numpy_ndarray, 1,
"rwork_density_w", 0))) __PYX_ERR(0, 737, __pyx_L1_error)
4224 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_density_n), __pyx_ptype_5numpy_ndarray, 1,
"rwork_density_n", 0))) __PYX_ERR(0, 738, __pyx_L1_error)
4225 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_g), __pyx_ptype_5numpy_ndarray, 1,
"g", 0))) __PYX_ERR(0, 739, __pyx_L1_error)
4226 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1,
"x", 0))) __PYX_ERR(0, 740, __pyx_L1_error)
4227 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_psiw), __pyx_ptype_5numpy_ndarray, 1,
"psiw", 0))) __PYX_ERR(0, 741, __pyx_L1_error)
4228 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_psic), __pyx_ptype_5numpy_ndarray, 1,
"psic", 0))) __PYX_ERR(0, 742, __pyx_L1_error)
4229 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sw), __pyx_ptype_5numpy_ndarray, 1,
"sw", 0))) __PYX_ERR(0, 743, __pyx_L1_error)
4230 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mw), __pyx_ptype_5numpy_ndarray, 1,
"mw", 0))) __PYX_ERR(0, 744, __pyx_L1_error)
4231 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dmw_dpsiw), __pyx_ptype_5numpy_ndarray, 1,
"dmw_dpsiw", 0))) __PYX_ERR(0, 745, __pyx_L1_error)
4232 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dmw_dpsic), __pyx_ptype_5numpy_ndarray, 1,
"dmw_dpsic", 0))) __PYX_ERR(0, 746, __pyx_L1_error)
4233 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mn), __pyx_ptype_5numpy_ndarray, 1,
"mn", 0))) __PYX_ERR(0, 747, __pyx_L1_error)
4234 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dmn_dpsiw), __pyx_ptype_5numpy_ndarray, 1,
"dmn_dpsiw", 0))) __PYX_ERR(0, 748, __pyx_L1_error)
4235 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dmn_dpsic), __pyx_ptype_5numpy_ndarray, 1,
"dmn_dpsic", 0))) __PYX_ERR(0, 749, __pyx_L1_error)
4236 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_phi_psiw), __pyx_ptype_5numpy_ndarray, 1,
"phi_psiw", 0))) __PYX_ERR(0, 750, __pyx_L1_error)
4237 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dphi_psiw_dpsiw), __pyx_ptype_5numpy_ndarray, 1,
"dphi_psiw_dpsiw", 0))) __PYX_ERR(0, 751, __pyx_L1_error)
4238 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_phi_psin), __pyx_ptype_5numpy_ndarray, 1,
"phi_psin", 0))) __PYX_ERR(0, 752, __pyx_L1_error)
4239 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dphi_psin_dpsiw), __pyx_ptype_5numpy_ndarray, 1,
"dphi_psin_dpsiw", 0))) __PYX_ERR(0, 753, __pyx_L1_error)
4240 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dphi_psin_dpsic), __pyx_ptype_5numpy_ndarray, 1,
"dphi_psin_dpsic", 0))) __PYX_ERR(0, 754, __pyx_L1_error)
4241 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_aw), __pyx_ptype_5numpy_ndarray, 1,
"aw", 0))) __PYX_ERR(0, 755, __pyx_L1_error)
4242 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_daw_dpsiw), __pyx_ptype_5numpy_ndarray, 1,
"daw_dpsiw", 0))) __PYX_ERR(0, 756, __pyx_L1_error)
4243 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_daw_dpsic), __pyx_ptype_5numpy_ndarray, 1,
"daw_dpsic", 0))) __PYX_ERR(0, 757, __pyx_L1_error)
4244 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_an), __pyx_ptype_5numpy_ndarray, 1,
"an", 0))) __PYX_ERR(0, 758, __pyx_L1_error)
4245 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dan_dpsiw), __pyx_ptype_5numpy_ndarray, 1,
"dan_dpsiw", 0))) __PYX_ERR(0, 759, __pyx_L1_error)
4246 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dan_dpsic), __pyx_ptype_5numpy_ndarray, 1,
"dan_dpsic", 0))) __PYX_ERR(0, 760, __pyx_L1_error)
4247 __pyx_r = __pyx_pf_26cTwophaseDarcyCoefficients_4twophaseDarcy_fc_pp_sd_het_matType(__pyx_self, __pyx_v_pskModelFlag, __pyx_v_density_w_flag, __pyx_v_density_n_flag, __pyx_v_rowptr, __pyx_v_colind, __pyx_v_matType, __pyx_v_muw, __pyx_v_mun, __pyx_v_omega, __pyx_v_Kbar, __pyx_v_b, __pyx_v_rwork_psk, __pyx_v_iwork_psk, __pyx_v_rwork_psk_tol, __pyx_v_rwork_density_w, __pyx_v_rwork_density_n, __pyx_v_g, __pyx_v_x, __pyx_v_psiw, __pyx_v_psic, __pyx_v_sw, __pyx_v_mw, __pyx_v_dmw_dpsiw, __pyx_v_dmw_dpsic, __pyx_v_mn, __pyx_v_dmn_dpsiw, __pyx_v_dmn_dpsic, __pyx_v_phi_psiw, __pyx_v_dphi_psiw_dpsiw, __pyx_v_phi_psin, __pyx_v_dphi_psin_dpsiw, __pyx_v_dphi_psin_dpsic, __pyx_v_aw, __pyx_v_daw_dpsiw, __pyx_v_daw_dpsic, __pyx_v_an, __pyx_v_dan_dpsiw, __pyx_v_dan_dpsic);
4254 __Pyx_RefNannyFinishContext();
4258 static PyObject *__pyx_pf_26cTwophaseDarcyCoefficients_4twophaseDarcy_fc_pp_sd_het_matType(CYTHON_UNUSED PyObject *__pyx_self,
int __pyx_v_pskModelFlag,
int __pyx_v_density_w_flag,
int __pyx_v_density_n_flag, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_matType,
double __pyx_v_muw,
double __pyx_v_mun, PyArrayObject *__pyx_v_omega, PyArrayObject *__pyx_v_Kbar,
double __pyx_v_b, PyArrayObject *__pyx_v_rwork_psk, PyArrayObject *__pyx_v_iwork_psk, PyArrayObject *__pyx_v_rwork_psk_tol, PyArrayObject *__pyx_v_rwork_density_w, PyArrayObject *__pyx_v_rwork_density_n, PyArrayObject *__pyx_v_g, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_psiw, PyArrayObject *__pyx_v_psic, PyArrayObject *__pyx_v_sw, PyArrayObject *__pyx_v_mw, PyArrayObject *__pyx_v_dmw_dpsiw, PyArrayObject *__pyx_v_dmw_dpsic, PyArrayObject *__pyx_v_mn, PyArrayObject *__pyx_v_dmn_dpsiw, PyArrayObject *__pyx_v_dmn_dpsic, PyArrayObject *__pyx_v_phi_psiw, PyArrayObject *__pyx_v_dphi_psiw_dpsiw, PyArrayObject *__pyx_v_phi_psin, PyArrayObject *__pyx_v_dphi_psin_dpsiw, PyArrayObject *__pyx_v_dphi_psin_dpsic, PyArrayObject *__pyx_v_aw, PyArrayObject *__pyx_v_daw_dpsiw, PyArrayObject *__pyx_v_daw_dpsic, PyArrayObject *__pyx_v_an, PyArrayObject *__pyx_v_dan_dpsiw, PyArrayObject *__pyx_v_dan_dpsic) {
4259 int __pyx_v_nPointsPerSimplex;
4260 int __pyx_v_nSimplex;
4261 PyObject *__pyx_r = NULL;
4262 __Pyx_RefNannyDeclarations
4263 PyObject *__pyx_t_1 = NULL;
4264 PyObject *__pyx_t_2 = NULL;
4265 PyObject *__pyx_t_3 = NULL;
4267 PyObject *__pyx_t_5 = NULL;
4268 PyObject *__pyx_t_6 = NULL;
4269 PyObject *__pyx_t_7 = NULL;
4270 int __pyx_lineno = 0;
4271 const char *__pyx_filename = NULL;
4272 int __pyx_clineno = 0;
4273 __Pyx_RefNannySetupContext(
"twophaseDarcy_fc_pp_sd_het_matType", 0);
4282 __pyx_v_nPointsPerSimplex = (__pyx_v_sw->dimensions[(__pyx_v_sw->nd - 1)]);
4291 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_sw), __pyx_n_s_size);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 767, __pyx_L1_error)
4292 __Pyx_GOTREF(__pyx_t_1);
4293 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_nPointsPerSimplex);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 767, __pyx_L1_error)
4294 __Pyx_GOTREF(__pyx_t_2);
4295 __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 767, __pyx_L1_error)
4296 __Pyx_GOTREF(__pyx_t_3);
4297 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4298 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4299 __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3);
if (unlikely((__pyx_t_4 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 767, __pyx_L1_error)
4300 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4301 __pyx_v_nSimplex = __pyx_t_4;
4310 #ifndef CYTHON_WITHOUT_ASSERTIONS
4311 if (unlikely(!Py_OptimizeFlag)) {
4312 if (unlikely(!((__pyx_v_density_w_flag == 1) != 0))) {
4313 PyErr_SetNone(PyExc_AssertionError);
4314 __PYX_ERR(0, 770, __pyx_L1_error)
4326 switch (__pyx_v_density_n_flag) {
4336 switch (__pyx_v_pskModelFlag) {
4346 (void)(twophaseDarcy_fc_pp_sd_het_matType<SimplePSK,ExponentialDensity,ExponentialDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_v_g->dimensions[0]), 2, ((
int *)__pyx_v_rowptr->data), ((
int *)__pyx_v_colind->data), ((
int *)__pyx_v_matType->data), __pyx_v_muw, __pyx_v_mun, ((
double *)__pyx_v_omega->data), ((
double *)__pyx_v_Kbar->data), __pyx_v_b, ((
double *)__pyx_v_rwork_psk->data), ((
int *)__pyx_v_iwork_psk->data), ((
double *)__pyx_v_rwork_psk_tol->data), ((
double *)__pyx_v_rwork_density_w->data), ((
double *)__pyx_v_rwork_density_n->data), ((
double *)__pyx_v_g->data), ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_psiw->data), ((
double *)__pyx_v_psic->data), ((
double *)__pyx_v_sw->data), ((
double *)__pyx_v_mw->data), ((
double *)__pyx_v_dmw_dpsiw->data), ((
double *)__pyx_v_dmw_dpsic->data), ((
double *)__pyx_v_mn->data), ((
double *)__pyx_v_dmn_dpsiw->data), ((
double *)__pyx_v_dmn_dpsic->data), ((
double *)__pyx_v_phi_psiw->data), ((
double *)__pyx_v_dphi_psiw_dpsiw->data), ((
double *)__pyx_v_phi_psin->data), ((
double *)__pyx_v_dphi_psin_dpsiw->data), ((
double *)__pyx_v_dphi_psin_dpsic->data), ((
double *)__pyx_v_aw->data), ((
double *)__pyx_v_daw_dpsiw->data), ((
double *)__pyx_v_daw_dpsic->data), ((
double *)__pyx_v_an->data), ((
double *)__pyx_v_dan_dpsiw->data), ((
double *)__pyx_v_dan_dpsic->data)));
4365 (void)(twophaseDarcy_fc_pp_sd_het_matType<VGM,ExponentialDensity,ExponentialDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_v_g->dimensions[0]), 4, ((
int *)__pyx_v_rowptr->data), ((
int *)__pyx_v_colind->data), ((
int *)__pyx_v_matType->data), __pyx_v_muw, __pyx_v_mun, ((
double *)__pyx_v_omega->data), ((
double *)__pyx_v_Kbar->data), __pyx_v_b, ((
double *)__pyx_v_rwork_psk->data), ((
int *)__pyx_v_iwork_psk->data), ((
double *)__pyx_v_rwork_psk_tol->data), ((
double *)__pyx_v_rwork_density_w->data), ((
double *)__pyx_v_rwork_density_n->data), ((
double *)__pyx_v_g->data), ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_psiw->data), ((
double *)__pyx_v_psic->data), ((
double *)__pyx_v_sw->data), ((
double *)__pyx_v_mw->data), ((
double *)__pyx_v_dmw_dpsiw->data), ((
double *)__pyx_v_dmw_dpsic->data), ((
double *)__pyx_v_mn->data), ((
double *)__pyx_v_dmn_dpsiw->data), ((
double *)__pyx_v_dmn_dpsic->data), ((
double *)__pyx_v_phi_psiw->data), ((
double *)__pyx_v_dphi_psiw_dpsiw->data), ((
double *)__pyx_v_phi_psin->data), ((
double *)__pyx_v_dphi_psin_dpsiw->data), ((
double *)__pyx_v_dphi_psin_dpsic->data), ((
double *)__pyx_v_aw->data), ((
double *)__pyx_v_daw_dpsiw->data), ((
double *)__pyx_v_daw_dpsic->data), ((
double *)__pyx_v_an->data), ((
double *)__pyx_v_dan_dpsiw->data), ((
double *)__pyx_v_dan_dpsic->data)));
4384 (void)(twophaseDarcy_fc_pp_sd_het_matType<SimplePSK,ExponentialDensity,ExponentialDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_v_g->dimensions[0]), 2, ((
int *)__pyx_v_rowptr->data), ((
int *)__pyx_v_colind->data), ((
int *)__pyx_v_matType->data), __pyx_v_muw, __pyx_v_mun, ((
double *)__pyx_v_omega->data), ((
double *)__pyx_v_Kbar->data), __pyx_v_b, ((
double *)__pyx_v_rwork_psk->data), ((
int *)__pyx_v_iwork_psk->data), ((
double *)__pyx_v_rwork_psk_tol->data), ((
double *)__pyx_v_rwork_density_w->data), ((
double *)__pyx_v_rwork_density_n->data), ((
double *)__pyx_v_g->data), ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_psiw->data), ((
double *)__pyx_v_psic->data), ((
double *)__pyx_v_sw->data), ((
double *)__pyx_v_mw->data), ((
double *)__pyx_v_dmw_dpsiw->data), ((
double *)__pyx_v_dmw_dpsic->data), ((
double *)__pyx_v_mn->data), ((
double *)__pyx_v_dmn_dpsiw->data), ((
double *)__pyx_v_dmn_dpsic->data), ((
double *)__pyx_v_phi_psiw->data), ((
double *)__pyx_v_dphi_psiw_dpsiw->data), ((
double *)__pyx_v_phi_psin->data), ((
double *)__pyx_v_dphi_psin_dpsiw->data), ((
double *)__pyx_v_dphi_psin_dpsic->data), ((
double *)__pyx_v_aw->data), ((
double *)__pyx_v_daw_dpsiw->data), ((
double *)__pyx_v_daw_dpsic->data), ((
double *)__pyx_v_an->data), ((
double *)__pyx_v_dan_dpsiw->data), ((
double *)__pyx_v_dan_dpsic->data)));
4405 switch (__pyx_v_pskModelFlag) {
4415 (void)(twophaseDarcy_fc_pp_sd_het_matType<SimplePSK,ExponentialDensity,IdealGasDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_v_g->dimensions[0]), 2, ((
int *)__pyx_v_rowptr->data), ((
int *)__pyx_v_colind->data), ((
int *)__pyx_v_matType->data), __pyx_v_muw, __pyx_v_mun, ((
double *)__pyx_v_omega->data), ((
double *)__pyx_v_Kbar->data), __pyx_v_b, ((
double *)__pyx_v_rwork_psk->data), ((
int *)__pyx_v_iwork_psk->data), ((
double *)__pyx_v_rwork_psk_tol->data), ((
double *)__pyx_v_rwork_density_w->data), ((
double *)__pyx_v_rwork_density_n->data), ((
double *)__pyx_v_g->data), ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_psiw->data), ((
double *)__pyx_v_psic->data), ((
double *)__pyx_v_sw->data), ((
double *)__pyx_v_mw->data), ((
double *)__pyx_v_dmw_dpsiw->data), ((
double *)__pyx_v_dmw_dpsic->data), ((
double *)__pyx_v_mn->data), ((
double *)__pyx_v_dmn_dpsiw->data), ((
double *)__pyx_v_dmn_dpsic->data), ((
double *)__pyx_v_phi_psiw->data), ((
double *)__pyx_v_dphi_psiw_dpsiw->data), ((
double *)__pyx_v_phi_psin->data), ((
double *)__pyx_v_dphi_psin_dpsiw->data), ((
double *)__pyx_v_dphi_psin_dpsic->data), ((
double *)__pyx_v_aw->data), ((
double *)__pyx_v_daw_dpsiw->data), ((
double *)__pyx_v_daw_dpsic->data), ((
double *)__pyx_v_an->data), ((
double *)__pyx_v_dan_dpsiw->data), ((
double *)__pyx_v_dan_dpsic->data)));
4434 (void)(twophaseDarcy_fc_pp_sd_het_matType<VGM,ExponentialDensity,IdealGasDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_v_g->dimensions[0]), 4, ((
int *)__pyx_v_rowptr->data), ((
int *)__pyx_v_colind->data), ((
int *)__pyx_v_matType->data), __pyx_v_muw, __pyx_v_mun, ((
double *)__pyx_v_omega->data), ((
double *)__pyx_v_Kbar->data), __pyx_v_b, ((
double *)__pyx_v_rwork_psk->data), ((
int *)__pyx_v_iwork_psk->data), ((
double *)__pyx_v_rwork_psk_tol->data), ((
double *)__pyx_v_rwork_density_w->data), ((
double *)__pyx_v_rwork_density_n->data), ((
double *)__pyx_v_g->data), ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_psiw->data), ((
double *)__pyx_v_psic->data), ((
double *)__pyx_v_sw->data), ((
double *)__pyx_v_mw->data), ((
double *)__pyx_v_dmw_dpsiw->data), ((
double *)__pyx_v_dmw_dpsic->data), ((
double *)__pyx_v_mn->data), ((
double *)__pyx_v_dmn_dpsiw->data), ((
double *)__pyx_v_dmn_dpsic->data), ((
double *)__pyx_v_phi_psiw->data), ((
double *)__pyx_v_dphi_psiw_dpsiw->data), ((
double *)__pyx_v_phi_psin->data), ((
double *)__pyx_v_dphi_psin_dpsiw->data), ((
double *)__pyx_v_dphi_psin_dpsic->data), ((
double *)__pyx_v_aw->data), ((
double *)__pyx_v_daw_dpsiw->data), ((
double *)__pyx_v_daw_dpsic->data), ((
double *)__pyx_v_an->data), ((
double *)__pyx_v_dan_dpsiw->data), ((
double *)__pyx_v_dan_dpsic->data)));
4453 (void)(twophaseDarcy_fc_pp_sd_het_matType<SimplePSK,ExponentialDensity,IdealGasDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_v_g->dimensions[0]), 2, ((
int *)__pyx_v_rowptr->data), ((
int *)__pyx_v_colind->data), ((
int *)__pyx_v_matType->data), __pyx_v_muw, __pyx_v_mun, ((
double *)__pyx_v_omega->data), ((
double *)__pyx_v_Kbar->data), __pyx_v_b, ((
double *)__pyx_v_rwork_psk->data), ((
int *)__pyx_v_iwork_psk->data), ((
double *)__pyx_v_rwork_psk_tol->data), ((
double *)__pyx_v_rwork_density_w->data), ((
double *)__pyx_v_rwork_density_n->data), ((
double *)__pyx_v_g->data), ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_psiw->data), ((
double *)__pyx_v_psic->data), ((
double *)__pyx_v_sw->data), ((
double *)__pyx_v_mw->data), ((
double *)__pyx_v_dmw_dpsiw->data), ((
double *)__pyx_v_dmw_dpsic->data), ((
double *)__pyx_v_mn->data), ((
double *)__pyx_v_dmn_dpsiw->data), ((
double *)__pyx_v_dmn_dpsic->data), ((
double *)__pyx_v_phi_psiw->data), ((
double *)__pyx_v_dphi_psiw_dpsiw->data), ((
double *)__pyx_v_phi_psin->data), ((
double *)__pyx_v_dphi_psin_dpsiw->data), ((
double *)__pyx_v_dphi_psin_dpsic->data), ((
double *)__pyx_v_aw->data), ((
double *)__pyx_v_daw_dpsiw->data), ((
double *)__pyx_v_daw_dpsic->data), ((
double *)__pyx_v_an->data), ((
double *)__pyx_v_dan_dpsiw->data), ((
double *)__pyx_v_dan_dpsic->data)));
4474 #ifndef CYTHON_WITHOUT_ASSERTIONS
4475 if (unlikely(!Py_OptimizeFlag)) {
4477 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_configuration_density_w_flag_0_a, __pyx_n_s_format);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1014, __pyx_L1_error)
4478 __Pyx_GOTREF(__pyx_t_2);
4479 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_density_w_flag);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1014, __pyx_L1_error)
4480 __Pyx_GOTREF(__pyx_t_1);
4481 __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_density_n_flag);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1014, __pyx_L1_error)
4482 __Pyx_GOTREF(__pyx_t_5);
4485 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
4486 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
4487 if (likely(__pyx_t_6)) {
4488 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_2);
4489 __Pyx_INCREF(__pyx_t_6);
4490 __Pyx_INCREF(
function);
4491 __Pyx_DECREF_SET(__pyx_t_2,
function);
4495 #if CYTHON_FAST_PYCALL
4496 if (PyFunction_Check(__pyx_t_2)) {
4497 PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_1, __pyx_t_5};
4498 __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1014, __pyx_L1_error)
4499 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
4500 __Pyx_GOTREF(__pyx_t_3);
4501 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4502 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
4505 #if CYTHON_FAST_PYCCALL
4506 if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
4507 PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_1, __pyx_t_5};
4508 __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1014, __pyx_L1_error)
4509 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
4510 __Pyx_GOTREF(__pyx_t_3);
4511 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4512 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
4516 __pyx_t_7 = PyTuple_New(2+__pyx_t_4);
if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1014, __pyx_L1_error)
4517 __Pyx_GOTREF(__pyx_t_7);
4519 __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
4521 __Pyx_GIVEREF(__pyx_t_1);
4522 PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_4, __pyx_t_1);
4523 __Pyx_GIVEREF(__pyx_t_5);
4524 PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_4, __pyx_t_5);
4527 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1014, __pyx_L1_error)
4528 __Pyx_GOTREF(__pyx_t_3);
4529 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4531 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4532 __pyx_t_2 = PyTuple_Pack(1, __pyx_t_3);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1014, __pyx_L1_error)
4533 __Pyx_GOTREF(__pyx_t_2);
4534 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4535 PyErr_SetObject(PyExc_AssertionError, __pyx_t_2);
4536 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4537 __PYX_ERR(0, 1014, __pyx_L1_error)
4553 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4556 __Pyx_XDECREF(__pyx_t_1);
4557 __Pyx_XDECREF(__pyx_t_2);
4558 __Pyx_XDECREF(__pyx_t_3);
4559 __Pyx_XDECREF(__pyx_t_5);
4560 __Pyx_XDECREF(__pyx_t_6);
4561 __Pyx_XDECREF(__pyx_t_7);
4562 __Pyx_AddTraceback(
"cTwophaseDarcyCoefficients.twophaseDarcy_fc_pp_sd_het_matType", __pyx_clineno, __pyx_lineno, __pyx_filename);
4565 __Pyx_XGIVEREF(__pyx_r);
4566 __Pyx_RefNannyFinishContext();
4579 static PyObject *__pyx_pw_26cTwophaseDarcyCoefficients_7twophaseDarcy_incompressible_split_sd_pressure_het_matType(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
4580 static char __pyx_doc_26cTwophaseDarcyCoefficients_6twophaseDarcy_incompressible_split_sd_pressure_het_matType[] =
"Evaluate the pressure coefficients\n\nUse the split fractional flow formulation of incompressible, two-phase\nDarcy flow for a heterogeneous medium, sparse diffusion rep het\n\n ";
4581 static PyMethodDef __pyx_mdef_26cTwophaseDarcyCoefficients_7twophaseDarcy_incompressible_split_sd_pressure_het_matType = {
"twophaseDarcy_incompressible_split_sd_pressure_het_matType", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_26cTwophaseDarcyCoefficients_7twophaseDarcy_incompressible_split_sd_pressure_het_matType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_26cTwophaseDarcyCoefficients_6twophaseDarcy_incompressible_split_sd_pressure_het_matType};
4582 static PyObject *__pyx_pw_26cTwophaseDarcyCoefficients_7twophaseDarcy_incompressible_split_sd_pressure_het_matType(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4583 int __pyx_v_pskModelFlag;
4584 PyArrayObject *__pyx_v_rowptr = 0;
4585 PyArrayObject *__pyx_v_colind = 0;
4586 PyArrayObject *__pyx_v_matType = 0;
4589 PyArrayObject *__pyx_v_omega = 0;
4590 PyArrayObject *__pyx_v_Kbar = 0;
4592 PyArrayObject *__pyx_v_capillaryDiffusionScaling = 0;
4593 PyArrayObject *__pyx_v_rwork_psk = 0;
4594 PyArrayObject *__pyx_v_iwork_psk = 0;
4595 PyArrayObject *__pyx_v_rwork_psk_tol = 0;
4596 PyArrayObject *__pyx_v_rwork_density_w = 0;
4597 PyArrayObject *__pyx_v_rwork_density_n = 0;
4598 PyArrayObject *__pyx_v_g = 0;
4599 PyArrayObject *__pyx_v_sw = 0;
4600 PyArrayObject *__pyx_v_grad_psic = 0;
4601 PyArrayObject *__pyx_v_f = 0;
4602 PyArrayObject *__pyx_v_a = 0;
4603 int __pyx_lineno = 0;
4604 const char *__pyx_filename = NULL;
4605 int __pyx_clineno = 0;
4606 PyObject *__pyx_r = 0;
4607 __Pyx_RefNannyDeclarations
4608 __Pyx_RefNannySetupContext(
"twophaseDarcy_incompressible_split_sd_pressure_het_matType (wrapper)", 0);
4610 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pskModelFlag,&__pyx_n_s_rowptr,&__pyx_n_s_colind,&__pyx_n_s_matType,&__pyx_n_s_muw,&__pyx_n_s_mun,&__pyx_n_s_omega,&__pyx_n_s_Kbar,&__pyx_n_s_b,&__pyx_n_s_capillaryDiffusionScaling,&__pyx_n_s_rwork_psk,&__pyx_n_s_iwork_psk,&__pyx_n_s_rwork_psk_tol,&__pyx_n_s_rwork_density_w,&__pyx_n_s_rwork_density_n,&__pyx_n_s_g,&__pyx_n_s_sw,&__pyx_n_s_grad_psic,&__pyx_n_s_f,&__pyx_n_s_a,0};
4611 PyObject* values[20] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
4612 if (unlikely(__pyx_kwds)) {
4614 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
4616 case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
4618 case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
4620 case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
4622 case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
4624 case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
4626 case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
4628 case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
4630 case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
4632 case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
4634 case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
4636 case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
4638 case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
4640 case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
4642 case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
4644 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
4646 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
4648 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
4650 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4652 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4654 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4657 default:
goto __pyx_L5_argtuple_error;
4659 kw_args = PyDict_Size(__pyx_kwds);
4662 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pskModelFlag)) != 0)) kw_args--;
4663 else goto __pyx_L5_argtuple_error;
4666 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rowptr)) != 0)) kw_args--;
4668 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_sd_pressure_het_matType", 1, 20, 20, 1); __PYX_ERR(0, 1016, __pyx_L3_error)
4672 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_colind)) != 0)) kw_args--;
4674 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_sd_pressure_het_matType", 1, 20, 20, 2); __PYX_ERR(0, 1016, __pyx_L3_error)
4678 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_matType)) != 0)) kw_args--;
4680 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_sd_pressure_het_matType", 1, 20, 20, 3); __PYX_ERR(0, 1016, __pyx_L3_error)
4684 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_muw)) != 0)) kw_args--;
4686 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_sd_pressure_het_matType", 1, 20, 20, 4); __PYX_ERR(0, 1016, __pyx_L3_error)
4690 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mun)) != 0)) kw_args--;
4692 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_sd_pressure_het_matType", 1, 20, 20, 5); __PYX_ERR(0, 1016, __pyx_L3_error)
4696 if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_omega)) != 0)) kw_args--;
4698 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_sd_pressure_het_matType", 1, 20, 20, 6); __PYX_ERR(0, 1016, __pyx_L3_error)
4702 if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Kbar)) != 0)) kw_args--;
4704 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_sd_pressure_het_matType", 1, 20, 20, 7); __PYX_ERR(0, 1016, __pyx_L3_error)
4708 if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--;
4710 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_sd_pressure_het_matType", 1, 20, 20, 8); __PYX_ERR(0, 1016, __pyx_L3_error)
4714 if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_capillaryDiffusionScaling)) != 0)) kw_args--;
4716 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_sd_pressure_het_matType", 1, 20, 20, 9); __PYX_ERR(0, 1016, __pyx_L3_error)
4720 if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork_psk)) != 0)) kw_args--;
4722 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_sd_pressure_het_matType", 1, 20, 20, 10); __PYX_ERR(0, 1016, __pyx_L3_error)
4726 if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iwork_psk)) != 0)) kw_args--;
4728 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_sd_pressure_het_matType", 1, 20, 20, 11); __PYX_ERR(0, 1016, __pyx_L3_error)
4732 if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork_psk_tol)) != 0)) kw_args--;
4734 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_sd_pressure_het_matType", 1, 20, 20, 12); __PYX_ERR(0, 1016, __pyx_L3_error)
4738 if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork_density_w)) != 0)) kw_args--;
4740 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_sd_pressure_het_matType", 1, 20, 20, 13); __PYX_ERR(0, 1016, __pyx_L3_error)
4744 if (likely((values[14] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork_density_n)) != 0)) kw_args--;
4746 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_sd_pressure_het_matType", 1, 20, 20, 14); __PYX_ERR(0, 1016, __pyx_L3_error)
4750 if (likely((values[15] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_g)) != 0)) kw_args--;
4752 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_sd_pressure_het_matType", 1, 20, 20, 15); __PYX_ERR(0, 1016, __pyx_L3_error)
4756 if (likely((values[16] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sw)) != 0)) kw_args--;
4758 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_sd_pressure_het_matType", 1, 20, 20, 16); __PYX_ERR(0, 1016, __pyx_L3_error)
4762 if (likely((values[17] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_psic)) != 0)) kw_args--;
4764 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_sd_pressure_het_matType", 1, 20, 20, 17); __PYX_ERR(0, 1016, __pyx_L3_error)
4768 if (likely((values[18] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_f)) != 0)) kw_args--;
4770 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_sd_pressure_het_matType", 1, 20, 20, 18); __PYX_ERR(0, 1016, __pyx_L3_error)
4774 if (likely((values[19] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
4776 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_sd_pressure_het_matType", 1, 20, 20, 19); __PYX_ERR(0, 1016, __pyx_L3_error)
4779 if (unlikely(kw_args > 0)) {
4780 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"twophaseDarcy_incompressible_split_sd_pressure_het_matType") < 0)) __PYX_ERR(0, 1016, __pyx_L3_error)
4782 }
else if (PyTuple_GET_SIZE(__pyx_args) != 20) {
4783 goto __pyx_L5_argtuple_error;
4785 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4786 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4787 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4788 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
4789 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
4790 values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
4791 values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
4792 values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
4793 values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
4794 values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
4795 values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
4796 values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
4797 values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
4798 values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
4799 values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
4800 values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
4801 values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
4802 values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
4803 values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
4804 values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
4806 __pyx_v_pskModelFlag = __Pyx_PyInt_As_int(values[0]);
if (unlikely((__pyx_v_pskModelFlag == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1016, __pyx_L3_error)
4807 __pyx_v_rowptr = ((PyArrayObject *)values[1]);
4808 __pyx_v_colind = ((PyArrayObject *)values[2]);
4809 __pyx_v_matType = ((PyArrayObject *)values[3]);
4810 __pyx_v_muw = __pyx_PyFloat_AsDouble(values[4]);
if (unlikely((__pyx_v_muw == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1020, __pyx_L3_error)
4811 __pyx_v_mun = __pyx_PyFloat_AsDouble(values[5]);
if (unlikely((__pyx_v_mun == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1021, __pyx_L3_error)
4812 __pyx_v_omega = ((PyArrayObject *)values[6]);
4813 __pyx_v_Kbar = ((PyArrayObject *)values[7]);
4814 __pyx_v_b = __pyx_PyFloat_AsDouble(values[8]);
if (unlikely((__pyx_v_b == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1024, __pyx_L3_error)
4815 __pyx_v_capillaryDiffusionScaling = ((PyArrayObject *)values[9]);
4816 __pyx_v_rwork_psk = ((PyArrayObject *)values[10]);
4817 __pyx_v_iwork_psk = ((PyArrayObject *)values[11]);
4818 __pyx_v_rwork_psk_tol = ((PyArrayObject *)values[12]);
4819 __pyx_v_rwork_density_w = ((PyArrayObject *)values[13]);
4820 __pyx_v_rwork_density_n = ((PyArrayObject *)values[14]);
4821 __pyx_v_g = ((PyArrayObject *)values[15]);
4822 __pyx_v_sw = ((PyArrayObject *)values[16]);
4823 __pyx_v_grad_psic = ((PyArrayObject *)values[17]);
4824 __pyx_v_f = ((PyArrayObject *)values[18]);
4825 __pyx_v_a = ((PyArrayObject *)values[19]);
4827 goto __pyx_L4_argument_unpacking_done;
4828 __pyx_L5_argtuple_error:;
4829 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_sd_pressure_het_matType", 1, 20, 20, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1016, __pyx_L3_error)
4831 __Pyx_AddTraceback(
"cTwophaseDarcyCoefficients.twophaseDarcy_incompressible_split_sd_pressure_het_matType", __pyx_clineno, __pyx_lineno, __pyx_filename);
4832 __Pyx_RefNannyFinishContext();
4834 __pyx_L4_argument_unpacking_done:;
4835 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rowptr), __pyx_ptype_5numpy_ndarray, 1,
"rowptr", 0))) __PYX_ERR(0, 1017, __pyx_L1_error)
4836 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_colind), __pyx_ptype_5numpy_ndarray, 1,
"colind", 0))) __PYX_ERR(0, 1018, __pyx_L1_error)
4837 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_matType), __pyx_ptype_5numpy_ndarray, 1,
"matType", 0))) __PYX_ERR(0, 1019, __pyx_L1_error)
4838 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_omega), __pyx_ptype_5numpy_ndarray, 1,
"omega", 0))) __PYX_ERR(0, 1022, __pyx_L1_error)
4839 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Kbar), __pyx_ptype_5numpy_ndarray, 1,
"Kbar", 0))) __PYX_ERR(0, 1023, __pyx_L1_error)
4840 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_capillaryDiffusionScaling), __pyx_ptype_5numpy_ndarray, 1,
"capillaryDiffusionScaling", 0))) __PYX_ERR(0, 1025, __pyx_L1_error)
4841 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_psk), __pyx_ptype_5numpy_ndarray, 1,
"rwork_psk", 0))) __PYX_ERR(0, 1026, __pyx_L1_error)
4842 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork_psk), __pyx_ptype_5numpy_ndarray, 1,
"iwork_psk", 0))) __PYX_ERR(0, 1027, __pyx_L1_error)
4843 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_psk_tol), __pyx_ptype_5numpy_ndarray, 1,
"rwork_psk_tol", 0))) __PYX_ERR(0, 1028, __pyx_L1_error)
4844 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_density_w), __pyx_ptype_5numpy_ndarray, 1,
"rwork_density_w", 0))) __PYX_ERR(0, 1029, __pyx_L1_error)
4845 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_density_n), __pyx_ptype_5numpy_ndarray, 1,
"rwork_density_n", 0))) __PYX_ERR(0, 1030, __pyx_L1_error)
4846 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_g), __pyx_ptype_5numpy_ndarray, 1,
"g", 0))) __PYX_ERR(0, 1031, __pyx_L1_error)
4847 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sw), __pyx_ptype_5numpy_ndarray, 1,
"sw", 0))) __PYX_ERR(0, 1032, __pyx_L1_error)
4848 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_psic), __pyx_ptype_5numpy_ndarray, 1,
"grad_psic", 0))) __PYX_ERR(0, 1033, __pyx_L1_error)
4849 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_f), __pyx_ptype_5numpy_ndarray, 1,
"f", 0))) __PYX_ERR(0, 1034, __pyx_L1_error)
4850 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1,
"a", 0))) __PYX_ERR(0, 1035, __pyx_L1_error)
4851 __pyx_r = __pyx_pf_26cTwophaseDarcyCoefficients_6twophaseDarcy_incompressible_split_sd_pressure_het_matType(__pyx_self, __pyx_v_pskModelFlag, __pyx_v_rowptr, __pyx_v_colind, __pyx_v_matType, __pyx_v_muw, __pyx_v_mun, __pyx_v_omega, __pyx_v_Kbar, __pyx_v_b, __pyx_v_capillaryDiffusionScaling, __pyx_v_rwork_psk, __pyx_v_iwork_psk, __pyx_v_rwork_psk_tol, __pyx_v_rwork_density_w, __pyx_v_rwork_density_n, __pyx_v_g, __pyx_v_sw, __pyx_v_grad_psic, __pyx_v_f, __pyx_v_a);
4858 __Pyx_RefNannyFinishContext();
4862 static PyObject *__pyx_pf_26cTwophaseDarcyCoefficients_6twophaseDarcy_incompressible_split_sd_pressure_het_matType(CYTHON_UNUSED PyObject *__pyx_self,
int __pyx_v_pskModelFlag, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_matType,
double __pyx_v_muw,
double __pyx_v_mun, PyArrayObject *__pyx_v_omega, PyArrayObject *__pyx_v_Kbar,
double __pyx_v_b, PyArrayObject *__pyx_v_capillaryDiffusionScaling, PyArrayObject *__pyx_v_rwork_psk, PyArrayObject *__pyx_v_iwork_psk, PyArrayObject *__pyx_v_rwork_psk_tol, PyArrayObject *__pyx_v_rwork_density_w, PyArrayObject *__pyx_v_rwork_density_n, PyArrayObject *__pyx_v_g, PyArrayObject *__pyx_v_sw, PyArrayObject *__pyx_v_grad_psic, PyArrayObject *__pyx_v_f, PyArrayObject *__pyx_v_a) {
4863 int __pyx_v_nPointsPerSimplex;
4864 int __pyx_v_nSimplex;
4865 PyObject *__pyx_r = NULL;
4866 __Pyx_RefNannyDeclarations
4867 PyObject *__pyx_t_1 = NULL;
4868 PyObject *__pyx_t_2 = NULL;
4869 PyObject *__pyx_t_3 = NULL;
4872 int __pyx_lineno = 0;
4873 const char *__pyx_filename = NULL;
4874 int __pyx_clineno = 0;
4875 __Pyx_RefNannySetupContext(
"twophaseDarcy_incompressible_split_sd_pressure_het_matType", 0);
4884 __pyx_v_nPointsPerSimplex = (__pyx_v_sw->dimensions[(__pyx_v_sw->nd - 1)]);
4893 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_sw), __pyx_n_s_size);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1043, __pyx_L1_error)
4894 __Pyx_GOTREF(__pyx_t_1);
4895 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_nPointsPerSimplex);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1043, __pyx_L1_error)
4896 __Pyx_GOTREF(__pyx_t_2);
4897 __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1043, __pyx_L1_error)
4898 __Pyx_GOTREF(__pyx_t_3);
4899 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4900 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4901 __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3);
if (unlikely((__pyx_t_4 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1043, __pyx_L1_error)
4902 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4903 __pyx_v_nSimplex = __pyx_t_4;
4912 switch (__pyx_v_pskModelFlag) {
4922 __pyx_t_5 = __pyx_PyFloat_AsDouble(((PyObject *)__pyx_v_capillaryDiffusionScaling));
if (unlikely((__pyx_t_5 == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1057, __pyx_L1_error)
4931 (void)(twophaseDarcy_incompressible_split_sd_pressure_het_matType<SimplePSK>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_v_g->dimensions[0]), 2, ((
int *)__pyx_v_rowptr->data), ((
int *)__pyx_v_colind->data), ((
int *)__pyx_v_matType->data), __pyx_v_muw, __pyx_v_mun, ((
double *)__pyx_v_omega->data), ((
double *)__pyx_v_Kbar->data), __pyx_v_b, __pyx_t_5, ((
double *)__pyx_v_rwork_psk->data), ((
int *)__pyx_v_iwork_psk->data), ((
double *)__pyx_v_rwork_psk_tol->data), ((
double *)__pyx_v_rwork_density_w->data), ((
double *)__pyx_v_rwork_density_n->data), ((
double *)__pyx_v_g->data), ((
double *)__pyx_v_sw->data), ((
double *)__pyx_v_grad_psic->data), ((
double *)__pyx_v_f->data), ((
double *)__pyx_v_a->data)));
4950 __pyx_t_5 = __pyx_PyFloat_AsDouble(((PyObject *)__pyx_v_capillaryDiffusionScaling));
if (unlikely((__pyx_t_5 == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1080, __pyx_L1_error)
4959 (void)(twophaseDarcy_incompressible_split_sd_pressure_het_matType<VGM>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_v_g->dimensions[0]), 4, ((
int *)__pyx_v_rowptr->data), ((
int *)__pyx_v_colind->data), ((
int *)__pyx_v_matType->data), __pyx_v_muw, __pyx_v_mun, ((
double *)__pyx_v_omega->data), ((
double *)__pyx_v_Kbar->data), __pyx_v_b, __pyx_t_5, ((
double *)__pyx_v_rwork_psk->data), ((
int *)__pyx_v_iwork_psk->data), ((
double *)__pyx_v_rwork_psk_tol->data), ((
double *)__pyx_v_rwork_density_w->data), ((
double *)__pyx_v_rwork_density_n->data), ((
double *)__pyx_v_g->data), ((
double *)__pyx_v_sw->data), ((
double *)__pyx_v_grad_psic->data), ((
double *)__pyx_v_f->data), ((
double *)__pyx_v_a->data)));
4978 __pyx_t_5 = __pyx_PyFloat_AsDouble(((PyObject *)__pyx_v_capillaryDiffusionScaling));
if (unlikely((__pyx_t_5 == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1104, __pyx_L1_error)
4987 (void)(twophaseDarcy_incompressible_split_sd_pressure_het_matType<SimplePSK>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_v_g->dimensions[0]), 2, ((
int *)__pyx_v_rowptr->data), ((
int *)__pyx_v_colind->data), ((
int *)__pyx_v_matType->data), __pyx_v_muw, __pyx_v_mun, ((
double *)__pyx_v_omega->data), ((
double *)__pyx_v_Kbar->data), __pyx_v_b, __pyx_t_5, ((
double *)__pyx_v_rwork_psk->data), ((
int *)__pyx_v_iwork_psk->data), ((
double *)__pyx_v_rwork_psk_tol->data), ((
double *)__pyx_v_rwork_density_w->data), ((
double *)__pyx_v_rwork_density_n->data), ((
double *)__pyx_v_g->data), ((
double *)__pyx_v_sw->data), ((
double *)__pyx_v_grad_psic->data), ((
double *)__pyx_v_f->data), ((
double *)__pyx_v_a->data)));
5000 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5003 __Pyx_XDECREF(__pyx_t_1);
5004 __Pyx_XDECREF(__pyx_t_2);
5005 __Pyx_XDECREF(__pyx_t_3);
5006 __Pyx_AddTraceback(
"cTwophaseDarcyCoefficients.twophaseDarcy_incompressible_split_sd_pressure_het_matType", __pyx_clineno, __pyx_lineno, __pyx_filename);
5009 __Pyx_XGIVEREF(__pyx_r);
5010 __Pyx_RefNannyFinishContext();
5023 static PyObject *__pyx_pw_26cTwophaseDarcyCoefficients_9twophaseDarcy_incompressible_split_sd_saturation_het_matType(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
5024 static char __pyx_doc_26cTwophaseDarcyCoefficients_8twophaseDarcy_incompressible_split_sd_saturation_het_matType[] =
"Evaluate the saturation coefficients\n\nUse the split fractional flow formulation of incompressible, two-phase\nDarcy flow for a heterogeneous medium, sparse diffusion rep het\n ";
5025 static PyMethodDef __pyx_mdef_26cTwophaseDarcyCoefficients_9twophaseDarcy_incompressible_split_sd_saturation_het_matType = {
"twophaseDarcy_incompressible_split_sd_saturation_het_matType", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_26cTwophaseDarcyCoefficients_9twophaseDarcy_incompressible_split_sd_saturation_het_matType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_26cTwophaseDarcyCoefficients_8twophaseDarcy_incompressible_split_sd_saturation_het_matType};
5026 static PyObject *__pyx_pw_26cTwophaseDarcyCoefficients_9twophaseDarcy_incompressible_split_sd_saturation_het_matType(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5027 int __pyx_v_pskModelFlag;
5028 int __pyx_v_density_w_flag;
5029 CYTHON_UNUSED
int __pyx_v_density_n_flag;
5030 PyArrayObject *__pyx_v_rowptr = 0;
5031 PyArrayObject *__pyx_v_colind = 0;
5032 PyArrayObject *__pyx_v_matType = 0;
5035 PyArrayObject *__pyx_v_omega = 0;
5036 PyArrayObject *__pyx_v_Kbar = 0;
5038 double __pyx_v_capillaryDiffusionScaling;
5039 double __pyx_v_advectionScaling;
5040 PyArrayObject *__pyx_v_rwork_psk = 0;
5041 PyArrayObject *__pyx_v_iwork_psk = 0;
5042 PyArrayObject *__pyx_v_rwork_psk_tol = 0;
5043 PyArrayObject *__pyx_v_rwork_density_w = 0;
5044 PyArrayObject *__pyx_v_rwork_density_n = 0;
5045 PyArrayObject *__pyx_v_g = 0;
5046 PyArrayObject *__pyx_v_qt = 0;
5047 PyArrayObject *__pyx_v_psiw = 0;
5048 PyArrayObject *__pyx_v_sw = 0;
5049 PyArrayObject *__pyx_v_m = 0;
5050 PyArrayObject *__pyx_v_dm = 0;
5051 PyArrayObject *__pyx_v_phi = 0;
5052 PyArrayObject *__pyx_v_dphi = 0;
5053 PyArrayObject *__pyx_v_f = 0;
5054 PyArrayObject *__pyx_v_df = 0;
5055 PyArrayObject *__pyx_v_a = 0;
5056 PyArrayObject *__pyx_v_da = 0;
5057 int __pyx_lineno = 0;
5058 const char *__pyx_filename = NULL;
5059 int __pyx_clineno = 0;
5060 PyObject *__pyx_r = 0;
5061 __Pyx_RefNannyDeclarations
5062 __Pyx_RefNannySetupContext(
"twophaseDarcy_incompressible_split_sd_saturation_het_matType (wrapper)", 0);
5064 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pskModelFlag,&__pyx_n_s_density_w_flag,&__pyx_n_s_density_n_flag,&__pyx_n_s_rowptr,&__pyx_n_s_colind,&__pyx_n_s_matType,&__pyx_n_s_muw,&__pyx_n_s_mun,&__pyx_n_s_omega,&__pyx_n_s_Kbar,&__pyx_n_s_b,&__pyx_n_s_capillaryDiffusionScaling,&__pyx_n_s_advectionScaling,&__pyx_n_s_rwork_psk,&__pyx_n_s_iwork_psk,&__pyx_n_s_rwork_psk_tol,&__pyx_n_s_rwork_density_w,&__pyx_n_s_rwork_density_n,&__pyx_n_s_g,&__pyx_n_s_qt,&__pyx_n_s_psiw,&__pyx_n_s_sw,&__pyx_n_s_m,&__pyx_n_s_dm,&__pyx_n_s_phi,&__pyx_n_s_dphi,&__pyx_n_s_f,&__pyx_n_s_df,&__pyx_n_s_a,&__pyx_n_s_da,0};
5065 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};
5066 if (unlikely(__pyx_kwds)) {
5068 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5070 case 30: values[29] = PyTuple_GET_ITEM(__pyx_args, 29);
5072 case 29: values[28] = PyTuple_GET_ITEM(__pyx_args, 28);
5074 case 28: values[27] = PyTuple_GET_ITEM(__pyx_args, 27);
5076 case 27: values[26] = PyTuple_GET_ITEM(__pyx_args, 26);
5078 case 26: values[25] = PyTuple_GET_ITEM(__pyx_args, 25);
5080 case 25: values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
5082 case 24: values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
5084 case 23: values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
5086 case 22: values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
5088 case 21: values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
5090 case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
5092 case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
5094 case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
5096 case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
5098 case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
5100 case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
5102 case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
5104 case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
5106 case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
5108 case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
5110 case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
5112 case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
5114 case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
5116 case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
5118 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
5120 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
5122 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
5124 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5126 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5128 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5131 default:
goto __pyx_L5_argtuple_error;
5133 kw_args = PyDict_Size(__pyx_kwds);
5136 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pskModelFlag)) != 0)) kw_args--;
5137 else goto __pyx_L5_argtuple_error;
5140 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_density_w_flag)) != 0)) kw_args--;
5142 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_sd_saturation_het_matType", 1, 30, 30, 1); __PYX_ERR(0, 1116, __pyx_L3_error)
5146 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_density_n_flag)) != 0)) kw_args--;
5148 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_sd_saturation_het_matType", 1, 30, 30, 2); __PYX_ERR(0, 1116, __pyx_L3_error)
5152 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rowptr)) != 0)) kw_args--;
5154 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_sd_saturation_het_matType", 1, 30, 30, 3); __PYX_ERR(0, 1116, __pyx_L3_error)
5158 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_colind)) != 0)) kw_args--;
5160 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_sd_saturation_het_matType", 1, 30, 30, 4); __PYX_ERR(0, 1116, __pyx_L3_error)
5164 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_matType)) != 0)) kw_args--;
5166 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_sd_saturation_het_matType", 1, 30, 30, 5); __PYX_ERR(0, 1116, __pyx_L3_error)
5170 if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_muw)) != 0)) kw_args--;
5172 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_sd_saturation_het_matType", 1, 30, 30, 6); __PYX_ERR(0, 1116, __pyx_L3_error)
5176 if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mun)) != 0)) kw_args--;
5178 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_sd_saturation_het_matType", 1, 30, 30, 7); __PYX_ERR(0, 1116, __pyx_L3_error)
5182 if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_omega)) != 0)) kw_args--;
5184 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_sd_saturation_het_matType", 1, 30, 30, 8); __PYX_ERR(0, 1116, __pyx_L3_error)
5188 if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Kbar)) != 0)) kw_args--;
5190 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_sd_saturation_het_matType", 1, 30, 30, 9); __PYX_ERR(0, 1116, __pyx_L3_error)
5194 if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--;
5196 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_sd_saturation_het_matType", 1, 30, 30, 10); __PYX_ERR(0, 1116, __pyx_L3_error)
5200 if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_capillaryDiffusionScaling)) != 0)) kw_args--;
5202 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_sd_saturation_het_matType", 1, 30, 30, 11); __PYX_ERR(0, 1116, __pyx_L3_error)
5206 if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_advectionScaling)) != 0)) kw_args--;
5208 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_sd_saturation_het_matType", 1, 30, 30, 12); __PYX_ERR(0, 1116, __pyx_L3_error)
5212 if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork_psk)) != 0)) kw_args--;
5214 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_sd_saturation_het_matType", 1, 30, 30, 13); __PYX_ERR(0, 1116, __pyx_L3_error)
5218 if (likely((values[14] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iwork_psk)) != 0)) kw_args--;
5220 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_sd_saturation_het_matType", 1, 30, 30, 14); __PYX_ERR(0, 1116, __pyx_L3_error)
5224 if (likely((values[15] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork_psk_tol)) != 0)) kw_args--;
5226 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_sd_saturation_het_matType", 1, 30, 30, 15); __PYX_ERR(0, 1116, __pyx_L3_error)
5230 if (likely((values[16] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork_density_w)) != 0)) kw_args--;
5232 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_sd_saturation_het_matType", 1, 30, 30, 16); __PYX_ERR(0, 1116, __pyx_L3_error)
5236 if (likely((values[17] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork_density_n)) != 0)) kw_args--;
5238 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_sd_saturation_het_matType", 1, 30, 30, 17); __PYX_ERR(0, 1116, __pyx_L3_error)
5242 if (likely((values[18] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_g)) != 0)) kw_args--;
5244 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_sd_saturation_het_matType", 1, 30, 30, 18); __PYX_ERR(0, 1116, __pyx_L3_error)
5248 if (likely((values[19] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_qt)) != 0)) kw_args--;
5250 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_sd_saturation_het_matType", 1, 30, 30, 19); __PYX_ERR(0, 1116, __pyx_L3_error)
5254 if (likely((values[20] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_psiw)) != 0)) kw_args--;
5256 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_sd_saturation_het_matType", 1, 30, 30, 20); __PYX_ERR(0, 1116, __pyx_L3_error)
5260 if (likely((values[21] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sw)) != 0)) kw_args--;
5262 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_sd_saturation_het_matType", 1, 30, 30, 21); __PYX_ERR(0, 1116, __pyx_L3_error)
5266 if (likely((values[22] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
5268 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_sd_saturation_het_matType", 1, 30, 30, 22); __PYX_ERR(0, 1116, __pyx_L3_error)
5272 if (likely((values[23] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dm)) != 0)) kw_args--;
5274 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_sd_saturation_het_matType", 1, 30, 30, 23); __PYX_ERR(0, 1116, __pyx_L3_error)
5278 if (likely((values[24] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_phi)) != 0)) kw_args--;
5280 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_sd_saturation_het_matType", 1, 30, 30, 24); __PYX_ERR(0, 1116, __pyx_L3_error)
5284 if (likely((values[25] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dphi)) != 0)) kw_args--;
5286 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_sd_saturation_het_matType", 1, 30, 30, 25); __PYX_ERR(0, 1116, __pyx_L3_error)
5290 if (likely((values[26] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_f)) != 0)) kw_args--;
5292 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_sd_saturation_het_matType", 1, 30, 30, 26); __PYX_ERR(0, 1116, __pyx_L3_error)
5296 if (likely((values[27] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_df)) != 0)) kw_args--;
5298 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_sd_saturation_het_matType", 1, 30, 30, 27); __PYX_ERR(0, 1116, __pyx_L3_error)
5302 if (likely((values[28] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
5304 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_sd_saturation_het_matType", 1, 30, 30, 28); __PYX_ERR(0, 1116, __pyx_L3_error)
5308 if (likely((values[29] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_da)) != 0)) kw_args--;
5310 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_sd_saturation_het_matType", 1, 30, 30, 29); __PYX_ERR(0, 1116, __pyx_L3_error)
5313 if (unlikely(kw_args > 0)) {
5314 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"twophaseDarcy_incompressible_split_sd_saturation_het_matType") < 0)) __PYX_ERR(0, 1116, __pyx_L3_error)
5316 }
else if (PyTuple_GET_SIZE(__pyx_args) != 30) {
5317 goto __pyx_L5_argtuple_error;
5319 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5320 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5321 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5322 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
5323 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
5324 values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
5325 values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
5326 values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
5327 values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
5328 values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
5329 values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
5330 values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
5331 values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
5332 values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
5333 values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
5334 values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
5335 values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
5336 values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
5337 values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
5338 values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
5339 values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
5340 values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
5341 values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
5342 values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
5343 values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
5344 values[25] = PyTuple_GET_ITEM(__pyx_args, 25);
5345 values[26] = PyTuple_GET_ITEM(__pyx_args, 26);
5346 values[27] = PyTuple_GET_ITEM(__pyx_args, 27);
5347 values[28] = PyTuple_GET_ITEM(__pyx_args, 28);
5348 values[29] = PyTuple_GET_ITEM(__pyx_args, 29);
5350 __pyx_v_pskModelFlag = __Pyx_PyInt_As_int(values[0]);
if (unlikely((__pyx_v_pskModelFlag == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1116, __pyx_L3_error)
5351 __pyx_v_density_w_flag = __Pyx_PyInt_As_int(values[1]);
if (unlikely((__pyx_v_density_w_flag == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1117, __pyx_L3_error)
5352 __pyx_v_density_n_flag = __Pyx_PyInt_As_int(values[2]);
if (unlikely((__pyx_v_density_n_flag == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1118, __pyx_L3_error)
5353 __pyx_v_rowptr = ((PyArrayObject *)values[3]);
5354 __pyx_v_colind = ((PyArrayObject *)values[4]);
5355 __pyx_v_matType = ((PyArrayObject *)values[5]);
5356 __pyx_v_muw = __pyx_PyFloat_AsDouble(values[6]);
if (unlikely((__pyx_v_muw == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1122, __pyx_L3_error)
5357 __pyx_v_mun = __pyx_PyFloat_AsDouble(values[7]);
if (unlikely((__pyx_v_mun == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1123, __pyx_L3_error)
5358 __pyx_v_omega = ((PyArrayObject *)values[8]);
5359 __pyx_v_Kbar = ((PyArrayObject *)values[9]);
5360 __pyx_v_b = __pyx_PyFloat_AsDouble(values[10]);
if (unlikely((__pyx_v_b == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1126, __pyx_L3_error)
5361 __pyx_v_capillaryDiffusionScaling = __pyx_PyFloat_AsDouble(values[11]);
if (unlikely((__pyx_v_capillaryDiffusionScaling == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1127, __pyx_L3_error)
5362 __pyx_v_advectionScaling = __pyx_PyFloat_AsDouble(values[12]);
if (unlikely((__pyx_v_advectionScaling == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1128, __pyx_L3_error)
5363 __pyx_v_rwork_psk = ((PyArrayObject *)values[13]);
5364 __pyx_v_iwork_psk = ((PyArrayObject *)values[14]);
5365 __pyx_v_rwork_psk_tol = ((PyArrayObject *)values[15]);
5366 __pyx_v_rwork_density_w = ((PyArrayObject *)values[16]);
5367 __pyx_v_rwork_density_n = ((PyArrayObject *)values[17]);
5368 __pyx_v_g = ((PyArrayObject *)values[18]);
5369 __pyx_v_qt = ((PyArrayObject *)values[19]);
5370 __pyx_v_psiw = ((PyArrayObject *)values[20]);
5371 __pyx_v_sw = ((PyArrayObject *)values[21]);
5372 __pyx_v_m = ((PyArrayObject *)values[22]);
5373 __pyx_v_dm = ((PyArrayObject *)values[23]);
5374 __pyx_v_phi = ((PyArrayObject *)values[24]);
5375 __pyx_v_dphi = ((PyArrayObject *)values[25]);
5376 __pyx_v_f = ((PyArrayObject *)values[26]);
5377 __pyx_v_df = ((PyArrayObject *)values[27]);
5378 __pyx_v_a = ((PyArrayObject *)values[28]);
5379 __pyx_v_da = ((PyArrayObject *)values[29]);
5381 goto __pyx_L4_argument_unpacking_done;
5382 __pyx_L5_argtuple_error:;
5383 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_sd_saturation_het_matType", 1, 30, 30, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1116, __pyx_L3_error)
5385 __Pyx_AddTraceback(
"cTwophaseDarcyCoefficients.twophaseDarcy_incompressible_split_sd_saturation_het_matType", __pyx_clineno, __pyx_lineno, __pyx_filename);
5386 __Pyx_RefNannyFinishContext();
5388 __pyx_L4_argument_unpacking_done:;
5389 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rowptr), __pyx_ptype_5numpy_ndarray, 1,
"rowptr", 0))) __PYX_ERR(0, 1119, __pyx_L1_error)
5390 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_colind), __pyx_ptype_5numpy_ndarray, 1,
"colind", 0))) __PYX_ERR(0, 1120, __pyx_L1_error)
5391 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_matType), __pyx_ptype_5numpy_ndarray, 1,
"matType", 0))) __PYX_ERR(0, 1121, __pyx_L1_error)
5392 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_omega), __pyx_ptype_5numpy_ndarray, 1,
"omega", 0))) __PYX_ERR(0, 1124, __pyx_L1_error)
5393 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Kbar), __pyx_ptype_5numpy_ndarray, 1,
"Kbar", 0))) __PYX_ERR(0, 1125, __pyx_L1_error)
5394 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_psk), __pyx_ptype_5numpy_ndarray, 1,
"rwork_psk", 0))) __PYX_ERR(0, 1129, __pyx_L1_error)
5395 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork_psk), __pyx_ptype_5numpy_ndarray, 1,
"iwork_psk", 0))) __PYX_ERR(0, 1130, __pyx_L1_error)
5396 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_psk_tol), __pyx_ptype_5numpy_ndarray, 1,
"rwork_psk_tol", 0))) __PYX_ERR(0, 1131, __pyx_L1_error)
5397 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_density_w), __pyx_ptype_5numpy_ndarray, 1,
"rwork_density_w", 0))) __PYX_ERR(0, 1132, __pyx_L1_error)
5398 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_density_n), __pyx_ptype_5numpy_ndarray, 1,
"rwork_density_n", 0))) __PYX_ERR(0, 1133, __pyx_L1_error)
5399 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_g), __pyx_ptype_5numpy_ndarray, 1,
"g", 0))) __PYX_ERR(0, 1134, __pyx_L1_error)
5400 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_qt), __pyx_ptype_5numpy_ndarray, 1,
"qt", 0))) __PYX_ERR(0, 1135, __pyx_L1_error)
5401 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_psiw), __pyx_ptype_5numpy_ndarray, 1,
"psiw", 0))) __PYX_ERR(0, 1136, __pyx_L1_error)
5402 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sw), __pyx_ptype_5numpy_ndarray, 1,
"sw", 0))) __PYX_ERR(0, 1137, __pyx_L1_error)
5403 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_m), __pyx_ptype_5numpy_ndarray, 1,
"m", 0))) __PYX_ERR(0, 1138, __pyx_L1_error)
5404 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dm), __pyx_ptype_5numpy_ndarray, 1,
"dm", 0))) __PYX_ERR(0, 1139, __pyx_L1_error)
5405 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_phi), __pyx_ptype_5numpy_ndarray, 1,
"phi", 0))) __PYX_ERR(0, 1140, __pyx_L1_error)
5406 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dphi), __pyx_ptype_5numpy_ndarray, 1,
"dphi", 0))) __PYX_ERR(0, 1141, __pyx_L1_error)
5407 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_f), __pyx_ptype_5numpy_ndarray, 1,
"f", 0))) __PYX_ERR(0, 1142, __pyx_L1_error)
5408 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_df), __pyx_ptype_5numpy_ndarray, 1,
"df", 0))) __PYX_ERR(0, 1143, __pyx_L1_error)
5409 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1,
"a", 0))) __PYX_ERR(0, 1144, __pyx_L1_error)
5410 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_da), __pyx_ptype_5numpy_ndarray, 1,
"da", 0))) __PYX_ERR(0, 1145, __pyx_L1_error)
5411 __pyx_r = __pyx_pf_26cTwophaseDarcyCoefficients_8twophaseDarcy_incompressible_split_sd_saturation_het_matType(__pyx_self, __pyx_v_pskModelFlag, __pyx_v_density_w_flag, __pyx_v_density_n_flag, __pyx_v_rowptr, __pyx_v_colind, __pyx_v_matType, __pyx_v_muw, __pyx_v_mun, __pyx_v_omega, __pyx_v_Kbar, __pyx_v_b, __pyx_v_capillaryDiffusionScaling, __pyx_v_advectionScaling, __pyx_v_rwork_psk, __pyx_v_iwork_psk, __pyx_v_rwork_psk_tol, __pyx_v_rwork_density_w, __pyx_v_rwork_density_n, __pyx_v_g, __pyx_v_qt, __pyx_v_psiw, __pyx_v_sw, __pyx_v_m, __pyx_v_dm, __pyx_v_phi, __pyx_v_dphi, __pyx_v_f, __pyx_v_df, __pyx_v_a, __pyx_v_da);
5418 __Pyx_RefNannyFinishContext();
5422 static PyObject *__pyx_pf_26cTwophaseDarcyCoefficients_8twophaseDarcy_incompressible_split_sd_saturation_het_matType(CYTHON_UNUSED PyObject *__pyx_self,
int __pyx_v_pskModelFlag,
int __pyx_v_density_w_flag, CYTHON_UNUSED
int __pyx_v_density_n_flag, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_matType,
double __pyx_v_muw,
double __pyx_v_mun, PyArrayObject *__pyx_v_omega, PyArrayObject *__pyx_v_Kbar,
double __pyx_v_b,
double __pyx_v_capillaryDiffusionScaling,
double __pyx_v_advectionScaling, PyArrayObject *__pyx_v_rwork_psk, PyArrayObject *__pyx_v_iwork_psk, PyArrayObject *__pyx_v_rwork_psk_tol, PyArrayObject *__pyx_v_rwork_density_w, PyArrayObject *__pyx_v_rwork_density_n, PyArrayObject *__pyx_v_g, PyArrayObject *__pyx_v_qt, PyArrayObject *__pyx_v_psiw, PyArrayObject *__pyx_v_sw, PyArrayObject *__pyx_v_m, PyArrayObject *__pyx_v_dm, PyArrayObject *__pyx_v_phi, PyArrayObject *__pyx_v_dphi, PyArrayObject *__pyx_v_f, PyArrayObject *__pyx_v_df, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_da) {
5423 int __pyx_v_nPointsPerSimplex;
5424 int __pyx_v_nSimplex;
5425 PyObject *__pyx_r = NULL;
5426 __Pyx_RefNannyDeclarations
5427 PyObject *__pyx_t_1 = NULL;
5428 PyObject *__pyx_t_2 = NULL;
5429 PyObject *__pyx_t_3 = NULL;
5431 int __pyx_lineno = 0;
5432 const char *__pyx_filename = NULL;
5433 int __pyx_clineno = 0;
5434 __Pyx_RefNannySetupContext(
"twophaseDarcy_incompressible_split_sd_saturation_het_matType", 0);
5443 __pyx_v_nPointsPerSimplex = (__pyx_v_sw->dimensions[(__pyx_v_sw->nd - 1)]);
5452 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_sw), __pyx_n_s_size);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1152, __pyx_L1_error)
5453 __Pyx_GOTREF(__pyx_t_1);
5454 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_nPointsPerSimplex);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1152, __pyx_L1_error)
5455 __Pyx_GOTREF(__pyx_t_2);
5456 __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1152, __pyx_L1_error)
5457 __Pyx_GOTREF(__pyx_t_3);
5458 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5459 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5460 __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3);
if (unlikely((__pyx_t_4 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1152, __pyx_L1_error)
5461 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5462 __pyx_v_nSimplex = __pyx_t_4;
5471 #ifndef CYTHON_WITHOUT_ASSERTIONS
5472 if (unlikely(!Py_OptimizeFlag)) {
5473 if (unlikely(!((__pyx_v_density_w_flag == 1) != 0))) {
5474 PyErr_SetNone(PyExc_AssertionError);
5475 __PYX_ERR(0, 1155, __pyx_L1_error)
5487 switch (__pyx_v_pskModelFlag) {
5497 (void)(twophaseDarcy_slightCompressible_split_sd_saturation_het_matType<SimplePSK,ExponentialDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_v_g->dimensions[0]), 2, ((
int *)__pyx_v_rowptr->data), ((
int *)__pyx_v_colind->data), ((
int *)__pyx_v_matType->data), __pyx_v_muw, __pyx_v_mun, ((
double *)__pyx_v_omega->data), ((
double *)__pyx_v_Kbar->data), __pyx_v_b, __pyx_v_capillaryDiffusionScaling, __pyx_v_advectionScaling, ((
double *)__pyx_v_rwork_psk->data), ((
int *)__pyx_v_iwork_psk->data), ((
double *)__pyx_v_rwork_psk_tol->data), ((
double *)__pyx_v_rwork_density_w->data), ((
double *)__pyx_v_rwork_density_n->data), ((
double *)__pyx_v_g->data), ((
double *)__pyx_v_qt->data), ((
double *)__pyx_v_psiw->data), ((
double *)__pyx_v_sw->data), ((
double *)__pyx_v_m->data), ((
double *)__pyx_v_dm->data), ((
double *)__pyx_v_phi->data), ((
double *)__pyx_v_dphi->data), ((
double *)__pyx_v_f->data), ((
double *)__pyx_v_df->data), ((
double *)__pyx_v_a->data), ((
double *)__pyx_v_da->data)));
5516 (void)(twophaseDarcy_slightCompressible_split_sd_saturation_het_matType<VGM,ExponentialDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_v_g->dimensions[0]), 4, ((
int *)__pyx_v_rowptr->data), ((
int *)__pyx_v_colind->data), ((
int *)__pyx_v_matType->data), __pyx_v_muw, __pyx_v_mun, ((
double *)__pyx_v_omega->data), ((
double *)__pyx_v_Kbar->data), __pyx_v_b, __pyx_v_capillaryDiffusionScaling, __pyx_v_advectionScaling, ((
double *)__pyx_v_rwork_psk->data), ((
int *)__pyx_v_iwork_psk->data), ((
double *)__pyx_v_rwork_psk_tol->data), ((
double *)__pyx_v_rwork_density_w->data), ((
double *)__pyx_v_rwork_density_n->data), ((
double *)__pyx_v_g->data), ((
double *)__pyx_v_qt->data), ((
double *)__pyx_v_psiw->data), ((
double *)__pyx_v_sw->data), ((
double *)__pyx_v_m->data), ((
double *)__pyx_v_dm->data), ((
double *)__pyx_v_phi->data), ((
double *)__pyx_v_dphi->data), ((
double *)__pyx_v_f->data), ((
double *)__pyx_v_df->data), ((
double *)__pyx_v_a->data), ((
double *)__pyx_v_da->data)));
5535 (void)(twophaseDarcy_slightCompressible_split_sd_saturation_het_matType<VGM,ExponentialDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_v_g->dimensions[0]), 4, ((
int *)__pyx_v_rowptr->data), ((
int *)__pyx_v_colind->data), ((
int *)__pyx_v_matType->data), __pyx_v_muw, __pyx_v_mun, ((
double *)__pyx_v_omega->data), ((
double *)__pyx_v_Kbar->data), __pyx_v_b, __pyx_v_capillaryDiffusionScaling, __pyx_v_advectionScaling, ((
double *)__pyx_v_rwork_psk->data), ((
int *)__pyx_v_iwork_psk->data), ((
double *)__pyx_v_rwork_psk_tol->data), ((
double *)__pyx_v_rwork_density_w->data), ((
double *)__pyx_v_rwork_density_n->data), ((
double *)__pyx_v_g->data), ((
double *)__pyx_v_qt->data), ((
double *)__pyx_v_psiw->data), ((
double *)__pyx_v_sw->data), ((
double *)__pyx_v_m->data), ((
double *)__pyx_v_dm->data), ((
double *)__pyx_v_phi->data), ((
double *)__pyx_v_dphi->data), ((
double *)__pyx_v_f->data), ((
double *)__pyx_v_df->data), ((
double *)__pyx_v_a->data), ((
double *)__pyx_v_da->data)));
5548 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5551 __Pyx_XDECREF(__pyx_t_1);
5552 __Pyx_XDECREF(__pyx_t_2);
5553 __Pyx_XDECREF(__pyx_t_3);
5554 __Pyx_AddTraceback(
"cTwophaseDarcyCoefficients.twophaseDarcy_incompressible_split_sd_saturation_het_matType", __pyx_clineno, __pyx_lineno, __pyx_filename);
5557 __Pyx_XGIVEREF(__pyx_r);
5558 __Pyx_RefNannyFinishContext();
5571 static PyObject *__pyx_pw_26cTwophaseDarcyCoefficients_11twophaseDarcy_slightCompressible_split_sd_pressure_het_matType(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
5572 static char __pyx_doc_26cTwophaseDarcyCoefficients_10twophaseDarcy_slightCompressible_split_sd_pressure_het_matType[] =
"Evaluate the pressure coefficients\n\nUse the split fractional flow formulation of slight compressible,\ntwo-phase Darcy flow for a heterogeneous medium, sparse diffusion rep\nhet\n\n ";
5573 static PyMethodDef __pyx_mdef_26cTwophaseDarcyCoefficients_11twophaseDarcy_slightCompressible_split_sd_pressure_het_matType = {
"twophaseDarcy_slightCompressible_split_sd_pressure_het_matType", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_26cTwophaseDarcyCoefficients_11twophaseDarcy_slightCompressible_split_sd_pressure_het_matType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_26cTwophaseDarcyCoefficients_10twophaseDarcy_slightCompressible_split_sd_pressure_het_matType};
5574 static PyObject *__pyx_pw_26cTwophaseDarcyCoefficients_11twophaseDarcy_slightCompressible_split_sd_pressure_het_matType(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5575 int __pyx_v_pskModelFlag;
5576 int __pyx_v_density_w_flag;
5577 CYTHON_UNUSED
int __pyx_v_density_n_flag;
5578 PyArrayObject *__pyx_v_rowptr = 0;
5579 PyArrayObject *__pyx_v_colind = 0;
5580 PyArrayObject *__pyx_v_matType = 0;
5583 PyArrayObject *__pyx_v_omega = 0;
5584 PyArrayObject *__pyx_v_Kbar = 0;
5586 double __pyx_v_capillaryDiffusionScaling;
5587 double __pyx_v_advectionScaling;
5588 PyArrayObject *__pyx_v_rwork_psk = 0;
5589 PyArrayObject *__pyx_v_iwork_psk = 0;
5590 PyArrayObject *__pyx_v_rwork_psk_tol = 0;
5591 PyArrayObject *__pyx_v_rwork_density_w = 0;
5592 PyArrayObject *__pyx_v_rwork_density_n = 0;
5593 PyArrayObject *__pyx_v_g = 0;
5594 PyArrayObject *__pyx_v_qt = 0;
5595 PyArrayObject *__pyx_v_psiw = 0;
5596 PyArrayObject *__pyx_v_sw = 0;
5597 PyArrayObject *__pyx_v_m = 0;
5598 PyArrayObject *__pyx_v_dm = 0;
5599 PyArrayObject *__pyx_v_phi = 0;
5600 PyArrayObject *__pyx_v_dphi = 0;
5601 PyArrayObject *__pyx_v_f = 0;
5602 PyArrayObject *__pyx_v_df = 0;
5603 PyArrayObject *__pyx_v_a = 0;
5604 PyArrayObject *__pyx_v_da = 0;
5605 int __pyx_lineno = 0;
5606 const char *__pyx_filename = NULL;
5607 int __pyx_clineno = 0;
5608 PyObject *__pyx_r = 0;
5609 __Pyx_RefNannyDeclarations
5610 __Pyx_RefNannySetupContext(
"twophaseDarcy_slightCompressible_split_sd_pressure_het_matType (wrapper)", 0);
5612 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pskModelFlag,&__pyx_n_s_density_w_flag,&__pyx_n_s_density_n_flag,&__pyx_n_s_rowptr,&__pyx_n_s_colind,&__pyx_n_s_matType,&__pyx_n_s_muw,&__pyx_n_s_mun,&__pyx_n_s_omega,&__pyx_n_s_Kbar,&__pyx_n_s_b,&__pyx_n_s_capillaryDiffusionScaling,&__pyx_n_s_advectionScaling,&__pyx_n_s_rwork_psk,&__pyx_n_s_iwork_psk,&__pyx_n_s_rwork_psk_tol,&__pyx_n_s_rwork_density_w,&__pyx_n_s_rwork_density_n,&__pyx_n_s_g,&__pyx_n_s_qt,&__pyx_n_s_psiw,&__pyx_n_s_sw,&__pyx_n_s_m,&__pyx_n_s_dm,&__pyx_n_s_phi,&__pyx_n_s_dphi,&__pyx_n_s_f,&__pyx_n_s_df,&__pyx_n_s_a,&__pyx_n_s_da,0};
5613 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};
5614 if (unlikely(__pyx_kwds)) {
5616 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5618 case 30: values[29] = PyTuple_GET_ITEM(__pyx_args, 29);
5620 case 29: values[28] = PyTuple_GET_ITEM(__pyx_args, 28);
5622 case 28: values[27] = PyTuple_GET_ITEM(__pyx_args, 27);
5624 case 27: values[26] = PyTuple_GET_ITEM(__pyx_args, 26);
5626 case 26: values[25] = PyTuple_GET_ITEM(__pyx_args, 25);
5628 case 25: values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
5630 case 24: values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
5632 case 23: values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
5634 case 22: values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
5636 case 21: values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
5638 case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
5640 case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
5642 case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
5644 case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
5646 case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
5648 case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
5650 case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
5652 case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
5654 case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
5656 case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
5658 case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
5660 case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
5662 case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
5664 case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
5666 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
5668 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
5670 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
5672 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5674 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5676 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5679 default:
goto __pyx_L5_argtuple_error;
5681 kw_args = PyDict_Size(__pyx_kwds);
5684 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pskModelFlag)) != 0)) kw_args--;
5685 else goto __pyx_L5_argtuple_error;
5688 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_density_w_flag)) != 0)) kw_args--;
5690 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_pressure_het_matType", 1, 30, 30, 1); __PYX_ERR(0, 1253, __pyx_L3_error)
5694 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_density_n_flag)) != 0)) kw_args--;
5696 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_pressure_het_matType", 1, 30, 30, 2); __PYX_ERR(0, 1253, __pyx_L3_error)
5700 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rowptr)) != 0)) kw_args--;
5702 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_pressure_het_matType", 1, 30, 30, 3); __PYX_ERR(0, 1253, __pyx_L3_error)
5706 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_colind)) != 0)) kw_args--;
5708 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_pressure_het_matType", 1, 30, 30, 4); __PYX_ERR(0, 1253, __pyx_L3_error)
5712 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_matType)) != 0)) kw_args--;
5714 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_pressure_het_matType", 1, 30, 30, 5); __PYX_ERR(0, 1253, __pyx_L3_error)
5718 if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_muw)) != 0)) kw_args--;
5720 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_pressure_het_matType", 1, 30, 30, 6); __PYX_ERR(0, 1253, __pyx_L3_error)
5724 if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mun)) != 0)) kw_args--;
5726 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_pressure_het_matType", 1, 30, 30, 7); __PYX_ERR(0, 1253, __pyx_L3_error)
5730 if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_omega)) != 0)) kw_args--;
5732 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_pressure_het_matType", 1, 30, 30, 8); __PYX_ERR(0, 1253, __pyx_L3_error)
5736 if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Kbar)) != 0)) kw_args--;
5738 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_pressure_het_matType", 1, 30, 30, 9); __PYX_ERR(0, 1253, __pyx_L3_error)
5742 if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--;
5744 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_pressure_het_matType", 1, 30, 30, 10); __PYX_ERR(0, 1253, __pyx_L3_error)
5748 if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_capillaryDiffusionScaling)) != 0)) kw_args--;
5750 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_pressure_het_matType", 1, 30, 30, 11); __PYX_ERR(0, 1253, __pyx_L3_error)
5754 if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_advectionScaling)) != 0)) kw_args--;
5756 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_pressure_het_matType", 1, 30, 30, 12); __PYX_ERR(0, 1253, __pyx_L3_error)
5760 if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork_psk)) != 0)) kw_args--;
5762 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_pressure_het_matType", 1, 30, 30, 13); __PYX_ERR(0, 1253, __pyx_L3_error)
5766 if (likely((values[14] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iwork_psk)) != 0)) kw_args--;
5768 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_pressure_het_matType", 1, 30, 30, 14); __PYX_ERR(0, 1253, __pyx_L3_error)
5772 if (likely((values[15] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork_psk_tol)) != 0)) kw_args--;
5774 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_pressure_het_matType", 1, 30, 30, 15); __PYX_ERR(0, 1253, __pyx_L3_error)
5778 if (likely((values[16] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork_density_w)) != 0)) kw_args--;
5780 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_pressure_het_matType", 1, 30, 30, 16); __PYX_ERR(0, 1253, __pyx_L3_error)
5784 if (likely((values[17] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork_density_n)) != 0)) kw_args--;
5786 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_pressure_het_matType", 1, 30, 30, 17); __PYX_ERR(0, 1253, __pyx_L3_error)
5790 if (likely((values[18] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_g)) != 0)) kw_args--;
5792 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_pressure_het_matType", 1, 30, 30, 18); __PYX_ERR(0, 1253, __pyx_L3_error)
5796 if (likely((values[19] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_qt)) != 0)) kw_args--;
5798 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_pressure_het_matType", 1, 30, 30, 19); __PYX_ERR(0, 1253, __pyx_L3_error)
5802 if (likely((values[20] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_psiw)) != 0)) kw_args--;
5804 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_pressure_het_matType", 1, 30, 30, 20); __PYX_ERR(0, 1253, __pyx_L3_error)
5808 if (likely((values[21] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sw)) != 0)) kw_args--;
5810 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_pressure_het_matType", 1, 30, 30, 21); __PYX_ERR(0, 1253, __pyx_L3_error)
5814 if (likely((values[22] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
5816 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_pressure_het_matType", 1, 30, 30, 22); __PYX_ERR(0, 1253, __pyx_L3_error)
5820 if (likely((values[23] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dm)) != 0)) kw_args--;
5822 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_pressure_het_matType", 1, 30, 30, 23); __PYX_ERR(0, 1253, __pyx_L3_error)
5826 if (likely((values[24] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_phi)) != 0)) kw_args--;
5828 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_pressure_het_matType", 1, 30, 30, 24); __PYX_ERR(0, 1253, __pyx_L3_error)
5832 if (likely((values[25] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dphi)) != 0)) kw_args--;
5834 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_pressure_het_matType", 1, 30, 30, 25); __PYX_ERR(0, 1253, __pyx_L3_error)
5838 if (likely((values[26] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_f)) != 0)) kw_args--;
5840 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_pressure_het_matType", 1, 30, 30, 26); __PYX_ERR(0, 1253, __pyx_L3_error)
5844 if (likely((values[27] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_df)) != 0)) kw_args--;
5846 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_pressure_het_matType", 1, 30, 30, 27); __PYX_ERR(0, 1253, __pyx_L3_error)
5850 if (likely((values[28] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
5852 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_pressure_het_matType", 1, 30, 30, 28); __PYX_ERR(0, 1253, __pyx_L3_error)
5856 if (likely((values[29] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_da)) != 0)) kw_args--;
5858 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_pressure_het_matType", 1, 30, 30, 29); __PYX_ERR(0, 1253, __pyx_L3_error)
5861 if (unlikely(kw_args > 0)) {
5862 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"twophaseDarcy_slightCompressible_split_sd_pressure_het_matType") < 0)) __PYX_ERR(0, 1253, __pyx_L3_error)
5864 }
else if (PyTuple_GET_SIZE(__pyx_args) != 30) {
5865 goto __pyx_L5_argtuple_error;
5867 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5868 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5869 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5870 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
5871 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
5872 values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
5873 values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
5874 values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
5875 values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
5876 values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
5877 values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
5878 values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
5879 values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
5880 values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
5881 values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
5882 values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
5883 values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
5884 values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
5885 values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
5886 values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
5887 values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
5888 values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
5889 values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
5890 values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
5891 values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
5892 values[25] = PyTuple_GET_ITEM(__pyx_args, 25);
5893 values[26] = PyTuple_GET_ITEM(__pyx_args, 26);
5894 values[27] = PyTuple_GET_ITEM(__pyx_args, 27);
5895 values[28] = PyTuple_GET_ITEM(__pyx_args, 28);
5896 values[29] = PyTuple_GET_ITEM(__pyx_args, 29);
5898 __pyx_v_pskModelFlag = __Pyx_PyInt_As_int(values[0]);
if (unlikely((__pyx_v_pskModelFlag == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1253, __pyx_L3_error)
5899 __pyx_v_density_w_flag = __Pyx_PyInt_As_int(values[1]);
if (unlikely((__pyx_v_density_w_flag == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1254, __pyx_L3_error)
5900 __pyx_v_density_n_flag = __Pyx_PyInt_As_int(values[2]);
if (unlikely((__pyx_v_density_n_flag == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1255, __pyx_L3_error)
5901 __pyx_v_rowptr = ((PyArrayObject *)values[3]);
5902 __pyx_v_colind = ((PyArrayObject *)values[4]);
5903 __pyx_v_matType = ((PyArrayObject *)values[5]);
5904 __pyx_v_muw = __pyx_PyFloat_AsDouble(values[6]);
if (unlikely((__pyx_v_muw == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1259, __pyx_L3_error)
5905 __pyx_v_mun = __pyx_PyFloat_AsDouble(values[7]);
if (unlikely((__pyx_v_mun == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1260, __pyx_L3_error)
5906 __pyx_v_omega = ((PyArrayObject *)values[8]);
5907 __pyx_v_Kbar = ((PyArrayObject *)values[9]);
5908 __pyx_v_b = __pyx_PyFloat_AsDouble(values[10]);
if (unlikely((__pyx_v_b == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1263, __pyx_L3_error)
5909 __pyx_v_capillaryDiffusionScaling = __pyx_PyFloat_AsDouble(values[11]);
if (unlikely((__pyx_v_capillaryDiffusionScaling == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1264, __pyx_L3_error)
5910 __pyx_v_advectionScaling = __pyx_PyFloat_AsDouble(values[12]);
if (unlikely((__pyx_v_advectionScaling == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1265, __pyx_L3_error)
5911 __pyx_v_rwork_psk = ((PyArrayObject *)values[13]);
5912 __pyx_v_iwork_psk = ((PyArrayObject *)values[14]);
5913 __pyx_v_rwork_psk_tol = ((PyArrayObject *)values[15]);
5914 __pyx_v_rwork_density_w = ((PyArrayObject *)values[16]);
5915 __pyx_v_rwork_density_n = ((PyArrayObject *)values[17]);
5916 __pyx_v_g = ((PyArrayObject *)values[18]);
5917 __pyx_v_qt = ((PyArrayObject *)values[19]);
5918 __pyx_v_psiw = ((PyArrayObject *)values[20]);
5919 __pyx_v_sw = ((PyArrayObject *)values[21]);
5920 __pyx_v_m = ((PyArrayObject *)values[22]);
5921 __pyx_v_dm = ((PyArrayObject *)values[23]);
5922 __pyx_v_phi = ((PyArrayObject *)values[24]);
5923 __pyx_v_dphi = ((PyArrayObject *)values[25]);
5924 __pyx_v_f = ((PyArrayObject *)values[26]);
5925 __pyx_v_df = ((PyArrayObject *)values[27]);
5926 __pyx_v_a = ((PyArrayObject *)values[28]);
5927 __pyx_v_da = ((PyArrayObject *)values[29]);
5929 goto __pyx_L4_argument_unpacking_done;
5930 __pyx_L5_argtuple_error:;
5931 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_pressure_het_matType", 1, 30, 30, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1253, __pyx_L3_error)
5933 __Pyx_AddTraceback(
"cTwophaseDarcyCoefficients.twophaseDarcy_slightCompressible_split_sd_pressure_het_matType", __pyx_clineno, __pyx_lineno, __pyx_filename);
5934 __Pyx_RefNannyFinishContext();
5936 __pyx_L4_argument_unpacking_done:;
5937 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rowptr), __pyx_ptype_5numpy_ndarray, 1,
"rowptr", 0))) __PYX_ERR(0, 1256, __pyx_L1_error)
5938 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_colind), __pyx_ptype_5numpy_ndarray, 1,
"colind", 0))) __PYX_ERR(0, 1257, __pyx_L1_error)
5939 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_matType), __pyx_ptype_5numpy_ndarray, 1,
"matType", 0))) __PYX_ERR(0, 1258, __pyx_L1_error)
5940 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_omega), __pyx_ptype_5numpy_ndarray, 1,
"omega", 0))) __PYX_ERR(0, 1261, __pyx_L1_error)
5941 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Kbar), __pyx_ptype_5numpy_ndarray, 1,
"Kbar", 0))) __PYX_ERR(0, 1262, __pyx_L1_error)
5942 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_psk), __pyx_ptype_5numpy_ndarray, 1,
"rwork_psk", 0))) __PYX_ERR(0, 1266, __pyx_L1_error)
5943 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork_psk), __pyx_ptype_5numpy_ndarray, 1,
"iwork_psk", 0))) __PYX_ERR(0, 1267, __pyx_L1_error)
5944 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_psk_tol), __pyx_ptype_5numpy_ndarray, 1,
"rwork_psk_tol", 0))) __PYX_ERR(0, 1268, __pyx_L1_error)
5945 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_density_w), __pyx_ptype_5numpy_ndarray, 1,
"rwork_density_w", 0))) __PYX_ERR(0, 1269, __pyx_L1_error)
5946 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_density_n), __pyx_ptype_5numpy_ndarray, 1,
"rwork_density_n", 0))) __PYX_ERR(0, 1270, __pyx_L1_error)
5947 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_g), __pyx_ptype_5numpy_ndarray, 1,
"g", 0))) __PYX_ERR(0, 1271, __pyx_L1_error)
5948 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_qt), __pyx_ptype_5numpy_ndarray, 1,
"qt", 0))) __PYX_ERR(0, 1272, __pyx_L1_error)
5949 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_psiw), __pyx_ptype_5numpy_ndarray, 1,
"psiw", 0))) __PYX_ERR(0, 1273, __pyx_L1_error)
5950 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sw), __pyx_ptype_5numpy_ndarray, 1,
"sw", 0))) __PYX_ERR(0, 1274, __pyx_L1_error)
5951 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_m), __pyx_ptype_5numpy_ndarray, 1,
"m", 0))) __PYX_ERR(0, 1275, __pyx_L1_error)
5952 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dm), __pyx_ptype_5numpy_ndarray, 1,
"dm", 0))) __PYX_ERR(0, 1276, __pyx_L1_error)
5953 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_phi), __pyx_ptype_5numpy_ndarray, 1,
"phi", 0))) __PYX_ERR(0, 1277, __pyx_L1_error)
5954 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dphi), __pyx_ptype_5numpy_ndarray, 1,
"dphi", 0))) __PYX_ERR(0, 1278, __pyx_L1_error)
5955 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_f), __pyx_ptype_5numpy_ndarray, 1,
"f", 0))) __PYX_ERR(0, 1279, __pyx_L1_error)
5956 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_df), __pyx_ptype_5numpy_ndarray, 1,
"df", 0))) __PYX_ERR(0, 1280, __pyx_L1_error)
5957 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1,
"a", 0))) __PYX_ERR(0, 1281, __pyx_L1_error)
5958 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_da), __pyx_ptype_5numpy_ndarray, 1,
"da", 0))) __PYX_ERR(0, 1282, __pyx_L1_error)
5959 __pyx_r = __pyx_pf_26cTwophaseDarcyCoefficients_10twophaseDarcy_slightCompressible_split_sd_pressure_het_matType(__pyx_self, __pyx_v_pskModelFlag, __pyx_v_density_w_flag, __pyx_v_density_n_flag, __pyx_v_rowptr, __pyx_v_colind, __pyx_v_matType, __pyx_v_muw, __pyx_v_mun, __pyx_v_omega, __pyx_v_Kbar, __pyx_v_b, __pyx_v_capillaryDiffusionScaling, __pyx_v_advectionScaling, __pyx_v_rwork_psk, __pyx_v_iwork_psk, __pyx_v_rwork_psk_tol, __pyx_v_rwork_density_w, __pyx_v_rwork_density_n, __pyx_v_g, __pyx_v_qt, __pyx_v_psiw, __pyx_v_sw, __pyx_v_m, __pyx_v_dm, __pyx_v_phi, __pyx_v_dphi, __pyx_v_f, __pyx_v_df, __pyx_v_a, __pyx_v_da);
5966 __Pyx_RefNannyFinishContext();
5970 static PyObject *__pyx_pf_26cTwophaseDarcyCoefficients_10twophaseDarcy_slightCompressible_split_sd_pressure_het_matType(CYTHON_UNUSED PyObject *__pyx_self,
int __pyx_v_pskModelFlag,
int __pyx_v_density_w_flag, CYTHON_UNUSED
int __pyx_v_density_n_flag, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_matType,
double __pyx_v_muw,
double __pyx_v_mun, PyArrayObject *__pyx_v_omega, PyArrayObject *__pyx_v_Kbar,
double __pyx_v_b,
double __pyx_v_capillaryDiffusionScaling,
double __pyx_v_advectionScaling, PyArrayObject *__pyx_v_rwork_psk, PyArrayObject *__pyx_v_iwork_psk, PyArrayObject *__pyx_v_rwork_psk_tol, PyArrayObject *__pyx_v_rwork_density_w, PyArrayObject *__pyx_v_rwork_density_n, PyArrayObject *__pyx_v_g, PyArrayObject *__pyx_v_qt, PyArrayObject *__pyx_v_psiw, PyArrayObject *__pyx_v_sw, PyArrayObject *__pyx_v_m, PyArrayObject *__pyx_v_dm, PyArrayObject *__pyx_v_phi, PyArrayObject *__pyx_v_dphi, PyArrayObject *__pyx_v_f, PyArrayObject *__pyx_v_df, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_da) {
5971 int __pyx_v_nPointsPerSimplex;
5972 int __pyx_v_nSimplex;
5973 PyObject *__pyx_r = NULL;
5974 __Pyx_RefNannyDeclarations
5975 PyObject *__pyx_t_1 = NULL;
5976 PyObject *__pyx_t_2 = NULL;
5977 PyObject *__pyx_t_3 = NULL;
5979 int __pyx_lineno = 0;
5980 const char *__pyx_filename = NULL;
5981 int __pyx_clineno = 0;
5982 __Pyx_RefNannySetupContext(
"twophaseDarcy_slightCompressible_split_sd_pressure_het_matType", 0);
5991 __pyx_v_nPointsPerSimplex = (__pyx_v_sw->dimensions[(__pyx_v_sw->nd - 1)]);
6000 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_sw), __pyx_n_s_size);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1291, __pyx_L1_error)
6001 __Pyx_GOTREF(__pyx_t_1);
6002 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_nPointsPerSimplex);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1291, __pyx_L1_error)
6003 __Pyx_GOTREF(__pyx_t_2);
6004 __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1291, __pyx_L1_error)
6005 __Pyx_GOTREF(__pyx_t_3);
6006 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6007 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6008 __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3);
if (unlikely((__pyx_t_4 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1291, __pyx_L1_error)
6009 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6010 __pyx_v_nSimplex = __pyx_t_4;
6019 #ifndef CYTHON_WITHOUT_ASSERTIONS
6020 if (unlikely(!Py_OptimizeFlag)) {
6021 if (unlikely(!((__pyx_v_density_w_flag == 1) != 0))) {
6022 PyErr_SetNone(PyExc_AssertionError);
6023 __PYX_ERR(0, 1294, __pyx_L1_error)
6035 switch (__pyx_v_pskModelFlag) {
6045 (void)(twophaseDarcy_slightCompressible_split_sd_saturation_het_matType<SimplePSK,ExponentialDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_v_g->dimensions[0]), 2, ((
int *)__pyx_v_rowptr->data), ((
int *)__pyx_v_colind->data), ((
int *)__pyx_v_matType->data), __pyx_v_muw, __pyx_v_mun, ((
double *)__pyx_v_omega->data), ((
double *)__pyx_v_Kbar->data), __pyx_v_b, __pyx_v_capillaryDiffusionScaling, __pyx_v_advectionScaling, ((
double *)__pyx_v_rwork_psk->data), ((
int *)__pyx_v_iwork_psk->data), ((
double *)__pyx_v_rwork_psk_tol->data), ((
double *)__pyx_v_rwork_density_w->data), ((
double *)__pyx_v_rwork_density_n->data), ((
double *)__pyx_v_g->data), ((
double *)__pyx_v_qt->data), ((
double *)__pyx_v_psiw->data), ((
double *)__pyx_v_sw->data), ((
double *)__pyx_v_m->data), ((
double *)__pyx_v_dm->data), ((
double *)__pyx_v_phi->data), ((
double *)__pyx_v_dphi->data), ((
double *)__pyx_v_f->data), ((
double *)__pyx_v_df->data), ((
double *)__pyx_v_a->data), ((
double *)__pyx_v_da->data)));
6064 (void)(twophaseDarcy_slightCompressible_split_sd_saturation_het_matType<VGM,ExponentialDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_v_g->dimensions[0]), 4, ((
int *)__pyx_v_rowptr->data), ((
int *)__pyx_v_colind->data), ((
int *)__pyx_v_matType->data), __pyx_v_muw, __pyx_v_mun, ((
double *)__pyx_v_omega->data), ((
double *)__pyx_v_Kbar->data), __pyx_v_b, __pyx_v_capillaryDiffusionScaling, __pyx_v_advectionScaling, ((
double *)__pyx_v_rwork_psk->data), ((
int *)__pyx_v_iwork_psk->data), ((
double *)__pyx_v_rwork_psk_tol->data), ((
double *)__pyx_v_rwork_density_w->data), ((
double *)__pyx_v_rwork_density_n->data), ((
double *)__pyx_v_g->data), ((
double *)__pyx_v_qt->data), ((
double *)__pyx_v_psiw->data), ((
double *)__pyx_v_sw->data), ((
double *)__pyx_v_m->data), ((
double *)__pyx_v_dm->data), ((
double *)__pyx_v_phi->data), ((
double *)__pyx_v_dphi->data), ((
double *)__pyx_v_f->data), ((
double *)__pyx_v_df->data), ((
double *)__pyx_v_a->data), ((
double *)__pyx_v_da->data)));
6083 (void)(twophaseDarcy_slightCompressible_split_sd_saturation_het_matType<VGM,ExponentialDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_v_g->dimensions[0]), 4, ((
int *)__pyx_v_rowptr->data), ((
int *)__pyx_v_colind->data), ((
int *)__pyx_v_matType->data), __pyx_v_muw, __pyx_v_mun, ((
double *)__pyx_v_omega->data), ((
double *)__pyx_v_Kbar->data), __pyx_v_b, __pyx_v_capillaryDiffusionScaling, __pyx_v_advectionScaling, ((
double *)__pyx_v_rwork_psk->data), ((
int *)__pyx_v_iwork_psk->data), ((
double *)__pyx_v_rwork_psk_tol->data), ((
double *)__pyx_v_rwork_density_w->data), ((
double *)__pyx_v_rwork_density_n->data), ((
double *)__pyx_v_g->data), ((
double *)__pyx_v_qt->data), ((
double *)__pyx_v_psiw->data), ((
double *)__pyx_v_sw->data), ((
double *)__pyx_v_m->data), ((
double *)__pyx_v_dm->data), ((
double *)__pyx_v_phi->data), ((
double *)__pyx_v_dphi->data), ((
double *)__pyx_v_f->data), ((
double *)__pyx_v_df->data), ((
double *)__pyx_v_a->data), ((
double *)__pyx_v_da->data)));
6096 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6099 __Pyx_XDECREF(__pyx_t_1);
6100 __Pyx_XDECREF(__pyx_t_2);
6101 __Pyx_XDECREF(__pyx_t_3);
6102 __Pyx_AddTraceback(
"cTwophaseDarcyCoefficients.twophaseDarcy_slightCompressible_split_sd_pressure_het_matType", __pyx_clineno, __pyx_lineno, __pyx_filename);
6105 __Pyx_XGIVEREF(__pyx_r);
6106 __Pyx_RefNannyFinishContext();
6119 static PyObject *__pyx_pw_26cTwophaseDarcyCoefficients_13twophaseDarcy_slightCompressible_split_sd_saturation_het_matType(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
6120 static char __pyx_doc_26cTwophaseDarcyCoefficients_12twophaseDarcy_slightCompressible_split_sd_saturation_het_matType[] =
"Evaluate the saturation coefficients\n\nUse the split fractional flow formulation of slight compressible,\ntwo-phase Darcy flow for a heterogeneous medium, sparse diffusion rep\nhet\n\n ";
6121 static PyMethodDef __pyx_mdef_26cTwophaseDarcyCoefficients_13twophaseDarcy_slightCompressible_split_sd_saturation_het_matType = {
"twophaseDarcy_slightCompressible_split_sd_saturation_het_matType", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_26cTwophaseDarcyCoefficients_13twophaseDarcy_slightCompressible_split_sd_saturation_het_matType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_26cTwophaseDarcyCoefficients_12twophaseDarcy_slightCompressible_split_sd_saturation_het_matType};
6122 static PyObject *__pyx_pw_26cTwophaseDarcyCoefficients_13twophaseDarcy_slightCompressible_split_sd_saturation_het_matType(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6123 int __pyx_v_pskModelFlag;
6124 int __pyx_v_density_w_flag;
6125 int __pyx_v_density_n_flag;
6126 PyArrayObject *__pyx_v_rowptr = 0;
6127 PyArrayObject *__pyx_v_colind = 0;
6128 PyArrayObject *__pyx_v_matType = 0;
6131 PyArrayObject *__pyx_v_omega = 0;
6132 PyArrayObject *__pyx_v_Kbar = 0;
6134 double __pyx_v_capillaryDiffusionScaling;
6135 double __pyx_v_advectionScaling;
6136 PyArrayObject *__pyx_v_rwork_psk = 0;
6137 PyArrayObject *__pyx_v_iwork_psk = 0;
6138 PyArrayObject *__pyx_v_rwork_psk_tol = 0;
6139 PyArrayObject *__pyx_v_rwork_density_w = 0;
6140 PyArrayObject *__pyx_v_rwork_density_n = 0;
6141 PyArrayObject *__pyx_v_g = 0;
6142 PyArrayObject *__pyx_v_qt = 0;
6143 PyArrayObject *__pyx_v_psiw = 0;
6144 PyArrayObject *__pyx_v_sw = 0;
6145 PyArrayObject *__pyx_v_m = 0;
6146 PyArrayObject *__pyx_v_dm = 0;
6147 PyArrayObject *__pyx_v_phi = 0;
6148 PyArrayObject *__pyx_v_dphi = 0;
6149 PyArrayObject *__pyx_v_f = 0;
6150 PyArrayObject *__pyx_v_df = 0;
6151 PyArrayObject *__pyx_v_a = 0;
6152 PyArrayObject *__pyx_v_da = 0;
6153 int __pyx_lineno = 0;
6154 const char *__pyx_filename = NULL;
6155 int __pyx_clineno = 0;
6156 PyObject *__pyx_r = 0;
6157 __Pyx_RefNannyDeclarations
6158 __Pyx_RefNannySetupContext(
"twophaseDarcy_slightCompressible_split_sd_saturation_het_matType (wrapper)", 0);
6160 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pskModelFlag,&__pyx_n_s_density_w_flag,&__pyx_n_s_density_n_flag,&__pyx_n_s_rowptr,&__pyx_n_s_colind,&__pyx_n_s_matType,&__pyx_n_s_muw,&__pyx_n_s_mun,&__pyx_n_s_omega,&__pyx_n_s_Kbar,&__pyx_n_s_b,&__pyx_n_s_capillaryDiffusionScaling,&__pyx_n_s_advectionScaling,&__pyx_n_s_rwork_psk,&__pyx_n_s_iwork_psk,&__pyx_n_s_rwork_psk_tol,&__pyx_n_s_rwork_density_w,&__pyx_n_s_rwork_density_n,&__pyx_n_s_g,&__pyx_n_s_qt,&__pyx_n_s_psiw,&__pyx_n_s_sw,&__pyx_n_s_m,&__pyx_n_s_dm,&__pyx_n_s_phi,&__pyx_n_s_dphi,&__pyx_n_s_f,&__pyx_n_s_df,&__pyx_n_s_a,&__pyx_n_s_da,0};
6161 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};
6162 if (unlikely(__pyx_kwds)) {
6164 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
6166 case 30: values[29] = PyTuple_GET_ITEM(__pyx_args, 29);
6168 case 29: values[28] = PyTuple_GET_ITEM(__pyx_args, 28);
6170 case 28: values[27] = PyTuple_GET_ITEM(__pyx_args, 27);
6172 case 27: values[26] = PyTuple_GET_ITEM(__pyx_args, 26);
6174 case 26: values[25] = PyTuple_GET_ITEM(__pyx_args, 25);
6176 case 25: values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
6178 case 24: values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
6180 case 23: values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
6182 case 22: values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
6184 case 21: values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
6186 case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
6188 case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
6190 case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
6192 case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
6194 case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
6196 case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
6198 case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
6200 case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
6202 case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
6204 case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
6206 case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
6208 case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
6210 case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
6212 case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
6214 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
6216 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6218 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6220 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6222 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6224 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6227 default:
goto __pyx_L5_argtuple_error;
6229 kw_args = PyDict_Size(__pyx_kwds);
6232 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pskModelFlag)) != 0)) kw_args--;
6233 else goto __pyx_L5_argtuple_error;
6236 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_density_w_flag)) != 0)) kw_args--;
6238 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_saturation_het_matType", 1, 30, 30, 1); __PYX_ERR(0, 1367, __pyx_L3_error)
6242 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_density_n_flag)) != 0)) kw_args--;
6244 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_saturation_het_matType", 1, 30, 30, 2); __PYX_ERR(0, 1367, __pyx_L3_error)
6248 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rowptr)) != 0)) kw_args--;
6250 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_saturation_het_matType", 1, 30, 30, 3); __PYX_ERR(0, 1367, __pyx_L3_error)
6254 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_colind)) != 0)) kw_args--;
6256 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_saturation_het_matType", 1, 30, 30, 4); __PYX_ERR(0, 1367, __pyx_L3_error)
6260 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_matType)) != 0)) kw_args--;
6262 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_saturation_het_matType", 1, 30, 30, 5); __PYX_ERR(0, 1367, __pyx_L3_error)
6266 if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_muw)) != 0)) kw_args--;
6268 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_saturation_het_matType", 1, 30, 30, 6); __PYX_ERR(0, 1367, __pyx_L3_error)
6272 if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mun)) != 0)) kw_args--;
6274 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_saturation_het_matType", 1, 30, 30, 7); __PYX_ERR(0, 1367, __pyx_L3_error)
6278 if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_omega)) != 0)) kw_args--;
6280 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_saturation_het_matType", 1, 30, 30, 8); __PYX_ERR(0, 1367, __pyx_L3_error)
6284 if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Kbar)) != 0)) kw_args--;
6286 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_saturation_het_matType", 1, 30, 30, 9); __PYX_ERR(0, 1367, __pyx_L3_error)
6290 if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--;
6292 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_saturation_het_matType", 1, 30, 30, 10); __PYX_ERR(0, 1367, __pyx_L3_error)
6296 if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_capillaryDiffusionScaling)) != 0)) kw_args--;
6298 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_saturation_het_matType", 1, 30, 30, 11); __PYX_ERR(0, 1367, __pyx_L3_error)
6302 if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_advectionScaling)) != 0)) kw_args--;
6304 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_saturation_het_matType", 1, 30, 30, 12); __PYX_ERR(0, 1367, __pyx_L3_error)
6308 if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork_psk)) != 0)) kw_args--;
6310 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_saturation_het_matType", 1, 30, 30, 13); __PYX_ERR(0, 1367, __pyx_L3_error)
6314 if (likely((values[14] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iwork_psk)) != 0)) kw_args--;
6316 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_saturation_het_matType", 1, 30, 30, 14); __PYX_ERR(0, 1367, __pyx_L3_error)
6320 if (likely((values[15] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork_psk_tol)) != 0)) kw_args--;
6322 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_saturation_het_matType", 1, 30, 30, 15); __PYX_ERR(0, 1367, __pyx_L3_error)
6326 if (likely((values[16] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork_density_w)) != 0)) kw_args--;
6328 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_saturation_het_matType", 1, 30, 30, 16); __PYX_ERR(0, 1367, __pyx_L3_error)
6332 if (likely((values[17] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork_density_n)) != 0)) kw_args--;
6334 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_saturation_het_matType", 1, 30, 30, 17); __PYX_ERR(0, 1367, __pyx_L3_error)
6338 if (likely((values[18] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_g)) != 0)) kw_args--;
6340 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_saturation_het_matType", 1, 30, 30, 18); __PYX_ERR(0, 1367, __pyx_L3_error)
6344 if (likely((values[19] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_qt)) != 0)) kw_args--;
6346 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_saturation_het_matType", 1, 30, 30, 19); __PYX_ERR(0, 1367, __pyx_L3_error)
6350 if (likely((values[20] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_psiw)) != 0)) kw_args--;
6352 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_saturation_het_matType", 1, 30, 30, 20); __PYX_ERR(0, 1367, __pyx_L3_error)
6356 if (likely((values[21] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sw)) != 0)) kw_args--;
6358 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_saturation_het_matType", 1, 30, 30, 21); __PYX_ERR(0, 1367, __pyx_L3_error)
6362 if (likely((values[22] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
6364 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_saturation_het_matType", 1, 30, 30, 22); __PYX_ERR(0, 1367, __pyx_L3_error)
6368 if (likely((values[23] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dm)) != 0)) kw_args--;
6370 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_saturation_het_matType", 1, 30, 30, 23); __PYX_ERR(0, 1367, __pyx_L3_error)
6374 if (likely((values[24] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_phi)) != 0)) kw_args--;
6376 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_saturation_het_matType", 1, 30, 30, 24); __PYX_ERR(0, 1367, __pyx_L3_error)
6380 if (likely((values[25] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dphi)) != 0)) kw_args--;
6382 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_saturation_het_matType", 1, 30, 30, 25); __PYX_ERR(0, 1367, __pyx_L3_error)
6386 if (likely((values[26] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_f)) != 0)) kw_args--;
6388 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_saturation_het_matType", 1, 30, 30, 26); __PYX_ERR(0, 1367, __pyx_L3_error)
6392 if (likely((values[27] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_df)) != 0)) kw_args--;
6394 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_saturation_het_matType", 1, 30, 30, 27); __PYX_ERR(0, 1367, __pyx_L3_error)
6398 if (likely((values[28] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
6400 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_saturation_het_matType", 1, 30, 30, 28); __PYX_ERR(0, 1367, __pyx_L3_error)
6404 if (likely((values[29] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_da)) != 0)) kw_args--;
6406 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_saturation_het_matType", 1, 30, 30, 29); __PYX_ERR(0, 1367, __pyx_L3_error)
6409 if (unlikely(kw_args > 0)) {
6410 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"twophaseDarcy_slightCompressible_split_sd_saturation_het_matType") < 0)) __PYX_ERR(0, 1367, __pyx_L3_error)
6412 }
else if (PyTuple_GET_SIZE(__pyx_args) != 30) {
6413 goto __pyx_L5_argtuple_error;
6415 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6416 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6417 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6418 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6419 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6420 values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
6421 values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
6422 values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
6423 values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
6424 values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
6425 values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
6426 values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
6427 values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
6428 values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
6429 values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
6430 values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
6431 values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
6432 values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
6433 values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
6434 values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
6435 values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
6436 values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
6437 values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
6438 values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
6439 values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
6440 values[25] = PyTuple_GET_ITEM(__pyx_args, 25);
6441 values[26] = PyTuple_GET_ITEM(__pyx_args, 26);
6442 values[27] = PyTuple_GET_ITEM(__pyx_args, 27);
6443 values[28] = PyTuple_GET_ITEM(__pyx_args, 28);
6444 values[29] = PyTuple_GET_ITEM(__pyx_args, 29);
6446 __pyx_v_pskModelFlag = __Pyx_PyInt_As_int(values[0]);
if (unlikely((__pyx_v_pskModelFlag == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1367, __pyx_L3_error)
6447 __pyx_v_density_w_flag = __Pyx_PyInt_As_int(values[1]);
if (unlikely((__pyx_v_density_w_flag == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1368, __pyx_L3_error)
6448 __pyx_v_density_n_flag = __Pyx_PyInt_As_int(values[2]);
if (unlikely((__pyx_v_density_n_flag == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1369, __pyx_L3_error)
6449 __pyx_v_rowptr = ((PyArrayObject *)values[3]);
6450 __pyx_v_colind = ((PyArrayObject *)values[4]);
6451 __pyx_v_matType = ((PyArrayObject *)values[5]);
6452 __pyx_v_muw = __pyx_PyFloat_AsDouble(values[6]);
if (unlikely((__pyx_v_muw == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1373, __pyx_L3_error)
6453 __pyx_v_mun = __pyx_PyFloat_AsDouble(values[7]);
if (unlikely((__pyx_v_mun == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1374, __pyx_L3_error)
6454 __pyx_v_omega = ((PyArrayObject *)values[8]);
6455 __pyx_v_Kbar = ((PyArrayObject *)values[9]);
6456 __pyx_v_b = __pyx_PyFloat_AsDouble(values[10]);
if (unlikely((__pyx_v_b == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1377, __pyx_L3_error)
6457 __pyx_v_capillaryDiffusionScaling = __pyx_PyFloat_AsDouble(values[11]);
if (unlikely((__pyx_v_capillaryDiffusionScaling == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1378, __pyx_L3_error)
6458 __pyx_v_advectionScaling = __pyx_PyFloat_AsDouble(values[12]);
if (unlikely((__pyx_v_advectionScaling == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1379, __pyx_L3_error)
6459 __pyx_v_rwork_psk = ((PyArrayObject *)values[13]);
6460 __pyx_v_iwork_psk = ((PyArrayObject *)values[14]);
6461 __pyx_v_rwork_psk_tol = ((PyArrayObject *)values[15]);
6462 __pyx_v_rwork_density_w = ((PyArrayObject *)values[16]);
6463 __pyx_v_rwork_density_n = ((PyArrayObject *)values[17]);
6464 __pyx_v_g = ((PyArrayObject *)values[18]);
6465 __pyx_v_qt = ((PyArrayObject *)values[19]);
6466 __pyx_v_psiw = ((PyArrayObject *)values[20]);
6467 __pyx_v_sw = ((PyArrayObject *)values[21]);
6468 __pyx_v_m = ((PyArrayObject *)values[22]);
6469 __pyx_v_dm = ((PyArrayObject *)values[23]);
6470 __pyx_v_phi = ((PyArrayObject *)values[24]);
6471 __pyx_v_dphi = ((PyArrayObject *)values[25]);
6472 __pyx_v_f = ((PyArrayObject *)values[26]);
6473 __pyx_v_df = ((PyArrayObject *)values[27]);
6474 __pyx_v_a = ((PyArrayObject *)values[28]);
6475 __pyx_v_da = ((PyArrayObject *)values[29]);
6477 goto __pyx_L4_argument_unpacking_done;
6478 __pyx_L5_argtuple_error:;
6479 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_slightCompressible_split_sd_saturation_het_matType", 1, 30, 30, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1367, __pyx_L3_error)
6481 __Pyx_AddTraceback(
"cTwophaseDarcyCoefficients.twophaseDarcy_slightCompressible_split_sd_saturation_het_matType", __pyx_clineno, __pyx_lineno, __pyx_filename);
6482 __Pyx_RefNannyFinishContext();
6484 __pyx_L4_argument_unpacking_done:;
6485 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rowptr), __pyx_ptype_5numpy_ndarray, 1,
"rowptr", 0))) __PYX_ERR(0, 1370, __pyx_L1_error)
6486 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_colind), __pyx_ptype_5numpy_ndarray, 1,
"colind", 0))) __PYX_ERR(0, 1371, __pyx_L1_error)
6487 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_matType), __pyx_ptype_5numpy_ndarray, 1,
"matType", 0))) __PYX_ERR(0, 1372, __pyx_L1_error)
6488 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_omega), __pyx_ptype_5numpy_ndarray, 1,
"omega", 0))) __PYX_ERR(0, 1375, __pyx_L1_error)
6489 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Kbar), __pyx_ptype_5numpy_ndarray, 1,
"Kbar", 0))) __PYX_ERR(0, 1376, __pyx_L1_error)
6490 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_psk), __pyx_ptype_5numpy_ndarray, 1,
"rwork_psk", 0))) __PYX_ERR(0, 1380, __pyx_L1_error)
6491 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork_psk), __pyx_ptype_5numpy_ndarray, 1,
"iwork_psk", 0))) __PYX_ERR(0, 1381, __pyx_L1_error)
6492 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_psk_tol), __pyx_ptype_5numpy_ndarray, 1,
"rwork_psk_tol", 0))) __PYX_ERR(0, 1382, __pyx_L1_error)
6493 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_density_w), __pyx_ptype_5numpy_ndarray, 1,
"rwork_density_w", 0))) __PYX_ERR(0, 1383, __pyx_L1_error)
6494 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_density_n), __pyx_ptype_5numpy_ndarray, 1,
"rwork_density_n", 0))) __PYX_ERR(0, 1384, __pyx_L1_error)
6495 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_g), __pyx_ptype_5numpy_ndarray, 1,
"g", 0))) __PYX_ERR(0, 1385, __pyx_L1_error)
6496 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_qt), __pyx_ptype_5numpy_ndarray, 1,
"qt", 0))) __PYX_ERR(0, 1385, __pyx_L1_error)
6497 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_psiw), __pyx_ptype_5numpy_ndarray, 1,
"psiw", 0))) __PYX_ERR(0, 1385, __pyx_L1_error)
6498 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sw), __pyx_ptype_5numpy_ndarray, 1,
"sw", 0))) __PYX_ERR(0, 1385, __pyx_L1_error)
6499 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_m), __pyx_ptype_5numpy_ndarray, 1,
"m", 0))) __PYX_ERR(0, 1385, __pyx_L1_error)
6500 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dm), __pyx_ptype_5numpy_ndarray, 1,
"dm", 0))) __PYX_ERR(0, 1385, __pyx_L1_error)
6501 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_phi), __pyx_ptype_5numpy_ndarray, 1,
"phi", 0))) __PYX_ERR(0, 1385, __pyx_L1_error)
6502 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dphi), __pyx_ptype_5numpy_ndarray, 1,
"dphi", 0))) __PYX_ERR(0, 1385, __pyx_L1_error)
6503 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_f), __pyx_ptype_5numpy_ndarray, 1,
"f", 0))) __PYX_ERR(0, 1386, __pyx_L1_error)
6504 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_df), __pyx_ptype_5numpy_ndarray, 1,
"df", 0))) __PYX_ERR(0, 1386, __pyx_L1_error)
6505 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1,
"a", 0))) __PYX_ERR(0, 1386, __pyx_L1_error)
6506 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_da), __pyx_ptype_5numpy_ndarray, 1,
"da", 0))) __PYX_ERR(0, 1386, __pyx_L1_error)
6507 __pyx_r = __pyx_pf_26cTwophaseDarcyCoefficients_12twophaseDarcy_slightCompressible_split_sd_saturation_het_matType(__pyx_self, __pyx_v_pskModelFlag, __pyx_v_density_w_flag, __pyx_v_density_n_flag, __pyx_v_rowptr, __pyx_v_colind, __pyx_v_matType, __pyx_v_muw, __pyx_v_mun, __pyx_v_omega, __pyx_v_Kbar, __pyx_v_b, __pyx_v_capillaryDiffusionScaling, __pyx_v_advectionScaling, __pyx_v_rwork_psk, __pyx_v_iwork_psk, __pyx_v_rwork_psk_tol, __pyx_v_rwork_density_w, __pyx_v_rwork_density_n, __pyx_v_g, __pyx_v_qt, __pyx_v_psiw, __pyx_v_sw, __pyx_v_m, __pyx_v_dm, __pyx_v_phi, __pyx_v_dphi, __pyx_v_f, __pyx_v_df, __pyx_v_a, __pyx_v_da);
6514 __Pyx_RefNannyFinishContext();
6518 static PyObject *__pyx_pf_26cTwophaseDarcyCoefficients_12twophaseDarcy_slightCompressible_split_sd_saturation_het_matType(CYTHON_UNUSED PyObject *__pyx_self,
int __pyx_v_pskModelFlag,
int __pyx_v_density_w_flag,
int __pyx_v_density_n_flag, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_matType,
double __pyx_v_muw,
double __pyx_v_mun, PyArrayObject *__pyx_v_omega, PyArrayObject *__pyx_v_Kbar,
double __pyx_v_b,
double __pyx_v_capillaryDiffusionScaling,
double __pyx_v_advectionScaling, PyArrayObject *__pyx_v_rwork_psk, PyArrayObject *__pyx_v_iwork_psk, PyArrayObject *__pyx_v_rwork_psk_tol, PyArrayObject *__pyx_v_rwork_density_w, PyArrayObject *__pyx_v_rwork_density_n, PyArrayObject *__pyx_v_g, PyArrayObject *__pyx_v_qt, PyArrayObject *__pyx_v_psiw, PyArrayObject *__pyx_v_sw, PyArrayObject *__pyx_v_m, PyArrayObject *__pyx_v_dm, PyArrayObject *__pyx_v_phi, PyArrayObject *__pyx_v_dphi, PyArrayObject *__pyx_v_f, PyArrayObject *__pyx_v_df, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_da) {
6519 int __pyx_v_nPointsPerSimplex;
6520 int __pyx_v_nSimplex;
6521 PyObject *__pyx_r = NULL;
6522 __Pyx_RefNannyDeclarations
6523 PyObject *__pyx_t_1 = NULL;
6524 PyObject *__pyx_t_2 = NULL;
6525 PyObject *__pyx_t_3 = NULL;
6527 PyObject *__pyx_t_5 = NULL;
6528 PyObject *__pyx_t_6 = NULL;
6529 PyObject *__pyx_t_7 = NULL;
6530 int __pyx_lineno = 0;
6531 const char *__pyx_filename = NULL;
6532 int __pyx_clineno = 0;
6533 __Pyx_RefNannySetupContext(
"twophaseDarcy_slightCompressible_split_sd_saturation_het_matType", 0);
6542 __pyx_v_nPointsPerSimplex = (__pyx_v_sw->dimensions[(__pyx_v_sw->nd - 1)]);
6551 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_sw), __pyx_n_s_size);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1395, __pyx_L1_error)
6552 __Pyx_GOTREF(__pyx_t_1);
6553 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_nPointsPerSimplex);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1395, __pyx_L1_error)
6554 __Pyx_GOTREF(__pyx_t_2);
6555 __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1395, __pyx_L1_error)
6556 __Pyx_GOTREF(__pyx_t_3);
6557 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6558 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6559 __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3);
if (unlikely((__pyx_t_4 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1395, __pyx_L1_error)
6560 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6561 __pyx_v_nSimplex = __pyx_t_4;
6570 switch (__pyx_v_density_n_flag) {
6580 switch (__pyx_v_pskModelFlag) {
6590 (void)(twophaseDarcy_compressibleN_split_sd_saturation_het_matType<SimplePSK,ExponentialDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_v_g->dimensions[0]), 2, ((
int *)__pyx_v_rowptr->data), ((
int *)__pyx_v_colind->data), ((
int *)__pyx_v_matType->data), __pyx_v_muw, __pyx_v_mun, ((
double *)__pyx_v_omega->data), ((
double *)__pyx_v_Kbar->data), __pyx_v_b, __pyx_v_capillaryDiffusionScaling, __pyx_v_advectionScaling, ((
double *)__pyx_v_rwork_psk->data), ((
int *)__pyx_v_iwork_psk->data), ((
double *)__pyx_v_rwork_psk_tol->data), ((
double *)__pyx_v_rwork_density_w->data), ((
double *)__pyx_v_rwork_density_n->data), ((
double *)__pyx_v_g->data), ((
double *)__pyx_v_qt->data), ((
double *)__pyx_v_psiw->data), ((
double *)__pyx_v_sw->data), ((
double *)__pyx_v_m->data), ((
double *)__pyx_v_dm->data), ((
double *)__pyx_v_phi->data), ((
double *)__pyx_v_dphi->data), ((
double *)__pyx_v_f->data), ((
double *)__pyx_v_df->data), ((
double *)__pyx_v_a->data), ((
double *)__pyx_v_da->data)));
6609 (void)(twophaseDarcy_compressibleN_split_sd_saturation_het_matType<VGM,ExponentialDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_v_g->dimensions[0]), 4, ((
int *)__pyx_v_rowptr->data), ((
int *)__pyx_v_colind->data), ((
int *)__pyx_v_matType->data), __pyx_v_muw, __pyx_v_mun, ((
double *)__pyx_v_omega->data), ((
double *)__pyx_v_Kbar->data), __pyx_v_b, __pyx_v_capillaryDiffusionScaling, __pyx_v_advectionScaling, ((
double *)__pyx_v_rwork_psk->data), ((
int *)__pyx_v_iwork_psk->data), ((
double *)__pyx_v_rwork_psk_tol->data), ((
double *)__pyx_v_rwork_density_w->data), ((
double *)__pyx_v_rwork_density_n->data), ((
double *)__pyx_v_g->data), ((
double *)__pyx_v_qt->data), ((
double *)__pyx_v_psiw->data), ((
double *)__pyx_v_sw->data), ((
double *)__pyx_v_m->data), ((
double *)__pyx_v_dm->data), ((
double *)__pyx_v_phi->data), ((
double *)__pyx_v_dphi->data), ((
double *)__pyx_v_f->data), ((
double *)__pyx_v_df->data), ((
double *)__pyx_v_a->data), ((
double *)__pyx_v_da->data)));
6628 (void)(twophaseDarcy_compressibleN_split_sd_saturation_het_matType<VGM,ExponentialDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_v_g->dimensions[0]), 4, ((
int *)__pyx_v_rowptr->data), ((
int *)__pyx_v_colind->data), ((
int *)__pyx_v_matType->data), __pyx_v_muw, __pyx_v_mun, ((
double *)__pyx_v_omega->data), ((
double *)__pyx_v_Kbar->data), __pyx_v_b, __pyx_v_capillaryDiffusionScaling, __pyx_v_advectionScaling, ((
double *)__pyx_v_rwork_psk->data), ((
int *)__pyx_v_iwork_psk->data), ((
double *)__pyx_v_rwork_psk_tol->data), ((
double *)__pyx_v_rwork_density_w->data), ((
double *)__pyx_v_rwork_density_n->data), ((
double *)__pyx_v_g->data), ((
double *)__pyx_v_qt->data), ((
double *)__pyx_v_psiw->data), ((
double *)__pyx_v_sw->data), ((
double *)__pyx_v_m->data), ((
double *)__pyx_v_dm->data), ((
double *)__pyx_v_phi->data), ((
double *)__pyx_v_dphi->data), ((
double *)__pyx_v_f->data), ((
double *)__pyx_v_df->data), ((
double *)__pyx_v_a->data), ((
double *)__pyx_v_da->data)));
6649 switch (__pyx_v_pskModelFlag) {
6659 (void)(twophaseDarcy_compressibleN_split_sd_saturation_het_matType<SimplePSK,IdealGasDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_v_g->dimensions[0]), 2, ((
int *)__pyx_v_rowptr->data), ((
int *)__pyx_v_colind->data), ((
int *)__pyx_v_matType->data), __pyx_v_muw, __pyx_v_mun, ((
double *)__pyx_v_omega->data), ((
double *)__pyx_v_Kbar->data), __pyx_v_b, __pyx_v_capillaryDiffusionScaling, __pyx_v_advectionScaling, ((
double *)__pyx_v_rwork_psk->data), ((
int *)__pyx_v_iwork_psk->data), ((
double *)__pyx_v_rwork_psk_tol->data), ((
double *)__pyx_v_rwork_density_w->data), ((
double *)__pyx_v_rwork_density_n->data), ((
double *)__pyx_v_g->data), ((
double *)__pyx_v_qt->data), ((
double *)__pyx_v_psiw->data), ((
double *)__pyx_v_sw->data), ((
double *)__pyx_v_m->data), ((
double *)__pyx_v_dm->data), ((
double *)__pyx_v_phi->data), ((
double *)__pyx_v_dphi->data), ((
double *)__pyx_v_f->data), ((
double *)__pyx_v_df->data), ((
double *)__pyx_v_a->data), ((
double *)__pyx_v_da->data)));
6678 (void)(twophaseDarcy_compressibleN_split_sd_saturation_het_matType<VGM,IdealGasDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_v_g->dimensions[0]), 4, ((
int *)__pyx_v_rowptr->data), ((
int *)__pyx_v_colind->data), ((
int *)__pyx_v_matType->data), __pyx_v_muw, __pyx_v_mun, ((
double *)__pyx_v_omega->data), ((
double *)__pyx_v_Kbar->data), __pyx_v_b, __pyx_v_capillaryDiffusionScaling, __pyx_v_advectionScaling, ((
double *)__pyx_v_rwork_psk->data), ((
int *)__pyx_v_iwork_psk->data), ((
double *)__pyx_v_rwork_psk_tol->data), ((
double *)__pyx_v_rwork_density_w->data), ((
double *)__pyx_v_rwork_density_n->data), ((
double *)__pyx_v_g->data), ((
double *)__pyx_v_qt->data), ((
double *)__pyx_v_psiw->data), ((
double *)__pyx_v_sw->data), ((
double *)__pyx_v_m->data), ((
double *)__pyx_v_dm->data), ((
double *)__pyx_v_phi->data), ((
double *)__pyx_v_dphi->data), ((
double *)__pyx_v_f->data), ((
double *)__pyx_v_df->data), ((
double *)__pyx_v_a->data), ((
double *)__pyx_v_da->data)));
6697 (void)(twophaseDarcy_compressibleN_split_sd_saturation_het_matType<VGM,IdealGasDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_v_g->dimensions[0]), 4, ((
int *)__pyx_v_rowptr->data), ((
int *)__pyx_v_colind->data), ((
int *)__pyx_v_matType->data), __pyx_v_muw, __pyx_v_mun, ((
double *)__pyx_v_omega->data), ((
double *)__pyx_v_Kbar->data), __pyx_v_b, __pyx_v_capillaryDiffusionScaling, __pyx_v_advectionScaling, ((
double *)__pyx_v_rwork_psk->data), ((
int *)__pyx_v_iwork_psk->data), ((
double *)__pyx_v_rwork_psk_tol->data), ((
double *)__pyx_v_rwork_density_w->data), ((
double *)__pyx_v_rwork_density_n->data), ((
double *)__pyx_v_g->data), ((
double *)__pyx_v_qt->data), ((
double *)__pyx_v_psiw->data), ((
double *)__pyx_v_sw->data), ((
double *)__pyx_v_m->data), ((
double *)__pyx_v_dm->data), ((
double *)__pyx_v_phi->data), ((
double *)__pyx_v_dphi->data), ((
double *)__pyx_v_f->data), ((
double *)__pyx_v_df->data), ((
double *)__pyx_v_a->data), ((
double *)__pyx_v_da->data)));
6718 #ifndef CYTHON_WITHOUT_ASSERTIONS
6719 if (unlikely(!Py_OptimizeFlag)) {
6721 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_configuration_density_w_flag_0_a, __pyx_n_s_format);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1526, __pyx_L1_error)
6722 __Pyx_GOTREF(__pyx_t_2);
6723 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_density_w_flag);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1526, __pyx_L1_error)
6724 __Pyx_GOTREF(__pyx_t_1);
6725 __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_density_n_flag);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1526, __pyx_L1_error)
6726 __Pyx_GOTREF(__pyx_t_5);
6729 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
6730 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
6731 if (likely(__pyx_t_6)) {
6732 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_2);
6733 __Pyx_INCREF(__pyx_t_6);
6734 __Pyx_INCREF(
function);
6735 __Pyx_DECREF_SET(__pyx_t_2,
function);
6739 #if CYTHON_FAST_PYCALL
6740 if (PyFunction_Check(__pyx_t_2)) {
6741 PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_1, __pyx_t_5};
6742 __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1526, __pyx_L1_error)
6743 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
6744 __Pyx_GOTREF(__pyx_t_3);
6745 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6746 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6749 #if CYTHON_FAST_PYCCALL
6750 if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
6751 PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_1, __pyx_t_5};
6752 __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1526, __pyx_L1_error)
6753 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
6754 __Pyx_GOTREF(__pyx_t_3);
6755 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6756 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6760 __pyx_t_7 = PyTuple_New(2+__pyx_t_4);
if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1526, __pyx_L1_error)
6761 __Pyx_GOTREF(__pyx_t_7);
6763 __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
6765 __Pyx_GIVEREF(__pyx_t_1);
6766 PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_4, __pyx_t_1);
6767 __Pyx_GIVEREF(__pyx_t_5);
6768 PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_4, __pyx_t_5);
6771 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1526, __pyx_L1_error)
6772 __Pyx_GOTREF(__pyx_t_3);
6773 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6775 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6776 __pyx_t_2 = PyTuple_Pack(1, __pyx_t_3);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1526, __pyx_L1_error)
6777 __Pyx_GOTREF(__pyx_t_2);
6778 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6779 PyErr_SetObject(PyExc_AssertionError, __pyx_t_2);
6780 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6781 __PYX_ERR(0, 1526, __pyx_L1_error)
6797 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6800 __Pyx_XDECREF(__pyx_t_1);
6801 __Pyx_XDECREF(__pyx_t_2);
6802 __Pyx_XDECREF(__pyx_t_3);
6803 __Pyx_XDECREF(__pyx_t_5);
6804 __Pyx_XDECREF(__pyx_t_6);
6805 __Pyx_XDECREF(__pyx_t_7);
6806 __Pyx_AddTraceback(
"cTwophaseDarcyCoefficients.twophaseDarcy_slightCompressible_split_sd_saturation_het_matType", __pyx_clineno, __pyx_lineno, __pyx_filename);
6809 __Pyx_XGIVEREF(__pyx_r);
6810 __Pyx_RefNannyFinishContext();
6823 static PyObject *__pyx_pw_26cTwophaseDarcyCoefficients_15twophaseDarcy_compressibleN_split_sd_pressure_het_matType(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
6824 static char __pyx_doc_26cTwophaseDarcyCoefficients_14twophaseDarcy_compressibleN_split_sd_pressure_het_matType[] =
"Evaluate the pressure coefficients\n\nUse the split fractional flow formulation of compressible non-wetting\nphase, two-phase Darcy flow for a heterogeneous medium, sparse\ndiffusion rep het\n\n ";
6825 static PyMethodDef __pyx_mdef_26cTwophaseDarcyCoefficients_15twophaseDarcy_compressibleN_split_sd_pressure_het_matType = {
"twophaseDarcy_compressibleN_split_sd_pressure_het_matType", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_26cTwophaseDarcyCoefficients_15twophaseDarcy_compressibleN_split_sd_pressure_het_matType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_26cTwophaseDarcyCoefficients_14twophaseDarcy_compressibleN_split_sd_pressure_het_matType};
6826 static PyObject *__pyx_pw_26cTwophaseDarcyCoefficients_15twophaseDarcy_compressibleN_split_sd_pressure_het_matType(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6827 int __pyx_v_pskModelFlag;
6828 int __pyx_v_density_w_flag;
6829 int __pyx_v_density_n_flag;
6830 PyArrayObject *__pyx_v_rowptr = 0;
6831 PyArrayObject *__pyx_v_colind = 0;
6832 PyArrayObject *__pyx_v_matType = 0;
6835 PyArrayObject *__pyx_v_omega = 0;
6836 PyArrayObject *__pyx_v_Kbar = 0;
6838 double __pyx_v_capillaryDiffusionScaling;
6839 PyArrayObject *__pyx_v_rwork_psk = 0;
6840 PyArrayObject *__pyx_v_iwork_psk = 0;
6841 PyArrayObject *__pyx_v_rwork_psk_tol = 0;
6842 PyArrayObject *__pyx_v_rwork_density_w = 0;
6843 PyArrayObject *__pyx_v_rwork_density_n = 0;
6844 PyArrayObject *__pyx_v_g = 0;
6845 PyArrayObject *__pyx_v_sw = 0;
6846 PyArrayObject *__pyx_v_psiw = 0;
6847 PyArrayObject *__pyx_v_psin = 0;
6848 PyArrayObject *__pyx_v_grad_psic = 0;
6849 PyArrayObject *__pyx_v_m = 0;
6850 PyArrayObject *__pyx_v_dm = 0;
6851 PyArrayObject *__pyx_v_f = 0;
6852 PyArrayObject *__pyx_v_a = 0;
6853 int __pyx_lineno = 0;
6854 const char *__pyx_filename = NULL;
6855 int __pyx_clineno = 0;
6856 PyObject *__pyx_r = 0;
6857 __Pyx_RefNannyDeclarations
6858 __Pyx_RefNannySetupContext(
"twophaseDarcy_compressibleN_split_sd_pressure_het_matType (wrapper)", 0);
6860 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pskModelFlag,&__pyx_n_s_density_w_flag,&__pyx_n_s_density_n_flag,&__pyx_n_s_rowptr,&__pyx_n_s_colind,&__pyx_n_s_matType,&__pyx_n_s_muw,&__pyx_n_s_mun,&__pyx_n_s_omega,&__pyx_n_s_Kbar,&__pyx_n_s_b,&__pyx_n_s_capillaryDiffusionScaling,&__pyx_n_s_rwork_psk,&__pyx_n_s_iwork_psk,&__pyx_n_s_rwork_psk_tol,&__pyx_n_s_rwork_density_w,&__pyx_n_s_rwork_density_n,&__pyx_n_s_g,&__pyx_n_s_sw,&__pyx_n_s_psiw,&__pyx_n_s_psin,&__pyx_n_s_grad_psic,&__pyx_n_s_m,&__pyx_n_s_dm,&__pyx_n_s_f,&__pyx_n_s_a,0};
6861 PyObject* values[26] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
6862 if (unlikely(__pyx_kwds)) {
6864 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
6866 case 26: values[25] = PyTuple_GET_ITEM(__pyx_args, 25);
6868 case 25: values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
6870 case 24: values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
6872 case 23: values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
6874 case 22: values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
6876 case 21: values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
6878 case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
6880 case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
6882 case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
6884 case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
6886 case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
6888 case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
6890 case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
6892 case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
6894 case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
6896 case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
6898 case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
6900 case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
6902 case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
6904 case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
6906 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
6908 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6910 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6912 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6914 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6916 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6919 default:
goto __pyx_L5_argtuple_error;
6921 kw_args = PyDict_Size(__pyx_kwds);
6924 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pskModelFlag)) != 0)) kw_args--;
6925 else goto __pyx_L5_argtuple_error;
6928 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_density_w_flag)) != 0)) kw_args--;
6930 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_compressibleN_split_sd_pressure_het_matType", 1, 26, 26, 1); __PYX_ERR(0, 1528, __pyx_L3_error)
6934 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_density_n_flag)) != 0)) kw_args--;
6936 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_compressibleN_split_sd_pressure_het_matType", 1, 26, 26, 2); __PYX_ERR(0, 1528, __pyx_L3_error)
6940 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rowptr)) != 0)) kw_args--;
6942 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_compressibleN_split_sd_pressure_het_matType", 1, 26, 26, 3); __PYX_ERR(0, 1528, __pyx_L3_error)
6946 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_colind)) != 0)) kw_args--;
6948 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_compressibleN_split_sd_pressure_het_matType", 1, 26, 26, 4); __PYX_ERR(0, 1528, __pyx_L3_error)
6952 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_matType)) != 0)) kw_args--;
6954 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_compressibleN_split_sd_pressure_het_matType", 1, 26, 26, 5); __PYX_ERR(0, 1528, __pyx_L3_error)
6958 if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_muw)) != 0)) kw_args--;
6960 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_compressibleN_split_sd_pressure_het_matType", 1, 26, 26, 6); __PYX_ERR(0, 1528, __pyx_L3_error)
6964 if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mun)) != 0)) kw_args--;
6966 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_compressibleN_split_sd_pressure_het_matType", 1, 26, 26, 7); __PYX_ERR(0, 1528, __pyx_L3_error)
6970 if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_omega)) != 0)) kw_args--;
6972 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_compressibleN_split_sd_pressure_het_matType", 1, 26, 26, 8); __PYX_ERR(0, 1528, __pyx_L3_error)
6976 if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Kbar)) != 0)) kw_args--;
6978 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_compressibleN_split_sd_pressure_het_matType", 1, 26, 26, 9); __PYX_ERR(0, 1528, __pyx_L3_error)
6982 if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--;
6984 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_compressibleN_split_sd_pressure_het_matType", 1, 26, 26, 10); __PYX_ERR(0, 1528, __pyx_L3_error)
6988 if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_capillaryDiffusionScaling)) != 0)) kw_args--;
6990 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_compressibleN_split_sd_pressure_het_matType", 1, 26, 26, 11); __PYX_ERR(0, 1528, __pyx_L3_error)
6994 if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork_psk)) != 0)) kw_args--;
6996 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_compressibleN_split_sd_pressure_het_matType", 1, 26, 26, 12); __PYX_ERR(0, 1528, __pyx_L3_error)
7000 if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iwork_psk)) != 0)) kw_args--;
7002 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_compressibleN_split_sd_pressure_het_matType", 1, 26, 26, 13); __PYX_ERR(0, 1528, __pyx_L3_error)
7006 if (likely((values[14] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork_psk_tol)) != 0)) kw_args--;
7008 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_compressibleN_split_sd_pressure_het_matType", 1, 26, 26, 14); __PYX_ERR(0, 1528, __pyx_L3_error)
7012 if (likely((values[15] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork_density_w)) != 0)) kw_args--;
7014 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_compressibleN_split_sd_pressure_het_matType", 1, 26, 26, 15); __PYX_ERR(0, 1528, __pyx_L3_error)
7018 if (likely((values[16] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork_density_n)) != 0)) kw_args--;
7020 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_compressibleN_split_sd_pressure_het_matType", 1, 26, 26, 16); __PYX_ERR(0, 1528, __pyx_L3_error)
7024 if (likely((values[17] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_g)) != 0)) kw_args--;
7026 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_compressibleN_split_sd_pressure_het_matType", 1, 26, 26, 17); __PYX_ERR(0, 1528, __pyx_L3_error)
7030 if (likely((values[18] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sw)) != 0)) kw_args--;
7032 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_compressibleN_split_sd_pressure_het_matType", 1, 26, 26, 18); __PYX_ERR(0, 1528, __pyx_L3_error)
7036 if (likely((values[19] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_psiw)) != 0)) kw_args--;
7038 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_compressibleN_split_sd_pressure_het_matType", 1, 26, 26, 19); __PYX_ERR(0, 1528, __pyx_L3_error)
7042 if (likely((values[20] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_psin)) != 0)) kw_args--;
7044 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_compressibleN_split_sd_pressure_het_matType", 1, 26, 26, 20); __PYX_ERR(0, 1528, __pyx_L3_error)
7048 if (likely((values[21] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_psic)) != 0)) kw_args--;
7050 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_compressibleN_split_sd_pressure_het_matType", 1, 26, 26, 21); __PYX_ERR(0, 1528, __pyx_L3_error)
7054 if (likely((values[22] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
7056 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_compressibleN_split_sd_pressure_het_matType", 1, 26, 26, 22); __PYX_ERR(0, 1528, __pyx_L3_error)
7060 if (likely((values[23] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dm)) != 0)) kw_args--;
7062 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_compressibleN_split_sd_pressure_het_matType", 1, 26, 26, 23); __PYX_ERR(0, 1528, __pyx_L3_error)
7066 if (likely((values[24] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_f)) != 0)) kw_args--;
7068 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_compressibleN_split_sd_pressure_het_matType", 1, 26, 26, 24); __PYX_ERR(0, 1528, __pyx_L3_error)
7072 if (likely((values[25] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
7074 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_compressibleN_split_sd_pressure_het_matType", 1, 26, 26, 25); __PYX_ERR(0, 1528, __pyx_L3_error)
7077 if (unlikely(kw_args > 0)) {
7078 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"twophaseDarcy_compressibleN_split_sd_pressure_het_matType") < 0)) __PYX_ERR(0, 1528, __pyx_L3_error)
7080 }
else if (PyTuple_GET_SIZE(__pyx_args) != 26) {
7081 goto __pyx_L5_argtuple_error;
7083 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7084 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7085 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
7086 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
7087 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
7088 values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
7089 values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
7090 values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
7091 values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
7092 values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
7093 values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
7094 values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
7095 values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
7096 values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
7097 values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
7098 values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
7099 values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
7100 values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
7101 values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
7102 values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
7103 values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
7104 values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
7105 values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
7106 values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
7107 values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
7108 values[25] = PyTuple_GET_ITEM(__pyx_args, 25);
7110 __pyx_v_pskModelFlag = __Pyx_PyInt_As_int(values[0]);
if (unlikely((__pyx_v_pskModelFlag == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1528, __pyx_L3_error)
7111 __pyx_v_density_w_flag = __Pyx_PyInt_As_int(values[1]);
if (unlikely((__pyx_v_density_w_flag == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1529, __pyx_L3_error)
7112 __pyx_v_density_n_flag = __Pyx_PyInt_As_int(values[2]);
if (unlikely((__pyx_v_density_n_flag == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1530, __pyx_L3_error)
7113 __pyx_v_rowptr = ((PyArrayObject *)values[3]);
7114 __pyx_v_colind = ((PyArrayObject *)values[4]);
7115 __pyx_v_matType = ((PyArrayObject *)values[5]);
7116 __pyx_v_muw = __pyx_PyFloat_AsDouble(values[6]);
if (unlikely((__pyx_v_muw == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1534, __pyx_L3_error)
7117 __pyx_v_mun = __pyx_PyFloat_AsDouble(values[7]);
if (unlikely((__pyx_v_mun == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1535, __pyx_L3_error)
7118 __pyx_v_omega = ((PyArrayObject *)values[8]);
7119 __pyx_v_Kbar = ((PyArrayObject *)values[9]);
7120 __pyx_v_b = __pyx_PyFloat_AsDouble(values[10]);
if (unlikely((__pyx_v_b == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1538, __pyx_L3_error)
7121 __pyx_v_capillaryDiffusionScaling = __pyx_PyFloat_AsDouble(values[11]);
if (unlikely((__pyx_v_capillaryDiffusionScaling == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1539, __pyx_L3_error)
7122 __pyx_v_rwork_psk = ((PyArrayObject *)values[12]);
7123 __pyx_v_iwork_psk = ((PyArrayObject *)values[13]);
7124 __pyx_v_rwork_psk_tol = ((PyArrayObject *)values[14]);
7125 __pyx_v_rwork_density_w = ((PyArrayObject *)values[15]);
7126 __pyx_v_rwork_density_n = ((PyArrayObject *)values[16]);
7127 __pyx_v_g = ((PyArrayObject *)values[17]);
7128 __pyx_v_sw = ((PyArrayObject *)values[18]);
7129 __pyx_v_psiw = ((PyArrayObject *)values[19]);
7130 __pyx_v_psin = ((PyArrayObject *)values[20]);
7131 __pyx_v_grad_psic = ((PyArrayObject *)values[21]);
7132 __pyx_v_m = ((PyArrayObject *)values[22]);
7133 __pyx_v_dm = ((PyArrayObject *)values[23]);
7134 __pyx_v_f = ((PyArrayObject *)values[24]);
7135 __pyx_v_a = ((PyArrayObject *)values[25]);
7137 goto __pyx_L4_argument_unpacking_done;
7138 __pyx_L5_argtuple_error:;
7139 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_compressibleN_split_sd_pressure_het_matType", 1, 26, 26, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1528, __pyx_L3_error)
7141 __Pyx_AddTraceback(
"cTwophaseDarcyCoefficients.twophaseDarcy_compressibleN_split_sd_pressure_het_matType", __pyx_clineno, __pyx_lineno, __pyx_filename);
7142 __Pyx_RefNannyFinishContext();
7144 __pyx_L4_argument_unpacking_done:;
7145 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rowptr), __pyx_ptype_5numpy_ndarray, 1,
"rowptr", 0))) __PYX_ERR(0, 1531, __pyx_L1_error)
7146 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_colind), __pyx_ptype_5numpy_ndarray, 1,
"colind", 0))) __PYX_ERR(0, 1532, __pyx_L1_error)
7147 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_matType), __pyx_ptype_5numpy_ndarray, 1,
"matType", 0))) __PYX_ERR(0, 1533, __pyx_L1_error)
7148 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_omega), __pyx_ptype_5numpy_ndarray, 1,
"omega", 0))) __PYX_ERR(0, 1536, __pyx_L1_error)
7149 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Kbar), __pyx_ptype_5numpy_ndarray, 1,
"Kbar", 0))) __PYX_ERR(0, 1537, __pyx_L1_error)
7150 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_psk), __pyx_ptype_5numpy_ndarray, 1,
"rwork_psk", 0))) __PYX_ERR(0, 1540, __pyx_L1_error)
7151 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork_psk), __pyx_ptype_5numpy_ndarray, 1,
"iwork_psk", 0))) __PYX_ERR(0, 1541, __pyx_L1_error)
7152 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_psk_tol), __pyx_ptype_5numpy_ndarray, 1,
"rwork_psk_tol", 0))) __PYX_ERR(0, 1542, __pyx_L1_error)
7153 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_density_w), __pyx_ptype_5numpy_ndarray, 1,
"rwork_density_w", 0))) __PYX_ERR(0, 1543, __pyx_L1_error)
7154 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_density_n), __pyx_ptype_5numpy_ndarray, 1,
"rwork_density_n", 0))) __PYX_ERR(0, 1544, __pyx_L1_error)
7155 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_g), __pyx_ptype_5numpy_ndarray, 1,
"g", 0))) __PYX_ERR(0, 1545, __pyx_L1_error)
7156 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sw), __pyx_ptype_5numpy_ndarray, 1,
"sw", 0))) __PYX_ERR(0, 1545, __pyx_L1_error)
7157 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_psiw), __pyx_ptype_5numpy_ndarray, 1,
"psiw", 0))) __PYX_ERR(0, 1545, __pyx_L1_error)
7158 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_psin), __pyx_ptype_5numpy_ndarray, 1,
"psin", 0))) __PYX_ERR(0, 1545, __pyx_L1_error)
7159 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_psic), __pyx_ptype_5numpy_ndarray, 1,
"grad_psic", 0))) __PYX_ERR(0, 1545, __pyx_L1_error)
7160 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_m), __pyx_ptype_5numpy_ndarray, 1,
"m", 0))) __PYX_ERR(0, 1545, __pyx_L1_error)
7161 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dm), __pyx_ptype_5numpy_ndarray, 1,
"dm", 0))) __PYX_ERR(0, 1545, __pyx_L1_error)
7162 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_f), __pyx_ptype_5numpy_ndarray, 1,
"f", 0))) __PYX_ERR(0, 1545, __pyx_L1_error)
7163 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1,
"a", 0))) __PYX_ERR(0, 1545, __pyx_L1_error)
7164 __pyx_r = __pyx_pf_26cTwophaseDarcyCoefficients_14twophaseDarcy_compressibleN_split_sd_pressure_het_matType(__pyx_self, __pyx_v_pskModelFlag, __pyx_v_density_w_flag, __pyx_v_density_n_flag, __pyx_v_rowptr, __pyx_v_colind, __pyx_v_matType, __pyx_v_muw, __pyx_v_mun, __pyx_v_omega, __pyx_v_Kbar, __pyx_v_b, __pyx_v_capillaryDiffusionScaling, __pyx_v_rwork_psk, __pyx_v_iwork_psk, __pyx_v_rwork_psk_tol, __pyx_v_rwork_density_w, __pyx_v_rwork_density_n, __pyx_v_g, __pyx_v_sw, __pyx_v_psiw, __pyx_v_psin, __pyx_v_grad_psic, __pyx_v_m, __pyx_v_dm, __pyx_v_f, __pyx_v_a);
7171 __Pyx_RefNannyFinishContext();
7175 static PyObject *__pyx_pf_26cTwophaseDarcyCoefficients_14twophaseDarcy_compressibleN_split_sd_pressure_het_matType(CYTHON_UNUSED PyObject *__pyx_self,
int __pyx_v_pskModelFlag,
int __pyx_v_density_w_flag,
int __pyx_v_density_n_flag, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_matType,
double __pyx_v_muw,
double __pyx_v_mun, PyArrayObject *__pyx_v_omega, PyArrayObject *__pyx_v_Kbar,
double __pyx_v_b,
double __pyx_v_capillaryDiffusionScaling, PyArrayObject *__pyx_v_rwork_psk, PyArrayObject *__pyx_v_iwork_psk, PyArrayObject *__pyx_v_rwork_psk_tol, PyArrayObject *__pyx_v_rwork_density_w, PyArrayObject *__pyx_v_rwork_density_n, PyArrayObject *__pyx_v_g, PyArrayObject *__pyx_v_sw, PyArrayObject *__pyx_v_psiw, PyArrayObject *__pyx_v_psin, PyArrayObject *__pyx_v_grad_psic, PyArrayObject *__pyx_v_m, PyArrayObject *__pyx_v_dm, PyArrayObject *__pyx_v_f, PyArrayObject *__pyx_v_a) {
7176 int __pyx_v_nPointsPerSimplex;
7177 int __pyx_v_nSimplex;
7178 PyObject *__pyx_r = NULL;
7179 __Pyx_RefNannyDeclarations
7180 PyObject *__pyx_t_1 = NULL;
7181 PyObject *__pyx_t_2 = NULL;
7182 PyObject *__pyx_t_3 = NULL;
7184 PyObject *__pyx_t_5 = NULL;
7185 PyObject *__pyx_t_6 = NULL;
7186 PyObject *__pyx_t_7 = NULL;
7187 int __pyx_lineno = 0;
7188 const char *__pyx_filename = NULL;
7189 int __pyx_clineno = 0;
7190 __Pyx_RefNannySetupContext(
"twophaseDarcy_compressibleN_split_sd_pressure_het_matType", 0);
7199 __pyx_v_nPointsPerSimplex = (__pyx_v_sw->dimensions[(__pyx_v_sw->nd - 1)]);
7208 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_sw), __pyx_n_s_size);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1554, __pyx_L1_error)
7209 __Pyx_GOTREF(__pyx_t_1);
7210 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_nPointsPerSimplex);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1554, __pyx_L1_error)
7211 __Pyx_GOTREF(__pyx_t_2);
7212 __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1554, __pyx_L1_error)
7213 __Pyx_GOTREF(__pyx_t_3);
7214 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7215 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7216 __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3);
if (unlikely((__pyx_t_4 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1554, __pyx_L1_error)
7217 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7218 __pyx_v_nSimplex = __pyx_t_4;
7227 switch (__pyx_v_density_n_flag) {
7237 switch (__pyx_v_pskModelFlag) {
7247 (void)(twophaseDarcy_compressibleN_split_sd_pressure_het_matType<SimplePSK,ExponentialDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_v_g->dimensions[0]), 2, ((
int *)__pyx_v_rowptr->data), ((
int *)__pyx_v_colind->data), ((
int *)__pyx_v_matType->data), __pyx_v_muw, __pyx_v_mun, ((
double *)__pyx_v_omega->data), ((
double *)__pyx_v_Kbar->data), __pyx_v_b, __pyx_v_capillaryDiffusionScaling, ((
double *)__pyx_v_rwork_psk->data), ((
int *)__pyx_v_iwork_psk->data), ((
double *)__pyx_v_rwork_psk_tol->data), ((
double *)__pyx_v_rwork_density_w->data), ((
double *)__pyx_v_rwork_density_n->data), ((
double *)__pyx_v_g->data), ((
double *)__pyx_v_sw->data), ((
double *)__pyx_v_psiw->data), ((
double *)__pyx_v_psin->data), ((
double *)__pyx_v_grad_psic->data), ((
double *)__pyx_v_m->data), ((
double *)__pyx_v_dm->data), ((
double *)__pyx_v_f->data), ((
double *)__pyx_v_a->data)));
7266 (void)(twophaseDarcy_compressibleN_split_sd_pressure_het_matType<VGM,ExponentialDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_v_g->dimensions[0]), 4, ((
int *)__pyx_v_rowptr->data), ((
int *)__pyx_v_colind->data), ((
int *)__pyx_v_matType->data), __pyx_v_muw, __pyx_v_mun, ((
double *)__pyx_v_omega->data), ((
double *)__pyx_v_Kbar->data), __pyx_v_b, __pyx_v_capillaryDiffusionScaling, ((
double *)__pyx_v_rwork_psk->data), ((
int *)__pyx_v_iwork_psk->data), ((
double *)__pyx_v_rwork_psk_tol->data), ((
double *)__pyx_v_rwork_density_w->data), ((
double *)__pyx_v_rwork_density_n->data), ((
double *)__pyx_v_g->data), ((
double *)__pyx_v_sw->data), ((
double *)__pyx_v_psiw->data), ((
double *)__pyx_v_psin->data), ((
double *)__pyx_v_grad_psic->data), ((
double *)__pyx_v_m->data), ((
double *)__pyx_v_dm->data), ((
double *)__pyx_v_f->data), ((
double *)__pyx_v_a->data)));
7285 (void)(twophaseDarcy_compressibleN_split_sd_pressure_het_matType<VGM,ExponentialDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_v_g->dimensions[0]), 4, ((
int *)__pyx_v_rowptr->data), ((
int *)__pyx_v_colind->data), ((
int *)__pyx_v_matType->data), __pyx_v_muw, __pyx_v_mun, ((
double *)__pyx_v_omega->data), ((
double *)__pyx_v_Kbar->data), __pyx_v_b, __pyx_v_capillaryDiffusionScaling, ((
double *)__pyx_v_rwork_psk->data), ((
int *)__pyx_v_iwork_psk->data), ((
double *)__pyx_v_rwork_psk_tol->data), ((
double *)__pyx_v_rwork_density_w->data), ((
double *)__pyx_v_rwork_density_n->data), ((
double *)__pyx_v_g->data), ((
double *)__pyx_v_sw->data), ((
double *)__pyx_v_psiw->data), ((
double *)__pyx_v_psin->data), ((
double *)__pyx_v_grad_psic->data), ((
double *)__pyx_v_m->data), ((
double *)__pyx_v_dm->data), ((
double *)__pyx_v_f->data), ((
double *)__pyx_v_a->data)));
7306 switch (__pyx_v_pskModelFlag) {
7316 (void)(twophaseDarcy_compressibleN_split_sd_pressure_het_matType<SimplePSK,IdealGasDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_v_g->dimensions[0]), 2, ((
int *)__pyx_v_rowptr->data), ((
int *)__pyx_v_colind->data), ((
int *)__pyx_v_matType->data), __pyx_v_muw, __pyx_v_mun, ((
double *)__pyx_v_omega->data), ((
double *)__pyx_v_Kbar->data), __pyx_v_b, __pyx_v_capillaryDiffusionScaling, ((
double *)__pyx_v_rwork_psk->data), ((
int *)__pyx_v_iwork_psk->data), ((
double *)__pyx_v_rwork_psk_tol->data), ((
double *)__pyx_v_rwork_density_w->data), ((
double *)__pyx_v_rwork_density_n->data), ((
double *)__pyx_v_g->data), ((
double *)__pyx_v_sw->data), ((
double *)__pyx_v_psiw->data), ((
double *)__pyx_v_psin->data), ((
double *)__pyx_v_grad_psic->data), ((
double *)__pyx_v_m->data), ((
double *)__pyx_v_dm->data), ((
double *)__pyx_v_f->data), ((
double *)__pyx_v_a->data)));
7335 (void)(twophaseDarcy_compressibleN_split_sd_pressure_het_matType<VGM,IdealGasDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_v_g->dimensions[0]), 4, ((
int *)__pyx_v_rowptr->data), ((
int *)__pyx_v_colind->data), ((
int *)__pyx_v_matType->data), __pyx_v_muw, __pyx_v_mun, ((
double *)__pyx_v_omega->data), ((
double *)__pyx_v_Kbar->data), __pyx_v_b, __pyx_v_capillaryDiffusionScaling, ((
double *)__pyx_v_rwork_psk->data), ((
int *)__pyx_v_iwork_psk->data), ((
double *)__pyx_v_rwork_psk_tol->data), ((
double *)__pyx_v_rwork_density_w->data), ((
double *)__pyx_v_rwork_density_n->data), ((
double *)__pyx_v_g->data), ((
double *)__pyx_v_sw->data), ((
double *)__pyx_v_psiw->data), ((
double *)__pyx_v_psin->data), ((
double *)__pyx_v_grad_psic->data), ((
double *)__pyx_v_m->data), ((
double *)__pyx_v_dm->data), ((
double *)__pyx_v_f->data), ((
double *)__pyx_v_a->data)));
7354 (void)(twophaseDarcy_compressibleN_split_sd_pressure_het_matType<VGM,IdealGasDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_v_g->dimensions[0]), 4, ((
int *)__pyx_v_rowptr->data), ((
int *)__pyx_v_colind->data), ((
int *)__pyx_v_matType->data), __pyx_v_muw, __pyx_v_mun, ((
double *)__pyx_v_omega->data), ((
double *)__pyx_v_Kbar->data), __pyx_v_b, __pyx_v_capillaryDiffusionScaling, ((
double *)__pyx_v_rwork_psk->data), ((
int *)__pyx_v_iwork_psk->data), ((
double *)__pyx_v_rwork_psk_tol->data), ((
double *)__pyx_v_rwork_density_w->data), ((
double *)__pyx_v_rwork_density_n->data), ((
double *)__pyx_v_g->data), ((
double *)__pyx_v_sw->data), ((
double *)__pyx_v_psiw->data), ((
double *)__pyx_v_psin->data), ((
double *)__pyx_v_grad_psic->data), ((
double *)__pyx_v_m->data), ((
double *)__pyx_v_dm->data), ((
double *)__pyx_v_f->data), ((
double *)__pyx_v_a->data)));
7375 #ifndef CYTHON_WITHOUT_ASSERTIONS
7376 if (unlikely(!Py_OptimizeFlag)) {
7378 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_configuration_density_w_flag_0_a, __pyx_n_s_format);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1682, __pyx_L1_error)
7379 __Pyx_GOTREF(__pyx_t_2);
7380 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_density_w_flag);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1682, __pyx_L1_error)
7381 __Pyx_GOTREF(__pyx_t_1);
7382 __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_density_n_flag);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1682, __pyx_L1_error)
7383 __Pyx_GOTREF(__pyx_t_5);
7386 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
7387 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
7388 if (likely(__pyx_t_6)) {
7389 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_2);
7390 __Pyx_INCREF(__pyx_t_6);
7391 __Pyx_INCREF(
function);
7392 __Pyx_DECREF_SET(__pyx_t_2,
function);
7396 #if CYTHON_FAST_PYCALL
7397 if (PyFunction_Check(__pyx_t_2)) {
7398 PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_1, __pyx_t_5};
7399 __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1682, __pyx_L1_error)
7400 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
7401 __Pyx_GOTREF(__pyx_t_3);
7402 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7403 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7406 #if CYTHON_FAST_PYCCALL
7407 if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
7408 PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_1, __pyx_t_5};
7409 __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1682, __pyx_L1_error)
7410 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
7411 __Pyx_GOTREF(__pyx_t_3);
7412 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7413 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7417 __pyx_t_7 = PyTuple_New(2+__pyx_t_4);
if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1682, __pyx_L1_error)
7418 __Pyx_GOTREF(__pyx_t_7);
7420 __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
7422 __Pyx_GIVEREF(__pyx_t_1);
7423 PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_4, __pyx_t_1);
7424 __Pyx_GIVEREF(__pyx_t_5);
7425 PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_4, __pyx_t_5);
7428 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1682, __pyx_L1_error)
7429 __Pyx_GOTREF(__pyx_t_3);
7430 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7432 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7433 __pyx_t_2 = PyTuple_Pack(1, __pyx_t_3);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1682, __pyx_L1_error)
7434 __Pyx_GOTREF(__pyx_t_2);
7435 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7436 PyErr_SetObject(PyExc_AssertionError, __pyx_t_2);
7437 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7438 __PYX_ERR(0, 1682, __pyx_L1_error)
7454 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7457 __Pyx_XDECREF(__pyx_t_1);
7458 __Pyx_XDECREF(__pyx_t_2);
7459 __Pyx_XDECREF(__pyx_t_3);
7460 __Pyx_XDECREF(__pyx_t_5);
7461 __Pyx_XDECREF(__pyx_t_6);
7462 __Pyx_XDECREF(__pyx_t_7);
7463 __Pyx_AddTraceback(
"cTwophaseDarcyCoefficients.twophaseDarcy_compressibleN_split_sd_pressure_het_matType", __pyx_clineno, __pyx_lineno, __pyx_filename);
7466 __Pyx_XGIVEREF(__pyx_r);
7467 __Pyx_RefNannyFinishContext();
7480 static PyObject *__pyx_pw_26cTwophaseDarcyCoefficients_17twophaseDarcy_compressibleN_split_sd_saturation_het_matType(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
7481 static char __pyx_doc_26cTwophaseDarcyCoefficients_16twophaseDarcy_compressibleN_split_sd_saturation_het_matType[] =
"Evaluate the saturation coefficients\n\nUse the split fractional flow formulation of compressible non-wetting\nphase, two-phase Darcy flow for a heterogeneous medium, sparse\ndiffusion rep het\n\n ";
7482 static PyMethodDef __pyx_mdef_26cTwophaseDarcyCoefficients_17twophaseDarcy_compressibleN_split_sd_saturation_het_matType = {
"twophaseDarcy_compressibleN_split_sd_saturation_het_matType", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_26cTwophaseDarcyCoefficients_17twophaseDarcy_compressibleN_split_sd_saturation_het_matType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_26cTwophaseDarcyCoefficients_16twophaseDarcy_compressibleN_split_sd_saturation_het_matType};
7483 static PyObject *__pyx_pw_26cTwophaseDarcyCoefficients_17twophaseDarcy_compressibleN_split_sd_saturation_het_matType(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
7484 int __pyx_v_pskModelFlag;
7485 int __pyx_v_density_w_flag;
7486 int __pyx_v_density_n_flag;
7487 PyArrayObject *__pyx_v_rowptr = 0;
7488 PyArrayObject *__pyx_v_colind = 0;
7489 PyArrayObject *__pyx_v_matType = 0;
7492 PyArrayObject *__pyx_v_omega = 0;
7493 PyArrayObject *__pyx_v_Kbar = 0;
7495 double __pyx_v_capillaryDiffusionScaling;
7496 double __pyx_v_advectionScaling;
7497 PyArrayObject *__pyx_v_rwork_psk = 0;
7498 PyArrayObject *__pyx_v_iwork_psk = 0;
7499 PyArrayObject *__pyx_v_rwork_psk_tol = 0;
7500 PyArrayObject *__pyx_v_rwork_density_w = 0;
7501 PyArrayObject *__pyx_v_rwork_density_n = 0;
7502 PyArrayObject *__pyx_v_g = 0;
7503 PyArrayObject *__pyx_v_qt = 0;
7504 PyArrayObject *__pyx_v_psiw = 0;
7505 PyArrayObject *__pyx_v_sw = 0;
7506 PyArrayObject *__pyx_v_m = 0;
7507 PyArrayObject *__pyx_v_dm = 0;
7508 PyArrayObject *__pyx_v_phi = 0;
7509 PyArrayObject *__pyx_v_dphi = 0;
7510 PyArrayObject *__pyx_v_f = 0;
7511 PyArrayObject *__pyx_v_df = 0;
7512 PyArrayObject *__pyx_v_a = 0;
7513 PyArrayObject *__pyx_v_da = 0;
7514 int __pyx_lineno = 0;
7515 const char *__pyx_filename = NULL;
7516 int __pyx_clineno = 0;
7517 PyObject *__pyx_r = 0;
7518 __Pyx_RefNannyDeclarations
7519 __Pyx_RefNannySetupContext(
"twophaseDarcy_compressibleN_split_sd_saturation_het_matType (wrapper)", 0);
7521 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pskModelFlag,&__pyx_n_s_density_w_flag,&__pyx_n_s_density_n_flag,&__pyx_n_s_rowptr,&__pyx_n_s_colind,&__pyx_n_s_matType,&__pyx_n_s_muw,&__pyx_n_s_mun,&__pyx_n_s_omega,&__pyx_n_s_Kbar,&__pyx_n_s_b,&__pyx_n_s_capillaryDiffusionScaling,&__pyx_n_s_advectionScaling,&__pyx_n_s_rwork_psk,&__pyx_n_s_iwork_psk,&__pyx_n_s_rwork_psk_tol,&__pyx_n_s_rwork_density_w,&__pyx_n_s_rwork_density_n,&__pyx_n_s_g,&__pyx_n_s_qt,&__pyx_n_s_psiw,&__pyx_n_s_sw,&__pyx_n_s_m,&__pyx_n_s_dm,&__pyx_n_s_phi,&__pyx_n_s_dphi,&__pyx_n_s_f,&__pyx_n_s_df,&__pyx_n_s_a,&__pyx_n_s_da,0};
7522 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};
7523 if (unlikely(__pyx_kwds)) {
7525 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
7527 case 30: values[29] = PyTuple_GET_ITEM(__pyx_args, 29);
7529 case 29: values[28] = PyTuple_GET_ITEM(__pyx_args, 28);
7531 case 28: values[27] = PyTuple_GET_ITEM(__pyx_args, 27);
7533 case 27: values[26] = PyTuple_GET_ITEM(__pyx_args, 26);
7535 case 26: values[25] = PyTuple_GET_ITEM(__pyx_args, 25);
7537 case 25: values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
7539 case 24: values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
7541 case 23: values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
7543 case 22: values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
7545 case 21: values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
7547 case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
7549 case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
7551 case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
7553 case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
7555 case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
7557 case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
7559 case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
7561 case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
7563 case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
7565 case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
7567 case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
7569 case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
7571 case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
7573 case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
7575 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
7577 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
7579 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
7581 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
7583 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7585 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7588 default:
goto __pyx_L5_argtuple_error;
7590 kw_args = PyDict_Size(__pyx_kwds);
7593 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pskModelFlag)) != 0)) kw_args--;
7594 else goto __pyx_L5_argtuple_error;
7597 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_density_w_flag)) != 0)) kw_args--;
7599 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_compressibleN_split_sd_saturation_het_matType", 1, 30, 30, 1); __PYX_ERR(0, 1684, __pyx_L3_error)
7603 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_density_n_flag)) != 0)) kw_args--;
7605 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_compressibleN_split_sd_saturation_het_matType", 1, 30, 30, 2); __PYX_ERR(0, 1684, __pyx_L3_error)
7609 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rowptr)) != 0)) kw_args--;
7611 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_compressibleN_split_sd_saturation_het_matType", 1, 30, 30, 3); __PYX_ERR(0, 1684, __pyx_L3_error)
7615 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_colind)) != 0)) kw_args--;
7617 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_compressibleN_split_sd_saturation_het_matType", 1, 30, 30, 4); __PYX_ERR(0, 1684, __pyx_L3_error)
7621 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_matType)) != 0)) kw_args--;
7623 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_compressibleN_split_sd_saturation_het_matType", 1, 30, 30, 5); __PYX_ERR(0, 1684, __pyx_L3_error)
7627 if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_muw)) != 0)) kw_args--;
7629 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_compressibleN_split_sd_saturation_het_matType", 1, 30, 30, 6); __PYX_ERR(0, 1684, __pyx_L3_error)
7633 if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mun)) != 0)) kw_args--;
7635 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_compressibleN_split_sd_saturation_het_matType", 1, 30, 30, 7); __PYX_ERR(0, 1684, __pyx_L3_error)
7639 if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_omega)) != 0)) kw_args--;
7641 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_compressibleN_split_sd_saturation_het_matType", 1, 30, 30, 8); __PYX_ERR(0, 1684, __pyx_L3_error)
7645 if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Kbar)) != 0)) kw_args--;
7647 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_compressibleN_split_sd_saturation_het_matType", 1, 30, 30, 9); __PYX_ERR(0, 1684, __pyx_L3_error)
7651 if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--;
7653 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_compressibleN_split_sd_saturation_het_matType", 1, 30, 30, 10); __PYX_ERR(0, 1684, __pyx_L3_error)
7657 if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_capillaryDiffusionScaling)) != 0)) kw_args--;
7659 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_compressibleN_split_sd_saturation_het_matType", 1, 30, 30, 11); __PYX_ERR(0, 1684, __pyx_L3_error)
7663 if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_advectionScaling)) != 0)) kw_args--;
7665 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_compressibleN_split_sd_saturation_het_matType", 1, 30, 30, 12); __PYX_ERR(0, 1684, __pyx_L3_error)
7669 if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork_psk)) != 0)) kw_args--;
7671 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_compressibleN_split_sd_saturation_het_matType", 1, 30, 30, 13); __PYX_ERR(0, 1684, __pyx_L3_error)
7675 if (likely((values[14] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iwork_psk)) != 0)) kw_args--;
7677 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_compressibleN_split_sd_saturation_het_matType", 1, 30, 30, 14); __PYX_ERR(0, 1684, __pyx_L3_error)
7681 if (likely((values[15] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork_psk_tol)) != 0)) kw_args--;
7683 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_compressibleN_split_sd_saturation_het_matType", 1, 30, 30, 15); __PYX_ERR(0, 1684, __pyx_L3_error)
7687 if (likely((values[16] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork_density_w)) != 0)) kw_args--;
7689 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_compressibleN_split_sd_saturation_het_matType", 1, 30, 30, 16); __PYX_ERR(0, 1684, __pyx_L3_error)
7693 if (likely((values[17] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork_density_n)) != 0)) kw_args--;
7695 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_compressibleN_split_sd_saturation_het_matType", 1, 30, 30, 17); __PYX_ERR(0, 1684, __pyx_L3_error)
7699 if (likely((values[18] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_g)) != 0)) kw_args--;
7701 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_compressibleN_split_sd_saturation_het_matType", 1, 30, 30, 18); __PYX_ERR(0, 1684, __pyx_L3_error)
7705 if (likely((values[19] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_qt)) != 0)) kw_args--;
7707 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_compressibleN_split_sd_saturation_het_matType", 1, 30, 30, 19); __PYX_ERR(0, 1684, __pyx_L3_error)
7711 if (likely((values[20] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_psiw)) != 0)) kw_args--;
7713 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_compressibleN_split_sd_saturation_het_matType", 1, 30, 30, 20); __PYX_ERR(0, 1684, __pyx_L3_error)
7717 if (likely((values[21] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sw)) != 0)) kw_args--;
7719 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_compressibleN_split_sd_saturation_het_matType", 1, 30, 30, 21); __PYX_ERR(0, 1684, __pyx_L3_error)
7723 if (likely((values[22] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
7725 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_compressibleN_split_sd_saturation_het_matType", 1, 30, 30, 22); __PYX_ERR(0, 1684, __pyx_L3_error)
7729 if (likely((values[23] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dm)) != 0)) kw_args--;
7731 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_compressibleN_split_sd_saturation_het_matType", 1, 30, 30, 23); __PYX_ERR(0, 1684, __pyx_L3_error)
7735 if (likely((values[24] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_phi)) != 0)) kw_args--;
7737 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_compressibleN_split_sd_saturation_het_matType", 1, 30, 30, 24); __PYX_ERR(0, 1684, __pyx_L3_error)
7741 if (likely((values[25] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dphi)) != 0)) kw_args--;
7743 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_compressibleN_split_sd_saturation_het_matType", 1, 30, 30, 25); __PYX_ERR(0, 1684, __pyx_L3_error)
7747 if (likely((values[26] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_f)) != 0)) kw_args--;
7749 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_compressibleN_split_sd_saturation_het_matType", 1, 30, 30, 26); __PYX_ERR(0, 1684, __pyx_L3_error)
7753 if (likely((values[27] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_df)) != 0)) kw_args--;
7755 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_compressibleN_split_sd_saturation_het_matType", 1, 30, 30, 27); __PYX_ERR(0, 1684, __pyx_L3_error)
7759 if (likely((values[28] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
7761 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_compressibleN_split_sd_saturation_het_matType", 1, 30, 30, 28); __PYX_ERR(0, 1684, __pyx_L3_error)
7765 if (likely((values[29] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_da)) != 0)) kw_args--;
7767 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_compressibleN_split_sd_saturation_het_matType", 1, 30, 30, 29); __PYX_ERR(0, 1684, __pyx_L3_error)
7770 if (unlikely(kw_args > 0)) {
7771 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"twophaseDarcy_compressibleN_split_sd_saturation_het_matType") < 0)) __PYX_ERR(0, 1684, __pyx_L3_error)
7773 }
else if (PyTuple_GET_SIZE(__pyx_args) != 30) {
7774 goto __pyx_L5_argtuple_error;
7776 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7777 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7778 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
7779 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
7780 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
7781 values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
7782 values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
7783 values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
7784 values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
7785 values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
7786 values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
7787 values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
7788 values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
7789 values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
7790 values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
7791 values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
7792 values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
7793 values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
7794 values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
7795 values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
7796 values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
7797 values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
7798 values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
7799 values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
7800 values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
7801 values[25] = PyTuple_GET_ITEM(__pyx_args, 25);
7802 values[26] = PyTuple_GET_ITEM(__pyx_args, 26);
7803 values[27] = PyTuple_GET_ITEM(__pyx_args, 27);
7804 values[28] = PyTuple_GET_ITEM(__pyx_args, 28);
7805 values[29] = PyTuple_GET_ITEM(__pyx_args, 29);
7807 __pyx_v_pskModelFlag = __Pyx_PyInt_As_int(values[0]);
if (unlikely((__pyx_v_pskModelFlag == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1684, __pyx_L3_error)
7808 __pyx_v_density_w_flag = __Pyx_PyInt_As_int(values[1]);
if (unlikely((__pyx_v_density_w_flag == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1685, __pyx_L3_error)
7809 __pyx_v_density_n_flag = __Pyx_PyInt_As_int(values[2]);
if (unlikely((__pyx_v_density_n_flag == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1686, __pyx_L3_error)
7810 __pyx_v_rowptr = ((PyArrayObject *)values[3]);
7811 __pyx_v_colind = ((PyArrayObject *)values[4]);
7812 __pyx_v_matType = ((PyArrayObject *)values[5]);
7813 __pyx_v_muw = __pyx_PyFloat_AsDouble(values[6]);
if (unlikely((__pyx_v_muw == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1690, __pyx_L3_error)
7814 __pyx_v_mun = __pyx_PyFloat_AsDouble(values[7]);
if (unlikely((__pyx_v_mun == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1691, __pyx_L3_error)
7815 __pyx_v_omega = ((PyArrayObject *)values[8]);
7816 __pyx_v_Kbar = ((PyArrayObject *)values[9]);
7817 __pyx_v_b = __pyx_PyFloat_AsDouble(values[10]);
if (unlikely((__pyx_v_b == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1694, __pyx_L3_error)
7818 __pyx_v_capillaryDiffusionScaling = __pyx_PyFloat_AsDouble(values[11]);
if (unlikely((__pyx_v_capillaryDiffusionScaling == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1695, __pyx_L3_error)
7819 __pyx_v_advectionScaling = __pyx_PyFloat_AsDouble(values[12]);
if (unlikely((__pyx_v_advectionScaling == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1696, __pyx_L3_error)
7820 __pyx_v_rwork_psk = ((PyArrayObject *)values[13]);
7821 __pyx_v_iwork_psk = ((PyArrayObject *)values[14]);
7822 __pyx_v_rwork_psk_tol = ((PyArrayObject *)values[15]);
7823 __pyx_v_rwork_density_w = ((PyArrayObject *)values[16]);
7824 __pyx_v_rwork_density_n = ((PyArrayObject *)values[17]);
7825 __pyx_v_g = ((PyArrayObject *)values[18]);
7826 __pyx_v_qt = ((PyArrayObject *)values[19]);
7827 __pyx_v_psiw = ((PyArrayObject *)values[20]);
7828 __pyx_v_sw = ((PyArrayObject *)values[21]);
7829 __pyx_v_m = ((PyArrayObject *)values[22]);
7830 __pyx_v_dm = ((PyArrayObject *)values[23]);
7831 __pyx_v_phi = ((PyArrayObject *)values[24]);
7832 __pyx_v_dphi = ((PyArrayObject *)values[25]);
7833 __pyx_v_f = ((PyArrayObject *)values[26]);
7834 __pyx_v_df = ((PyArrayObject *)values[27]);
7835 __pyx_v_a = ((PyArrayObject *)values[28]);
7836 __pyx_v_da = ((PyArrayObject *)values[29]);
7838 goto __pyx_L4_argument_unpacking_done;
7839 __pyx_L5_argtuple_error:;
7840 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_compressibleN_split_sd_saturation_het_matType", 1, 30, 30, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1684, __pyx_L3_error)
7842 __Pyx_AddTraceback(
"cTwophaseDarcyCoefficients.twophaseDarcy_compressibleN_split_sd_saturation_het_matType", __pyx_clineno, __pyx_lineno, __pyx_filename);
7843 __Pyx_RefNannyFinishContext();
7845 __pyx_L4_argument_unpacking_done:;
7846 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rowptr), __pyx_ptype_5numpy_ndarray, 1,
"rowptr", 0))) __PYX_ERR(0, 1687, __pyx_L1_error)
7847 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_colind), __pyx_ptype_5numpy_ndarray, 1,
"colind", 0))) __PYX_ERR(0, 1688, __pyx_L1_error)
7848 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_matType), __pyx_ptype_5numpy_ndarray, 1,
"matType", 0))) __PYX_ERR(0, 1689, __pyx_L1_error)
7849 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_omega), __pyx_ptype_5numpy_ndarray, 1,
"omega", 0))) __PYX_ERR(0, 1692, __pyx_L1_error)
7850 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Kbar), __pyx_ptype_5numpy_ndarray, 1,
"Kbar", 0))) __PYX_ERR(0, 1693, __pyx_L1_error)
7851 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_psk), __pyx_ptype_5numpy_ndarray, 1,
"rwork_psk", 0))) __PYX_ERR(0, 1697, __pyx_L1_error)
7852 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork_psk), __pyx_ptype_5numpy_ndarray, 1,
"iwork_psk", 0))) __PYX_ERR(0, 1698, __pyx_L1_error)
7853 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_psk_tol), __pyx_ptype_5numpy_ndarray, 1,
"rwork_psk_tol", 0))) __PYX_ERR(0, 1699, __pyx_L1_error)
7854 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_density_w), __pyx_ptype_5numpy_ndarray, 1,
"rwork_density_w", 0))) __PYX_ERR(0, 1700, __pyx_L1_error)
7855 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_density_n), __pyx_ptype_5numpy_ndarray, 1,
"rwork_density_n", 0))) __PYX_ERR(0, 1701, __pyx_L1_error)
7856 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_g), __pyx_ptype_5numpy_ndarray, 1,
"g", 0))) __PYX_ERR(0, 1702, __pyx_L1_error)
7857 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_qt), __pyx_ptype_5numpy_ndarray, 1,
"qt", 0))) __PYX_ERR(0, 1702, __pyx_L1_error)
7858 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_psiw), __pyx_ptype_5numpy_ndarray, 1,
"psiw", 0))) __PYX_ERR(0, 1702, __pyx_L1_error)
7859 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sw), __pyx_ptype_5numpy_ndarray, 1,
"sw", 0))) __PYX_ERR(0, 1702, __pyx_L1_error)
7860 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_m), __pyx_ptype_5numpy_ndarray, 1,
"m", 0))) __PYX_ERR(0, 1702, __pyx_L1_error)
7861 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dm), __pyx_ptype_5numpy_ndarray, 1,
"dm", 0))) __PYX_ERR(0, 1702, __pyx_L1_error)
7862 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_phi), __pyx_ptype_5numpy_ndarray, 1,
"phi", 0))) __PYX_ERR(0, 1702, __pyx_L1_error)
7863 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dphi), __pyx_ptype_5numpy_ndarray, 1,
"dphi", 0))) __PYX_ERR(0, 1702, __pyx_L1_error)
7864 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_f), __pyx_ptype_5numpy_ndarray, 1,
"f", 0))) __PYX_ERR(0, 1703, __pyx_L1_error)
7865 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_df), __pyx_ptype_5numpy_ndarray, 1,
"df", 0))) __PYX_ERR(0, 1703, __pyx_L1_error)
7866 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1,
"a", 0))) __PYX_ERR(0, 1703, __pyx_L1_error)
7867 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_da), __pyx_ptype_5numpy_ndarray, 1,
"da", 0))) __PYX_ERR(0, 1703, __pyx_L1_error)
7868 __pyx_r = __pyx_pf_26cTwophaseDarcyCoefficients_16twophaseDarcy_compressibleN_split_sd_saturation_het_matType(__pyx_self, __pyx_v_pskModelFlag, __pyx_v_density_w_flag, __pyx_v_density_n_flag, __pyx_v_rowptr, __pyx_v_colind, __pyx_v_matType, __pyx_v_muw, __pyx_v_mun, __pyx_v_omega, __pyx_v_Kbar, __pyx_v_b, __pyx_v_capillaryDiffusionScaling, __pyx_v_advectionScaling, __pyx_v_rwork_psk, __pyx_v_iwork_psk, __pyx_v_rwork_psk_tol, __pyx_v_rwork_density_w, __pyx_v_rwork_density_n, __pyx_v_g, __pyx_v_qt, __pyx_v_psiw, __pyx_v_sw, __pyx_v_m, __pyx_v_dm, __pyx_v_phi, __pyx_v_dphi, __pyx_v_f, __pyx_v_df, __pyx_v_a, __pyx_v_da);
7875 __Pyx_RefNannyFinishContext();
7879 static PyObject *__pyx_pf_26cTwophaseDarcyCoefficients_16twophaseDarcy_compressibleN_split_sd_saturation_het_matType(CYTHON_UNUSED PyObject *__pyx_self,
int __pyx_v_pskModelFlag,
int __pyx_v_density_w_flag,
int __pyx_v_density_n_flag, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_matType,
double __pyx_v_muw,
double __pyx_v_mun, PyArrayObject *__pyx_v_omega, PyArrayObject *__pyx_v_Kbar,
double __pyx_v_b,
double __pyx_v_capillaryDiffusionScaling,
double __pyx_v_advectionScaling, PyArrayObject *__pyx_v_rwork_psk, PyArrayObject *__pyx_v_iwork_psk, PyArrayObject *__pyx_v_rwork_psk_tol, PyArrayObject *__pyx_v_rwork_density_w, PyArrayObject *__pyx_v_rwork_density_n, PyArrayObject *__pyx_v_g, PyArrayObject *__pyx_v_qt, PyArrayObject *__pyx_v_psiw, PyArrayObject *__pyx_v_sw, PyArrayObject *__pyx_v_m, PyArrayObject *__pyx_v_dm, PyArrayObject *__pyx_v_phi, PyArrayObject *__pyx_v_dphi, PyArrayObject *__pyx_v_f, PyArrayObject *__pyx_v_df, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_da) {
7880 int __pyx_v_nPointsPerSimplex;
7881 int __pyx_v_nSimplex;
7882 PyObject *__pyx_r = NULL;
7883 __Pyx_RefNannyDeclarations
7884 PyObject *__pyx_t_1 = NULL;
7885 PyObject *__pyx_t_2 = NULL;
7886 PyObject *__pyx_t_3 = NULL;
7888 PyObject *__pyx_t_5 = NULL;
7889 PyObject *__pyx_t_6 = NULL;
7890 PyObject *__pyx_t_7 = NULL;
7891 int __pyx_lineno = 0;
7892 const char *__pyx_filename = NULL;
7893 int __pyx_clineno = 0;
7894 __Pyx_RefNannySetupContext(
"twophaseDarcy_compressibleN_split_sd_saturation_het_matType", 0);
7903 __pyx_v_nPointsPerSimplex = (__pyx_v_sw->dimensions[(__pyx_v_sw->nd - 1)]);
7912 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_sw), __pyx_n_s_size);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1712, __pyx_L1_error)
7913 __Pyx_GOTREF(__pyx_t_1);
7914 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_nPointsPerSimplex);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1712, __pyx_L1_error)
7915 __Pyx_GOTREF(__pyx_t_2);
7916 __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1712, __pyx_L1_error)
7917 __Pyx_GOTREF(__pyx_t_3);
7918 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7919 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7920 __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3);
if (unlikely((__pyx_t_4 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1712, __pyx_L1_error)
7921 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7922 __pyx_v_nSimplex = __pyx_t_4;
7931 switch (__pyx_v_density_n_flag) {
7941 switch (__pyx_v_pskModelFlag) {
7951 (void)(twophaseDarcy_compressibleN_split_sd_saturation_het_matType<SimplePSK,ExponentialDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_v_g->dimensions[0]), 2, ((
int *)__pyx_v_rowptr->data), ((
int *)__pyx_v_colind->data), ((
int *)__pyx_v_matType->data), __pyx_v_muw, __pyx_v_mun, ((
double *)__pyx_v_omega->data), ((
double *)__pyx_v_Kbar->data), __pyx_v_b, __pyx_v_capillaryDiffusionScaling, __pyx_v_advectionScaling, ((
double *)__pyx_v_rwork_psk->data), ((
int *)__pyx_v_iwork_psk->data), ((
double *)__pyx_v_rwork_psk_tol->data), ((
double *)__pyx_v_rwork_density_w->data), ((
double *)__pyx_v_rwork_density_n->data), ((
double *)__pyx_v_g->data), ((
double *)__pyx_v_qt->data), ((
double *)__pyx_v_psiw->data), ((
double *)__pyx_v_sw->data), ((
double *)__pyx_v_m->data), ((
double *)__pyx_v_dm->data), ((
double *)__pyx_v_phi->data), ((
double *)__pyx_v_dphi->data), ((
double *)__pyx_v_f->data), ((
double *)__pyx_v_df->data), ((
double *)__pyx_v_a->data), ((
double *)__pyx_v_da->data)));
7970 (void)(twophaseDarcy_compressibleN_split_sd_saturation_het_matType<VGM,ExponentialDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_v_g->dimensions[0]), 4, ((
int *)__pyx_v_rowptr->data), ((
int *)__pyx_v_colind->data), ((
int *)__pyx_v_matType->data), __pyx_v_muw, __pyx_v_mun, ((
double *)__pyx_v_omega->data), ((
double *)__pyx_v_Kbar->data), __pyx_v_b, __pyx_v_capillaryDiffusionScaling, __pyx_v_advectionScaling, ((
double *)__pyx_v_rwork_psk->data), ((
int *)__pyx_v_iwork_psk->data), ((
double *)__pyx_v_rwork_psk_tol->data), ((
double *)__pyx_v_rwork_density_w->data), ((
double *)__pyx_v_rwork_density_n->data), ((
double *)__pyx_v_g->data), ((
double *)__pyx_v_qt->data), ((
double *)__pyx_v_psiw->data), ((
double *)__pyx_v_sw->data), ((
double *)__pyx_v_m->data), ((
double *)__pyx_v_dm->data), ((
double *)__pyx_v_phi->data), ((
double *)__pyx_v_dphi->data), ((
double *)__pyx_v_f->data), ((
double *)__pyx_v_df->data), ((
double *)__pyx_v_a->data), ((
double *)__pyx_v_da->data)));
7989 (void)(twophaseDarcy_compressibleN_split_sd_saturation_het_matType<VGM,ExponentialDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_v_g->dimensions[0]), 4, ((
int *)__pyx_v_rowptr->data), ((
int *)__pyx_v_colind->data), ((
int *)__pyx_v_matType->data), __pyx_v_muw, __pyx_v_mun, ((
double *)__pyx_v_omega->data), ((
double *)__pyx_v_Kbar->data), __pyx_v_b, __pyx_v_capillaryDiffusionScaling, __pyx_v_advectionScaling, ((
double *)__pyx_v_rwork_psk->data), ((
int *)__pyx_v_iwork_psk->data), ((
double *)__pyx_v_rwork_psk_tol->data), ((
double *)__pyx_v_rwork_density_w->data), ((
double *)__pyx_v_rwork_density_n->data), ((
double *)__pyx_v_g->data), ((
double *)__pyx_v_qt->data), ((
double *)__pyx_v_psiw->data), ((
double *)__pyx_v_sw->data), ((
double *)__pyx_v_m->data), ((
double *)__pyx_v_dm->data), ((
double *)__pyx_v_phi->data), ((
double *)__pyx_v_dphi->data), ((
double *)__pyx_v_f->data), ((
double *)__pyx_v_df->data), ((
double *)__pyx_v_a->data), ((
double *)__pyx_v_da->data)));
8010 switch (__pyx_v_pskModelFlag) {
8020 (void)(twophaseDarcy_compressibleN_split_sd_saturation_het_matType<SimplePSK,IdealGasDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_v_g->dimensions[0]), 2, ((
int *)__pyx_v_rowptr->data), ((
int *)__pyx_v_colind->data), ((
int *)__pyx_v_matType->data), __pyx_v_muw, __pyx_v_mun, ((
double *)__pyx_v_omega->data), ((
double *)__pyx_v_Kbar->data), __pyx_v_b, __pyx_v_capillaryDiffusionScaling, __pyx_v_advectionScaling, ((
double *)__pyx_v_rwork_psk->data), ((
int *)__pyx_v_iwork_psk->data), ((
double *)__pyx_v_rwork_psk_tol->data), ((
double *)__pyx_v_rwork_density_w->data), ((
double *)__pyx_v_rwork_density_n->data), ((
double *)__pyx_v_g->data), ((
double *)__pyx_v_qt->data), ((
double *)__pyx_v_psiw->data), ((
double *)__pyx_v_sw->data), ((
double *)__pyx_v_m->data), ((
double *)__pyx_v_dm->data), ((
double *)__pyx_v_phi->data), ((
double *)__pyx_v_dphi->data), ((
double *)__pyx_v_f->data), ((
double *)__pyx_v_df->data), ((
double *)__pyx_v_a->data), ((
double *)__pyx_v_da->data)));
8039 (void)(twophaseDarcy_compressibleN_split_sd_saturation_het_matType<VGM,IdealGasDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_v_g->dimensions[0]), 4, ((
int *)__pyx_v_rowptr->data), ((
int *)__pyx_v_colind->data), ((
int *)__pyx_v_matType->data), __pyx_v_muw, __pyx_v_mun, ((
double *)__pyx_v_omega->data), ((
double *)__pyx_v_Kbar->data), __pyx_v_b, __pyx_v_capillaryDiffusionScaling, __pyx_v_advectionScaling, ((
double *)__pyx_v_rwork_psk->data), ((
int *)__pyx_v_iwork_psk->data), ((
double *)__pyx_v_rwork_psk_tol->data), ((
double *)__pyx_v_rwork_density_w->data), ((
double *)__pyx_v_rwork_density_n->data), ((
double *)__pyx_v_g->data), ((
double *)__pyx_v_qt->data), ((
double *)__pyx_v_psiw->data), ((
double *)__pyx_v_sw->data), ((
double *)__pyx_v_m->data), ((
double *)__pyx_v_dm->data), ((
double *)__pyx_v_phi->data), ((
double *)__pyx_v_dphi->data), ((
double *)__pyx_v_f->data), ((
double *)__pyx_v_df->data), ((
double *)__pyx_v_a->data), ((
double *)__pyx_v_da->data)));
8058 (void)(twophaseDarcy_compressibleN_split_sd_saturation_het_matType<VGM,IdealGasDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_v_g->dimensions[0]), 4, ((
int *)__pyx_v_rowptr->data), ((
int *)__pyx_v_colind->data), ((
int *)__pyx_v_matType->data), __pyx_v_muw, __pyx_v_mun, ((
double *)__pyx_v_omega->data), ((
double *)__pyx_v_Kbar->data), __pyx_v_b, __pyx_v_capillaryDiffusionScaling, __pyx_v_advectionScaling, ((
double *)__pyx_v_rwork_psk->data), ((
int *)__pyx_v_iwork_psk->data), ((
double *)__pyx_v_rwork_psk_tol->data), ((
double *)__pyx_v_rwork_density_w->data), ((
double *)__pyx_v_rwork_density_n->data), ((
double *)__pyx_v_g->data), ((
double *)__pyx_v_qt->data), ((
double *)__pyx_v_psiw->data), ((
double *)__pyx_v_sw->data), ((
double *)__pyx_v_m->data), ((
double *)__pyx_v_dm->data), ((
double *)__pyx_v_phi->data), ((
double *)__pyx_v_dphi->data), ((
double *)__pyx_v_f->data), ((
double *)__pyx_v_df->data), ((
double *)__pyx_v_a->data), ((
double *)__pyx_v_da->data)));
8079 #ifndef CYTHON_WITHOUT_ASSERTIONS
8080 if (unlikely(!Py_OptimizeFlag)) {
8082 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_configuration_density_w_flag_0_a, __pyx_n_s_format);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1843, __pyx_L1_error)
8083 __Pyx_GOTREF(__pyx_t_2);
8084 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_density_w_flag);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1843, __pyx_L1_error)
8085 __Pyx_GOTREF(__pyx_t_1);
8086 __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_density_n_flag);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1843, __pyx_L1_error)
8087 __Pyx_GOTREF(__pyx_t_5);
8090 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
8091 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
8092 if (likely(__pyx_t_6)) {
8093 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_2);
8094 __Pyx_INCREF(__pyx_t_6);
8095 __Pyx_INCREF(
function);
8096 __Pyx_DECREF_SET(__pyx_t_2,
function);
8100 #if CYTHON_FAST_PYCALL
8101 if (PyFunction_Check(__pyx_t_2)) {
8102 PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_1, __pyx_t_5};
8103 __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1843, __pyx_L1_error)
8104 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
8105 __Pyx_GOTREF(__pyx_t_3);
8106 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8107 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8110 #if CYTHON_FAST_PYCCALL
8111 if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
8112 PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_1, __pyx_t_5};
8113 __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1843, __pyx_L1_error)
8114 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
8115 __Pyx_GOTREF(__pyx_t_3);
8116 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8117 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8121 __pyx_t_7 = PyTuple_New(2+__pyx_t_4);
if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1843, __pyx_L1_error)
8122 __Pyx_GOTREF(__pyx_t_7);
8124 __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
8126 __Pyx_GIVEREF(__pyx_t_1);
8127 PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_4, __pyx_t_1);
8128 __Pyx_GIVEREF(__pyx_t_5);
8129 PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_4, __pyx_t_5);
8132 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1843, __pyx_L1_error)
8133 __Pyx_GOTREF(__pyx_t_3);
8134 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8136 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8137 __pyx_t_2 = PyTuple_Pack(1, __pyx_t_3);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1843, __pyx_L1_error)
8138 __Pyx_GOTREF(__pyx_t_2);
8139 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8140 PyErr_SetObject(PyExc_AssertionError, __pyx_t_2);
8141 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8142 __PYX_ERR(0, 1843, __pyx_L1_error)
8158 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8161 __Pyx_XDECREF(__pyx_t_1);
8162 __Pyx_XDECREF(__pyx_t_2);
8163 __Pyx_XDECREF(__pyx_t_3);
8164 __Pyx_XDECREF(__pyx_t_5);
8165 __Pyx_XDECREF(__pyx_t_6);
8166 __Pyx_XDECREF(__pyx_t_7);
8167 __Pyx_AddTraceback(
"cTwophaseDarcyCoefficients.twophaseDarcy_compressibleN_split_sd_saturation_het_matType", __pyx_clineno, __pyx_lineno, __pyx_filename);
8170 __Pyx_XGIVEREF(__pyx_r);
8171 __Pyx_RefNannyFinishContext();
8184 static PyObject *__pyx_pw_26cTwophaseDarcyCoefficients_19twophaseDarcy_vol_frac(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
8185 static char __pyx_doc_26cTwophaseDarcyCoefficients_18twophaseDarcy_vol_frac[] =
"compute phase volume fractions\n\nUse point-vals for sw and zoned material types for porosity (omega)\n\n ";
8186 static PyMethodDef __pyx_mdef_26cTwophaseDarcyCoefficients_19twophaseDarcy_vol_frac = {
"twophaseDarcy_vol_frac", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_26cTwophaseDarcyCoefficients_19twophaseDarcy_vol_frac, METH_VARARGS|METH_KEYWORDS, __pyx_doc_26cTwophaseDarcyCoefficients_18twophaseDarcy_vol_frac};
8187 static PyObject *__pyx_pw_26cTwophaseDarcyCoefficients_19twophaseDarcy_vol_frac(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
8188 PyArrayObject *__pyx_v_matType = 0;
8189 PyArrayObject *__pyx_v_omega = 0;
8190 PyArrayObject *__pyx_v_sw = 0;
8191 PyArrayObject *__pyx_v_vol_frac_w = 0;
8192 PyArrayObject *__pyx_v_vol_frac_n = 0;
8193 int __pyx_lineno = 0;
8194 const char *__pyx_filename = NULL;
8195 int __pyx_clineno = 0;
8196 PyObject *__pyx_r = 0;
8197 __Pyx_RefNannyDeclarations
8198 __Pyx_RefNannySetupContext(
"twophaseDarcy_vol_frac (wrapper)", 0);
8200 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_matType,&__pyx_n_s_omega,&__pyx_n_s_sw,&__pyx_n_s_vol_frac_w,&__pyx_n_s_vol_frac_n,0};
8201 PyObject* values[5] = {0,0,0,0,0};
8202 if (unlikely(__pyx_kwds)) {
8204 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
8206 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
8208 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
8210 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
8212 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
8214 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8217 default:
goto __pyx_L5_argtuple_error;
8219 kw_args = PyDict_Size(__pyx_kwds);
8222 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_matType)) != 0)) kw_args--;
8223 else goto __pyx_L5_argtuple_error;
8226 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_omega)) != 0)) kw_args--;
8228 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_vol_frac", 1, 5, 5, 1); __PYX_ERR(0, 1845, __pyx_L3_error)
8232 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sw)) != 0)) kw_args--;
8234 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_vol_frac", 1, 5, 5, 2); __PYX_ERR(0, 1845, __pyx_L3_error)
8238 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vol_frac_w)) != 0)) kw_args--;
8240 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_vol_frac", 1, 5, 5, 3); __PYX_ERR(0, 1845, __pyx_L3_error)
8244 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vol_frac_n)) != 0)) kw_args--;
8246 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_vol_frac", 1, 5, 5, 4); __PYX_ERR(0, 1845, __pyx_L3_error)
8249 if (unlikely(kw_args > 0)) {
8250 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"twophaseDarcy_vol_frac") < 0)) __PYX_ERR(0, 1845, __pyx_L3_error)
8252 }
else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
8253 goto __pyx_L5_argtuple_error;
8255 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8256 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
8257 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
8258 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
8259 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
8261 __pyx_v_matType = ((PyArrayObject *)values[0]);
8262 __pyx_v_omega = ((PyArrayObject *)values[1]);
8263 __pyx_v_sw = ((PyArrayObject *)values[2]);
8264 __pyx_v_vol_frac_w = ((PyArrayObject *)values[3]);
8265 __pyx_v_vol_frac_n = ((PyArrayObject *)values[4]);
8267 goto __pyx_L4_argument_unpacking_done;
8268 __pyx_L5_argtuple_error:;
8269 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_vol_frac", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1845, __pyx_L3_error)
8271 __Pyx_AddTraceback(
"cTwophaseDarcyCoefficients.twophaseDarcy_vol_frac", __pyx_clineno, __pyx_lineno, __pyx_filename);
8272 __Pyx_RefNannyFinishContext();
8274 __pyx_L4_argument_unpacking_done:;
8275 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_matType), __pyx_ptype_5numpy_ndarray, 1,
"matType", 0))) __PYX_ERR(0, 1845, __pyx_L1_error)
8276 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_omega), __pyx_ptype_5numpy_ndarray, 1,
"omega", 0))) __PYX_ERR(0, 1846, __pyx_L1_error)
8277 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sw), __pyx_ptype_5numpy_ndarray, 1,
"sw", 0))) __PYX_ERR(0, 1847, __pyx_L1_error)
8278 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vol_frac_w), __pyx_ptype_5numpy_ndarray, 1,
"vol_frac_w", 0))) __PYX_ERR(0, 1848, __pyx_L1_error)
8279 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vol_frac_n), __pyx_ptype_5numpy_ndarray, 1,
"vol_frac_n", 0))) __PYX_ERR(0, 1849, __pyx_L1_error)
8280 __pyx_r = __pyx_pf_26cTwophaseDarcyCoefficients_18twophaseDarcy_vol_frac(__pyx_self, __pyx_v_matType, __pyx_v_omega, __pyx_v_sw, __pyx_v_vol_frac_w, __pyx_v_vol_frac_n);
8287 __Pyx_RefNannyFinishContext();
8291 static PyObject *__pyx_pf_26cTwophaseDarcyCoefficients_18twophaseDarcy_vol_frac(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_matType, PyArrayObject *__pyx_v_omega, PyArrayObject *__pyx_v_sw, PyArrayObject *__pyx_v_vol_frac_w, PyArrayObject *__pyx_v_vol_frac_n) {
8292 int __pyx_v_nPointsPerSimplex;
8293 int __pyx_v_nSimplex;
8294 PyObject *__pyx_r = NULL;
8295 __Pyx_RefNannyDeclarations
8296 PyObject *__pyx_t_1 = NULL;
8297 PyObject *__pyx_t_2 = NULL;
8298 PyObject *__pyx_t_3 = NULL;
8300 int __pyx_lineno = 0;
8301 const char *__pyx_filename = NULL;
8302 int __pyx_clineno = 0;
8303 __Pyx_RefNannySetupContext(
"twophaseDarcy_vol_frac", 0);
8312 __pyx_v_nPointsPerSimplex = (__pyx_v_sw->dimensions[(__pyx_v_sw->nd - 1)]);
8321 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_sw), __pyx_n_s_size);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1856, __pyx_L1_error)
8322 __Pyx_GOTREF(__pyx_t_1);
8323 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_nPointsPerSimplex);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1856, __pyx_L1_error)
8324 __Pyx_GOTREF(__pyx_t_2);
8325 __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1856, __pyx_L1_error)
8326 __Pyx_GOTREF(__pyx_t_3);
8327 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8328 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8329 __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3);
if (unlikely((__pyx_t_4 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1856, __pyx_L1_error)
8330 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8331 __pyx_v_nSimplex = __pyx_t_4;
8340 (void)(
twophaseDarcy_vol_frac(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, ((
int *)__pyx_v_matType->data), ((
double *)__pyx_v_omega->data), ((
double *)__pyx_v_sw->data), ((
double *)__pyx_v_vol_frac_w->data), ((
double *)__pyx_v_vol_frac_n->data)));
8351 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8354 __Pyx_XDECREF(__pyx_t_1);
8355 __Pyx_XDECREF(__pyx_t_2);
8356 __Pyx_XDECREF(__pyx_t_3);
8357 __Pyx_AddTraceback(
"cTwophaseDarcyCoefficients.twophaseDarcy_vol_frac", __pyx_clineno, __pyx_lineno, __pyx_filename);
8360 __Pyx_XGIVEREF(__pyx_r);
8361 __Pyx_RefNannyFinishContext();
8374 static PyObject *__pyx_pw_26cTwophaseDarcyCoefficients_21generateSplineTables(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
8375 static char __pyx_doc_26cTwophaseDarcyCoefficients_20generateSplineTables[] =
"generate spline table look up arrays";
8376 static PyMethodDef __pyx_mdef_26cTwophaseDarcyCoefficients_21generateSplineTables = {
"generateSplineTables", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_26cTwophaseDarcyCoefficients_21generateSplineTables, METH_VARARGS|METH_KEYWORDS, __pyx_doc_26cTwophaseDarcyCoefficients_20generateSplineTables};
8377 static PyObject *__pyx_pw_26cTwophaseDarcyCoefficients_21generateSplineTables(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
8378 int __pyx_v_pskModelFlag;
8379 int __pyx_v_startIndex;
8380 int __pyx_v_calcFlag;
8381 PyArrayObject *__pyx_v_domain = 0;
8382 PyArrayObject *__pyx_v_rwork_psk = 0;
8383 PyArrayObject *__pyx_v_iwork_psk = 0;
8384 PyArrayObject *__pyx_v_rwork_psk_tol = 0;
8385 PyArrayObject *__pyx_v_splineTable = 0;
8386 int __pyx_lineno = 0;
8387 const char *__pyx_filename = NULL;
8388 int __pyx_clineno = 0;
8389 PyObject *__pyx_r = 0;
8390 __Pyx_RefNannyDeclarations
8391 __Pyx_RefNannySetupContext(
"generateSplineTables (wrapper)", 0);
8393 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pskModelFlag,&__pyx_n_s_startIndex,&__pyx_n_s_calcFlag,&__pyx_n_s_domain,&__pyx_n_s_rwork_psk,&__pyx_n_s_iwork_psk,&__pyx_n_s_rwork_psk_tol,&__pyx_n_s_splineTable,0};
8394 PyObject* values[8] = {0,0,0,0,0,0,0,0};
8395 if (unlikely(__pyx_kwds)) {
8397 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
8399 case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
8401 case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
8403 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
8405 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
8407 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
8409 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
8411 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
8413 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8416 default:
goto __pyx_L5_argtuple_error;
8418 kw_args = PyDict_Size(__pyx_kwds);
8421 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pskModelFlag)) != 0)) kw_args--;
8422 else goto __pyx_L5_argtuple_error;
8425 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_startIndex)) != 0)) kw_args--;
8427 __Pyx_RaiseArgtupleInvalid(
"generateSplineTables", 1, 8, 8, 1); __PYX_ERR(0, 1865, __pyx_L3_error)
8431 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_calcFlag)) != 0)) kw_args--;
8433 __Pyx_RaiseArgtupleInvalid(
"generateSplineTables", 1, 8, 8, 2); __PYX_ERR(0, 1865, __pyx_L3_error)
8437 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_domain)) != 0)) kw_args--;
8439 __Pyx_RaiseArgtupleInvalid(
"generateSplineTables", 1, 8, 8, 3); __PYX_ERR(0, 1865, __pyx_L3_error)
8443 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork_psk)) != 0)) kw_args--;
8445 __Pyx_RaiseArgtupleInvalid(
"generateSplineTables", 1, 8, 8, 4); __PYX_ERR(0, 1865, __pyx_L3_error)
8449 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iwork_psk)) != 0)) kw_args--;
8451 __Pyx_RaiseArgtupleInvalid(
"generateSplineTables", 1, 8, 8, 5); __PYX_ERR(0, 1865, __pyx_L3_error)
8455 if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork_psk_tol)) != 0)) kw_args--;
8457 __Pyx_RaiseArgtupleInvalid(
"generateSplineTables", 1, 8, 8, 6); __PYX_ERR(0, 1865, __pyx_L3_error)
8461 if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_splineTable)) != 0)) kw_args--;
8463 __Pyx_RaiseArgtupleInvalid(
"generateSplineTables", 1, 8, 8, 7); __PYX_ERR(0, 1865, __pyx_L3_error)
8466 if (unlikely(kw_args > 0)) {
8467 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"generateSplineTables") < 0)) __PYX_ERR(0, 1865, __pyx_L3_error)
8469 }
else if (PyTuple_GET_SIZE(__pyx_args) != 8) {
8470 goto __pyx_L5_argtuple_error;
8472 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8473 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
8474 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
8475 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
8476 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
8477 values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
8478 values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
8479 values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
8481 __pyx_v_pskModelFlag = __Pyx_PyInt_As_int(values[0]);
if (unlikely((__pyx_v_pskModelFlag == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1865, __pyx_L3_error)
8482 __pyx_v_startIndex = __Pyx_PyInt_As_int(values[1]);
if (unlikely((__pyx_v_startIndex == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1866, __pyx_L3_error)
8483 __pyx_v_calcFlag = __Pyx_PyInt_As_int(values[2]);
if (unlikely((__pyx_v_calcFlag == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1867, __pyx_L3_error)
8484 __pyx_v_domain = ((PyArrayObject *)values[3]);
8485 __pyx_v_rwork_psk = ((PyArrayObject *)values[4]);
8486 __pyx_v_iwork_psk = ((PyArrayObject *)values[5]);
8487 __pyx_v_rwork_psk_tol = ((PyArrayObject *)values[6]);
8488 __pyx_v_splineTable = ((PyArrayObject *)values[7]);
8490 goto __pyx_L4_argument_unpacking_done;
8491 __pyx_L5_argtuple_error:;
8492 __Pyx_RaiseArgtupleInvalid(
"generateSplineTables", 1, 8, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1865, __pyx_L3_error)
8494 __Pyx_AddTraceback(
"cTwophaseDarcyCoefficients.generateSplineTables", __pyx_clineno, __pyx_lineno, __pyx_filename);
8495 __Pyx_RefNannyFinishContext();
8497 __pyx_L4_argument_unpacking_done:;
8498 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domain), __pyx_ptype_5numpy_ndarray, 1,
"domain", 0))) __PYX_ERR(0, 1868, __pyx_L1_error)
8499 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_psk), __pyx_ptype_5numpy_ndarray, 1,
"rwork_psk", 0))) __PYX_ERR(0, 1869, __pyx_L1_error)
8500 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork_psk), __pyx_ptype_5numpy_ndarray, 1,
"iwork_psk", 0))) __PYX_ERR(0, 1870, __pyx_L1_error)
8501 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_psk_tol), __pyx_ptype_5numpy_ndarray, 1,
"rwork_psk_tol", 0))) __PYX_ERR(0, 1871, __pyx_L1_error)
8502 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_splineTable), __pyx_ptype_5numpy_ndarray, 1,
"splineTable", 0))) __PYX_ERR(0, 1872, __pyx_L1_error)
8503 __pyx_r = __pyx_pf_26cTwophaseDarcyCoefficients_20generateSplineTables(__pyx_self, __pyx_v_pskModelFlag, __pyx_v_startIndex, __pyx_v_calcFlag, __pyx_v_domain, __pyx_v_rwork_psk, __pyx_v_iwork_psk, __pyx_v_rwork_psk_tol, __pyx_v_splineTable);
8510 __Pyx_RefNannyFinishContext();
8514 static PyObject *__pyx_pf_26cTwophaseDarcyCoefficients_20generateSplineTables(CYTHON_UNUSED PyObject *__pyx_self,
int __pyx_v_pskModelFlag,
int __pyx_v_startIndex,
int __pyx_v_calcFlag, PyArrayObject *__pyx_v_domain, PyArrayObject *__pyx_v_rwork_psk, PyArrayObject *__pyx_v_iwork_psk, PyArrayObject *__pyx_v_rwork_psk_tol, PyArrayObject *__pyx_v_splineTable) {
8515 npy_intp __pyx_v_nknots;
8516 PyObject *__pyx_r = NULL;
8517 __Pyx_RefNannyDeclarations
8518 __Pyx_RefNannySetupContext(
"generateSplineTables", 0);
8527 __pyx_v_nknots = (__pyx_v_domain->dimensions[0]);
8536 switch (__pyx_v_pskModelFlag) {
8546 generateSplineTables<SimplePSK>(__pyx_v_nknots, __pyx_v_startIndex, __pyx_v_calcFlag, ((
double *)__pyx_v_domain->data), ((
double *)__pyx_v_rwork_psk->data), ((
int *)__pyx_v_iwork_psk->data), ((
double *)__pyx_v_rwork_psk_tol->data), ((
double *)__pyx_v_splineTable->data));
8565 generateSplineTables<VGM>(__pyx_v_nknots, __pyx_v_startIndex, __pyx_v_calcFlag, ((
double *)__pyx_v_domain->data), ((
double *)__pyx_v_rwork_psk->data), ((
int *)__pyx_v_iwork_psk->data), ((
double *)__pyx_v_rwork_psk_tol->data), ((
double *)__pyx_v_splineTable->data));
8584 generateSplineTables<VGB>(__pyx_v_nknots, __pyx_v_startIndex, __pyx_v_calcFlag, ((
double *)__pyx_v_domain->data), ((
double *)__pyx_v_rwork_psk->data), ((
int *)__pyx_v_iwork_psk->data), ((
double *)__pyx_v_rwork_psk_tol->data), ((
double *)__pyx_v_splineTable->data));
8603 generateSplineTables<BCM>(__pyx_v_nknots, __pyx_v_startIndex, __pyx_v_calcFlag, ((
double *)__pyx_v_domain->data), ((
double *)__pyx_v_rwork_psk->data), ((
int *)__pyx_v_iwork_psk->data), ((
double *)__pyx_v_rwork_psk_tol->data), ((
double *)__pyx_v_splineTable->data));
8622 generateSplineTables<BCB>(__pyx_v_nknots, __pyx_v_startIndex, __pyx_v_calcFlag, ((
double *)__pyx_v_domain->data), ((
double *)__pyx_v_rwork_psk->data), ((
int *)__pyx_v_iwork_psk->data), ((
double *)__pyx_v_rwork_psk_tol->data), ((
double *)__pyx_v_splineTable->data));
8641 generateSplineTables<VGM>(__pyx_v_nknots, __pyx_v_startIndex, __pyx_v_calcFlag, ((
double *)__pyx_v_domain->data), ((
double *)__pyx_v_rwork_psk->data), ((
int *)__pyx_v_iwork_psk->data), ((
double *)__pyx_v_rwork_psk_tol->data), ((
double *)__pyx_v_splineTable->data));
8654 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8655 __Pyx_XGIVEREF(__pyx_r);
8656 __Pyx_RefNannyFinishContext();
8669 static PyObject *__pyx_pw_26cTwophaseDarcyCoefficients_23twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
8670 static char __pyx_doc_26cTwophaseDarcyCoefficients_22twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType[] =
"Evaluate the saturation coefficients\n\nUse the split fractional flow formulation of incompressible, two-phase\nDarcy flow for a heterogeneous medium, sparse diffusion rep het\ncapillary pressure is primary variable\n\n ";
8671 static PyMethodDef __pyx_mdef_26cTwophaseDarcyCoefficients_23twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType = {
"twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_26cTwophaseDarcyCoefficients_23twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_26cTwophaseDarcyCoefficients_22twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType};
8672 static PyObject *__pyx_pw_26cTwophaseDarcyCoefficients_23twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
8673 int __pyx_v_pskModelFlag;
8674 PyArrayObject *__pyx_v_rowptr = 0;
8675 PyArrayObject *__pyx_v_colind = 0;
8676 PyArrayObject *__pyx_v_matType = 0;
8679 PyArrayObject *__pyx_v_omega = 0;
8680 PyArrayObject *__pyx_v_Kbar = 0;
8682 double __pyx_v_capillaryDiffusionScaling;
8683 double __pyx_v_advectionScaling;
8684 PyArrayObject *__pyx_v_rwork_psk = 0;
8685 PyArrayObject *__pyx_v_iwork_psk = 0;
8686 PyArrayObject *__pyx_v_rwork_psk_tol = 0;
8687 PyArrayObject *__pyx_v_rwork_density_w = 0;
8688 PyArrayObject *__pyx_v_rwork_density_n = 0;
8689 PyArrayObject *__pyx_v_g = 0;
8690 PyArrayObject *__pyx_v_qt = 0;
8691 PyArrayObject *__pyx_v_u = 0;
8692 PyArrayObject *__pyx_v_sw = 0;
8693 PyArrayObject *__pyx_v_m = 0;
8694 PyArrayObject *__pyx_v_dm = 0;
8695 PyArrayObject *__pyx_v_phi = 0;
8696 PyArrayObject *__pyx_v_dphi = 0;
8697 PyArrayObject *__pyx_v_f = 0;
8698 PyArrayObject *__pyx_v_df = 0;
8699 PyArrayObject *__pyx_v_a = 0;
8700 PyArrayObject *__pyx_v_da = 0;
8701 int __pyx_lineno = 0;
8702 const char *__pyx_filename = NULL;
8703 int __pyx_clineno = 0;
8704 PyObject *__pyx_r = 0;
8705 __Pyx_RefNannyDeclarations
8706 __Pyx_RefNannySetupContext(
"twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType (wrapper)", 0);
8708 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pskModelFlag,&__pyx_n_s_rowptr,&__pyx_n_s_colind,&__pyx_n_s_matType,&__pyx_n_s_muw,&__pyx_n_s_mun,&__pyx_n_s_omega,&__pyx_n_s_Kbar,&__pyx_n_s_b,&__pyx_n_s_capillaryDiffusionScaling,&__pyx_n_s_advectionScaling,&__pyx_n_s_rwork_psk,&__pyx_n_s_iwork_psk,&__pyx_n_s_rwork_psk_tol,&__pyx_n_s_rwork_density_w,&__pyx_n_s_rwork_density_n,&__pyx_n_s_g,&__pyx_n_s_qt,&__pyx_n_s_u,&__pyx_n_s_sw,&__pyx_n_s_m,&__pyx_n_s_dm,&__pyx_n_s_phi,&__pyx_n_s_dphi,&__pyx_n_s_f,&__pyx_n_s_df,&__pyx_n_s_a,&__pyx_n_s_da,0};
8709 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};
8710 if (unlikely(__pyx_kwds)) {
8712 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
8714 case 28: values[27] = PyTuple_GET_ITEM(__pyx_args, 27);
8717 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rowptr)) != 0)) kw_args--;
8719 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType", 1, 28, 28, 1); __PYX_ERR(0, 1930, __pyx_L3_error)
8723 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_colind)) != 0)) kw_args--;
8725 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType", 1, 28, 28, 2); __PYX_ERR(0, 1930, __pyx_L3_error)
8729 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_matType)) != 0)) kw_args--;
8731 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType", 1, 28, 28, 3); __PYX_ERR(0, 1930, __pyx_L3_error)
8735 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_muw)) != 0)) kw_args--;
8737 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType", 1, 28, 28, 4); __PYX_ERR(0, 1930, __pyx_L3_error)
8741 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mun)) != 0)) kw_args--;
8743 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType", 1, 28, 28, 5); __PYX_ERR(0, 1930, __pyx_L3_error)
8747 if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_omega)) != 0)) kw_args--;
8749 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType", 1, 28, 28, 6); __PYX_ERR(0, 1930, __pyx_L3_error)
8753 if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Kbar)) != 0)) kw_args--;
8755 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType", 1, 28, 28, 7); __PYX_ERR(0, 1930, __pyx_L3_error)
8759 if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--;
8761 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType", 1, 28, 28, 8); __PYX_ERR(0, 1930, __pyx_L3_error)
8765 if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_capillaryDiffusionScaling)) != 0)) kw_args--;
8767 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType", 1, 28, 28, 9); __PYX_ERR(0, 1930, __pyx_L3_error)
8771 default:
goto __pyx_L5_argtuple_error;
8773 kw_args = PyDict_Size(__pyx_kwds);
8776 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pskModelFlag)) != 0)) kw_args--;
8777 else goto __pyx_L5_argtuple_error;
8780 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rowptr)) != 0)) kw_args--;
8782 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType", 1, 28, 28, 1); __PYX_ERR(0, 1930, __pyx_L3_error)
8786 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_colind)) != 0)) kw_args--;
8788 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType", 1, 28, 28, 2); __PYX_ERR(0, 1930, __pyx_L3_error)
8792 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_matType)) != 0)) kw_args--;
8794 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType", 1, 28, 28, 3); __PYX_ERR(0, 1930, __pyx_L3_error)
8798 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_muw)) != 0)) kw_args--;
8800 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType", 1, 28, 28, 4); __PYX_ERR(0, 1930, __pyx_L3_error)
8804 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mun)) != 0)) kw_args--;
8806 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType", 1, 28, 28, 5); __PYX_ERR(0, 1930, __pyx_L3_error)
8810 if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_omega)) != 0)) kw_args--;
8812 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType", 1, 28, 28, 6); __PYX_ERR(0, 1930, __pyx_L3_error)
8816 if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Kbar)) != 0)) kw_args--;
8818 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType", 1, 28, 28, 7); __PYX_ERR(0, 1930, __pyx_L3_error)
8822 if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--;
8824 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType", 1, 28, 28, 8); __PYX_ERR(0, 1930, __pyx_L3_error)
8828 if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_capillaryDiffusionScaling)) != 0)) kw_args--;
8830 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType", 1, 28, 28, 9); __PYX_ERR(0, 1930, __pyx_L3_error)
8834 if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_advectionScaling)) != 0)) kw_args--;
8836 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType", 1, 28, 28, 10); __PYX_ERR(0, 1930, __pyx_L3_error)
8840 if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork_psk)) != 0)) kw_args--;
8842 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType", 1, 28, 28, 11); __PYX_ERR(0, 1930, __pyx_L3_error)
8846 if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iwork_psk)) != 0)) kw_args--;
8848 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType", 1, 28, 28, 12); __PYX_ERR(0, 1930, __pyx_L3_error)
8852 if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork_psk_tol)) != 0)) kw_args--;
8854 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType", 1, 28, 28, 13); __PYX_ERR(0, 1930, __pyx_L3_error)
8858 if (likely((values[14] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork_density_w)) != 0)) kw_args--;
8860 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType", 1, 28, 28, 14); __PYX_ERR(0, 1930, __pyx_L3_error)
8864 if (likely((values[15] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork_density_n)) != 0)) kw_args--;
8866 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType", 1, 28, 28, 15); __PYX_ERR(0, 1930, __pyx_L3_error)
8870 if (likely((values[16] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_g)) != 0)) kw_args--;
8872 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType", 1, 28, 28, 16); __PYX_ERR(0, 1930, __pyx_L3_error)
8876 if (likely((values[17] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_qt)) != 0)) kw_args--;
8878 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType", 1, 28, 28, 17); __PYX_ERR(0, 1930, __pyx_L3_error)
8882 if (likely((values[18] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u)) != 0)) kw_args--;
8884 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType", 1, 28, 28, 18); __PYX_ERR(0, 1930, __pyx_L3_error)
8888 if (likely((values[19] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sw)) != 0)) kw_args--;
8890 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType", 1, 28, 28, 19); __PYX_ERR(0, 1930, __pyx_L3_error)
8894 if (likely((values[20] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
8896 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType", 1, 28, 28, 20); __PYX_ERR(0, 1930, __pyx_L3_error)
8900 if (likely((values[21] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dm)) != 0)) kw_args--;
8902 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType", 1, 28, 28, 21); __PYX_ERR(0, 1930, __pyx_L3_error)
8906 if (likely((values[22] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_phi)) != 0)) kw_args--;
8908 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType", 1, 28, 28, 22); __PYX_ERR(0, 1930, __pyx_L3_error)
8912 if (likely((values[23] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dphi)) != 0)) kw_args--;
8914 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType", 1, 28, 28, 23); __PYX_ERR(0, 1930, __pyx_L3_error)
8918 if (likely((values[24] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_f)) != 0)) kw_args--;
8920 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType", 1, 28, 28, 24); __PYX_ERR(0, 1930, __pyx_L3_error)
8924 if (likely((values[25] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_df)) != 0)) kw_args--;
8926 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType", 1, 28, 28, 25); __PYX_ERR(0, 1930, __pyx_L3_error)
8930 if (likely((values[26] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
8932 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType", 1, 28, 28, 26); __PYX_ERR(0, 1930, __pyx_L3_error)
8936 if (likely((values[27] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_da)) != 0)) kw_args--;
8938 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType", 1, 28, 28, 27); __PYX_ERR(0, 1930, __pyx_L3_error)
8941 if (unlikely(kw_args > 0)) {
8942 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType") < 0)) __PYX_ERR(0, 1930, __pyx_L3_error)
8944 }
else if (PyTuple_GET_SIZE(__pyx_args) != 28) {
8945 goto __pyx_L5_argtuple_error;
8947 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8948 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
8949 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
8950 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
8951 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
8952 values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
8953 values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
8954 values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
8955 values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
8956 values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
8957 values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
8958 values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
8959 values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
8960 values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
8961 values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
8962 values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
8963 values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
8964 values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
8965 values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
8966 values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
8967 values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
8968 values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
8969 values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
8970 values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
8971 values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
8972 values[25] = PyTuple_GET_ITEM(__pyx_args, 25);
8973 values[26] = PyTuple_GET_ITEM(__pyx_args, 26);
8974 values[27] = PyTuple_GET_ITEM(__pyx_args, 27);
8976 __pyx_v_pskModelFlag = __Pyx_PyInt_As_int(values[0]);
if (unlikely((__pyx_v_pskModelFlag == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1930, __pyx_L3_error)
8977 __pyx_v_rowptr = ((PyArrayObject *)values[1]);
8978 __pyx_v_colind = ((PyArrayObject *)values[2]);
8979 __pyx_v_matType = ((PyArrayObject *)values[3]);
8980 __pyx_v_muw = __pyx_PyFloat_AsDouble(values[4]);
if (unlikely((__pyx_v_muw == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1934, __pyx_L3_error)
8981 __pyx_v_mun = __pyx_PyFloat_AsDouble(values[5]);
if (unlikely((__pyx_v_mun == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1935, __pyx_L3_error)
8982 __pyx_v_omega = ((PyArrayObject *)values[6]);
8983 __pyx_v_Kbar = ((PyArrayObject *)values[7]);
8984 __pyx_v_b = __pyx_PyFloat_AsDouble(values[8]);
if (unlikely((__pyx_v_b == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1938, __pyx_L3_error)
8985 __pyx_v_capillaryDiffusionScaling = __pyx_PyFloat_AsDouble(values[9]);
if (unlikely((__pyx_v_capillaryDiffusionScaling == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1939, __pyx_L3_error)
8986 __pyx_v_advectionScaling = __pyx_PyFloat_AsDouble(values[10]);
if (unlikely((__pyx_v_advectionScaling == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1940, __pyx_L3_error)
8987 __pyx_v_rwork_psk = ((PyArrayObject *)values[11]);
8988 __pyx_v_iwork_psk = ((PyArrayObject *)values[12]);
8989 __pyx_v_rwork_psk_tol = ((PyArrayObject *)values[13]);
8990 __pyx_v_rwork_density_w = ((PyArrayObject *)values[14]);
8991 __pyx_v_rwork_density_n = ((PyArrayObject *)values[15]);
8992 __pyx_v_g = ((PyArrayObject *)values[16]);
8993 __pyx_v_qt = ((PyArrayObject *)values[17]);
8994 __pyx_v_u = ((PyArrayObject *)values[18]);
8995 __pyx_v_sw = ((PyArrayObject *)values[19]);
8996 __pyx_v_m = ((PyArrayObject *)values[20]);
8997 __pyx_v_dm = ((PyArrayObject *)values[21]);
8998 __pyx_v_phi = ((PyArrayObject *)values[22]);
8999 __pyx_v_dphi = ((PyArrayObject *)values[23]);
9000 __pyx_v_f = ((PyArrayObject *)values[24]);
9001 __pyx_v_df = ((PyArrayObject *)values[25]);
9002 __pyx_v_a = ((PyArrayObject *)values[26]);
9003 __pyx_v_da = ((PyArrayObject *)values[27]);
9005 goto __pyx_L4_argument_unpacking_done;
9006 __pyx_L5_argtuple_error:;
9007 __Pyx_RaiseArgtupleInvalid(
"twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType", 1, 28, 28, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1930, __pyx_L3_error)
9009 __Pyx_AddTraceback(
"cTwophaseDarcyCoefficients.twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType", __pyx_clineno, __pyx_lineno, __pyx_filename);
9010 __Pyx_RefNannyFinishContext();
9012 __pyx_L4_argument_unpacking_done:;
9013 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rowptr), __pyx_ptype_5numpy_ndarray, 1,
"rowptr", 0))) __PYX_ERR(0, 1931, __pyx_L1_error)
9014 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_colind), __pyx_ptype_5numpy_ndarray, 1,
"colind", 0))) __PYX_ERR(0, 1932, __pyx_L1_error)
9015 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_matType), __pyx_ptype_5numpy_ndarray, 1,
"matType", 0))) __PYX_ERR(0, 1933, __pyx_L1_error)
9016 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_omega), __pyx_ptype_5numpy_ndarray, 1,
"omega", 0))) __PYX_ERR(0, 1936, __pyx_L1_error)
9017 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Kbar), __pyx_ptype_5numpy_ndarray, 1,
"Kbar", 0))) __PYX_ERR(0, 1937, __pyx_L1_error)
9018 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_psk), __pyx_ptype_5numpy_ndarray, 1,
"rwork_psk", 0))) __PYX_ERR(0, 1941, __pyx_L1_error)
9019 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork_psk), __pyx_ptype_5numpy_ndarray, 1,
"iwork_psk", 0))) __PYX_ERR(0, 1942, __pyx_L1_error)
9020 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_psk_tol), __pyx_ptype_5numpy_ndarray, 1,
"rwork_psk_tol", 0))) __PYX_ERR(0, 1943, __pyx_L1_error)
9021 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_density_w), __pyx_ptype_5numpy_ndarray, 1,
"rwork_density_w", 0))) __PYX_ERR(0, 1944, __pyx_L1_error)
9022 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_density_n), __pyx_ptype_5numpy_ndarray, 1,
"rwork_density_n", 0))) __PYX_ERR(0, 1945, __pyx_L1_error)
9023 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_g), __pyx_ptype_5numpy_ndarray, 1,
"g", 0))) __PYX_ERR(0, 1946, __pyx_L1_error)
9024 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_qt), __pyx_ptype_5numpy_ndarray, 1,
"qt", 0))) __PYX_ERR(0, 1946, __pyx_L1_error)
9025 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u), __pyx_ptype_5numpy_ndarray, 1,
"u", 0))) __PYX_ERR(0, 1946, __pyx_L1_error)
9026 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sw), __pyx_ptype_5numpy_ndarray, 1,
"sw", 0))) __PYX_ERR(0, 1946, __pyx_L1_error)
9027 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_m), __pyx_ptype_5numpy_ndarray, 1,
"m", 0))) __PYX_ERR(0, 1946, __pyx_L1_error)
9028 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dm), __pyx_ptype_5numpy_ndarray, 1,
"dm", 0))) __PYX_ERR(0, 1946, __pyx_L1_error)
9029 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_phi), __pyx_ptype_5numpy_ndarray, 1,
"phi", 0))) __PYX_ERR(0, 1946, __pyx_L1_error)
9030 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dphi), __pyx_ptype_5numpy_ndarray, 1,
"dphi", 0))) __PYX_ERR(0, 1946, __pyx_L1_error)
9031 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_f), __pyx_ptype_5numpy_ndarray, 1,
"f", 0))) __PYX_ERR(0, 1947, __pyx_L1_error)
9032 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_df), __pyx_ptype_5numpy_ndarray, 1,
"df", 0))) __PYX_ERR(0, 1947, __pyx_L1_error)
9033 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1,
"a", 0))) __PYX_ERR(0, 1947, __pyx_L1_error)
9034 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_da), __pyx_ptype_5numpy_ndarray, 1,
"da", 0))) __PYX_ERR(0, 1947, __pyx_L1_error)
9035 __pyx_r = __pyx_pf_26cTwophaseDarcyCoefficients_22twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType(__pyx_self, __pyx_v_pskModelFlag, __pyx_v_rowptr, __pyx_v_colind, __pyx_v_matType, __pyx_v_muw, __pyx_v_mun, __pyx_v_omega, __pyx_v_Kbar, __pyx_v_b, __pyx_v_capillaryDiffusionScaling, __pyx_v_advectionScaling, __pyx_v_rwork_psk, __pyx_v_iwork_psk, __pyx_v_rwork_psk_tol, __pyx_v_rwork_density_w, __pyx_v_rwork_density_n, __pyx_v_g, __pyx_v_qt, __pyx_v_u, __pyx_v_sw, __pyx_v_m, __pyx_v_dm, __pyx_v_phi, __pyx_v_dphi, __pyx_v_f, __pyx_v_df, __pyx_v_a, __pyx_v_da);
9042 __Pyx_RefNannyFinishContext();
9046 static PyObject *__pyx_pf_26cTwophaseDarcyCoefficients_22twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType(CYTHON_UNUSED PyObject *__pyx_self,
int __pyx_v_pskModelFlag, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_colind, PyArrayObject *__pyx_v_matType,
double __pyx_v_muw,
double __pyx_v_mun, PyArrayObject *__pyx_v_omega, PyArrayObject *__pyx_v_Kbar,
double __pyx_v_b,
double __pyx_v_capillaryDiffusionScaling,
double __pyx_v_advectionScaling, PyArrayObject *__pyx_v_rwork_psk, PyArrayObject *__pyx_v_iwork_psk, PyArrayObject *__pyx_v_rwork_psk_tol, PyArrayObject *__pyx_v_rwork_density_w, PyArrayObject *__pyx_v_rwork_density_n, PyArrayObject *__pyx_v_g, PyArrayObject *__pyx_v_qt, PyArrayObject *__pyx_v_u, PyArrayObject *__pyx_v_sw, PyArrayObject *__pyx_v_m, PyArrayObject *__pyx_v_dm, PyArrayObject *__pyx_v_phi, PyArrayObject *__pyx_v_dphi, PyArrayObject *__pyx_v_f, PyArrayObject *__pyx_v_df, PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_da) {
9047 int __pyx_v_nPointsPerSimplex;
9048 int __pyx_v_nSimplex;
9049 PyObject *__pyx_r = NULL;
9050 __Pyx_RefNannyDeclarations
9051 PyObject *__pyx_t_1 = NULL;
9052 PyObject *__pyx_t_2 = NULL;
9053 PyObject *__pyx_t_3 = NULL;
9055 int __pyx_lineno = 0;
9056 const char *__pyx_filename = NULL;
9057 int __pyx_clineno = 0;
9058 __Pyx_RefNannySetupContext(
"twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType", 0);
9067 __pyx_v_nPointsPerSimplex = (__pyx_v_sw->dimensions[(__pyx_v_sw->nd - 1)]);
9076 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_sw), __pyx_n_s_size);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1956, __pyx_L1_error)
9077 __Pyx_GOTREF(__pyx_t_1);
9078 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_nPointsPerSimplex);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1956, __pyx_L1_error)
9079 __Pyx_GOTREF(__pyx_t_2);
9080 __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1956, __pyx_L1_error)
9081 __Pyx_GOTREF(__pyx_t_3);
9082 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9083 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9084 __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3);
if (unlikely((__pyx_t_4 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1956, __pyx_L1_error)
9085 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9086 __pyx_v_nSimplex = __pyx_t_4;
9095 switch (__pyx_v_pskModelFlag) {
9105 (void)(twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType<SimplePSK>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_v_g->dimensions[0]), 2, ((
int *)__pyx_v_rowptr->data), ((
int *)__pyx_v_colind->data), ((
int *)__pyx_v_matType->data), __pyx_v_muw, __pyx_v_mun, ((
double *)__pyx_v_omega->data), ((
double *)__pyx_v_Kbar->data), __pyx_v_b, __pyx_v_capillaryDiffusionScaling, __pyx_v_advectionScaling, ((
double *)__pyx_v_rwork_psk->data), ((
int *)__pyx_v_iwork_psk->data), ((
double *)__pyx_v_rwork_psk_tol->data), ((
double *)__pyx_v_rwork_density_w->data), ((
double *)__pyx_v_rwork_density_n->data), ((
double *)__pyx_v_g->data), ((
double *)__pyx_v_qt->data), ((
double *)__pyx_v_u->data), ((
double *)__pyx_v_sw->data), ((
double *)__pyx_v_m->data), ((
double *)__pyx_v_dm->data), ((
double *)__pyx_v_phi->data), ((
double *)__pyx_v_dphi->data), ((
double *)__pyx_v_f->data), ((
double *)__pyx_v_df->data), ((
double *)__pyx_v_a->data), ((
double *)__pyx_v_da->data)));
9124 (void)(twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType<VGM>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_v_g->dimensions[0]), 4, ((
int *)__pyx_v_rowptr->data), ((
int *)__pyx_v_colind->data), ((
int *)__pyx_v_matType->data), __pyx_v_muw, __pyx_v_mun, ((
double *)__pyx_v_omega->data), ((
double *)__pyx_v_Kbar->data), __pyx_v_b, __pyx_v_capillaryDiffusionScaling, __pyx_v_advectionScaling, ((
double *)__pyx_v_rwork_psk->data), ((
int *)__pyx_v_iwork_psk->data), ((
double *)__pyx_v_rwork_psk_tol->data), ((
double *)__pyx_v_rwork_density_w->data), ((
double *)__pyx_v_rwork_density_n->data), ((
double *)__pyx_v_g->data), ((
double *)__pyx_v_qt->data), ((
double *)__pyx_v_u->data), ((
double *)__pyx_v_sw->data), ((
double *)__pyx_v_m->data), ((
double *)__pyx_v_dm->data), ((
double *)__pyx_v_phi->data), ((
double *)__pyx_v_dphi->data), ((
double *)__pyx_v_f->data), ((
double *)__pyx_v_df->data), ((
double *)__pyx_v_a->data), ((
double *)__pyx_v_da->data)));
9143 (void)(twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType<SimplePSK>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_v_g->dimensions[0]), 2, ((
int *)__pyx_v_rowptr->data), ((
int *)__pyx_v_colind->data), ((
int *)__pyx_v_matType->data), __pyx_v_muw, __pyx_v_mun, ((
double *)__pyx_v_omega->data), ((
double *)__pyx_v_Kbar->data), __pyx_v_b, __pyx_v_capillaryDiffusionScaling, __pyx_v_advectionScaling, ((
double *)__pyx_v_rwork_psk->data), ((
int *)__pyx_v_iwork_psk->data), ((
double *)__pyx_v_rwork_psk_tol->data), ((
double *)__pyx_v_rwork_density_w->data), ((
double *)__pyx_v_rwork_density_n->data), ((
double *)__pyx_v_g->data), ((
double *)__pyx_v_qt->data), ((
double *)__pyx_v_u->data), ((
double *)__pyx_v_sw->data), ((
double *)__pyx_v_m->data), ((
double *)__pyx_v_dm->data), ((
double *)__pyx_v_phi->data), ((
double *)__pyx_v_dphi->data), ((
double *)__pyx_v_f->data), ((
double *)__pyx_v_df->data), ((
double *)__pyx_v_a->data), ((
double *)__pyx_v_da->data)));
9156 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9159 __Pyx_XDECREF(__pyx_t_1);
9160 __Pyx_XDECREF(__pyx_t_2);
9161 __Pyx_XDECREF(__pyx_t_3);
9162 __Pyx_AddTraceback(
"cTwophaseDarcyCoefficients.twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType", __pyx_clineno, __pyx_lineno, __pyx_filename);
9165 __Pyx_XGIVEREF(__pyx_r);
9166 __Pyx_RefNannyFinishContext();
9178 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
9179 PyObject *__pyx_r = NULL;
9180 __Pyx_RefNannyDeclarations
9181 PyObject *__pyx_t_1 = NULL;
9182 int __pyx_lineno = 0;
9183 const char *__pyx_filename = NULL;
9184 int __pyx_clineno = 0;
9185 __Pyx_RefNannySetupContext(
"PyArray_MultiIterNew1", 0);
9194 __Pyx_XDECREF(__pyx_r);
9195 __pyx_t_1 = PyArray_MultiIterNew(1, ((
void *)__pyx_v_a));
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 736, __pyx_L1_error)
9196 __Pyx_GOTREF(__pyx_t_1);
9197 __pyx_r = __pyx_t_1;
9211 __Pyx_XDECREF(__pyx_t_1);
9212 __Pyx_AddTraceback(
"numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename);
9215 __Pyx_XGIVEREF(__pyx_r);
9216 __Pyx_RefNannyFinishContext();
9228 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
9229 PyObject *__pyx_r = NULL;
9230 __Pyx_RefNannyDeclarations
9231 PyObject *__pyx_t_1 = NULL;
9232 int __pyx_lineno = 0;
9233 const char *__pyx_filename = NULL;
9234 int __pyx_clineno = 0;
9235 __Pyx_RefNannySetupContext(
"PyArray_MultiIterNew2", 0);
9244 __Pyx_XDECREF(__pyx_r);
9245 __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)
9246 __Pyx_GOTREF(__pyx_t_1);
9247 __pyx_r = __pyx_t_1;
9261 __Pyx_XDECREF(__pyx_t_1);
9262 __Pyx_AddTraceback(
"numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename);
9265 __Pyx_XGIVEREF(__pyx_r);
9266 __Pyx_RefNannyFinishContext();
9278 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
9279 PyObject *__pyx_r = NULL;
9280 __Pyx_RefNannyDeclarations
9281 PyObject *__pyx_t_1 = NULL;
9282 int __pyx_lineno = 0;
9283 const char *__pyx_filename = NULL;
9284 int __pyx_clineno = 0;
9285 __Pyx_RefNannySetupContext(
"PyArray_MultiIterNew3", 0);
9294 __Pyx_XDECREF(__pyx_r);
9295 __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)
9296 __Pyx_GOTREF(__pyx_t_1);
9297 __pyx_r = __pyx_t_1;
9311 __Pyx_XDECREF(__pyx_t_1);
9312 __Pyx_AddTraceback(
"numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename);
9315 __Pyx_XGIVEREF(__pyx_r);
9316 __Pyx_RefNannyFinishContext();
9328 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) {
9329 PyObject *__pyx_r = NULL;
9330 __Pyx_RefNannyDeclarations
9331 PyObject *__pyx_t_1 = NULL;
9332 int __pyx_lineno = 0;
9333 const char *__pyx_filename = NULL;
9334 int __pyx_clineno = 0;
9335 __Pyx_RefNannySetupContext(
"PyArray_MultiIterNew4", 0);
9344 __Pyx_XDECREF(__pyx_r);
9345 __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)
9346 __Pyx_GOTREF(__pyx_t_1);
9347 __pyx_r = __pyx_t_1;
9361 __Pyx_XDECREF(__pyx_t_1);
9362 __Pyx_AddTraceback(
"numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename);
9365 __Pyx_XGIVEREF(__pyx_r);
9366 __Pyx_RefNannyFinishContext();
9378 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) {
9379 PyObject *__pyx_r = NULL;
9380 __Pyx_RefNannyDeclarations
9381 PyObject *__pyx_t_1 = NULL;
9382 int __pyx_lineno = 0;
9383 const char *__pyx_filename = NULL;
9384 int __pyx_clineno = 0;
9385 __Pyx_RefNannySetupContext(
"PyArray_MultiIterNew5", 0);
9394 __Pyx_XDECREF(__pyx_r);
9395 __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)
9396 __Pyx_GOTREF(__pyx_t_1);
9397 __pyx_r = __pyx_t_1;
9411 __Pyx_XDECREF(__pyx_t_1);
9412 __Pyx_AddTraceback(
"numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename);
9415 __Pyx_XGIVEREF(__pyx_r);
9416 __Pyx_RefNannyFinishContext();
9428 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) {
9429 PyObject *__pyx_r = NULL;
9430 __Pyx_RefNannyDeclarations
9432 __Pyx_RefNannySetupContext(
"PyDataType_SHAPE", 0);
9441 __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0);
9451 __Pyx_XDECREF(__pyx_r);
9452 __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape));
9453 __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape);
9473 __Pyx_XDECREF(__pyx_r);
9474 __Pyx_INCREF(__pyx_empty_tuple);
9475 __pyx_r = __pyx_empty_tuple;
9489 __Pyx_XGIVEREF(__pyx_r);
9490 __Pyx_RefNannyFinishContext();
9502 static CYTHON_INLINE
void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
9503 __Pyx_RefNannyDeclarations
9504 __Pyx_RefNannySetupContext(
"set_array_base", 0);
9513 Py_INCREF(__pyx_v_base);
9522 (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base));
9533 __Pyx_RefNannyFinishContext();
9544 static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
9545 PyObject *__pyx_v_base;
9546 PyObject *__pyx_r = NULL;
9547 __Pyx_RefNannyDeclarations
9549 __Pyx_RefNannySetupContext(
"get_array_base", 0);
9558 __pyx_v_base = PyArray_BASE(__pyx_v_arr);
9567 __pyx_t_1 = ((__pyx_v_base == NULL) != 0);
9577 __Pyx_XDECREF(__pyx_r);
9578 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9597 __Pyx_XDECREF(__pyx_r);
9598 __Pyx_INCREF(((PyObject *)__pyx_v_base));
9599 __pyx_r = ((PyObject *)__pyx_v_base);
9612 __Pyx_XGIVEREF(__pyx_r);
9613 __Pyx_RefNannyFinishContext();
9625 static CYTHON_INLINE
int __pyx_f_5numpy_import_array(
void) {
9627 __Pyx_RefNannyDeclarations
9628 PyObject *__pyx_t_1 = NULL;
9629 PyObject *__pyx_t_2 = NULL;
9630 PyObject *__pyx_t_3 = NULL;
9632 PyObject *__pyx_t_5 = NULL;
9633 PyObject *__pyx_t_6 = NULL;
9634 PyObject *__pyx_t_7 = NULL;
9635 PyObject *__pyx_t_8 = NULL;
9636 int __pyx_lineno = 0;
9637 const char *__pyx_filename = NULL;
9638 int __pyx_clineno = 0;
9639 __Pyx_RefNannySetupContext(
"import_array", 0);
9649 __Pyx_PyThreadState_declare
9650 __Pyx_PyThreadState_assign
9651 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
9652 __Pyx_XGOTREF(__pyx_t_1);
9653 __Pyx_XGOTREF(__pyx_t_2);
9654 __Pyx_XGOTREF(__pyx_t_3);
9664 __pyx_t_4 = _import_array();
if (unlikely(__pyx_t_4 == ((
int)-1))) __PYX_ERR(1, 943, __pyx_L3_error)
9674 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
9675 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
9676 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
9677 goto __pyx_L8_try_end;
9687 __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
9689 __Pyx_AddTraceback(
"numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
9690 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 944, __pyx_L5_except_error)
9691 __Pyx_GOTREF(__pyx_t_5);
9692 __Pyx_GOTREF(__pyx_t_6);
9693 __Pyx_GOTREF(__pyx_t_7);
9702 __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)
9703 __Pyx_GOTREF(__pyx_t_8);
9704 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
9705 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9706 __PYX_ERR(1, 945, __pyx_L5_except_error)
9708 goto __pyx_L5_except_error;
9709 __pyx_L5_except_error:;
9718 __Pyx_XGIVEREF(__pyx_t_1);
9719 __Pyx_XGIVEREF(__pyx_t_2);
9720 __Pyx_XGIVEREF(__pyx_t_3);
9721 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
9722 goto __pyx_L1_error;
9738 __Pyx_XDECREF(__pyx_t_5);
9739 __Pyx_XDECREF(__pyx_t_6);
9740 __Pyx_XDECREF(__pyx_t_7);
9741 __Pyx_XDECREF(__pyx_t_8);
9742 __Pyx_AddTraceback(
"numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
9745 __Pyx_RefNannyFinishContext();
9757 static CYTHON_INLINE
int __pyx_f_5numpy_import_umath(
void) {
9759 __Pyx_RefNannyDeclarations
9760 PyObject *__pyx_t_1 = NULL;
9761 PyObject *__pyx_t_2 = NULL;
9762 PyObject *__pyx_t_3 = NULL;
9764 PyObject *__pyx_t_5 = NULL;
9765 PyObject *__pyx_t_6 = NULL;
9766 PyObject *__pyx_t_7 = NULL;
9767 PyObject *__pyx_t_8 = NULL;
9768 int __pyx_lineno = 0;
9769 const char *__pyx_filename = NULL;
9770 int __pyx_clineno = 0;
9771 __Pyx_RefNannySetupContext(
"import_umath", 0);
9781 __Pyx_PyThreadState_declare
9782 __Pyx_PyThreadState_assign
9783 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
9784 __Pyx_XGOTREF(__pyx_t_1);
9785 __Pyx_XGOTREF(__pyx_t_2);
9786 __Pyx_XGOTREF(__pyx_t_3);
9796 __pyx_t_4 = _import_umath();
if (unlikely(__pyx_t_4 == ((
int)-1))) __PYX_ERR(1, 949, __pyx_L3_error)
9806 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
9807 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
9808 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
9809 goto __pyx_L8_try_end;
9819 __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
9821 __Pyx_AddTraceback(
"numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
9822 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 950, __pyx_L5_except_error)
9823 __Pyx_GOTREF(__pyx_t_5);
9824 __Pyx_GOTREF(__pyx_t_6);
9825 __Pyx_GOTREF(__pyx_t_7);
9834 __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)
9835 __Pyx_GOTREF(__pyx_t_8);
9836 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
9837 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9838 __PYX_ERR(1, 951, __pyx_L5_except_error)
9840 goto __pyx_L5_except_error;
9841 __pyx_L5_except_error:;
9850 __Pyx_XGIVEREF(__pyx_t_1);
9851 __Pyx_XGIVEREF(__pyx_t_2);
9852 __Pyx_XGIVEREF(__pyx_t_3);
9853 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
9854 goto __pyx_L1_error;
9870 __Pyx_XDECREF(__pyx_t_5);
9871 __Pyx_XDECREF(__pyx_t_6);
9872 __Pyx_XDECREF(__pyx_t_7);
9873 __Pyx_XDECREF(__pyx_t_8);
9874 __Pyx_AddTraceback(
"numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
9877 __Pyx_RefNannyFinishContext();
9889 static CYTHON_INLINE
int __pyx_f_5numpy_import_ufunc(
void) {
9891 __Pyx_RefNannyDeclarations
9892 PyObject *__pyx_t_1 = NULL;
9893 PyObject *__pyx_t_2 = NULL;
9894 PyObject *__pyx_t_3 = NULL;
9896 PyObject *__pyx_t_5 = NULL;
9897 PyObject *__pyx_t_6 = NULL;
9898 PyObject *__pyx_t_7 = NULL;
9899 PyObject *__pyx_t_8 = NULL;
9900 int __pyx_lineno = 0;
9901 const char *__pyx_filename = NULL;
9902 int __pyx_clineno = 0;
9903 __Pyx_RefNannySetupContext(
"import_ufunc", 0);
9913 __Pyx_PyThreadState_declare
9914 __Pyx_PyThreadState_assign
9915 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
9916 __Pyx_XGOTREF(__pyx_t_1);
9917 __Pyx_XGOTREF(__pyx_t_2);
9918 __Pyx_XGOTREF(__pyx_t_3);
9928 __pyx_t_4 = _import_umath();
if (unlikely(__pyx_t_4 == ((
int)-1))) __PYX_ERR(1, 955, __pyx_L3_error)
9938 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
9939 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
9940 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
9941 goto __pyx_L8_try_end;
9951 __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
9953 __Pyx_AddTraceback(
"numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
9954 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 956, __pyx_L5_except_error)
9955 __Pyx_GOTREF(__pyx_t_5);
9956 __Pyx_GOTREF(__pyx_t_6);
9957 __Pyx_GOTREF(__pyx_t_7);
9966 __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)
9967 __Pyx_GOTREF(__pyx_t_8);
9968 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
9969 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9970 __PYX_ERR(1, 957, __pyx_L5_except_error)
9972 goto __pyx_L5_except_error;
9973 __pyx_L5_except_error:;
9982 __Pyx_XGIVEREF(__pyx_t_1);
9983 __Pyx_XGIVEREF(__pyx_t_2);
9984 __Pyx_XGIVEREF(__pyx_t_3);
9985 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
9986 goto __pyx_L1_error;
10002 __Pyx_XDECREF(__pyx_t_5);
10003 __Pyx_XDECREF(__pyx_t_6);
10004 __Pyx_XDECREF(__pyx_t_7);
10005 __Pyx_XDECREF(__pyx_t_8);
10006 __Pyx_AddTraceback(
"numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
10009 __Pyx_RefNannyFinishContext();
10021 static CYTHON_INLINE
int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) {
10023 __Pyx_RefNannyDeclarations
10024 __Pyx_RefNannySetupContext(
"is_timedelta64_object", 0);
10033 __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type));
10046 __Pyx_RefNannyFinishContext();
10058 static CYTHON_INLINE
int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) {
10060 __Pyx_RefNannyDeclarations
10061 __Pyx_RefNannySetupContext(
"is_datetime64_object", 0);
10070 __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type));
10083 __Pyx_RefNannyFinishContext();
10095 static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) {
10096 npy_datetime __pyx_r;
10105 __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval;
10129 static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) {
10130 npy_timedelta __pyx_r;
10139 __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval;
10163 static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) {
10164 NPY_DATETIMEUNIT __pyx_r;
10171 __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base);
10187 static PyMethodDef __pyx_methods[] = {
10191 #if PY_MAJOR_VERSION >= 3
10192 #if CYTHON_PEP489_MULTI_PHASE_INIT
10193 static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def);
10194 static int __pyx_pymod_exec_cTwophaseDarcyCoefficients(PyObject* module);
10195 static PyModuleDef_Slot __pyx_moduledef_slots[] = {
10196 {Py_mod_create, (
void*)__pyx_pymod_create},
10197 {Py_mod_exec, (
void*)__pyx_pymod_exec_cTwophaseDarcyCoefficients},
10202 static struct PyModuleDef __pyx_moduledef = {
10203 PyModuleDef_HEAD_INIT,
10204 "cTwophaseDarcyCoefficients",
10206 #if CYTHON_PEP489_MULTI_PHASE_INIT
10212 #if CYTHON_PEP489_MULTI_PHASE_INIT
10213 __pyx_moduledef_slots,
10222 #ifndef CYTHON_SMALL_CODE
10223 #if defined(__clang__)
10224 #define CYTHON_SMALL_CODE
10225 #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
10226 #define CYTHON_SMALL_CODE __attribute__((cold))
10228 #define CYTHON_SMALL_CODE
10232 static __Pyx_StringTabEntry __pyx_string_tab[] = {
10233 {&__pyx_n_s_ImportError, __pyx_k_ImportError,
sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
10234 {&__pyx_n_s_Kbar, __pyx_k_Kbar,
sizeof(__pyx_k_Kbar), 0, 0, 1, 1},
10235 {&__pyx_n_s_a, __pyx_k_a,
sizeof(__pyx_k_a), 0, 0, 1, 1},
10236 {&__pyx_n_s_advectionScaling, __pyx_k_advectionScaling,
sizeof(__pyx_k_advectionScaling), 0, 0, 1, 1},
10237 {&__pyx_n_s_an, __pyx_k_an,
sizeof(__pyx_k_an), 0, 0, 1, 1},
10238 {&__pyx_n_s_aw, __pyx_k_aw,
sizeof(__pyx_k_aw), 0, 0, 1, 1},
10239 {&__pyx_n_s_b, __pyx_k_b,
sizeof(__pyx_k_b), 0, 0, 1, 1},
10240 {&__pyx_n_s_cTwophaseDarcyCoefficients, __pyx_k_cTwophaseDarcyCoefficients,
sizeof(__pyx_k_cTwophaseDarcyCoefficients), 0, 0, 1, 1},
10241 {&__pyx_n_s_calcFlag, __pyx_k_calcFlag,
sizeof(__pyx_k_calcFlag), 0, 0, 1, 1},
10242 {&__pyx_n_s_capillaryDiffusionScaling, __pyx_k_capillaryDiffusionScaling,
sizeof(__pyx_k_capillaryDiffusionScaling), 0, 0, 1, 1},
10243 {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback,
sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
10244 {&__pyx_n_s_colind, __pyx_k_colind,
sizeof(__pyx_k_colind), 0, 0, 1, 1},
10245 {&__pyx_n_s_compressibilityFlag, __pyx_k_compressibilityFlag,
sizeof(__pyx_k_compressibilityFlag), 0, 0, 1, 1},
10246 {&__pyx_kp_s_configuration_density_w_flag_0_a, __pyx_k_configuration_density_w_flag_0_a,
sizeof(__pyx_k_configuration_density_w_flag_0_a), 0, 0, 1, 0},
10247 {&__pyx_n_s_da, __pyx_k_da,
sizeof(__pyx_k_da), 0, 0, 1, 1},
10248 {&__pyx_n_s_dan, __pyx_k_dan,
sizeof(__pyx_k_dan), 0, 0, 1, 1},
10249 {&__pyx_n_s_dan_dpsic, __pyx_k_dan_dpsic,
sizeof(__pyx_k_dan_dpsic), 0, 0, 1, 1},
10250 {&__pyx_n_s_dan_dpsiw, __pyx_k_dan_dpsiw,
sizeof(__pyx_k_dan_dpsiw), 0, 0, 1, 1},
10251 {&__pyx_n_s_daw, __pyx_k_daw,
sizeof(__pyx_k_daw), 0, 0, 1, 1},
10252 {&__pyx_n_s_daw_dpsic, __pyx_k_daw_dpsic,
sizeof(__pyx_k_daw_dpsic), 0, 0, 1, 1},
10253 {&__pyx_n_s_daw_dpsiw, __pyx_k_daw_dpsiw,
sizeof(__pyx_k_daw_dpsiw), 0, 0, 1, 1},
10254 {&__pyx_n_s_density_n_flag, __pyx_k_density_n_flag,
sizeof(__pyx_k_density_n_flag), 0, 0, 1, 1},
10255 {&__pyx_n_s_density_w_flag, __pyx_k_density_w_flag,
sizeof(__pyx_k_density_w_flag), 0, 0, 1, 1},
10256 {&__pyx_n_s_df, __pyx_k_df,
sizeof(__pyx_k_df), 0, 0, 1, 1},
10257 {&__pyx_n_s_dfn_dpsiw, __pyx_k_dfn_dpsiw,
sizeof(__pyx_k_dfn_dpsiw), 0, 0, 1, 1},
10258 {&__pyx_n_s_dfn_dsw, __pyx_k_dfn_dsw,
sizeof(__pyx_k_dfn_dsw), 0, 0, 1, 1},
10259 {&__pyx_n_s_dfw_dpsiw, __pyx_k_dfw_dpsiw,
sizeof(__pyx_k_dfw_dpsiw), 0, 0, 1, 1},
10260 {&__pyx_n_s_dfw_dsw, __pyx_k_dfw_dsw,
sizeof(__pyx_k_dfw_dsw), 0, 0, 1, 1},
10261 {&__pyx_n_s_dm, __pyx_k_dm,
sizeof(__pyx_k_dm), 0, 0, 1, 1},
10262 {&__pyx_n_s_dmn, __pyx_k_dmn,
sizeof(__pyx_k_dmn), 0, 0, 1, 1},
10263 {&__pyx_n_s_dmn_dpsic, __pyx_k_dmn_dpsic,
sizeof(__pyx_k_dmn_dpsic), 0, 0, 1, 1},
10264 {&__pyx_n_s_dmn_dpsiw, __pyx_k_dmn_dpsiw,
sizeof(__pyx_k_dmn_dpsiw), 0, 0, 1, 1},
10265 {&__pyx_n_s_dmw, __pyx_k_dmw,
sizeof(__pyx_k_dmw), 0, 0, 1, 1},
10266 {&__pyx_n_s_dmw_dpsic, __pyx_k_dmw_dpsic,
sizeof(__pyx_k_dmw_dpsic), 0, 0, 1, 1},
10267 {&__pyx_n_s_dmw_dpsiw, __pyx_k_dmw_dpsiw,
sizeof(__pyx_k_dmw_dpsiw), 0, 0, 1, 1},
10268 {&__pyx_n_s_domain, __pyx_k_domain,
sizeof(__pyx_k_domain), 0, 0, 1, 1},
10269 {&__pyx_n_s_dphi, __pyx_k_dphi,
sizeof(__pyx_k_dphi), 0, 0, 1, 1},
10270 {&__pyx_n_s_dphi_psin_dpsic, __pyx_k_dphi_psin_dpsic,
sizeof(__pyx_k_dphi_psin_dpsic), 0, 0, 1, 1},
10271 {&__pyx_n_s_dphi_psin_dpsiw, __pyx_k_dphi_psin_dpsiw,
sizeof(__pyx_k_dphi_psin_dpsiw), 0, 0, 1, 1},
10272 {&__pyx_n_s_dphi_psin_dsw, __pyx_k_dphi_psin_dsw,
sizeof(__pyx_k_dphi_psin_dsw), 0, 0, 1, 1},
10273 {&__pyx_n_s_dphi_psiw_dpsiw, __pyx_k_dphi_psiw_dpsiw,
sizeof(__pyx_k_dphi_psiw_dpsiw), 0, 0, 1, 1},
10274 {&__pyx_n_s_dpsin, __pyx_k_dpsin,
sizeof(__pyx_k_dpsin), 0, 0, 1, 1},
10275 {&__pyx_n_s_dpsin_dpsiw, __pyx_k_dpsin_dpsiw,
sizeof(__pyx_k_dpsin_dpsiw), 0, 0, 1, 1},
10276 {&__pyx_n_s_f, __pyx_k_f,
sizeof(__pyx_k_f), 0, 0, 1, 1},
10277 {&__pyx_n_s_fn, __pyx_k_fn,
sizeof(__pyx_k_fn), 0, 0, 1, 1},
10278 {&__pyx_n_s_format, __pyx_k_format,
sizeof(__pyx_k_format), 0, 0, 1, 1},
10279 {&__pyx_n_s_fw, __pyx_k_fw,
sizeof(__pyx_k_fw), 0, 0, 1, 1},
10280 {&__pyx_n_s_g, __pyx_k_g,
sizeof(__pyx_k_g), 0, 0, 1, 1},
10281 {&__pyx_n_s_generateSplineTables, __pyx_k_generateSplineTables,
sizeof(__pyx_k_generateSplineTables), 0, 0, 1, 1},
10282 {&__pyx_n_s_grad_psic, __pyx_k_grad_psic,
sizeof(__pyx_k_grad_psic), 0, 0, 1, 1},
10283 {&__pyx_n_s_import, __pyx_k_import,
sizeof(__pyx_k_import), 0, 0, 1, 1},
10284 {&__pyx_n_s_iwork_psk, __pyx_k_iwork_psk,
sizeof(__pyx_k_iwork_psk), 0, 0, 1, 1},
10285 {&__pyx_n_s_m, __pyx_k_m,
sizeof(__pyx_k_m), 0, 0, 1, 1},
10286 {&__pyx_n_s_main, __pyx_k_main,
sizeof(__pyx_k_main), 0, 0, 1, 1},
10287 {&__pyx_n_s_matType, __pyx_k_matType,
sizeof(__pyx_k_matType), 0, 0, 1, 1},
10288 {&__pyx_n_s_mn, __pyx_k_mn,
sizeof(__pyx_k_mn), 0, 0, 1, 1},
10289 {&__pyx_n_s_mun, __pyx_k_mun,
sizeof(__pyx_k_mun), 0, 0, 1, 1},
10290 {&__pyx_n_s_muw, __pyx_k_muw,
sizeof(__pyx_k_muw), 0, 0, 1, 1},
10291 {&__pyx_n_s_mw, __pyx_k_mw,
sizeof(__pyx_k_mw), 0, 0, 1, 1},
10292 {&__pyx_n_s_nPointsPerSimplex, __pyx_k_nPointsPerSimplex,
sizeof(__pyx_k_nPointsPerSimplex), 0, 0, 1, 1},
10293 {&__pyx_n_s_nSimplex, __pyx_k_nSimplex,
sizeof(__pyx_k_nSimplex), 0, 0, 1, 1},
10294 {&__pyx_n_s_name, __pyx_k_name,
sizeof(__pyx_k_name), 0, 0, 1, 1},
10295 {&__pyx_n_s_nknots, __pyx_k_nknots,
sizeof(__pyx_k_nknots), 0, 0, 1, 1},
10296 {&__pyx_n_s_np, __pyx_k_np,
sizeof(__pyx_k_np), 0, 0, 1, 1},
10297 {&__pyx_n_s_numpy, __pyx_k_numpy,
sizeof(__pyx_k_numpy), 0, 0, 1, 1},
10298 {&__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},
10299 {&__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},
10300 {&__pyx_n_s_omega, __pyx_k_omega,
sizeof(__pyx_k_omega), 0, 0, 1, 1},
10301 {&__pyx_n_s_phi, __pyx_k_phi,
sizeof(__pyx_k_phi), 0, 0, 1, 1},
10302 {&__pyx_n_s_phi_psin, __pyx_k_phi_psin,
sizeof(__pyx_k_phi_psin), 0, 0, 1, 1},
10303 {&__pyx_n_s_phi_psiw, __pyx_k_phi_psiw,
sizeof(__pyx_k_phi_psiw), 0, 0, 1, 1},
10304 {&__pyx_kp_s_proteus_cTwophaseDarcyCoefficien, __pyx_k_proteus_cTwophaseDarcyCoefficien,
sizeof(__pyx_k_proteus_cTwophaseDarcyCoefficien), 0, 0, 1, 0},
10305 {&__pyx_n_s_psic, __pyx_k_psic,
sizeof(__pyx_k_psic), 0, 0, 1, 1},
10306 {&__pyx_n_s_psin, __pyx_k_psin,
sizeof(__pyx_k_psin), 0, 0, 1, 1},
10307 {&__pyx_n_s_psiw, __pyx_k_psiw,
sizeof(__pyx_k_psiw), 0, 0, 1, 1},
10308 {&__pyx_n_s_pskModelFlag, __pyx_k_pskModelFlag,
sizeof(__pyx_k_pskModelFlag), 0, 0, 1, 1},
10309 {&__pyx_n_s_qt, __pyx_k_qt,
sizeof(__pyx_k_qt), 0, 0, 1, 1},
10310 {&__pyx_n_s_rowptr, __pyx_k_rowptr,
sizeof(__pyx_k_rowptr), 0, 0, 1, 1},
10311 {&__pyx_n_s_rwork_density_n, __pyx_k_rwork_density_n,
sizeof(__pyx_k_rwork_density_n), 0, 0, 1, 1},
10312 {&__pyx_n_s_rwork_density_w, __pyx_k_rwork_density_w,
sizeof(__pyx_k_rwork_density_w), 0, 0, 1, 1},
10313 {&__pyx_n_s_rwork_psk, __pyx_k_rwork_psk,
sizeof(__pyx_k_rwork_psk), 0, 0, 1, 1},
10314 {&__pyx_n_s_rwork_psk_tol, __pyx_k_rwork_psk_tol,
sizeof(__pyx_k_rwork_psk_tol), 0, 0, 1, 1},
10315 {&__pyx_n_s_size, __pyx_k_size,
sizeof(__pyx_k_size), 0, 0, 1, 1},
10316 {&__pyx_n_s_splineTable, __pyx_k_splineTable,
sizeof(__pyx_k_splineTable), 0, 0, 1, 1},
10317 {&__pyx_n_s_startIndex, __pyx_k_startIndex,
sizeof(__pyx_k_startIndex), 0, 0, 1, 1},
10318 {&__pyx_n_s_sw, __pyx_k_sw,
sizeof(__pyx_k_sw), 0, 0, 1, 1},
10319 {&__pyx_n_s_test, __pyx_k_test,
sizeof(__pyx_k_test), 0, 0, 1, 1},
10320 {&__pyx_n_s_twophaseDarcy_compressibleN_spli, __pyx_k_twophaseDarcy_compressibleN_spli,
sizeof(__pyx_k_twophaseDarcy_compressibleN_spli), 0, 0, 1, 1},
10321 {&__pyx_n_s_twophaseDarcy_compressibleN_spli_2, __pyx_k_twophaseDarcy_compressibleN_spli_2,
sizeof(__pyx_k_twophaseDarcy_compressibleN_spli_2), 0, 0, 1, 1},
10322 {&__pyx_n_s_twophaseDarcy_fc_pp_sd_het_matTy, __pyx_k_twophaseDarcy_fc_pp_sd_het_matTy,
sizeof(__pyx_k_twophaseDarcy_fc_pp_sd_het_matTy), 0, 0, 1, 1},
10323 {&__pyx_n_s_twophaseDarcy_fc_sd_het_matType, __pyx_k_twophaseDarcy_fc_sd_het_matType,
sizeof(__pyx_k_twophaseDarcy_fc_sd_het_matType), 0, 0, 1, 1},
10324 {&__pyx_n_s_twophaseDarcy_fc_sd_het_matType_2, __pyx_k_twophaseDarcy_fc_sd_het_matType_2,
sizeof(__pyx_k_twophaseDarcy_fc_sd_het_matType_2), 0, 0, 1, 1},
10325 {&__pyx_n_s_twophaseDarcy_incompressible_spl, __pyx_k_twophaseDarcy_incompressible_spl,
sizeof(__pyx_k_twophaseDarcy_incompressible_spl), 0, 0, 1, 1},
10326 {&__pyx_n_s_twophaseDarcy_incompressible_spl_2, __pyx_k_twophaseDarcy_incompressible_spl_2,
sizeof(__pyx_k_twophaseDarcy_incompressible_spl_2), 0, 0, 1, 1},
10327 {&__pyx_n_s_twophaseDarcy_incompressible_spl_3, __pyx_k_twophaseDarcy_incompressible_spl_3,
sizeof(__pyx_k_twophaseDarcy_incompressible_spl_3), 0, 0, 1, 1},
10328 {&__pyx_n_s_twophaseDarcy_slightCompressible, __pyx_k_twophaseDarcy_slightCompressible,
sizeof(__pyx_k_twophaseDarcy_slightCompressible), 0, 0, 1, 1},
10329 {&__pyx_n_s_twophaseDarcy_slightCompressible_2, __pyx_k_twophaseDarcy_slightCompressible_2,
sizeof(__pyx_k_twophaseDarcy_slightCompressible_2), 0, 0, 1, 1},
10330 {&__pyx_n_s_twophaseDarcy_vol_frac, __pyx_k_twophaseDarcy_vol_frac,
sizeof(__pyx_k_twophaseDarcy_vol_frac), 0, 0, 1, 1},
10331 {&__pyx_n_s_u, __pyx_k_u,
sizeof(__pyx_k_u), 0, 0, 1, 1},
10332 {&__pyx_n_s_vol_frac_n, __pyx_k_vol_frac_n,
sizeof(__pyx_k_vol_frac_n), 0, 0, 1, 1},
10333 {&__pyx_n_s_vol_frac_w, __pyx_k_vol_frac_w,
sizeof(__pyx_k_vol_frac_w), 0, 0, 1, 1},
10334 {&__pyx_n_s_x, __pyx_k_x,
sizeof(__pyx_k_x), 0, 0, 1, 1},
10335 {0, 0, 0, 0, 0, 0, 0}
10337 static CYTHON_SMALL_CODE
int __Pyx_InitCachedBuiltins(
void) {
10338 __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError);
if (!__pyx_builtin_ImportError) __PYX_ERR(1, 945, __pyx_L1_error)
10344 static CYTHON_SMALL_CODE
int __Pyx_InitCachedConstants(
void) {
10345 __Pyx_RefNannyDeclarations
10346 __Pyx_RefNannySetupContext(
"__Pyx_InitCachedConstants", 0);
10355 __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to);
if (unlikely(!__pyx_tuple_)) __PYX_ERR(1, 945, __pyx_L1_error)
10356 __Pyx_GOTREF(__pyx_tuple_);
10357 __Pyx_GIVEREF(__pyx_tuple_);
10366 __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)
10367 __Pyx_GOTREF(__pyx_tuple__2);
10368 __Pyx_GIVEREF(__pyx_tuple__2);
10377 __pyx_tuple__3 = PyTuple_Pack(42, __pyx_n_s_pskModelFlag, __pyx_n_s_density_w_flag, __pyx_n_s_density_n_flag, __pyx_n_s_rowptr, __pyx_n_s_colind, __pyx_n_s_matType, __pyx_n_s_muw, __pyx_n_s_mun, __pyx_n_s_omega, __pyx_n_s_Kbar, __pyx_n_s_b, __pyx_n_s_rwork_psk, __pyx_n_s_iwork_psk, __pyx_n_s_rwork_psk_tol, __pyx_n_s_rwork_density_w, __pyx_n_s_rwork_density_n, __pyx_n_s_g, __pyx_n_s_x, __pyx_n_s_sw, __pyx_n_s_psiw, __pyx_n_s_mw, __pyx_n_s_dmw, __pyx_n_s_dmw_dpsiw, __pyx_n_s_mn, __pyx_n_s_dmn, __pyx_n_s_dmn_dpsiw, __pyx_n_s_psin, __pyx_n_s_dpsin, __pyx_n_s_dpsin_dpsiw, __pyx_n_s_phi_psiw, __pyx_n_s_dphi_psiw_dpsiw, __pyx_n_s_phi_psin, __pyx_n_s_dphi_psin_dpsiw, __pyx_n_s_dphi_psin_dsw, __pyx_n_s_aw, __pyx_n_s_daw, __pyx_n_s_daw_dpsiw, __pyx_n_s_an, __pyx_n_s_dan, __pyx_n_s_dan_dpsiw, __pyx_n_s_nPointsPerSimplex, __pyx_n_s_nSimplex);
if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 32, __pyx_L1_error)
10378 __Pyx_GOTREF(__pyx_tuple__3);
10379 __Pyx_GIVEREF(__pyx_tuple__3);
10380 __pyx_codeobj__4 = (PyObject*)__Pyx_PyCode_New(40, 0, 42, 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_cTwophaseDarcyCoefficien, __pyx_n_s_twophaseDarcy_fc_sd_het_matType, 32, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__4)) __PYX_ERR(0, 32, __pyx_L1_error)
10389 __pyx_tuple__5 = PyTuple_Pack(49, __pyx_n_s_pskModelFlag, __pyx_n_s_density_w_flag, __pyx_n_s_density_n_flag, __pyx_n_s_rowptr, __pyx_n_s_colind, __pyx_n_s_matType, __pyx_n_s_muw, __pyx_n_s_mun, __pyx_n_s_omega, __pyx_n_s_Kbar, __pyx_n_s_b, __pyx_n_s_rwork_psk, __pyx_n_s_iwork_psk, __pyx_n_s_rwork_psk_tol, __pyx_n_s_rwork_density_w, __pyx_n_s_rwork_density_n, __pyx_n_s_g, __pyx_n_s_x, __pyx_n_s_sw, __pyx_n_s_psiw, __pyx_n_s_mw, __pyx_n_s_dmw, __pyx_n_s_dmw_dpsiw, __pyx_n_s_mn, __pyx_n_s_dmn, __pyx_n_s_dmn_dpsiw, __pyx_n_s_psin, __pyx_n_s_dpsin, __pyx_n_s_dpsin_dpsiw, __pyx_n_s_phi_psiw, __pyx_n_s_dphi_psiw_dpsiw, __pyx_n_s_phi_psin, __pyx_n_s_dphi_psin_dpsiw, __pyx_n_s_dphi_psin_dsw, __pyx_n_s_fw, __pyx_n_s_dfw_dsw, __pyx_n_s_dfw_dpsiw, __pyx_n_s_fn, __pyx_n_s_dfn_dsw, __pyx_n_s_dfn_dpsiw, __pyx_n_s_aw, __pyx_n_s_daw, __pyx_n_s_daw_dpsiw, __pyx_n_s_an, __pyx_n_s_dan, __pyx_n_s_dan_dpsiw, __pyx_n_s_compressibilityFlag, __pyx_n_s_nPointsPerSimplex, __pyx_n_s_nSimplex);
if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 423, __pyx_L1_error)
10390 __Pyx_GOTREF(__pyx_tuple__5);
10391 __Pyx_GIVEREF(__pyx_tuple__5);
10392 __pyx_codeobj__6 = (PyObject*)__Pyx_PyCode_New(47, 0, 49, 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_cTwophaseDarcyCoefficien, __pyx_n_s_twophaseDarcy_fc_sd_het_matType_2, 423, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__6)) __PYX_ERR(0, 423, __pyx_L1_error)
10401 __pyx_tuple__7 = PyTuple_Pack(40, __pyx_n_s_pskModelFlag, __pyx_n_s_density_w_flag, __pyx_n_s_density_n_flag, __pyx_n_s_rowptr, __pyx_n_s_colind, __pyx_n_s_matType, __pyx_n_s_muw, __pyx_n_s_mun, __pyx_n_s_omega, __pyx_n_s_Kbar, __pyx_n_s_b, __pyx_n_s_rwork_psk, __pyx_n_s_iwork_psk, __pyx_n_s_rwork_psk_tol, __pyx_n_s_rwork_density_w, __pyx_n_s_rwork_density_n, __pyx_n_s_g, __pyx_n_s_x, __pyx_n_s_psiw, __pyx_n_s_psic, __pyx_n_s_sw, __pyx_n_s_mw, __pyx_n_s_dmw_dpsiw, __pyx_n_s_dmw_dpsic, __pyx_n_s_mn, __pyx_n_s_dmn_dpsiw, __pyx_n_s_dmn_dpsic, __pyx_n_s_phi_psiw, __pyx_n_s_dphi_psiw_dpsiw, __pyx_n_s_phi_psin, __pyx_n_s_dphi_psin_dpsiw, __pyx_n_s_dphi_psin_dpsic, __pyx_n_s_aw, __pyx_n_s_daw_dpsiw, __pyx_n_s_daw_dpsic, __pyx_n_s_an, __pyx_n_s_dan_dpsiw, __pyx_n_s_dan_dpsic, __pyx_n_s_nPointsPerSimplex, __pyx_n_s_nSimplex);
if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 723, __pyx_L1_error)
10402 __Pyx_GOTREF(__pyx_tuple__7);
10403 __Pyx_GIVEREF(__pyx_tuple__7);
10404 __pyx_codeobj__8 = (PyObject*)__Pyx_PyCode_New(38, 0, 40, 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_cTwophaseDarcyCoefficien, __pyx_n_s_twophaseDarcy_fc_pp_sd_het_matTy, 723, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__8)) __PYX_ERR(0, 723, __pyx_L1_error)
10413 __pyx_tuple__9 = PyTuple_Pack(22, __pyx_n_s_pskModelFlag, __pyx_n_s_rowptr, __pyx_n_s_colind, __pyx_n_s_matType, __pyx_n_s_muw, __pyx_n_s_mun, __pyx_n_s_omega, __pyx_n_s_Kbar, __pyx_n_s_b, __pyx_n_s_capillaryDiffusionScaling, __pyx_n_s_rwork_psk, __pyx_n_s_iwork_psk, __pyx_n_s_rwork_psk_tol, __pyx_n_s_rwork_density_w, __pyx_n_s_rwork_density_n, __pyx_n_s_g, __pyx_n_s_sw, __pyx_n_s_grad_psic, __pyx_n_s_f, __pyx_n_s_a, __pyx_n_s_nPointsPerSimplex, __pyx_n_s_nSimplex);
if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 1016, __pyx_L1_error)
10414 __Pyx_GOTREF(__pyx_tuple__9);
10415 __Pyx_GIVEREF(__pyx_tuple__9);
10416 __pyx_codeobj__10 = (PyObject*)__Pyx_PyCode_New(20, 0, 22, 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_cTwophaseDarcyCoefficien, __pyx_n_s_twophaseDarcy_incompressible_spl, 1016, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__10)) __PYX_ERR(0, 1016, __pyx_L1_error)
10425 __pyx_tuple__11 = PyTuple_Pack(32, __pyx_n_s_pskModelFlag, __pyx_n_s_density_w_flag, __pyx_n_s_density_n_flag, __pyx_n_s_rowptr, __pyx_n_s_colind, __pyx_n_s_matType, __pyx_n_s_muw, __pyx_n_s_mun, __pyx_n_s_omega, __pyx_n_s_Kbar, __pyx_n_s_b, __pyx_n_s_capillaryDiffusionScaling, __pyx_n_s_advectionScaling, __pyx_n_s_rwork_psk, __pyx_n_s_iwork_psk, __pyx_n_s_rwork_psk_tol, __pyx_n_s_rwork_density_w, __pyx_n_s_rwork_density_n, __pyx_n_s_g, __pyx_n_s_qt, __pyx_n_s_psiw, __pyx_n_s_sw, __pyx_n_s_m, __pyx_n_s_dm, __pyx_n_s_phi, __pyx_n_s_dphi, __pyx_n_s_f, __pyx_n_s_df, __pyx_n_s_a, __pyx_n_s_da, __pyx_n_s_nPointsPerSimplex, __pyx_n_s_nSimplex);
if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 1116, __pyx_L1_error)
10426 __Pyx_GOTREF(__pyx_tuple__11);
10427 __Pyx_GIVEREF(__pyx_tuple__11);
10428 __pyx_codeobj__12 = (PyObject*)__Pyx_PyCode_New(30, 0, 32, 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_cTwophaseDarcyCoefficien, __pyx_n_s_twophaseDarcy_incompressible_spl_2, 1116, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__12)) __PYX_ERR(0, 1116, __pyx_L1_error)
10437 __pyx_tuple__13 = PyTuple_Pack(32, __pyx_n_s_pskModelFlag, __pyx_n_s_density_w_flag, __pyx_n_s_density_n_flag, __pyx_n_s_rowptr, __pyx_n_s_colind, __pyx_n_s_matType, __pyx_n_s_muw, __pyx_n_s_mun, __pyx_n_s_omega, __pyx_n_s_Kbar, __pyx_n_s_b, __pyx_n_s_capillaryDiffusionScaling, __pyx_n_s_advectionScaling, __pyx_n_s_rwork_psk, __pyx_n_s_iwork_psk, __pyx_n_s_rwork_psk_tol, __pyx_n_s_rwork_density_w, __pyx_n_s_rwork_density_n, __pyx_n_s_g, __pyx_n_s_qt, __pyx_n_s_psiw, __pyx_n_s_sw, __pyx_n_s_m, __pyx_n_s_dm, __pyx_n_s_phi, __pyx_n_s_dphi, __pyx_n_s_f, __pyx_n_s_df, __pyx_n_s_a, __pyx_n_s_da, __pyx_n_s_nPointsPerSimplex, __pyx_n_s_nSimplex);
if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 1253, __pyx_L1_error)
10438 __Pyx_GOTREF(__pyx_tuple__13);
10439 __Pyx_GIVEREF(__pyx_tuple__13);
10440 __pyx_codeobj__14 = (PyObject*)__Pyx_PyCode_New(30, 0, 32, 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_cTwophaseDarcyCoefficien, __pyx_n_s_twophaseDarcy_slightCompressible, 1253, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__14)) __PYX_ERR(0, 1253, __pyx_L1_error)
10449 __pyx_tuple__15 = PyTuple_Pack(32, __pyx_n_s_pskModelFlag, __pyx_n_s_density_w_flag, __pyx_n_s_density_n_flag, __pyx_n_s_rowptr, __pyx_n_s_colind, __pyx_n_s_matType, __pyx_n_s_muw, __pyx_n_s_mun, __pyx_n_s_omega, __pyx_n_s_Kbar, __pyx_n_s_b, __pyx_n_s_capillaryDiffusionScaling, __pyx_n_s_advectionScaling, __pyx_n_s_rwork_psk, __pyx_n_s_iwork_psk, __pyx_n_s_rwork_psk_tol, __pyx_n_s_rwork_density_w, __pyx_n_s_rwork_density_n, __pyx_n_s_g, __pyx_n_s_qt, __pyx_n_s_psiw, __pyx_n_s_sw, __pyx_n_s_m, __pyx_n_s_dm, __pyx_n_s_phi, __pyx_n_s_dphi, __pyx_n_s_f, __pyx_n_s_df, __pyx_n_s_a, __pyx_n_s_da, __pyx_n_s_nPointsPerSimplex, __pyx_n_s_nSimplex);
if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 1367, __pyx_L1_error)
10450 __Pyx_GOTREF(__pyx_tuple__15);
10451 __Pyx_GIVEREF(__pyx_tuple__15);
10452 __pyx_codeobj__16 = (PyObject*)__Pyx_PyCode_New(30, 0, 32, 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_cTwophaseDarcyCoefficien, __pyx_n_s_twophaseDarcy_slightCompressible_2, 1367, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__16)) __PYX_ERR(0, 1367, __pyx_L1_error)
10461 __pyx_tuple__17 = PyTuple_Pack(28, __pyx_n_s_pskModelFlag, __pyx_n_s_density_w_flag, __pyx_n_s_density_n_flag, __pyx_n_s_rowptr, __pyx_n_s_colind, __pyx_n_s_matType, __pyx_n_s_muw, __pyx_n_s_mun, __pyx_n_s_omega, __pyx_n_s_Kbar, __pyx_n_s_b, __pyx_n_s_capillaryDiffusionScaling, __pyx_n_s_rwork_psk, __pyx_n_s_iwork_psk, __pyx_n_s_rwork_psk_tol, __pyx_n_s_rwork_density_w, __pyx_n_s_rwork_density_n, __pyx_n_s_g, __pyx_n_s_sw, __pyx_n_s_psiw, __pyx_n_s_psin, __pyx_n_s_grad_psic, __pyx_n_s_m, __pyx_n_s_dm, __pyx_n_s_f, __pyx_n_s_a, __pyx_n_s_nPointsPerSimplex, __pyx_n_s_nSimplex);
if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 1528, __pyx_L1_error)
10462 __Pyx_GOTREF(__pyx_tuple__17);
10463 __Pyx_GIVEREF(__pyx_tuple__17);
10464 __pyx_codeobj__18 = (PyObject*)__Pyx_PyCode_New(26, 0, 28, 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_cTwophaseDarcyCoefficien, __pyx_n_s_twophaseDarcy_compressibleN_spli, 1528, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__18)) __PYX_ERR(0, 1528, __pyx_L1_error)
10473 __pyx_tuple__19 = PyTuple_Pack(32, __pyx_n_s_pskModelFlag, __pyx_n_s_density_w_flag, __pyx_n_s_density_n_flag, __pyx_n_s_rowptr, __pyx_n_s_colind, __pyx_n_s_matType, __pyx_n_s_muw, __pyx_n_s_mun, __pyx_n_s_omega, __pyx_n_s_Kbar, __pyx_n_s_b, __pyx_n_s_capillaryDiffusionScaling, __pyx_n_s_advectionScaling, __pyx_n_s_rwork_psk, __pyx_n_s_iwork_psk, __pyx_n_s_rwork_psk_tol, __pyx_n_s_rwork_density_w, __pyx_n_s_rwork_density_n, __pyx_n_s_g, __pyx_n_s_qt, __pyx_n_s_psiw, __pyx_n_s_sw, __pyx_n_s_m, __pyx_n_s_dm, __pyx_n_s_phi, __pyx_n_s_dphi, __pyx_n_s_f, __pyx_n_s_df, __pyx_n_s_a, __pyx_n_s_da, __pyx_n_s_nPointsPerSimplex, __pyx_n_s_nSimplex);
if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 1684, __pyx_L1_error)
10474 __Pyx_GOTREF(__pyx_tuple__19);
10475 __Pyx_GIVEREF(__pyx_tuple__19);
10476 __pyx_codeobj__20 = (PyObject*)__Pyx_PyCode_New(30, 0, 32, 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_cTwophaseDarcyCoefficien, __pyx_n_s_twophaseDarcy_compressibleN_spli_2, 1684, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__20)) __PYX_ERR(0, 1684, __pyx_L1_error)
10485 __pyx_tuple__21 = PyTuple_Pack(7, __pyx_n_s_matType, __pyx_n_s_omega, __pyx_n_s_sw, __pyx_n_s_vol_frac_w, __pyx_n_s_vol_frac_n, __pyx_n_s_nPointsPerSimplex, __pyx_n_s_nSimplex);
if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 1845, __pyx_L1_error)
10486 __Pyx_GOTREF(__pyx_tuple__21);
10487 __Pyx_GIVEREF(__pyx_tuple__21);
10488 __pyx_codeobj__22 = (PyObject*)__Pyx_PyCode_New(5, 0, 7, 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_cTwophaseDarcyCoefficien, __pyx_n_s_twophaseDarcy_vol_frac, 1845, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__22)) __PYX_ERR(0, 1845, __pyx_L1_error)
10497 __pyx_tuple__23 = PyTuple_Pack(9, __pyx_n_s_pskModelFlag, __pyx_n_s_startIndex, __pyx_n_s_calcFlag, __pyx_n_s_domain, __pyx_n_s_rwork_psk, __pyx_n_s_iwork_psk, __pyx_n_s_rwork_psk_tol, __pyx_n_s_splineTable, __pyx_n_s_nknots);
if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 1865, __pyx_L1_error)
10498 __Pyx_GOTREF(__pyx_tuple__23);
10499 __Pyx_GIVEREF(__pyx_tuple__23);
10500 __pyx_codeobj__24 = (PyObject*)__Pyx_PyCode_New(8, 0, 9, 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_cTwophaseDarcyCoefficien, __pyx_n_s_generateSplineTables, 1865, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__24)) __PYX_ERR(0, 1865, __pyx_L1_error)
10509 __pyx_tuple__25 = PyTuple_Pack(30, __pyx_n_s_pskModelFlag, __pyx_n_s_rowptr, __pyx_n_s_colind, __pyx_n_s_matType, __pyx_n_s_muw, __pyx_n_s_mun, __pyx_n_s_omega, __pyx_n_s_Kbar, __pyx_n_s_b, __pyx_n_s_capillaryDiffusionScaling, __pyx_n_s_advectionScaling, __pyx_n_s_rwork_psk, __pyx_n_s_iwork_psk, __pyx_n_s_rwork_psk_tol, __pyx_n_s_rwork_density_w, __pyx_n_s_rwork_density_n, __pyx_n_s_g, __pyx_n_s_qt, __pyx_n_s_u, __pyx_n_s_sw, __pyx_n_s_m, __pyx_n_s_dm, __pyx_n_s_phi, __pyx_n_s_dphi, __pyx_n_s_f, __pyx_n_s_df, __pyx_n_s_a, __pyx_n_s_da, __pyx_n_s_nPointsPerSimplex, __pyx_n_s_nSimplex);
if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 1930, __pyx_L1_error)
10510 __Pyx_GOTREF(__pyx_tuple__25);
10511 __Pyx_GIVEREF(__pyx_tuple__25);
10512 __pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(28, 0, 30, 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_cTwophaseDarcyCoefficien, __pyx_n_s_twophaseDarcy_incompressible_spl_3, 1930, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__26)) __PYX_ERR(0, 1930, __pyx_L1_error)
10513 __Pyx_RefNannyFinishContext();
10516 __Pyx_RefNannyFinishContext();
10520 static CYTHON_SMALL_CODE
int __Pyx_InitGlobals(
void) {
10521 if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
10527 static CYTHON_SMALL_CODE
int __Pyx_modinit_global_init_code(
void);
10528 static CYTHON_SMALL_CODE
int __Pyx_modinit_variable_export_code(
void);
10529 static CYTHON_SMALL_CODE
int __Pyx_modinit_function_export_code(
void);
10530 static CYTHON_SMALL_CODE
int __Pyx_modinit_type_init_code(
void);
10531 static CYTHON_SMALL_CODE
int __Pyx_modinit_type_import_code(
void);
10532 static CYTHON_SMALL_CODE
int __Pyx_modinit_variable_import_code(
void);
10533 static CYTHON_SMALL_CODE
int __Pyx_modinit_function_import_code(
void);
10535 static int __Pyx_modinit_global_init_code(
void) {
10536 __Pyx_RefNannyDeclarations
10537 __Pyx_RefNannySetupContext(
"__Pyx_modinit_global_init_code", 0);
10539 __Pyx_RefNannyFinishContext();
10543 static int __Pyx_modinit_variable_export_code(
void) {
10544 __Pyx_RefNannyDeclarations
10545 __Pyx_RefNannySetupContext(
"__Pyx_modinit_variable_export_code", 0);
10547 __Pyx_RefNannyFinishContext();
10551 static int __Pyx_modinit_function_export_code(
void) {
10552 __Pyx_RefNannyDeclarations
10553 __Pyx_RefNannySetupContext(
"__Pyx_modinit_function_export_code", 0);
10555 __Pyx_RefNannyFinishContext();
10559 static int __Pyx_modinit_type_init_code(
void) {
10560 __Pyx_RefNannyDeclarations
10561 __Pyx_RefNannySetupContext(
"__Pyx_modinit_type_init_code", 0);
10563 __Pyx_RefNannyFinishContext();
10567 static int __Pyx_modinit_type_import_code(
void) {
10568 __Pyx_RefNannyDeclarations
10569 PyObject *__pyx_t_1 = NULL;
10570 int __pyx_lineno = 0;
10571 const char *__pyx_filename = NULL;
10572 int __pyx_clineno = 0;
10573 __Pyx_RefNannySetupContext(
"__Pyx_modinit_type_import_code", 0);
10575 __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME);
if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 9, __pyx_L1_error)
10576 __Pyx_GOTREF(__pyx_t_1);
10577 __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME,
"type",
10578 #
if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
10579 sizeof(PyTypeObject),
10581 sizeof(PyHeapTypeObject),
10583 __Pyx_ImportType_CheckSize_Warn);
10584 if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(2, 9, __pyx_L1_error)
10585 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10586 __pyx_t_1 = PyImport_ImportModule(
"numpy");
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 200, __pyx_L1_error)
10587 __Pyx_GOTREF(__pyx_t_1);
10588 __pyx_ptype_5numpy_dtype = __Pyx_ImportType(__pyx_t_1,
"numpy",
"dtype",
sizeof(PyArray_Descr), __Pyx_ImportType_CheckSize_Ignore);
10589 if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(1, 200, __pyx_L1_error)
10590 __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1,
"numpy",
"flatiter",
sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Ignore);
10591 if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(1, 223, __pyx_L1_error)
10592 __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1,
"numpy",
"broadcast",
sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Ignore);
10593 if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(1, 227, __pyx_L1_error)
10594 __pyx_ptype_5numpy_ndarray = __Pyx_ImportType(__pyx_t_1,
"numpy",
"ndarray",
sizeof(PyArrayObject), __Pyx_ImportType_CheckSize_Ignore);
10595 if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(1, 239, __pyx_L1_error)
10596 __pyx_ptype_5numpy_generic = __Pyx_ImportType(__pyx_t_1,
"numpy",
"generic",
sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
10597 if (!__pyx_ptype_5numpy_generic) __PYX_ERR(1, 771, __pyx_L1_error)
10598 __pyx_ptype_5numpy_number = __Pyx_ImportType(__pyx_t_1,
"numpy",
"number",
sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
10599 if (!__pyx_ptype_5numpy_number) __PYX_ERR(1, 773, __pyx_L1_error)
10600 __pyx_ptype_5numpy_integer = __Pyx_ImportType(__pyx_t_1,
"numpy",
"integer",
sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
10601 if (!__pyx_ptype_5numpy_integer) __PYX_ERR(1, 775, __pyx_L1_error)
10602 __pyx_ptype_5numpy_signedinteger = __Pyx_ImportType(__pyx_t_1,
"numpy",
"signedinteger",
sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
10603 if (!__pyx_ptype_5numpy_signedinteger) __PYX_ERR(1, 777, __pyx_L1_error)
10604 __pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType(__pyx_t_1,
"numpy",
"unsignedinteger",
sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
10605 if (!__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(1, 779, __pyx_L1_error)
10606 __pyx_ptype_5numpy_inexact = __Pyx_ImportType(__pyx_t_1,
"numpy",
"inexact",
sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
10607 if (!__pyx_ptype_5numpy_inexact) __PYX_ERR(1, 781, __pyx_L1_error)
10608 __pyx_ptype_5numpy_floating = __Pyx_ImportType(__pyx_t_1,
"numpy",
"floating",
sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
10609 if (!__pyx_ptype_5numpy_floating) __PYX_ERR(1, 783, __pyx_L1_error)
10610 __pyx_ptype_5numpy_complexfloating = __Pyx_ImportType(__pyx_t_1,
"numpy",
"complexfloating",
sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
10611 if (!__pyx_ptype_5numpy_complexfloating) __PYX_ERR(1, 785, __pyx_L1_error)
10612 __pyx_ptype_5numpy_flexible = __Pyx_ImportType(__pyx_t_1,
"numpy",
"flexible",
sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
10613 if (!__pyx_ptype_5numpy_flexible) __PYX_ERR(1, 787, __pyx_L1_error)
10614 __pyx_ptype_5numpy_character = __Pyx_ImportType(__pyx_t_1,
"numpy",
"character",
sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
10615 if (!__pyx_ptype_5numpy_character) __PYX_ERR(1, 789, __pyx_L1_error)
10616 __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1,
"numpy",
"ufunc",
sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Ignore);
10617 if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(1, 827, __pyx_L1_error)
10618 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10619 __Pyx_RefNannyFinishContext();
10622 __Pyx_XDECREF(__pyx_t_1);
10623 __Pyx_RefNannyFinishContext();
10627 static int __Pyx_modinit_variable_import_code(
void) {
10628 __Pyx_RefNannyDeclarations
10629 __Pyx_RefNannySetupContext(
"__Pyx_modinit_variable_import_code", 0);
10631 __Pyx_RefNannyFinishContext();
10635 static int __Pyx_modinit_function_import_code(
void) {
10636 __Pyx_RefNannyDeclarations
10637 __Pyx_RefNannySetupContext(
"__Pyx_modinit_function_import_code", 0);
10639 __Pyx_RefNannyFinishContext();
10644 #ifndef CYTHON_NO_PYINIT_EXPORT
10645 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
10646 #elif PY_MAJOR_VERSION < 3
10648 #define __Pyx_PyMODINIT_FUNC extern "C" void
10650 #define __Pyx_PyMODINIT_FUNC void
10654 #define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
10656 #define __Pyx_PyMODINIT_FUNC PyObject *
10661 #if PY_MAJOR_VERSION < 3
10662 __Pyx_PyMODINIT_FUNC initcTwophaseDarcyCoefficients(
void) CYTHON_SMALL_CODE;
10663 __Pyx_PyMODINIT_FUNC initcTwophaseDarcyCoefficients(
void)
10665 __Pyx_PyMODINIT_FUNC PyInit_cTwophaseDarcyCoefficients(
void) CYTHON_SMALL_CODE;
10666 __Pyx_PyMODINIT_FUNC PyInit_cTwophaseDarcyCoefficients(
void)
10667 #if CYTHON_PEP489_MULTI_PHASE_INIT
10669 return PyModuleDef_Init(&__pyx_moduledef);
10671 static CYTHON_SMALL_CODE
int __Pyx_check_single_interpreter(
void) {
10672 #if PY_VERSION_HEX >= 0x030700A1
10673 static PY_INT64_T main_interpreter_id = -1;
10674 PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
10675 if (main_interpreter_id == -1) {
10676 main_interpreter_id = current_id;
10677 return (unlikely(current_id == -1)) ? -1 : 0;
10678 }
else if (unlikely(main_interpreter_id != current_id))
10680 static PyInterpreterState *main_interpreter = NULL;
10681 PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
10682 if (!main_interpreter) {
10683 main_interpreter = current_interpreter;
10684 }
else if (unlikely(main_interpreter != current_interpreter))
10689 "Interpreter change detected - this module can only be loaded into one interpreter per process.");
10694 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) {
10695 PyObject *value = PyObject_GetAttrString(spec, from_name);
10697 if (likely(value)) {
10698 if (allow_none || value != Py_None) {
10699 result = PyDict_SetItemString(moddict, to_name, value);
10702 }
else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
10709 static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
10710 PyObject *module = NULL, *moddict, *modname;
10711 if (__Pyx_check_single_interpreter())
10714 return __Pyx_NewRef(__pyx_m);
10715 modname = PyObject_GetAttrString(spec,
"name");
10716 if (unlikely(!modname))
goto bad;
10717 module = PyModule_NewObject(modname);
10718 Py_DECREF(modname);
10719 if (unlikely(!module))
goto bad;
10720 moddict = PyModule_GetDict(module);
10721 if (unlikely(!moddict))
goto bad;
10722 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict,
"loader",
"__loader__", 1) < 0))
goto bad;
10723 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict,
"origin",
"__file__", 1) < 0))
goto bad;
10724 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict,
"parent",
"__package__", 1) < 0))
goto bad;
10725 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict,
"submodule_search_locations",
"__path__", 0) < 0))
goto bad;
10728 Py_XDECREF(module);
10733 static CYTHON_SMALL_CODE
int __pyx_pymod_exec_cTwophaseDarcyCoefficients(PyObject *__pyx_pyinit_module)
10737 PyObject *__pyx_t_1 = NULL;
10738 int __pyx_lineno = 0;
10739 const char *__pyx_filename = NULL;
10740 int __pyx_clineno = 0;
10741 __Pyx_RefNannyDeclarations
10742 #if CYTHON_PEP489_MULTI_PHASE_INIT
10744 if (__pyx_m == __pyx_pyinit_module)
return 0;
10745 PyErr_SetString(PyExc_RuntimeError,
"Module 'cTwophaseDarcyCoefficients' has already been imported. Re-initialisation is not supported.");
10748 #elif PY_MAJOR_VERSION >= 3
10749 if (__pyx_m)
return __Pyx_NewRef(__pyx_m);
10751 #if CYTHON_REFNANNY
10752 __Pyx_RefNanny = __Pyx_RefNannyImportAPI(
"refnanny");
10753 if (!__Pyx_RefNanny) {
10755 __Pyx_RefNanny = __Pyx_RefNannyImportAPI(
"Cython.Runtime.refnanny");
10756 if (!__Pyx_RefNanny)
10757 Py_FatalError(
"failed to import 'refnanny' module");
10760 __Pyx_RefNannySetupContext(
"__Pyx_PyMODINIT_FUNC PyInit_cTwophaseDarcyCoefficients(void)", 0);
10761 if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
10762 #ifdef __Pxy_PyFrame_Initialize_Offsets
10763 __Pxy_PyFrame_Initialize_Offsets();
10765 __pyx_empty_tuple = PyTuple_New(0);
if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
10766 __pyx_empty_bytes = PyBytes_FromStringAndSize(
"", 0);
if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
10767 __pyx_empty_unicode = PyUnicode_FromStringAndSize(
"", 0);
if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
10768 #ifdef __Pyx_CyFunction_USED
10769 if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
10771 #ifdef __Pyx_FusedFunction_USED
10772 if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
10774 #ifdef __Pyx_Coroutine_USED
10775 if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
10777 #ifdef __Pyx_Generator_USED
10778 if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
10780 #ifdef __Pyx_AsyncGen_USED
10781 if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
10783 #ifdef __Pyx_StopAsyncIteration_USED
10784 if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
10788 #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
10789 PyEval_InitThreads();
10792 #if CYTHON_PEP489_MULTI_PHASE_INIT
10793 __pyx_m = __pyx_pyinit_module;
10794 Py_INCREF(__pyx_m);
10796 #if PY_MAJOR_VERSION < 3
10797 __pyx_m = Py_InitModule4(
"cTwophaseDarcyCoefficients", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
10799 __pyx_m = PyModule_Create(&__pyx_moduledef);
10801 if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
10803 __pyx_d = PyModule_GetDict(__pyx_m);
if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
10804 Py_INCREF(__pyx_d);
10805 __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME);
if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
10806 Py_INCREF(__pyx_b);
10807 __pyx_cython_runtime = PyImport_AddModule((
char *)
"cython_runtime");
if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
10808 Py_INCREF(__pyx_cython_runtime);
10809 if (PyObject_SetAttrString(__pyx_m,
"__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
10811 if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
10812 #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
10813 if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
10815 if (__pyx_module_is_main_cTwophaseDarcyCoefficients) {
10816 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
10818 #if PY_MAJOR_VERSION >= 3
10820 PyObject *modules = PyImport_GetModuleDict();
if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
10821 if (!PyDict_GetItemString(modules,
"cTwophaseDarcyCoefficients")) {
10822 if (unlikely(PyDict_SetItemString(modules,
"cTwophaseDarcyCoefficients", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
10827 if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
10829 if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
10831 (void)__Pyx_modinit_global_init_code();
10832 (void)__Pyx_modinit_variable_export_code();
10833 (void)__Pyx_modinit_function_export_code();
10834 (void)__Pyx_modinit_type_init_code();
10835 if (unlikely(__Pyx_modinit_type_import_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
10836 (void)__Pyx_modinit_variable_import_code();
10837 (void)__Pyx_modinit_function_import_code();
10839 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
10840 if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
10849 __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, -1);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
10850 __Pyx_GOTREF(__pyx_t_1);
10851 if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) __PYX_ERR(0, 2, __pyx_L1_error)
10852 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10861 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_26cTwophaseDarcyCoefficients_1twophaseDarcy_fc_sd_het_matType, NULL, __pyx_n_s_cTwophaseDarcyCoefficients);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32, __pyx_L1_error)
10862 __Pyx_GOTREF(__pyx_t_1);
10863 if (PyDict_SetItem(__pyx_d, __pyx_n_s_twophaseDarcy_fc_sd_het_matType, __pyx_t_1) < 0) __PYX_ERR(0, 32, __pyx_L1_error)
10864 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10873 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_26cTwophaseDarcyCoefficients_3twophaseDarcy_fc_sd_het_matType_nonPotentialForm, NULL, __pyx_n_s_cTwophaseDarcyCoefficients);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 423, __pyx_L1_error)
10874 __Pyx_GOTREF(__pyx_t_1);
10875 if (PyDict_SetItem(__pyx_d, __pyx_n_s_twophaseDarcy_fc_sd_het_matType_2, __pyx_t_1) < 0) __PYX_ERR(0, 423, __pyx_L1_error)
10876 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10885 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_26cTwophaseDarcyCoefficients_5twophaseDarcy_fc_pp_sd_het_matType, NULL, __pyx_n_s_cTwophaseDarcyCoefficients);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 723, __pyx_L1_error)
10886 __Pyx_GOTREF(__pyx_t_1);
10887 if (PyDict_SetItem(__pyx_d, __pyx_n_s_twophaseDarcy_fc_pp_sd_het_matTy, __pyx_t_1) < 0) __PYX_ERR(0, 723, __pyx_L1_error)
10888 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10897 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_26cTwophaseDarcyCoefficients_7twophaseDarcy_incompressible_split_sd_pressure_het_matType, NULL, __pyx_n_s_cTwophaseDarcyCoefficients);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1016, __pyx_L1_error)
10898 __Pyx_GOTREF(__pyx_t_1);
10899 if (PyDict_SetItem(__pyx_d, __pyx_n_s_twophaseDarcy_incompressible_spl, __pyx_t_1) < 0) __PYX_ERR(0, 1016, __pyx_L1_error)
10900 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10909 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_26cTwophaseDarcyCoefficients_9twophaseDarcy_incompressible_split_sd_saturation_het_matType, NULL, __pyx_n_s_cTwophaseDarcyCoefficients);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1116, __pyx_L1_error)
10910 __Pyx_GOTREF(__pyx_t_1);
10911 if (PyDict_SetItem(__pyx_d, __pyx_n_s_twophaseDarcy_incompressible_spl_2, __pyx_t_1) < 0) __PYX_ERR(0, 1116, __pyx_L1_error)
10912 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10921 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_26cTwophaseDarcyCoefficients_11twophaseDarcy_slightCompressible_split_sd_pressure_het_matType, NULL, __pyx_n_s_cTwophaseDarcyCoefficients);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1253, __pyx_L1_error)
10922 __Pyx_GOTREF(__pyx_t_1);
10923 if (PyDict_SetItem(__pyx_d, __pyx_n_s_twophaseDarcy_slightCompressible, __pyx_t_1) < 0) __PYX_ERR(0, 1253, __pyx_L1_error)
10924 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10933 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_26cTwophaseDarcyCoefficients_13twophaseDarcy_slightCompressible_split_sd_saturation_het_matType, NULL, __pyx_n_s_cTwophaseDarcyCoefficients);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1367, __pyx_L1_error)
10934 __Pyx_GOTREF(__pyx_t_1);
10935 if (PyDict_SetItem(__pyx_d, __pyx_n_s_twophaseDarcy_slightCompressible_2, __pyx_t_1) < 0) __PYX_ERR(0, 1367, __pyx_L1_error)
10936 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10945 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_26cTwophaseDarcyCoefficients_15twophaseDarcy_compressibleN_split_sd_pressure_het_matType, NULL, __pyx_n_s_cTwophaseDarcyCoefficients);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1528, __pyx_L1_error)
10946 __Pyx_GOTREF(__pyx_t_1);
10947 if (PyDict_SetItem(__pyx_d, __pyx_n_s_twophaseDarcy_compressibleN_spli, __pyx_t_1) < 0) __PYX_ERR(0, 1528, __pyx_L1_error)
10948 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10957 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_26cTwophaseDarcyCoefficients_17twophaseDarcy_compressibleN_split_sd_saturation_het_matType, NULL, __pyx_n_s_cTwophaseDarcyCoefficients);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1684, __pyx_L1_error)
10958 __Pyx_GOTREF(__pyx_t_1);
10959 if (PyDict_SetItem(__pyx_d, __pyx_n_s_twophaseDarcy_compressibleN_spli_2, __pyx_t_1) < 0) __PYX_ERR(0, 1684, __pyx_L1_error)
10960 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10969 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_26cTwophaseDarcyCoefficients_19twophaseDarcy_vol_frac, NULL, __pyx_n_s_cTwophaseDarcyCoefficients);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1845, __pyx_L1_error)
10970 __Pyx_GOTREF(__pyx_t_1);
10971 if (PyDict_SetItem(__pyx_d, __pyx_n_s_twophaseDarcy_vol_frac, __pyx_t_1) < 0) __PYX_ERR(0, 1845, __pyx_L1_error)
10972 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10981 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_26cTwophaseDarcyCoefficients_21generateSplineTables, NULL, __pyx_n_s_cTwophaseDarcyCoefficients);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1865, __pyx_L1_error)
10982 __Pyx_GOTREF(__pyx_t_1);
10983 if (PyDict_SetItem(__pyx_d, __pyx_n_s_generateSplineTables, __pyx_t_1) < 0) __PYX_ERR(0, 1865, __pyx_L1_error)
10984 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10993 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_26cTwophaseDarcyCoefficients_23twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType, NULL, __pyx_n_s_cTwophaseDarcyCoefficients);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1930, __pyx_L1_error)
10994 __Pyx_GOTREF(__pyx_t_1);
10995 if (PyDict_SetItem(__pyx_d, __pyx_n_s_twophaseDarcy_incompressible_spl_3, __pyx_t_1) < 0) __PYX_ERR(0, 1930, __pyx_L1_error)
10996 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11003 __pyx_t_1 = __Pyx_PyDict_NewPresized(0);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
11004 __Pyx_GOTREF(__pyx_t_1);
11005 if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
11006 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11020 __Pyx_XDECREF(__pyx_t_1);
11023 __Pyx_AddTraceback(
"init cTwophaseDarcyCoefficients", __pyx_clineno, __pyx_lineno, __pyx_filename);
11026 }
else if (!PyErr_Occurred()) {
11027 PyErr_SetString(PyExc_ImportError,
"init cTwophaseDarcyCoefficients");
11030 __Pyx_RefNannyFinishContext();
11031 #if CYTHON_PEP489_MULTI_PHASE_INIT
11032 return (__pyx_m != NULL) ? 0 : -1;
11033 #elif PY_MAJOR_VERSION >= 3
11042 #if CYTHON_REFNANNY
11043 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(
const char *modname) {
11044 PyObject *m = NULL, *p = NULL;
11046 m = PyImport_ImportModule(modname);
11048 p = PyObject_GetAttrString(m,
"RefNannyAPI");
11050 r = PyLong_AsVoidPtr(p);
11054 return (__Pyx_RefNannyAPIStruct *)
r;
11059 static void __Pyx_RaiseArgtupleInvalid(
11060 const char* func_name,
11062 Py_ssize_t num_min,
11063 Py_ssize_t num_max,
11064 Py_ssize_t num_found)
11066 Py_ssize_t num_expected;
11067 const char *more_or_less;
11068 if (num_found < num_min) {
11069 num_expected = num_min;
11070 more_or_less =
"at least";
11072 num_expected = num_max;
11073 more_or_less =
"at most";
11076 more_or_less =
"exactly";
11078 PyErr_Format(PyExc_TypeError,
11079 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T
"d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T
"d given)",
11080 func_name, more_or_less, num_expected,
11081 (num_expected == 1) ?
"" :
"s", num_found);
11085 static void __Pyx_RaiseDoubleKeywordsError(
11086 const char* func_name,
11089 PyErr_Format(PyExc_TypeError,
11090 #
if PY_MAJOR_VERSION >= 3
11091 "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
11093 "%s() got multiple values for keyword argument '%s'", func_name,
11094 PyString_AsString(kw_name));
11099 static int __Pyx_ParseOptionalKeywords(
11101 PyObject **argnames[],
11103 PyObject *values[],
11104 Py_ssize_t num_pos_args,
11105 const char* function_name)
11107 PyObject *key = 0, *value = 0;
11108 Py_ssize_t
pos = 0;
11110 PyObject*** first_kw_arg = argnames + num_pos_args;
11111 while (PyDict_Next(kwds, &
pos, &key, &value)) {
11112 name = first_kw_arg;
11113 while (*name && (**name != key)) name++;
11115 values[name-argnames] = value;
11118 name = first_kw_arg;
11119 #if PY_MAJOR_VERSION < 3
11120 if (likely(PyString_Check(key))) {
11122 if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
11123 && _PyString_Eq(**name, key)) {
11124 values[name-argnames] = value;
11129 if (*name)
continue;
11131 PyObject*** argname = argnames;
11132 while (argname != first_kw_arg) {
11133 if ((**argname == key) || (
11134 (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
11135 && _PyString_Eq(**argname, key))) {
11136 goto arg_passed_twice;
11143 if (likely(PyUnicode_Check(key))) {
11145 int cmp = (**name == key) ? 0 :
11146 #
if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
11147 (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
11149 PyUnicode_Compare(**name, key);
11150 if (cmp < 0 && unlikely(PyErr_Occurred()))
goto bad;
11152 values[name-argnames] = value;
11157 if (*name)
continue;
11159 PyObject*** argname = argnames;
11160 while (argname != first_kw_arg) {
11161 int cmp = (**argname == key) ? 0 :
11162 #
if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
11163 (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
11165 PyUnicode_Compare(**argname, key);
11166 if (cmp < 0 && unlikely(PyErr_Occurred()))
goto bad;
11167 if (cmp == 0)
goto arg_passed_twice;
11172 goto invalid_keyword_type;
11174 if (unlikely(PyDict_SetItem(kwds2, key, value)))
goto bad;
11176 goto invalid_keyword;
11181 __Pyx_RaiseDoubleKeywordsError(function_name, key);
11183 invalid_keyword_type:
11184 PyErr_Format(PyExc_TypeError,
11185 "%.200s() keywords must be strings", function_name);
11188 PyErr_Format(PyExc_TypeError,
11189 #
if PY_MAJOR_VERSION < 3
11190 "%.200s() got an unexpected keyword argument '%.200s'",
11191 function_name, PyString_AsString(key));
11193 "%s() got an unexpected keyword argument '%U'",
11194 function_name, key);
11201 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type,
const char *name,
int exact)
11203 if (unlikely(!type)) {
11204 PyErr_SetString(PyExc_SystemError,
"Missing type object");
11208 #if PY_MAJOR_VERSION == 2
11209 if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj)))
return 1;
11213 if (likely(__Pyx_TypeCheck(obj, type)))
return 1;
11215 PyErr_Format(PyExc_TypeError,
11216 "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
11217 name, type->tp_name, Py_TYPE(obj)->tp_name);
11222 #if CYTHON_USE_TYPE_SLOTS
11223 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
11224 PyTypeObject* tp = Py_TYPE(obj);
11225 if (likely(tp->tp_getattro))
11226 return tp->tp_getattro(obj, attr_name);
11227 #if PY_MAJOR_VERSION < 3
11228 if (likely(tp->tp_getattr))
11229 return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
11231 return PyObject_GetAttr(obj, attr_name);
11236 static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
11238 if (!j)
return NULL;
11239 r = PyObject_GetItem(o, j);
11243 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
11244 CYTHON_NCP_UNUSED
int wraparound,
11245 CYTHON_NCP_UNUSED
int boundscheck) {
11246 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
11247 Py_ssize_t wrapped_i = i;
11248 if (wraparound & unlikely(i < 0)) {
11249 wrapped_i += PyList_GET_SIZE(o);
11251 if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
11252 PyObject *
r = PyList_GET_ITEM(o, wrapped_i);
11256 return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
11258 return PySequence_GetItem(o, i);
11261 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
11262 CYTHON_NCP_UNUSED
int wraparound,
11263 CYTHON_NCP_UNUSED
int boundscheck) {
11264 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
11265 Py_ssize_t wrapped_i = i;
11266 if (wraparound & unlikely(i < 0)) {
11267 wrapped_i += PyTuple_GET_SIZE(o);
11269 if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
11270 PyObject *
r = PyTuple_GET_ITEM(o, wrapped_i);
11274 return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
11276 return PySequence_GetItem(o, i);
11279 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
int is_list,
11280 CYTHON_NCP_UNUSED
int wraparound,
11281 CYTHON_NCP_UNUSED
int boundscheck) {
11282 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
11283 if (is_list || PyList_CheckExact(o)) {
11284 Py_ssize_t
n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
11285 if ((!boundscheck) || (likely(__Pyx_is_valid_index(
n, PyList_GET_SIZE(o))))) {
11286 PyObject *
r = PyList_GET_ITEM(o,
n);
11291 else if (PyTuple_CheckExact(o)) {
11292 Py_ssize_t
n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
11293 if ((!boundscheck) || likely(__Pyx_is_valid_index(
n, PyTuple_GET_SIZE(o)))) {
11294 PyObject *
r = PyTuple_GET_ITEM(o,
n);
11299 PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
11300 if (likely(m && m->sq_item)) {
11301 if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
11302 Py_ssize_t l = m->sq_length(o);
11303 if (likely(l >= 0)) {
11306 if (!PyErr_ExceptionMatches(PyExc_OverflowError))
11311 return m->sq_item(o, i);
11315 if (is_list || PySequence_Check(o)) {
11316 return PySequence_GetItem(o, i);
11319 return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
11323 #if CYTHON_FAST_PYCALL
11324 static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
11325 PyObject *globals) {
11327 PyThreadState *tstate = __Pyx_PyThreadState_Current;
11328 PyObject **fastlocals;
11331 assert(globals != NULL);
11336 assert(tstate != NULL);
11337 f = PyFrame_New(tstate, co, globals, NULL);
11341 fastlocals = __Pyx_PyFrame_GetLocalsplus(
f);
11342 for (i = 0; i < na; i++) {
11344 fastlocals[i] = *args++;
11346 result = PyEval_EvalFrameEx(
f,0);
11347 ++tstate->recursion_depth;
11349 --tstate->recursion_depth;
11352 #if 1 || PY_VERSION_HEX < 0x030600B1
11353 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
11354 PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
11355 PyObject *globals = PyFunction_GET_GLOBALS(func);
11356 PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
11358 #if PY_MAJOR_VERSION >= 3
11361 PyObject *kwtuple, **k;
11366 assert(kwargs == NULL || PyDict_Check(kwargs));
11367 nk = kwargs ? PyDict_Size(kwargs) : 0;
11368 if (Py_EnterRecursiveCall((
char*)
" while calling a Python object")) {
11372 #
if PY_MAJOR_VERSION >= 3
11373 co->co_kwonlyargcount == 0 &&
11375 likely(kwargs == NULL || nk == 0) &&
11376 co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
11377 if (argdefs == NULL && co->co_argcount == nargs) {
11378 result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
11381 else if (nargs == 0 && argdefs != NULL
11382 && co->co_argcount == Py_SIZE(argdefs)) {
11385 args = &PyTuple_GET_ITEM(argdefs, 0);
11386 result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
11390 if (kwargs != NULL) {
11392 kwtuple = PyTuple_New(2 * nk);
11393 if (kwtuple == NULL) {
11397 k = &PyTuple_GET_ITEM(kwtuple, 0);
11399 while (PyDict_Next(kwargs, &
pos, &k[i], &k[i+1])) {
11410 closure = PyFunction_GET_CLOSURE(func);
11411 #if PY_MAJOR_VERSION >= 3
11412 kwdefs = PyFunction_GET_KW_DEFAULTS(func);
11414 if (argdefs != NULL) {
11415 d = &PyTuple_GET_ITEM(argdefs, 0);
11416 nd = Py_SIZE(argdefs);
11422 #if PY_MAJOR_VERSION >= 3
11423 result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
11426 d, (
int)nd, kwdefs, closure);
11428 result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
11431 d, (
int)nd, closure);
11433 Py_XDECREF(kwtuple);
11435 Py_LeaveRecursiveCall();
11442 #if CYTHON_FAST_PYCCALL
11443 static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
11444 PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
11445 PyCFunction meth = PyCFunction_GET_FUNCTION(func);
11446 PyObject *
self = PyCFunction_GET_SELF(func);
11447 int flags = PyCFunction_GET_FLAGS(func);
11448 assert(PyCFunction_Check(func));
11449 assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
11450 assert(nargs >= 0);
11451 assert(nargs == 0 || args != NULL);
11455 assert(!PyErr_Occurred());
11456 if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
11457 return (*((__Pyx_PyCFunctionFastWithKeywords)(
void*)meth)) (
self, args, nargs, NULL);
11459 return (*((__Pyx_PyCFunctionFast)(
void*)meth)) (
self, args, nargs);
11465 #if CYTHON_COMPILING_IN_CPYTHON
11466 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
11468 ternaryfunc call = Py_TYPE(func)->tp_call;
11469 if (unlikely(!call))
11470 return PyObject_Call(func, arg, kw);
11471 if (unlikely(Py_EnterRecursiveCall((
char*)
" while calling a Python object")))
11473 result = (*call)(func, arg, kw);
11474 Py_LeaveRecursiveCall();
11475 if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
11478 "NULL result without error in PyObject_Call");
11485 static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
11486 PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
11487 if (unlikely(!result)) {
11488 PyErr_Format(PyExc_NameError,
11489 #
if PY_MAJOR_VERSION >= 3
11490 "name '%U' is not defined", name);
11492 "name '%.200s' is not defined", PyString_AS_STRING(name));
11499 #if CYTHON_USE_EXC_INFO_STACK
11500 static _PyErr_StackItem *
11501 __Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
11503 _PyErr_StackItem *exc_info = tstate->exc_info;
11504 while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
11505 exc_info->previous_item != NULL)
11507 exc_info = exc_info->previous_item;
11514 #if CYTHON_FAST_THREAD_STATE
11515 static CYTHON_INLINE
void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
11516 #if CYTHON_USE_EXC_INFO_STACK
11517 _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
11518 *type = exc_info->exc_type;
11519 *value = exc_info->exc_value;
11520 *tb = exc_info->exc_traceback;
11522 *type = tstate->exc_type;
11523 *value = tstate->exc_value;
11524 *tb = tstate->exc_traceback;
11527 Py_XINCREF(*value);
11530 static CYTHON_INLINE
void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
11531 PyObject *tmp_type, *tmp_value, *tmp_tb;
11532 #if CYTHON_USE_EXC_INFO_STACK
11533 _PyErr_StackItem *exc_info = tstate->exc_info;
11534 tmp_type = exc_info->exc_type;
11535 tmp_value = exc_info->exc_value;
11536 tmp_tb = exc_info->exc_traceback;
11537 exc_info->exc_type = type;
11538 exc_info->exc_value = value;
11539 exc_info->exc_traceback = tb;
11541 tmp_type = tstate->exc_type;
11542 tmp_value = tstate->exc_value;
11543 tmp_tb = tstate->exc_traceback;
11544 tstate->exc_type = type;
11545 tstate->exc_value = value;
11546 tstate->exc_traceback = tb;
11548 Py_XDECREF(tmp_type);
11549 Py_XDECREF(tmp_value);
11550 Py_XDECREF(tmp_tb);
11555 #if CYTHON_FAST_THREAD_STATE
11556 static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
11558 n = PyTuple_GET_SIZE(tuple);
11559 #if PY_MAJOR_VERSION >= 3
11560 for (i=0; i<
n; i++) {
11561 if (exc_type == PyTuple_GET_ITEM(tuple, i))
return 1;
11564 for (i=0; i<
n; i++) {
11565 if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i)))
return 1;
11569 static CYTHON_INLINE
int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
11570 PyObject *exc_type = tstate->curexc_type;
11571 if (exc_type == err)
return 1;
11572 if (unlikely(!exc_type))
return 0;
11573 if (unlikely(PyTuple_Check(err)))
11574 return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
11575 return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
11580 #if CYTHON_FAST_THREAD_STATE
11581 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
11583 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
11586 PyObject *local_type, *local_value, *local_tb;
11587 #if CYTHON_FAST_THREAD_STATE
11588 PyObject *tmp_type, *tmp_value, *tmp_tb;
11589 local_type = tstate->curexc_type;
11590 local_value = tstate->curexc_value;
11591 local_tb = tstate->curexc_traceback;
11592 tstate->curexc_type = 0;
11593 tstate->curexc_value = 0;
11594 tstate->curexc_traceback = 0;
11596 PyErr_Fetch(&local_type, &local_value, &local_tb);
11598 PyErr_NormalizeException(&local_type, &local_value, &local_tb);
11599 #if CYTHON_FAST_THREAD_STATE
11600 if (unlikely(tstate->curexc_type))
11602 if (unlikely(PyErr_Occurred()))
11605 #if PY_MAJOR_VERSION >= 3
11607 if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
11611 Py_XINCREF(local_tb);
11612 Py_XINCREF(local_type);
11613 Py_XINCREF(local_value);
11614 *type = local_type;
11615 *value = local_value;
11617 #if CYTHON_FAST_THREAD_STATE
11618 #if CYTHON_USE_EXC_INFO_STACK
11620 _PyErr_StackItem *exc_info = tstate->exc_info;
11621 tmp_type = exc_info->exc_type;
11622 tmp_value = exc_info->exc_value;
11623 tmp_tb = exc_info->exc_traceback;
11624 exc_info->exc_type = local_type;
11625 exc_info->exc_value = local_value;
11626 exc_info->exc_traceback = local_tb;
11629 tmp_type = tstate->exc_type;
11630 tmp_value = tstate->exc_value;
11631 tmp_tb = tstate->exc_traceback;
11632 tstate->exc_type = local_type;
11633 tstate->exc_value = local_value;
11634 tstate->exc_traceback = local_tb;
11636 Py_XDECREF(tmp_type);
11637 Py_XDECREF(tmp_value);
11638 Py_XDECREF(tmp_tb);
11640 PyErr_SetExcInfo(local_type, local_value, local_tb);
11647 Py_XDECREF(local_type);
11648 Py_XDECREF(local_value);
11649 Py_XDECREF(local_tb);
11654 #if CYTHON_FAST_THREAD_STATE
11655 static CYTHON_INLINE
void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
11656 PyObject *tmp_type, *tmp_value, *tmp_tb;
11657 tmp_type = tstate->curexc_type;
11658 tmp_value = tstate->curexc_value;
11659 tmp_tb = tstate->curexc_traceback;
11660 tstate->curexc_type = type;
11661 tstate->curexc_value = value;
11662 tstate->curexc_traceback = tb;
11663 Py_XDECREF(tmp_type);
11664 Py_XDECREF(tmp_value);
11665 Py_XDECREF(tmp_tb);
11667 static CYTHON_INLINE
void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
11668 *type = tstate->curexc_type;
11669 *value = tstate->curexc_value;
11670 *tb = tstate->curexc_traceback;
11671 tstate->curexc_type = 0;
11672 tstate->curexc_value = 0;
11673 tstate->curexc_traceback = 0;
11678 #if PY_MAJOR_VERSION < 3
11679 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
11680 CYTHON_UNUSED PyObject *cause) {
11681 __Pyx_PyThreadState_declare
11683 if (!value || value == Py_None)
11687 if (!tb || tb == Py_None)
11691 if (!PyTraceBack_Check(tb)) {
11692 PyErr_SetString(PyExc_TypeError,
11693 "raise: arg 3 must be a traceback or None");
11697 if (PyType_Check(type)) {
11698 #if CYTHON_COMPILING_IN_PYPY
11700 Py_INCREF(Py_None);
11704 PyErr_NormalizeException(&type, &value, &tb);
11707 PyErr_SetString(PyExc_TypeError,
11708 "instance exception may not have a separate value");
11712 type = (PyObject*) Py_TYPE(type);
11714 if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
11715 PyErr_SetString(PyExc_TypeError,
11716 "raise: exception class must be a subclass of BaseException");
11720 __Pyx_PyThreadState_assign
11721 __Pyx_ErrRestore(type, value, tb);
11730 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
11731 PyObject* owned_instance = NULL;
11732 if (tb == Py_None) {
11734 }
else if (tb && !PyTraceBack_Check(tb)) {
11735 PyErr_SetString(PyExc_TypeError,
11736 "raise: arg 3 must be a traceback or None");
11739 if (value == Py_None)
11741 if (PyExceptionInstance_Check(type)) {
11743 PyErr_SetString(PyExc_TypeError,
11744 "instance exception may not have a separate value");
11748 type = (PyObject*) Py_TYPE(value);
11749 }
else if (PyExceptionClass_Check(type)) {
11750 PyObject *instance_class = NULL;
11751 if (value && PyExceptionInstance_Check(value)) {
11752 instance_class = (PyObject*) Py_TYPE(value);
11753 if (instance_class != type) {
11754 int is_subclass = PyObject_IsSubclass(instance_class, type);
11755 if (!is_subclass) {
11756 instance_class = NULL;
11757 }
else if (unlikely(is_subclass == -1)) {
11760 type = instance_class;
11764 if (!instance_class) {
11767 args = PyTuple_New(0);
11768 else if (PyTuple_Check(value)) {
11772 args = PyTuple_Pack(1, value);
11775 owned_instance = PyObject_Call(type, args, NULL);
11777 if (!owned_instance)
11779 value = owned_instance;
11780 if (!PyExceptionInstance_Check(value)) {
11781 PyErr_Format(PyExc_TypeError,
11782 "calling %R should have returned an instance of "
11783 "BaseException, not %R",
11784 type, Py_TYPE(value));
11789 PyErr_SetString(PyExc_TypeError,
11790 "raise: exception class must be a subclass of BaseException");
11794 PyObject *fixed_cause;
11795 if (cause == Py_None) {
11796 fixed_cause = NULL;
11797 }
else if (PyExceptionClass_Check(cause)) {
11798 fixed_cause = PyObject_CallObject(cause, NULL);
11799 if (fixed_cause == NULL)
11801 }
else if (PyExceptionInstance_Check(cause)) {
11802 fixed_cause = cause;
11803 Py_INCREF(fixed_cause);
11805 PyErr_SetString(PyExc_TypeError,
11806 "exception causes must derive from "
11810 PyException_SetCause(value, fixed_cause);
11812 PyErr_SetObject(type, value);
11814 #if CYTHON_COMPILING_IN_PYPY
11815 PyObject *tmp_type, *tmp_value, *tmp_tb;
11816 PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
11818 PyErr_Restore(tmp_type, tmp_value, tb);
11819 Py_XDECREF(tmp_tb);
11821 PyThreadState *tstate = __Pyx_PyThreadState_Current;
11822 PyObject* tmp_tb = tstate->curexc_traceback;
11823 if (tb != tmp_tb) {
11825 tstate->curexc_traceback = tb;
11826 Py_XDECREF(tmp_tb);
11831 Py_XDECREF(owned_instance);
11837 #ifndef __PYX_HAVE_RT_ImportType
11838 #define __PYX_HAVE_RT_ImportType
11839 static PyTypeObject *__Pyx_ImportType(PyObject *module,
const char *module_name,
const char *class_name,
11840 size_t size,
enum __Pyx_ImportType_CheckSize check_size)
11842 PyObject *result = 0;
11844 Py_ssize_t basicsize;
11845 #ifdef Py_LIMITED_API
11846 PyObject *py_basicsize;
11848 result = PyObject_GetAttrString(module, class_name);
11851 if (!PyType_Check(result)) {
11852 PyErr_Format(PyExc_TypeError,
11853 "%.200s.%.200s is not a type object",
11854 module_name, class_name);
11857 #ifndef Py_LIMITED_API
11858 basicsize = ((PyTypeObject *)result)->tp_basicsize;
11860 py_basicsize = PyObject_GetAttrString(result,
"__basicsize__");
11863 basicsize = PyLong_AsSsize_t(py_basicsize);
11864 Py_DECREF(py_basicsize);
11866 if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
11869 if ((
size_t)basicsize < size) {
11870 PyErr_Format(PyExc_ValueError,
11871 "%.200s.%.200s size changed, may indicate binary incompatibility. "
11872 "Expected %zd from C header, got %zd from PyObject",
11873 module_name, class_name, size, basicsize);
11876 if (check_size == __Pyx_ImportType_CheckSize_Error && (
size_t)basicsize != size) {
11877 PyErr_Format(PyExc_ValueError,
11878 "%.200s.%.200s size changed, may indicate binary incompatibility. "
11879 "Expected %zd from C header, got %zd from PyObject",
11880 module_name, class_name, size, basicsize);
11883 else if (check_size == __Pyx_ImportType_CheckSize_Warn && (
size_t)basicsize > size) {
11884 PyOS_snprintf(warning,
sizeof(warning),
11885 "%s.%s size changed, may indicate binary incompatibility. "
11886 "Expected %zd from C header, got %zd from PyObject",
11887 module_name, class_name, size, basicsize);
11888 if (PyErr_WarnEx(NULL, warning, 0) < 0)
goto bad;
11890 return (PyTypeObject *)result;
11892 Py_XDECREF(result);
11898 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list,
int level) {
11899 PyObject *empty_list = 0;
11900 PyObject *module = 0;
11901 PyObject *global_dict = 0;
11902 PyObject *empty_dict = 0;
11904 #if PY_MAJOR_VERSION < 3
11905 PyObject *py_import;
11906 py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
11913 empty_list = PyList_New(0);
11918 global_dict = PyModule_GetDict(__pyx_m);
11921 empty_dict = PyDict_New();
11925 #if PY_MAJOR_VERSION >= 3
11927 if ((1) && (strchr(__Pyx_MODULE_NAME,
'.'))) {
11928 module = PyImport_ImportModuleLevelObject(
11929 name, global_dict, empty_dict, list, 1);
11931 if (!PyErr_ExceptionMatches(PyExc_ImportError))
11940 #if PY_MAJOR_VERSION < 3
11941 PyObject *py_level = PyInt_FromLong(level);
11944 module = PyObject_CallFunctionObjArgs(py_import,
11945 name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
11946 Py_DECREF(py_level);
11948 module = PyImport_ImportModuleLevelObject(
11949 name, global_dict, empty_dict, list, level);
11954 #if PY_MAJOR_VERSION < 3
11955 Py_XDECREF(py_import);
11957 Py_XDECREF(empty_list);
11958 Py_XDECREF(empty_dict);
11963 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
11964 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
11965 PyObject *dict = Py_TYPE(obj)->tp_dict;
11966 return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
11968 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
11969 PyObject **dictptr = NULL;
11970 Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
11972 #if CYTHON_COMPILING_IN_CPYTHON
11973 dictptr = (likely(offset > 0)) ? (PyObject **) ((
char *)obj + offset) : _PyObject_GetDictPtr(obj);
11975 dictptr = _PyObject_GetDictPtr(obj);
11978 return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
11980 static CYTHON_INLINE
int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
11981 PyObject *dict = Py_TYPE(obj)->tp_dict;
11982 if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
11984 return obj_dict_version == __Pyx_get_object_dict_version(obj);
11989 #ifndef CYTHON_CLINE_IN_TRACEBACK
11990 static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate,
int c_line) {
11991 PyObject *use_cline;
11992 PyObject *ptype, *pvalue, *ptraceback;
11993 #if CYTHON_COMPILING_IN_CPYTHON
11994 PyObject **cython_runtime_dict;
11996 if (unlikely(!__pyx_cython_runtime)) {
11999 __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
12000 #if CYTHON_COMPILING_IN_CPYTHON
12001 cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
12002 if (likely(cython_runtime_dict)) {
12003 __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
12004 use_cline, *cython_runtime_dict,
12005 __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
12009 PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
12010 if (use_cline_obj) {
12011 use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
12012 Py_DECREF(use_cline_obj);
12020 (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
12022 else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
12025 __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
12031 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries,
int count,
int code_line) {
12032 int start = 0, mid = 0, end = count - 1;
12033 if (end >= 0 && code_line > entries[end].code_line) {
12036 while (start < end) {
12037 mid = start + (end - start) / 2;
12038 if (code_line < entries[mid].code_line) {
12040 }
else if (code_line > entries[mid].code_line) {
12046 if (code_line <= entries[mid].code_line) {
12052 static PyCodeObject *__pyx_find_code_object(
int code_line) {
12053 PyCodeObject* code_object;
12055 if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
12058 pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
12059 if (unlikely(
pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[
pos].code_line != code_line)) {
12062 code_object = __pyx_code_cache.entries[
pos].code_object;
12063 Py_INCREF(code_object);
12064 return code_object;
12066 static void __pyx_insert_code_object(
int code_line, PyCodeObject* code_object) {
12068 __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
12069 if (unlikely(!code_line)) {
12072 if (unlikely(!entries)) {
12073 entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*
sizeof(__Pyx_CodeObjectCacheEntry));
12074 if (likely(entries)) {
12075 __pyx_code_cache.entries = entries;
12076 __pyx_code_cache.max_count = 64;
12077 __pyx_code_cache.count = 1;
12078 entries[0].code_line = code_line;
12079 entries[0].code_object = code_object;
12080 Py_INCREF(code_object);
12084 pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
12085 if ((
pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[
pos].code_line == code_line)) {
12086 PyCodeObject* tmp = entries[
pos].code_object;
12087 entries[
pos].code_object = code_object;
12091 if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
12092 int new_max = __pyx_code_cache.max_count + 64;
12093 entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
12094 __pyx_code_cache.entries, ((
size_t)new_max) *
sizeof(__Pyx_CodeObjectCacheEntry));
12095 if (unlikely(!entries)) {
12098 __pyx_code_cache.entries = entries;
12099 __pyx_code_cache.max_count = new_max;
12101 for (i=__pyx_code_cache.count; i>
pos; i--) {
12102 entries[i] = entries[i-1];
12104 entries[
pos].code_line = code_line;
12105 entries[
pos].code_object = code_object;
12106 __pyx_code_cache.count++;
12107 Py_INCREF(code_object);
12111 #include "compile.h"
12112 #include "frameobject.h"
12113 #include "traceback.h"
12114 #if PY_VERSION_HEX >= 0x030b00a6
12115 #ifndef Py_BUILD_CORE
12116 #define Py_BUILD_CORE 1
12118 #include "internal/pycore_frame.h"
12120 static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
12121 const char *funcname,
int c_line,
12122 int py_line,
const char *filename) {
12123 PyCodeObject *py_code = NULL;
12124 PyObject *py_funcname = NULL;
12125 #if PY_MAJOR_VERSION < 3
12126 PyObject *py_srcfile = NULL;
12127 py_srcfile = PyString_FromString(filename);
12128 if (!py_srcfile)
goto bad;
12131 #if PY_MAJOR_VERSION < 3
12132 py_funcname = PyString_FromFormat(
"%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
12133 if (!py_funcname)
goto bad;
12135 py_funcname = PyUnicode_FromFormat(
"%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
12136 if (!py_funcname)
goto bad;
12137 funcname = PyUnicode_AsUTF8(py_funcname);
12138 if (!funcname)
goto bad;
12142 #if PY_MAJOR_VERSION < 3
12143 py_funcname = PyString_FromString(funcname);
12144 if (!py_funcname)
goto bad;
12147 #if PY_MAJOR_VERSION < 3
12148 py_code = __Pyx_PyCode_New(
12165 Py_DECREF(py_srcfile);
12167 py_code = PyCode_NewEmpty(filename, funcname, py_line);
12169 Py_XDECREF(py_funcname);
12172 Py_XDECREF(py_funcname);
12173 #if PY_MAJOR_VERSION < 3
12174 Py_XDECREF(py_srcfile);
12178 static void __Pyx_AddTraceback(
const char *funcname,
int c_line,
12179 int py_line,
const char *filename) {
12180 PyCodeObject *py_code = 0;
12181 PyFrameObject *py_frame = 0;
12182 PyThreadState *tstate = __Pyx_PyThreadState_Current;
12183 PyObject *ptype, *pvalue, *ptraceback;
12185 c_line = __Pyx_CLineForTraceback(tstate, c_line);
12187 py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
12189 __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
12190 py_code = __Pyx_CreateCodeObjectForTraceback(
12191 funcname, c_line, py_line, filename);
12196 Py_XDECREF(pvalue);
12197 Py_XDECREF(ptraceback);
12200 __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
12201 __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
12203 py_frame = PyFrame_New(
12209 if (!py_frame)
goto bad;
12210 __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
12211 PyTraceBack_Here(py_frame);
12213 Py_XDECREF(py_code);
12214 Py_XDECREF(py_frame);
12218 #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
12219 __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
12220 #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
12221 __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
12222 #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
12224 func_type value = func_value;\
12225 if (sizeof(target_type) < sizeof(func_type)) {\
12226 if (unlikely(value != (func_type) (target_type) value)) {\
12227 func_type zero = 0;\
12228 if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
12229 return (target_type) -1;\
12230 if (is_unsigned && unlikely(value < zero))\
12231 goto raise_neg_overflow;\
12233 goto raise_overflow;\
12236 return (target_type) value;\
12240 #if CYTHON_CCOMPLEX
12242 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(
float x,
float y) {
12243 return ::std::complex< float >(x, y);
12246 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(
float x,
float y) {
12247 return x + y*(__pyx_t_float_complex)_Complex_I;
12251 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(
float x,
float y) {
12252 __pyx_t_float_complex
z;
12260 #if CYTHON_CCOMPLEX
12262 static CYTHON_INLINE
int __Pyx_c_eq_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
12263 return (a.real == b.real) && (a.imag == b.imag);
12265 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
12266 __pyx_t_float_complex
z;
12267 z.real = a.real + b.real;
12268 z.imag = a.imag + b.imag;
12271 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
12272 __pyx_t_float_complex
z;
12273 z.real = a.real - b.real;
12274 z.imag = a.imag - b.imag;
12277 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
12278 __pyx_t_float_complex
z;
12279 z.real = a.real * b.real - a.imag * b.imag;
12280 z.imag = a.real * b.imag + a.imag * b.real;
12284 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
12286 return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
12287 }
else if (fabsf(b.real) >= fabsf(b.imag)) {
12288 if (b.real == 0 && b.imag == 0) {
12289 return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.imag);
12291 float r = b.imag / b.real;
12292 float s = (float)(1.0) / (b.real + b.imag *
r);
12293 return __pyx_t_float_complex_from_parts(
12294 (a.real + a.imag *
r) *
s, (a.imag - a.real *
r) *
s);
12297 float r = b.real / b.imag;
12298 float s = (float)(1.0) / (b.imag + b.real *
r);
12299 return __pyx_t_float_complex_from_parts(
12300 (a.real *
r + a.imag) *
s, (a.imag *
r - a.real) *
s);
12304 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
12306 return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
12308 float denom = b.real * b.real + b.imag * b.imag;
12309 return __pyx_t_float_complex_from_parts(
12310 (a.real * b.real + a.imag * b.imag) / denom,
12311 (a.imag * b.real - a.real * b.imag) / denom);
12315 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex a) {
12316 __pyx_t_float_complex
z;
12321 static CYTHON_INLINE
int __Pyx_c_is_zero_float(__pyx_t_float_complex a) {
12322 return (a.real == 0) && (a.imag == 0);
12324 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex a) {
12325 __pyx_t_float_complex
z;
12331 static CYTHON_INLINE
float __Pyx_c_abs_float(__pyx_t_float_complex
z) {
12332 #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
12333 return sqrtf(
z.real*
z.real +
z.imag*
z.imag);
12335 return hypotf(
z.real,
z.imag);
12338 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
12339 __pyx_t_float_complex
z;
12340 float r, lnr, theta, z_r, z_theta;
12341 if (b.imag == 0 && b.real == (
int)b.real) {
12343 float denom = a.real * a.real + a.imag * a.imag;
12344 a.real = a.real / denom;
12345 a.imag = -a.imag / denom;
12348 switch ((
int)b.real) {
12356 return __Pyx_c_prod_float(a, a);
12358 z = __Pyx_c_prod_float(a, a);
12359 return __Pyx_c_prod_float(
z, a);
12361 z = __Pyx_c_prod_float(a, a);
12362 return __Pyx_c_prod_float(
z,
z);
12368 }
else if (b.imag == 0) {
12369 z.real = powf(a.real, b.real);
12372 }
else if (a.real > 0) {
12377 theta = atan2f(0.0, -1.0);
12380 r = __Pyx_c_abs_float(a);
12381 theta = atan2f(a.imag, a.real);
12384 z_r = expf(lnr * b.real - theta * b.imag);
12385 z_theta = theta * b.real + lnr * b.imag;
12386 z.real = z_r * cosf(z_theta);
12387 z.imag = z_r * sinf(z_theta);
12394 #if CYTHON_CCOMPLEX
12396 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(
double x,
double y) {
12397 return ::std::complex< double >(x, y);
12400 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(
double x,
double y) {
12401 return x + y*(__pyx_t_double_complex)_Complex_I;
12405 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(
double x,
double y) {
12406 __pyx_t_double_complex
z;
12414 #if CYTHON_CCOMPLEX
12416 static CYTHON_INLINE
int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
12417 return (a.real == b.real) && (a.imag == b.imag);
12419 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
12420 __pyx_t_double_complex
z;
12421 z.real = a.real + b.real;
12422 z.imag = a.imag + b.imag;
12425 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
12426 __pyx_t_double_complex
z;
12427 z.real = a.real - b.real;
12428 z.imag = a.imag - b.imag;
12431 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
12432 __pyx_t_double_complex
z;
12433 z.real = a.real * b.real - a.imag * b.imag;
12434 z.imag = a.real * b.imag + a.imag * b.real;
12438 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
12440 return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
12441 }
else if (fabs(b.real) >= fabs(b.imag)) {
12442 if (b.real == 0 && b.imag == 0) {
12443 return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.imag);
12445 double r = b.imag / b.real;
12446 double s = (double)(1.0) / (b.real + b.imag *
r);
12447 return __pyx_t_double_complex_from_parts(
12448 (a.real + a.imag *
r) *
s, (a.imag - a.real *
r) *
s);
12451 double r = b.real / b.imag;
12452 double s = (double)(1.0) / (b.imag + b.real *
r);
12453 return __pyx_t_double_complex_from_parts(
12454 (a.real *
r + a.imag) *
s, (a.imag *
r - a.real) *
s);
12458 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
12460 return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
12462 double denom = b.real * b.real + b.imag * b.imag;
12463 return __pyx_t_double_complex_from_parts(
12464 (a.real * b.real + a.imag * b.imag) / denom,
12465 (a.imag * b.real - a.real * b.imag) / denom);
12469 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex a) {
12470 __pyx_t_double_complex
z;
12475 static CYTHON_INLINE
int __Pyx_c_is_zero_double(__pyx_t_double_complex a) {
12476 return (a.real == 0) && (a.imag == 0);
12478 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex a) {
12479 __pyx_t_double_complex
z;
12485 static CYTHON_INLINE
double __Pyx_c_abs_double(__pyx_t_double_complex
z) {
12486 #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
12487 return sqrt(
z.real*
z.real +
z.imag*
z.imag);
12489 return hypot(
z.real,
z.imag);
12492 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
12493 __pyx_t_double_complex
z;
12494 double r, lnr, theta, z_r, z_theta;
12495 if (b.imag == 0 && b.real == (
int)b.real) {
12497 double denom = a.real * a.real + a.imag * a.imag;
12498 a.real = a.real / denom;
12499 a.imag = -a.imag / denom;
12502 switch ((
int)b.real) {
12510 return __Pyx_c_prod_double(a, a);
12512 z = __Pyx_c_prod_double(a, a);
12513 return __Pyx_c_prod_double(
z, a);
12515 z = __Pyx_c_prod_double(a, a);
12516 return __Pyx_c_prod_double(
z,
z);
12522 }
else if (b.imag == 0) {
12523 z.real = pow(a.real, b.real);
12526 }
else if (a.real > 0) {
12531 theta = atan2(0.0, -1.0);
12534 r = __Pyx_c_abs_double(a);
12535 theta = atan2(a.imag, a.real);
12538 z_r = exp(lnr * b.real - theta * b.imag);
12539 z_theta = theta * b.real + lnr * b.imag;
12540 z.real = z_r * cos(z_theta);
12541 z.imag = z_r * sin(z_theta);
12548 static CYTHON_INLINE
int __Pyx_PyInt_As_int(PyObject *x) {
12549 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
12550 #pragma GCC diagnostic push
12551 #pragma GCC diagnostic ignored "-Wconversion"
12553 const int neg_one = (int) -1, const_zero = (
int) 0;
12554 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
12555 #pragma GCC diagnostic pop
12557 const int is_unsigned = neg_one > const_zero;
12558 #if PY_MAJOR_VERSION < 3
12559 if (likely(PyInt_Check(x))) {
12560 if (
sizeof(
int) <
sizeof(long)) {
12561 __PYX_VERIFY_RETURN_INT(
int,
long, PyInt_AS_LONG(x))
12563 long val = PyInt_AS_LONG(x);
12564 if (is_unsigned && unlikely(val < 0)) {
12565 goto raise_neg_overflow;
12571 if (likely(PyLong_Check(x))) {
12573 #if CYTHON_USE_PYLONG_INTERNALS
12574 const digit* digits = ((PyLongObject*)x)->ob_digit;
12575 switch (Py_SIZE(x)) {
12576 case 0:
return (
int) 0;
12577 case 1: __PYX_VERIFY_RETURN_INT(
int, digit, digits[0])
12579 if (8 *
sizeof(
int) > 1 * PyLong_SHIFT) {
12580 if (8 *
sizeof(
unsigned long) > 2 * PyLong_SHIFT) {
12581 __PYX_VERIFY_RETURN_INT(
int,
unsigned long, (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
12582 }
else if (8 *
sizeof(
int) >= 2 * PyLong_SHIFT) {
12583 return (
int) (((((int)digits[1]) << PyLong_SHIFT) | (
int)digits[0]));
12588 if (8 *
sizeof(
int) > 2 * PyLong_SHIFT) {
12589 if (8 *
sizeof(
unsigned long) > 3 * PyLong_SHIFT) {
12590 __PYX_VERIFY_RETURN_INT(
int,
unsigned long, (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
12591 }
else if (8 *
sizeof(
int) >= 3 * PyLong_SHIFT) {
12592 return (
int) (((((((int)digits[2]) << PyLong_SHIFT) | (
int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
12597 if (8 *
sizeof(
int) > 3 * PyLong_SHIFT) {
12598 if (8 *
sizeof(
unsigned long) > 4 * PyLong_SHIFT) {
12599 __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])))
12600 }
else if (8 *
sizeof(
int) >= 4 * PyLong_SHIFT) {
12601 return (
int) (((((((((int)digits[3]) << PyLong_SHIFT) | (
int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (
int)digits[0]));
12607 #if CYTHON_COMPILING_IN_CPYTHON
12608 if (unlikely(Py_SIZE(x) < 0)) {
12609 goto raise_neg_overflow;
12613 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
12614 if (unlikely(result < 0))
12616 if (unlikely(result == 1))
12617 goto raise_neg_overflow;
12620 if (
sizeof(
int) <=
sizeof(
unsigned long)) {
12621 __PYX_VERIFY_RETURN_INT_EXC(
int,
unsigned long, PyLong_AsUnsignedLong(x))
12622 #ifdef HAVE_LONG_LONG
12623 }
else if (
sizeof(
int) <=
sizeof(
unsigned PY_LONG_LONG)) {
12624 __PYX_VERIFY_RETURN_INT_EXC(
int,
unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
12628 #if CYTHON_USE_PYLONG_INTERNALS
12629 const digit* digits = ((PyLongObject*)x)->ob_digit;
12630 switch (Py_SIZE(x)) {
12631 case 0:
return (
int) 0;
12632 case -1: __PYX_VERIFY_RETURN_INT(
int, sdigit, (sdigit) (-(sdigit)digits[0]))
12633 case 1: __PYX_VERIFY_RETURN_INT(
int, digit, +digits[0])
12635 if (8 *
sizeof(
int) - 1 > 1 * PyLong_SHIFT) {
12636 if (8 *
sizeof(
unsigned long) > 2 * PyLong_SHIFT) {
12637 __PYX_VERIFY_RETURN_INT(
int,
long, -(
long) (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
12638 }
else if (8 *
sizeof(
int) - 1 > 2 * PyLong_SHIFT) {
12639 return (
int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (
int)digits[0])));
12644 if (8 *
sizeof(
int) > 1 * PyLong_SHIFT) {
12645 if (8 *
sizeof(
unsigned long) > 2 * PyLong_SHIFT) {
12646 __PYX_VERIFY_RETURN_INT(
int,
unsigned long, (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
12647 }
else if (8 *
sizeof(
int) - 1 > 2 * PyLong_SHIFT) {
12648 return (
int) ((((((int)digits[1]) << PyLong_SHIFT) | (
int)digits[0])));
12653 if (8 *
sizeof(
int) - 1 > 2 * PyLong_SHIFT) {
12654 if (8 *
sizeof(
unsigned long) > 3 * PyLong_SHIFT) {
12655 __PYX_VERIFY_RETURN_INT(
int,
long, -(
long) (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
12656 }
else if (8 *
sizeof(
int) - 1 > 3 * PyLong_SHIFT) {
12657 return (
int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (
int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
12662 if (8 *
sizeof(
int) > 2 * PyLong_SHIFT) {
12663 if (8 *
sizeof(
unsigned long) > 3 * PyLong_SHIFT) {
12664 __PYX_VERIFY_RETURN_INT(
int,
unsigned long, (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
12665 }
else if (8 *
sizeof(
int) - 1 > 3 * PyLong_SHIFT) {
12666 return (
int) ((((((((int)digits[2]) << PyLong_SHIFT) | (
int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
12671 if (8 *
sizeof(
int) - 1 > 3 * PyLong_SHIFT) {
12672 if (8 *
sizeof(
unsigned long) > 4 * PyLong_SHIFT) {
12673 __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])))
12674 }
else if (8 *
sizeof(
int) - 1 > 4 * PyLong_SHIFT) {
12675 return (
int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (
int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (
int)digits[0])));
12680 if (8 *
sizeof(
int) > 3 * PyLong_SHIFT) {
12681 if (8 *
sizeof(
unsigned long) > 4 * PyLong_SHIFT) {
12682 __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])))
12683 }
else if (8 *
sizeof(
int) - 1 > 4 * PyLong_SHIFT) {
12684 return (
int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (
int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (
int)digits[0])));
12690 if (
sizeof(
int) <=
sizeof(long)) {
12691 __PYX_VERIFY_RETURN_INT_EXC(
int,
long, PyLong_AsLong(x))
12692 #ifdef HAVE_LONG_LONG
12693 }
else if (
sizeof(
int) <=
sizeof(PY_LONG_LONG)) {
12694 __PYX_VERIFY_RETURN_INT_EXC(
int, PY_LONG_LONG, PyLong_AsLongLong(x))
12699 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
12700 PyErr_SetString(PyExc_RuntimeError,
12701 "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
12704 PyObject *
v = __Pyx_PyNumber_IntOrLong(x);
12705 #if PY_MAJOR_VERSION < 3
12706 if (likely(
v) && !PyLong_Check(
v)) {
12708 v = PyNumber_Long(tmp);
12713 int one = 1;
int is_little = (int)*(
unsigned char *)&one;
12714 unsigned char *bytes = (
unsigned char *)&val;
12715 int ret = _PyLong_AsByteArray((PyLongObject *)
v,
12716 bytes,
sizeof(val),
12717 is_little, !is_unsigned);
12727 PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
12728 if (!tmp)
return (
int) -1;
12729 val = __Pyx_PyInt_As_int(tmp);
12734 PyErr_SetString(PyExc_OverflowError,
12735 "value too large to convert to int");
12737 raise_neg_overflow:
12738 PyErr_SetString(PyExc_OverflowError,
12739 "can't convert negative value to int");
12744 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(
int value) {
12745 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
12746 #pragma GCC diagnostic push
12747 #pragma GCC diagnostic ignored "-Wconversion"
12749 const int neg_one = (int) -1, const_zero = (
int) 0;
12750 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
12751 #pragma GCC diagnostic pop
12753 const int is_unsigned = neg_one > const_zero;
12755 if (
sizeof(
int) <
sizeof(long)) {
12756 return PyInt_FromLong((
long) value);
12757 }
else if (
sizeof(
int) <=
sizeof(
unsigned long)) {
12758 return PyLong_FromUnsignedLong((
unsigned long) value);
12759 #ifdef HAVE_LONG_LONG
12760 }
else if (
sizeof(
int) <=
sizeof(
unsigned PY_LONG_LONG)) {
12761 return PyLong_FromUnsignedLongLong((
unsigned PY_LONG_LONG) value);
12765 if (
sizeof(
int) <=
sizeof(
long)) {
12766 return PyInt_FromLong((
long) value);
12767 #ifdef HAVE_LONG_LONG
12768 }
else if (
sizeof(
int) <=
sizeof(PY_LONG_LONG)) {
12769 return PyLong_FromLongLong((PY_LONG_LONG) value);
12774 int one = 1;
int little = (int)*(
unsigned char *)&one;
12775 unsigned char *bytes = (
unsigned char *)&value;
12776 return _PyLong_FromByteArray(bytes,
sizeof(
int),
12777 little, !is_unsigned);
12782 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(
long value) {
12783 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
12784 #pragma GCC diagnostic push
12785 #pragma GCC diagnostic ignored "-Wconversion"
12787 const long neg_one = (long) -1, const_zero = (
long) 0;
12788 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
12789 #pragma GCC diagnostic pop
12791 const int is_unsigned = neg_one > const_zero;
12793 if (
sizeof(
long) <
sizeof(long)) {
12794 return PyInt_FromLong((
long) value);
12795 }
else if (
sizeof(
long) <=
sizeof(
unsigned long)) {
12796 return PyLong_FromUnsignedLong((
unsigned long) value);
12797 #ifdef HAVE_LONG_LONG
12798 }
else if (
sizeof(
long) <=
sizeof(
unsigned PY_LONG_LONG)) {
12799 return PyLong_FromUnsignedLongLong((
unsigned PY_LONG_LONG) value);
12803 if (
sizeof(
long) <=
sizeof(
long)) {
12804 return PyInt_FromLong((
long) value);
12805 #ifdef HAVE_LONG_LONG
12806 }
else if (
sizeof(
long) <=
sizeof(PY_LONG_LONG)) {
12807 return PyLong_FromLongLong((PY_LONG_LONG) value);
12812 int one = 1;
int little = (int)*(
unsigned char *)&one;
12813 unsigned char *bytes = (
unsigned char *)&value;
12814 return _PyLong_FromByteArray(bytes,
sizeof(
long),
12815 little, !is_unsigned);
12820 static CYTHON_INLINE
long __Pyx_PyInt_As_long(PyObject *x) {
12821 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
12822 #pragma GCC diagnostic push
12823 #pragma GCC diagnostic ignored "-Wconversion"
12825 const long neg_one = (long) -1, const_zero = (
long) 0;
12826 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
12827 #pragma GCC diagnostic pop
12829 const int is_unsigned = neg_one > const_zero;
12830 #if PY_MAJOR_VERSION < 3
12831 if (likely(PyInt_Check(x))) {
12832 if (
sizeof(
long) <
sizeof(long)) {
12833 __PYX_VERIFY_RETURN_INT(
long,
long, PyInt_AS_LONG(x))
12835 long val = PyInt_AS_LONG(x);
12836 if (is_unsigned && unlikely(val < 0)) {
12837 goto raise_neg_overflow;
12843 if (likely(PyLong_Check(x))) {
12845 #if CYTHON_USE_PYLONG_INTERNALS
12846 const digit* digits = ((PyLongObject*)x)->ob_digit;
12847 switch (Py_SIZE(x)) {
12848 case 0:
return (
long) 0;
12849 case 1: __PYX_VERIFY_RETURN_INT(
long, digit, digits[0])
12851 if (8 *
sizeof(
long) > 1 * PyLong_SHIFT) {
12852 if (8 *
sizeof(
unsigned long) > 2 * PyLong_SHIFT) {
12853 __PYX_VERIFY_RETURN_INT(
long,
unsigned long, (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
12854 }
else if (8 *
sizeof(
long) >= 2 * PyLong_SHIFT) {
12855 return (
long) (((((long)digits[1]) << PyLong_SHIFT) | (
long)digits[0]));
12860 if (8 *
sizeof(
long) > 2 * PyLong_SHIFT) {
12861 if (8 *
sizeof(
unsigned long) > 3 * PyLong_SHIFT) {
12862 __PYX_VERIFY_RETURN_INT(
long,
unsigned long, (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
12863 }
else if (8 *
sizeof(
long) >= 3 * PyLong_SHIFT) {
12864 return (
long) (((((((long)digits[2]) << PyLong_SHIFT) | (
long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
12869 if (8 *
sizeof(
long) > 3 * PyLong_SHIFT) {
12870 if (8 *
sizeof(
unsigned long) > 4 * PyLong_SHIFT) {
12871 __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])))
12872 }
else if (8 *
sizeof(
long) >= 4 * PyLong_SHIFT) {
12873 return (
long) (((((((((long)digits[3]) << PyLong_SHIFT) | (
long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (
long)digits[0]));
12879 #if CYTHON_COMPILING_IN_CPYTHON
12880 if (unlikely(Py_SIZE(x) < 0)) {
12881 goto raise_neg_overflow;
12885 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
12886 if (unlikely(result < 0))
12888 if (unlikely(result == 1))
12889 goto raise_neg_overflow;
12892 if (
sizeof(
long) <=
sizeof(
unsigned long)) {
12893 __PYX_VERIFY_RETURN_INT_EXC(
long,
unsigned long, PyLong_AsUnsignedLong(x))
12894 #ifdef HAVE_LONG_LONG
12895 }
else if (
sizeof(
long) <=
sizeof(
unsigned PY_LONG_LONG)) {
12896 __PYX_VERIFY_RETURN_INT_EXC(
long,
unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
12900 #if CYTHON_USE_PYLONG_INTERNALS
12901 const digit* digits = ((PyLongObject*)x)->ob_digit;
12902 switch (Py_SIZE(x)) {
12903 case 0:
return (
long) 0;
12904 case -1: __PYX_VERIFY_RETURN_INT(
long, sdigit, (sdigit) (-(sdigit)digits[0]))
12905 case 1: __PYX_VERIFY_RETURN_INT(
long, digit, +digits[0])
12907 if (8 *
sizeof(
long) - 1 > 1 * PyLong_SHIFT) {
12908 if (8 *
sizeof(
unsigned long) > 2 * PyLong_SHIFT) {
12909 __PYX_VERIFY_RETURN_INT(
long,
long, -(
long) (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
12910 }
else if (8 *
sizeof(
long) - 1 > 2 * PyLong_SHIFT) {
12911 return (
long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (
long)digits[0])));
12916 if (8 *
sizeof(
long) > 1 * PyLong_SHIFT) {
12917 if (8 *
sizeof(
unsigned long) > 2 * PyLong_SHIFT) {
12918 __PYX_VERIFY_RETURN_INT(
long,
unsigned long, (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
12919 }
else if (8 *
sizeof(
long) - 1 > 2 * PyLong_SHIFT) {
12920 return (
long) ((((((long)digits[1]) << PyLong_SHIFT) | (
long)digits[0])));
12925 if (8 *
sizeof(
long) - 1 > 2 * PyLong_SHIFT) {
12926 if (8 *
sizeof(
unsigned long) > 3 * PyLong_SHIFT) {
12927 __PYX_VERIFY_RETURN_INT(
long,
long, -(
long) (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
12928 }
else if (8 *
sizeof(
long) - 1 > 3 * PyLong_SHIFT) {
12929 return (
long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (
long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
12934 if (8 *
sizeof(
long) > 2 * PyLong_SHIFT) {
12935 if (8 *
sizeof(
unsigned long) > 3 * PyLong_SHIFT) {
12936 __PYX_VERIFY_RETURN_INT(
long,
unsigned long, (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
12937 }
else if (8 *
sizeof(
long) - 1 > 3 * PyLong_SHIFT) {
12938 return (
long) ((((((((long)digits[2]) << PyLong_SHIFT) | (
long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
12943 if (8 *
sizeof(
long) - 1 > 3 * PyLong_SHIFT) {
12944 if (8 *
sizeof(
unsigned long) > 4 * PyLong_SHIFT) {
12945 __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])))
12946 }
else if (8 *
sizeof(
long) - 1 > 4 * PyLong_SHIFT) {
12947 return (
long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (
long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (
long)digits[0])));
12952 if (8 *
sizeof(
long) > 3 * PyLong_SHIFT) {
12953 if (8 *
sizeof(
unsigned long) > 4 * PyLong_SHIFT) {
12954 __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])))
12955 }
else if (8 *
sizeof(
long) - 1 > 4 * PyLong_SHIFT) {
12956 return (
long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (
long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (
long)digits[0])));
12962 if (
sizeof(
long) <=
sizeof(long)) {
12963 __PYX_VERIFY_RETURN_INT_EXC(
long,
long, PyLong_AsLong(x))
12964 #ifdef HAVE_LONG_LONG
12965 }
else if (
sizeof(
long) <=
sizeof(PY_LONG_LONG)) {
12966 __PYX_VERIFY_RETURN_INT_EXC(
long, PY_LONG_LONG, PyLong_AsLongLong(x))
12971 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
12972 PyErr_SetString(PyExc_RuntimeError,
12973 "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
12976 PyObject *
v = __Pyx_PyNumber_IntOrLong(x);
12977 #if PY_MAJOR_VERSION < 3
12978 if (likely(
v) && !PyLong_Check(
v)) {
12980 v = PyNumber_Long(tmp);
12985 int one = 1;
int is_little = (int)*(
unsigned char *)&one;
12986 unsigned char *bytes = (
unsigned char *)&val;
12987 int ret = _PyLong_AsByteArray((PyLongObject *)
v,
12988 bytes,
sizeof(val),
12989 is_little, !is_unsigned);
12999 PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
13000 if (!tmp)
return (
long) -1;
13001 val = __Pyx_PyInt_As_long(tmp);
13006 PyErr_SetString(PyExc_OverflowError,
13007 "value too large to convert to long");
13009 raise_neg_overflow:
13010 PyErr_SetString(PyExc_OverflowError,
13011 "can't convert negative value to long");
13016 #if CYTHON_COMPILING_IN_CPYTHON
13017 static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
13023 return b == &PyBaseObject_Type;
13025 static CYTHON_INLINE
int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
13027 if (a == b)
return 1;
13031 n = PyTuple_GET_SIZE(mro);
13032 for (i = 0; i <
n; i++) {
13033 if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
13038 return __Pyx_InBases(a, b);
13040 #if PY_MAJOR_VERSION == 2
13041 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
13042 PyObject *exception, *value, *tb;
13044 __Pyx_PyThreadState_declare
13045 __Pyx_PyThreadState_assign
13046 __Pyx_ErrFetch(&exception, &value, &tb);
13047 res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
13048 if (unlikely(res == -1)) {
13049 PyErr_WriteUnraisable(err);
13053 res = PyObject_IsSubclass(err, exc_type2);
13054 if (unlikely(res == -1)) {
13055 PyErr_WriteUnraisable(err);
13059 __Pyx_ErrRestore(exception, value, tb);
13063 static CYTHON_INLINE
int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
13064 int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
13066 res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
13071 static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
13073 assert(PyExceptionClass_Check(exc_type));
13074 n = PyTuple_GET_SIZE(tuple);
13075 #if PY_MAJOR_VERSION >= 3
13076 for (i=0; i<
n; i++) {
13077 if (exc_type == PyTuple_GET_ITEM(tuple, i))
return 1;
13080 for (i=0; i<
n; i++) {
13081 PyObject *t = PyTuple_GET_ITEM(tuple, i);
13082 #if PY_MAJOR_VERSION < 3
13083 if (likely(exc_type == t))
return 1;
13085 if (likely(PyExceptionClass_Check(t))) {
13086 if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t))
return 1;
13092 static CYTHON_INLINE
int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
13093 if (likely(err == exc_type))
return 1;
13094 if (likely(PyExceptionClass_Check(err))) {
13095 if (likely(PyExceptionClass_Check(exc_type))) {
13096 return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
13097 }
else if (likely(PyTuple_Check(exc_type))) {
13098 return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
13102 return PyErr_GivenExceptionMatches(err, exc_type);
13104 static CYTHON_INLINE
int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
13105 assert(PyExceptionClass_Check(exc_type1));
13106 assert(PyExceptionClass_Check(exc_type2));
13107 if (likely(err == exc_type1 || err == exc_type2))
return 1;
13108 if (likely(PyExceptionClass_Check(err))) {
13109 return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
13111 return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
13116 static int __Pyx_check_binary_version(
void) {
13118 int same=1, i, found_dot;
13119 const char* rt_from_call = Py_GetVersion();
13120 PyOS_snprintf(ctversion, 5,
"%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
13122 for (i = 0; i < 4; i++) {
13123 if (!ctversion[i]) {
13124 same = (rt_from_call[i] <
'0' || rt_from_call[i] >
'9');
13127 if (rt_from_call[i] != ctversion[i]) {
13133 char rtversion[5] = {
'\0'};
13135 for (i=0; i<4; ++i) {
13136 if (rt_from_call[i] ==
'.') {
13137 if (found_dot)
break;
13139 }
else if (rt_from_call[i] <
'0' || rt_from_call[i] >
'9') {
13142 rtversion[i] = rt_from_call[i];
13144 PyOS_snprintf(message,
sizeof(message),
13145 "compiletime version %s of module '%.100s' "
13146 "does not match runtime version %s",
13147 ctversion, __Pyx_MODULE_NAME, rtversion);
13148 return PyErr_WarnEx(NULL, message, 1);
13154 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
13156 #if PY_MAJOR_VERSION < 3
13157 if (t->is_unicode) {
13158 *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
13159 }
else if (t->intern) {
13160 *t->p = PyString_InternFromString(t->s);
13162 *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
13165 if (t->is_unicode | t->is_str) {
13167 *t->p = PyUnicode_InternFromString(t->s);
13168 }
else if (t->encoding) {
13169 *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
13171 *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
13174 *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
13179 if (PyObject_Hash(*t->p) == -1)
13186 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(
const char* c_str) {
13187 return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
13189 static CYTHON_INLINE
const char* __Pyx_PyObject_AsString(PyObject* o) {
13191 return __Pyx_PyObject_AsStringAndSize(o, &ignore);
13193 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
13194 #if !CYTHON_PEP393_ENABLED
13195 static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
13197 PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
13198 if (!defenc)
return NULL;
13199 defenc_c = PyBytes_AS_STRING(defenc);
13200 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
13202 char* end = defenc_c + PyBytes_GET_SIZE(defenc);
13204 for (
c = defenc_c;
c < end;
c++) {
13205 if ((
unsigned char) (*
c) >= 128) {
13206 PyUnicode_AsASCIIString(o);
13212 *length = PyBytes_GET_SIZE(defenc);
13216 static CYTHON_INLINE
const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
13217 if (unlikely(__Pyx_PyUnicode_READY(o) == -1))
return NULL;
13218 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
13219 if (likely(PyUnicode_IS_ASCII(o))) {
13220 *length = PyUnicode_GET_LENGTH(o);
13221 return PyUnicode_AsUTF8(o);
13223 PyUnicode_AsASCIIString(o);
13227 return PyUnicode_AsUTF8AndSize(o, length);
13232 static CYTHON_INLINE
const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
13233 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
13235 #
if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
13236 __Pyx_sys_getdefaultencoding_not_ascii &&
13238 PyUnicode_Check(o)) {
13239 return __Pyx_PyUnicode_AsStringAndSize(o, length);
13242 #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
13243 if (PyByteArray_Check(o)) {
13244 *length = PyByteArray_GET_SIZE(o);
13245 return PyByteArray_AS_STRING(o);
13250 int r = PyBytes_AsStringAndSize(o, &result, length);
13251 if (unlikely(
r < 0)) {
13258 static CYTHON_INLINE
int __Pyx_PyObject_IsTrue(PyObject* x) {
13259 int is_true = x == Py_True;
13260 if (is_true | (x == Py_False) | (x == Py_None))
return is_true;
13261 else return PyObject_IsTrue(x);
13263 static CYTHON_INLINE
int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
13265 if (unlikely(!x))
return -1;
13266 retval = __Pyx_PyObject_IsTrue(x);
13270 static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result,
const char* type_name) {
13271 #if PY_MAJOR_VERSION >= 3
13272 if (PyLong_Check(result)) {
13273 if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
13274 "__int__ returned non-int (type %.200s). "
13275 "The ability to return an instance of a strict subclass of int "
13276 "is deprecated, and may be removed in a future version of Python.",
13277 Py_TYPE(result)->tp_name)) {
13284 PyErr_Format(PyExc_TypeError,
13285 "__%.4s__ returned non-%.4s (type %.200s)",
13286 type_name, type_name, Py_TYPE(result)->tp_name);
13290 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
13291 #if CYTHON_USE_TYPE_SLOTS
13292 PyNumberMethods *m;
13294 const char *name = NULL;
13295 PyObject *res = NULL;
13296 #if PY_MAJOR_VERSION < 3
13297 if (likely(PyInt_Check(x) || PyLong_Check(x)))
13299 if (likely(PyLong_Check(x)))
13301 return __Pyx_NewRef(x);
13302 #if CYTHON_USE_TYPE_SLOTS
13303 m = Py_TYPE(x)->tp_as_number;
13304 #if PY_MAJOR_VERSION < 3
13305 if (m && m->nb_int) {
13307 res = m->nb_int(x);
13309 else if (m && m->nb_long) {
13311 res = m->nb_long(x);
13314 if (likely(m && m->nb_int)) {
13316 res = m->nb_int(x);
13320 if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
13321 res = PyNumber_Int(x);
13325 #if PY_MAJOR_VERSION < 3
13326 if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
13328 if (unlikely(!PyLong_CheckExact(res))) {
13330 return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
13333 else if (!PyErr_Occurred()) {
13334 PyErr_SetString(PyExc_TypeError,
13335 "an integer is required");
13339 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
13342 #if PY_MAJOR_VERSION < 3
13343 if (likely(PyInt_CheckExact(b))) {
13344 if (
sizeof(Py_ssize_t) >=
sizeof(
long))
13345 return PyInt_AS_LONG(b);
13347 return PyInt_AsSsize_t(b);
13350 if (likely(PyLong_CheckExact(b))) {
13351 #if CYTHON_USE_PYLONG_INTERNALS
13352 const digit* digits = ((PyLongObject*)b)->ob_digit;
13353 const Py_ssize_t size = Py_SIZE(b);
13354 if (likely(__Pyx_sst_abs(size) <= 1)) {
13355 ival = likely(size) ? digits[0] : 0;
13356 if (size == -1) ival = -ival;
13361 if (8 *
sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
13362 return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (
size_t)digits[0]));
13366 if (8 *
sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
13367 return -(Py_ssize_t) (((((
size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
13371 if (8 *
sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
13372 return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (
size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
13376 if (8 *
sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
13377 return -(Py_ssize_t) (((((((
size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (
size_t)digits[0]));
13381 if (8 *
sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
13382 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]));
13386 if (8 *
sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
13387 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]));
13393 return PyLong_AsSsize_t(b);
13395 x = PyNumber_Index(b);
13397 ival = PyInt_AsSsize_t(x);
13401 static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
13402 if (
sizeof(Py_hash_t) ==
sizeof(Py_ssize_t)) {
13403 return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
13404 #if PY_MAJOR_VERSION < 3
13405 }
else if (likely(PyInt_CheckExact(o))) {
13406 return PyInt_AS_LONG(o);
13411 x = PyNumber_Index(o);
13413 ival = PyInt_AsLong(x);
13418 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(
long b) {
13419 return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
13421 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(
size_t ival) {
13422 return PyInt_FromSize_t(ival);