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_arg