proteus 1.9.0
C/C++/Fortran libraries
Loading...
Searching...
No Matches
cTwophaseDarcyCoefficients.cpp
Go to the documentation of this file.
1/* Generated by Cython 3.3.0 */
2
3/* BEGIN: Cython Metadata
4{
5 "distutils": {
6 "define_macros": [
7 [
8 "PROTEUS_SUPERLU_H",
9 "\"slu_ddefs.h\""
10 ],
11 [
12 "CMRVEC_BOUNDS_CHECK",
13 1
14 ],
15 [
16 "MV_VECTOR_BOUNDS_CHECK",
17 1
18 ],
19 [
20 "PETSCVEC_BOUNDS_CHECK",
21 1
22 ],
23 [
24 "F77_POST_UNDERSCORE",
25 1
26 ],
27 [
28 "USE_BLAS",
29 1
30 ]
31 ],
32 "depends": [
33 "/work/cekees/miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/_core/include/numpy/arrayobject.h",
34 "/work/cekees/miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/_core/include/numpy/arrayscalars.h",
35 "/work/cekees/miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/_core/include/numpy/ndarrayobject.h",
36 "/work/cekees/miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/_core/include/numpy/ndarraytypes.h",
37 "/work/cekees/miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/_core/include/numpy/ufuncobject.h",
38 "proteus/SubsurfaceTransportCoefficients.h",
39 "proteus/densityRelations.h",
40 "proteus/pskRelations.h",
41 "proteus/pskRelations.pxd",
42 "proteus/twophaseDarcyCoefficients.h",
43 "proteus/twophaseDarcyCoefficients.pxd"
44 ],
45 "extra_compile_args": [
46 "-Wall",
47 "-DF77_POST_UNDERSCORE",
48 "-DUSE_BLAS",
49 "-DCMRVEC_BOUNDS_CHECK",
50 "-DMV_VECTOR_BOUNDS_CHECK",
51 "-DPETSC_INCLUDE_AS_C",
52 "-DPETSC_SKIP_COMPLEX"
53 ],
54 "extra_link_args": [
55 "-Wl,-rpath,/work/cekees/miniforge3/envs/proteus-jupyterhub/lib",
56 "-Wl,-rpath,/work/cekees/miniforge3/envs/proteus-jupyterhub/lib",
57 "-Wl,-rpath,/work/cekees/miniforge3/envs/proteus-jupyterhub/lib",
58 "-Wl,-rpath,/work/cekees/miniforge3/envs/proteus-jupyterhub/lib",
59 "-Wl,-rpath,/work/cekees/miniforge3/envs/proteus-jupyterhub/lib",
60 "-Wl,-rpath,/work/cekees/miniforge3/envs/proteus-jupyterhub/lib",
61 "-Wl,-rpath,/work/cekees/miniforge3/envs/proteus-jupyterhub/lib",
62 "-Wl,-rpath,/work/cekees/miniforge3/envs/proteus-jupyterhub/lib"
63 ],
64 "include_dirs": [
65 "proteus",
66 "/work/cekees/miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/_core/include",
67 "/work/cekees/miniforge3/envs/proteus-jupyterhub/include",
68 "/work/cekees/miniforge3/envs/proteus-jupyterhub/lib",
69 "/work/cekees/miniforge3/envs/proteus-jupyterhub/lib/mpi4py",
70 "/work/cekees/miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages"
71 ],
72 "language": "c++",
73 "libraries": [
74 "hdf5",
75 "stdc++",
76 "m",
77 "petsc",
78 "mpi",
79 "hdf5"
80 ],
81 "library_dirs": [
82 "/work/cekees/miniforge3/envs/proteus-jupyterhub/lib"
83 ],
84 "name": "cTwophaseDarcyCoefficients",
85 "sources": [
86 "proteus/cTwophaseDarcyCoefficients.pyx",
87 "proteus/SubsurfaceTransportCoefficients.cpp"
88 ]
89 },
90 "module_name": "cTwophaseDarcyCoefficients"
91}
92END: Cython Metadata */
93
94#ifndef PY_SSIZE_T_CLEAN
95#define PY_SSIZE_T_CLEAN
96#endif /* PY_SSIZE_T_CLEAN */
97/* InitLimitedAPI */
98#if defined(Py_LIMITED_API)
99 #if !defined(CYTHON_LIMITED_API)
100 #define CYTHON_LIMITED_API 1
101 #endif
102#elif defined(CYTHON_LIMITED_API)
103 #ifdef _MSC_VER
104 #pragma message ("Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.")
105 #else
106 #warning Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.
107 #endif
108#endif
109
110#include "Python.h"
111#ifndef Py_PYTHON_H
112 #error Python headers needed to compile C extensions, please install development version of Python.
113#elif PY_VERSION_HEX < 0x03090000
114 #error Cython requires Python 3.9+.
115#elif defined(Py_LIMITED_API) && (Py_LIMITED_API & 0xFFFF0000) > (PY_VERSION_HEX & 0xFFFF0000)
116 #error 'Py_LIMITED_API' can only select past Python X.Y versions, not future ones.
117#else
118#define __PYX_ABI_VERSION "3_3_0"
119#define CYTHON_HEX_VERSION 0x030300F0
120#define CYTHON_FUTURE_DIVISION 1
121/* CModulePreamble */
122#include <stddef.h>
123#ifndef offsetof
124 #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
125#endif
126#if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS)
127 #ifndef __stdcall
128 #define __stdcall
129 #endif
130 #ifndef __cdecl
131 #define __cdecl
132 #endif
133 #ifndef __fastcall
134 #define __fastcall
135 #endif
136#endif
137#ifdef __has_builtin
138 #define __Pyx_has_cbuiltin(name) __has_builtin(name)
139#else
140 #define __Pyx_has_cbuiltin(name) (0)
141#endif
142#ifndef DL_IMPORT
143 #define DL_IMPORT(t) t
144#endif
145#ifndef DL_EXPORT
146 #define DL_EXPORT(t) t
147#endif
148#define __PYX_COMMA ,
149#ifndef PY_LONG_LONG
150 #define PY_LONG_LONG LONG_LONG
151#endif
152#ifndef Py_HUGE_VAL
153 #define Py_HUGE_VAL HUGE_VAL
154#endif
155#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX
156#if defined(CYTHON_LIMITED_API)
157 #ifdef Py_LIMITED_API
158 #undef __PYX_LIMITED_VERSION_HEX
159 #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API
160 #if Py_LIMITED_API < 0x03090000
161 #error "Cython 3.3 requires the Python Limited API version to be 3.9 or greater."
162 #endif
163 #endif
164 #if defined(GRAALVM_PYTHON) || defined(PYPY_VERSION)
165 #ifdef _MSC_VER
166 #pragma message ("Py_LIMITED_API is defined on PyPy or GraalPy. This takes precedence over Cython's specialized\
167 code for PyPy and GraalPy and is unlikely to work.")
168 #else
169 #warning "Py_LIMITED_API is defined on PyPy or GraalPy. This takes precedence over Cython's specialized\
170 code for PyPy and GraalPy and is unlikely to work."
171 #endif
172 #endif
173 #define CYTHON_COMPILING_IN_PYPY 0
174 #define CYTHON_COMPILING_IN_CPYTHON 0
175 #define CYTHON_COMPILING_IN_LIMITED_API 1
176 #define CYTHON_COMPILING_IN_GRAAL 0
177 #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
178 #undef CYTHON_USE_TYPE_SLOTS
179 #define CYTHON_USE_TYPE_SLOTS 0
180 #undef CYTHON_USE_TYPE_SPECS
181 #define CYTHON_USE_TYPE_SPECS 1
182 #undef CYTHON_USE_PYTYPE_LOOKUP
183 #define CYTHON_USE_PYTYPE_LOOKUP 0
184 #undef CYTHON_USE_PYLIST_INTERNALS
185 #define CYTHON_USE_PYLIST_INTERNALS 0
186 #undef CYTHON_USE_UNICODE_INTERNALS
187 #define CYTHON_USE_UNICODE_INTERNALS 0
188 #ifndef CYTHON_USE_UNICODE_WRITER
189 #define CYTHON_USE_UNICODE_WRITER 0
190 #endif
191 #undef CYTHON_USE_PYLONG_INTERNALS
192 #define CYTHON_USE_PYLONG_INTERNALS 0
193 #ifndef CYTHON_AVOID_BORROWED_REFS
194 #define CYTHON_AVOID_BORROWED_REFS 0
195 #endif
196 #ifndef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
197 #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0
198 #endif
199 #undef CYTHON_ASSUME_SAFE_MACROS
200 #define CYTHON_ASSUME_SAFE_MACROS 0
201 #undef CYTHON_ASSUME_SAFE_SIZE
202 #define CYTHON_ASSUME_SAFE_SIZE 0
203 #undef CYTHON_UNPACK_METHODS
204 #define CYTHON_UNPACK_METHODS 0
205 #undef CYTHON_FAST_THREAD_STATE
206 #define CYTHON_FAST_THREAD_STATE 0
207 #undef CYTHON_FAST_GIL
208 #define CYTHON_FAST_GIL 0
209 #undef CYTHON_VECTORCALL
210 #define CYTHON_VECTORCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000)
211 #ifndef CYTHON_VECTORCALL_TPNEW
212 #define CYTHON_VECTORCALL_TPNEW (CYTHON_VECTORCALL && __PYX_LIMITED_VERSION_HEX >= 0x030E0000)
213 #endif
214 #ifndef CYTHON_PEP487_INIT_SUBCLASS
215 #define CYTHON_PEP487_INIT_SUBCLASS 1
216 #endif
217 #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
218 #define CYTHON_PEP489_MULTI_PHASE_INIT 1
219 #endif
220 #ifndef CYTHON_USE_MODULE_STATE
221 #define CYTHON_USE_MODULE_STATE 0
222 #endif
223 #undef CYTHON_USE_SYS_MONITORING
224 #define CYTHON_USE_SYS_MONITORING 0
225 #ifndef CYTHON_USE_TP_FINALIZE
226 #define CYTHON_USE_TP_FINALIZE (__PYX_LIMITED_VERSION_HEX >= 0x030F0000 && PY_VERSION_HEX > 0x030F00A8)
227 #endif
228 #ifndef CYTHON_USE_AM_SEND
229 #define CYTHON_USE_AM_SEND (__PYX_LIMITED_VERSION_HEX >= 0x030A0000)
230 #endif
231 #undef CYTHON_USE_DICT_VERSIONS
232 #define CYTHON_USE_DICT_VERSIONS 0
233 #undef CYTHON_USE_EXC_INFO_STACK
234 #define CYTHON_USE_EXC_INFO_STACK 0
235 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
236 #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
237 #endif
238 #ifndef CYTHON_USE_OWN_PREP_RERAISE_STAR
239 #define CYTHON_USE_OWN_PREP_RERAISE_STAR 1
240 #endif
241 #ifndef CYTHON_USE_FREELISTS
242 #define CYTHON_USE_FREELISTS 1
243 #endif
244 #undef CYTHON_IMMORTAL_CONSTANTS
245 #define CYTHON_IMMORTAL_CONSTANTS 0
246 #if __PYX_LIMITED_VERSION_HEX < 0x030E0000
247 #undef CYTHON_OPAQUE_OBJECTS
248 #define CYTHON_OPAQUE_OBJECTS 0
249 #elif !defined(CYTHON_OPAQUE_OBJECTS)
250 #define CYTHON_OPAQUE_OBJECTS (__PYX_LIMITED_VERSION_HEX >= 0x030F0000)
251 #endif
252#elif defined(GRAALVM_PYTHON)
253 /* For very preliminary testing purposes. Most variables are set the same as PyPy.
254 The existence of this section does not imply that anything works or is even tested */
255 #define CYTHON_COMPILING_IN_PYPY 0
256 #define CYTHON_COMPILING_IN_CPYTHON 0
257 #define CYTHON_COMPILING_IN_LIMITED_API 0
258 #define CYTHON_COMPILING_IN_GRAAL 1
259 #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
260 #ifndef CYTHON_USE_TYPE_SLOTS
261 #define CYTHON_USE_TYPE_SLOTS 0
262 #endif
263 #undef CYTHON_USE_TYPE_SPECS
264 #define CYTHON_USE_TYPE_SPECS 0
265 #undef CYTHON_USE_PYTYPE_LOOKUP
266 #define CYTHON_USE_PYTYPE_LOOKUP 0
267 #undef CYTHON_USE_PYLIST_INTERNALS
268 #define CYTHON_USE_PYLIST_INTERNALS 0
269 #undef CYTHON_USE_UNICODE_INTERNALS
270 #define CYTHON_USE_UNICODE_INTERNALS 0
271 #undef CYTHON_USE_UNICODE_WRITER
272 #define CYTHON_USE_UNICODE_WRITER 0
273 #undef CYTHON_USE_PYLONG_INTERNALS
274 #define CYTHON_USE_PYLONG_INTERNALS 0
275 #undef CYTHON_AVOID_BORROWED_REFS
276 #define CYTHON_AVOID_BORROWED_REFS 1
277 #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
278 #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0
279 #undef CYTHON_ASSUME_SAFE_MACROS
280 #define CYTHON_ASSUME_SAFE_MACROS 0
281 #undef CYTHON_ASSUME_SAFE_SIZE
282 #define CYTHON_ASSUME_SAFE_SIZE 0
283 #undef CYTHON_UNPACK_METHODS
284 #define CYTHON_UNPACK_METHODS 0
285 #undef CYTHON_FAST_THREAD_STATE
286 #define CYTHON_FAST_THREAD_STATE 0
287 #undef CYTHON_FAST_GIL
288 #define CYTHON_FAST_GIL 0
289 #ifndef CYTHON_VECTORCALL
290 #define CYTHON_VECTORCALL 1
291 #endif
292 #if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX < 0x030E0000
293 #undef CYTHON_VECTORCALL_TPNEW
294 #define CYTHON_VECTORCALL_TPNEW 0
295 #elif !defined(CYTHON_VECTORCALL_TPNEW)
296 #define CYTHON_VECTORCALL_TPNEW CYTHON_VECTORCALL
297 #endif
298 #ifndef CYTHON_PEP487_INIT_SUBCLASS
299 #define CYTHON_PEP487_INIT_SUBCLASS 1
300 #endif
301 #undef CYTHON_PEP489_MULTI_PHASE_INIT
302 #define CYTHON_PEP489_MULTI_PHASE_INIT 1
303 #undef CYTHON_USE_MODULE_STATE
304 #define CYTHON_USE_MODULE_STATE 0
305 #undef CYTHON_USE_SYS_MONITORING
306 #define CYTHON_USE_SYS_MONITORING 0
307 #undef CYTHON_USE_TP_FINALIZE
308 #define CYTHON_USE_TP_FINALIZE 0
309 #undef CYTHON_USE_AM_SEND
310 #define CYTHON_USE_AM_SEND 0
311 #undef CYTHON_USE_DICT_VERSIONS
312 #define CYTHON_USE_DICT_VERSIONS 0
313 #undef CYTHON_USE_EXC_INFO_STACK
314 #define CYTHON_USE_EXC_INFO_STACK 1
315 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
316 #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
317 #endif
318 #ifndef CYTHON_USE_OWN_PREP_RERAISE_STAR
319 #define CYTHON_USE_OWN_PREP_RERAISE_STAR 1
320 #endif
321 #undef CYTHON_USE_FREELISTS
322 #define CYTHON_USE_FREELISTS 0
323 #undef CYTHON_IMMORTAL_CONSTANTS
324 #define CYTHON_IMMORTAL_CONSTANTS 0
325 #undef CYTHON_OPAQUE_OBJECTS
326 #define CYTHON_OPAQUE_OBJECTS 0
327#elif defined(PYPY_VERSION)
328 #define CYTHON_COMPILING_IN_PYPY 1
329 #define CYTHON_COMPILING_IN_CPYTHON 0
330 #define CYTHON_COMPILING_IN_LIMITED_API 0
331 #define CYTHON_COMPILING_IN_GRAAL 0
332 #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
333 #undef CYTHON_USE_TYPE_SLOTS
334 #define CYTHON_USE_TYPE_SLOTS 1
335 #ifndef CYTHON_USE_TYPE_SPECS
336 #define CYTHON_USE_TYPE_SPECS 0
337 #endif
338 #undef CYTHON_USE_PYTYPE_LOOKUP
339 #define CYTHON_USE_PYTYPE_LOOKUP 0
340 #undef CYTHON_USE_PYLIST_INTERNALS
341 #define CYTHON_USE_PYLIST_INTERNALS 0
342 #undef CYTHON_USE_UNICODE_INTERNALS
343 #define CYTHON_USE_UNICODE_INTERNALS 0
344 #undef CYTHON_USE_UNICODE_WRITER
345 #define CYTHON_USE_UNICODE_WRITER 0
346 #undef CYTHON_USE_PYLONG_INTERNALS
347 #define CYTHON_USE_PYLONG_INTERNALS 0
348 #undef CYTHON_AVOID_BORROWED_REFS
349 #define CYTHON_AVOID_BORROWED_REFS 1
350 #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
351 #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1
352 #undef CYTHON_ASSUME_SAFE_MACROS
353 #define CYTHON_ASSUME_SAFE_MACROS 0
354 #ifndef CYTHON_ASSUME_SAFE_SIZE
355 #define CYTHON_ASSUME_SAFE_SIZE 1
356 #endif
357 #undef CYTHON_UNPACK_METHODS
358 #define CYTHON_UNPACK_METHODS 0
359 #undef CYTHON_FAST_THREAD_STATE
360 #define CYTHON_FAST_THREAD_STATE 0
361 #undef CYTHON_FAST_GIL
362 #define CYTHON_FAST_GIL 0
363 #ifndef CYTHON_VECTORCALL
364 #define CYTHON_VECTORCALL 1
365 #endif
366 #if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX < 0x030E0000
367 #undef CYTHON_VECTORCALL_TPNEW
368 #define CYTHON_VECTORCALL_TPNEW 0
369 #elif !defined(CYTHON_VECTORCALL_TPNEW)
370 #define CYTHON_VECTORCALL_TPNEW (PYPY_VERSION_NUM >= 0x07030800 && CYTHON_VECTORCALL)
371 #endif
372 #ifndef CYTHON_PEP487_INIT_SUBCLASS
373 #define CYTHON_PEP487_INIT_SUBCLASS 1
374 #endif
375 #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
376 #define CYTHON_PEP489_MULTI_PHASE_INIT 1
377 #endif
378 #undef CYTHON_USE_MODULE_STATE
379 #define CYTHON_USE_MODULE_STATE 0
380 #undef CYTHON_USE_SYS_MONITORING
381 #define CYTHON_USE_SYS_MONITORING 0
382 #ifndef CYTHON_USE_TP_FINALIZE
383 #define CYTHON_USE_TP_FINALIZE (PYPY_VERSION_NUM >= 0x07030C00)
384 #endif
385 #undef CYTHON_USE_AM_SEND
386 #define CYTHON_USE_AM_SEND 0
387 #undef CYTHON_USE_DICT_VERSIONS
388 #define CYTHON_USE_DICT_VERSIONS 0
389 #undef CYTHON_USE_EXC_INFO_STACK
390 #define CYTHON_USE_EXC_INFO_STACK 0
391 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
392 #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_NUM >= 0x07031100)
393 #endif
394 #ifndef CYTHON_USE_OWN_PREP_RERAISE_STAR
395 #define CYTHON_USE_OWN_PREP_RERAISE_STAR 1
396 #endif
397 #undef CYTHON_USE_FREELISTS
398 #define CYTHON_USE_FREELISTS 0
399 #undef CYTHON_IMMORTAL_CONSTANTS
400 #define CYTHON_IMMORTAL_CONSTANTS 0
401 #undef CYTHON_OPAQUE_OBJECTS
402 #define CYTHON_OPAQUE_OBJECTS 0
403#else
404 #define CYTHON_COMPILING_IN_PYPY 0
405 #define CYTHON_COMPILING_IN_CPYTHON 1
406 #define CYTHON_COMPILING_IN_LIMITED_API 0
407 #define CYTHON_COMPILING_IN_GRAAL 0
408 #ifdef Py_GIL_DISABLED
409 #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 1
410 #else
411 #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
412 #endif
413 #if PY_VERSION_HEX < 0x030A0000
414 #undef CYTHON_USE_TYPE_SLOTS
415 #define CYTHON_USE_TYPE_SLOTS 1
416 #elif !defined(CYTHON_USE_TYPE_SLOTS)
417 #define CYTHON_USE_TYPE_SLOTS 1
418 #endif
419 #ifndef CYTHON_USE_TYPE_SPECS
420 #define CYTHON_USE_TYPE_SPECS 0
421 #endif
422 #ifndef CYTHON_USE_PYTYPE_LOOKUP
423 #define CYTHON_USE_PYTYPE_LOOKUP 1
424 #endif
425 #ifndef CYTHON_USE_PYLONG_INTERNALS
426 #define CYTHON_USE_PYLONG_INTERNALS 1
427 #endif
428 #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
429 #undef CYTHON_USE_PYLIST_INTERNALS
430 #define CYTHON_USE_PYLIST_INTERNALS 0
431 #elif !defined(CYTHON_USE_PYLIST_INTERNALS)
432 #define CYTHON_USE_PYLIST_INTERNALS 1
433 #endif
434 #ifndef CYTHON_USE_UNICODE_INTERNALS
435 #define CYTHON_USE_UNICODE_INTERNALS 1
436 #endif
437 #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING || PY_VERSION_HEX >= 0x030B00A2
438 #undef CYTHON_USE_UNICODE_WRITER
439 #define CYTHON_USE_UNICODE_WRITER 0
440 #elif !defined(CYTHON_USE_UNICODE_WRITER)
441 #define CYTHON_USE_UNICODE_WRITER 1
442 #endif
443 #ifndef CYTHON_AVOID_BORROWED_REFS
444 #define CYTHON_AVOID_BORROWED_REFS 0
445 #endif
446 #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
447 #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
448 #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1
449 #elif !defined(CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS)
450 #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0
451 #endif
452 #ifndef CYTHON_ASSUME_SAFE_MACROS
453 #define CYTHON_ASSUME_SAFE_MACROS 1
454 #endif
455 #ifndef CYTHON_ASSUME_SAFE_SIZE
456 #define CYTHON_ASSUME_SAFE_SIZE 1
457 #endif
458 #ifndef CYTHON_UNPACK_METHODS
459 #define CYTHON_UNPACK_METHODS 1
460 #endif
461 #ifndef CYTHON_FAST_THREAD_STATE
462 #define CYTHON_FAST_THREAD_STATE 1
463 #endif
464 #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
465 #undef CYTHON_FAST_GIL
466 #define CYTHON_FAST_GIL 0
467 #elif !defined(CYTHON_FAST_GIL)
468 #define CYTHON_FAST_GIL (PY_VERSION_HEX < 0x030C00A6)
469 #endif
470 #ifndef CYTHON_VECTORCALL
471 #define CYTHON_VECTORCALL 1
472 #endif
473 #if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX < 0x030E0000
474 #undef CYTHON_VECTORCALL_TPNEW
475 #define CYTHON_VECTORCALL_TPNEW 0
476 #elif !defined(CYTHON_VECTORCALL_TPNEW)
477 #define CYTHON_VECTORCALL_TPNEW CYTHON_VECTORCALL
478 #endif
479 #ifndef CYTHON_PEP487_INIT_SUBCLASS
480 #define CYTHON_PEP487_INIT_SUBCLASS 1
481 #endif
482 #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
483 #define CYTHON_PEP489_MULTI_PHASE_INIT 1
484 #endif
485 #ifndef CYTHON_USE_MODULE_STATE
486 #define CYTHON_USE_MODULE_STATE 0
487 #endif
488 #ifndef CYTHON_USE_SYS_MONITORING
489 #define CYTHON_USE_SYS_MONITORING (PY_VERSION_HEX >= 0x030d00B1)
490 #endif
491 #ifndef CYTHON_USE_TP_FINALIZE
492 #define CYTHON_USE_TP_FINALIZE 1
493 #endif
494 #ifndef CYTHON_USE_AM_SEND
495 #define CYTHON_USE_AM_SEND 1
496 #endif
497 #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
498 #undef CYTHON_USE_DICT_VERSIONS
499 #define CYTHON_USE_DICT_VERSIONS 0
500 #elif !defined(CYTHON_USE_DICT_VERSIONS)
501 #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5 && !CYTHON_USE_MODULE_STATE)
502 #endif
503 #ifndef CYTHON_USE_EXC_INFO_STACK
504 #define CYTHON_USE_EXC_INFO_STACK 1
505 #endif
506 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
507 #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
508 #endif
509 #ifndef CYTHON_USE_OWN_PREP_RERAISE_STAR
510 #define CYTHON_USE_OWN_PREP_RERAISE_STAR (PY_VERSION_HEX < 0x030C00B2)
511 #endif
512 #ifndef CYTHON_USE_FREELISTS
513 #define CYTHON_USE_FREELISTS (!CYTHON_COMPILING_IN_CPYTHON_FREETHREADING)
514 #endif
515 #if defined(CYTHON_IMMORTAL_CONSTANTS) && PY_VERSION_HEX < 0x030C0000
516 #undef CYTHON_IMMORTAL_CONSTANTS
517 #define CYTHON_IMMORTAL_CONSTANTS 0 // definitely won't work
518 #elif !defined(CYTHON_IMMORTAL_CONSTANTS)
519 #define CYTHON_IMMORTAL_CONSTANTS (PY_VERSION_HEX >= 0x030C0000 && !CYTHON_USE_MODULE_STATE && CYTHON_COMPILING_IN_CPYTHON_FREETHREADING)
520 #endif
521 #ifndef CYTHON_OPAQUE_OBJECTS
522 #define CYTHON_OPAQUE_OBJECTS 0
523 #endif
524#endif
525#if CYTHON_USE_PYLONG_INTERNALS
526 #undef SHIFT
527 #undef BASE
528 #undef MASK
529 #ifdef SIZEOF_VOID_P
530 enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
531 #endif
532#endif
533#ifndef __has_attribute
534 #define __has_attribute(x) 0
535#endif
536#ifndef __has_cpp_attribute
537 #define __has_cpp_attribute(x) 0
538#endif
539#ifndef CYTHON_RESTRICT
540 #if defined(__GNUC__)
541 #define CYTHON_RESTRICT __restrict__
542 #elif defined(_MSC_VER) && _MSC_VER >= 1400
543 #define CYTHON_RESTRICT __restrict
544 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
545 #define CYTHON_RESTRICT restrict
546 #else
547 #define CYTHON_RESTRICT
548 #endif
549#endif
550#ifndef CYTHON_UNUSED
551 #if defined(__cplusplus)
552 /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17
553 * but leads to warnings with -pedantic, since it is a C++17 feature */
554 #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
555 #if __has_cpp_attribute(maybe_unused)
556 #define CYTHON_UNUSED [[maybe_unused]]
557 #endif
558 #endif
559 #elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
560 #define CYTHON_UNUSED [[maybe_unused]]
561 #endif
562#endif
563#ifndef CYTHON_UNUSED
564# if defined(__GNUC__)
565# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
566# define CYTHON_UNUSED __attribute__ ((__unused__))
567# else
568# define CYTHON_UNUSED
569# endif
570# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
571# define CYTHON_UNUSED __attribute__ ((__unused__))
572# else
573# define CYTHON_UNUSED
574# endif
575#endif
576#ifndef CYTHON_UNUSED_VAR
577# if defined(__cplusplus)
578 template<class T> void CYTHON_UNUSED_VAR( const T& ) { }
579# else
580# define CYTHON_UNUSED_VAR(x) (void)(x)
581# endif
582#endif
583#ifndef CYTHON_MAYBE_UNUSED_VAR
584 #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x)
585#endif
586#ifndef CYTHON_NCP_UNUSED
587# if CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
588# define CYTHON_NCP_UNUSED
589# else
590# define CYTHON_NCP_UNUSED CYTHON_UNUSED
591# endif
592#endif
593#ifndef CYTHON_USE_CPP_STD_MOVE
594 #if defined(__cplusplus) && (\
595 __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600))
596 #define CYTHON_USE_CPP_STD_MOVE 1
597 #else
598 #define CYTHON_USE_CPP_STD_MOVE 0
599 #endif
600#endif
601#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
602#include <stdint.h>
603typedef uintptr_t __pyx_uintptr_t;
604#ifndef CYTHON_FALLTHROUGH
605 #if defined(__cplusplus)
606 /* for clang __has_cpp_attribute(fallthrough) is true even before C++17
607 * but leads to warnings with -pedantic, since it is a C++17 feature */
608 #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
609 #if __has_cpp_attribute(fallthrough)
610 #define CYTHON_FALLTHROUGH [[fallthrough]]
611 #endif
612 #endif
613 #ifndef CYTHON_FALLTHROUGH
614 #if __has_cpp_attribute(clang::fallthrough)
615 #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
616 #elif __has_cpp_attribute(gnu::fallthrough)
617 #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
618 #endif
619 #endif
620 #endif
621 #ifndef CYTHON_FALLTHROUGH
622 #if __has_attribute(fallthrough)
623 #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
624 #else
625 #define CYTHON_FALLTHROUGH
626 #endif
627 #endif
628 #if defined(__clang__) && defined(__apple_build_version__)
629 #if __apple_build_version__ < 7000000
630 #undef CYTHON_FALLTHROUGH
631 #define CYTHON_FALLTHROUGH
632 #endif
633 #endif
634#endif
635#ifdef Py_UNREACHABLE
636 #define __Pyx_UNREACHABLE() Py_UNREACHABLE()
637#elif __Pyx_has_cbuiltin(__builtin_unreachable)
638 #define __Pyx_UNREACHABLE() __builtin_unreachable()
639#elif defined(__clang__) || defined(__INTEL_COMPILER) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)))
640 #define __Pyx_UNREACHABLE() __builtin_unreachable()
641#elif defined(_MSC_VER)
642 #define __Pyx_UNREACHABLE() __assume(0)
643#else
644 #define __Pyx_UNREACHABLE() Py_FatalError("Unreachable C code path reached")
645#endif
646#ifndef Py_UNREACHABLE
647 #define Py_UNREACHABLE() __Pyx_UNREACHABLE()
648#endif
649#ifdef __cplusplus
650 template <typename T>
651 struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);};
652 #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL<type>::value)
653#else
654 #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0)
655#endif
656#if CYTHON_COMPILING_IN_PYPY == 1
657 #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX < 0x030A0000)
658#else
659 #define __PYX_NEED_TP_PRINT_SLOT 0
660#endif
661#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer))
662#if __PYX_LIMITED_VERSION_HEX < 0x030C0000
663#define __Pyx_PyErr_FetchException(petype, peval, petb) PyErr_Fetch(petype, peval, petb)
664#define __Pyx_PyErr_RestoreException(etype, eval, etb) PyErr_Restore(etype, eval, etb)
665#else
666#define __Pyx_PyErr_FetchException(petype, peval, petb) *(petype)=NULL; *(peval)=PyErr_GetRaisedException(); *(petb)=NULL
667#define __Pyx_PyErr_RestoreException(etype, eval, etb) PyErr_SetRaisedException(eval)
668#endif
669
670/* CppInitCode */
671#ifndef __cplusplus
672 #error "Cython files generated with the C++ option must be compiled with a C++ compiler."
673#endif
674#ifndef CYTHON_INLINE
675 #if defined(__clang__)
676 #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
677 #else
678 #define CYTHON_INLINE inline
679 #endif
680#endif
681template<typename T>
682void __Pyx_call_destructor(T& x) {
683 x.~T();
684}
685template<typename T>
686class __Pyx_FakeReference {
687 public:
688 __Pyx_FakeReference() : ptr(NULL) { }
689 __Pyx_FakeReference(const T& ref) : ptr(const_cast<T*>(&ref)) { }
690 T *operator->() { return ptr; }
691 T *operator&() { return ptr; }
692 operator T&() { return *ptr; }
693 template<typename U> bool operator ==(const U& other) const { return *ptr == other; }
694 template<typename U> bool operator !=(const U& other) const { return *ptr != other; }
695 template<typename U> bool operator==(const __Pyx_FakeReference<U>& other) const { return *ptr == *other.ptr; }
696 template<typename U> bool operator!=(const __Pyx_FakeReference<U>& other) const { return *ptr != *other.ptr; }
697 private:
698 T *ptr;
699};
700
701/* PythonCompatibility */
702#define __PYX_BUILD_PY_SSIZE_T "n"
703#define CYTHON_FORMAT_SSIZE_T "z"
704#define __Pyx_BUILTIN_MODULE_NAME "builtins"
705#define __Pyx_DefaultClassType PyType_Type
706#if CYTHON_COMPILING_IN_LIMITED_API
707 #ifndef CO_OPTIMIZED
708 static int CO_OPTIMIZED;
709 #endif
710 #ifndef CO_NEWLOCALS
711 static int CO_NEWLOCALS;
712 #endif
713 #ifndef CO_VARARGS
714 static int CO_VARARGS;
715 #endif
716 #ifndef CO_VARKEYWORDS
717 static int CO_VARKEYWORDS;
718 #endif
719 #ifndef CO_ASYNC_GENERATOR
720 static int CO_ASYNC_GENERATOR;
721 #endif
722 #ifndef CO_GENERATOR
723 static int CO_GENERATOR;
724 #endif
725 #ifndef CO_COROUTINE
726 static int CO_COROUTINE;
727 #endif
728#else
729 #ifndef CO_COROUTINE
730 #define CO_COROUTINE 0x80
731 #endif
732 #ifndef CO_ASYNC_GENERATOR
733 #define CO_ASYNC_GENERATOR 0x200
734 #endif
735#endif
736static int __Pyx_init_co_variables(void);
737#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is)
738 #define __Pyx_Py_Is(x, y) Py_Is(x, y)
739#else
740 #define __Pyx_Py_Is(x, y) ((x) == (y))
741#endif
742#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone)
743 #define __Pyx_Py_IsNone(ob) Py_IsNone(ob)
744#else
745 #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None)
746#endif
747#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue)
748 #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob)
749#else
750 #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True)
751#endif
752#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse)
753 #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob)
754#else
755 #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False)
756#endif
757#define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj))
758#if CYTHON_COMPILING_IN_PYPY
759 #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o)
760#else
761 #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o)
762#endif
763#if CYTHON_COMPILING_IN_LIMITED_API
764static unsigned long __Pyx_Runtime_TPFLAGS_SEQUENCE;
765static unsigned long __Pyx_Runtime_TPFLAGS_MAPPING;
766#else
767#define __Pyx_Runtime_TPFLAGS_SEQUENCE Py_TPFLAGS_SEQUENCE
768#define __Pyx_Runtime_TPFLAGS_MAPPING Py_TPFLAGS_MAPPING
769#endif
770static int __Pyx_init_tpflags_variables(void);
771#ifndef Py_TPFLAGS_HAVE_FINALIZE
772 #define Py_TPFLAGS_HAVE_FINALIZE 0
773#endif
774#ifndef Py_TPFLAGS_SEQUENCE
775 #define Py_TPFLAGS_SEQUENCE (CYTHON_COMPILING_IN_LIMITED_API ? 0 : 1 << 5)
776#endif
777#ifndef Py_TPFLAGS_MAPPING
778 #define Py_TPFLAGS_MAPPING (CYTHON_COMPILING_IN_LIMITED_API ? 0 : 1 << 6)
779#endif
780#ifndef Py_TPFLAGS_IMMUTABLETYPE
781 #define Py_TPFLAGS_IMMUTABLETYPE (1UL << 8)
782#endif
783#ifndef Py_TPFLAGS_DISALLOW_INSTANTIATION
784 #define Py_TPFLAGS_DISALLOW_INSTANTIATION (1UL << 7)
785#endif
786#ifndef METH_STACKLESS
787 #define METH_STACKLESS 0
788#endif
789#if !defined(METH_FASTCALL) || CYTHON_COMPILING_IN_PYPY
790 #ifndef METH_FASTCALL
791 #define METH_FASTCALL 0x80
792 #endif
793 typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
794 typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
795 Py_ssize_t nargs, PyObject *kwnames);
796#else
797 #if PY_VERSION_HEX >= 0x030d00A4
798 # define __Pyx_PyCFunctionFast PyCFunctionFast
799 # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords
800 #else
801 # define __Pyx_PyCFunctionFast _PyCFunctionFast
802 # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
803 #endif
804#endif
805#if CYTHON_VECTORCALL
806 #define __Pyx_METH_FASTCALL METH_FASTCALL
807 #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast
808 #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords
809#else
810 #define __Pyx_METH_FASTCALL METH_VARARGS
811 #define __Pyx_PyCFunction_FastCall PyCFunction
812 #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords
813#endif
814#if CYTHON_VECTORCALL
815 #define __pyx_vectorcallfunc vectorcallfunc
816 #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET
817 #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n))
818#else
819 #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0
820 #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n))
821#endif
822#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func)
823#define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func)
824#if CYTHON_COMPILING_IN_CPYTHON
825#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth)
826#elif !CYTHON_COMPILING_IN_LIMITED_API
827#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func)
828#endif
829#if CYTHON_COMPILING_IN_CPYTHON
830#define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags)
831static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) {
832 return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self;
833}
834#endif
835static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void (*cfunc)(void)) {
836#if CYTHON_COMPILING_IN_LIMITED_API
837 return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
838#else
839 return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
840#endif
841}
842#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc)
843#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
844 #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b))
845#else
846 #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b)
847#endif
848#if CYTHON_COMPILING_IN_PYPY
849 typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *);
850#else
851 #define __Pyx_PyCMethod PyCMethod
852#endif
853#ifndef METH_METHOD
854 #define METH_METHOD 0x200
855#endif
856#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
857 #define PyObject_Malloc(s) PyMem_Malloc(s)
858 #define PyObject_Free(p) PyMem_Free(p)
859 #define PyObject_Realloc(p) PyMem_Realloc(p)
860#endif
861#if CYTHON_COMPILING_IN_LIMITED_API
862 #define __Pyx_PyFrame_SetLineNumber(frame, lineno)
863#elif CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000
864 #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
865 #define __Pyx_PyFrame_SetLineNumber(frame, lineno) GraalPyFrame_SetLineNumber((frame), (lineno))
866#elif CYTHON_COMPILING_IN_GRAAL
867 #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
868 #define __Pyx_PyFrame_SetLineNumber(frame, lineno) _PyFrame_SetLineNumber((frame), (lineno))
869#else
870 #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
871 #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
872#endif
873#if CYTHON_COMPILING_IN_LIMITED_API
874 #define __Pyx_PyThreadState_Current PyThreadState_Get()
875#elif !CYTHON_FAST_THREAD_STATE
876 #define __Pyx_PyThreadState_Current PyThreadState_GET()
877#elif PY_VERSION_HEX >= 0x030d00A1
878 #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked()
879#else
880 #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
881#endif
882#if CYTHON_OPAQUE_OBJECTS && CYTHON_COMPILING_IN_LIMITED_API
883 #define __PYX_SHARED_SIZEOF(T) -((int)sizeof(T))
884 #define __PYX_SHARED_RELATIVE_OFFSET Py_RELATIVE_OFFSET
885 #define CYTHON_OPAQUE_SHARED_TYPES 1
886#else
887 #define __PYX_SHARED_SIZEOF(T) sizeof(T)
888 #define __PYX_SHARED_RELATIVE_OFFSET 0
889 #define CYTHON_OPAQUE_SHARED_TYPES 0
890#endif
891#if CYTHON_USE_MODULE_STATE
892static CYTHON_INLINE void *__Pyx__PyModule_GetState(PyObject *op)
893{
894 void *result;
895 result = PyModule_GetState(op);
896 if (!result)
897 Py_FatalError("Couldn't find the module state");
898 return result;
899}
900#define __Pyx_PyModule_GetState(o) (__pyx_mstatetype *)__Pyx__PyModule_GetState(o)
901#else
902#define __Pyx_PyModule_GetState(op) ((void)op,__pyx_mstate_global)
903#endif
904#define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE((PyObject *) obj), name, func_ctype)
905#define __Pyx_PyObject_TryGetSlot(obj, name, func_ctype) __Pyx_PyType_TryGetSlot(Py_TYPE(obj), name, func_ctype)
906#define __Pyx_PyObject_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(Py_TYPE(obj), sub, name, func_ctype)
907#define __Pyx_PyObject_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSubSlot(Py_TYPE(obj), sub, name, func_ctype)
908#if CYTHON_USE_TYPE_SLOTS
909 #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name)
910 #define __Pyx_PyType_TryGetSlot(type, name, func_ctype) __Pyx_PyType_GetSlot(type, name, func_ctype)
911 #define __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) (((type)->sub) ? ((type)->sub->name) : NULL)
912 #define __Pyx_PyType_TryGetSubSlot(type, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype)
913#else
914 #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name))
915 #define __Pyx_PyType_TryGetSlot(type, name, func_ctype)\
916 ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000 ||\
917 (PyType_GetFlags(type) & Py_TPFLAGS_HEAPTYPE) || __Pyx_get_runtime_version() >= 0x030A0000) ?\
918 __Pyx_PyType_GetSlot(type, name, func_ctype) : NULL)
919 #define __Pyx_PyType_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSlot(obj, name, func_ctype)
920 #define __Pyx_PyType_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSlot(obj, name, func_ctype)
921#endif
922#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
923#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
924#else
925#define __Pyx_PyDict_NewPresized(n) PyDict_New()
926#endif
927#define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
928#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
929#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_UNICODE_INTERNALS
930#define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
931static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) {
932 PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name);
933 if (res == NULL && PyErr_Occurred()) {
934 PyErr_WriteUnraisable(NULL);
935 }
936 return res;
937}
938#elif !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000
939#define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError
940#define __Pyx_PyDict_GetItemStr PyDict_GetItem
941#else
942static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) {
943#if CYTHON_COMPILING_IN_PYPY
944 return PyDict_GetItem(dict, name);
945#else
946 PyDictEntry *ep;
947 PyDictObject *mp = (PyDictObject*) dict;
948 long hash = ((PyStringObject *) name)->ob_shash;
949 assert(hash != -1);
950 ep = (mp->ma_lookup)(mp, name, hash);
951 if (ep == NULL) {
952 return NULL;
953 }
954 return ep->me_value;
955#endif
956}
957#define __Pyx_PyDict_GetItemStr PyDict_GetItem
958#endif
959#if CYTHON_USE_TYPE_SLOTS
960 #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags)
961 #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0)
962#else
963 #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp))
964 #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature)
965#endif
966#define __Pyx_PyObject_GetIterNextFunc(iterator) __Pyx_PyObject_GetSlot(iterator, tp_iternext, iternextfunc)
967#if CYTHON_USE_TYPE_SPECS
968#define __Pyx_PyHeapTypeObject_GC_Del(obj) {\
969 PyTypeObject *type = Py_TYPE((PyObject*)obj);\
970 assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\
971 PyObject_GC_Del(obj);\
972 Py_DECREF(type);\
973}
974#else
975#define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj)
976#endif
977#if CYTHON_COMPILING_IN_LIMITED_API
978 #define __Pyx_PyUnicode_READY(op) (0)
979 #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i)
980 #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U)
981 #define __Pyx_PyUnicode_KIND(u) ((void)u, (0))
982 #define __Pyx_PyUnicode_KIND_04(u) __Pyx_PyUnicode_KIND(u)
983 #define __Pyx_PyUnicode_DATA(u) ((void*)u)
984 #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i))
985 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u))
986#else
987 #if PY_VERSION_HEX >= 0x030C0000
988 #define __Pyx_PyUnicode_READY(op) (0)
989 #else
990 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
991 0 : _PyUnicode_Ready((PyObject *)(op)))
992 #endif
993 #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
994 #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
995 #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u))
996 #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
997 #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
998 #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch)
999 #if PY_VERSION_HEX >= 0x030C0000
1000 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u))
1001 #else
1002 #if CYTHON_COMPILING_IN_CPYTHON
1003 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length))
1004 #else
1005 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
1006 #endif
1007 #endif
1008 static CYTHON_INLINE int __Pyx_PyUnicode_KIND_04(PyObject *o) {
1009 return __Pyx_PyUnicode_KIND(o) - (int) !!PyUnicode_IS_ASCII(o);
1010 }
1011#endif
1012#if CYTHON_COMPILING_IN_PYPY
1013 #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
1014 #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
1015#else
1016 #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
1017 #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
1018 PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
1019#endif
1020#if CYTHON_COMPILING_IN_PYPY
1021 #if !defined(PyUnicode_DecodeUnicodeEscape)
1022 #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors)
1023 #endif
1024 #if !defined(PyUnicode_Contains)
1025 #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
1026 #endif
1027 #if !defined(PyByteArray_Check)
1028 #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
1029 #endif
1030 #if !defined(PyObject_Format)
1031 #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
1032 #endif
1033#endif
1034#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
1035#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
1036 #define __Pyx_PySequence_ListKeepNew(obj)\
1037 (likely(PyList_CheckExact(obj) && PyUnstable_Object_IsUniquelyReferenced(obj)) ? __Pyx_NewRef(obj) : PySequence_List(obj))
1038#elif CYTHON_COMPILING_IN_CPYTHON
1039 #define __Pyx_PySequence_ListKeepNew(obj)\
1040 (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj))
1041#else
1042 #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj)
1043#endif
1044#ifndef PySet_CheckExact
1045 #define PySet_CheckExact(obj) Py_IS_TYPE(obj, &PySet_Type)
1046#endif
1047enum __Pyx_ReferenceSharing {
1048 __Pyx_ReferenceSharing_DefinitelyUnique, // We created it so we know it's unshared - no need to check
1049 __Pyx_ReferenceSharing_OwnStrongReference,
1050 __Pyx_ReferenceSharing_FunctionArgument,
1051 __Pyx_ReferenceSharing_SharedReference, // Never trust it to be unshared because it's a global or similar
1052};
1053#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && PY_VERSION_HEX >= 0x030E0000
1054#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing)\
1055 (sharing == __Pyx_ReferenceSharing_DefinitelyUnique ? 1 :\
1056 (sharing == __Pyx_ReferenceSharing_FunctionArgument ? PyUnstable_Object_IsUniqueReferencedTemporary(o) :\
1057 (sharing == __Pyx_ReferenceSharing_OwnStrongReference ? PyUnstable_Object_IsUniquelyReferenced(o) : 0)))
1058#elif (CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) || CYTHON_COMPILING_IN_LIMITED_API
1059#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)sharing), Py_REFCNT(o) == 1)
1060#else
1061#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)o), ((void)sharing), 0)
1062#endif
1063#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
1064 #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i)
1065#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
1066 #if CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS
1067 #define __Pyx_PyList_GetItemRef(o, i) (likely((i) >= 0) ? PySequence_GetItem(o, i) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
1068 #else
1069 #define __Pyx_PyList_GetItemRef(o, i) PySequence_ITEM(o, i)
1070 #endif
1071#elif CYTHON_COMPILING_IN_LIMITED_API || !(CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE)
1072 #define __Pyx_PyList_GetItemRef(o, i) __Pyx_XNewRef(PyList_GetItem(o, i))
1073#else
1074 #define __Pyx_PyList_GetItemRef(o, i) (likely(__Pyx_is_valid_index(i, PyList_GET_SIZE(o))) ?\
1075 __Pyx_NewRef(PyList_GET_ITEM(o, i)) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
1076#endif
1077#if CYTHON_AVOID_BORROWED_REFS || CYTHON_COMPILING_IN_LIMITED_API
1078 #define __Pyx_PyList_GET_ITEM_REF(o, i, unsafe_shared) ((void)(unsafe_shared),\
1079 __Pyx_PyList_GetItemRef(o, i))
1080#elif CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
1081 #if CYTHON_ASSUME_SAFE_MACROS
1082 #define __Pyx_PyList_GET_ITEM_REF(o, i, unsafe_shared) (\
1083 __Pyx_IS_UNIQUELY_REFERENCED(o, unsafe_shared) ?\
1084 __Pyx_NewRef(PyList_GET_ITEM(o, i)) : __Pyx_PyList_GetItemRef(o, i))
1085 #else
1086 #define __Pyx_PyList_GET_ITEM_REF(o, i, unsafe_shared) (\
1087 __Pyx_IS_UNIQUELY_REFERENCED(o, unsafe_shared) ?\
1088 __Pyx_XNewRef(PyList_GetItem(o, i)) : __Pyx_PyList_GetItemRef(o, i))
1089 #endif
1090#elif CYTHON_ASSUME_SAFE_MACROS
1091 #define __Pyx_PyList_GET_ITEM_REF(o, i, unsafe_shared) ((void)(unsafe_shared),\
1092 __Pyx_NewRef(PyList_GET_ITEM(o, i)))
1093#else
1094 #define __Pyx_PyList_GET_ITEM_REF(o, i, unsafe_shared) ((void)(unsafe_shared),\
1095 __Pyx_XNewRef(PyList_GetItem(o, i)))
1096#endif
1097#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
1098#define __Pyx_PyDict_GetItemRef(dict, key, result) PyDict_GetItemRef(dict, key, result)
1099#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
1100static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) {
1101 *result = PyObject_GetItem(dict, key);
1102 if (*result == NULL) {
1103 if (PyErr_ExceptionMatches(PyExc_KeyError)) {
1104 PyErr_Clear();
1105 return 0;
1106 }
1107 return -1;
1108 }
1109 return 1;
1110}
1111#else
1112static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) {
1113 *result = PyDict_GetItemWithError(dict, key);
1114 if (*result == NULL) {
1115 return PyErr_Occurred() ? -1 : 0;
1116 }
1117 Py_INCREF(*result);
1118 return 1;
1119}
1120#endif
1121#if defined(CYTHON_DEBUG_VISIT_CONST) && CYTHON_DEBUG_VISIT_CONST
1122 #define __Pyx_VISIT_CONST(obj) Py_VISIT(obj)
1123#else
1124 #define __Pyx_VISIT_CONST(obj)
1125#endif
1126#if CYTHON_ASSUME_SAFE_MACROS
1127 #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i)
1128 #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
1129 #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0))
1130 #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GET_ITEM(o, i)
1131 #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0))
1132 #define __Pyx_PyList_GET_ITEM(o, i) PyList_GET_ITEM(o, i)
1133#else
1134 #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i)
1135 #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
1136 #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v)
1137 #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GetItem(o, i)
1138 #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v)
1139 #define __Pyx_PyList_GET_ITEM(o, i) PyList_GetItem(o, i)
1140#endif
1141#if CYTHON_ASSUME_SAFE_SIZE
1142 #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o)
1143 #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o)
1144 #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o)
1145 #define __Pyx_PyDict_GET_SIZE(o) PyDict_GET_SIZE(o)
1146 #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o)
1147 #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o)
1148 #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GET_LENGTH(o)
1149#else
1150 #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o)
1151 #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o)
1152 #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o)
1153 #define __Pyx_PyDict_GET_SIZE(o) PyDict_Size(o)
1154 #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o)
1155 #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o)
1156 #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GetLength(o)
1157#endif
1158#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_InternFromString)
1159 #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
1160#endif
1161#define __Pyx_PyLong_FromHash_t PyLong_FromSsize_t
1162#define __Pyx_PyLong_AsHash_t __Pyx_PyIndex_AsSsize_t
1163#if __PYX_LIMITED_VERSION_HEX >= 0x030A0000
1164 #define __Pyx_PySendResult PySendResult
1165#else
1166 typedef enum {
1167 PYGEN_RETURN = 0,
1168 PYGEN_ERROR = -1,
1169 PYGEN_NEXT = 1,
1170 } __Pyx_PySendResult;
1171#endif
1172#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030A00A3
1173 typedef __Pyx_PySendResult (*__Pyx_pyiter_sendfunc)(PyObject *iter, PyObject *value, PyObject **result);
1174#else
1175 #define __Pyx_pyiter_sendfunc sendfunc
1176#endif
1177#if !CYTHON_USE_AM_SEND
1178#define __PYX_HAS_PY_AM_SEND 0
1179#elif __PYX_LIMITED_VERSION_HEX >= 0x030A0000
1180#define __PYX_HAS_PY_AM_SEND 1
1181#else
1182#define __PYX_HAS_PY_AM_SEND 2 // our own backported implementation
1183#endif
1184#if __PYX_HAS_PY_AM_SEND < 2
1185 #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
1186#else
1187 typedef struct {
1188 unaryfunc am_await;
1189 unaryfunc am_aiter;
1190 unaryfunc am_anext;
1191 __Pyx_pyiter_sendfunc am_send;
1192 } __Pyx_PyAsyncMethodsStruct;
1193 #define __Pyx_SlotTpAsAsync(s) ((PyAsyncMethods*)(s))
1194#endif
1195#if CYTHON_USE_AM_SEND && PY_VERSION_HEX < 0x030A00F0
1196 #define __Pyx_TPFLAGS_HAVE_AM_SEND (1UL << 21)
1197#else
1198 #define __Pyx_TPFLAGS_HAVE_AM_SEND (0)
1199#endif
1200#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030A0000
1201#ifdef __cplusplus
1202extern "C"
1203#endif
1204PyAPI_FUNC(void *) PyMem_Calloc(size_t nelem, size_t elsize);
1205#endif
1206#if CYTHON_COMPILING_IN_LIMITED_API
1207static int __Pyx_init_co_variable(PyObject *inspect, const char* name, int *write_to) {
1208 int value;
1209 PyObject *py_value = PyObject_GetAttrString(inspect, name);
1210 if (!py_value) return 0;
1211 value = (int) PyLong_AsLong(py_value);
1212 Py_DECREF(py_value);
1213 *write_to = value;
1214 return value != -1 || !PyErr_Occurred();
1215}
1216static int __Pyx_init_co_variables(void) {
1217 PyObject *inspect;
1218 int result;
1219 inspect = PyImport_ImportModule("inspect");
1220 result =
1221#if !defined(CO_OPTIMIZED)
1222 __Pyx_init_co_variable(inspect, "CO_OPTIMIZED", &CO_OPTIMIZED) &&
1223#endif
1224#if !defined(CO_NEWLOCALS)
1225 __Pyx_init_co_variable(inspect, "CO_NEWLOCALS", &CO_NEWLOCALS) &&
1226#endif
1227#if !defined(CO_VARARGS)
1228 __Pyx_init_co_variable(inspect, "CO_VARARGS", &CO_VARARGS) &&
1229#endif
1230#if !defined(CO_VARKEYWORDS)
1231 __Pyx_init_co_variable(inspect, "CO_VARKEYWORDS", &CO_VARKEYWORDS) &&
1232#endif
1233#if !defined(CO_ASYNC_GENERATOR)
1234 __Pyx_init_co_variable(inspect, "CO_ASYNC_GENERATOR", &CO_ASYNC_GENERATOR) &&
1235#endif
1236#if !defined(CO_GENERATOR)
1237 __Pyx_init_co_variable(inspect, "CO_GENERATOR", &CO_GENERATOR) &&
1238#endif
1239#if !defined(CO_COROUTINE)
1240 __Pyx_init_co_variable(inspect, "CO_COROUTINE", &CO_COROUTINE) &&
1241#endif
1242 1;
1243 Py_DECREF(inspect);
1244 return result ? 0 : -1;
1245}
1246static int __Pyx_init_tpflags_bitcount(unsigned long flag) {
1247 int count = 0;
1248 while (flag) {
1249 count += (int) (flag & 1);
1250 flag >>= 1;
1251 }
1252 return count;
1253}
1254static int __Pyx_init_tpflags_variables(void) {
1255 if (__Pyx_Runtime_TPFLAGS_SEQUENCE != 0 && __Pyx_Runtime_TPFLAGS_MAPPING != 0) {
1256 return 0;
1257 }
1258 PyObject *collections_abc = PyImport_ImportModule("collections.abc");
1259 if (!collections_abc) return -1;
1260 int result = 0;
1261 PyObject *sequence = NULL, *mapping = NULL;
1262#if __PYX_LIMITED_VERSION_HEX >= 0x030D0000
1263 if (PyObject_GetOptionalAttrString(collections_abc, "Sequence", &sequence) != 1) goto fail;
1264 if (PyObject_GetOptionalAttrString(collections_abc, "Mapping", &mapping) != 1) goto fail;
1265#else
1266 sequence = PyObject_GetAttrString(collections_abc, "Sequence");
1267 if (!sequence) goto fail_attr_lookup;
1268 mapping = PyObject_GetAttrString(collections_abc, "Mapping");
1269 if (!mapping) goto fail_attr_lookup;
1270#endif
1271 if (!PyType_Check(sequence) || !PyType_Check(mapping)) goto fail;
1272 {
1273 unsigned long sequence_flags = PyType_GetFlags((PyTypeObject*)sequence);
1274 unsigned long mapping_flags = PyType_GetFlags((PyTypeObject*)mapping);
1275 unsigned long mutual_flags = sequence_flags & mapping_flags;
1276 sequence_flags = sequence_flags ^ mutual_flags;
1277 mapping_flags = mapping_flags ^ mutual_flags;
1278 if (__Pyx_Runtime_TPFLAGS_SEQUENCE == 0 && __Pyx_init_tpflags_bitcount(sequence_flags) == 1) {
1279 __Pyx_Runtime_TPFLAGS_SEQUENCE = sequence_flags;
1280 }
1281 if (__Pyx_Runtime_TPFLAGS_MAPPING == 0 && __Pyx_init_tpflags_bitcount(mapping_flags) == 1) {
1282 __Pyx_Runtime_TPFLAGS_MAPPING = mapping_flags;
1283 }
1284 }
1285 cleanup:
1286 Py_XDECREF(mapping);
1287 Py_XDECREF(sequence);
1288 Py_DECREF(collections_abc);
1289 return result;
1290#if __PYX_LIMITED_VERSION_HEX < 0x030D0000
1291 fail_attr_lookup:
1292 if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
1293 PyErr_Clear();
1294 }
1295#endif
1296 fail:
1297 result = PyErr_Occurred() ? -1 : 0;
1298 goto cleanup;
1299}
1300#else
1301static int __Pyx_init_co_variables(void) {
1302 return 0; // It's a limited API-only feature
1303}
1304static int __Pyx_init_tpflags_variables(void) {
1305 return 0; // It's a limited API-only feature
1306}
1307#endif
1308
1309/* MathInitCode */
1310#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
1311 #ifndef _USE_MATH_DEFINES
1312 #define _USE_MATH_DEFINES
1313 #endif
1314#endif
1315#include <math.h>
1316#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
1317#define __Pyx_truncl trunc
1318#else
1319#define __Pyx_truncl truncl
1320#endif
1321
1322#ifndef CYTHON_CLINE_IN_TRACEBACK_RUNTIME
1323#define CYTHON_CLINE_IN_TRACEBACK_RUNTIME 1
1324#endif
1325#ifndef CYTHON_CLINE_IN_TRACEBACK
1326#define CYTHON_CLINE_IN_TRACEBACK CYTHON_CLINE_IN_TRACEBACK_RUNTIME
1327#endif
1328#if CYTHON_CLINE_IN_TRACEBACK
1329#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; __pyx_clineno = __LINE__; (void) __pyx_clineno; }
1330#else
1331#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; (void) __pyx_clineno; }
1332#endif
1333#define __PYX_ERR(f_index, lineno, Ln_error) \
1334 { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }
1335
1336#ifdef CYTHON_EXTERN_C
1337 #undef __PYX_EXTERN_C
1338 #define __PYX_EXTERN_C CYTHON_EXTERN_C
1339#elif defined(__PYX_EXTERN_C)
1340 #ifdef _MSC_VER
1341 #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.")
1342 #else
1343 #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.
1344 #endif
1345#else
1346 #define __PYX_EXTERN_C extern "C++"
1347#endif
1348
1349#define __PYX_HAVE__cTwophaseDarcyCoefficients
1350#define __PYX_HAVE_API__cTwophaseDarcyCoefficients
1351/* Early includes */
1352#include <string.h>
1353#include <stdio.h>
1354
1355 /* Using NumPy API declarations from "numpy/__init__.cython-30.pxd" */
1356
1357#include "numpy/arrayobject.h"
1358#include "numpy/ndarrayobject.h"
1359#include "numpy/ndarraytypes.h"
1360#include "numpy/arrayscalars.h"
1361#include "numpy/ufuncobject.h"
1363#include "densityRelations.h"
1364#include "pskRelations.h"
1365#ifdef _OPENMP
1366#include <omp.h>
1367#endif /* _OPENMP */
1368
1369#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
1370#define CYTHON_WITHOUT_ASSERTIONS
1371#endif
1372
1373#ifdef CYTHON_FREETHREADING_COMPATIBLE
1374#if CYTHON_FREETHREADING_COMPATIBLE
1375#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_NOT_USED
1376#else
1377#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED
1378#endif
1379#else
1380#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED
1381#endif
1382#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
1383#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
1384#define __PYX_DEFAULT_STRING_ENCODING ""
1385#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
1386#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
1387#define __Pyx_uchar_cast(c) ((unsigned char)c)
1388#define __Pyx_long_cast(x) ((long)x)
1389#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
1390 (sizeof(type) < sizeof(Py_ssize_t)) ||\
1391 (sizeof(type) > sizeof(Py_ssize_t) &&\
1392 likely(v < (type)PY_SSIZE_T_MAX ||\
1393 v == (type)PY_SSIZE_T_MAX) &&\
1394 (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
1395 v == (type)PY_SSIZE_T_MIN))) ||\
1396 (sizeof(type) == sizeof(Py_ssize_t) &&\
1397 (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
1398 v == (type)PY_SSIZE_T_MAX))) )
1399static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
1400 return (size_t) i < (size_t) limit;
1401}
1402#if defined (__cplusplus) && __cplusplus >= 201103L
1403 #include <cstdlib>
1404 #define __Pyx_sst_abs(value) std::abs(value)
1405#elif SIZEOF_INT >= SIZEOF_SIZE_T
1406 #define __Pyx_sst_abs(value) abs(value)
1407#elif SIZEOF_LONG >= SIZEOF_SIZE_T
1408 #define __Pyx_sst_abs(value) labs(value)
1409#elif defined (_MSC_VER)
1410 #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
1411#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
1412 #define __Pyx_sst_abs(value) llabs(value)
1413#elif defined (__GNUC__)
1414 #define __Pyx_sst_abs(value) __builtin_llabs(value)
1415#else
1416 #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
1417#endif
1418static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s);
1419static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
1420static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
1421static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*);
1422#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
1423#define __Pyx_PyBytes_FromString PyBytes_FromString
1424#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
1425static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
1426#if CYTHON_ASSUME_SAFE_MACROS
1427 #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
1428 #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
1429 #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
1430 #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
1431 #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
1432 #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
1433 #define __Pyx_PyByteArray_AsString(s) PyByteArray_AS_STRING(s)
1434#else
1435 #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AsString(s))
1436 #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AsString(s))
1437 #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AsString(s))
1438 #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AsString(s))
1439 #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AsString(s))
1440 #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AsString(s))
1441 #define __Pyx_PyByteArray_AsString(s) PyByteArray_AsString(s)
1442#endif
1443#define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
1444#define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
1445#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
1446#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
1447#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
1448#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
1449#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
1450#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
1451#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
1452#define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o)
1453#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
1454static CYTHON_INLINE PyObject *__Pyx_NewRef(PyObject *obj) {
1455#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_NewRef)
1456 return Py_NewRef(obj);
1457#else
1458 Py_INCREF(obj);
1459 return obj;
1460#endif
1461}
1462static CYTHON_INLINE PyObject *__Pyx_XNewRef(PyObject *obj) {
1463#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_XNewRef)
1464 return Py_XNewRef(obj);
1465#else
1466 Py_XINCREF(obj);
1467 return obj;
1468#endif
1469}
1470static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b);
1471static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
1472static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
1473static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
1474static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x);
1475#define __Pyx_PyObject_RichCompareBool(a,b,cmp) __Pyx_PyObject_IsTrueAndDecref(PyObject_RichCompare((a),(b),(cmp)))
1476#define __Pyx_PySequence_Tuple(obj)\
1477 (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
1478static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
1479static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t);
1480static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
1481#if CYTHON_ASSUME_SAFE_MACROS
1482#define __Pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
1483#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AS_DOUBLE(x)
1484#define __Pyx_PyFloat_IsNonZero(x) (PyFloat_AS_DOUBLE(x) != 0.0)
1485#else
1486#define __Pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
1487#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AsDouble(x)
1488#define __Pyx_PyFloat_IsNonZero(x) PyObject_IsTrue(x)
1489#endif
1490#define __Pyx_PyFloat_AsFloat(x) ((float) __Pyx_PyFloat_AsDouble(x))
1491#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
1492#if CYTHON_USE_PYLONG_INTERNALS
1493 #if PY_VERSION_HEX >= 0x030C00A7
1494 #ifndef _PyLong_SIGN_MASK
1495 #define _PyLong_SIGN_MASK 3
1496 #endif
1497 #ifndef _PyLong_NON_SIZE_BITS
1498 #define _PyLong_NON_SIZE_BITS 3
1499 #endif
1500 #define __Pyx_PyLong_SignBits(x) ((int) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK))
1501 #define __Pyx_PyLong_Sign(x) (1 - __Pyx_PyLong_SignBits(x))
1502 #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_SignBits(x) & 2) != 0)
1503 #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x))
1504 #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_SignBits(x) & 1)
1505 #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_SignBits(x) == 0)
1506 #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0])
1507 #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS))
1508 #define __Pyx_PyLong_SignedDigitCount(x)\
1509 (((Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x))
1510 #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue)
1511 #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x)
1512 #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x)
1513 #else
1514 #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS))
1515 #define __Pyx_PyLong_CompactValue(x) (((Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0])
1516 #endif
1517 static CYTHON_INLINE Py_ssize_t __Pyx_PyLong_CompareSignAndSize(PyObject *a, PyObject *b) {
1518 uintptr_t tag_a = ((PyLongObject*)a)->long_value.lv_tag;
1519 uintptr_t tag_b = ((PyLongObject*)b)->long_value.lv_tag;
1520 if (tag_a == tag_b) return 0;
1521 int sign_a = (int) (tag_a & _PyLong_SIGN_MASK);
1522 int sign_b = (int) (tag_b & _PyLong_SIGN_MASK);
1523 if (sign_a > sign_b) return -1;
1524 if (sign_a < sign_b) return 1;
1525 Py_ssize_t size_a = (Py_ssize_t) (tag_a >> _PyLong_NON_SIZE_BITS);
1526 Py_ssize_t size_b = (Py_ssize_t) (tag_b >> _PyLong_NON_SIZE_BITS);
1527 return (1 - sign_a) * (size_a - size_b);
1528 }
1529 typedef Py_ssize_t __Pyx_compact_pylong;
1530 typedef size_t __Pyx_compact_upylong;
1531 #else
1532 #define __Pyx_PyLong_Sign(x) ((int) ((Py_SIZE(x) == 0) ? 0 : (Py_SIZE(x) < 0) ? -1 : 1))
1533 #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0)
1534 #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0)
1535 #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0)
1536 #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0)
1537 #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0])
1538 #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x))
1539 #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x)
1540 #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1)
1541 #define __Pyx_PyLong_CompactValue(x)\
1542 ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0]))
1543 #define __Pyx_PyLong_CompareSignAndSize(a, b) (Py_SIZE(a) - Py_SIZE(b))
1544 typedef sdigit __Pyx_compact_pylong;
1545 typedef digit __Pyx_compact_upylong;
1546 #endif
1547 #if PY_VERSION_HEX >= 0x030C00A5
1548 #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit)
1549 #else
1550 #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit)
1551 #endif
1552 #define __Pyx_PyLong_IsNonZero(x) (!__Pyx_PyLong_IsZero(x))
1553#else
1554 #define __Pyx_PyLong_IsNonZero(x) PyObject_IsTrue(x)
1555#endif
1556#if __PYX_DEFAULT_STRING_ENCODING_IS_UTF8
1557 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
1558#elif __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
1559 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeASCII(c_str, size, NULL)
1560#else
1561 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
1562#endif
1563
1564
1565/* Test for GCC > 2.95 */
1566#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
1567 #define likely(x) __builtin_expect(!!(x), 1)
1568 #define unlikely(x) __builtin_expect(!!(x), 0)
1569#else /* !__GNUC__ or GCC < 2.95 */
1570 #define likely(x) (x)
1571 #define unlikely(x) (x)
1572#endif /* __GNUC__ */
1573/* PretendToInitialize */
1574#ifdef __cplusplus
1575#if __cplusplus > 201103L
1576#include <type_traits>
1577#endif
1578template <typename T>
1579static void __Pyx_pretend_to_initialize(T* ptr) {
1580#if __cplusplus > 201103L
1581 if ((std::is_trivially_default_constructible<T>::value))
1582#endif
1583 *ptr = T();
1584 (void)ptr;
1585}
1586#else
1587static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
1588#endif
1589
1590
1591#if !CYTHON_USE_MODULE_STATE
1592static PyObject *__pyx_m = NULL;
1593#endif
1594static const char * const __pyx_cfilenm = __FILE__;
1595
1596/* Header.proto */
1597#if !defined(CYTHON_CCOMPLEX)
1598 #if defined(__cplusplus)
1599 #define CYTHON_CCOMPLEX 1
1600 #elif (defined(_Complex_I) && !defined(_MSC_VER)) || ((defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) && !defined(__STDC_NO_COMPLEX__) && !defined(_MSC_VER))
1601 #define CYTHON_CCOMPLEX 1
1602 #else
1603 #define CYTHON_CCOMPLEX 0
1604 #endif
1605#endif
1606#if CYTHON_CCOMPLEX
1607 #ifdef __cplusplus
1608 #include <complex>
1609 #else
1610 #include <complex.h>
1611 #endif
1612#endif
1613#if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
1614 #undef _Complex_I
1615 #define _Complex_I 1.0fj
1616#endif
1617
1618/* #### Code section: filename_table ### */
1619
1620static const char* const __pyx_f[] = {
1621 "proteus/cTwophaseDarcyCoefficients.pyx",
1622 "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd",
1623 "cpython/type.pxd",
1624};
1625/* #### Code section: utility_code_proto_before_types ### */
1626/* Atomics.proto (used by UnpackUnboundCMethod) */
1627#include <pythread.h>
1628#ifndef CYTHON_ATOMICS
1629 #define CYTHON_ATOMICS 1
1630#endif
1631#define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS
1632#define __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
1633#define __pyx_atomic_int_type int
1634#define __pyx_nonatomic_int_type int
1635#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\
1636 (__STDC_VERSION__ >= 201112L) &&\
1637 !defined(__STDC_NO_ATOMICS__))
1638 #include <stdatomic.h>
1639#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\
1640 (__cplusplus >= 201103L) ||\
1641 (defined(_MSC_VER) && _MSC_VER >= 1700)))
1642 #include <atomic>
1643#endif
1644#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\
1645 (__STDC_VERSION__ >= 201112L) &&\
1646 !defined(__STDC_NO_ATOMICS__) &&\
1647 ATOMIC_INT_LOCK_FREE == 2)
1648 #undef __pyx_atomic_int_type
1649 #define __pyx_atomic_int_type atomic_int
1650 #define __pyx_atomic_ptr_type atomic_uintptr_t
1651 #define __pyx_nonatomic_ptr_type uintptr_t
1652 #define __pyx_atomic_incr_relaxed(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed)
1653 #define __pyx_atomic_incr_acq_rel(value) atomic_fetch_add_explicit(value, 1, memory_order_acq_rel)
1654 #define __pyx_atomic_decr_acq_rel(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel)
1655 #define __pyx_atomic_sub(value, arg) atomic_fetch_sub(value, arg)
1656 #define __pyx_atomic_int_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired)
1657 #define __pyx_atomic_load(value) atomic_load(value)
1658 #define __pyx_atomic_store(value, new_value) atomic_store(value, new_value)
1659 #define __pyx_atomic_pointer_load_relaxed(value) atomic_load_explicit(value, memory_order_relaxed)
1660 #define __pyx_atomic_pointer_load_acquire(value) atomic_load_explicit(value, memory_order_acquire)
1661 #define __pyx_atomic_pointer_exchange(value, new_value) atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value)
1662 #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired)
1663 #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER)
1664 #pragma message ("Using standard C atomics")
1665 #elif defined(__PYX_DEBUG_ATOMICS)
1666 #warning "Using standard C atomics"
1667 #endif
1668#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\
1669 (__cplusplus >= 201103L) ||\
1670\
1671 (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\
1672 ATOMIC_INT_LOCK_FREE == 2)
1673 #undef __pyx_atomic_int_type
1674 #define __pyx_atomic_int_type std::atomic_int
1675 #define __pyx_atomic_ptr_type std::atomic_uintptr_t
1676 #define __pyx_nonatomic_ptr_type uintptr_t
1677 #define __pyx_atomic_incr_relaxed(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed)
1678 #define __pyx_atomic_incr_acq_rel(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_acq_rel)
1679 #define __pyx_atomic_decr_acq_rel(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel)
1680 #define __pyx_atomic_sub(value, arg) std::atomic_fetch_sub(value, arg)
1681 #define __pyx_atomic_int_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired)
1682 #define __pyx_atomic_load(value) std::atomic_load(value)
1683 #define __pyx_atomic_store(value, new_value) std::atomic_store(value, new_value)
1684 #define __pyx_atomic_pointer_load_relaxed(value) std::atomic_load_explicit(value, std::memory_order_relaxed)
1685 #define __pyx_atomic_pointer_load_acquire(value) std::atomic_load_explicit(value, std::memory_order_acquire)
1686 #define __pyx_atomic_pointer_exchange(value, new_value) std::atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value)
1687 #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired)
1688 #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER)
1689 #pragma message ("Using standard C++ atomics")
1690 #elif defined(__PYX_DEBUG_ATOMICS)
1691 #warning "Using standard C++ atomics"
1692 #endif
1693#elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\
1694 (__GNUC_MINOR__ > 1 ||\
1695 (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2))))
1696 #define __pyx_atomic_ptr_type void*
1697 #define __pyx_nonatomic_ptr_type void*
1698 #define __pyx_atomic_incr_relaxed(value) __sync_fetch_and_add(value, 1)
1699 #define __pyx_atomic_incr_acq_rel(value) __sync_fetch_and_add(value, 1)
1700 #define __pyx_atomic_decr_acq_rel(value) __sync_fetch_and_sub(value, 1)
1701 #define __pyx_atomic_sub(value, arg) __sync_fetch_and_sub(value, arg)
1702 static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) {
1703 __pyx_nonatomic_int_type old = __sync_val_compare_and_swap(value, *expected, desired);
1704 int result = old == *expected;
1705 *expected = old;
1706 return result;
1707 }
1708 #define __pyx_atomic_load(value) __sync_fetch_and_add(value, 0)
1709 #define __pyx_atomic_store(value, new_value) __sync_lock_test_and_set(value, new_value)
1710 #define __pyx_atomic_pointer_load_relaxed(value) __sync_fetch_and_add(value, 0)
1711 #define __pyx_atomic_pointer_load_acquire(value) __sync_fetch_and_add(value, 0)
1712 #define __pyx_atomic_pointer_exchange(value, new_value) __sync_lock_test_and_set(value, (__pyx_atomic_ptr_type)new_value)
1713 static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) {
1714 __pyx_nonatomic_ptr_type old = __sync_val_compare_and_swap(value, *expected, desired);
1715 int result = old == *expected;
1716 *expected = old;
1717 return result;
1718 }
1719 #ifdef __PYX_DEBUG_ATOMICS
1720 #warning "Using GNU atomics"
1721 #endif
1722#elif CYTHON_ATOMICS && defined(_MSC_VER)
1723 #include <intrin.h>
1724 #undef __pyx_atomic_int_type
1725 #define __pyx_atomic_int_type long
1726 #define __pyx_atomic_ptr_type void*
1727 #undef __pyx_nonatomic_int_type
1728 #define __pyx_nonatomic_int_type long
1729 #define __pyx_nonatomic_ptr_type void*
1730 #pragma intrinsic (_InterlockedExchangeAdd, _InterlockedExchange, _InterlockedCompareExchange, _InterlockedCompareExchangePointer, _InterlockedExchangePointer)
1731 #define __pyx_atomic_incr_relaxed(value) _InterlockedExchangeAdd(value, 1)
1732 #define __pyx_atomic_incr_acq_rel(value) _InterlockedExchangeAdd(value, 1)
1733 #define __pyx_atomic_decr_acq_rel(value) _InterlockedExchangeAdd(value, -1)
1734 #define __pyx_atomic_sub(value, arg) _InterlockedExchangeAdd(value, -arg)
1735 static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) {
1736 __pyx_nonatomic_int_type old = _InterlockedCompareExchange(value, desired, *expected);
1737 int result = old == *expected;
1738 *expected = old;
1739 return result;
1740 }
1741 #define __pyx_atomic_load(value) _InterlockedExchangeAdd(value, 0)
1742 #define __pyx_atomic_store(value, new_value) _InterlockedExchange(value, new_value)
1743 #define __pyx_atomic_pointer_load_relaxed(value) *(void * volatile *)value
1744 #define __pyx_atomic_pointer_load_acquire(value) _InterlockedCompareExchangePointer(value, 0, 0)
1745 #define __pyx_atomic_pointer_exchange(value, new_value) _InterlockedExchangePointer(value, (__pyx_atomic_ptr_type)new_value)
1746 static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) {
1747 __pyx_atomic_ptr_type old = _InterlockedCompareExchangePointer(value, desired, *expected);
1748 int result = old == *expected;
1749 *expected = old;
1750 return result;
1751 }
1752 #ifdef __PYX_DEBUG_ATOMICS
1753 #pragma message ("Using MSVC atomics")
1754 #endif
1755#else
1756 #undef CYTHON_ATOMICS
1757 #define CYTHON_ATOMICS 0
1758 #ifdef __PYX_DEBUG_ATOMICS
1759 #warning "Not using atomics"
1760 #endif
1761#endif
1762
1763/* CriticalSectionsDefinition.proto (used by CriticalSections) */
1764#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
1765#define __Pyx_PyCriticalSection void*
1766#define __Pyx_PyCriticalSection2 void*
1767#define __Pyx_PyCriticalSection_End(cs)
1768#define __Pyx_PyCriticalSection2_End(cs)
1769#else
1770#define __Pyx_PyCriticalSection PyCriticalSection
1771#define __Pyx_PyCriticalSection2 PyCriticalSection2
1772#define __Pyx_PyCriticalSection_End PyCriticalSection_End
1773#define __Pyx_PyCriticalSection2_End PyCriticalSection2_End
1774#endif
1775
1776/* CriticalSections.proto (used by ParseKeywordsImpl) */
1777#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
1778#define __Pyx_PyCriticalSection_Begin(cs, arg) (void)(cs)
1779#define __Pyx_PyCriticalSection2_Begin(cs, arg1, arg2) (void)(cs)
1780#else
1781#define __Pyx_PyCriticalSection_Begin PyCriticalSection_Begin
1782#define __Pyx_PyCriticalSection2_Begin PyCriticalSection2_Begin
1783#endif
1784#if PY_VERSION_HEX < 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API
1785#define __Pyx_BEGIN_CRITICAL_SECTION(o) {
1786#define __Pyx_END_CRITICAL_SECTION() }
1787#else
1788#define __Pyx_BEGIN_CRITICAL_SECTION Py_BEGIN_CRITICAL_SECTION
1789#define __Pyx_END_CRITICAL_SECTION Py_END_CRITICAL_SECTION
1790#endif
1791
1792/* IncludeStructmemberH.proto (used by CythonFunctionShared) */
1793#include <structmember.h>
1794
1795/* #### Code section: numeric_typedefs ### */
1796
1797/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":761
1798 * # in Cython to enable them only on the right systems.
1799 *
1800 * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<<
1801 * ctypedef npy_int16 int16_t
1802 * ctypedef npy_int32 int32_t
1803*/
1804typedef npy_int8 __pyx_t_5numpy_int8_t;
1805
1806/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":762
1807 *
1808 * ctypedef npy_int8 int8_t
1809 * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<<
1810 * ctypedef npy_int32 int32_t
1811 * ctypedef npy_int64 int64_t
1812*/
1813typedef npy_int16 __pyx_t_5numpy_int16_t;
1814
1815/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":763
1816 * ctypedef npy_int8 int8_t
1817 * ctypedef npy_int16 int16_t
1818 * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<<
1819 * ctypedef npy_int64 int64_t
1820 *
1821*/
1822typedef npy_int32 __pyx_t_5numpy_int32_t;
1823
1824/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":764
1825 * ctypedef npy_int16 int16_t
1826 * ctypedef npy_int32 int32_t
1827 * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<<
1828 *
1829 * ctypedef npy_uint8 uint8_t
1830*/
1831typedef npy_int64 __pyx_t_5numpy_int64_t;
1832
1833/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":766
1834 * ctypedef npy_int64 int64_t
1835 *
1836 * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<<
1837 * ctypedef npy_uint16 uint16_t
1838 * ctypedef npy_uint32 uint32_t
1839*/
1840typedef npy_uint8 __pyx_t_5numpy_uint8_t;
1841
1842/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":767
1843 *
1844 * ctypedef npy_uint8 uint8_t
1845 * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<<
1846 * ctypedef npy_uint32 uint32_t
1847 * ctypedef npy_uint64 uint64_t
1848*/
1849typedef npy_uint16 __pyx_t_5numpy_uint16_t;
1850
1851/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":768
1852 * ctypedef npy_uint8 uint8_t
1853 * ctypedef npy_uint16 uint16_t
1854 * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<<
1855 * ctypedef npy_uint64 uint64_t
1856 *
1857*/
1858typedef npy_uint32 __pyx_t_5numpy_uint32_t;
1859
1860/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":769
1861 * ctypedef npy_uint16 uint16_t
1862 * ctypedef npy_uint32 uint32_t
1863 * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<<
1864 *
1865 * ctypedef npy_float32 float32_t
1866*/
1867typedef npy_uint64 __pyx_t_5numpy_uint64_t;
1868
1869/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":771
1870 * ctypedef npy_uint64 uint64_t
1871 *
1872 * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<<
1873 * ctypedef npy_float64 float64_t
1874 * #ctypedef npy_float80 float80_t
1875*/
1876typedef npy_float32 __pyx_t_5numpy_float32_t;
1877
1878/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":772
1879 *
1880 * ctypedef npy_float32 float32_t
1881 * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<<
1882 * #ctypedef npy_float80 float80_t
1883 * #ctypedef npy_float128 float128_t
1884*/
1885typedef npy_float64 __pyx_t_5numpy_float64_t;
1886
1887/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":779
1888 * ctypedef double complex complex128_t
1889 *
1890 * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<<
1891 * ctypedef npy_ulonglong ulonglong_t
1892 *
1893*/
1894typedef npy_longlong __pyx_t_5numpy_longlong_t;
1895
1896/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":780
1897 *
1898 * ctypedef npy_longlong longlong_t
1899 * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<<
1900 *
1901 * ctypedef npy_intp intp_t
1902*/
1903typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
1904
1905/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":782
1906 * ctypedef npy_ulonglong ulonglong_t
1907 *
1908 * ctypedef npy_intp intp_t # <<<<<<<<<<<<<<
1909 * ctypedef npy_uintp uintp_t
1910 *
1911*/
1912typedef npy_intp __pyx_t_5numpy_intp_t;
1913
1914/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":783
1915 *
1916 * ctypedef npy_intp intp_t
1917 * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<<
1918 *
1919 * ctypedef npy_double float_t
1920*/
1921typedef npy_uintp __pyx_t_5numpy_uintp_t;
1922
1923/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":785
1924 * ctypedef npy_uintp uintp_t
1925 *
1926 * ctypedef npy_double float_t # <<<<<<<<<<<<<<
1927 * ctypedef npy_double double_t
1928 * ctypedef npy_longdouble longdouble_t
1929*/
1930typedef npy_double __pyx_t_5numpy_float_t;
1931
1932/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":786
1933 *
1934 * ctypedef npy_double float_t
1935 * ctypedef npy_double double_t # <<<<<<<<<<<<<<
1936 * ctypedef npy_longdouble longdouble_t
1937 *
1938*/
1939typedef npy_double __pyx_t_5numpy_double_t;
1940
1941/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":787
1942 * ctypedef npy_double float_t
1943 * ctypedef npy_double double_t
1944 * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<<
1945 *
1946 * ctypedef float complex cfloat_t
1947*/
1948typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
1949/* #### Code section: complex_type_declarations ### */
1950/* Declarations.proto */
1951#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
1952 #ifdef __cplusplus
1953 typedef ::std::complex< float > __pyx_t_float_complex;
1954 #else
1955 typedef float _Complex __pyx_t_float_complex;
1956 #endif
1957#else
1958 typedef struct { float real, imag; } __pyx_t_float_complex;
1959#endif
1960static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);
1961
1962/* Declarations.proto */
1963#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
1964 #ifdef __cplusplus
1965 typedef ::std::complex< double > __pyx_t_double_complex;
1966 #else
1967 typedef double _Complex __pyx_t_double_complex;
1968 #endif
1969#else
1970 typedef struct { double real, imag; } __pyx_t_double_complex;
1971#endif
1972static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);
1973
1974/* Declarations.proto */
1975#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
1976 #ifdef __cplusplus
1977 typedef ::std::complex< long double > __pyx_t_long_double_complex;
1978 #else
1979 typedef long double _Complex __pyx_t_long_double_complex;
1980 #endif
1981#else
1982 typedef struct { long double real, imag; } __pyx_t_long_double_complex;
1983#endif
1984static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double, long double);
1985
1986/* #### Code section: type_declarations ### */
1987
1988/*--- Type declarations ---*/
1989/* #### Code section: utility_code_proto ### */
1990
1991/* --- Runtime support code (head) --- */
1992/* Refnanny.proto */
1993#ifndef CYTHON_REFNANNY
1994 #define CYTHON_REFNANNY 0
1995#endif
1996#if CYTHON_REFNANNY
1997 typedef struct {
1998 void (*INCREF)(void*, PyObject*, Py_ssize_t);
1999 void (*DECREF)(void*, PyObject*, Py_ssize_t);
2000 void (*GOTREF)(void*, PyObject*, Py_ssize_t);
2001 void (*GIVEREF)(void*, PyObject*, Py_ssize_t);
2002 void* (*SetupContext)(const char*, Py_ssize_t, const char*);
2003 void (*FinishContext)(void**);
2004 } __Pyx_RefNannyAPIStruct;
2005 static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
2006 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
2007 #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
2008 #define __Pyx_RefNannySetupContext(name, acquire_gil)\
2009 if (acquire_gil) {\
2010 PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
2011 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
2012 PyGILState_Release(__pyx_gilstate_save);\
2013 } else {\
2014 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
2015 }
2016 #define __Pyx_RefNannyFinishContextNogil() {\
2017 PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
2018 __Pyx_RefNannyFinishContext();\
2019 PyGILState_Release(__pyx_gilstate_save);\
2020 }
2021 #define __Pyx_RefNannyFinishContextNogil() {\
2022 PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
2023 __Pyx_RefNannyFinishContext();\
2024 PyGILState_Release(__pyx_gilstate_save);\
2025 }
2026 #define __Pyx_RefNannyFinishContext()\
2027 __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
2028 #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
2029 #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
2030 #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
2031 #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
2032 #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0)
2033 #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0)
2034 #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0)
2035 #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0)
2036#else
2037 #define __Pyx_RefNannyDeclarations
2038 #define __Pyx_RefNannySetupContext(name, acquire_gil)
2039 #define __Pyx_RefNannyFinishContextNogil()
2040 #define __Pyx_RefNannyFinishContext()
2041 #define __Pyx_INCREF(r) Py_INCREF(r)
2042 #define __Pyx_DECREF(r) Py_DECREF(r)
2043 #define __Pyx_GOTREF(r)
2044 #define __Pyx_GIVEREF(r)
2045 #define __Pyx_XINCREF(r) Py_XINCREF(r)
2046 #define __Pyx_XDECREF(r) Py_XDECREF(r)
2047 #define __Pyx_XGOTREF(r)
2048 #define __Pyx_XGIVEREF(r)
2049#endif
2050#define __Pyx_Py_XDECREF_SET(r, v) do {\
2051 PyObject *tmp = (PyObject *) r;\
2052 r = v; Py_XDECREF(tmp);\
2053 } while (0)
2054#define __Pyx_XDECREF_SET(r, v) do {\
2055 PyObject *tmp = (PyObject *) r;\
2056 r = v; __Pyx_XDECREF(tmp);\
2057 } while (0)
2058#define __Pyx_DECREF_SET(r, v) do {\
2059 PyObject *tmp = (PyObject *) r;\
2060 r = v; __Pyx_DECREF(tmp);\
2061 } while (0)
2062#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
2063#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
2064
2065/* GetTopmostException.proto (used by SaveResetException) */
2066#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
2067static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
2068#endif
2069
2070/* PyThreadStateGet.proto (used by SaveResetException) */
2071#if CYTHON_FAST_THREAD_STATE
2072#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
2073#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
2074#if PY_VERSION_HEX >= 0x030C00A6
2075#define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL)
2076#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL)
2077#else
2078#define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL)
2079#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type)
2080#endif
2081#else
2082#define __Pyx_PyThreadState_declare
2083#define __Pyx_PyThreadState_assign
2084#define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL)
2085#define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred()
2086#endif
2087
2088/* SaveResetException.proto */
2089#if CYTHON_FAST_THREAD_STATE
2090#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
2091static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
2092#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
2093static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
2094#else
2095#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
2096#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
2097#endif
2098
2099/* FastTypeChecks.proto (used by PyException_Check) */
2100#if CYTHON_COMPILING_IN_CPYTHON
2101#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
2102#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2)
2103static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
2104static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b);
2105#define __Pyx_PyAnySet_Check(obj) __Pyx_TypeCheck2(obj, &PySet_Type, &PyFrozenSet_Type)
2106#else
2107#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
2108#define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2))
2109#define __Pyx_PyAnySet_Check(obj) PyAnySet_Check(obj)
2110#endif
2111
2112/* PyException_Check.proto */
2113#define __Pyx_PyExc_Exception_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
2114
2115/* PyErrFetchRestore.proto (used by GivenExceptionMatches) */
2116#if CYTHON_FAST_THREAD_STATE
2117#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
2118#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
2119#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
2120#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
2121#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
2122static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
2123static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
2124#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6
2125#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
2126#else
2127#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
2128#endif
2129#else
2130#define __Pyx_PyErr_Clear() PyErr_Clear()
2131#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
2132#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
2133#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
2134#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
2135#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
2136#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
2137#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
2138#endif
2139
2140/* GivenExceptionMatches.proto (used by PyErrExceptionMatches) */
2141#if CYTHON_COMPILING_IN_CPYTHON
2142static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
2143static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
2144#else
2145#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
2146static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2) {
2147 return PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2);
2148}
2149#endif
2150#define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2)
2151
2152/* PyErrExceptionMatches.proto */
2153#if CYTHON_FAST_THREAD_STATE
2154#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
2155static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
2156#else
2157#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
2158#endif
2159
2160/* GetException.proto */
2161#if CYTHON_FAST_THREAD_STATE
2162#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
2163static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
2164#else
2165static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
2166#endif
2167
2168/* PyImportError_Check.proto */
2169#define __Pyx_PyExc_ImportError_Check(obj) __Pyx_TypeCheck(obj, PyExc_ImportError)
2170
2171/* PyObjectCall.proto (used by PyObjectFastCall) */
2172#if CYTHON_COMPILING_IN_CPYTHON
2173static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
2174#else
2175#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
2176#endif
2177
2178/* PyObjectCallMethO.proto (used by PyObjectFastCall) */
2179#if CYTHON_COMPILING_IN_CPYTHON
2180static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
2181#endif
2182
2183/* PyObjectFastCall.proto */
2184#define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL)
2185static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject * const*args, size_t nargsf, PyObject *kwargs);
2186
2187/* RaiseException.export */
2188static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
2189
2190/* CopyObjectArray.proto (used by TupleOrListFromArrayImpl) */
2191#if CYTHON_COMPILING_IN_CPYTHON
2192static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length);
2193#endif
2194
2195/* TupleOrListFromArrayImpl.proto (used by TupleFromArray) */
2196#if PY_VERSION_HEX >= 0x030F0000 && !CYTHON_COMPILING_IN_LIMITED_API
2197#define __Pyx_PyTuple_FromArray(src, n) PyTuple_FromArray(src, ((n)<0) ? 0 : (n))
2198#else
2199CYTHON_UNUSED static PyObject *
2200__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n);
2201#endif
2202
2203/* TupleFromArray.proto (used by fastcall) */
2204
2205
2206/* IncludeStringH.proto (used by PyObjectCompare) */
2207#include <string.h>
2208
2209/* PyObjectCompare.proto (used by UnicodeEquals) */
2210static CYTHON_INLINE int __Pyx_PyObject_CompareBoolEq_str_str(PyObject *op1, PyObject *op2, int pyop);
2211
2212/* UnicodeEquals.proto (used by fastcall) */
2213#define __Pyx_PyUnicode_Equals(s1, s2) __Pyx_PyObject_CompareBoolEq_str_str(s1, s2, Py_EQ)
2214
2215/* fastcall.proto */
2216#if CYTHON_AVOID_BORROWED_REFS
2217 #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_PySequence_ITEM(args, i)
2218#elif CYTHON_ASSUME_SAFE_MACROS
2219 #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_NewRef(__Pyx_PyTuple_GET_ITEM(args, i))
2220#else
2221 #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_XNewRef(PyTuple_GetItem(args, i))
2222#endif
2223#define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds)
2224#define __Pyx_KwValues_VARARGS(args, nargs) NULL
2225#define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s)
2226#define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw)
2227#if CYTHON_VECTORCALL
2228 #define __Pyx_ArgRef_FASTCALL(args, i) __Pyx_NewRef(args[i])
2229 #define __Pyx_NumKwargs_FASTCALL(kwds) __Pyx_PyTuple_GET_SIZE(kwds)
2230 #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs))
2231 static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s);
2232 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_GRAAL
2233 CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues);
2234 #else
2235 #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw)
2236 #endif
2237#else
2238 #define __Pyx_ArgRef_FASTCALL __Pyx_ArgRef_VARARGS
2239 #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS
2240 #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS
2241 #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS
2242 #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS
2243#endif
2244#if CYTHON_VECTORCALL_TPNEW
2245 #if !CYTHON_VECTORCALL
2246 #error Enabling CYTHON_VECTORCALL_TPNEW without CYTHON_VECTORCALL is not supported
2247 #endif
2248 #define __Pyx_ArgRef_FASTCALL_TPNEW __Pyx_ArgRef_FASTCALL
2249 #define __Pyx_NumKwargs_FASTCALL_TPNEW __Pyx_NumKwargs_FASTCALL
2250 #define __Pyx_KwValues_FASTCALL_TPNEW __Pyx_KwValues_FASTCALL
2251 #define __Pyx_GetKwValue_FASTCALL_TPNEW __Pyx_GetKwValue_FASTCALL
2252 #define __Pyx_KwargsAsDict_FASTCALL_TPNEW __Pyx_KwargsAsDict_FASTCALL
2253#else
2254 #define __Pyx_ArgRef_FASTCALL_TPNEW __Pyx_ArgRef_VARARGS
2255 #define __Pyx_NumKwargs_FASTCALL_TPNEW __Pyx_NumKwargs_VARARGS
2256 #define __Pyx_KwValues_FASTCALL_TPNEW __Pyx_KwValues_VARARGS
2257 #define __Pyx_GetKwValue_FASTCALL_TPNEW __Pyx_GetKwValue_VARARGS
2258 #define __Pyx_KwargsAsDict_FASTCALL_TPNEW __Pyx_KwargsAsDict_VARARGS
2259#endif
2260#define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop)
2261#if CYTHON_VECTORCALL
2262#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(args + start, stop - start)
2263#else
2264#define __Pyx_ArgsSlice_FASTCALL __Pyx_ArgsSlice_VARARGS
2265#endif
2266
2267/* py_dict_items.proto (used by OwnedDictNext) */
2268#define __Pyx_PyDict_items_TypePtr (&PyDictKeys_Type)
2269#define __Pyx_PyDict_items_Check(obj) PyObject_TypeCheck((obj), __Pyx_PyDictItems_TypePtr)
2270#define __Pyx_PyDict_items_CheckExact(obj) Py_IS_TYPE((obj), __Pyx_PyDictItems_TypePtr)
2271static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d);
2272
2273/* CallCFunction.proto (used by CallUnboundCMethod0) */
2274#define __Pyx_CallCFunction(cfunc, self, args)\
2275 ((PyCFunction)(void(*)(void))(cfunc)->func)(self, args)
2276#define __Pyx_CallCFunctionWithKeywords(cfunc, self, args, kwargs)\
2277 ((PyCFunctionWithKeywords)(void(*)(void))(cfunc)->func)(self, args, kwargs)
2278#define __Pyx_CallCFunctionFast(cfunc, self, args, nargs)\
2279 ((__Pyx_PyCFunctionFast)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs)
2280#define __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, nargs, kwnames)\
2281 ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs, kwnames)
2282
2283/* PyObjectCallOneArg.proto (used by CallUnboundCMethod0) */
2284static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
2285
2286/* UnpackUnboundCMethod_decl.proto (used by UnpackUnboundCMethod) */
2287typedef struct {
2288 PyObject *type;
2289 PyObject **method_name;
2290 PyCFunction func;
2291 PyObject *method;
2292 int flag;
2293#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && CYTHON_ATOMICS
2294 __pyx_atomic_int_type initialized;
2295#endif
2296} __Pyx_CachedCFunction;
2297
2298/* IgnoreException.proto (used by UnpackUnboundCMethod_impl) */
2299static CYTHON_INLINE int __Pyx_IgnoreGivenException(PyObject *given_exception, PyObject *ignorable_exception);
2300#define __Pyx_IgnoreException(ignorable_exception) __Pyx_IgnoreGivenException(NULL, ignorable_exception)
2301
2302/* PyObjectGetAttrStr.proto (used by UnpackUnboundCMethod_impl) */
2303#if CYTHON_USE_TYPE_SLOTS
2304static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
2305#else
2306#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
2307#endif
2308
2309/* UnpackUnboundCMethod_impl.export */
2310static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target);
2311
2312/* UnpackUnboundCMethod.proto (used by CallUnboundCMethod0) */
2313#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
2314static CYTHON_INLINE int __Pyx_CachedCFunction_GetAndSetInitializing(__Pyx_CachedCFunction *cfunc) {
2315#if !CYTHON_ATOMICS
2316 return 1;
2317#else
2318 __pyx_nonatomic_int_type expected = 0;
2319 if (__pyx_atomic_int_cmp_exchange(&cfunc->initialized, &expected, 1)) {
2320 return 0;
2321 }
2322 return expected;
2323#endif
2324}
2325static CYTHON_INLINE void __Pyx_CachedCFunction_SetFinishedInitializing(__Pyx_CachedCFunction *cfunc) {
2326#if CYTHON_ATOMICS
2327 __pyx_atomic_store(&cfunc->initialized, 2);
2328#endif
2329}
2330#else
2331#define __Pyx_CachedCFunction_GetAndSetInitializing(cfunc) 2
2332#define __Pyx_CachedCFunction_SetFinishedInitializing(cfunc)
2333#endif
2334
2335/* CallUnboundCMethod0.proto */
2336CYTHON_UNUSED
2337static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self);
2338#if CYTHON_COMPILING_IN_CPYTHON
2339static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self);
2340#else
2341#define __Pyx_CallUnboundCMethod0(cfunc, self) __Pyx__CallUnboundCMethod0(cfunc, self)
2342#endif
2343
2344/* py_dict_values.proto (used by OwnedDictNext) */
2345#define __Pyx_PyDict_values_TypePtr (&PyDictKeys_Type)
2346#define __Pyx_PyDict_values_Check(obj) PyObject_TypeCheck((obj), __Pyx_PyDictValues_TypePtr)
2347#define __Pyx_PyDict_values_CheckExact(obj) Py_IS_TYPE((obj), __Pyx_PyDictValues_TypePtr)
2348static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d);
2349
2350/* OwnedDictNext.proto (used by ParseKeywordsImpl) */
2351#if CYTHON_AVOID_BORROWED_REFS
2352static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue);
2353#else
2354CYTHON_INLINE
2355static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue);
2356#endif
2357
2358/* RaiseDoubleKeywords.proto (used by ParseKeywordsImpl) */
2359static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
2360
2361/* ParseKeywordsImpl.export */
2362static int __Pyx_ParseKeywordsTuple(
2363 PyObject *kwds,
2364 PyObject * const *kwvalues,
2365 PyObject ** const argnames[],
2366 PyObject *kwds2,
2367 PyObject *values[],
2368 Py_ssize_t num_pos_args,
2369 Py_ssize_t num_kwargs,
2370 const char* function_name,
2371 int ignore_unknown_kwargs
2372);
2373static int __Pyx_ParseKeywordDictToDict(
2374 PyObject *kwds,
2375 PyObject ** const argnames[],
2376 PyObject *kwds2,
2377 PyObject *values[],
2378 Py_ssize_t num_pos_args,
2379 const char* function_name
2380);
2381static int __Pyx_ParseKeywordDict(
2382 PyObject *kwds,
2383 PyObject ** const argnames[],
2384 PyObject *values[],
2385 Py_ssize_t num_pos_args,
2386 Py_ssize_t num_kwargs,
2387 const char* function_name,
2388 int ignore_unknown_kwargs
2389);
2390
2391/* CallUnboundCMethod2.proto */
2392CYTHON_UNUSED
2393static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2);
2394#if CYTHON_COMPILING_IN_CPYTHON
2395static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2);
2396#else
2397#define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2) __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2)
2398#endif
2399
2400/* ParseKeywords.proto */
2401static CYTHON_INLINE int __Pyx_ParseKeywords(
2402 PyObject *kwds, PyObject *const *kwvalues, PyObject ** const argnames[],
2403 PyObject *kwds2, PyObject *values[],
2404 Py_ssize_t num_pos_args, Py_ssize_t num_kwargs,
2405 const char* function_name,
2406 int ignore_unknown_kwargs
2407);
2408
2409/* RaiseArgTupleInvalid.export */
2410static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
2411 Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
2412
2413/* ArgTypeTestError.export */
2414static void __Pyx_ArgTypeError(PyObject *obj, PyTypeObject *type, const char *name, int exact);
2415
2416/* ArgTypeTest.proto */
2417static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact);
2418
2419/* DivInt[npy_intp].proto */
2420static CYTHON_INLINE npy_intp __Pyx_div_npy_intp(npy_intp, npy_intp, int b_is_constant);
2421
2422/* UnaryNegOverflows.proto */
2423#define __Pyx_UNARY_NEG_WOULD_OVERFLOW(x)\
2424 (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x)))
2425
2426/* AssertionsEnabled.proto */
2427#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000
2428 static int __pyx_assertions_enabled_flag;
2429 #define __pyx_assertions_enabled() (__pyx_assertions_enabled_flag)
2430 #if __clang__ || __GNUC__
2431 __attribute__((no_sanitize("thread")))
2432 #endif
2433 static int __Pyx_init_assertions_enabled(void) {
2434 PyObject *builtins, *debug, *debug_str;
2435 int flag;
2436 builtins = PyEval_GetBuiltins();
2437 if (!builtins) goto bad;
2438 debug_str = PyUnicode_FromStringAndSize("__debug__", 9);
2439 if (!debug_str) goto bad;
2440 debug = PyObject_GetItem(builtins, debug_str);
2441 Py_DECREF(debug_str);
2442 if (!debug) goto bad;
2443 flag = PyObject_IsTrue(debug);
2444 Py_DECREF(debug);
2445 if (flag == -1) goto bad;
2446 __pyx_assertions_enabled_flag = flag;
2447 return 0;
2448 bad:
2449 __pyx_assertions_enabled_flag = 1;
2450 return -1;
2451 }
2452#else
2453 #define __Pyx_init_assertions_enabled() (0)
2454 #define __pyx_assertions_enabled() (!Py_OptimizeFlag)
2455#endif
2456
2457/* PyAssertionError_Check.proto */
2458#define __Pyx_PyExc_AssertionError_Check(obj) __Pyx_TypeCheck(obj, PyExc_AssertionError)
2459
2460/* PyFrozenDict.proto (used by GetItemInt) */
2461#if CYTHON_COMPILING_IN_LIMITED_API
2462#define __Pyx_PyFrozenDict_TypePtr ((PyTypeObject*) __pyx_mstate_global->__Pyx_PyFrozenDictType)
2463#define __Pyx_PyFrozenDict_New(it) __Pyx__PyFrozenDict_New(__pyx_mstate_global->__Pyx_PyFrozenDictType, it)
2464static CYTHON_INLINE PyObject* __Pyx__PyFrozenDict_New(PyObject* frozendict_type, PyObject* it);
2465#define __Pyx_PyFrozenDict_NewEmpty() __Pyx_PyFrozenDict_New(NULL)
2466#define __Pyx_PyFrozenDict_Check(obj) PyObject_TypeCheck((obj), __Pyx_PyFrozenDict_TypePtr)
2467#define __Pyx_PyFrozenDict_CheckExact(obj) Py_IS_TYPE((obj), __Pyx_PyFrozenDict_TypePtr)
2468#define __Pyx_PyAnyDict_Check(obj) __Pyx__PyAnyDict_Check(obj, __Pyx_PyFrozenDict_TypePtr)
2469static CYTHON_INLINE int __Pyx__PyAnyDict_Check(PyObject *obj, PyTypeObject* frozendict_type) {
2470 return PyObject_TypeCheck(obj, &PyDict_Type) || PyObject_TypeCheck(obj, frozendict_type);
2471}
2472#define __Pyx_PyAnyDict_CheckExact(obj) __Pyx__PyAnyDict_CheckExact(obj, __Pyx_PyFrozenDict_TypePtr)
2473static CYTHON_INLINE int __Pyx__PyAnyDict_CheckExact(PyObject *obj, PyTypeObject* frozendict_type) {
2474 return Py_IS_TYPE(obj, &PyDict_Type) || Py_IS_TYPE(obj, frozendict_type);
2475}
2476#elif PY_VERSION_HEX >= 0x030f00a6 ||\
2477 (defined(PyFrozenDict_Check) && defined(PyAnyDict_Check) && defined(PyFrozenDict_New))
2478#define __Pyx_PyFrozenDict_TypePtr (&PyFrozenDict_Type)
2479#define __Pyx_PyFrozenDict_New(it) PyFrozenDict_New(it)
2480#define __Pyx_PyFrozenDict_NewEmpty() PyFrozenDict_New(NULL)
2481#define __Pyx_PyFrozenDict_Check(obj) PyFrozenDict_Check(obj)
2482#define __Pyx_PyFrozenDict_CheckExact(obj) PyFrozenDict_CheckExact(obj)
2483#define __Pyx_PyAnyDict_Check(obj) PyAnyDict_Check(obj)
2484#define __Pyx_PyAnyDict_CheckExact(obj) PyAnyDict_CheckExact(obj)
2485#else
2486#define __Pyx_PyFrozenDict_TypePtr (&PyDict_Type)
2487static CYTHON_INLINE PyObject* __Pyx_PyFrozenDict_New(PyObject* it) {
2488 if (!it) {
2489 return PyDict_New();
2490 } else if (PyDict_Check(it)) {
2491 return PyDict_Copy(it);
2492 } else {
2493 PyObject *dict = PyDict_New();
2494 if (!dict) return NULL;
2495 PyObject *result = PyNumber_InPlaceOr(dict, it);
2496 Py_DECREF(dict);
2497 return result;
2498 }
2499}
2500#define __Pyx_PyFrozenDict_NewEmpty() PyDict_New()
2501#define __Pyx_PyFrozenDict_Check(obj) PyDict_Check(obj)
2502#define __Pyx_PyFrozenDict_CheckExact(obj) PyDict_CheckExact(obj)
2503#define __Pyx_PyAnyDict_Check(obj) PyDict_Check(obj)
2504#define __Pyx_PyAnyDict_CheckExact(obj) PyDict_CheckExact(obj)
2505#endif
2506
2507/* GetItemInt.proto */
2508#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, wraparound, boundscheck, has_gil, unsafe_shared)\
2509 (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
2510 __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, wraparound, boundscheck, unsafe_shared) :\
2511 __Pyx_GetItemInt_Generic(o, to_py_func(i)))
2512#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, wraparound, boundscheck, has_gil, unsafe_shared)\
2513 (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
2514 __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck, unsafe_shared) :\
2515 (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
2516static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
2517 int wraparound, int boundscheck, int unsafe_shared);
2518#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, wraparound, boundscheck, has_gil, unsafe_shared)\
2519 (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
2520 __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck, unsafe_shared) :\
2521 (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
2522static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
2523 int wraparound, int boundscheck, int unsafe_shared);
2524static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
2525static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
2526 int wraparound, int boundscheck, int unsafe_shared);
2527
2528/* PyObjectFastCallMethod.proto */
2529#if CYTHON_VECTORCALL
2530#define __Pyx_PyObject_FastCallMethod(name, args, nargsf) PyObject_VectorcallMethod(name, args, nargsf, NULL)
2531#else
2532static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf);
2533#endif
2534
2535/* FormatTypeName.proto (used by RaiseErrorWithObjectType1) */
2536#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x030d0000
2537typedef PyObject *__Pyx_TypeName;
2538#define __Pyx_FMT_TYPENAME "%N"
2539#define __Pyx_PyType_GetFullyQualifiedName(tp) Py_NewRef((PyObject*)tp)
2540#define __Pyx_DECREF_TypeName(obj) Py_DECREF(obj)
2541#elif CYTHON_COMPILING_IN_LIMITED_API
2542typedef PyObject *__Pyx_TypeName;
2543#define __Pyx_FMT_TYPENAME "%U"
2544#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj)
2545static __Pyx_TypeName __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp);
2546#else // !LIMITED_API
2547typedef const char *__Pyx_TypeName;
2548#define __Pyx_FMT_TYPENAME "%.200s"
2549#define __Pyx_PyType_GetFullyQualifiedName(tp) ((tp)->tp_name)
2550#define __Pyx_DECREF_TypeName(obj)
2551#endif
2552
2553/* RaiseErrorWithObjectType1.proto (used by RaiseUnexpectedTypeError) */
2554#define __Pyx_RaiseTypeErrorWithObjectType1(message, arg, obj) __Pyx_RaiseErrorWithObjectType1(PyExc_TypeError, message, arg, obj)
2555#define __Pyx_RaiseErrorWithObjectType1(exc_type, message, arg, obj) __Pyx_RaiseErrorWithType1(exc_type, message, arg, Py_TYPE(obj))
2556CYTHON_UNUSED
2557static void __Pyx_RaiseErrorWithType1(PyObject* exc_type, const char* message, const char *arg, PyTypeObject *type_obj);
2558
2559/* RaiseUnexpectedTypeError.proto */
2560CYTHON_UNUSED
2561static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj);
2562
2563/* TypeImport.proto */
2564#ifndef __PYX_HAVE_RT_ImportType_proto_3_3_0
2565#define __PYX_HAVE_RT_ImportType_proto_3_3_0
2566#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
2567#include <stdalign.h>
2568#endif
2569#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L
2570#define __PYX_GET_STRUCT_ALIGNMENT_3_3_0(s) alignof(s)
2571#else
2572#define __PYX_GET_STRUCT_ALIGNMENT_3_3_0(s) sizeof(void*)
2573#endif
2574enum __Pyx_ImportType_CheckSize_3_3_0 {
2575 __Pyx_ImportType_CheckSize_Error_3_3_0 = 0,
2576 __Pyx_ImportType_CheckSize_Warn_3_3_0 = 1,
2577 __Pyx_ImportType_CheckSize_Ignore_3_3_0 = 2
2578};
2579static PyTypeObject *__Pyx_ImportType_3_3_0(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_3_0 check_size);
2580#endif
2581
2582/* PyObjectGetAttrStrNoError.proto (used by HasAttr) */
2583static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);
2584
2585/* HasAttr.proto (used by ImportImpl) */
2586#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
2587#define __Pyx_HasAttr(o, n) PyObject_HasAttrWithError(o, n)
2588#else
2589static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);
2590#endif
2591
2592/* TupleOrListFromArrayImpl.proto (used by ListFromArray) */
2593CYTHON_UNUSED static PyObject *
2594__Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n);
2595
2596/* ListFromArray.proto (used by ImportImpl) */
2597
2598
2599/* ImportImpl.export */
2600static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level);
2601
2602/* Import.proto */
2603static CYTHON_INLINE PyObject *__Pyx_Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, int level);
2604
2605/* dict_setdefault.proto (used by FetchCommonType) */
2606static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value);
2607
2608/* AddModuleRef.proto (used by FetchSharedCythonModule) */
2609#if ((CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && PY_VERSION_HEX < 0x030F00a3) ||\
2610 __PYX_LIMITED_VERSION_HEX < 0x030d0000)
2611 static PyObject *__Pyx_PyImport_AddModuleRef(const char *name);
2612#else
2613 #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name)
2614#endif
2615
2616/* FetchSharedCythonModule.proto (used by FetchCommonType) */
2617static PyObject *__Pyx_FetchSharedCythonABIModule(void);
2618
2619/* VerifyCachedType.proto (used by FetchCommonType) */
2620static int __Pyx_VerifyCachedType(PyObject *cached_type,
2621 const char *name,
2622 Py_ssize_t expected_basicsize);
2623
2624/* FetchCommonType.proto (used by CommonTypesMetaclass) */
2625static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases);
2626
2627/* CommonTypesMetaclass.proto (used by CythonFunctionShared) */
2628static int __pyx_CommonTypesMetaclass_init(PyObject *module);
2629#define __Pyx_CommonTypesMetaclass_USED
2630
2631/* CythonFunctionPerModule.proto (used by CythonFunctionShared) */
2632#define __Pyx_CyFunction_USED
2633#if CYTHON_OPAQUE_SHARED_TYPES
2634#define __Pyx_as_CyFunctionObject(o) ((__pyx_CyFunctionObject *)PyObject_GetTypeData((o), __pyx_mstate_global->__pyx_CyFunctionType))
2635#else
2636#define __Pyx_as_CyFunctionObject(o) ((__pyx_CyFunctionObject *)o)
2637#endif
2638#define __Pyx_CYFUNCTION_STATICMETHOD 0x01
2639#define __Pyx_CYFUNCTION_CLASSMETHOD 0x02
2640#define __Pyx_CYFUNCTION_CCLASS 0x04
2641#define __Pyx_CYFUNCTION_COROUTINE 0x08
2642#define __Pyx_CyFunction_GetClosure(f)\
2643 ((__Pyx_as_CyFunctionObject(f))->func_closure)
2644#if CYTHON_COMPILING_IN_LIMITED_API
2645 #define __Pyx__CyFunction_GetClassObj(f)\
2646 ((f)->func_classobj)
2647#else
2648 #define __Pyx__CyFunction_GetClassObj(f)\
2649 ((PyObject*) ((PyCMethodObject *) (f))->mm_class)
2650#endif
2651#define __Pyx_CyFunction_GetClassObj(f)\
2652 __Pyx__CyFunction_GetClassObj(__Pyx_as_CyFunctionObject(f))
2653#define __Pyx_CyFunction_SetClassObj(f, classobj)\
2654 __Pyx__CyFunction_SetClassObj(__Pyx_as_CyFunctionObject(f), (classobj))
2655#define __Pyx_CyFunction_Defaults(type, f)\
2656 ((type *)((__Pyx_as_CyFunctionObject(f))->defaults))
2657#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
2658 (__Pyx_as_CyFunctionObject(f))->defaults_getter = (g)
2659typedef struct {
2660#if CYTHON_COMPILING_IN_LIMITED_API
2661#if !CYTHON_OPAQUE_OBJECTS
2662 PyObject_HEAD
2663#endif
2664 PyMethodDef *func_methoddef;
2665 PyObject *func_module;
2666#else
2667 PyCMethodObject func;
2668#endif
2669#if (CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY) && CYTHON_VECTORCALL
2670 __pyx_vectorcallfunc func_vectorcall;
2671#endif
2672#if CYTHON_COMPILING_IN_LIMITED_API
2673 PyObject *func_weakreflist;
2674#endif
2675#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
2676 PyObject *func_dict;
2677#endif
2678 PyObject *func_name;
2679 PyObject *func_qualname;
2680 PyObject *func_doc;
2681 PyObject *func_globals;
2682 PyObject *func_code;
2683 PyObject *func_closure;
2684#if CYTHON_COMPILING_IN_LIMITED_API
2685 PyObject *func_classobj;
2686#endif
2687 PyObject *defaults;
2688 int flags;
2689 PyObject *defaults_tuple;
2690 PyObject *defaults_kwdict;
2691 PyObject *(*defaults_getter)(PyObject *);
2692 PyObject *func_annotations;
2693#if __PYX_LIMITED_VERSION_HEX < 0x030B0000
2694 PyObject *func_is_coroutine;
2695#endif
2696} __pyx_CyFunctionObject;
2697#undef __Pyx_CyOrPyCFunction_Check
2698#define __Pyx_CyFunction_Check(obj) __Pyx_TypeCheck(obj, __pyx_mstate_global->__pyx_CyFunctionType)
2699#define __Pyx_CyOrPyCFunction_Check(obj) __Pyx_TypeCheck2(obj, __pyx_mstate_global->__pyx_CyFunctionType, &PyCFunction_Type)
2700#define __Pyx_CyFunction_CheckExact(obj) Py_IS_TYPE(obj, __pyx_mstate_global->__pyx_CyFunctionType)
2701static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void));
2702#undef __Pyx_IsSameCFunction
2703#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCyOrCFunction(func, cfunc)
2704static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj);
2705static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func,
2706 PyTypeObject *defaults_type);
2707static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
2708 PyObject *tuple);
2709static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
2710 PyObject *dict);
2711static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
2712 PyObject *dict);
2713static int __pyx_CyFunction_init(PyObject *module);
2714#if CYTHON_VECTORCALL
2715#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
2716#define __Pyx_CyFunction_func_vectorcall(f) ((f)->func_vectorcall)
2717#else
2718#define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall)
2719#endif
2720#endif
2721
2722/* CallTypeTraverse.proto (used by CythonFunctionShared) */
2723#if !CYTHON_USE_TYPE_SPECS
2724#define __Pyx_call_type_traverse(o, always_call, visit, arg) 0
2725#else
2726static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg);
2727#endif
2728
2729/* PyMethodNew.proto (used by CythonFunctionShared) */
2730static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ);
2731
2732/* PyVectorcallFastCallDict.proto (used by CythonFunctionShared) */
2733#if CYTHON_VECTORCALL
2734static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw);
2735#endif
2736
2737/* CythonFunctionShared.proto (used by CythonFunction) */
2738static PyObject *__Pyx_CyFunction_Init(PyObject *op_in, PyMethodDef *ml,
2739 int flags, PyObject* qualname,
2740 PyObject *closure,
2741 PyObject *module, PyObject *globals,
2742 PyObject* code);
2743#if CYTHON_VECTORCALL
2744static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
2745static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
2746static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
2747static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
2748#endif
2749
2750/* CythonFunction.export */
2751static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml,
2752 int flags, PyObject* qualname,
2753 PyObject *closure,
2754 PyObject *module, PyObject *globals,
2755 PyObject* code);
2756static PyTypeObject *__Pyx_Get_CyFunction_Type(void);
2757
2758/* PyDictVersioning.proto (used by CLineInTraceback) */
2759#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
2760#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1)
2761#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)
2762#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
2763 (version_var) = __PYX_GET_DICT_VERSION(dict);\
2764 (cache_var) = (value);
2765#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
2766 static PY_UINT64_T __pyx_dict_version = 0;\
2767 static PyObject *__pyx_dict_cached_value = NULL;\
2768 if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
2769 (VAR) = __Pyx_XNewRef(__pyx_dict_cached_value);\
2770 } else {\
2771 (VAR) = __pyx_dict_cached_value = (LOOKUP);\
2772 __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
2773 }\
2774}
2775static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
2776static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
2777static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
2778#else
2779#define __PYX_GET_DICT_VERSION(dict) (0)
2780#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
2781#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);
2782#endif
2783
2784/* CLineInTraceback.proto (used by AddTraceback) */
2785#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME
2786static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
2787#else
2788#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
2789#endif
2790
2791/* CodeObjectCache.proto (used by AddTraceback) */
2792#if CYTHON_COMPILING_IN_LIMITED_API
2793typedef PyObject __Pyx_CachedCodeObjectType;
2794#else
2795typedef PyCodeObject __Pyx_CachedCodeObjectType;
2796#endif
2797typedef struct {
2798 __Pyx_CachedCodeObjectType* code_object;
2799 int code_line;
2800} __Pyx_CodeObjectCacheEntry;
2801struct __Pyx_CodeObjectCache {
2802 int count;
2803 int max_count;
2804 __Pyx_CodeObjectCacheEntry* entries;
2805 #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
2806 __pyx_atomic_int_type accessor_count;
2807 #endif
2808};
2809static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
2810static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line);
2811static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object);
2812
2813/* AddTraceback.proto */
2814static void __Pyx_AddTraceback(const char *funcname, int c_line,
2815 int py_line, const char *filename);
2816
2817/* GCCDiagnostics.proto */
2818#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
2819#define __Pyx_HAS_GCC_DIAGNOSTIC
2820#endif
2821
2822/* RealImag.proto */
2823#if CYTHON_CCOMPLEX
2824 #ifdef __cplusplus
2825 #define __Pyx_CREAL(z) ((z).real())
2826 #define __Pyx_CIMAG(z) ((z).imag())
2827 #else
2828 #define __Pyx_CREAL(z) (__real__(z))
2829 #define __Pyx_CIMAG(z) (__imag__(z))
2830 #endif
2831#else
2832 #define __Pyx_CREAL(z) ((z).real)
2833 #define __Pyx_CIMAG(z) ((z).imag)
2834#endif
2835#if defined(__cplusplus) && CYTHON_CCOMPLEX\
2836 && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103)
2837 #define __Pyx_SET_CREAL(z,x) ((z).real(x))
2838 #define __Pyx_SET_CIMAG(z,y) ((z).imag(y))
2839#else
2840 #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
2841 #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
2842#endif
2843
2844/* Arithmetic.proto */
2845#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
2846 #define __Pyx_c_eq_float(a, b) ((a)==(b))
2847 #define __Pyx_c_sum_float(a, b) ((a)+(b))
2848 #define __Pyx_c_diff_float(a, b) ((a)-(b))
2849 #define __Pyx_c_prod_float(a, b) ((a)*(b))
2850 #define __Pyx_c_quot_float(a, b) ((a)/(b))
2851 #define __Pyx_c_neg_float(a) (-(a))
2852 #ifdef __cplusplus
2853 #define __Pyx_c_is_zero_float(z) ((z)==(float)0)
2854 #define __Pyx_c_conj_float(z) (::std::conj(z))
2855 #if 1
2856 #define __Pyx_c_abs_float(z) (::std::abs(z))
2857 #define __Pyx_c_pow_float(a, b) (::std::pow(a, b))
2858 #endif
2859 #else
2860 #define __Pyx_c_is_zero_float(z) ((z)==0)
2861 #define __Pyx_c_conj_float(z) (conjf(z))
2862 #if 1
2863 #define __Pyx_c_abs_float(z) (cabsf(z))
2864 #define __Pyx_c_pow_float(a, b) (cpowf(a, b))
2865 #endif
2866 #endif
2867#else
2868 static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex);
2869 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex);
2870 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex);
2871 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex);
2872 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex);
2873 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex);
2874 static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex);
2875 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex);
2876 #if 1
2877 static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex);
2878 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex);
2879 #endif
2880#endif
2881
2882/* Arithmetic.proto */
2883#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
2884 #define __Pyx_c_eq_double(a, b) ((a)==(b))
2885 #define __Pyx_c_sum_double(a, b) ((a)+(b))
2886 #define __Pyx_c_diff_double(a, b) ((a)-(b))
2887 #define __Pyx_c_prod_double(a, b) ((a)*(b))
2888 #define __Pyx_c_quot_double(a, b) ((a)/(b))
2889 #define __Pyx_c_neg_double(a) (-(a))
2890 #ifdef __cplusplus
2891 #define __Pyx_c_is_zero_double(z) ((z)==(double)0)
2892 #define __Pyx_c_conj_double(z) (::std::conj(z))
2893 #if 1
2894 #define __Pyx_c_abs_double(z) (::std::abs(z))
2895 #define __Pyx_c_pow_double(a, b) (::std::pow(a, b))
2896 #endif
2897 #else
2898 #define __Pyx_c_is_zero_double(z) ((z)==0)
2899 #define __Pyx_c_conj_double(z) (conj(z))
2900 #if 1
2901 #define __Pyx_c_abs_double(z) (cabs(z))
2902 #define __Pyx_c_pow_double(a, b) (cpow(a, b))
2903 #endif
2904 #endif
2905#else
2906 static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex);
2907 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex);
2908 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex);
2909 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex);
2910 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex);
2911 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex);
2912 static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex);
2913 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex);
2914 #if 1
2915 static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex);
2916 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex);
2917 #endif
2918#endif
2919
2920/* Arithmetic.proto */
2921#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
2922 #define __Pyx_c_eq_long__double(a, b) ((a)==(b))
2923 #define __Pyx_c_sum_long__double(a, b) ((a)+(b))
2924 #define __Pyx_c_diff_long__double(a, b) ((a)-(b))
2925 #define __Pyx_c_prod_long__double(a, b) ((a)*(b))
2926 #define __Pyx_c_quot_long__double(a, b) ((a)/(b))
2927 #define __Pyx_c_neg_long__double(a) (-(a))
2928 #ifdef __cplusplus
2929 #define __Pyx_c_is_zero_long__double(z) ((z)==(long double)0)
2930 #define __Pyx_c_conj_long__double(z) (::std::conj(z))
2931 #if 1
2932 #define __Pyx_c_abs_long__double(z) (::std::abs(z))
2933 #define __Pyx_c_pow_long__double(a, b) (::std::pow(a, b))
2934 #endif
2935 #else
2936 #define __Pyx_c_is_zero_long__double(z) ((z)==0)
2937 #define __Pyx_c_conj_long__double(z) (conjl(z))
2938 #if 1
2939 #define __Pyx_c_abs_long__double(z) (cabsl(z))
2940 #define __Pyx_c_pow_long__double(a, b) (cpowl(a, b))
2941 #endif
2942 #endif
2943#else
2944 static CYTHON_INLINE int __Pyx_c_eq_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
2945 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_sum_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
2946 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_diff_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
2947 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_prod_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
2948 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_quot_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
2949 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_neg_long__double(__pyx_t_long_double_complex);
2950 static CYTHON_INLINE int __Pyx_c_is_zero_long__double(__pyx_t_long_double_complex);
2951 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_conj_long__double(__pyx_t_long_double_complex);
2952 #if 1
2953 static CYTHON_INLINE long double __Pyx_c_abs_long__double(__pyx_t_long_double_complex);
2954 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_pow_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
2955 #endif
2956#endif
2957
2958/* CIntFromPy.proto */
2959static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *);
2960
2961/* PyObjectVectorcallKwds.proto (used by PyObjectVectorcallMethodKwds) */
2962#if CYTHON_VECTORCALL
2963#define __Pyx_Object_VectorcallKwds PyObject_Vectorcall
2964CYTHON_UNUSED static int __Pyx_CheckVectorcallKwarg(PyObject *kwnames, Py_ssize_t i);
2965#else
2966#define __Pyx_Object_VectorcallKwds __Pyx_PyObject_FastCallDict
2967CYTHON_UNUSED static PyObject *__Pyx_MakeKwargDict(PyObject **keys, PyObject **values, Py_ssize_t n);
2968CYTHON_UNUSED static int __Pyx_CheckVectorcallKwarg(PyObject **kwnames, Py_ssize_t i);
2969#endif
2970
2971/* PyObjectVectorcallMethodKwds.proto (used by CIntToPy) */
2972#if CYTHON_VECTORCALL
2973#define __Pyx_Object_VectorcallMethodKwds PyObject_VectorcallMethod
2974#else
2975static PyObject *__Pyx_Object_VectorcallMethodKwds(PyObject *name, PyObject *const *args, size_t nargsf, PyObject *kwnames);
2976#endif
2977
2978/* CIntToPy.proto */
2979static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value);
2980
2981/* CIntToPy.proto */
2982static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int(int value);
2983
2984/* CIntFromPy.proto */
2985static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *);
2986
2987/* GetRuntimeVersion.proto */
2988#if __PYX_LIMITED_VERSION_HEX < 0x030b0000
2989static unsigned long __Pyx_cached_runtime_version = 0;
2990static void __Pyx_init_runtime_version(void);
2991#else
2992#define __Pyx_init_runtime_version()
2993#endif
2994static unsigned long __Pyx_get_runtime_version(void);
2995
2996/* CheckBinaryVersion.proto */
2997static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer);
2998
2999/* DecompressString.proto */
3000static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo);
3001
3002/* DecompressString_LZSS.proto */
3003static PyObject *__Pyx_DecompressString_LZSS(const char *s, size_t compressed_length, size_t uncompressed_length);
3004
3005/* MultiPhaseInitModuleState.proto */
3006#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE
3007#include <stdlib.h>
3008static PyObject *__Pyx_State_FindModule(void*);
3009static int __Pyx_State_AddModule(PyObject* module, void*);
3010static int __Pyx_State_RemoveModule(void*);
3011#elif CYTHON_USE_MODULE_STATE
3012#define __Pyx_State_FindModule PyState_FindModule
3013#define __Pyx_State_AddModule PyState_AddModule
3014#define __Pyx_State_RemoveModule PyState_RemoveModule
3015#endif
3016
3017/* #### Code section: module_declarations ### */
3018/* CythonABIVersion.proto */
3019#if CYTHON_COMPILING_IN_LIMITED_API
3020 #if CYTHON_VECTORCALL
3021 #define __PYX_VECTORCALL_ABI_SUFFIX "_vectorcall"
3022 #else
3023 #define __PYX_VECTORCALL_ABI_SUFFIX
3024 #endif
3025 #define __PYX_LIMITED_ABI_SUFFIX "limited" __PYX_VECTORCALL_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX
3026#else
3027 #define __PYX_LIMITED_ABI_SUFFIX
3028#endif
3029#if __PYX_HAS_PY_AM_SEND == 1
3030 #define __PYX_AM_SEND_ABI_SUFFIX
3031#elif __PYX_HAS_PY_AM_SEND == 2
3032 #define __PYX_AM_SEND_ABI_SUFFIX "amsendbackport"
3033#else
3034 #define __PYX_AM_SEND_ABI_SUFFIX "noamsend"
3035#endif
3036#ifndef __PYX_MONITORING_ABI_SUFFIX
3037 #define __PYX_MONITORING_ABI_SUFFIX
3038#endif
3039#if CYTHON_USE_TP_FINALIZE
3040 #define __PYX_TP_FINALIZE_ABI_SUFFIX
3041#else
3042 #define __PYX_TP_FINALIZE_ABI_SUFFIX "nofinalize"
3043#endif
3044#if CYTHON_USE_FREELISTS || !defined(__Pyx_AsyncGen_USED)
3045 #define __PYX_FREELISTS_ABI_SUFFIX
3046#else
3047 #define __PYX_FREELISTS_ABI_SUFFIX "nofreelists"
3048#endif
3049#if CYTHON_OPAQUE_OBJECTS && CYTHON_COMPILING_IN_LIMITED_API
3050 #define __PYX_OPAQUE_OBJECTS_ABI_SUFFIX "opaque"
3051#else
3052 #define __PYX_OPAQUE_OBJECTS_ABI_SUFFIX
3053#endif
3054#define CYTHON_ABI __PYX_ABI_VERSION __PYX_LIMITED_ABI_SUFFIX __PYX_MONITORING_ABI_SUFFIX __PYX_TP_FINALIZE_ABI_SUFFIX __PYX_FREELISTS_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX __PYX_OPAQUE_OBJECTS_ABI_SUFFIX
3055#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI
3056#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "."
3057
3058static CYTHON_INLINE PyTypeObject *__pyx_f_5numpy_5dtype_7typeobj___get__(PyArray_Descr *__pyx_v_self); /* proto*/
3059static CYTHON_INLINE char __pyx_f_5numpy_5dtype_4kind___get__(PyArray_Descr *__pyx_v_self); /* proto*/
3060static CYTHON_INLINE char __pyx_f_5numpy_5dtype_4type___get__(PyArray_Descr *__pyx_v_self); /* proto*/
3061static CYTHON_INLINE char __pyx_f_5numpy_5dtype_9byteorder___get__(PyArray_Descr *__pyx_v_self); /* proto*/
3062static CYTHON_INLINE int __pyx_f_5numpy_5dtype_8type_num___get__(PyArray_Descr *__pyx_v_self); /* proto*/
3063static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_8itemsize___get__(PyArray_Descr *__pyx_v_self); /* proto*/
3064static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_9alignment___get__(PyArray_Descr *__pyx_v_self); /* proto*/
3065static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_6fields___get__(PyArray_Descr *__pyx_v_self); /* proto*/
3066static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_5names___get__(PyArray_Descr *__pyx_v_self); /* proto*/
3067static CYTHON_INLINE PyArray_ArrayDescr *__pyx_f_5numpy_5dtype_8subarray___get__(PyArray_Descr *__pyx_v_self); /* proto*/
3068static CYTHON_INLINE npy_uint64 __pyx_f_5numpy_5dtype_5flags___get__(PyArray_Descr *__pyx_v_self); /* proto*/
3069static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_7numiter___get__(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
3070static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_4size___get__(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
3071static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_5index___get__(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
3072static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_2nd___get__(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
3073static CYTHON_INLINE npy_intp *__pyx_f_5numpy_9broadcast_10dimensions___get__(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
3074static CYTHON_INLINE void **__pyx_f_5numpy_9broadcast_5iters___get__(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
3075static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base___get__(PyArrayObject *__pyx_v_self); /* proto*/
3076static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr___get__(PyArrayObject *__pyx_v_self); /* proto*/
3077static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim___get__(PyArrayObject *__pyx_v_self); /* proto*/
3078static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape___get__(PyArrayObject *__pyx_v_self); /* proto*/
3079static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides___get__(PyArrayObject *__pyx_v_self); /* proto*/
3080static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size___get__(PyArrayObject *__pyx_v_self); /* proto*/
3081static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data___get__(PyArrayObject *__pyx_v_self); /* proto*/
3082static CYTHON_INLINE int __pyx_f_5numpy_5ufunc_3nin___get__(PyUFuncObject *__pyx_v_self); /* proto*/
3083static CYTHON_INLINE int __pyx_f_5numpy_5ufunc_4nout___get__(PyUFuncObject *__pyx_v_self); /* proto*/
3084static CYTHON_INLINE int __pyx_f_5numpy_5ufunc_5nargs___get__(PyUFuncObject *__pyx_v_self); /* proto*/
3085static CYTHON_INLINE PyUFuncGenericFunction *__pyx_f_5numpy_5ufunc_9functions___get__(PyUFuncObject *__pyx_v_self); /* proto*/
3086static CYTHON_INLINE void **__pyx_f_5numpy_5ufunc_4data___get__(PyUFuncObject *__pyx_v_self); /* proto*/
3087static CYTHON_INLINE int __pyx_f_5numpy_5ufunc_6ntypes___get__(PyUFuncObject *__pyx_v_self); /* proto*/
3088static CYTHON_INLINE char const *__pyx_f_5numpy_5ufunc_4name___get__(PyUFuncObject *__pyx_v_self); /* proto*/
3089static CYTHON_INLINE char const *__pyx_f_5numpy_5ufunc_3doc___get__(PyUFuncObject *__pyx_v_self); /* proto*/
3090static CYTHON_INLINE void *__pyx_f_5numpy_5ufunc_3ptr___get__(PyUFuncObject *__pyx_v_self); /* proto*/
3091static CYTHON_INLINE PyObject *__pyx_f_5numpy_5ufunc_3obj___get__(PyUFuncObject *__pyx_v_self); /* proto*/
3092static CYTHON_INLINE PyObject *__pyx_f_5numpy_5ufunc_9userloops___get__(PyUFuncObject *__pyx_v_self); /* proto*/
3093
3094/* Module declarations from "libc.string" */
3095
3096/* Module declarations from "libc.stdio" */
3097
3098/* Module declarations from "__builtin__" */
3099
3100/* Module declarations from "cpython.type" */
3101
3102/* Module declarations from "cpython" */
3103
3104/* Module declarations from "cpython.object" */
3105
3106/* Module declarations from "cpython.ref" */
3107
3108/* Module declarations from "numpy" */
3109
3110/* Module declarations from "numpy" */
3111
3112/* Module declarations from "twophaseDarcyCoefficients" */
3113
3114/* Module declarations from "cTwophaseDarcyCoefficients" */
3115/* #### Code section: typeinfo ### */
3116/* #### Code section: before_global_var ### */
3117#define __Pyx_MODULE_NAME "cTwophaseDarcyCoefficients"
3118extern int __pyx_module_is_main_cTwophaseDarcyCoefficients;
3119int __pyx_module_is_main_cTwophaseDarcyCoefficients = 0;
3120
3121/* Implementation of "cTwophaseDarcyCoefficients" */
3122/* #### Code section: global_var ### */
3123/* #### Code section: string_decls ### */
3124/* #### Code section: decls ### */
3125static 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); /* proto */
3126static 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); /* proto */
3127static 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); /* proto */
3128static 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); /* proto */
3129static 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); /* proto */
3130static 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); /* proto */
3131static 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); /* proto */
3132static 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); /* proto */
3133static 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); /* proto */
3134static 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); /* proto */
3135static 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); /* proto */
3136static 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); /* proto */
3137/* #### Code section: late_includes ### */
3138/* #### Code section: module_state ### */
3139/* SmallCodeConfig */
3140#ifndef CYTHON_SMALL_CODE
3141#if defined(__clang__)
3142 #define CYTHON_SMALL_CODE
3143#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
3144 #define CYTHON_SMALL_CODE __attribute__((cold))
3145#else
3146 #define CYTHON_SMALL_CODE
3147#endif
3148#endif
3149
3150#ifdef __cplusplus
3151namespace {
3152 #endif
3153 typedef struct {
3154 PyObject *__pyx_d;
3155 PyObject *__pyx_b;
3156 PyObject *__pyx_cython_runtime;
3157 PyObject *__pyx_empty_tuple;
3158 PyObject *__pyx_empty_bytes;
3159 PyObject *__pyx_empty_unicode;
3160 PyTypeObject *__pyx_ptype_7cpython_4type_type;
3161 PyTypeObject *__pyx_ptype_5numpy_dtype;
3162 PyTypeObject *__pyx_ptype_5numpy_flatiter;
3163 PyTypeObject *__pyx_ptype_5numpy_broadcast;
3164 PyTypeObject *__pyx_ptype_5numpy_ndarray;
3165 PyTypeObject *__pyx_ptype_5numpy_generic;
3166 PyTypeObject *__pyx_ptype_5numpy_number;
3167 PyTypeObject *__pyx_ptype_5numpy_integer;
3168 PyTypeObject *__pyx_ptype_5numpy_signedinteger;
3169 PyTypeObject *__pyx_ptype_5numpy_unsignedinteger;
3170 PyTypeObject *__pyx_ptype_5numpy_inexact;
3171 PyTypeObject *__pyx_ptype_5numpy_floating;
3172 PyTypeObject *__pyx_ptype_5numpy_complexfloating;
3173 PyTypeObject *__pyx_ptype_5numpy_flexible;
3174 PyTypeObject *__pyx_ptype_5numpy_character;
3175 PyTypeObject *__pyx_ptype_5numpy_ufunc;
3176 __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_items;
3177 __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop;
3178 __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_values;
3179 PyObject *__pyx_codeobj_tab[12];
3180 PyObject *__pyx_string_tab[124];
3181/* #### Code section: module_state_contents ### */
3182/* PyFrozenDict.module_state_decls */
3183#if CYTHON_COMPILING_IN_LIMITED_API
3184PyObject *__Pyx_PyFrozenDictType;
3185#endif
3186
3187/* CommonTypesMetaclass.module_state_decls */
3188PyTypeObject *__pyx_CommonTypesMetaclassType;
3189
3190/* CachedMethodType.module_state_decls */
3191#if CYTHON_COMPILING_IN_LIMITED_API
3192PyObject *__Pyx_CachedMethodType;
3193#endif
3194
3195/* CythonFunctionPerModule.module_state_decls */
3196PyTypeObject *__pyx_CyFunctionType;
3197
3198/* CodeObjectCache.module_state_decls */
3199struct __Pyx_CodeObjectCache __pyx_code_cache;
3200
3201/* #### Code section: module_state_end ### */
3202} __pyx_mstatetype;
3203#ifdef __cplusplus
3204} /* anonymous namespace */
3205#endif
3206
3207#if CYTHON_USE_MODULE_STATE
3208#ifdef __cplusplus
3209namespace {
3210extern struct PyModuleDef __pyx_moduledef;
3211} /* anonymous namespace */
3212#else
3213static struct PyModuleDef __pyx_moduledef;
3214#endif
3215
3216#define __pyx_mstate_global (__Pyx_PyModule_GetState(__Pyx_State_FindModule(&__pyx_moduledef)))
3217
3218#define __pyx_m (__Pyx_State_FindModule(&__pyx_moduledef))
3219#else
3220static __pyx_mstatetype __pyx_mstate_global_static =
3221#ifdef __cplusplus
3222 {};
3223#else
3224 {0};
3225#endif
3226static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_static;
3227#endif
3228/* #### Code section: constant_name_defines ### */
3229#define __pyx_kp_u_ __pyx_string_tab[0]
3230#define __pyx_kp_u_Note_that_Cython_is_deliberately __pyx_string_tab[1]
3231#define __pyx_kp_u_add_note __pyx_string_tab[2]
3232#define __pyx_kp_u_configuration_density_w_flag_0_a __pyx_string_tab[3]
3233#define __pyx_kp_u_numpy__core_multiarray_failed_to __pyx_string_tab[4]
3234#define __pyx_kp_u_numpy__core_umath_failed_to_impo __pyx_string_tab[5]
3235#define __pyx_kp_u_proteus_cTwophaseDarcyCoefficien __pyx_string_tab[6]
3236#define __pyx_n_u_Kbar __pyx_string_tab[7]
3237#define __pyx_n_u_Pyx_PyDict_NextRef __pyx_string_tab[8]
3238#define __pyx_n_u_annotate __pyx_string_tab[9]
3239#define __pyx_n_u_func __pyx_string_tab[10]
3240#define __pyx_n_u_main __pyx_string_tab[11]
3241#define __pyx_n_u_module __pyx_string_tab[12]
3242#define __pyx_n_u_name __pyx_string_tab[13]
3243#define __pyx_n_u_qualname __pyx_string_tab[14]
3244#define __pyx_n_u_test __pyx_string_tab[15]
3245#define __pyx_n_u_is_coroutine __pyx_string_tab[16]
3246#define __pyx_n_u_a __pyx_string_tab[17]
3247#define __pyx_n_u_advectionScaling __pyx_string_tab[18]
3248#define __pyx_n_u_an __pyx_string_tab[19]
3249#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[20]
3250#define __pyx_n_u_aw __pyx_string_tab[21]
3251#define __pyx_n_u_b __pyx_string_tab[22]
3252#define __pyx_n_u_cTwophaseDarcyCoefficients __pyx_string_tab[23]
3253#define __pyx_n_u_calcFlag __pyx_string_tab[24]
3254#define __pyx_n_u_capillaryDiffusionScaling __pyx_string_tab[25]
3255#define __pyx_n_u_cline_in_traceback __pyx_string_tab[26]
3256#define __pyx_n_u_colind __pyx_string_tab[27]
3257#define __pyx_n_u_compressibilityFlag __pyx_string_tab[28]
3258#define __pyx_n_u_da __pyx_string_tab[29]
3259#define __pyx_n_u_dan __pyx_string_tab[30]
3260#define __pyx_n_u_dan_dpsic __pyx_string_tab[31]
3261#define __pyx_n_u_dan_dpsiw __pyx_string_tab[32]
3262#define __pyx_n_u_daw __pyx_string_tab[33]
3263#define __pyx_n_u_daw_dpsic __pyx_string_tab[34]
3264#define __pyx_n_u_daw_dpsiw __pyx_string_tab[35]
3265#define __pyx_n_u_density_n_flag __pyx_string_tab[36]
3266#define __pyx_n_u_density_w_flag __pyx_string_tab[37]
3267#define __pyx_n_u_df __pyx_string_tab[38]
3268#define __pyx_n_u_dfn_dpsiw __pyx_string_tab[39]
3269#define __pyx_n_u_dfn_dsw __pyx_string_tab[40]
3270#define __pyx_n_u_dfw_dpsiw __pyx_string_tab[41]
3271#define __pyx_n_u_dfw_dsw __pyx_string_tab[42]
3272#define __pyx_n_u_dm __pyx_string_tab[43]
3273#define __pyx_n_u_dmn __pyx_string_tab[44]
3274#define __pyx_n_u_dmn_dpsic __pyx_string_tab[45]
3275#define __pyx_n_u_dmn_dpsiw __pyx_string_tab[46]
3276#define __pyx_n_u_dmw __pyx_string_tab[47]
3277#define __pyx_n_u_dmw_dpsic __pyx_string_tab[48]
3278#define __pyx_n_u_dmw_dpsiw __pyx_string_tab[49]
3279#define __pyx_n_u_domain __pyx_string_tab[50]
3280#define __pyx_n_u_dphi __pyx_string_tab[51]
3281#define __pyx_n_u_dphi_psin_dpsic __pyx_string_tab[52]
3282#define __pyx_n_u_dphi_psin_dpsiw __pyx_string_tab[53]
3283#define __pyx_n_u_dphi_psin_dsw __pyx_string_tab[54]
3284#define __pyx_n_u_dphi_psiw_dpsiw __pyx_string_tab[55]
3285#define __pyx_n_u_dpsin __pyx_string_tab[56]
3286#define __pyx_n_u_dpsin_dpsiw __pyx_string_tab[57]
3287#define __pyx_n_u_f __pyx_string_tab[58]
3288#define __pyx_n_u_fn __pyx_string_tab[59]
3289#define __pyx_n_u_format __pyx_string_tab[60]
3290#define __pyx_n_u_fw __pyx_string_tab[61]
3291#define __pyx_n_u_g __pyx_string_tab[62]
3292#define __pyx_n_u_generateSplineTables __pyx_string_tab[63]
3293#define __pyx_n_u_grad_psic __pyx_string_tab[64]
3294#define __pyx_n_u_items __pyx_string_tab[65]
3295#define __pyx_n_u_iwork_psk __pyx_string_tab[66]
3296#define __pyx_n_u_m __pyx_string_tab[67]
3297#define __pyx_n_u_matType __pyx_string_tab[68]
3298#define __pyx_n_u_mn __pyx_string_tab[69]
3299#define __pyx_n_u_mun __pyx_string_tab[70]
3300#define __pyx_n_u_muw __pyx_string_tab[71]
3301#define __pyx_n_u_mw __pyx_string_tab[72]
3302#define __pyx_n_u_nPointsPerSimplex __pyx_string_tab[73]
3303#define __pyx_n_u_nSimplex __pyx_string_tab[74]
3304#define __pyx_n_u_nknots __pyx_string_tab[75]
3305#define __pyx_n_u_np __pyx_string_tab[76]
3306#define __pyx_n_u_numpy __pyx_string_tab[77]
3307#define __pyx_n_u_omega __pyx_string_tab[78]
3308#define __pyx_n_u_phi __pyx_string_tab[79]
3309#define __pyx_n_u_phi_psin __pyx_string_tab[80]
3310#define __pyx_n_u_phi_psiw __pyx_string_tab[81]
3311#define __pyx_n_u_pop __pyx_string_tab[82]
3312#define __pyx_n_u_psic __pyx_string_tab[83]
3313#define __pyx_n_u_psin __pyx_string_tab[84]
3314#define __pyx_n_u_psiw __pyx_string_tab[85]
3315#define __pyx_n_u_pskModelFlag __pyx_string_tab[86]
3316#define __pyx_n_u_qt __pyx_string_tab[87]
3317#define __pyx_n_u_rowptr __pyx_string_tab[88]
3318#define __pyx_n_u_rwork_density_n __pyx_string_tab[89]
3319#define __pyx_n_u_rwork_density_w __pyx_string_tab[90]
3320#define __pyx_n_u_rwork_psk __pyx_string_tab[91]
3321#define __pyx_n_u_rwork_psk_tol __pyx_string_tab[92]
3322#define __pyx_n_u_setdefault __pyx_string_tab[93]
3323#define __pyx_n_u_splineTable __pyx_string_tab[94]
3324#define __pyx_n_u_startIndex __pyx_string_tab[95]
3325#define __pyx_n_u_sw __pyx_string_tab[96]
3326#define __pyx_n_u_twophaseDarcy_compressibleN_spli __pyx_string_tab[97]
3327#define __pyx_n_u_twophaseDarcy_compressibleN_spli_2 __pyx_string_tab[98]
3328#define __pyx_n_u_twophaseDarcy_fc_pp_sd_het_matTy __pyx_string_tab[99]
3329#define __pyx_n_u_twophaseDarcy_fc_sd_het_matType __pyx_string_tab[100]
3330#define __pyx_n_u_twophaseDarcy_fc_sd_het_matType_2 __pyx_string_tab[101]
3331#define __pyx_n_u_twophaseDarcy_incompressible_spl_3 __pyx_string_tab[102]
3332#define __pyx_n_u_twophaseDarcy_incompressible_spl __pyx_string_tab[103]
3333#define __pyx_n_u_twophaseDarcy_incompressible_spl_2 __pyx_string_tab[104]
3334#define __pyx_n_u_twophaseDarcy_slightCompressible __pyx_string_tab[105]
3335#define __pyx_n_u_twophaseDarcy_slightCompressible_2 __pyx_string_tab[106]
3336#define __pyx_n_u_twophaseDarcy_vol_frac __pyx_string_tab[107]
3337#define __pyx_n_u_u __pyx_string_tab[108]
3338#define __pyx_n_u_values __pyx_string_tab[109]
3339#define __pyx_n_u_vol_frac_n __pyx_string_tab[110]
3340#define __pyx_n_u_vol_frac_w __pyx_string_tab[111]
3341#define __pyx_n_u_x __pyx_string_tab[112]
3342#define __pyx_kp_b_iso88591_V6_Cq_AQ_2_2_1_y_2_q_2_Q_c_aq_F __pyx_string_tab[113]
3343#define __pyx_kp_b_iso88591_r_q_q_b_Rq_q_U_Rq_Zq_Zq __pyx_string_tab[114]
3344#define __pyx_kp_b_iso88591_2_r_q_q_b_Rq_Cq_LKWXXYSTSTTZZ_S __pyx_string_tab[115]
3345#define __pyx_kp_b_iso88591_2_r_q_q_b_Rq_c_1_JJhhiijdedeekk __pyx_string_tab[116]
3346#define __pyx_kp_b_iso88591_4_r_q_q_b_Rq_Cq_G_RSSTNONOvUVVW __pyx_string_tab[117]
3347#define __pyx_kp_b_iso88591_6_r_q_q_b_Rq_c_1_LLjjkklfgfggmm __pyx_string_tab[118]
3348#define __pyx_kp_b_iso88591_F_r_q_q_b_Rq_Q_Cq_MMkkllmghghhn __pyx_string_tab[119]
3349#define __pyx_kp_b_iso88591_J_r_q_q_b_Rq_Q_Cq_MMkkllmghghhn __pyx_string_tab[120]
3350#define __pyx_kp_b_iso88591_V_r_q_q_b_Rq_Q_c_1_33ddeef_a_aa __pyx_string_tab[121]
3351#define __pyx_kp_b_iso88591_Z_r_q_q_b_Rq_Q_c_1_00aabbcbcbcc __pyx_string_tab[122]
3352#define __pyx_kp_b_iso88591_h_r_q_q_b_Rq_Q_c_1_AArrs_t_H_H __pyx_string_tab[123]
3353/* #### Code section: module_state_clear ### */
3354#if CYTHON_USE_MODULE_STATE
3355static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) {
3356 __pyx_mstatetype *clear_module_state = __Pyx_PyModule_GetState(m);
3357 if (!clear_module_state) return 0;
3358 Py_CLEAR(clear_module_state->__pyx_d);
3359 Py_CLEAR(clear_module_state->__pyx_b);
3360 Py_CLEAR(clear_module_state->__pyx_cython_runtime);
3361 Py_CLEAR(clear_module_state->__pyx_empty_tuple);
3362 Py_CLEAR(clear_module_state->__pyx_empty_bytes);
3363 Py_CLEAR(clear_module_state->__pyx_empty_unicode);
3364 #if CYTHON_PEP489_MULTI_PHASE_INIT
3365 __Pyx_State_RemoveModule(NULL);
3366 #endif
3367 Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4type_type);
3368 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_dtype);
3369 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_flatiter);
3370 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_broadcast);
3371 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_ndarray);
3372 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_generic);
3373 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_number);
3374 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_integer);
3375 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_signedinteger);
3376 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_unsignedinteger);
3377 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_inexact);
3378 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_floating);
3379 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_complexfloating);
3380 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_flexible);
3381 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_character);
3382 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_ufunc);
3383 Py_CLEAR(clear_module_state->__pyx_umethod_PyDict_Type_items.method);
3384 Py_CLEAR(clear_module_state->__pyx_umethod_PyDict_Type_pop.method);
3385 Py_CLEAR(clear_module_state->__pyx_umethod_PyDict_Type_values.method);
3386 for (int i=0; i<12; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); }
3387 for (int i=0; i<124; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); }
3388/* #### Code section: module_state_clear_contents ### */
3389/* CommonTypesMetaclass.module_state_clear */
3390Py_CLEAR(clear_module_state->__pyx_CommonTypesMetaclassType);
3391
3392/* CythonFunctionPerModule.module_state_clear */
3393Py_CLEAR(clear_module_state->__pyx_CyFunctionType);
3394
3395/* #### Code section: module_state_clear_end ### */
3396return 0;
3397}
3398#endif
3399/* #### Code section: module_state_traverse ### */
3400#if CYTHON_USE_MODULE_STATE
3401static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
3402 __pyx_mstatetype *traverse_module_state = __Pyx_PyModule_GetState(m);
3403 if (!traverse_module_state) return 0;
3404 Py_VISIT(traverse_module_state->__pyx_d);
3405 Py_VISIT(traverse_module_state->__pyx_b);
3406 Py_VISIT(traverse_module_state->__pyx_cython_runtime);
3407 __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_tuple);
3408 __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_bytes);
3409 __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_unicode);
3410 Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4type_type);
3411 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_dtype);
3412 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_flatiter);
3413 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_broadcast);
3414 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_ndarray);
3415 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_generic);
3416 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_number);
3417 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_integer);
3418 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_signedinteger);
3419 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_unsignedinteger);
3420 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_inexact);
3421 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_floating);
3422 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_complexfloating);
3423 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_flexible);
3424 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_character);
3425 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_ufunc);
3426 Py_VISIT(traverse_module_state->__pyx_umethod_PyDict_Type_items.method);
3427 Py_VISIT(traverse_module_state->__pyx_umethod_PyDict_Type_pop.method);
3428 Py_VISIT(traverse_module_state->__pyx_umethod_PyDict_Type_values.method);
3429 for (int i=0; i<12; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); }
3430 for (int i=0; i<124; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); }
3431/* #### Code section: module_state_traverse_contents ### */
3432/* CommonTypesMetaclass.module_state_traverse */
3433Py_VISIT(traverse_module_state->__pyx_CommonTypesMetaclassType);
3434
3435/* CythonFunctionPerModule.module_state_traverse */
3436Py_VISIT(traverse_module_state->__pyx_CyFunctionType);
3437
3438/* #### Code section: module_state_traverse_end ### */
3439return 0;
3440}
3441#endif
3442/* #### Code section: module_code ### */
3443
3444/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":230
3445 *
3446 * ctypedef class numpy.dtype [object PyArray_Descr, check_size ignore]:
3447 * @property # <<<<<<<<<<<<<<
3448 * cdef inline PyTypeObject* typeobj(self) noexcept nogil:
3449 * return PyDataType_TYPEOBJ(self)
3450*/
3451
3452static CYTHON_INLINE PyTypeObject *__pyx_f_5numpy_5dtype_7typeobj___get__(PyArray_Descr *__pyx_v_self) {
3453 PyTypeObject *__pyx_r;
3454
3455 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":232
3456 * @property
3457 * cdef inline PyTypeObject* typeobj(self) noexcept nogil:
3458 * return PyDataType_TYPEOBJ(self) # <<<<<<<<<<<<<<
3459 *
3460 * @property
3461*/
3462 {
3463
3464 __pyx_r = PyDataType_TYPEOBJ(__pyx_v_self);
3465 }
3466 goto __pyx_L0;
3467
3468 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":230
3469 *
3470 * ctypedef class numpy.dtype [object PyArray_Descr, check_size ignore]:
3471 * @property # <<<<<<<<<<<<<<
3472 * cdef inline PyTypeObject* typeobj(self) noexcept nogil:
3473 * return PyDataType_TYPEOBJ(self)
3474*/
3475
3476 /* function exit code */
3477 __pyx_L0:;
3478 return __pyx_r;
3479}
3480
3481/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":234
3482 * return PyDataType_TYPEOBJ(self)
3483 *
3484 * @property # <<<<<<<<<<<<<<
3485 * cdef inline char kind(self) noexcept nogil:
3486 * return PyDataType_KIND(self)
3487*/
3488
3489static CYTHON_INLINE char __pyx_f_5numpy_5dtype_4kind___get__(PyArray_Descr *__pyx_v_self) {
3490 char __pyx_r;
3491
3492 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":236
3493 * @property
3494 * cdef inline char kind(self) noexcept nogil:
3495 * return PyDataType_KIND(self) # <<<<<<<<<<<<<<
3496 *
3497 * @property
3498*/
3499 {
3500
3501 __pyx_r = PyDataType_KIND(__pyx_v_self);
3502 }
3503 goto __pyx_L0;
3504
3505 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":234
3506 * return PyDataType_TYPEOBJ(self)
3507 *
3508 * @property # <<<<<<<<<<<<<<
3509 * cdef inline char kind(self) noexcept nogil:
3510 * return PyDataType_KIND(self)
3511*/
3512
3513 /* function exit code */
3514 __pyx_L0:;
3515 return __pyx_r;
3516}
3517
3518/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":238
3519 * return PyDataType_KIND(self)
3520 *
3521 * @property # <<<<<<<<<<<<<<
3522 * cdef inline char type(self) noexcept nogil:
3523 * return PyDataType_TYPE(self)
3524*/
3525
3526static CYTHON_INLINE char __pyx_f_5numpy_5dtype_4type___get__(PyArray_Descr *__pyx_v_self) {
3527 char __pyx_r;
3528
3529 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":240
3530 * @property
3531 * cdef inline char type(self) noexcept nogil:
3532 * return PyDataType_TYPE(self) # <<<<<<<<<<<<<<
3533 *
3534 * # Numpy sometimes mutates this without warning (e.g. it'll
3535*/
3536 {
3537
3538 __pyx_r = PyDataType_TYPE(__pyx_v_self);
3539 }
3540 goto __pyx_L0;
3541
3542 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":238
3543 * return PyDataType_KIND(self)
3544 *
3545 * @property # <<<<<<<<<<<<<<
3546 * cdef inline char type(self) noexcept nogil:
3547 * return PyDataType_TYPE(self)
3548*/
3549
3550 /* function exit code */
3551 __pyx_L0:;
3552 return __pyx_r;
3553}
3554
3555/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":247
3556 * # PyArray_IsNativeByteOrder(dtype.byteorder) instead of
3557 * # directly accessing this field.
3558 * @property # <<<<<<<<<<<<<<
3559 * cdef inline char byteorder(self) noexcept nogil:
3560 * return PyDataType_BYTEORDER(self)
3561*/
3562
3563static CYTHON_INLINE char __pyx_f_5numpy_5dtype_9byteorder___get__(PyArray_Descr *__pyx_v_self) {
3564 char __pyx_r;
3565
3566 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":249
3567 * @property
3568 * cdef inline char byteorder(self) noexcept nogil:
3569 * return PyDataType_BYTEORDER(self) # <<<<<<<<<<<<<<
3570 *
3571 * @property
3572*/
3573 {
3574
3575 __pyx_r = PyDataType_BYTEORDER(__pyx_v_self);
3576 }
3577 goto __pyx_L0;
3578
3579 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":247
3580 * # PyArray_IsNativeByteOrder(dtype.byteorder) instead of
3581 * # directly accessing this field.
3582 * @property # <<<<<<<<<<<<<<
3583 * cdef inline char byteorder(self) noexcept nogil:
3584 * return PyDataType_BYTEORDER(self)
3585*/
3586
3587 /* function exit code */
3588 __pyx_L0:;
3589 return __pyx_r;
3590}
3591
3592/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":251
3593 * return PyDataType_BYTEORDER(self)
3594 *
3595 * @property # <<<<<<<<<<<<<<
3596 * cdef inline int type_num(self) noexcept nogil:
3597 * return PyDataType_TYPENUM(self)
3598*/
3599
3600static CYTHON_INLINE int __pyx_f_5numpy_5dtype_8type_num___get__(PyArray_Descr *__pyx_v_self) {
3601 int __pyx_r;
3602
3603 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":253
3604 * @property
3605 * cdef inline int type_num(self) noexcept nogil:
3606 * return PyDataType_TYPENUM(self) # <<<<<<<<<<<<<<
3607 *
3608 * @property
3609*/
3610 {
3611
3612 __pyx_r = PyDataType_TYPENUM(__pyx_v_self);
3613 }
3614 goto __pyx_L0;
3615
3616 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":251
3617 * return PyDataType_BYTEORDER(self)
3618 *
3619 * @property # <<<<<<<<<<<<<<
3620 * cdef inline int type_num(self) noexcept nogil:
3621 * return PyDataType_TYPENUM(self)
3622*/
3623
3624 /* function exit code */
3625 __pyx_L0:;
3626 return __pyx_r;
3627}
3628
3629/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":255
3630 * return PyDataType_TYPENUM(self)
3631 *
3632 * @property # <<<<<<<<<<<<<<
3633 * cdef inline npy_intp itemsize(self) noexcept nogil:
3634 * return PyDataType_ELSIZE(self)
3635*/
3636
3637static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_8itemsize___get__(PyArray_Descr *__pyx_v_self) {
3638 npy_intp __pyx_r;
3639
3640 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":257
3641 * @property
3642 * cdef inline npy_intp itemsize(self) noexcept nogil:
3643 * return PyDataType_ELSIZE(self) # <<<<<<<<<<<<<<
3644 *
3645 * @property
3646*/
3647 {
3648
3649 __pyx_r = PyDataType_ELSIZE(__pyx_v_self);
3650 }
3651 goto __pyx_L0;
3652
3653 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":255
3654 * return PyDataType_TYPENUM(self)
3655 *
3656 * @property # <<<<<<<<<<<<<<
3657 * cdef inline npy_intp itemsize(self) noexcept nogil:
3658 * return PyDataType_ELSIZE(self)
3659*/
3660
3661 /* function exit code */
3662 __pyx_L0:;
3663 return __pyx_r;
3664}
3665
3666/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":259
3667 * return PyDataType_ELSIZE(self)
3668 *
3669 * @property # <<<<<<<<<<<<<<
3670 * cdef inline npy_intp alignment(self) noexcept nogil:
3671 * return PyDataType_ALIGNMENT(self)
3672*/
3673
3674static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_9alignment___get__(PyArray_Descr *__pyx_v_self) {
3675 npy_intp __pyx_r;
3676
3677 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":261
3678 * @property
3679 * cdef inline npy_intp alignment(self) noexcept nogil:
3680 * return PyDataType_ALIGNMENT(self) # <<<<<<<<<<<<<<
3681 *
3682 * # Use fields/names with care as they may be NULL. You must check
3683*/
3684 {
3685
3686 __pyx_r = PyDataType_ALIGNMENT(__pyx_v_self);
3687 }
3688 goto __pyx_L0;
3689
3690 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":259
3691 * return PyDataType_ELSIZE(self)
3692 *
3693 * @property # <<<<<<<<<<<<<<
3694 * cdef inline npy_intp alignment(self) noexcept nogil:
3695 * return PyDataType_ALIGNMENT(self)
3696*/
3697
3698 /* function exit code */
3699 __pyx_L0:;
3700 return __pyx_r;
3701}
3702
3703/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":265
3704 * # Use fields/names with care as they may be NULL. You must check
3705 * # for this using PyDataType_HASFIELDS.
3706 * @property # <<<<<<<<<<<<<<
3707 * cdef inline object fields(self):
3708 * return <object>PyDataType_FIELDS(self)
3709*/
3710
3711static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_6fields___get__(PyArray_Descr *__pyx_v_self) {
3712 PyObject *__pyx_r = NULL;
3713 __Pyx_RefNannyDeclarations
3714 PyObject *__pyx_t_1;
3715 __Pyx_RefNannySetupContext("__get__", 0);
3716
3717 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":267
3718 * @property
3719 * cdef inline object fields(self):
3720 * return <object>PyDataType_FIELDS(self) # <<<<<<<<<<<<<<
3721 *
3722 * @property
3723*/
3724 __pyx_t_1 = PyDataType_FIELDS(__pyx_v_self);
3725
3726 {
3727 PyObject *__pyx_temp;
3728 {
3729 __pyx_temp = __pyx_r;
3730 __Pyx_INCREF(((PyObject *)__pyx_t_1));
3731 __pyx_r = ((PyObject *)__pyx_t_1);
3732 }
3733 __Pyx_XDECREF(__pyx_temp);
3734 }
3735
3736 goto __pyx_L0;
3737
3738 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":265
3739 * # Use fields/names with care as they may be NULL. You must check
3740 * # for this using PyDataType_HASFIELDS.
3741 * @property # <<<<<<<<<<<<<<
3742 * cdef inline object fields(self):
3743 * return <object>PyDataType_FIELDS(self)
3744*/
3745
3746 /* function exit code */
3747 __pyx_L0:;
3748 __Pyx_XGIVEREF(__pyx_r);
3749 __Pyx_RefNannyFinishContext();
3750 return __pyx_r;
3751}
3752
3753/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":269
3754 * return <object>PyDataType_FIELDS(self)
3755 *
3756 * @property # <<<<<<<<<<<<<<
3757 * cdef inline tuple names(self):
3758 * return <tuple>PyDataType_NAMES(self)
3759*/
3760
3761static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_5names___get__(PyArray_Descr *__pyx_v_self) {
3762 PyObject *__pyx_r = NULL;
3763 __Pyx_RefNannyDeclarations
3764 PyObject *__pyx_t_1;
3765 __Pyx_RefNannySetupContext("__get__", 0);
3766
3767 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":271
3768 * @property
3769 * cdef inline tuple names(self):
3770 * return <tuple>PyDataType_NAMES(self) # <<<<<<<<<<<<<<
3771 *
3772 * # Use PyDataType_HASSUBARRAY to test whether this field is
3773*/
3774 __pyx_t_1 = PyDataType_NAMES(__pyx_v_self);
3775
3776 {
3777 PyObject *__pyx_temp;
3778 {
3779 __pyx_temp = __pyx_r;
3780 __Pyx_INCREF(((PyObject*)__pyx_t_1));
3781 __pyx_r = ((PyObject*)__pyx_t_1);
3782 }
3783 __Pyx_XDECREF(__pyx_temp);
3784 }
3785
3786 goto __pyx_L0;
3787
3788 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":269
3789 * return <object>PyDataType_FIELDS(self)
3790 *
3791 * @property # <<<<<<<<<<<<<<
3792 * cdef inline tuple names(self):
3793 * return <tuple>PyDataType_NAMES(self)
3794*/
3795
3796 /* function exit code */
3797 __pyx_L0:;
3798 __Pyx_XGIVEREF(__pyx_r);
3799 __Pyx_RefNannyFinishContext();
3800 return __pyx_r;
3801}
3802
3803/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":276
3804 * # valid (the pointer can be NULL). Most users should access
3805 * # this field via the inline helper method PyDataType_SHAPE.
3806 * @property # <<<<<<<<<<<<<<
3807 * cdef inline PyArray_ArrayDescr* subarray(self) noexcept nogil:
3808 * return PyDataType_SUBARRAY(self)
3809*/
3810
3811static CYTHON_INLINE PyArray_ArrayDescr *__pyx_f_5numpy_5dtype_8subarray___get__(PyArray_Descr *__pyx_v_self) {
3812 PyArray_ArrayDescr *__pyx_r;
3813
3814 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":278
3815 * @property
3816 * cdef inline PyArray_ArrayDescr* subarray(self) noexcept nogil:
3817 * return PyDataType_SUBARRAY(self) # <<<<<<<<<<<<<<
3818 *
3819 * @property
3820*/
3821 {
3822
3823 __pyx_r = PyDataType_SUBARRAY(__pyx_v_self);
3824 }
3825 goto __pyx_L0;
3826
3827 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":276
3828 * # valid (the pointer can be NULL). Most users should access
3829 * # this field via the inline helper method PyDataType_SHAPE.
3830 * @property # <<<<<<<<<<<<<<
3831 * cdef inline PyArray_ArrayDescr* subarray(self) noexcept nogil:
3832 * return PyDataType_SUBARRAY(self)
3833*/
3834
3835 /* function exit code */
3836 __pyx_L0:;
3837 return __pyx_r;
3838}
3839
3840/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":280
3841 * return PyDataType_SUBARRAY(self)
3842 *
3843 * @property # <<<<<<<<<<<<<<
3844 * cdef inline npy_uint64 flags(self) noexcept nogil:
3845 * """The data types flags."""
3846*/
3847
3848static CYTHON_INLINE npy_uint64 __pyx_f_5numpy_5dtype_5flags___get__(PyArray_Descr *__pyx_v_self) {
3849 npy_uint64 __pyx_r;
3850
3851 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":283
3852 * cdef inline npy_uint64 flags(self) noexcept nogil:
3853 * """The data types flags."""
3854 * return PyDataType_FLAGS(self) # <<<<<<<<<<<<<<
3855 *
3856 *
3857*/
3858 {
3859
3860 __pyx_r = PyDataType_FLAGS(__pyx_v_self);
3861 }
3862 goto __pyx_L0;
3863
3864 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":280
3865 * return PyDataType_SUBARRAY(self)
3866 *
3867 * @property # <<<<<<<<<<<<<<
3868 * cdef inline npy_uint64 flags(self) noexcept nogil:
3869 * """The data types flags."""
3870*/
3871
3872 /* function exit code */
3873 __pyx_L0:;
3874 return __pyx_r;
3875}
3876
3877/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":292
3878 * ctypedef class numpy.broadcast [object PyArrayMultiIterObject, check_size ignore]:
3879 *
3880 * @property # <<<<<<<<<<<<<<
3881 * cdef inline int numiter(self) noexcept nogil:
3882 * """The number of arrays that need to be broadcast to the same shape."""
3883*/
3884
3885static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_7numiter___get__(PyArrayMultiIterObject *__pyx_v_self) {
3886 int __pyx_r;
3887
3888 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":295
3889 * cdef inline int numiter(self) noexcept nogil:
3890 * """The number of arrays that need to be broadcast to the same shape."""
3891 * return PyArray_MultiIter_NUMITER(self) # <<<<<<<<<<<<<<
3892 *
3893 * @property
3894*/
3895 {
3896
3897 __pyx_r = PyArray_MultiIter_NUMITER(__pyx_v_self);
3898 }
3899 goto __pyx_L0;
3900
3901 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":292
3902 * ctypedef class numpy.broadcast [object PyArrayMultiIterObject, check_size ignore]:
3903 *
3904 * @property # <<<<<<<<<<<<<<
3905 * cdef inline int numiter(self) noexcept nogil:
3906 * """The number of arrays that need to be broadcast to the same shape."""
3907*/
3908
3909 /* function exit code */
3910 __pyx_L0:;
3911 return __pyx_r;
3912}
3913
3914/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":297
3915 * return PyArray_MultiIter_NUMITER(self)
3916 *
3917 * @property # <<<<<<<<<<<<<<
3918 * cdef inline npy_intp size(self) noexcept nogil:
3919 * """The total broadcasted size."""
3920*/
3921
3922static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_4size___get__(PyArrayMultiIterObject *__pyx_v_self) {
3923 npy_intp __pyx_r;
3924
3925 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":300
3926 * cdef inline npy_intp size(self) noexcept nogil:
3927 * """The total broadcasted size."""
3928 * return PyArray_MultiIter_SIZE(self) # <<<<<<<<<<<<<<
3929 *
3930 * @property
3931*/
3932 {
3933
3934 __pyx_r = PyArray_MultiIter_SIZE(__pyx_v_self);
3935 }
3936 goto __pyx_L0;
3937
3938 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":297
3939 * return PyArray_MultiIter_NUMITER(self)
3940 *
3941 * @property # <<<<<<<<<<<<<<
3942 * cdef inline npy_intp size(self) noexcept nogil:
3943 * """The total broadcasted size."""
3944*/
3945
3946 /* function exit code */
3947 __pyx_L0:;
3948 return __pyx_r;
3949}
3950
3951/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":302
3952 * return PyArray_MultiIter_SIZE(self)
3953 *
3954 * @property # <<<<<<<<<<<<<<
3955 * cdef inline npy_intp index(self) noexcept nogil:
3956 * """The current (1-d) index into the broadcasted result."""
3957*/
3958
3959static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_5index___get__(PyArrayMultiIterObject *__pyx_v_self) {
3960 npy_intp __pyx_r;
3961
3962 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":305
3963 * cdef inline npy_intp index(self) noexcept nogil:
3964 * """The current (1-d) index into the broadcasted result."""
3965 * return PyArray_MultiIter_INDEX(self) # <<<<<<<<<<<<<<
3966 *
3967 * @property
3968*/
3969 {
3970
3971 __pyx_r = PyArray_MultiIter_INDEX(__pyx_v_self);
3972 }
3973 goto __pyx_L0;
3974
3975 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":302
3976 * return PyArray_MultiIter_SIZE(self)
3977 *
3978 * @property # <<<<<<<<<<<<<<
3979 * cdef inline npy_intp index(self) noexcept nogil:
3980 * """The current (1-d) index into the broadcasted result."""
3981*/
3982
3983 /* function exit code */
3984 __pyx_L0:;
3985 return __pyx_r;
3986}
3987
3988/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":307
3989 * return PyArray_MultiIter_INDEX(self)
3990 *
3991 * @property # <<<<<<<<<<<<<<
3992 * cdef inline int nd(self) noexcept nogil:
3993 * """The number of dimensions in the broadcasted result."""
3994*/
3995
3996static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_2nd___get__(PyArrayMultiIterObject *__pyx_v_self) {
3997 int __pyx_r;
3998
3999 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":310
4000 * cdef inline int nd(self) noexcept nogil:
4001 * """The number of dimensions in the broadcasted result."""
4002 * return PyArray_MultiIter_NDIM(self) # <<<<<<<<<<<<<<
4003 *
4004 * @property
4005*/
4006 {
4007
4008 __pyx_r = PyArray_MultiIter_NDIM(__pyx_v_self);
4009 }
4010 goto __pyx_L0;
4011
4012 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":307
4013 * return PyArray_MultiIter_INDEX(self)
4014 *
4015 * @property # <<<<<<<<<<<<<<
4016 * cdef inline int nd(self) noexcept nogil:
4017 * """The number of dimensions in the broadcasted result."""
4018*/
4019
4020 /* function exit code */
4021 __pyx_L0:;
4022 return __pyx_r;
4023}
4024
4025/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":312
4026 * return PyArray_MultiIter_NDIM(self)
4027 *
4028 * @property # <<<<<<<<<<<<<<
4029 * cdef inline npy_intp* dimensions(self) noexcept nogil:
4030 * """The shape of the broadcasted result."""
4031*/
4032
4033static CYTHON_INLINE npy_intp *__pyx_f_5numpy_9broadcast_10dimensions___get__(PyArrayMultiIterObject *__pyx_v_self) {
4034 npy_intp *__pyx_r;
4035
4036 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":315
4037 * cdef inline npy_intp* dimensions(self) noexcept nogil:
4038 * """The shape of the broadcasted result."""
4039 * return PyArray_MultiIter_DIMS(self) # <<<<<<<<<<<<<<
4040 *
4041 * @property
4042*/
4043 {
4044
4045 __pyx_r = PyArray_MultiIter_DIMS(__pyx_v_self);
4046 }
4047 goto __pyx_L0;
4048
4049 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":312
4050 * return PyArray_MultiIter_NDIM(self)
4051 *
4052 * @property # <<<<<<<<<<<<<<
4053 * cdef inline npy_intp* dimensions(self) noexcept nogil:
4054 * """The shape of the broadcasted result."""
4055*/
4056
4057 /* function exit code */
4058 __pyx_L0:;
4059 return __pyx_r;
4060}
4061
4062/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":317
4063 * return PyArray_MultiIter_DIMS(self)
4064 *
4065 * @property # <<<<<<<<<<<<<<
4066 * cdef inline void** iters(self) noexcept nogil:
4067 * """An array of iterator objects that holds the iterators for the arrays to be broadcast together.
4068*/
4069
4070static CYTHON_INLINE void **__pyx_f_5numpy_9broadcast_5iters___get__(PyArrayMultiIterObject *__pyx_v_self) {
4071 void **__pyx_r;
4072
4073 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":321
4074 * """An array of iterator objects that holds the iterators for the arrays to be broadcast together.
4075 * On return, the iterators are adjusted for broadcasting."""
4076 * return PyArray_MultiIter_ITERS(self) # <<<<<<<<<<<<<<
4077 *
4078 *
4079*/
4080 {
4081
4082 __pyx_r = PyArray_MultiIter_ITERS(__pyx_v_self);
4083 }
4084 goto __pyx_L0;
4085
4086 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":317
4087 * return PyArray_MultiIter_DIMS(self)
4088 *
4089 * @property # <<<<<<<<<<<<<<
4090 * cdef inline void** iters(self) noexcept nogil:
4091 * """An array of iterator objects that holds the iterators for the arrays to be broadcast together.
4092*/
4093
4094 /* function exit code */
4095 __pyx_L0:;
4096 return __pyx_r;
4097}
4098
4099/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":335
4100 * # Instead, we use properties that map to the corresponding C-API functions.
4101 *
4102 * @property # <<<<<<<<<<<<<<
4103 * cdef inline PyObject* base(self) noexcept nogil:
4104 * """Returns a borrowed reference to the object owning the data/memory.
4105*/
4106
4107static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base___get__(PyArrayObject *__pyx_v_self) {
4108 PyObject *__pyx_r;
4109
4110 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":339
4111 * """Returns a borrowed reference to the object owning the data/memory.
4112 * """
4113 * return PyArray_BASE(self) # <<<<<<<<<<<<<<
4114 *
4115 * @property
4116*/
4117 {
4118
4119 __pyx_r = PyArray_BASE(__pyx_v_self);
4120 }
4121 goto __pyx_L0;
4122
4123 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":335
4124 * # Instead, we use properties that map to the corresponding C-API functions.
4125 *
4126 * @property # <<<<<<<<<<<<<<
4127 * cdef inline PyObject* base(self) noexcept nogil:
4128 * """Returns a borrowed reference to the object owning the data/memory.
4129*/
4130
4131 /* function exit code */
4132 __pyx_L0:;
4133 return __pyx_r;
4134}
4135
4136/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":341
4137 * return PyArray_BASE(self)
4138 *
4139 * @property # <<<<<<<<<<<<<<
4140 * cdef inline dtype descr(self):
4141 * """Returns an owned reference to the dtype of the array.
4142*/
4143
4144static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr___get__(PyArrayObject *__pyx_v_self) {
4145 PyArray_Descr *__pyx_r = NULL;
4146 __Pyx_RefNannyDeclarations
4147 PyArray_Descr *__pyx_t_1;
4148 __Pyx_RefNannySetupContext("__get__", 0);
4149
4150 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":345
4151 * """Returns an owned reference to the dtype of the array.
4152 * """
4153 * return <dtype>PyArray_DESCR(self) # <<<<<<<<<<<<<<
4154 *
4155 * @property
4156*/
4157 __pyx_t_1 = PyArray_DESCR(__pyx_v_self);
4158
4159 {
4160 PyArray_Descr *__pyx_temp;
4161 {
4162 __pyx_temp = __pyx_r;
4163 __Pyx_INCREF((PyObject *)((PyArray_Descr *)__pyx_t_1));
4164 __pyx_r = ((PyArray_Descr *)__pyx_t_1);
4165 }
4166 __Pyx_XDECREF((PyObject *)__pyx_temp);
4167 }
4168
4169 goto __pyx_L0;
4170
4171 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":341
4172 * return PyArray_BASE(self)
4173 *
4174 * @property # <<<<<<<<<<<<<<
4175 * cdef inline dtype descr(self):
4176 * """Returns an owned reference to the dtype of the array.
4177*/
4178
4179 /* function exit code */
4180 __pyx_L0:;
4181 __Pyx_XGIVEREF((PyObject *)__pyx_r);
4182 __Pyx_RefNannyFinishContext();
4183 return __pyx_r;
4184}
4185
4186/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":347
4187 * return <dtype>PyArray_DESCR(self)
4188 *
4189 * @property # <<<<<<<<<<<<<<
4190 * cdef inline int ndim(self) noexcept nogil:
4191 * """Returns the number of dimensions in the array.
4192*/
4193
4194static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim___get__(PyArrayObject *__pyx_v_self) {
4195 int __pyx_r;
4196
4197 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":351
4198 * """Returns the number of dimensions in the array.
4199 * """
4200 * return PyArray_NDIM(self) # <<<<<<<<<<<<<<
4201 *
4202 * @property
4203*/
4204 {
4205
4206 __pyx_r = PyArray_NDIM(__pyx_v_self);
4207 }
4208 goto __pyx_L0;
4209
4210 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":347
4211 * return <dtype>PyArray_DESCR(self)
4212 *
4213 * @property # <<<<<<<<<<<<<<
4214 * cdef inline int ndim(self) noexcept nogil:
4215 * """Returns the number of dimensions in the array.
4216*/
4217
4218 /* function exit code */
4219 __pyx_L0:;
4220 return __pyx_r;
4221}
4222
4223/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":353
4224 * return PyArray_NDIM(self)
4225 *
4226 * @property # <<<<<<<<<<<<<<
4227 * cdef inline npy_intp *shape(self) noexcept nogil:
4228 * """Returns a pointer to the dimensions/shape of the array.
4229*/
4230
4231static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape___get__(PyArrayObject *__pyx_v_self) {
4232 npy_intp *__pyx_r;
4233
4234 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":359
4235 * Can return NULL for 0-dimensional arrays.
4236 * """
4237 * return PyArray_DIMS(self) # <<<<<<<<<<<<<<
4238 *
4239 * @property
4240*/
4241 {
4242
4243 __pyx_r = PyArray_DIMS(__pyx_v_self);
4244 }
4245 goto __pyx_L0;
4246
4247 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":353
4248 * return PyArray_NDIM(self)
4249 *
4250 * @property # <<<<<<<<<<<<<<
4251 * cdef inline npy_intp *shape(self) noexcept nogil:
4252 * """Returns a pointer to the dimensions/shape of the array.
4253*/
4254
4255 /* function exit code */
4256 __pyx_L0:;
4257 return __pyx_r;
4258}
4259
4260/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":361
4261 * return PyArray_DIMS(self)
4262 *
4263 * @property # <<<<<<<<<<<<<<
4264 * cdef inline npy_intp *strides(self) noexcept nogil:
4265 * """Returns a pointer to the strides of the array.
4266*/
4267
4268static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides___get__(PyArrayObject *__pyx_v_self) {
4269 npy_intp *__pyx_r;
4270
4271 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":366
4272 * The number of elements matches the number of dimensions of the array (ndim).
4273 * """
4274 * return PyArray_STRIDES(self) # <<<<<<<<<<<<<<
4275 *
4276 * @property
4277*/
4278 {
4279
4280 __pyx_r = PyArray_STRIDES(__pyx_v_self);
4281 }
4282 goto __pyx_L0;
4283
4284 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":361
4285 * return PyArray_DIMS(self)
4286 *
4287 * @property # <<<<<<<<<<<<<<
4288 * cdef inline npy_intp *strides(self) noexcept nogil:
4289 * """Returns a pointer to the strides of the array.
4290*/
4291
4292 /* function exit code */
4293 __pyx_L0:;
4294 return __pyx_r;
4295}
4296
4297/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":368
4298 * return PyArray_STRIDES(self)
4299 *
4300 * @property # <<<<<<<<<<<<<<
4301 * cdef inline npy_intp size(self) noexcept nogil:
4302 * """Returns the total size (in number of elements) of the array.
4303*/
4304
4305static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size___get__(PyArrayObject *__pyx_v_self) {
4306 npy_intp __pyx_r;
4307
4308 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":372
4309 * """Returns the total size (in number of elements) of the array.
4310 * """
4311 * return PyArray_SIZE(self) # <<<<<<<<<<<<<<
4312 *
4313 * @property
4314*/
4315 {
4316
4317 __pyx_r = PyArray_SIZE(__pyx_v_self);
4318 }
4319 goto __pyx_L0;
4320
4321 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":368
4322 * return PyArray_STRIDES(self)
4323 *
4324 * @property # <<<<<<<<<<<<<<
4325 * cdef inline npy_intp size(self) noexcept nogil:
4326 * """Returns the total size (in number of elements) of the array.
4327*/
4328
4329 /* function exit code */
4330 __pyx_L0:;
4331 return __pyx_r;
4332}
4333
4334/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":374
4335 * return PyArray_SIZE(self)
4336 *
4337 * @property # <<<<<<<<<<<<<<
4338 * cdef inline char* data(self) noexcept nogil:
4339 * """The pointer to the data buffer as a char*.
4340*/
4341
4342static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data___get__(PyArrayObject *__pyx_v_self) {
4343 char *__pyx_r;
4344
4345 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":381
4346 * of `PyArray_DATA()` instead, which returns a 'void*'.
4347 * """
4348 * return PyArray_BYTES(self) # <<<<<<<<<<<<<<
4349 *
4350 *
4351*/
4352 {
4353
4354 __pyx_r = PyArray_BYTES(__pyx_v_self);
4355 }
4356 goto __pyx_L0;
4357
4358 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":374
4359 * return PyArray_SIZE(self)
4360 *
4361 * @property # <<<<<<<<<<<<<<
4362 * cdef inline char* data(self) noexcept nogil:
4363 * """The pointer to the data buffer as a char*.
4364*/
4365
4366 /* function exit code */
4367 __pyx_L0:;
4368 return __pyx_r;
4369}
4370
4371/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":794
4372 * ctypedef long double complex clongdouble_t
4373 *
4374 * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
4375 * return PyArray_MultiIterNew(1, <void*>a)
4376 *
4377*/
4378
4379static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
4380 PyObject *__pyx_r = NULL;
4381 __Pyx_RefNannyDeclarations
4382 PyObject *__pyx_t_1 = NULL;
4383 int __pyx_lineno = 0;
4384 const char *__pyx_filename = NULL;
4385 int __pyx_clineno = 0;
4386 __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0);
4387
4388 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":795
4389 *
4390 * cdef inline object PyArray_MultiIterNew1(a):
4391 * return PyArray_MultiIterNew(1, <void*>a) # <<<<<<<<<<<<<<
4392 *
4393 * cdef inline object PyArray_MultiIterNew2(a, b):
4394*/
4395 __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 795, __pyx_L1_error)
4396 __Pyx_GOTREF(__pyx_t_1);
4397 {
4398 PyObject *__pyx_temp;
4399 {
4400 __pyx_temp = __pyx_r;
4401 __pyx_r = __pyx_t_1;
4402 }
4403 __Pyx_XDECREF(__pyx_temp);
4404 }
4405 __pyx_t_1 = 0;
4406 goto __pyx_L0;
4407
4408 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":794
4409 * ctypedef long double complex clongdouble_t
4410 *
4411 * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
4412 * return PyArray_MultiIterNew(1, <void*>a)
4413 *
4414*/
4415
4416 /* function exit code */
4417 __pyx_L1_error:;
4418 __Pyx_XDECREF(__pyx_t_1);
4419 __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename);
4420 __pyx_r = 0;
4421 __pyx_L0:;
4422 __Pyx_XGIVEREF(__pyx_r);
4423 __Pyx_RefNannyFinishContext();
4424 return __pyx_r;
4425}
4426
4427/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":797
4428 * return PyArray_MultiIterNew(1, <void*>a)
4429 *
4430 * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
4431 * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
4432 *
4433*/
4434
4435static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
4436 PyObject *__pyx_r = NULL;
4437 __Pyx_RefNannyDeclarations
4438 PyObject *__pyx_t_1 = NULL;
4439 int __pyx_lineno = 0;
4440 const char *__pyx_filename = NULL;
4441 int __pyx_clineno = 0;
4442 __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0);
4443
4444 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":798
4445 *
4446 * cdef inline object PyArray_MultiIterNew2(a, b):
4447 * return PyArray_MultiIterNew(2, <void*>a, <void*>b) # <<<<<<<<<<<<<<
4448 *
4449 * cdef inline object PyArray_MultiIterNew3(a, b, c):
4450*/
4451 __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 798, __pyx_L1_error)
4452 __Pyx_GOTREF(__pyx_t_1);
4453 {
4454 PyObject *__pyx_temp;
4455 {
4456 __pyx_temp = __pyx_r;
4457 __pyx_r = __pyx_t_1;
4458 }
4459 __Pyx_XDECREF(__pyx_temp);
4460 }
4461 __pyx_t_1 = 0;
4462 goto __pyx_L0;
4463
4464 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":797
4465 * return PyArray_MultiIterNew(1, <void*>a)
4466 *
4467 * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
4468 * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
4469 *
4470*/
4471
4472 /* function exit code */
4473 __pyx_L1_error:;
4474 __Pyx_XDECREF(__pyx_t_1);
4475 __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename);
4476 __pyx_r = 0;
4477 __pyx_L0:;
4478 __Pyx_XGIVEREF(__pyx_r);
4479 __Pyx_RefNannyFinishContext();
4480 return __pyx_r;
4481}
4482
4483/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":800
4484 * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
4485 *
4486 * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
4487 * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
4488 *
4489*/
4490
4491static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
4492 PyObject *__pyx_r = NULL;
4493 __Pyx_RefNannyDeclarations
4494 PyObject *__pyx_t_1 = NULL;
4495 int __pyx_lineno = 0;
4496 const char *__pyx_filename = NULL;
4497 int __pyx_clineno = 0;
4498 __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0);
4499
4500 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":801
4501 *
4502 * cdef inline object PyArray_MultiIterNew3(a, b, c):
4503 * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c) # <<<<<<<<<<<<<<
4504 *
4505 * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
4506*/
4507 __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 801, __pyx_L1_error)
4508 __Pyx_GOTREF(__pyx_t_1);
4509 {
4510 PyObject *__pyx_temp;
4511 {
4512 __pyx_temp = __pyx_r;
4513 __pyx_r = __pyx_t_1;
4514 }
4515 __Pyx_XDECREF(__pyx_temp);
4516 }
4517 __pyx_t_1 = 0;
4518 goto __pyx_L0;
4519
4520 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":800
4521 * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
4522 *
4523 * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
4524 * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
4525 *
4526*/
4527
4528 /* function exit code */
4529 __pyx_L1_error:;
4530 __Pyx_XDECREF(__pyx_t_1);
4531 __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename);
4532 __pyx_r = 0;
4533 __pyx_L0:;
4534 __Pyx_XGIVEREF(__pyx_r);
4535 __Pyx_RefNannyFinishContext();
4536 return __pyx_r;
4537}
4538
4539/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":803
4540 * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
4541 *
4542 * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
4543 * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
4544 *
4545*/
4546
4547static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) {
4548 PyObject *__pyx_r = NULL;
4549 __Pyx_RefNannyDeclarations
4550 PyObject *__pyx_t_1 = NULL;
4551 int __pyx_lineno = 0;
4552 const char *__pyx_filename = NULL;
4553 int __pyx_clineno = 0;
4554 __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0);
4555
4556 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":804
4557 *
4558 * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
4559 * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d) # <<<<<<<<<<<<<<
4560 *
4561 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
4562*/
4563 __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 804, __pyx_L1_error)
4564 __Pyx_GOTREF(__pyx_t_1);
4565 {
4566 PyObject *__pyx_temp;
4567 {
4568 __pyx_temp = __pyx_r;
4569 __pyx_r = __pyx_t_1;
4570 }
4571 __Pyx_XDECREF(__pyx_temp);
4572 }
4573 __pyx_t_1 = 0;
4574 goto __pyx_L0;
4575
4576 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":803
4577 * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
4578 *
4579 * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
4580 * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
4581 *
4582*/
4583
4584 /* function exit code */
4585 __pyx_L1_error:;
4586 __Pyx_XDECREF(__pyx_t_1);
4587 __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename);
4588 __pyx_r = 0;
4589 __pyx_L0:;
4590 __Pyx_XGIVEREF(__pyx_r);
4591 __Pyx_RefNannyFinishContext();
4592 return __pyx_r;
4593}
4594
4595/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":806
4596 * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
4597 *
4598 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
4599 * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
4600 *
4601*/
4602
4603static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) {
4604 PyObject *__pyx_r = NULL;
4605 __Pyx_RefNannyDeclarations
4606 PyObject *__pyx_t_1 = NULL;
4607 int __pyx_lineno = 0;
4608 const char *__pyx_filename = NULL;
4609 int __pyx_clineno = 0;
4610 __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0);
4611
4612 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":807
4613 *
4614 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
4615 * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e) # <<<<<<<<<<<<<<
4616 *
4617 * cdef inline tuple PyDataType_SHAPE(dtype d):
4618*/
4619 __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 807, __pyx_L1_error)
4620 __Pyx_GOTREF(__pyx_t_1);
4621 {
4622 PyObject *__pyx_temp;
4623 {
4624 __pyx_temp = __pyx_r;
4625 __pyx_r = __pyx_t_1;
4626 }
4627 __Pyx_XDECREF(__pyx_temp);
4628 }
4629 __pyx_t_1 = 0;
4630 goto __pyx_L0;
4631
4632 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":806
4633 * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
4634 *
4635 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
4636 * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
4637 *
4638*/
4639
4640 /* function exit code */
4641 __pyx_L1_error:;
4642 __Pyx_XDECREF(__pyx_t_1);
4643 __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename);
4644 __pyx_r = 0;
4645 __pyx_L0:;
4646 __Pyx_XGIVEREF(__pyx_r);
4647 __Pyx_RefNannyFinishContext();
4648 return __pyx_r;
4649}
4650
4651/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":809
4652 * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
4653 *
4654 * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<<
4655 * if PyDataType_HASSUBARRAY(d):
4656 * return <tuple>d.subarray.shape
4657*/
4658
4659static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) {
4660 PyObject *__pyx_r = NULL;
4661 __Pyx_RefNannyDeclarations
4662 int __pyx_t_1;
4663 PyObject *__pyx_t_2;
4664 __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0);
4665
4666 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":810
4667 *
4668 * cdef inline tuple PyDataType_SHAPE(dtype d):
4669 * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<<
4670 * return <tuple>d.subarray.shape
4671 * else:
4672*/
4673 __pyx_t_1 = PyDataType_HASSUBARRAY(__pyx_v_d);
4674
4675 if (__pyx_t_1) {
4676
4677
4678 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":811
4679 * cdef inline tuple PyDataType_SHAPE(dtype d):
4680 * if PyDataType_HASSUBARRAY(d):
4681 * return <tuple>d.subarray.shape # <<<<<<<<<<<<<<
4682 * else:
4683 * return ()
4684*/
4685 __pyx_t_2 = __pyx_f_5numpy_5dtype_8subarray___get__(__pyx_v_d)->shape;
4686
4687 {
4688 PyObject *__pyx_temp;
4689 {
4690 __pyx_temp = __pyx_r;
4691 __Pyx_INCREF(((PyObject*)__pyx_t_2));
4692 __pyx_r = ((PyObject*)__pyx_t_2);
4693 }
4694 __Pyx_XDECREF(__pyx_temp);
4695 }
4696
4697 goto __pyx_L0;
4698
4699 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":810
4700 *
4701 * cdef inline tuple PyDataType_SHAPE(dtype d):
4702 * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<<
4703 * return <tuple>d.subarray.shape
4704 * else:
4705*/
4706 }
4707
4708 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":813
4709 * return <tuple>d.subarray.shape
4710 * else:
4711 * return () # <<<<<<<<<<<<<<
4712 *
4713 *
4714*/
4715 /*else*/ {
4716 {
4717 PyObject *__pyx_temp;
4718 {
4719 __pyx_temp = __pyx_r;
4720 __Pyx_INCREF(__pyx_mstate_global->__pyx_empty_tuple);
4721 __pyx_r = __pyx_mstate_global->__pyx_empty_tuple;
4722 }
4723 __Pyx_XDECREF(__pyx_temp);
4724 }
4725 goto __pyx_L0;
4726 }
4727
4728 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":809
4729 * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
4730 *
4731 * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<<
4732 * if PyDataType_HASSUBARRAY(d):
4733 * return <tuple>d.subarray.shape
4734*/
4735
4736 /* function exit code */
4737 __pyx_L0:;
4738 __Pyx_XGIVEREF(__pyx_r);
4739 __Pyx_RefNannyFinishContext();
4740 return __pyx_r;
4741}
4742
4743/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":947
4744 *
4745 * ctypedef class numpy.ufunc [object PyUFuncObject, check_size ignore]:
4746 * @property # <<<<<<<<<<<<<<
4747 * cdef inline int nin(self) noexcept nogil:
4748 * return _PyUFuncObject_GET_ITEM_DATA(self).nin
4749*/
4750
4751static CYTHON_INLINE int __pyx_f_5numpy_5ufunc_3nin___get__(PyUFuncObject *__pyx_v_self) {
4752 int __pyx_r;
4753
4754 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":949
4755 * @property
4756 * cdef inline int nin(self) noexcept nogil:
4757 * return _PyUFuncObject_GET_ITEM_DATA(self).nin # <<<<<<<<<<<<<<
4758 *
4759 * @property
4760*/
4761 {
4762
4763 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->nin;
4764 }
4765 goto __pyx_L0;
4766
4767 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":947
4768 *
4769 * ctypedef class numpy.ufunc [object PyUFuncObject, check_size ignore]:
4770 * @property # <<<<<<<<<<<<<<
4771 * cdef inline int nin(self) noexcept nogil:
4772 * return _PyUFuncObject_GET_ITEM_DATA(self).nin
4773*/
4774
4775 /* function exit code */
4776 __pyx_L0:;
4777 return __pyx_r;
4778}
4779
4780/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":951
4781 * return _PyUFuncObject_GET_ITEM_DATA(self).nin
4782 *
4783 * @property # <<<<<<<<<<<<<<
4784 * cdef inline int nout(self) noexcept nogil:
4785 * return _PyUFuncObject_GET_ITEM_DATA(self).nout
4786*/
4787
4788static CYTHON_INLINE int __pyx_f_5numpy_5ufunc_4nout___get__(PyUFuncObject *__pyx_v_self) {
4789 int __pyx_r;
4790
4791 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":953
4792 * @property
4793 * cdef inline int nout(self) noexcept nogil:
4794 * return _PyUFuncObject_GET_ITEM_DATA(self).nout # <<<<<<<<<<<<<<
4795 *
4796 * @property
4797*/
4798 {
4799
4800 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->nout;
4801 }
4802 goto __pyx_L0;
4803
4804 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":951
4805 * return _PyUFuncObject_GET_ITEM_DATA(self).nin
4806 *
4807 * @property # <<<<<<<<<<<<<<
4808 * cdef inline int nout(self) noexcept nogil:
4809 * return _PyUFuncObject_GET_ITEM_DATA(self).nout
4810*/
4811
4812 /* function exit code */
4813 __pyx_L0:;
4814 return __pyx_r;
4815}
4816
4817/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":955
4818 * return _PyUFuncObject_GET_ITEM_DATA(self).nout
4819 *
4820 * @property # <<<<<<<<<<<<<<
4821 * cdef inline int nargs(self) noexcept nogil:
4822 * return _PyUFuncObject_GET_ITEM_DATA(self).nargs
4823*/
4824
4825static CYTHON_INLINE int __pyx_f_5numpy_5ufunc_5nargs___get__(PyUFuncObject *__pyx_v_self) {
4826 int __pyx_r;
4827
4828 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":957
4829 * @property
4830 * cdef inline int nargs(self) noexcept nogil:
4831 * return _PyUFuncObject_GET_ITEM_DATA(self).nargs # <<<<<<<<<<<<<<
4832 *
4833 * @property
4834*/
4835 {
4836
4837 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->nargs;
4838 }
4839 goto __pyx_L0;
4840
4841 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":955
4842 * return _PyUFuncObject_GET_ITEM_DATA(self).nout
4843 *
4844 * @property # <<<<<<<<<<<<<<
4845 * cdef inline int nargs(self) noexcept nogil:
4846 * return _PyUFuncObject_GET_ITEM_DATA(self).nargs
4847*/
4848
4849 /* function exit code */
4850 __pyx_L0:;
4851 return __pyx_r;
4852}
4853
4854/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":959
4855 * return _PyUFuncObject_GET_ITEM_DATA(self).nargs
4856 *
4857 * @property # <<<<<<<<<<<<<<
4858 * cdef inline PyUFuncGenericFunction* functions(self) noexcept nogil:
4859 * return _PyUFuncObject_GET_ITEM_DATA(self).functions
4860*/
4861
4862static CYTHON_INLINE PyUFuncGenericFunction *__pyx_f_5numpy_5ufunc_9functions___get__(PyUFuncObject *__pyx_v_self) {
4863 PyUFuncGenericFunction *__pyx_r;
4864
4865 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":961
4866 * @property
4867 * cdef inline PyUFuncGenericFunction* functions(self) noexcept nogil:
4868 * return _PyUFuncObject_GET_ITEM_DATA(self).functions # <<<<<<<<<<<<<<
4869 *
4870 * @property
4871*/
4872 {
4873
4874 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->functions;
4875 }
4876 goto __pyx_L0;
4877
4878 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":959
4879 * return _PyUFuncObject_GET_ITEM_DATA(self).nargs
4880 *
4881 * @property # <<<<<<<<<<<<<<
4882 * cdef inline PyUFuncGenericFunction* functions(self) noexcept nogil:
4883 * return _PyUFuncObject_GET_ITEM_DATA(self).functions
4884*/
4885
4886 /* function exit code */
4887 __pyx_L0:;
4888 return __pyx_r;
4889}
4890
4891/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":963
4892 * return _PyUFuncObject_GET_ITEM_DATA(self).functions
4893 *
4894 * @property # <<<<<<<<<<<<<<
4895 * cdef inline void ** data(self) noexcept nogil:
4896 * return <void **>_PyUFuncObject_GET_ITEM_DATA(self).data
4897*/
4898
4899static CYTHON_INLINE void **__pyx_f_5numpy_5ufunc_4data___get__(PyUFuncObject *__pyx_v_self) {
4900 void **__pyx_r;
4901
4902 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":965
4903 * @property
4904 * cdef inline void ** data(self) noexcept nogil:
4905 * return <void **>_PyUFuncObject_GET_ITEM_DATA(self).data # <<<<<<<<<<<<<<
4906 *
4907 * @property
4908*/
4909 {
4910
4911 __pyx_r = ((void **)_PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->data);
4912 }
4913 goto __pyx_L0;
4914
4915 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":963
4916 * return _PyUFuncObject_GET_ITEM_DATA(self).functions
4917 *
4918 * @property # <<<<<<<<<<<<<<
4919 * cdef inline void ** data(self) noexcept nogil:
4920 * return <void **>_PyUFuncObject_GET_ITEM_DATA(self).data
4921*/
4922
4923 /* function exit code */
4924 __pyx_L0:;
4925 return __pyx_r;
4926}
4927
4928/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":967
4929 * return <void **>_PyUFuncObject_GET_ITEM_DATA(self).data
4930 *
4931 * @property # <<<<<<<<<<<<<<
4932 * cdef inline int ntypes(self) noexcept nogil:
4933 * return _PyUFuncObject_GET_ITEM_DATA(self).ntypes
4934*/
4935
4936static CYTHON_INLINE int __pyx_f_5numpy_5ufunc_6ntypes___get__(PyUFuncObject *__pyx_v_self) {
4937 int __pyx_r;
4938
4939 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":969
4940 * @property
4941 * cdef inline int ntypes(self) noexcept nogil:
4942 * return _PyUFuncObject_GET_ITEM_DATA(self).ntypes # <<<<<<<<<<<<<<
4943 *
4944 * @property
4945*/
4946 {
4947
4948 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->ntypes;
4949 }
4950 goto __pyx_L0;
4951
4952 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":967
4953 * return <void **>_PyUFuncObject_GET_ITEM_DATA(self).data
4954 *
4955 * @property # <<<<<<<<<<<<<<
4956 * cdef inline int ntypes(self) noexcept nogil:
4957 * return _PyUFuncObject_GET_ITEM_DATA(self).ntypes
4958*/
4959
4960 /* function exit code */
4961 __pyx_L0:;
4962 return __pyx_r;
4963}
4964
4965/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":971
4966 * return _PyUFuncObject_GET_ITEM_DATA(self).ntypes
4967 *
4968 * @property # <<<<<<<<<<<<<<
4969 * cdef inline const char* name(self) noexcept nogil:
4970 * return _PyUFuncObject_GET_ITEM_DATA(self).name
4971*/
4972
4973static CYTHON_INLINE char const *__pyx_f_5numpy_5ufunc_4name___get__(PyUFuncObject *__pyx_v_self) {
4974 char const *__pyx_r;
4975
4976 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":973
4977 * @property
4978 * cdef inline const char* name(self) noexcept nogil:
4979 * return _PyUFuncObject_GET_ITEM_DATA(self).name # <<<<<<<<<<<<<<
4980 *
4981 * @property
4982*/
4983 {
4984
4985 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->name;
4986 }
4987 goto __pyx_L0;
4988
4989 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":971
4990 * return _PyUFuncObject_GET_ITEM_DATA(self).ntypes
4991 *
4992 * @property # <<<<<<<<<<<<<<
4993 * cdef inline const char* name(self) noexcept nogil:
4994 * return _PyUFuncObject_GET_ITEM_DATA(self).name
4995*/
4996
4997 /* function exit code */
4998 __pyx_L0:;
4999 return __pyx_r;
5000}
5001
5002/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":975
5003 * return _PyUFuncObject_GET_ITEM_DATA(self).name
5004 *
5005 * @property # <<<<<<<<<<<<<<
5006 * cdef inline const char* doc(self) noexcept nogil:
5007 * return _PyUFuncObject_GET_ITEM_DATA(self).doc
5008*/
5009
5010static CYTHON_INLINE char const *__pyx_f_5numpy_5ufunc_3doc___get__(PyUFuncObject *__pyx_v_self) {
5011 char const *__pyx_r;
5012
5013 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":977
5014 * @property
5015 * cdef inline const char* doc(self) noexcept nogil:
5016 * return _PyUFuncObject_GET_ITEM_DATA(self).doc # <<<<<<<<<<<<<<
5017 *
5018 * @property
5019*/
5020 {
5021
5022 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->doc;
5023 }
5024 goto __pyx_L0;
5025
5026 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":975
5027 * return _PyUFuncObject_GET_ITEM_DATA(self).name
5028 *
5029 * @property # <<<<<<<<<<<<<<
5030 * cdef inline const char* doc(self) noexcept nogil:
5031 * return _PyUFuncObject_GET_ITEM_DATA(self).doc
5032*/
5033
5034 /* function exit code */
5035 __pyx_L0:;
5036 return __pyx_r;
5037}
5038
5039/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":979
5040 * return _PyUFuncObject_GET_ITEM_DATA(self).doc
5041 *
5042 * @property # <<<<<<<<<<<<<<
5043 * cdef inline void* ptr(self) noexcept nogil:
5044 * return _PyUFuncObject_GET_ITEM_DATA(self).ptr
5045*/
5046
5047static CYTHON_INLINE void *__pyx_f_5numpy_5ufunc_3ptr___get__(PyUFuncObject *__pyx_v_self) {
5048 void *__pyx_r;
5049
5050 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":981
5051 * @property
5052 * cdef inline void* ptr(self) noexcept nogil:
5053 * return _PyUFuncObject_GET_ITEM_DATA(self).ptr # <<<<<<<<<<<<<<
5054 *
5055 * @property
5056*/
5057 {
5058
5059 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->ptr;
5060 }
5061 goto __pyx_L0;
5062
5063 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":979
5064 * return _PyUFuncObject_GET_ITEM_DATA(self).doc
5065 *
5066 * @property # <<<<<<<<<<<<<<
5067 * cdef inline void* ptr(self) noexcept nogil:
5068 * return _PyUFuncObject_GET_ITEM_DATA(self).ptr
5069*/
5070
5071 /* function exit code */
5072 __pyx_L0:;
5073 return __pyx_r;
5074}
5075
5076/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":983
5077 * return _PyUFuncObject_GET_ITEM_DATA(self).ptr
5078 *
5079 * @property # <<<<<<<<<<<<<<
5080 * cdef inline PyObject* obj(self) noexcept nogil:
5081 * return _PyUFuncObject_GET_ITEM_DATA(self).obj
5082*/
5083
5084static CYTHON_INLINE PyObject *__pyx_f_5numpy_5ufunc_3obj___get__(PyUFuncObject *__pyx_v_self) {
5085 PyObject *__pyx_r;
5086
5087 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":985
5088 * @property
5089 * cdef inline PyObject* obj(self) noexcept nogil:
5090 * return _PyUFuncObject_GET_ITEM_DATA(self).obj # <<<<<<<<<<<<<<
5091 *
5092 * @property
5093*/
5094 {
5095
5096 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->obj;
5097 }
5098 goto __pyx_L0;
5099
5100 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":983
5101 * return _PyUFuncObject_GET_ITEM_DATA(self).ptr
5102 *
5103 * @property # <<<<<<<<<<<<<<
5104 * cdef inline PyObject* obj(self) noexcept nogil:
5105 * return _PyUFuncObject_GET_ITEM_DATA(self).obj
5106*/
5107
5108 /* function exit code */
5109 __pyx_L0:;
5110 return __pyx_r;
5111}
5112
5113/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":987
5114 * return _PyUFuncObject_GET_ITEM_DATA(self).obj
5115 *
5116 * @property # <<<<<<<<<<<<<<
5117 * cdef inline PyObject* userloops(self) noexcept nogil:
5118 * return _PyUFuncObject_GET_ITEM_DATA(self).userloops
5119*/
5120
5121static CYTHON_INLINE PyObject *__pyx_f_5numpy_5ufunc_9userloops___get__(PyUFuncObject *__pyx_v_self) {
5122 PyObject *__pyx_r;
5123
5124 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":989
5125 * @property
5126 * cdef inline PyObject* userloops(self) noexcept nogil:
5127 * return _PyUFuncObject_GET_ITEM_DATA(self).userloops # <<<<<<<<<<<<<<
5128 *
5129 * PyUFuncObject_fields *_PyUFuncObject_GET_ITEM_DATA(ufunc) nogil
5130*/
5131 {
5132
5133 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->userloops;
5134 }
5135 goto __pyx_L0;
5136
5137 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":987
5138 * return _PyUFuncObject_GET_ITEM_DATA(self).obj
5139 *
5140 * @property # <<<<<<<<<<<<<<
5141 * cdef inline PyObject* userloops(self) noexcept nogil:
5142 * return _PyUFuncObject_GET_ITEM_DATA(self).userloops
5143*/
5144
5145 /* function exit code */
5146 __pyx_L0:;
5147 return __pyx_r;
5148}
5149
5150/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1065
5151 * int _import_umath() except -1
5152 *
5153 * cdef inline void set_array_base(ndarray arr, object base) except *: # <<<<<<<<<<<<<<
5154 * Py_INCREF(base) # important to do this before stealing the reference below!
5155 * PyArray_SetBaseObject(arr, base)
5156*/
5157
5158static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
5159 int __pyx_t_1;
5160 int __pyx_lineno = 0;
5161 const char *__pyx_filename = NULL;
5162 int __pyx_clineno = 0;
5163
5164 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1066
5165 *
5166 * cdef inline void set_array_base(ndarray arr, object base) except *:
5167 * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<<
5168 * PyArray_SetBaseObject(arr, base)
5169 *
5170*/
5171 Py_INCREF(__pyx_v_base);
5172
5173 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1067
5174 * cdef inline void set_array_base(ndarray arr, object base) except *:
5175 * Py_INCREF(base) # important to do this before stealing the reference below!
5176 * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<<
5177 *
5178 * cdef inline object get_array_base(ndarray arr):
5179*/
5180 __pyx_t_1 = PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 1067, __pyx_L1_error)
5181
5182
5183 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1065
5184 * int _import_umath() except -1
5185 *
5186 * cdef inline void set_array_base(ndarray arr, object base) except *: # <<<<<<<<<<<<<<
5187 * Py_INCREF(base) # important to do this before stealing the reference below!
5188 * PyArray_SetBaseObject(arr, base)
5189*/
5190
5191 /* function exit code */
5192 goto __pyx_L0;
5193 __pyx_L1_error:;
5194 __Pyx_AddTraceback("numpy.set_array_base", __pyx_clineno, __pyx_lineno, __pyx_filename);
5195 __pyx_L0:;
5196
5197}
5198
5199/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1069
5200 * PyArray_SetBaseObject(arr, base)
5201 *
5202 * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
5203 * base = PyArray_BASE(arr)
5204 * if base is NULL:
5205*/
5206
5207static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
5208 PyObject *__pyx_v_base;
5209 PyObject *__pyx_r = NULL;
5210 __Pyx_RefNannyDeclarations
5211 int __pyx_t_1;
5212 __Pyx_RefNannySetupContext("get_array_base", 0);
5213
5214 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1070
5215 *
5216 * cdef inline object get_array_base(ndarray arr):
5217 * base = PyArray_BASE(arr) # <<<<<<<<<<<<<<
5218 * if base is NULL:
5219 * return None
5220*/
5221 __pyx_v_base = PyArray_BASE(__pyx_v_arr);
5222
5223 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1071
5224 * cdef inline object get_array_base(ndarray arr):
5225 * base = PyArray_BASE(arr)
5226 * if base is NULL: # <<<<<<<<<<<<<<
5227 * return None
5228 * return <object>base
5229*/
5230 __pyx_t_1 = (__pyx_v_base == NULL);
5231
5232 if (__pyx_t_1) {
5233
5234
5235 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1072
5236 * base = PyArray_BASE(arr)
5237 * if base is NULL:
5238 * return None # <<<<<<<<<<<<<<
5239 * return <object>base
5240 *
5241*/
5242 {
5243 PyObject *__pyx_temp;
5244 {
5245 __pyx_temp = __pyx_r;
5246 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5247 }
5248 __Pyx_XDECREF(__pyx_temp);
5249 }
5250 goto __pyx_L0;
5251
5252 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1071
5253 * cdef inline object get_array_base(ndarray arr):
5254 * base = PyArray_BASE(arr)
5255 * if base is NULL: # <<<<<<<<<<<<<<
5256 * return None
5257 * return <object>base
5258*/
5259 }
5260
5261 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1073
5262 * if base is NULL:
5263 * return None
5264 * return <object>base # <<<<<<<<<<<<<<
5265 *
5266 * # Versions of the import_* functions which are more suitable for
5267*/
5268 {
5269 PyObject *__pyx_temp;
5270 {
5271 __pyx_temp = __pyx_r;
5272 __Pyx_INCREF(((PyObject *)__pyx_v_base));
5273 __pyx_r = ((PyObject *)__pyx_v_base);
5274 }
5275 __Pyx_XDECREF(__pyx_temp);
5276 }
5277 goto __pyx_L0;
5278
5279 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1069
5280 * PyArray_SetBaseObject(arr, base)
5281 *
5282 * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
5283 * base = PyArray_BASE(arr)
5284 * if base is NULL:
5285*/
5286
5287 /* function exit code */
5288 __pyx_L0:;
5289
5290 __Pyx_XGIVEREF(__pyx_r);
5291 __Pyx_RefNannyFinishContext();
5292 return __pyx_r;
5293}
5294
5295/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1077
5296 * # Versions of the import_* functions which are more suitable for
5297 * # Cython code.
5298 * cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
5299 * try:
5300 * __pyx_import_array()
5301*/
5302
5303static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
5304 int __pyx_r;
5305 __Pyx_RefNannyDeclarations
5306 PyObject *__pyx_t_1 = NULL;
5307 PyObject *__pyx_t_2 = NULL;
5308 PyObject *__pyx_t_3 = NULL;
5309 int __pyx_t_4;
5310 PyObject *__pyx_t_5 = NULL;
5311 PyObject *__pyx_t_6 = NULL;
5312 PyObject *__pyx_t_7 = NULL;
5313 PyObject *__pyx_t_8 = NULL;
5314 PyObject *__pyx_t_9 = NULL;
5315 size_t __pyx_t_10;
5316 int __pyx_lineno = 0;
5317 const char *__pyx_filename = NULL;
5318 int __pyx_clineno = 0;
5319 __Pyx_RefNannySetupContext("import_array", 0);
5320
5321 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1078
5322 * # Cython code.
5323 * cdef inline int import_array() except -1:
5324 * try: # <<<<<<<<<<<<<<
5325 * __pyx_import_array()
5326 * except Exception:
5327*/
5328 {
5329 __Pyx_PyThreadState_declare
5330 __Pyx_PyThreadState_assign
5331 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
5332 __Pyx_XGOTREF(__pyx_t_1);
5333 __Pyx_XGOTREF(__pyx_t_2);
5334 __Pyx_XGOTREF(__pyx_t_3);
5335 /*try:*/ {
5336
5337 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1079
5338 * cdef inline int import_array() except -1:
5339 * try:
5340 * __pyx_import_array() # <<<<<<<<<<<<<<
5341 * except Exception:
5342 * raise ImportError("numpy._core.multiarray failed to import")
5343*/
5344 __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 1079, __pyx_L3_error)
5345
5346
5347 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1078
5348 * # Cython code.
5349 * cdef inline int import_array() except -1:
5350 * try: # <<<<<<<<<<<<<<
5351 * __pyx_import_array()
5352 * except Exception:
5353*/
5354 }
5355 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
5356 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
5357 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
5358 goto __pyx_L8_try_end;
5359 __pyx_L3_error:;
5360
5361 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1080
5362 * try:
5363 * __pyx_import_array()
5364 * except Exception: # <<<<<<<<<<<<<<
5365 * raise ImportError("numpy._core.multiarray failed to import")
5366 *
5367*/
5368 __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
5369 if (__pyx_t_4) {
5370 __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
5371 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 1080, __pyx_L5_except_error)
5372 __Pyx_XGOTREF(__pyx_t_5);
5373 __Pyx_XGOTREF(__pyx_t_6);
5374 __Pyx_XGOTREF(__pyx_t_7);
5375
5376 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1081
5377 * __pyx_import_array()
5378 * except Exception:
5379 * raise ImportError("numpy._core.multiarray failed to import") # <<<<<<<<<<<<<<
5380 *
5381 * cdef inline int import_umath() except -1:
5382*/
5383 __pyx_t_9 = NULL;
5384 __pyx_t_10 = 1;
5385 {
5386 PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_numpy__core_multiarray_failed_to};
5387 __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ImportError)), __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
5388 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
5389 if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1081, __pyx_L5_except_error)
5390 __Pyx_GOTREF(__pyx_t_8);
5391 }
5392 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
5393 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5394 __PYX_ERR(1, 1081, __pyx_L5_except_error)
5395 }
5396 goto __pyx_L5_except_error;
5397
5398 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1078
5399 * # Cython code.
5400 * cdef inline int import_array() except -1:
5401 * try: # <<<<<<<<<<<<<<
5402 * __pyx_import_array()
5403 * except Exception:
5404*/
5405 __pyx_L5_except_error:;
5406 __Pyx_XGIVEREF(__pyx_t_1);
5407 __Pyx_XGIVEREF(__pyx_t_2);
5408 __Pyx_XGIVEREF(__pyx_t_3);
5409 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
5410 goto __pyx_L1_error;
5411 __pyx_L8_try_end:;
5412 }
5413
5414 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1077
5415 * # Versions of the import_* functions which are more suitable for
5416 * # Cython code.
5417 * cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
5418 * try:
5419 * __pyx_import_array()
5420*/
5421
5422 /* function exit code */
5423 __pyx_r = 0;
5424 goto __pyx_L0;
5425 __pyx_L1_error:;
5426 __Pyx_XDECREF(__pyx_t_5);
5427 __Pyx_XDECREF(__pyx_t_6);
5428 __Pyx_XDECREF(__pyx_t_7);
5429 __Pyx_XDECREF(__pyx_t_8);
5430 __Pyx_XDECREF(__pyx_t_9);
5431 __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
5432 __pyx_r = -1;
5433 __pyx_L0:;
5434
5435 __Pyx_RefNannyFinishContext();
5436 return __pyx_r;
5437}
5438
5439/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1083
5440 * raise ImportError("numpy._core.multiarray failed to import")
5441 *
5442 * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
5443 * try:
5444 * _import_umath()
5445*/
5446
5447static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
5448 int __pyx_r;
5449 __Pyx_RefNannyDeclarations
5450 PyObject *__pyx_t_1 = NULL;
5451 PyObject *__pyx_t_2 = NULL;
5452 PyObject *__pyx_t_3 = NULL;
5453 int __pyx_t_4;
5454 PyObject *__pyx_t_5 = NULL;
5455 PyObject *__pyx_t_6 = NULL;
5456 PyObject *__pyx_t_7 = NULL;
5457 PyObject *__pyx_t_8 = NULL;
5458 PyObject *__pyx_t_9 = NULL;
5459 size_t __pyx_t_10;
5460 int __pyx_lineno = 0;
5461 const char *__pyx_filename = NULL;
5462 int __pyx_clineno = 0;
5463 __Pyx_RefNannySetupContext("import_umath", 0);
5464
5465 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1084
5466 *
5467 * cdef inline int import_umath() except -1:
5468 * try: # <<<<<<<<<<<<<<
5469 * _import_umath()
5470 * except Exception:
5471*/
5472 {
5473 __Pyx_PyThreadState_declare
5474 __Pyx_PyThreadState_assign
5475 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
5476 __Pyx_XGOTREF(__pyx_t_1);
5477 __Pyx_XGOTREF(__pyx_t_2);
5478 __Pyx_XGOTREF(__pyx_t_3);
5479 /*try:*/ {
5480
5481 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1085
5482 * cdef inline int import_umath() except -1:
5483 * try:
5484 * _import_umath() # <<<<<<<<<<<<<<
5485 * except Exception:
5486 * raise ImportError("numpy._core.umath failed to import")
5487*/
5488 __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 1085, __pyx_L3_error)
5489
5490
5491 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1084
5492 *
5493 * cdef inline int import_umath() except -1:
5494 * try: # <<<<<<<<<<<<<<
5495 * _import_umath()
5496 * except Exception:
5497*/
5498 }
5499 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
5500 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
5501 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
5502 goto __pyx_L8_try_end;
5503 __pyx_L3_error:;
5504
5505 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1086
5506 * try:
5507 * _import_umath()
5508 * except Exception: # <<<<<<<<<<<<<<
5509 * raise ImportError("numpy._core.umath failed to import")
5510 *
5511*/
5512 __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
5513 if (__pyx_t_4) {
5514 __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
5515 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 1086, __pyx_L5_except_error)
5516 __Pyx_XGOTREF(__pyx_t_5);
5517 __Pyx_XGOTREF(__pyx_t_6);
5518 __Pyx_XGOTREF(__pyx_t_7);
5519
5520 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1087
5521 * _import_umath()
5522 * except Exception:
5523 * raise ImportError("numpy._core.umath failed to import") # <<<<<<<<<<<<<<
5524 *
5525 * cdef inline int import_ufunc() except -1:
5526*/
5527 __pyx_t_9 = NULL;
5528 __pyx_t_10 = 1;
5529 {
5530 PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_numpy__core_umath_failed_to_impo};
5531 __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ImportError)), __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
5532 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
5533 if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1087, __pyx_L5_except_error)
5534 __Pyx_GOTREF(__pyx_t_8);
5535 }
5536 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
5537 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5538 __PYX_ERR(1, 1087, __pyx_L5_except_error)
5539 }
5540 goto __pyx_L5_except_error;
5541
5542 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1084
5543 *
5544 * cdef inline int import_umath() except -1:
5545 * try: # <<<<<<<<<<<<<<
5546 * _import_umath()
5547 * except Exception:
5548*/
5549 __pyx_L5_except_error:;
5550 __Pyx_XGIVEREF(__pyx_t_1);
5551 __Pyx_XGIVEREF(__pyx_t_2);
5552 __Pyx_XGIVEREF(__pyx_t_3);
5553 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
5554 goto __pyx_L1_error;
5555 __pyx_L8_try_end:;
5556 }
5557
5558 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1083
5559 * raise ImportError("numpy._core.multiarray failed to import")
5560 *
5561 * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
5562 * try:
5563 * _import_umath()
5564*/
5565
5566 /* function exit code */
5567 __pyx_r = 0;
5568 goto __pyx_L0;
5569 __pyx_L1_error:;
5570 __Pyx_XDECREF(__pyx_t_5);
5571 __Pyx_XDECREF(__pyx_t_6);
5572 __Pyx_XDECREF(__pyx_t_7);
5573 __Pyx_XDECREF(__pyx_t_8);
5574 __Pyx_XDECREF(__pyx_t_9);
5575 __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
5576 __pyx_r = -1;
5577 __pyx_L0:;
5578
5579 __Pyx_RefNannyFinishContext();
5580 return __pyx_r;
5581}
5582
5583/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1089
5584 * raise ImportError("numpy._core.umath failed to import")
5585 *
5586 * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
5587 * try:
5588 * _import_umath()
5589*/
5590
5591static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
5592 int __pyx_r;
5593 __Pyx_RefNannyDeclarations
5594 PyObject *__pyx_t_1 = NULL;
5595 PyObject *__pyx_t_2 = NULL;
5596 PyObject *__pyx_t_3 = NULL;
5597 int __pyx_t_4;
5598 PyObject *__pyx_t_5 = NULL;
5599 PyObject *__pyx_t_6 = NULL;
5600 PyObject *__pyx_t_7 = NULL;
5601 PyObject *__pyx_t_8 = NULL;
5602 PyObject *__pyx_t_9 = NULL;
5603 size_t __pyx_t_10;
5604 int __pyx_lineno = 0;
5605 const char *__pyx_filename = NULL;
5606 int __pyx_clineno = 0;
5607 __Pyx_RefNannySetupContext("import_ufunc", 0);
5608
5609 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1090
5610 *
5611 * cdef inline int import_ufunc() except -1:
5612 * try: # <<<<<<<<<<<<<<
5613 * _import_umath()
5614 * except Exception:
5615*/
5616 {
5617 __Pyx_PyThreadState_declare
5618 __Pyx_PyThreadState_assign
5619 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
5620 __Pyx_XGOTREF(__pyx_t_1);
5621 __Pyx_XGOTREF(__pyx_t_2);
5622 __Pyx_XGOTREF(__pyx_t_3);
5623 /*try:*/ {
5624
5625 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1091
5626 * cdef inline int import_ufunc() except -1:
5627 * try:
5628 * _import_umath() # <<<<<<<<<<<<<<
5629 * except Exception:
5630 * raise ImportError("numpy._core.umath failed to import")
5631*/
5632 __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 1091, __pyx_L3_error)
5633
5634
5635 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1090
5636 *
5637 * cdef inline int import_ufunc() except -1:
5638 * try: # <<<<<<<<<<<<<<
5639 * _import_umath()
5640 * except Exception:
5641*/
5642 }
5643 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
5644 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
5645 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
5646 goto __pyx_L8_try_end;
5647 __pyx_L3_error:;
5648
5649 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1092
5650 * try:
5651 * _import_umath()
5652 * except Exception: # <<<<<<<<<<<<<<
5653 * raise ImportError("numpy._core.umath failed to import")
5654 *
5655*/
5656 __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
5657 if (__pyx_t_4) {
5658 __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
5659 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 1092, __pyx_L5_except_error)
5660 __Pyx_XGOTREF(__pyx_t_5);
5661 __Pyx_XGOTREF(__pyx_t_6);
5662 __Pyx_XGOTREF(__pyx_t_7);
5663
5664 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1093
5665 * _import_umath()
5666 * except Exception:
5667 * raise ImportError("numpy._core.umath failed to import") # <<<<<<<<<<<<<<
5668 *
5669 *
5670*/
5671 __pyx_t_9 = NULL;
5672 __pyx_t_10 = 1;
5673 {
5674 PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_numpy__core_umath_failed_to_impo};
5675 __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ImportError)), __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
5676 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
5677 if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1093, __pyx_L5_except_error)
5678 __Pyx_GOTREF(__pyx_t_8);
5679 }
5680 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
5681 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5682 __PYX_ERR(1, 1093, __pyx_L5_except_error)
5683 }
5684 goto __pyx_L5_except_error;
5685
5686 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1090
5687 *
5688 * cdef inline int import_ufunc() except -1:
5689 * try: # <<<<<<<<<<<<<<
5690 * _import_umath()
5691 * except Exception:
5692*/
5693 __pyx_L5_except_error:;
5694 __Pyx_XGIVEREF(__pyx_t_1);
5695 __Pyx_XGIVEREF(__pyx_t_2);
5696 __Pyx_XGIVEREF(__pyx_t_3);
5697 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
5698 goto __pyx_L1_error;
5699 __pyx_L8_try_end:;
5700 }
5701
5702 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1089
5703 * raise ImportError("numpy._core.umath failed to import")
5704 *
5705 * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
5706 * try:
5707 * _import_umath()
5708*/
5709
5710 /* function exit code */
5711 __pyx_r = 0;
5712 goto __pyx_L0;
5713 __pyx_L1_error:;
5714 __Pyx_XDECREF(__pyx_t_5);
5715 __Pyx_XDECREF(__pyx_t_6);
5716 __Pyx_XDECREF(__pyx_t_7);
5717 __Pyx_XDECREF(__pyx_t_8);
5718 __Pyx_XDECREF(__pyx_t_9);
5719 __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
5720 __pyx_r = -1;
5721 __pyx_L0:;
5722
5723 __Pyx_RefNannyFinishContext();
5724 return __pyx_r;
5725}
5726
5727/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1096
5728 *
5729 *
5730 * cdef inline bint is_timedelta64_object(object obj) noexcept: # <<<<<<<<<<<<<<
5731 * """
5732 * Cython equivalent of `isinstance(obj, np.timedelta64)`
5733*/
5734
5735static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) {
5736 int __pyx_r;
5737
5738 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1108
5739 * bool
5740 * """
5741 * return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type) # <<<<<<<<<<<<<<
5742 *
5743 *
5744*/
5745 {
5746
5747 __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type));
5748 }
5749 goto __pyx_L0;
5750
5751 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1096
5752 *
5753 *
5754 * cdef inline bint is_timedelta64_object(object obj) noexcept: # <<<<<<<<<<<<<<
5755 * """
5756 * Cython equivalent of `isinstance(obj, np.timedelta64)`
5757*/
5758
5759 /* function exit code */
5760 __pyx_L0:;
5761
5762 return __pyx_r;
5763}
5764
5765/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1111
5766 *
5767 *
5768 * cdef inline bint is_datetime64_object(object obj) noexcept: # <<<<<<<<<<<<<<
5769 * """
5770 * Cython equivalent of `isinstance(obj, np.datetime64)`
5771*/
5772
5773static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) {
5774 int __pyx_r;
5775
5776 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1123
5777 * bool
5778 * """
5779 * return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type) # <<<<<<<<<<<<<<
5780 *
5781 *
5782*/
5783 {
5784
5785 __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type));
5786 }
5787 goto __pyx_L0;
5788
5789 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1111
5790 *
5791 *
5792 * cdef inline bint is_datetime64_object(object obj) noexcept: # <<<<<<<<<<<<<<
5793 * """
5794 * Cython equivalent of `isinstance(obj, np.datetime64)`
5795*/
5796
5797 /* function exit code */
5798 __pyx_L0:;
5799
5800 return __pyx_r;
5801}
5802
5803/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1126
5804 *
5805 *
5806 * cdef inline npy_datetime get_datetime64_value(object obj) noexcept nogil: # <<<<<<<<<<<<<<
5807 * """
5808 * returns the int64 value underlying scalar numpy datetime64 object
5809*/
5810
5811static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) {
5812 npy_datetime __pyx_r;
5813
5814 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1133
5815 * also needed. That can be found using `get_datetime64_unit`.
5816 * """
5817 * return _PyDatetimeScalarObject_GetValue(obj) # <<<<<<<<<<<<<<
5818 *
5819 *
5820*/
5821 {
5822
5823 __pyx_r = _PyDatetimeScalarObject_GetValue(__pyx_v_obj);
5824 }
5825 goto __pyx_L0;
5826
5827 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1126
5828 *
5829 *
5830 * cdef inline npy_datetime get_datetime64_value(object obj) noexcept nogil: # <<<<<<<<<<<<<<
5831 * """
5832 * returns the int64 value underlying scalar numpy datetime64 object
5833*/
5834
5835 /* function exit code */
5836 __pyx_L0:;
5837 return __pyx_r;
5838}
5839
5840/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1136
5841 *
5842 *
5843 * cdef inline npy_timedelta get_timedelta64_value(object obj) noexcept nogil: # <<<<<<<<<<<<<<
5844 * """
5845 * returns the int64 value underlying scalar numpy timedelta64 object
5846*/
5847
5848static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) {
5849 npy_timedelta __pyx_r;
5850
5851 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1140
5852 * returns the int64 value underlying scalar numpy timedelta64 object
5853 * """
5854 * return _PyTimedeltaScalarObject_GetValue(obj) # <<<<<<<<<<<<<<
5855 *
5856 *
5857*/
5858 {
5859
5860 __pyx_r = _PyTimedeltaScalarObject_GetValue(__pyx_v_obj);
5861 }
5862 goto __pyx_L0;
5863
5864 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1136
5865 *
5866 *
5867 * cdef inline npy_timedelta get_timedelta64_value(object obj) noexcept nogil: # <<<<<<<<<<<<<<
5868 * """
5869 * returns the int64 value underlying scalar numpy timedelta64 object
5870*/
5871
5872 /* function exit code */
5873 __pyx_L0:;
5874 return __pyx_r;
5875}
5876
5877/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1143
5878 *
5879 *
5880 * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) noexcept nogil: # <<<<<<<<<<<<<<
5881 * """
5882 * returns the unit part of the dtype for a numpy datetime64 object.
5883*/
5884
5885static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) {
5886 NPY_DATETIMEUNIT __pyx_r;
5887
5888 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1147
5889 * returns the unit part of the dtype for a numpy datetime64 object.
5890 * """
5891 * return _PyDatetimeScalarObject_GetMetadata(obj).base # <<<<<<<<<<<<<<
5892 *
5893 *
5894*/
5895 {
5896
5897 __pyx_r = _PyDatetimeScalarObject_GetMetadata(__pyx_v_obj).base;
5898 }
5899 goto __pyx_L0;
5900
5901 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1143
5902 *
5903 *
5904 * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) noexcept nogil: # <<<<<<<<<<<<<<
5905 * """
5906 * returns the unit part of the dtype for a numpy datetime64 object.
5907*/
5908
5909 /* function exit code */
5910 __pyx_L0:;
5911 return __pyx_r;
5912}
5913
5914/* "cTwophaseDarcyCoefficients.pyx":33
5915 * pass
5916 *
5917 * def twophaseDarcy_fc_sd_het_matType(int pskModelFlag, # <<<<<<<<<<<<<<
5918 * int density_w_flag,
5919 * int density_n_flag,
5920*/
5921
5922/* Python wrapper */
5923static PyObject *__pyx_pw_26cTwophaseDarcyCoefficients_1twophaseDarcy_fc_sd_het_matType(PyObject *__pyx_self,
5924#if CYTHON_VECTORCALL
5925PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
5926#else
5927PyObject *__pyx_args, PyObject *__pyx_kwds
5928#endif
5929); /*proto*/
5930PyDoc_STRVAR(__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 ");
5931static PyMethodDef __pyx_mdef_26cTwophaseDarcyCoefficients_1twophaseDarcy_fc_sd_het_matType = {"twophaseDarcy_fc_sd_het_matType", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_26cTwophaseDarcyCoefficients_1twophaseDarcy_fc_sd_het_matType, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_26cTwophaseDarcyCoefficients_twophaseDarcy_fc_sd_het_matType};
5932static PyObject *__pyx_pw_26cTwophaseDarcyCoefficients_1twophaseDarcy_fc_sd_het_matType(PyObject *__pyx_self,
5933#if CYTHON_VECTORCALL
5934PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
5935#else
5936PyObject *__pyx_args, PyObject *__pyx_kwds
5937#endif
5938) {
5939 int __pyx_v_pskModelFlag;
5940 int __pyx_v_density_w_flag;
5941 int __pyx_v_density_n_flag;
5942 PyArrayObject *__pyx_v_rowptr = 0;
5943 PyArrayObject *__pyx_v_colind = 0;
5944 PyArrayObject *__pyx_v_matType = 0;
5945 double __pyx_v_muw;
5946 double __pyx_v_mun;
5947 PyArrayObject *__pyx_v_omega = 0;
5948 PyArrayObject *__pyx_v_Kbar = 0;
5949 double __pyx_v_b;
5950 PyArrayObject *__pyx_v_rwork_psk = 0;
5951 PyArrayObject *__pyx_v_iwork_psk = 0;
5952 PyArrayObject *__pyx_v_rwork_psk_tol = 0;
5953 PyArrayObject *__pyx_v_rwork_density_w = 0;
5954 PyArrayObject *__pyx_v_rwork_density_n = 0;
5955 PyArrayObject *__pyx_v_g = 0;
5956 PyArrayObject *__pyx_v_x = 0;
5957 PyArrayObject *__pyx_v_sw = 0;
5958 PyArrayObject *__pyx_v_psiw = 0;
5959 PyArrayObject *__pyx_v_mw = 0;
5960 PyArrayObject *__pyx_v_dmw = 0;
5961 PyArrayObject *__pyx_v_dmw_dpsiw = 0;
5962 PyArrayObject *__pyx_v_mn = 0;
5963 PyArrayObject *__pyx_v_dmn = 0;
5964 PyArrayObject *__pyx_v_dmn_dpsiw = 0;
5965 PyArrayObject *__pyx_v_psin = 0;
5966 PyArrayObject *__pyx_v_dpsin = 0;
5967 PyArrayObject *__pyx_v_dpsin_dpsiw = 0;
5968 PyArrayObject *__pyx_v_phi_psiw = 0;
5969 PyArrayObject *__pyx_v_dphi_psiw_dpsiw = 0;
5970 PyArrayObject *__pyx_v_phi_psin = 0;
5971 PyArrayObject *__pyx_v_dphi_psin_dpsiw = 0;
5972 PyArrayObject *__pyx_v_dphi_psin_dsw = 0;
5973 PyArrayObject *__pyx_v_aw = 0;
5974 PyArrayObject *__pyx_v_daw = 0;
5975 PyArrayObject *__pyx_v_daw_dpsiw = 0;
5976 PyArrayObject *__pyx_v_an = 0;
5977 PyArrayObject *__pyx_v_dan = 0;
5978 PyArrayObject *__pyx_v_dan_dpsiw = 0;
5979 #if !CYTHON_VECTORCALL
5980 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
5981 #endif
5982 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
5983 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};
5984 int __pyx_lineno = 0;
5985 const char *__pyx_filename = NULL;
5986 int __pyx_clineno = 0;
5987 PyObject *__pyx_r = 0;
5988 __Pyx_RefNannyDeclarations
5989 __Pyx_RefNannySetupContext("twophaseDarcy_fc_sd_het_matType (wrapper)", 0);
5990 #if !CYTHON_VECTORCALL
5991 #if CYTHON_ASSUME_SAFE_SIZE
5992 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
5993 #else
5994 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
5995 #endif
5996 #endif
5997 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
5998 {
5999 PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pskModelFlag,&__pyx_mstate_global->__pyx_n_u_density_w_flag,&__pyx_mstate_global->__pyx_n_u_density_n_flag,&__pyx_mstate_global->__pyx_n_u_rowptr,&__pyx_mstate_global->__pyx_n_u_colind,&__pyx_mstate_global->__pyx_n_u_matType,&__pyx_mstate_global->__pyx_n_u_muw,&__pyx_mstate_global->__pyx_n_u_mun,&__pyx_mstate_global->__pyx_n_u_omega,&__pyx_mstate_global->__pyx_n_u_Kbar,&__pyx_mstate_global->__pyx_n_u_b,&__pyx_mstate_global->__pyx_n_u_rwork_psk,&__pyx_mstate_global->__pyx_n_u_iwork_psk,&__pyx_mstate_global->__pyx_n_u_rwork_psk_tol,&__pyx_mstate_global->__pyx_n_u_rwork_density_w,&__pyx_mstate_global->__pyx_n_u_rwork_density_n,&__pyx_mstate_global->__pyx_n_u_g,&__pyx_mstate_global->__pyx_n_u_x,&__pyx_mstate_global->__pyx_n_u_sw,&__pyx_mstate_global->__pyx_n_u_psiw,&__pyx_mstate_global->__pyx_n_u_mw,&__pyx_mstate_global->__pyx_n_u_dmw,&__pyx_mstate_global->__pyx_n_u_dmw_dpsiw,&__pyx_mstate_global->__pyx_n_u_mn,&__pyx_mstate_global->__pyx_n_u_dmn,&__pyx_mstate_global->__pyx_n_u_dmn_dpsiw,&__pyx_mstate_global->__pyx_n_u_psin,&__pyx_mstate_global->__pyx_n_u_dpsin,&__pyx_mstate_global->__pyx_n_u_dpsin_dpsiw,&__pyx_mstate_global->__pyx_n_u_phi_psiw,&__pyx_mstate_global->__pyx_n_u_dphi_psiw_dpsiw,&__pyx_mstate_global->__pyx_n_u_phi_psin,&__pyx_mstate_global->__pyx_n_u_dphi_psin_dpsiw,&__pyx_mstate_global->__pyx_n_u_dphi_psin_dsw,&__pyx_mstate_global->__pyx_n_u_aw,&__pyx_mstate_global->__pyx_n_u_daw,&__pyx_mstate_global->__pyx_n_u_daw_dpsiw,&__pyx_mstate_global->__pyx_n_u_an,&__pyx_mstate_global->__pyx_n_u_dan,&__pyx_mstate_global->__pyx_n_u_dan_dpsiw,0};
6000 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
6001 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 33, __pyx_L3_error)
6002 if (__pyx_kwds_len > 0) {
6003 switch (__pyx_nargs) {
6004 case 40:
6005 values[39] = __Pyx_ArgRef_FASTCALL(__pyx_args, 39);
6006 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[39])) __PYX_ERR(0, 33, __pyx_L3_error)
6007 CYTHON_FALLTHROUGH;
6008 case 39:
6009 values[38] = __Pyx_ArgRef_FASTCALL(__pyx_args, 38);
6010 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[38])) __PYX_ERR(0, 33, __pyx_L3_error)
6011 CYTHON_FALLTHROUGH;
6012 case 38:
6013 values[37] = __Pyx_ArgRef_FASTCALL(__pyx_args, 37);
6014 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[37])) __PYX_ERR(0, 33, __pyx_L3_error)
6015 CYTHON_FALLTHROUGH;
6016 case 37:
6017 values[36] = __Pyx_ArgRef_FASTCALL(__pyx_args, 36);
6018 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[36])) __PYX_ERR(0, 33, __pyx_L3_error)
6019 CYTHON_FALLTHROUGH;
6020 case 36:
6021 values[35] = __Pyx_ArgRef_FASTCALL(__pyx_args, 35);
6022 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[35])) __PYX_ERR(0, 33, __pyx_L3_error)
6023 CYTHON_FALLTHROUGH;
6024 case 35:
6025 values[34] = __Pyx_ArgRef_FASTCALL(__pyx_args, 34);
6026 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[34])) __PYX_ERR(0, 33, __pyx_L3_error)
6027 CYTHON_FALLTHROUGH;
6028 case 34:
6029 values[33] = __Pyx_ArgRef_FASTCALL(__pyx_args, 33);
6030 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[33])) __PYX_ERR(0, 33, __pyx_L3_error)
6031 CYTHON_FALLTHROUGH;
6032 case 33:
6033 values[32] = __Pyx_ArgRef_FASTCALL(__pyx_args, 32);
6034 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[32])) __PYX_ERR(0, 33, __pyx_L3_error)
6035 CYTHON_FALLTHROUGH;
6036 case 32:
6037 values[31] = __Pyx_ArgRef_FASTCALL(__pyx_args, 31);
6038 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[31])) __PYX_ERR(0, 33, __pyx_L3_error)
6039 CYTHON_FALLTHROUGH;
6040 case 31:
6041 values[30] = __Pyx_ArgRef_FASTCALL(__pyx_args, 30);
6042 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[30])) __PYX_ERR(0, 33, __pyx_L3_error)
6043 CYTHON_FALLTHROUGH;
6044 case 30:
6045 values[29] = __Pyx_ArgRef_FASTCALL(__pyx_args, 29);
6046 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[29])) __PYX_ERR(0, 33, __pyx_L3_error)
6047 CYTHON_FALLTHROUGH;
6048 case 29:
6049 values[28] = __Pyx_ArgRef_FASTCALL(__pyx_args, 28);
6050 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[28])) __PYX_ERR(0, 33, __pyx_L3_error)
6051 CYTHON_FALLTHROUGH;
6052 case 28:
6053 values[27] = __Pyx_ArgRef_FASTCALL(__pyx_args, 27);
6054 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[27])) __PYX_ERR(0, 33, __pyx_L3_error)
6055 CYTHON_FALLTHROUGH;
6056 case 27:
6057 values[26] = __Pyx_ArgRef_FASTCALL(__pyx_args, 26);
6058 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[26])) __PYX_ERR(0, 33, __pyx_L3_error)
6059 CYTHON_FALLTHROUGH;
6060 case 26:
6061 values[25] = __Pyx_ArgRef_FASTCALL(__pyx_args, 25);
6062 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[25])) __PYX_ERR(0, 33, __pyx_L3_error)
6063 CYTHON_FALLTHROUGH;
6064 case 25:
6065 values[24] = __Pyx_ArgRef_FASTCALL(__pyx_args, 24);
6066 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[24])) __PYX_ERR(0, 33, __pyx_L3_error)
6067 CYTHON_FALLTHROUGH;
6068 case 24:
6069 values[23] = __Pyx_ArgRef_FASTCALL(__pyx_args, 23);
6070 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[23])) __PYX_ERR(0, 33, __pyx_L3_error)
6071 CYTHON_FALLTHROUGH;
6072 case 23:
6073 values[22] = __Pyx_ArgRef_FASTCALL(__pyx_args, 22);
6074 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[22])) __PYX_ERR(0, 33, __pyx_L3_error)
6075 CYTHON_FALLTHROUGH;
6076 case 22:
6077 values[21] = __Pyx_ArgRef_FASTCALL(__pyx_args, 21);
6078 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[21])) __PYX_ERR(0, 33, __pyx_L3_error)
6079 CYTHON_FALLTHROUGH;
6080 case 21:
6081 values[20] = __Pyx_ArgRef_FASTCALL(__pyx_args, 20);
6082 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[20])) __PYX_ERR(0, 33, __pyx_L3_error)
6083 CYTHON_FALLTHROUGH;
6084 case 20:
6085 values[19] = __Pyx_ArgRef_FASTCALL(__pyx_args, 19);
6086 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[19])) __PYX_ERR(0, 33, __pyx_L3_error)
6087 CYTHON_FALLTHROUGH;
6088 case 19:
6089 values[18] = __Pyx_ArgRef_FASTCALL(__pyx_args, 18);
6090 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[18])) __PYX_ERR(0, 33, __pyx_L3_error)
6091 CYTHON_FALLTHROUGH;
6092 case 18:
6093 values[17] = __Pyx_ArgRef_FASTCALL(__pyx_args, 17);
6094 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[17])) __PYX_ERR(0, 33, __pyx_L3_error)
6095 CYTHON_FALLTHROUGH;
6096 case 17:
6097 values[16] = __Pyx_ArgRef_FASTCALL(__pyx_args, 16);
6098 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[16])) __PYX_ERR(0, 33, __pyx_L3_error)
6099 CYTHON_FALLTHROUGH;
6100 case 16:
6101 values[15] = __Pyx_ArgRef_FASTCALL(__pyx_args, 15);
6102 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[15])) __PYX_ERR(0, 33, __pyx_L3_error)
6103 CYTHON_FALLTHROUGH;
6104 case 15:
6105 values[14] = __Pyx_ArgRef_FASTCALL(__pyx_args, 14);
6106 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[14])) __PYX_ERR(0, 33, __pyx_L3_error)
6107 CYTHON_FALLTHROUGH;
6108 case 14:
6109 values[13] = __Pyx_ArgRef_FASTCALL(__pyx_args, 13);
6110 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[13])) __PYX_ERR(0, 33, __pyx_L3_error)
6111 CYTHON_FALLTHROUGH;
6112 case 13:
6113 values[12] = __Pyx_ArgRef_FASTCALL(__pyx_args, 12);
6114 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[12])) __PYX_ERR(0, 33, __pyx_L3_error)
6115 CYTHON_FALLTHROUGH;
6116 case 12:
6117 values[11] = __Pyx_ArgRef_FASTCALL(__pyx_args, 11);
6118 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[11])) __PYX_ERR(0, 33, __pyx_L3_error)
6119 CYTHON_FALLTHROUGH;
6120 case 11:
6121 values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10);
6122 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 33, __pyx_L3_error)
6123 CYTHON_FALLTHROUGH;
6124 case 10:
6125 values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
6126 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 33, __pyx_L3_error)
6127 CYTHON_FALLTHROUGH;
6128 case 9:
6129 values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
6130 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 33, __pyx_L3_error)
6131 CYTHON_FALLTHROUGH;
6132 case 8:
6133 values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
6134 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 33, __pyx_L3_error)
6135 CYTHON_FALLTHROUGH;
6136 case 7:
6137 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
6138 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 33, __pyx_L3_error)
6139 CYTHON_FALLTHROUGH;
6140 case 6:
6141 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
6142 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 33, __pyx_L3_error)
6143 CYTHON_FALLTHROUGH;
6144 case 5:
6145 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
6146 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 33, __pyx_L3_error)
6147 CYTHON_FALLTHROUGH;
6148 case 4:
6149 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
6150 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 33, __pyx_L3_error)
6151 CYTHON_FALLTHROUGH;
6152 case 3:
6153 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
6154 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 33, __pyx_L3_error)
6155 CYTHON_FALLTHROUGH;
6156 case 2:
6157 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
6158 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 33, __pyx_L3_error)
6159 CYTHON_FALLTHROUGH;
6160 case 1:
6161 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
6162 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 33, __pyx_L3_error)
6163 CYTHON_FALLTHROUGH;
6164 case 0: break;
6165 default: goto __pyx_L5_argtuple_error;
6166 }
6167 const Py_ssize_t kwd_pos_args = __pyx_nargs;
6168 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "twophaseDarcy_fc_sd_het_matType", 0) < (0)) __PYX_ERR(0, 33, __pyx_L3_error)
6169 for (Py_ssize_t i = __pyx_nargs; i < 40; i++) {
6170 if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("twophaseDarcy_fc_sd_het_matType", 1, 40, 40, i); __PYX_ERR(0, 33, __pyx_L3_error) }
6171 }
6172 } else if (unlikely(__pyx_nargs != 40)) {
6173 goto __pyx_L5_argtuple_error;
6174 } else {
6175 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
6176 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 33, __pyx_L3_error)
6177 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
6178 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 33, __pyx_L3_error)
6179 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
6180 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 33, __pyx_L3_error)
6181 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
6182 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 33, __pyx_L3_error)
6183 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
6184 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 33, __pyx_L3_error)
6185 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
6186 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 33, __pyx_L3_error)
6187 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
6188 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 33, __pyx_L3_error)
6189 values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
6190 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 33, __pyx_L3_error)
6191 values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
6192 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 33, __pyx_L3_error)
6193 values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
6194 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 33, __pyx_L3_error)
6195 values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10);
6196 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 33, __pyx_L3_error)
6197 values[11] = __Pyx_ArgRef_FASTCALL(__pyx_args, 11);
6198 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[11])) __PYX_ERR(0, 33, __pyx_L3_error)
6199 values[12] = __Pyx_ArgRef_FASTCALL(__pyx_args, 12);
6200 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[12])) __PYX_ERR(0, 33, __pyx_L3_error)
6201 values[13] = __Pyx_ArgRef_FASTCALL(__pyx_args, 13);
6202 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[13])) __PYX_ERR(0, 33, __pyx_L3_error)
6203 values[14] = __Pyx_ArgRef_FASTCALL(__pyx_args, 14);
6204 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[14])) __PYX_ERR(0, 33, __pyx_L3_error)
6205 values[15] = __Pyx_ArgRef_FASTCALL(__pyx_args, 15);
6206 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[15])) __PYX_ERR(0, 33, __pyx_L3_error)
6207 values[16] = __Pyx_ArgRef_FASTCALL(__pyx_args, 16);
6208 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[16])) __PYX_ERR(0, 33, __pyx_L3_error)
6209 values[17] = __Pyx_ArgRef_FASTCALL(__pyx_args, 17);
6210 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[17])) __PYX_ERR(0, 33, __pyx_L3_error)
6211 values[18] = __Pyx_ArgRef_FASTCALL(__pyx_args, 18);
6212 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[18])) __PYX_ERR(0, 33, __pyx_L3_error)
6213 values[19] = __Pyx_ArgRef_FASTCALL(__pyx_args, 19);
6214 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[19])) __PYX_ERR(0, 33, __pyx_L3_error)
6215 values[20] = __Pyx_ArgRef_FASTCALL(__pyx_args, 20);
6216 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[20])) __PYX_ERR(0, 33, __pyx_L3_error)
6217 values[21] = __Pyx_ArgRef_FASTCALL(__pyx_args, 21);
6218 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[21])) __PYX_ERR(0, 33, __pyx_L3_error)
6219 values[22] = __Pyx_ArgRef_FASTCALL(__pyx_args, 22);
6220 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[22])) __PYX_ERR(0, 33, __pyx_L3_error)
6221 values[23] = __Pyx_ArgRef_FASTCALL(__pyx_args, 23);
6222 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[23])) __PYX_ERR(0, 33, __pyx_L3_error)
6223 values[24] = __Pyx_ArgRef_FASTCALL(__pyx_args, 24);
6224 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[24])) __PYX_ERR(0, 33, __pyx_L3_error)
6225 values[25] = __Pyx_ArgRef_FASTCALL(__pyx_args, 25);
6226 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[25])) __PYX_ERR(0, 33, __pyx_L3_error)
6227 values[26] = __Pyx_ArgRef_FASTCALL(__pyx_args, 26);
6228 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[26])) __PYX_ERR(0, 33, __pyx_L3_error)
6229 values[27] = __Pyx_ArgRef_FASTCALL(__pyx_args, 27);
6230 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[27])) __PYX_ERR(0, 33, __pyx_L3_error)
6231 values[28] = __Pyx_ArgRef_FASTCALL(__pyx_args, 28);
6232 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[28])) __PYX_ERR(0, 33, __pyx_L3_error)
6233 values[29] = __Pyx_ArgRef_FASTCALL(__pyx_args, 29);
6234 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[29])) __PYX_ERR(0, 33, __pyx_L3_error)
6235 values[30] = __Pyx_ArgRef_FASTCALL(__pyx_args, 30);
6236 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[30])) __PYX_ERR(0, 33, __pyx_L3_error)
6237 values[31] = __Pyx_ArgRef_FASTCALL(__pyx_args, 31);
6238 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[31])) __PYX_ERR(0, 33, __pyx_L3_error)
6239 values[32] = __Pyx_ArgRef_FASTCALL(__pyx_args, 32);
6240 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[32])) __PYX_ERR(0, 33, __pyx_L3_error)
6241 values[33] = __Pyx_ArgRef_FASTCALL(__pyx_args, 33);
6242 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[33])) __PYX_ERR(0, 33, __pyx_L3_error)
6243 values[34] = __Pyx_ArgRef_FASTCALL(__pyx_args, 34);
6244 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[34])) __PYX_ERR(0, 33, __pyx_L3_error)
6245 values[35] = __Pyx_ArgRef_FASTCALL(__pyx_args, 35);
6246 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[35])) __PYX_ERR(0, 33, __pyx_L3_error)
6247 values[36] = __Pyx_ArgRef_FASTCALL(__pyx_args, 36);
6248 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[36])) __PYX_ERR(0, 33, __pyx_L3_error)
6249 values[37] = __Pyx_ArgRef_FASTCALL(__pyx_args, 37);
6250 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[37])) __PYX_ERR(0, 33, __pyx_L3_error)
6251 values[38] = __Pyx_ArgRef_FASTCALL(__pyx_args, 38);
6252 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[38])) __PYX_ERR(0, 33, __pyx_L3_error)
6253 values[39] = __Pyx_ArgRef_FASTCALL(__pyx_args, 39);
6254 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[39])) __PYX_ERR(0, 33, __pyx_L3_error)
6255 }
6256 __pyx_v_pskModelFlag = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_pskModelFlag == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 33, __pyx_L3_error)
6257 __pyx_v_density_w_flag = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_density_w_flag == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 34, __pyx_L3_error)
6258 __pyx_v_density_n_flag = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_density_n_flag == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 35, __pyx_L3_error)
6259 __pyx_v_rowptr = ((PyArrayObject *)values[3]);
6260 __pyx_v_colind = ((PyArrayObject *)values[4]);
6261 __pyx_v_matType = ((PyArrayObject *)values[5]);
6262 __pyx_v_muw = __Pyx_PyFloat_AsDouble(values[6]); if (unlikely((__pyx_v_muw == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 39, __pyx_L3_error)
6263 __pyx_v_mun = __Pyx_PyFloat_AsDouble(values[7]); if (unlikely((__pyx_v_mun == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 40, __pyx_L3_error)
6264 __pyx_v_omega = ((PyArrayObject *)values[8]);
6265 __pyx_v_Kbar = ((PyArrayObject *)values[9]);
6266 __pyx_v_b = __Pyx_PyFloat_AsDouble(values[10]); if (unlikely((__pyx_v_b == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 43, __pyx_L3_error)
6267 __pyx_v_rwork_psk = ((PyArrayObject *)values[11]);
6268 __pyx_v_iwork_psk = ((PyArrayObject *)values[12]);
6269 __pyx_v_rwork_psk_tol = ((PyArrayObject *)values[13]);
6270 __pyx_v_rwork_density_w = ((PyArrayObject *)values[14]);
6271 __pyx_v_rwork_density_n = ((PyArrayObject *)values[15]);
6272 __pyx_v_g = ((PyArrayObject *)values[16]);
6273 __pyx_v_x = ((PyArrayObject *)values[17]);
6274 __pyx_v_sw = ((PyArrayObject *)values[18]);
6275 __pyx_v_psiw = ((PyArrayObject *)values[19]);
6276 __pyx_v_mw = ((PyArrayObject *)values[20]);
6277 __pyx_v_dmw = ((PyArrayObject *)values[21]);
6278 __pyx_v_dmw_dpsiw = ((PyArrayObject *)values[22]);
6279 __pyx_v_mn = ((PyArrayObject *)values[23]);
6280 __pyx_v_dmn = ((PyArrayObject *)values[24]);
6281 __pyx_v_dmn_dpsiw = ((PyArrayObject *)values[25]);
6282 __pyx_v_psin = ((PyArrayObject *)values[26]);
6283 __pyx_v_dpsin = ((PyArrayObject *)values[27]);
6284 __pyx_v_dpsin_dpsiw = ((PyArrayObject *)values[28]);
6285 __pyx_v_phi_psiw = ((PyArrayObject *)values[29]);
6286 __pyx_v_dphi_psiw_dpsiw = ((PyArrayObject *)values[30]);
6287 __pyx_v_phi_psin = ((PyArrayObject *)values[31]);
6288 __pyx_v_dphi_psin_dpsiw = ((PyArrayObject *)values[32]);
6289 __pyx_v_dphi_psin_dsw = ((PyArrayObject *)values[33]);
6290 __pyx_v_aw = ((PyArrayObject *)values[34]);
6291 __pyx_v_daw = ((PyArrayObject *)values[35]);
6292 __pyx_v_daw_dpsiw = ((PyArrayObject *)values[36]);
6293 __pyx_v_an = ((PyArrayObject *)values[37]);
6294 __pyx_v_dan = ((PyArrayObject *)values[38]);
6295 __pyx_v_dan_dpsiw = ((PyArrayObject *)values[39]);
6296 }
6297 goto __pyx_L6_skip;
6298 __pyx_L5_argtuple_error:;
6299 __Pyx_RaiseArgtupleInvalid("twophaseDarcy_fc_sd_het_matType", 1, 40, 40, __pyx_nargs); __PYX_ERR(0, 33, __pyx_L3_error)
6300 __pyx_L6_skip:;
6301 goto __pyx_L4_argument_unpacking_done;
6302 __pyx_L3_error:;
6303 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
6304 Py_XDECREF(values[__pyx_temp]);
6305 }
6306 __Pyx_AddTraceback("cTwophaseDarcyCoefficients.twophaseDarcy_fc_sd_het_matType", __pyx_clineno, __pyx_lineno, __pyx_filename);
6307 __Pyx_RefNannyFinishContext();
6308 return NULL;
6309 __pyx_L4_argument_unpacking_done:;
6310 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rowptr), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "rowptr", 0))) __PYX_ERR(0, 36, __pyx_L1_error)
6311 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_colind), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "colind", 0))) __PYX_ERR(0, 37, __pyx_L1_error)
6312 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_matType), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "matType", 0))) __PYX_ERR(0, 38, __pyx_L1_error)
6313 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_omega), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "omega", 0))) __PYX_ERR(0, 41, __pyx_L1_error)
6314 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Kbar), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "Kbar", 0))) __PYX_ERR(0, 42, __pyx_L1_error)
6315 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_psk), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "rwork_psk", 0))) __PYX_ERR(0, 44, __pyx_L1_error)
6316 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork_psk), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "iwork_psk", 0))) __PYX_ERR(0, 45, __pyx_L1_error)
6317 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_psk_tol), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "rwork_psk_tol", 0))) __PYX_ERR(0, 46, __pyx_L1_error)
6318 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_density_w), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "rwork_density_w", 0))) __PYX_ERR(0, 47, __pyx_L1_error)
6319 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_density_n), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "rwork_density_n", 0))) __PYX_ERR(0, 48, __pyx_L1_error)
6320 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_g), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "g", 0))) __PYX_ERR(0, 49, __pyx_L1_error)
6321 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "x", 0))) __PYX_ERR(0, 50, __pyx_L1_error)
6322 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "sw", 0))) __PYX_ERR(0, 51, __pyx_L1_error)
6323 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_psiw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "psiw", 0))) __PYX_ERR(0, 52, __pyx_L1_error)
6324 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "mw", 0))) __PYX_ERR(0, 53, __pyx_L1_error)
6325 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dmw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "dmw", 0))) __PYX_ERR(0, 54, __pyx_L1_error)
6326 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dmw_dpsiw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "dmw_dpsiw", 0))) __PYX_ERR(0, 55, __pyx_L1_error)
6327 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mn), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "mn", 0))) __PYX_ERR(0, 56, __pyx_L1_error)
6328 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dmn), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "dmn", 0))) __PYX_ERR(0, 57, __pyx_L1_error)
6329 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dmn_dpsiw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "dmn_dpsiw", 0))) __PYX_ERR(0, 58, __pyx_L1_error)
6330 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_psin), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "psin", 0))) __PYX_ERR(0, 59, __pyx_L1_error)
6331 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpsin), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "dpsin", 0))) __PYX_ERR(0, 60, __pyx_L1_error)
6332 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpsin_dpsiw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "dpsin_dpsiw", 0))) __PYX_ERR(0, 61, __pyx_L1_error)
6333 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_phi_psiw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "phi_psiw", 0))) __PYX_ERR(0, 62, __pyx_L1_error)
6334 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dphi_psiw_dpsiw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "dphi_psiw_dpsiw", 0))) __PYX_ERR(0, 63, __pyx_L1_error)
6335 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_phi_psin), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "phi_psin", 0))) __PYX_ERR(0, 64, __pyx_L1_error)
6336 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dphi_psin_dpsiw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "dphi_psin_dpsiw", 0))) __PYX_ERR(0, 65, __pyx_L1_error)
6337 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dphi_psin_dsw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "dphi_psin_dsw", 0))) __PYX_ERR(0, 66, __pyx_L1_error)
6338 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_aw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "aw", 0))) __PYX_ERR(0, 67, __pyx_L1_error)
6339 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_daw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "daw", 0))) __PYX_ERR(0, 68, __pyx_L1_error)
6340 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_daw_dpsiw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "daw_dpsiw", 0))) __PYX_ERR(0, 69, __pyx_L1_error)
6341 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_an), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "an", 0))) __PYX_ERR(0, 70, __pyx_L1_error)
6342 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dan), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "dan", 0))) __PYX_ERR(0, 71, __pyx_L1_error)
6343 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dan_dpsiw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "dan_dpsiw", 0))) __PYX_ERR(0, 72, __pyx_L1_error)
6344 __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);
6345
6346 /* function exit code */
6347 goto __pyx_L0;
6348 __pyx_L1_error:;
6349 __pyx_r = NULL;
6350 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
6351 Py_XDECREF(values[__pyx_temp]);
6352 }
6353 goto __pyx_L7_cleaned_up;
6354 __pyx_L0:;
6355 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
6356 Py_XDECREF(values[__pyx_temp]);
6357 }
6358 __pyx_L7_cleaned_up:;
6359
6360
6361
6362
6363
6364
6365 __Pyx_RefNannyFinishContext();
6366 return __pyx_r;
6367}
6368
6369static 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) {
6370 int __pyx_v_nPointsPerSimplex;
6371 int __pyx_v_nSimplex;
6372 PyObject *__pyx_r = NULL;
6373 __Pyx_RefNannyDeclarations
6374 npy_intp __pyx_t_1;
6375 int __pyx_t_2;
6376 PyObject *__pyx_t_3 = NULL;
6377 int __pyx_t_4;
6378 PyObject *__pyx_t_5 = NULL;
6379 PyObject *__pyx_t_6 = NULL;
6380 PyObject *__pyx_t_7 = NULL;
6381 size_t __pyx_t_8;
6382 int __pyx_lineno = 0;
6383 const char *__pyx_filename = NULL;
6384 int __pyx_clineno = 0;
6385 __Pyx_RefNannySetupContext("twophaseDarcy_fc_sd_het_matType", 0);
6386
6387 /* "cTwophaseDarcyCoefficients.pyx":78
6388 *
6389 * """
6390 * cdef int nPointsPerSimplex=sw.shape[sw.ndim-1] # <<<<<<<<<<<<<<
6391 * cdef int nSimplex=sw.size//nPointsPerSimplex
6392 * #while debugging allow only one option
6393*/
6394 __pyx_v_nPointsPerSimplex = (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_sw)[(__pyx_f_5numpy_7ndarray_4ndim___get__(__pyx_v_sw) - 1)]);
6395
6396 /* "cTwophaseDarcyCoefficients.pyx":79
6397 * """
6398 * cdef int nPointsPerSimplex=sw.shape[sw.ndim-1]
6399 * cdef int nSimplex=sw.size//nPointsPerSimplex # <<<<<<<<<<<<<<
6400 * #while debugging allow only one option
6401 * #exponential for wetting phase
6402*/
6403 __pyx_t_1 = __pyx_f_5numpy_7ndarray_4size___get__(__pyx_v_sw);
6404
6405 if (unlikely(__pyx_v_nPointsPerSimplex == 0)) {
6406 PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
6407 __PYX_ERR(0, 79, __pyx_L1_error)
6408 }
6409 else if (sizeof(npy_intp) == sizeof(long) && (!(((int)-1) > 0)) && unlikely(__pyx_v_nPointsPerSimplex == (int)-1) && unlikely(__Pyx_UNARY_NEG_WOULD_OVERFLOW(__pyx_t_1))) {
6410 PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
6411 __PYX_ERR(0, 79, __pyx_L1_error)
6412 }
6413 __pyx_v_nSimplex = __Pyx_div_npy_intp(__pyx_t_1, __pyx_v_nPointsPerSimplex, 0);
6414
6415
6416 /* "cTwophaseDarcyCoefficients.pyx":82
6417 * #while debugging allow only one option
6418 * #exponential for wetting phase
6419 * assert density_w_flag == 1 # <<<<<<<<<<<<<<
6420 * if density_n_flag == 1: #nonwetting exponential
6421 * if pskModelFlag == 0:
6422*/
6423 #ifndef CYTHON_WITHOUT_ASSERTIONS
6424 if (unlikely(__pyx_assertions_enabled())) {
6425 __pyx_t_2 = (__pyx_v_density_w_flag == 1);
6426
6427 if (unlikely(!__pyx_t_2)) {
6428 __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
6429 __PYX_ERR(0, 82, __pyx_L1_error)
6430 }
6431
6432 }
6433 #else
6434 if ((1)); else __PYX_ERR(0, 82, __pyx_L1_error)
6435 #endif
6436
6437 /* "cTwophaseDarcyCoefficients.pyx":83
6438 * #exponential for wetting phase
6439 * assert density_w_flag == 1
6440 * if density_n_flag == 1: #nonwetting exponential # <<<<<<<<<<<<<<
6441 * if pskModelFlag == 0:
6442 * tpdc.twophaseDarcy_fc_sd_het_matType[SimplePSK,ExponentialDensity,ExponentialDensity](nSimplex,
6443*/
6444 switch (__pyx_v_density_n_flag) {
6445 case 1:
6446
6447 /* "cTwophaseDarcyCoefficients.pyx":84
6448 * assert density_w_flag == 1
6449 * if density_n_flag == 1: #nonwetting exponential
6450 * if pskModelFlag == 0: # <<<<<<<<<<<<<<
6451 * tpdc.twophaseDarcy_fc_sd_het_matType[SimplePSK,ExponentialDensity,ExponentialDensity](nSimplex,
6452 * nPointsPerSimplex,
6453*/
6454 switch (__pyx_v_pskModelFlag) {
6455 case 0:
6456
6457 /* "cTwophaseDarcyCoefficients.pyx":85
6458 * if density_n_flag == 1: #nonwetting exponential
6459 * if pskModelFlag == 0:
6460 * tpdc.twophaseDarcy_fc_sd_het_matType[SimplePSK,ExponentialDensity,ExponentialDensity](nSimplex, # <<<<<<<<<<<<<<
6461 * nPointsPerSimplex,
6462 * g.shape[0],
6463*/
6464 (void)(twophaseDarcy_fc_sd_het_matType<SimplePSK,ExponentialDensity,ExponentialDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_g)[0]), 2, ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rowptr)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_colind)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_matType)), __pyx_v_muw, __pyx_v_mun, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_omega)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Kbar)), __pyx_v_b, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_iwork_psk)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk_tol)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_w)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_n)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_g)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_x)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_sw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_mw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_mn)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmn)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmn_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psin)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dpsin)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dpsin_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi_psiw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi_psin)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi_psin_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi_psin_dsw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_aw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_daw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_daw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_an)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dan)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dan_dpsiw))));
6465
6466 /* "cTwophaseDarcyCoefficients.pyx":84
6467 * assert density_w_flag == 1
6468 * if density_n_flag == 1: #nonwetting exponential
6469 * if pskModelFlag == 0: # <<<<<<<<<<<<<<
6470 * tpdc.twophaseDarcy_fc_sd_het_matType[SimplePSK,ExponentialDensity,ExponentialDensity](nSimplex,
6471 * nPointsPerSimplex,
6472*/
6473 break;
6474 case 1:
6475
6476 /* "cTwophaseDarcyCoefficients.pyx":127
6477 * <double*>(dan_dpsiw.data))
6478 * elif pskModelFlag == 1:
6479 * tpdc.twophaseDarcy_fc_sd_het_matType[VGM,ExponentialDensity,ExponentialDensity](nSimplex, # <<<<<<<<<<<<<<
6480 * nPointsPerSimplex,
6481 * g.shape[0],
6482*/
6483 (void)(twophaseDarcy_fc_sd_het_matType<VGM,ExponentialDensity,ExponentialDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_g)[0]), 4, ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rowptr)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_colind)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_matType)), __pyx_v_muw, __pyx_v_mun, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_omega)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Kbar)), __pyx_v_b, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_iwork_psk)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk_tol)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_w)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_n)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_g)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_x)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_sw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_mw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_mn)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmn)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmn_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psin)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dpsin)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dpsin_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi_psiw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi_psin)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi_psin_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi_psin_dsw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_aw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_daw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_daw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_an)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dan)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dan_dpsiw))));
6484
6485 /* "cTwophaseDarcyCoefficients.pyx":126
6486 * <double*>(dan.data),
6487 * <double*>(dan_dpsiw.data))
6488 * elif pskModelFlag == 1: # <<<<<<<<<<<<<<
6489 * tpdc.twophaseDarcy_fc_sd_het_matType[VGM,ExponentialDensity,ExponentialDensity](nSimplex,
6490 * nPointsPerSimplex,
6491*/
6492 break;
6493 case 5:
6494
6495 /* "cTwophaseDarcyCoefficients.pyx":172
6496 * nPointsPerSimplex,
6497 * g.shape[0],
6498 * iwork_psk[1], # <<<<<<<<<<<<<<
6499 * <int*>(rowptr.data),
6500 * <int*>(colind.data),
6501*/
6502 __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_iwork_psk), 1, long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 172, __pyx_L1_error)
6503 __Pyx_GOTREF(__pyx_t_3);
6504 __pyx_t_4 = __Pyx_PyLong_As_int(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 172, __pyx_L1_error)
6505 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6506
6507 /* "cTwophaseDarcyCoefficients.pyx":169
6508 * <double*>(dan_dpsiw.data))
6509 * elif pskModelFlag == 5:
6510 * tpdc.twophaseDarcy_fc_sd_het_matType[PskSpline,ExponentialDensity,ExponentialDensity](nSimplex, # <<<<<<<<<<<<<<
6511 * nPointsPerSimplex,
6512 * g.shape[0],
6513*/
6514 (void)(twophaseDarcy_fc_sd_het_matType<PskSpline,ExponentialDensity,ExponentialDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_g)[0]), __pyx_t_4, ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rowptr)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_colind)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_matType)), __pyx_v_muw, __pyx_v_mun, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_omega)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Kbar)), __pyx_v_b, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_iwork_psk)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk_tol)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_w)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_n)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_g)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_x)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_sw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_mw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_mn)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmn)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmn_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psin)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dpsin)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dpsin_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi_psiw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi_psin)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi_psin_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi_psin_dsw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_aw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_daw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_daw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_an)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dan)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dan_dpsiw))));
6515
6516
6517 /* "cTwophaseDarcyCoefficients.pyx":168
6518 * <double*>(dan.data),
6519 * <double*>(dan_dpsiw.data))
6520 * elif pskModelFlag == 5: # <<<<<<<<<<<<<<
6521 * tpdc.twophaseDarcy_fc_sd_het_matType[PskSpline,ExponentialDensity,ExponentialDensity](nSimplex,
6522 * nPointsPerSimplex,
6523*/
6524 break;
6525 default:
6526
6527 /* "cTwophaseDarcyCoefficients.pyx":211
6528 * <double*>(dan_dpsiw.data))
6529 * else:
6530 * tpdc.twophaseDarcy_fc_sd_het_matType[SimplePSK,ExponentialDensity,ExponentialDensity](nSimplex, # <<<<<<<<<<<<<<
6531 * nPointsPerSimplex,
6532 * g.shape[0],
6533*/
6534 (void)(twophaseDarcy_fc_sd_het_matType<SimplePSK,ExponentialDensity,ExponentialDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_g)[0]), 2, ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rowptr)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_colind)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_matType)), __pyx_v_muw, __pyx_v_mun, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_omega)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Kbar)), __pyx_v_b, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_iwork_psk)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk_tol)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_w)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_n)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_g)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_x)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_sw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_mw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_mn)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmn)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmn_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psin)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dpsin)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dpsin_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi_psiw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi_psin)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi_psin_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi_psin_dsw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_aw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_daw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_daw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_an)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dan)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dan_dpsiw))));
6535 break;
6536 }
6537
6538 /* "cTwophaseDarcyCoefficients.pyx":83
6539 * #exponential for wetting phase
6540 * assert density_w_flag == 1
6541 * if density_n_flag == 1: #nonwetting exponential # <<<<<<<<<<<<<<
6542 * if pskModelFlag == 0:
6543 * tpdc.twophaseDarcy_fc_sd_het_matType[SimplePSK,ExponentialDensity,ExponentialDensity](nSimplex,
6544*/
6545 break;
6546 case 2:
6547
6548 /* "cTwophaseDarcyCoefficients.pyx":253
6549 * <double*>(dan_dpsiw.data))
6550 * elif density_n_flag == 2:#nonwetting IdealGas
6551 * if pskModelFlag == 0: # <<<<<<<<<<<<<<
6552 * tpdc.twophaseDarcy_fc_sd_het_matType[SimplePSK,ExponentialDensity,IdealGasDensity](nSimplex,
6553 * nPointsPerSimplex,
6554*/
6555 switch (__pyx_v_pskModelFlag) {
6556 case 0:
6557
6558 /* "cTwophaseDarcyCoefficients.pyx":254
6559 * elif density_n_flag == 2:#nonwetting IdealGas
6560 * if pskModelFlag == 0:
6561 * tpdc.twophaseDarcy_fc_sd_het_matType[SimplePSK,ExponentialDensity,IdealGasDensity](nSimplex, # <<<<<<<<<<<<<<
6562 * nPointsPerSimplex,
6563 * g.shape[0],
6564*/
6565 (void)(twophaseDarcy_fc_sd_het_matType<SimplePSK,ExponentialDensity,IdealGasDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_g)[0]), 2, ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rowptr)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_colind)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_matType)), __pyx_v_muw, __pyx_v_mun, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_omega)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Kbar)), __pyx_v_b, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_iwork_psk)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk_tol)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_w)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_n)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_g)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_x)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_sw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_mw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_mn)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmn)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmn_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psin)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dpsin)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dpsin_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi_psiw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi_psin)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi_psin_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi_psin_dsw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_aw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_daw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_daw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_an)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dan)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dan_dpsiw))));
6566
6567 /* "cTwophaseDarcyCoefficients.pyx":253
6568 * <double*>(dan_dpsiw.data))
6569 * elif density_n_flag == 2:#nonwetting IdealGas
6570 * if pskModelFlag == 0: # <<<<<<<<<<<<<<
6571 * tpdc.twophaseDarcy_fc_sd_het_matType[SimplePSK,ExponentialDensity,IdealGasDensity](nSimplex,
6572 * nPointsPerSimplex,
6573*/
6574 break;
6575 case 1:
6576
6577 /* "cTwophaseDarcyCoefficients.pyx":296
6578 * <double*>(dan_dpsiw.data))
6579 * elif pskModelFlag == 1:
6580 * tpdc.twophaseDarcy_fc_sd_het_matType[VGM,ExponentialDensity,IdealGasDensity](nSimplex, # <<<<<<<<<<<<<<
6581 * nPointsPerSimplex,
6582 * g.shape[0],
6583*/
6584 (void)(twophaseDarcy_fc_sd_het_matType<VGM,ExponentialDensity,IdealGasDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_g)[0]), 4, ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rowptr)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_colind)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_matType)), __pyx_v_muw, __pyx_v_mun, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_omega)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Kbar)), __pyx_v_b, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_iwork_psk)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk_tol)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_w)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_n)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_g)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_x)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_sw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_mw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_mn)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmn)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmn_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psin)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dpsin)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dpsin_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi_psiw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi_psin)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi_psin_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi_psin_dsw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_aw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_daw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_daw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_an)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dan)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dan_dpsiw))));
6585
6586 /* "cTwophaseDarcyCoefficients.pyx":295
6587 * <double*>(dan.data),
6588 * <double*>(dan_dpsiw.data))
6589 * elif pskModelFlag == 1: # <<<<<<<<<<<<<<
6590 * tpdc.twophaseDarcy_fc_sd_het_matType[VGM,ExponentialDensity,IdealGasDensity](nSimplex,
6591 * nPointsPerSimplex,
6592*/
6593 break;
6594 case 5:
6595
6596 /* "cTwophaseDarcyCoefficients.pyx":341
6597 * nPointsPerSimplex,
6598 * g.shape[0],
6599 * iwork_psk[1], # <<<<<<<<<<<<<<
6600 * <int*>(rowptr.data),
6601 * <int*>(colind.data),
6602*/
6603 __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_iwork_psk), 1, long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 341, __pyx_L1_error)
6604 __Pyx_GOTREF(__pyx_t_3);
6605 __pyx_t_4 = __Pyx_PyLong_As_int(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 341, __pyx_L1_error)
6606 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6607
6608 /* "cTwophaseDarcyCoefficients.pyx":338
6609 * <double*>(dan_dpsiw.data))
6610 * elif pskModelFlag == 5:
6611 * tpdc.twophaseDarcy_fc_sd_het_matType[PskSpline,ExponentialDensity,IdealGasDensity](nSimplex, # <<<<<<<<<<<<<<
6612 * nPointsPerSimplex,
6613 * g.shape[0],
6614*/
6615 (void)(twophaseDarcy_fc_sd_het_matType<PskSpline,ExponentialDensity,IdealGasDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_g)[0]), __pyx_t_4, ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rowptr)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_colind)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_matType)), __pyx_v_muw, __pyx_v_mun, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_omega)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Kbar)), __pyx_v_b, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_iwork_psk)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk_tol)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_w)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_n)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_g)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_x)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_sw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_mw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_mn)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmn)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmn_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psin)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dpsin)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dpsin_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi_psiw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi_psin)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi_psin_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi_psin_dsw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_aw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_daw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_daw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_an)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dan)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dan_dpsiw))));
6616
6617
6618 /* "cTwophaseDarcyCoefficients.pyx":337
6619 * <double*>(dan.data),
6620 * <double*>(dan_dpsiw.data))
6621 * elif pskModelFlag == 5: # <<<<<<<<<<<<<<
6622 * tpdc.twophaseDarcy_fc_sd_het_matType[PskSpline,ExponentialDensity,IdealGasDensity](nSimplex,
6623 * nPointsPerSimplex,
6624*/
6625 break;
6626 default:
6627
6628 /* "cTwophaseDarcyCoefficients.pyx":380
6629 * <double*>(dan_dpsiw.data))
6630 * else:
6631 * tpdc.twophaseDarcy_fc_sd_het_matType[SimplePSK,ExponentialDensity,IdealGasDensity](nSimplex, # <<<<<<<<<<<<<<
6632 * nPointsPerSimplex,
6633 * g.shape[0],
6634*/
6635 (void)(twophaseDarcy_fc_sd_het_matType<SimplePSK,ExponentialDensity,IdealGasDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_g)[0]), 2, ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rowptr)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_colind)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_matType)), __pyx_v_muw, __pyx_v_mun, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_omega)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Kbar)), __pyx_v_b, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_iwork_psk)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk_tol)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_w)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_n)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_g)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_x)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_sw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_mw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_mn)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmn)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmn_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psin)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dpsin)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dpsin_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi_psiw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi_psin)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi_psin_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi_psin_dsw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_aw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_daw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_daw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_an)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dan)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dan_dpsiw))));
6636 break;
6637 }
6638
6639 /* "cTwophaseDarcyCoefficients.pyx":252
6640 * <double*>(dan.data),
6641 * <double*>(dan_dpsiw.data))
6642 * elif density_n_flag == 2:#nonwetting IdealGas # <<<<<<<<<<<<<<
6643 * if pskModelFlag == 0:
6644 * tpdc.twophaseDarcy_fc_sd_het_matType[SimplePSK,ExponentialDensity,IdealGasDensity](nSimplex,
6645*/
6646 break;
6647 default:
6648
6649 /* "cTwophaseDarcyCoefficients.pyx":422
6650 * <double*>(dan_dpsiw.data))
6651 * else:
6652 * assert False, "configuration density_w_flag= {0} and density_n_flag= {1} not found ".format(density_w_flag, density_n_flag) # <<<<<<<<<<<<<<
6653 *
6654 * def twophaseDarcy_fc_sd_het_matType_nonPotentialForm(int pskModelFlag,
6655*/
6656 #ifndef CYTHON_WITHOUT_ASSERTIONS
6657 if (unlikely(__pyx_assertions_enabled())) {
6658 __pyx_t_5 = __pyx_mstate_global->__pyx_kp_u_configuration_density_w_flag_0_a;
6659 __Pyx_INCREF(__pyx_t_5);
6660 __pyx_t_6 = __Pyx_PyLong_From_int(__pyx_v_density_w_flag); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 422, __pyx_L1_error)
6661 __Pyx_GOTREF(__pyx_t_6);
6662 __pyx_t_7 = __Pyx_PyLong_From_int(__pyx_v_density_n_flag); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 422, __pyx_L1_error)
6663 __Pyx_GOTREF(__pyx_t_7);
6664 __pyx_t_8 = 0;
6665 {
6666 PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_t_6, __pyx_t_7};
6667 __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
6668 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
6669 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6670 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6671 if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 422, __pyx_L1_error)
6672 __Pyx_GOTREF(__pyx_t_3);
6673 }
6674 if (!(likely(PyUnicode_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_3))) __PYX_ERR(0, 422, __pyx_L1_error)
6675 __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_3, 0, 0);
6676 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6677 __PYX_ERR(0, 422, __pyx_L1_error)
6678 }
6679 #else
6680 if ((1)); else __PYX_ERR(0, 422, __pyx_L1_error)
6681 #endif
6682 break;
6683 }
6684
6685 /* "cTwophaseDarcyCoefficients.pyx":33
6686 * pass
6687 *
6688 * def twophaseDarcy_fc_sd_het_matType(int pskModelFlag, # <<<<<<<<<<<<<<
6689 * int density_w_flag,
6690 * int density_n_flag,
6691*/
6692
6693 /* function exit code */
6694 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6695 goto __pyx_L0;
6696 __pyx_L1_error:;
6697 __Pyx_XDECREF(__pyx_t_3);
6698 __Pyx_XDECREF(__pyx_t_5);
6699 __Pyx_XDECREF(__pyx_t_6);
6700 __Pyx_XDECREF(__pyx_t_7);
6701 __Pyx_AddTraceback("cTwophaseDarcyCoefficients.twophaseDarcy_fc_sd_het_matType", __pyx_clineno, __pyx_lineno, __pyx_filename);
6702 __pyx_r = NULL;
6703 __pyx_L0:;
6704
6705
6706 __Pyx_XGIVEREF(__pyx_r);
6707 __Pyx_RefNannyFinishContext();
6708 return __pyx_r;
6709}
6710
6711/* "cTwophaseDarcyCoefficients.pyx":424
6712 * assert False, "configuration density_w_flag= {0} and density_n_flag= {1} not found ".format(density_w_flag, density_n_flag)
6713 *
6714 * def twophaseDarcy_fc_sd_het_matType_nonPotentialForm(int pskModelFlag, # <<<<<<<<<<<<<<
6715 * int density_w_flag,
6716 * int density_n_flag,
6717*/
6718
6719/* Python wrapper */
6720static PyObject *__pyx_pw_26cTwophaseDarcyCoefficients_3twophaseDarcy_fc_sd_het_matType_nonPotentialForm(PyObject *__pyx_self,
6721#if CYTHON_VECTORCALL
6722PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
6723#else
6724PyObject *__pyx_args, PyObject *__pyx_kwds
6725#endif
6726); /*proto*/
6727PyDoc_STRVAR(__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 ");
6728static PyMethodDef __pyx_mdef_26cTwophaseDarcyCoefficients_3twophaseDarcy_fc_sd_het_matType_nonPotentialForm = {"twophaseDarcy_fc_sd_het_matType_nonPotentialForm", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_26cTwophaseDarcyCoefficients_3twophaseDarcy_fc_sd_het_matType_nonPotentialForm, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_26cTwophaseDarcyCoefficients_2twophaseDarcy_fc_sd_het_matType_nonPotentialForm};
6729static PyObject *__pyx_pw_26cTwophaseDarcyCoefficients_3twophaseDarcy_fc_sd_het_matType_nonPotentialForm(PyObject *__pyx_self,
6730#if CYTHON_VECTORCALL
6731PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
6732#else
6733PyObject *__pyx_args, PyObject *__pyx_kwds
6734#endif
6735) {
6736 int __pyx_v_pskModelFlag;
6737 int __pyx_v_density_w_flag;
6738 int __pyx_v_density_n_flag;
6739 PyArrayObject *__pyx_v_rowptr = 0;
6740 PyArrayObject *__pyx_v_colind = 0;
6741 PyArrayObject *__pyx_v_matType = 0;
6742 double __pyx_v_muw;
6743 double __pyx_v_mun;
6744 PyArrayObject *__pyx_v_omega = 0;
6745 PyArrayObject *__pyx_v_Kbar = 0;
6746 double __pyx_v_b;
6747 PyArrayObject *__pyx_v_rwork_psk = 0;
6748 PyArrayObject *__pyx_v_iwork_psk = 0;
6749 PyArrayObject *__pyx_v_rwork_psk_tol = 0;
6750 PyArrayObject *__pyx_v_rwork_density_w = 0;
6751 PyArrayObject *__pyx_v_rwork_density_n = 0;
6752 PyArrayObject *__pyx_v_g = 0;
6753 PyArrayObject *__pyx_v_x = 0;
6754 PyArrayObject *__pyx_v_sw = 0;
6755 PyArrayObject *__pyx_v_psiw = 0;
6756 PyArrayObject *__pyx_v_mw = 0;
6757 PyArrayObject *__pyx_v_dmw = 0;
6758 PyArrayObject *__pyx_v_dmw_dpsiw = 0;
6759 PyArrayObject *__pyx_v_mn = 0;
6760 PyArrayObject *__pyx_v_dmn = 0;
6761 PyArrayObject *__pyx_v_dmn_dpsiw = 0;
6762 PyArrayObject *__pyx_v_psin = 0;
6763 PyArrayObject *__pyx_v_dpsin = 0;
6764 PyArrayObject *__pyx_v_dpsin_dpsiw = 0;
6765 PyArrayObject *__pyx_v_phi_psiw = 0;
6766 PyArrayObject *__pyx_v_dphi_psiw_dpsiw = 0;
6767 PyArrayObject *__pyx_v_phi_psin = 0;
6768 PyArrayObject *__pyx_v_dphi_psin_dpsiw = 0;
6769 PyArrayObject *__pyx_v_dphi_psin_dsw = 0;
6770 PyArrayObject *__pyx_v_fw = 0;
6771 PyArrayObject *__pyx_v_dfw_dsw = 0;
6772 PyArrayObject *__pyx_v_dfw_dpsiw = 0;
6773 PyArrayObject *__pyx_v_fn = 0;
6774 PyArrayObject *__pyx_v_dfn_dsw = 0;
6775 PyArrayObject *__pyx_v_dfn_dpsiw = 0;
6776 PyArrayObject *__pyx_v_aw = 0;
6777 PyArrayObject *__pyx_v_daw = 0;
6778 PyArrayObject *__pyx_v_daw_dpsiw = 0;
6779 PyArrayObject *__pyx_v_an = 0;
6780 PyArrayObject *__pyx_v_dan = 0;
6781 PyArrayObject *__pyx_v_dan_dpsiw = 0;
6782 int __pyx_v_compressibilityFlag;
6783 #if !CYTHON_VECTORCALL
6784 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
6785 #endif
6786 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
6787 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};
6788 int __pyx_lineno = 0;
6789 const char *__pyx_filename = NULL;
6790 int __pyx_clineno = 0;
6791 PyObject *__pyx_r = 0;
6792 __Pyx_RefNannyDeclarations
6793 __Pyx_RefNannySetupContext("twophaseDarcy_fc_sd_het_matType_nonPotentialForm (wrapper)", 0);
6794 #if !CYTHON_VECTORCALL
6795 #if CYTHON_ASSUME_SAFE_SIZE
6796 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
6797 #else
6798 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
6799 #endif
6800 #endif
6801 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
6802 {
6803 PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pskModelFlag,&__pyx_mstate_global->__pyx_n_u_density_w_flag,&__pyx_mstate_global->__pyx_n_u_density_n_flag,&__pyx_mstate_global->__pyx_n_u_rowptr,&__pyx_mstate_global->__pyx_n_u_colind,&__pyx_mstate_global->__pyx_n_u_matType,&__pyx_mstate_global->__pyx_n_u_muw,&__pyx_mstate_global->__pyx_n_u_mun,&__pyx_mstate_global->__pyx_n_u_omega,&__pyx_mstate_global->__pyx_n_u_Kbar,&__pyx_mstate_global->__pyx_n_u_b,&__pyx_mstate_global->__pyx_n_u_rwork_psk,&__pyx_mstate_global->__pyx_n_u_iwork_psk,&__pyx_mstate_global->__pyx_n_u_rwork_psk_tol,&__pyx_mstate_global->__pyx_n_u_rwork_density_w,&__pyx_mstate_global->__pyx_n_u_rwork_density_n,&__pyx_mstate_global->__pyx_n_u_g,&__pyx_mstate_global->__pyx_n_u_x,&__pyx_mstate_global->__pyx_n_u_sw,&__pyx_mstate_global->__pyx_n_u_psiw,&__pyx_mstate_global->__pyx_n_u_mw,&__pyx_mstate_global->__pyx_n_u_dmw,&__pyx_mstate_global->__pyx_n_u_dmw_dpsiw,&__pyx_mstate_global->__pyx_n_u_mn,&__pyx_mstate_global->__pyx_n_u_dmn,&__pyx_mstate_global->__pyx_n_u_dmn_dpsiw,&__pyx_mstate_global->__pyx_n_u_psin,&__pyx_mstate_global->__pyx_n_u_dpsin,&__pyx_mstate_global->__pyx_n_u_dpsin_dpsiw,&__pyx_mstate_global->__pyx_n_u_phi_psiw,&__pyx_mstate_global->__pyx_n_u_dphi_psiw_dpsiw,&__pyx_mstate_global->__pyx_n_u_phi_psin,&__pyx_mstate_global->__pyx_n_u_dphi_psin_dpsiw,&__pyx_mstate_global->__pyx_n_u_dphi_psin_dsw,&__pyx_mstate_global->__pyx_n_u_fw,&__pyx_mstate_global->__pyx_n_u_dfw_dsw,&__pyx_mstate_global->__pyx_n_u_dfw_dpsiw,&__pyx_mstate_global->__pyx_n_u_fn,&__pyx_mstate_global->__pyx_n_u_dfn_dsw,&__pyx_mstate_global->__pyx_n_u_dfn_dpsiw,&__pyx_mstate_global->__pyx_n_u_aw,&__pyx_mstate_global->__pyx_n_u_daw,&__pyx_mstate_global->__pyx_n_u_daw_dpsiw,&__pyx_mstate_global->__pyx_n_u_an,&__pyx_mstate_global->__pyx_n_u_dan,&__pyx_mstate_global->__pyx_n_u_dan_dpsiw,&__pyx_mstate_global->__pyx_n_u_compressibilityFlag,0};
6804 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
6805 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 424, __pyx_L3_error)
6806 if (__pyx_kwds_len > 0) {
6807 switch (__pyx_nargs) {
6808 case 47:
6809 values[46] = __Pyx_ArgRef_FASTCALL(__pyx_args, 46);
6810 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[46])) __PYX_ERR(0, 424, __pyx_L3_error)
6811 CYTHON_FALLTHROUGH;
6812 case 46:
6813 values[45] = __Pyx_ArgRef_FASTCALL(__pyx_args, 45);
6814 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[45])) __PYX_ERR(0, 424, __pyx_L3_error)
6815 CYTHON_FALLTHROUGH;
6816 case 45:
6817 values[44] = __Pyx_ArgRef_FASTCALL(__pyx_args, 44);
6818 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[44])) __PYX_ERR(0, 424, __pyx_L3_error)
6819 CYTHON_FALLTHROUGH;
6820 case 44:
6821 values[43] = __Pyx_ArgRef_FASTCALL(__pyx_args, 43);
6822 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[43])) __PYX_ERR(0, 424, __pyx_L3_error)
6823 CYTHON_FALLTHROUGH;
6824 case 43:
6825 values[42] = __Pyx_ArgRef_FASTCALL(__pyx_args, 42);
6826 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[42])) __PYX_ERR(0, 424, __pyx_L3_error)
6827 CYTHON_FALLTHROUGH;
6828 case 42:
6829 values[41] = __Pyx_ArgRef_FASTCALL(__pyx_args, 41);
6830 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[41])) __PYX_ERR(0, 424, __pyx_L3_error)
6831 CYTHON_FALLTHROUGH;
6832 case 41:
6833 values[40] = __Pyx_ArgRef_FASTCALL(__pyx_args, 40);
6834 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[40])) __PYX_ERR(0, 424, __pyx_L3_error)
6835 CYTHON_FALLTHROUGH;
6836 case 40:
6837 values[39] = __Pyx_ArgRef_FASTCALL(__pyx_args, 39);
6838 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[39])) __PYX_ERR(0, 424, __pyx_L3_error)
6839 CYTHON_FALLTHROUGH;
6840 case 39:
6841 values[38] = __Pyx_ArgRef_FASTCALL(__pyx_args, 38);
6842 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[38])) __PYX_ERR(0, 424, __pyx_L3_error)
6843 CYTHON_FALLTHROUGH;
6844 case 38:
6845 values[37] = __Pyx_ArgRef_FASTCALL(__pyx_args, 37);
6846 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[37])) __PYX_ERR(0, 424, __pyx_L3_error)
6847 CYTHON_FALLTHROUGH;
6848 case 37:
6849 values[36] = __Pyx_ArgRef_FASTCALL(__pyx_args, 36);
6850 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[36])) __PYX_ERR(0, 424, __pyx_L3_error)
6851 CYTHON_FALLTHROUGH;
6852 case 36:
6853 values[35] = __Pyx_ArgRef_FASTCALL(__pyx_args, 35);
6854 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[35])) __PYX_ERR(0, 424, __pyx_L3_error)
6855 CYTHON_FALLTHROUGH;
6856 case 35:
6857 values[34] = __Pyx_ArgRef_FASTCALL(__pyx_args, 34);
6858 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[34])) __PYX_ERR(0, 424, __pyx_L3_error)
6859 CYTHON_FALLTHROUGH;
6860 case 34:
6861 values[33] = __Pyx_ArgRef_FASTCALL(__pyx_args, 33);
6862 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[33])) __PYX_ERR(0, 424, __pyx_L3_error)
6863 CYTHON_FALLTHROUGH;
6864 case 33:
6865 values[32] = __Pyx_ArgRef_FASTCALL(__pyx_args, 32);
6866 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[32])) __PYX_ERR(0, 424, __pyx_L3_error)
6867 CYTHON_FALLTHROUGH;
6868 case 32:
6869 values[31] = __Pyx_ArgRef_FASTCALL(__pyx_args, 31);
6870 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[31])) __PYX_ERR(0, 424, __pyx_L3_error)
6871 CYTHON_FALLTHROUGH;
6872 case 31:
6873 values[30] = __Pyx_ArgRef_FASTCALL(__pyx_args, 30);
6874 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[30])) __PYX_ERR(0, 424, __pyx_L3_error)
6875 CYTHON_FALLTHROUGH;
6876 case 30:
6877 values[29] = __Pyx_ArgRef_FASTCALL(__pyx_args, 29);
6878 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[29])) __PYX_ERR(0, 424, __pyx_L3_error)
6879 CYTHON_FALLTHROUGH;
6880 case 29:
6881 values[28] = __Pyx_ArgRef_FASTCALL(__pyx_args, 28);
6882 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[28])) __PYX_ERR(0, 424, __pyx_L3_error)
6883 CYTHON_FALLTHROUGH;
6884 case 28:
6885 values[27] = __Pyx_ArgRef_FASTCALL(__pyx_args, 27);
6886 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[27])) __PYX_ERR(0, 424, __pyx_L3_error)
6887 CYTHON_FALLTHROUGH;
6888 case 27:
6889 values[26] = __Pyx_ArgRef_FASTCALL(__pyx_args, 26);
6890 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[26])) __PYX_ERR(0, 424, __pyx_L3_error)
6891 CYTHON_FALLTHROUGH;
6892 case 26:
6893 values[25] = __Pyx_ArgRef_FASTCALL(__pyx_args, 25);
6894 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[25])) __PYX_ERR(0, 424, __pyx_L3_error)
6895 CYTHON_FALLTHROUGH;
6896 case 25:
6897 values[24] = __Pyx_ArgRef_FASTCALL(__pyx_args, 24);
6898 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[24])) __PYX_ERR(0, 424, __pyx_L3_error)
6899 CYTHON_FALLTHROUGH;
6900 case 24:
6901 values[23] = __Pyx_ArgRef_FASTCALL(__pyx_args, 23);
6902 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[23])) __PYX_ERR(0, 424, __pyx_L3_error)
6903 CYTHON_FALLTHROUGH;
6904 case 23:
6905 values[22] = __Pyx_ArgRef_FASTCALL(__pyx_args, 22);
6906 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[22])) __PYX_ERR(0, 424, __pyx_L3_error)
6907 CYTHON_FALLTHROUGH;
6908 case 22:
6909 values[21] = __Pyx_ArgRef_FASTCALL(__pyx_args, 21);
6910 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[21])) __PYX_ERR(0, 424, __pyx_L3_error)
6911 CYTHON_FALLTHROUGH;
6912 case 21:
6913 values[20] = __Pyx_ArgRef_FASTCALL(__pyx_args, 20);
6914 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[20])) __PYX_ERR(0, 424, __pyx_L3_error)
6915 CYTHON_FALLTHROUGH;
6916 case 20:
6917 values[19] = __Pyx_ArgRef_FASTCALL(__pyx_args, 19);
6918 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[19])) __PYX_ERR(0, 424, __pyx_L3_error)
6919 CYTHON_FALLTHROUGH;
6920 case 19:
6921 values[18] = __Pyx_ArgRef_FASTCALL(__pyx_args, 18);
6922 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[18])) __PYX_ERR(0, 424, __pyx_L3_error)
6923 CYTHON_FALLTHROUGH;
6924 case 18:
6925 values[17] = __Pyx_ArgRef_FASTCALL(__pyx_args, 17);
6926 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[17])) __PYX_ERR(0, 424, __pyx_L3_error)
6927 CYTHON_FALLTHROUGH;
6928 case 17:
6929 values[16] = __Pyx_ArgRef_FASTCALL(__pyx_args, 16);
6930 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[16])) __PYX_ERR(0, 424, __pyx_L3_error)
6931 CYTHON_FALLTHROUGH;
6932 case 16:
6933 values[15] = __Pyx_ArgRef_FASTCALL(__pyx_args, 15);
6934 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[15])) __PYX_ERR(0, 424, __pyx_L3_error)
6935 CYTHON_FALLTHROUGH;
6936 case 15:
6937 values[14] = __Pyx_ArgRef_FASTCALL(__pyx_args, 14);
6938 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[14])) __PYX_ERR(0, 424, __pyx_L3_error)
6939 CYTHON_FALLTHROUGH;
6940 case 14:
6941 values[13] = __Pyx_ArgRef_FASTCALL(__pyx_args, 13);
6942 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[13])) __PYX_ERR(0, 424, __pyx_L3_error)
6943 CYTHON_FALLTHROUGH;
6944 case 13:
6945 values[12] = __Pyx_ArgRef_FASTCALL(__pyx_args, 12);
6946 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[12])) __PYX_ERR(0, 424, __pyx_L3_error)
6947 CYTHON_FALLTHROUGH;
6948 case 12:
6949 values[11] = __Pyx_ArgRef_FASTCALL(__pyx_args, 11);
6950 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[11])) __PYX_ERR(0, 424, __pyx_L3_error)
6951 CYTHON_FALLTHROUGH;
6952 case 11:
6953 values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10);
6954 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 424, __pyx_L3_error)
6955 CYTHON_FALLTHROUGH;
6956 case 10:
6957 values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
6958 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 424, __pyx_L3_error)
6959 CYTHON_FALLTHROUGH;
6960 case 9:
6961 values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
6962 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 424, __pyx_L3_error)
6963 CYTHON_FALLTHROUGH;
6964 case 8:
6965 values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
6966 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 424, __pyx_L3_error)
6967 CYTHON_FALLTHROUGH;
6968 case 7:
6969 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
6970 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 424, __pyx_L3_error)
6971 CYTHON_FALLTHROUGH;
6972 case 6:
6973 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
6974 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 424, __pyx_L3_error)
6975 CYTHON_FALLTHROUGH;
6976 case 5:
6977 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
6978 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 424, __pyx_L3_error)
6979 CYTHON_FALLTHROUGH;
6980 case 4:
6981 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
6982 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 424, __pyx_L3_error)
6983 CYTHON_FALLTHROUGH;
6984 case 3:
6985 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
6986 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 424, __pyx_L3_error)
6987 CYTHON_FALLTHROUGH;
6988 case 2:
6989 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
6990 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 424, __pyx_L3_error)
6991 CYTHON_FALLTHROUGH;
6992 case 1:
6993 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
6994 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 424, __pyx_L3_error)
6995 CYTHON_FALLTHROUGH;
6996 case 0: break;
6997 default: goto __pyx_L5_argtuple_error;
6998 }
6999 const Py_ssize_t kwd_pos_args = __pyx_nargs;
7000 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "twophaseDarcy_fc_sd_het_matType_nonPotentialForm", 0) < (0)) __PYX_ERR(0, 424, __pyx_L3_error)
7001 for (Py_ssize_t i = __pyx_nargs; i < 47; i++) {
7002 if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("twophaseDarcy_fc_sd_het_matType_nonPotentialForm", 1, 47, 47, i); __PYX_ERR(0, 424, __pyx_L3_error) }
7003 }
7004 } else if (unlikely(__pyx_nargs != 47)) {
7005 goto __pyx_L5_argtuple_error;
7006 } else {
7007 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
7008 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 424, __pyx_L3_error)
7009 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
7010 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 424, __pyx_L3_error)
7011 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
7012 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 424, __pyx_L3_error)
7013 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
7014 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 424, __pyx_L3_error)
7015 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
7016 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 424, __pyx_L3_error)
7017 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
7018 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 424, __pyx_L3_error)
7019 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
7020 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 424, __pyx_L3_error)
7021 values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
7022 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 424, __pyx_L3_error)
7023 values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
7024 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 424, __pyx_L3_error)
7025 values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
7026 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 424, __pyx_L3_error)
7027 values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10);
7028 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 424, __pyx_L3_error)
7029 values[11] = __Pyx_ArgRef_FASTCALL(__pyx_args, 11);
7030 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[11])) __PYX_ERR(0, 424, __pyx_L3_error)
7031 values[12] = __Pyx_ArgRef_FASTCALL(__pyx_args, 12);
7032 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[12])) __PYX_ERR(0, 424, __pyx_L3_error)
7033 values[13] = __Pyx_ArgRef_FASTCALL(__pyx_args, 13);
7034 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[13])) __PYX_ERR(0, 424, __pyx_L3_error)
7035 values[14] = __Pyx_ArgRef_FASTCALL(__pyx_args, 14);
7036 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[14])) __PYX_ERR(0, 424, __pyx_L3_error)
7037 values[15] = __Pyx_ArgRef_FASTCALL(__pyx_args, 15);
7038 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[15])) __PYX_ERR(0, 424, __pyx_L3_error)
7039 values[16] = __Pyx_ArgRef_FASTCALL(__pyx_args, 16);
7040 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[16])) __PYX_ERR(0, 424, __pyx_L3_error)
7041 values[17] = __Pyx_ArgRef_FASTCALL(__pyx_args, 17);
7042 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[17])) __PYX_ERR(0, 424, __pyx_L3_error)
7043 values[18] = __Pyx_ArgRef_FASTCALL(__pyx_args, 18);
7044 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[18])) __PYX_ERR(0, 424, __pyx_L3_error)
7045 values[19] = __Pyx_ArgRef_FASTCALL(__pyx_args, 19);
7046 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[19])) __PYX_ERR(0, 424, __pyx_L3_error)
7047 values[20] = __Pyx_ArgRef_FASTCALL(__pyx_args, 20);
7048 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[20])) __PYX_ERR(0, 424, __pyx_L3_error)
7049 values[21] = __Pyx_ArgRef_FASTCALL(__pyx_args, 21);
7050 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[21])) __PYX_ERR(0, 424, __pyx_L3_error)
7051 values[22] = __Pyx_ArgRef_FASTCALL(__pyx_args, 22);
7052 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[22])) __PYX_ERR(0, 424, __pyx_L3_error)
7053 values[23] = __Pyx_ArgRef_FASTCALL(__pyx_args, 23);
7054 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[23])) __PYX_ERR(0, 424, __pyx_L3_error)
7055 values[24] = __Pyx_ArgRef_FASTCALL(__pyx_args, 24);
7056 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[24])) __PYX_ERR(0, 424, __pyx_L3_error)
7057 values[25] = __Pyx_ArgRef_FASTCALL(__pyx_args, 25);
7058 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[25])) __PYX_ERR(0, 424, __pyx_L3_error)
7059 values[26] = __Pyx_ArgRef_FASTCALL(__pyx_args, 26);
7060 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[26])) __PYX_ERR(0, 424, __pyx_L3_error)
7061 values[27] = __Pyx_ArgRef_FASTCALL(__pyx_args, 27);
7062 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[27])) __PYX_ERR(0, 424, __pyx_L3_error)
7063 values[28] = __Pyx_ArgRef_FASTCALL(__pyx_args, 28);
7064 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[28])) __PYX_ERR(0, 424, __pyx_L3_error)
7065 values[29] = __Pyx_ArgRef_FASTCALL(__pyx_args, 29);
7066 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[29])) __PYX_ERR(0, 424, __pyx_L3_error)
7067 values[30] = __Pyx_ArgRef_FASTCALL(__pyx_args, 30);
7068 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[30])) __PYX_ERR(0, 424, __pyx_L3_error)
7069 values[31] = __Pyx_ArgRef_FASTCALL(__pyx_args, 31);
7070 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[31])) __PYX_ERR(0, 424, __pyx_L3_error)
7071 values[32] = __Pyx_ArgRef_FASTCALL(__pyx_args, 32);
7072 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[32])) __PYX_ERR(0, 424, __pyx_L3_error)
7073 values[33] = __Pyx_ArgRef_FASTCALL(__pyx_args, 33);
7074 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[33])) __PYX_ERR(0, 424, __pyx_L3_error)
7075 values[34] = __Pyx_ArgRef_FASTCALL(__pyx_args, 34);
7076 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[34])) __PYX_ERR(0, 424, __pyx_L3_error)
7077 values[35] = __Pyx_ArgRef_FASTCALL(__pyx_args, 35);
7078 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[35])) __PYX_ERR(0, 424, __pyx_L3_error)
7079 values[36] = __Pyx_ArgRef_FASTCALL(__pyx_args, 36);
7080 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[36])) __PYX_ERR(0, 424, __pyx_L3_error)
7081 values[37] = __Pyx_ArgRef_FASTCALL(__pyx_args, 37);
7082 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[37])) __PYX_ERR(0, 424, __pyx_L3_error)
7083 values[38] = __Pyx_ArgRef_FASTCALL(__pyx_args, 38);
7084 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[38])) __PYX_ERR(0, 424, __pyx_L3_error)
7085 values[39] = __Pyx_ArgRef_FASTCALL(__pyx_args, 39);
7086 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[39])) __PYX_ERR(0, 424, __pyx_L3_error)
7087 values[40] = __Pyx_ArgRef_FASTCALL(__pyx_args, 40);
7088 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[40])) __PYX_ERR(0, 424, __pyx_L3_error)
7089 values[41] = __Pyx_ArgRef_FASTCALL(__pyx_args, 41);
7090 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[41])) __PYX_ERR(0, 424, __pyx_L3_error)
7091 values[42] = __Pyx_ArgRef_FASTCALL(__pyx_args, 42);
7092 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[42])) __PYX_ERR(0, 424, __pyx_L3_error)
7093 values[43] = __Pyx_ArgRef_FASTCALL(__pyx_args, 43);
7094 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[43])) __PYX_ERR(0, 424, __pyx_L3_error)
7095 values[44] = __Pyx_ArgRef_FASTCALL(__pyx_args, 44);
7096 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[44])) __PYX_ERR(0, 424, __pyx_L3_error)
7097 values[45] = __Pyx_ArgRef_FASTCALL(__pyx_args, 45);
7098 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[45])) __PYX_ERR(0, 424, __pyx_L3_error)
7099 values[46] = __Pyx_ArgRef_FASTCALL(__pyx_args, 46);
7100 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[46])) __PYX_ERR(0, 424, __pyx_L3_error)
7101 }
7102 __pyx_v_pskModelFlag = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_pskModelFlag == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 424, __pyx_L3_error)
7103 __pyx_v_density_w_flag = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_density_w_flag == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 425, __pyx_L3_error)
7104 __pyx_v_density_n_flag = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_density_n_flag == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 426, __pyx_L3_error)
7105 __pyx_v_rowptr = ((PyArrayObject *)values[3]);
7106 __pyx_v_colind = ((PyArrayObject *)values[4]);
7107 __pyx_v_matType = ((PyArrayObject *)values[5]);
7108 __pyx_v_muw = __Pyx_PyFloat_AsDouble(values[6]); if (unlikely((__pyx_v_muw == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 430, __pyx_L3_error)
7109 __pyx_v_mun = __Pyx_PyFloat_AsDouble(values[7]); if (unlikely((__pyx_v_mun == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 431, __pyx_L3_error)
7110 __pyx_v_omega = ((PyArrayObject *)values[8]);
7111 __pyx_v_Kbar = ((PyArrayObject *)values[9]);
7112 __pyx_v_b = __Pyx_PyFloat_AsDouble(values[10]); if (unlikely((__pyx_v_b == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 434, __pyx_L3_error)
7113 __pyx_v_rwork_psk = ((PyArrayObject *)values[11]);
7114 __pyx_v_iwork_psk = ((PyArrayObject *)values[12]);
7115 __pyx_v_rwork_psk_tol = ((PyArrayObject *)values[13]);
7116 __pyx_v_rwork_density_w = ((PyArrayObject *)values[14]);
7117 __pyx_v_rwork_density_n = ((PyArrayObject *)values[15]);
7118 __pyx_v_g = ((PyArrayObject *)values[16]);
7119 __pyx_v_x = ((PyArrayObject *)values[17]);
7120 __pyx_v_sw = ((PyArrayObject *)values[18]);
7121 __pyx_v_psiw = ((PyArrayObject *)values[19]);
7122 __pyx_v_mw = ((PyArrayObject *)values[20]);
7123 __pyx_v_dmw = ((PyArrayObject *)values[21]);
7124 __pyx_v_dmw_dpsiw = ((PyArrayObject *)values[22]);
7125 __pyx_v_mn = ((PyArrayObject *)values[23]);
7126 __pyx_v_dmn = ((PyArrayObject *)values[24]);
7127 __pyx_v_dmn_dpsiw = ((PyArrayObject *)values[25]);
7128 __pyx_v_psin = ((PyArrayObject *)values[26]);
7129 __pyx_v_dpsin = ((PyArrayObject *)values[27]);
7130 __pyx_v_dpsin_dpsiw = ((PyArrayObject *)values[28]);
7131 __pyx_v_phi_psiw = ((PyArrayObject *)values[29]);
7132 __pyx_v_dphi_psiw_dpsiw = ((PyArrayObject *)values[30]);
7133 __pyx_v_phi_psin = ((PyArrayObject *)values[31]);
7134 __pyx_v_dphi_psin_dpsiw = ((PyArrayObject *)values[32]);
7135 __pyx_v_dphi_psin_dsw = ((PyArrayObject *)values[33]);
7136 __pyx_v_fw = ((PyArrayObject *)values[34]);
7137 __pyx_v_dfw_dsw = ((PyArrayObject *)values[35]);
7138 __pyx_v_dfw_dpsiw = ((PyArrayObject *)values[36]);
7139 __pyx_v_fn = ((PyArrayObject *)values[37]);
7140 __pyx_v_dfn_dsw = ((PyArrayObject *)values[38]);
7141 __pyx_v_dfn_dpsiw = ((PyArrayObject *)values[39]);
7142 __pyx_v_aw = ((PyArrayObject *)values[40]);
7143 __pyx_v_daw = ((PyArrayObject *)values[41]);
7144 __pyx_v_daw_dpsiw = ((PyArrayObject *)values[42]);
7145 __pyx_v_an = ((PyArrayObject *)values[43]);
7146 __pyx_v_dan = ((PyArrayObject *)values[44]);
7147 __pyx_v_dan_dpsiw = ((PyArrayObject *)values[45]);
7148 __pyx_v_compressibilityFlag = __Pyx_PyLong_As_int(values[46]); if (unlikely((__pyx_v_compressibilityFlag == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 470, __pyx_L3_error)
7149 }
7150 goto __pyx_L6_skip;
7151 __pyx_L5_argtuple_error:;
7152 __Pyx_RaiseArgtupleInvalid("twophaseDarcy_fc_sd_het_matType_nonPotentialForm", 1, 47, 47, __pyx_nargs); __PYX_ERR(0, 424, __pyx_L3_error)
7153 __pyx_L6_skip:;
7154 goto __pyx_L4_argument_unpacking_done;
7155 __pyx_L3_error:;
7156 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
7157 Py_XDECREF(values[__pyx_temp]);
7158 }
7159 __Pyx_AddTraceback("cTwophaseDarcyCoefficients.twophaseDarcy_fc_sd_het_matType_nonPotentialForm", __pyx_clineno, __pyx_lineno, __pyx_filename);
7160 __Pyx_RefNannyFinishContext();
7161 return NULL;
7162 __pyx_L4_argument_unpacking_done:;
7163 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rowptr), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "rowptr", 0))) __PYX_ERR(0, 427, __pyx_L1_error)
7164 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_colind), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "colind", 0))) __PYX_ERR(0, 428, __pyx_L1_error)
7165 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_matType), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "matType", 0))) __PYX_ERR(0, 429, __pyx_L1_error)
7166 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_omega), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "omega", 0))) __PYX_ERR(0, 432, __pyx_L1_error)
7167 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Kbar), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "Kbar", 0))) __PYX_ERR(0, 433, __pyx_L1_error)
7168 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_psk), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "rwork_psk", 0))) __PYX_ERR(0, 435, __pyx_L1_error)
7169 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork_psk), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "iwork_psk", 0))) __PYX_ERR(0, 436, __pyx_L1_error)
7170 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_psk_tol), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "rwork_psk_tol", 0))) __PYX_ERR(0, 437, __pyx_L1_error)
7171 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_density_w), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "rwork_density_w", 0))) __PYX_ERR(0, 438, __pyx_L1_error)
7172 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_density_n), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "rwork_density_n", 0))) __PYX_ERR(0, 439, __pyx_L1_error)
7173 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_g), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "g", 0))) __PYX_ERR(0, 440, __pyx_L1_error)
7174 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "x", 0))) __PYX_ERR(0, 441, __pyx_L1_error)
7175 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "sw", 0))) __PYX_ERR(0, 442, __pyx_L1_error)
7176 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_psiw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "psiw", 0))) __PYX_ERR(0, 443, __pyx_L1_error)
7177 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "mw", 0))) __PYX_ERR(0, 444, __pyx_L1_error)
7178 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dmw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "dmw", 0))) __PYX_ERR(0, 445, __pyx_L1_error)
7179 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dmw_dpsiw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "dmw_dpsiw", 0))) __PYX_ERR(0, 446, __pyx_L1_error)
7180 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mn), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "mn", 0))) __PYX_ERR(0, 447, __pyx_L1_error)
7181 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dmn), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "dmn", 0))) __PYX_ERR(0, 448, __pyx_L1_error)
7182 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dmn_dpsiw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "dmn_dpsiw", 0))) __PYX_ERR(0, 449, __pyx_L1_error)
7183 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_psin), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "psin", 0))) __PYX_ERR(0, 450, __pyx_L1_error)
7184 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpsin), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "dpsin", 0))) __PYX_ERR(0, 451, __pyx_L1_error)
7185 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dpsin_dpsiw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "dpsin_dpsiw", 0))) __PYX_ERR(0, 452, __pyx_L1_error)
7186 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_phi_psiw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "phi_psiw", 0))) __PYX_ERR(0, 453, __pyx_L1_error)
7187 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dphi_psiw_dpsiw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "dphi_psiw_dpsiw", 0))) __PYX_ERR(0, 454, __pyx_L1_error)
7188 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_phi_psin), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "phi_psin", 0))) __PYX_ERR(0, 455, __pyx_L1_error)
7189 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dphi_psin_dpsiw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "dphi_psin_dpsiw", 0))) __PYX_ERR(0, 456, __pyx_L1_error)
7190 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dphi_psin_dsw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "dphi_psin_dsw", 0))) __PYX_ERR(0, 457, __pyx_L1_error)
7191 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "fw", 0))) __PYX_ERR(0, 458, __pyx_L1_error)
7192 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dfw_dsw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "dfw_dsw", 0))) __PYX_ERR(0, 459, __pyx_L1_error)
7193 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dfw_dpsiw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "dfw_dpsiw", 0))) __PYX_ERR(0, 460, __pyx_L1_error)
7194 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fn), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "fn", 0))) __PYX_ERR(0, 461, __pyx_L1_error)
7195 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dfn_dsw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "dfn_dsw", 0))) __PYX_ERR(0, 462, __pyx_L1_error)
7196 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dfn_dpsiw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "dfn_dpsiw", 0))) __PYX_ERR(0, 463, __pyx_L1_error)
7197 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_aw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "aw", 0))) __PYX_ERR(0, 464, __pyx_L1_error)
7198 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_daw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "daw", 0))) __PYX_ERR(0, 465, __pyx_L1_error)
7199 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_daw_dpsiw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "daw_dpsiw", 0))) __PYX_ERR(0, 466, __pyx_L1_error)
7200 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_an), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "an", 0))) __PYX_ERR(0, 467, __pyx_L1_error)
7201 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dan), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "dan", 0))) __PYX_ERR(0, 468, __pyx_L1_error)
7202 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dan_dpsiw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "dan_dpsiw", 0))) __PYX_ERR(0, 469, __pyx_L1_error)
7203 __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);
7204
7205 /* function exit code */
7206 goto __pyx_L0;
7207 __pyx_L1_error:;
7208 __pyx_r = NULL;
7209 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
7210 Py_XDECREF(values[__pyx_temp]);
7211 }
7212 goto __pyx_L7_cleaned_up;
7213 __pyx_L0:;
7214 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
7215 Py_XDECREF(values[__pyx_temp]);
7216 }
7217 __pyx_L7_cleaned_up:;
7218
7219
7220
7221
7222
7223
7224
7225 __Pyx_RefNannyFinishContext();
7226 return __pyx_r;
7227}
7228
7229static 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) {
7230 int __pyx_v_nPointsPerSimplex;
7231 int __pyx_v_nSimplex;
7232 PyObject *__pyx_r = NULL;
7233 __Pyx_RefNannyDeclarations
7234 npy_intp __pyx_t_1;
7235 int __pyx_t_2;
7236 PyObject *__pyx_t_3 = NULL;
7237 PyObject *__pyx_t_4 = NULL;
7238 PyObject *__pyx_t_5 = NULL;
7239 PyObject *__pyx_t_6 = NULL;
7240 size_t __pyx_t_7;
7241 int __pyx_lineno = 0;
7242 const char *__pyx_filename = NULL;
7243 int __pyx_clineno = 0;
7244 __Pyx_RefNannySetupContext("twophaseDarcy_fc_sd_het_matType_nonPotentialForm", 0);
7245
7246 /* "cTwophaseDarcyCoefficients.pyx":476
7247 *
7248 * """
7249 * cdef int nPointsPerSimplex=sw.shape[sw.ndim-1] # <<<<<<<<<<<<<<
7250 * cdef int nSimplex=sw.size//nPointsPerSimplex
7251 * assert density_w_flag == 1
7252*/
7253 __pyx_v_nPointsPerSimplex = (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_sw)[(__pyx_f_5numpy_7ndarray_4ndim___get__(__pyx_v_sw) - 1)]);
7254
7255 /* "cTwophaseDarcyCoefficients.pyx":477
7256 * """
7257 * cdef int nPointsPerSimplex=sw.shape[sw.ndim-1]
7258 * cdef int nSimplex=sw.size//nPointsPerSimplex # <<<<<<<<<<<<<<
7259 * assert density_w_flag == 1
7260 * if density_n_flag == 1:#nonwetting exponential
7261*/
7262 __pyx_t_1 = __pyx_f_5numpy_7ndarray_4size___get__(__pyx_v_sw);
7263
7264 if (unlikely(__pyx_v_nPointsPerSimplex == 0)) {
7265 PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
7266 __PYX_ERR(0, 477, __pyx_L1_error)
7267 }
7268 else if (sizeof(npy_intp) == sizeof(long) && (!(((int)-1) > 0)) && unlikely(__pyx_v_nPointsPerSimplex == (int)-1) && unlikely(__Pyx_UNARY_NEG_WOULD_OVERFLOW(__pyx_t_1))) {
7269 PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
7270 __PYX_ERR(0, 477, __pyx_L1_error)
7271 }
7272 __pyx_v_nSimplex = __Pyx_div_npy_intp(__pyx_t_1, __pyx_v_nPointsPerSimplex, 0);
7273
7274
7275 /* "cTwophaseDarcyCoefficients.pyx":478
7276 * cdef int nPointsPerSimplex=sw.shape[sw.ndim-1]
7277 * cdef int nSimplex=sw.size//nPointsPerSimplex
7278 * assert density_w_flag == 1 # <<<<<<<<<<<<<<
7279 * if density_n_flag == 1:#nonwetting exponential
7280 * if pskModelFlag == 0:
7281*/
7282 #ifndef CYTHON_WITHOUT_ASSERTIONS
7283 if (unlikely(__pyx_assertions_enabled())) {
7284 __pyx_t_2 = (__pyx_v_density_w_flag == 1);
7285
7286 if (unlikely(!__pyx_t_2)) {
7287 __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
7288 __PYX_ERR(0, 478, __pyx_L1_error)
7289 }
7290
7291 }
7292 #else
7293 if ((1)); else __PYX_ERR(0, 478, __pyx_L1_error)
7294 #endif
7295
7296 /* "cTwophaseDarcyCoefficients.pyx":479
7297 * cdef int nSimplex=sw.size//nPointsPerSimplex
7298 * assert density_w_flag == 1
7299 * if density_n_flag == 1:#nonwetting exponential # <<<<<<<<<<<<<<
7300 * if pskModelFlag == 0:
7301 * tpdc.twophaseDarcy_fc_sd_het_matType_nonPotentialForm[SimplePSK,ExponentialDensity,ExponentialDensity](compressibilityFlag,nSimplex,
7302*/
7303 switch (__pyx_v_density_n_flag) {
7304 case 1:
7305
7306 /* "cTwophaseDarcyCoefficients.pyx":480
7307 * assert density_w_flag == 1
7308 * if density_n_flag == 1:#nonwetting exponential
7309 * if pskModelFlag == 0: # <<<<<<<<<<<<<<
7310 * tpdc.twophaseDarcy_fc_sd_het_matType_nonPotentialForm[SimplePSK,ExponentialDensity,ExponentialDensity](compressibilityFlag,nSimplex,
7311 * nPointsPerSimplex,
7312*/
7313 switch (__pyx_v_pskModelFlag) {
7314 case 0:
7315
7316 /* "cTwophaseDarcyCoefficients.pyx":481
7317 * if density_n_flag == 1:#nonwetting exponential
7318 * if pskModelFlag == 0:
7319 * tpdc.twophaseDarcy_fc_sd_het_matType_nonPotentialForm[SimplePSK,ExponentialDensity,ExponentialDensity](compressibilityFlag,nSimplex, # <<<<<<<<<<<<<<
7320 * nPointsPerSimplex,
7321 * g.shape[0],
7322*/
7323 (void)(twophaseDarcy_fc_sd_het_matType_nonPotentialForm<SimplePSK,ExponentialDensity,ExponentialDensity>(__pyx_v_compressibilityFlag, __pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_g)[0]), 2, ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rowptr)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_colind)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_matType)), __pyx_v_muw, __pyx_v_mun, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_omega)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Kbar)), __pyx_v_b, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_iwork_psk)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk_tol)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_w)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_n)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_g)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_x)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_sw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_mw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_mn)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmn)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmn_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psin)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dpsin)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dpsin_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi_psiw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi_psin)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi_psin_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi_psin_dsw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_fw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dfw_dsw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dfw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_fn)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dfn_dsw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dfn_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_aw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_daw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_daw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_an)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dan)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dan_dpsiw))));
7324
7325 /* "cTwophaseDarcyCoefficients.pyx":480
7326 * assert density_w_flag == 1
7327 * if density_n_flag == 1:#nonwetting exponential
7328 * if pskModelFlag == 0: # <<<<<<<<<<<<<<
7329 * tpdc.twophaseDarcy_fc_sd_het_matType_nonPotentialForm[SimplePSK,ExponentialDensity,ExponentialDensity](compressibilityFlag,nSimplex,
7330 * nPointsPerSimplex,
7331*/
7332 break;
7333 case 1:
7334
7335 /* "cTwophaseDarcyCoefficients.pyx":529
7336 * <double*>(dan_dpsiw.data))
7337 * elif pskModelFlag == 1:
7338 * tpdc.twophaseDarcy_fc_sd_het_matType_nonPotentialForm[VGM,ExponentialDensity,ExponentialDensity](compressibilityFlag,nSimplex, # <<<<<<<<<<<<<<
7339 * nPointsPerSimplex,
7340 * g.shape[0],
7341*/
7342 (void)(twophaseDarcy_fc_sd_het_matType_nonPotentialForm<VGM,ExponentialDensity,ExponentialDensity>(__pyx_v_compressibilityFlag, __pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_g)[0]), 4, ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rowptr)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_colind)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_matType)), __pyx_v_muw, __pyx_v_mun, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_omega)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Kbar)), __pyx_v_b, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_iwork_psk)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk_tol)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_w)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_n)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_g)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_x)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_sw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_mw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_mn)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmn)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmn_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psin)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dpsin)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dpsin_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi_psiw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi_psin)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi_psin_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi_psin_dsw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_fw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dfw_dsw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dfw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_fn)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dfn_dsw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dfn_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_aw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_daw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_daw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_an)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dan)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dan_dpsiw))));
7343
7344 /* "cTwophaseDarcyCoefficients.pyx":528
7345 * <double*>(dan.data),
7346 * <double*>(dan_dpsiw.data))
7347 * elif pskModelFlag == 1: # <<<<<<<<<<<<<<
7348 * tpdc.twophaseDarcy_fc_sd_het_matType_nonPotentialForm[VGM,ExponentialDensity,ExponentialDensity](compressibilityFlag,nSimplex,
7349 * nPointsPerSimplex,
7350*/
7351 break;
7352 default:
7353
7354 /* "cTwophaseDarcyCoefficients.pyx":577
7355 * <double*>(dan_dpsiw.data))
7356 * else:
7357 * tpdc.twophaseDarcy_fc_sd_het_matType_nonPotentialForm[SimplePSK,ExponentialDensity,ExponentialDensity](compressibilityFlag,nSimplex, # <<<<<<<<<<<<<<
7358 * nPointsPerSimplex,
7359 * g.shape[0],
7360*/
7361 (void)(twophaseDarcy_fc_sd_het_matType_nonPotentialForm<SimplePSK,ExponentialDensity,ExponentialDensity>(__pyx_v_compressibilityFlag, __pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_g)[0]), 2, ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rowptr)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_colind)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_matType)), __pyx_v_muw, __pyx_v_mun, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_omega)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Kbar)), __pyx_v_b, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_iwork_psk)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk_tol)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_w)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_n)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_g)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_x)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_sw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_mw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_mn)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmn)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmn_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psin)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dpsin)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dpsin_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi_psiw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi_psin)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi_psin_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi_psin_dsw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_fw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dfw_dsw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dfw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_fn)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dfn_dsw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dfn_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_aw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_daw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_daw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_an)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dan)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dan_dpsiw))));
7362 break;
7363 }
7364
7365 /* "cTwophaseDarcyCoefficients.pyx":479
7366 * cdef int nSimplex=sw.size//nPointsPerSimplex
7367 * assert density_w_flag == 1
7368 * if density_n_flag == 1:#nonwetting exponential # <<<<<<<<<<<<<<
7369 * if pskModelFlag == 0:
7370 * tpdc.twophaseDarcy_fc_sd_het_matType_nonPotentialForm[SimplePSK,ExponentialDensity,ExponentialDensity](compressibilityFlag,nSimplex,
7371*/
7372 break;
7373 case 2:
7374
7375 /* "cTwophaseDarcyCoefficients.pyx":625
7376 * <double*>(dan_dpsiw.data))
7377 * elif density_n_flag == 2:#nonwetting IdealGas
7378 * if pskModelFlag == 1: # <<<<<<<<<<<<<<
7379 * tpdc.twophaseDarcy_fc_sd_het_matType_nonPotentialForm[VGM,ExponentialDensity,IdealGasDensity](compressibilityFlag,nSimplex,
7380 * nPointsPerSimplex,
7381*/
7382 __pyx_t_2 = (__pyx_v_pskModelFlag == 1);
7383
7384 if (__pyx_t_2) {
7385
7386
7387 /* "cTwophaseDarcyCoefficients.pyx":626
7388 * elif density_n_flag == 2:#nonwetting IdealGas
7389 * if pskModelFlag == 1:
7390 * tpdc.twophaseDarcy_fc_sd_het_matType_nonPotentialForm[VGM,ExponentialDensity,IdealGasDensity](compressibilityFlag,nSimplex, # <<<<<<<<<<<<<<
7391 * nPointsPerSimplex,
7392 * g.shape[0],
7393*/
7394 (void)(twophaseDarcy_fc_sd_het_matType_nonPotentialForm<VGM,ExponentialDensity,IdealGasDensity>(__pyx_v_compressibilityFlag, __pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_g)[0]), 4, ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rowptr)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_colind)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_matType)), __pyx_v_muw, __pyx_v_mun, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_omega)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Kbar)), __pyx_v_b, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_iwork_psk)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk_tol)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_w)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_n)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_g)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_x)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_sw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_mw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_mn)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmn)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmn_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psin)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dpsin)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dpsin_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi_psiw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi_psin)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi_psin_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi_psin_dsw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_fw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dfw_dsw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dfw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_fn)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dfn_dsw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dfn_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_aw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_daw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_daw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_an)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dan)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dan_dpsiw))));
7395
7396 /* "cTwophaseDarcyCoefficients.pyx":625
7397 * <double*>(dan_dpsiw.data))
7398 * elif density_n_flag == 2:#nonwetting IdealGas
7399 * if pskModelFlag == 1: # <<<<<<<<<<<<<<
7400 * tpdc.twophaseDarcy_fc_sd_het_matType_nonPotentialForm[VGM,ExponentialDensity,IdealGasDensity](compressibilityFlag,nSimplex,
7401 * nPointsPerSimplex,
7402*/
7403 goto __pyx_L3;
7404 }
7405
7406 /* "cTwophaseDarcyCoefficients.pyx":674
7407 * <double*>(dan_dpsiw.data))
7408 * else:
7409 * tpdc.twophaseDarcy_fc_sd_het_matType_nonPotentialForm[SimplePSK,ExponentialDensity,IdealGasDensity](compressibilityFlag,nSimplex, # <<<<<<<<<<<<<<
7410 * nPointsPerSimplex,
7411 * g.shape[0],
7412*/
7413 /*else*/ {
7414
7415 /* "cTwophaseDarcyCoefficients.pyx":720
7416 * <double*>(an.data),
7417 * <double*>(dan.data),
7418 * <double*>(dan_dpsiw.data)) # <<<<<<<<<<<<<<
7419 * else:
7420 * assert False, "configuration density_w_flag= {0} and density_n_flag= {1} not found ".format(density_w_flag, density_n_flag)
7421*/
7422 (void)(twophaseDarcy_fc_sd_het_matType_nonPotentialForm<SimplePSK,ExponentialDensity,IdealGasDensity>(__pyx_v_compressibilityFlag, __pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_g)[0]), 2, ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rowptr)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_colind)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_matType)), __pyx_v_muw, __pyx_v_mun, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_omega)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Kbar)), __pyx_v_b, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_iwork_psk)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk_tol)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_w)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_n)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_g)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_x)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_sw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_mw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_mn)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmn)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmn_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psin)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dpsin)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dpsin_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi_psiw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi_psin)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi_psin_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi_psin_dsw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_fw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dfw_dsw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dfw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_fn)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dfn_dsw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dfn_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_aw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_daw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_daw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_an)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dan)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dan_dpsiw))));
7423 }
7424 __pyx_L3:;
7425
7426 /* "cTwophaseDarcyCoefficients.pyx":624
7427 * <double*>(dan.data),
7428 * <double*>(dan_dpsiw.data))
7429 * elif density_n_flag == 2:#nonwetting IdealGas # <<<<<<<<<<<<<<
7430 * if pskModelFlag == 1:
7431 * tpdc.twophaseDarcy_fc_sd_het_matType_nonPotentialForm[VGM,ExponentialDensity,IdealGasDensity](compressibilityFlag,nSimplex,
7432*/
7433 break;
7434 default:
7435
7436 /* "cTwophaseDarcyCoefficients.pyx":722
7437 * <double*>(dan_dpsiw.data))
7438 * else:
7439 * assert False, "configuration density_w_flag= {0} and density_n_flag= {1} not found ".format(density_w_flag, density_n_flag) # <<<<<<<<<<<<<<
7440 *
7441 * def twophaseDarcy_fc_pp_sd_het_matType(int pskModelFlag,
7442*/
7443 #ifndef CYTHON_WITHOUT_ASSERTIONS
7444 if (unlikely(__pyx_assertions_enabled())) {
7445 __pyx_t_4 = __pyx_mstate_global->__pyx_kp_u_configuration_density_w_flag_0_a;
7446 __Pyx_INCREF(__pyx_t_4);
7447 __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_density_w_flag); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 722, __pyx_L1_error)
7448 __Pyx_GOTREF(__pyx_t_5);
7449 __pyx_t_6 = __Pyx_PyLong_From_int(__pyx_v_density_n_flag); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 722, __pyx_L1_error)
7450 __Pyx_GOTREF(__pyx_t_6);
7451 __pyx_t_7 = 0;
7452 {
7453 PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_5, __pyx_t_6};
7454 __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
7455 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
7456 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7457 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7458 if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 722, __pyx_L1_error)
7459 __Pyx_GOTREF(__pyx_t_3);
7460 }
7461 if (!(likely(PyUnicode_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_3))) __PYX_ERR(0, 722, __pyx_L1_error)
7462 __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_3, 0, 0);
7463 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7464 __PYX_ERR(0, 722, __pyx_L1_error)
7465 }
7466 #else
7467 if ((1)); else __PYX_ERR(0, 722, __pyx_L1_error)
7468 #endif
7469 break;
7470 }
7471
7472 /* "cTwophaseDarcyCoefficients.pyx":424
7473 * assert False, "configuration density_w_flag= {0} and density_n_flag= {1} not found ".format(density_w_flag, density_n_flag)
7474 *
7475 * def twophaseDarcy_fc_sd_het_matType_nonPotentialForm(int pskModelFlag, # <<<<<<<<<<<<<<
7476 * int density_w_flag,
7477 * int density_n_flag,
7478*/
7479
7480 /* function exit code */
7481 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7482 goto __pyx_L0;
7483 __pyx_L1_error:;
7484 __Pyx_XDECREF(__pyx_t_3);
7485 __Pyx_XDECREF(__pyx_t_4);
7486 __Pyx_XDECREF(__pyx_t_5);
7487 __Pyx_XDECREF(__pyx_t_6);
7488 __Pyx_AddTraceback("cTwophaseDarcyCoefficients.twophaseDarcy_fc_sd_het_matType_nonPotentialForm", __pyx_clineno, __pyx_lineno, __pyx_filename);
7489 __pyx_r = NULL;
7490 __pyx_L0:;
7491
7492
7493 __Pyx_XGIVEREF(__pyx_r);
7494 __Pyx_RefNannyFinishContext();
7495 return __pyx_r;
7496}
7497
7498/* "cTwophaseDarcyCoefficients.pyx":724
7499 * assert False, "configuration density_w_flag= {0} and density_n_flag= {1} not found ".format(density_w_flag, density_n_flag)
7500 *
7501 * def twophaseDarcy_fc_pp_sd_het_matType(int pskModelFlag, # <<<<<<<<<<<<<<
7502 * int density_w_flag,
7503 * int density_n_flag,
7504*/
7505
7506/* Python wrapper */
7507static PyObject *__pyx_pw_26cTwophaseDarcyCoefficients_5twophaseDarcy_fc_pp_sd_het_matType(PyObject *__pyx_self,
7508#if CYTHON_VECTORCALL
7509PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
7510#else
7511PyObject *__pyx_args, PyObject *__pyx_kwds
7512#endif
7513); /*proto*/
7514PyDoc_STRVAR(__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 ");
7515static PyMethodDef __pyx_mdef_26cTwophaseDarcyCoefficients_5twophaseDarcy_fc_pp_sd_het_matType = {"twophaseDarcy_fc_pp_sd_het_matType", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_26cTwophaseDarcyCoefficients_5twophaseDarcy_fc_pp_sd_het_matType, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_26cTwophaseDarcyCoefficients_4twophaseDarcy_fc_pp_sd_het_matType};
7516static PyObject *__pyx_pw_26cTwophaseDarcyCoefficients_5twophaseDarcy_fc_pp_sd_het_matType(PyObject *__pyx_self,
7517#if CYTHON_VECTORCALL
7518PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
7519#else
7520PyObject *__pyx_args, PyObject *__pyx_kwds
7521#endif
7522) {
7523 int __pyx_v_pskModelFlag;
7524 int __pyx_v_density_w_flag;
7525 int __pyx_v_density_n_flag;
7526 PyArrayObject *__pyx_v_rowptr = 0;
7527 PyArrayObject *__pyx_v_colind = 0;
7528 PyArrayObject *__pyx_v_matType = 0;
7529 double __pyx_v_muw;
7530 double __pyx_v_mun;
7531 PyArrayObject *__pyx_v_omega = 0;
7532 PyArrayObject *__pyx_v_Kbar = 0;
7533 double __pyx_v_b;
7534 PyArrayObject *__pyx_v_rwork_psk = 0;
7535 PyArrayObject *__pyx_v_iwork_psk = 0;
7536 PyArrayObject *__pyx_v_rwork_psk_tol = 0;
7537 PyArrayObject *__pyx_v_rwork_density_w = 0;
7538 PyArrayObject *__pyx_v_rwork_density_n = 0;
7539 PyArrayObject *__pyx_v_g = 0;
7540 PyArrayObject *__pyx_v_x = 0;
7541 PyArrayObject *__pyx_v_psiw = 0;
7542 PyArrayObject *__pyx_v_psic = 0;
7543 PyArrayObject *__pyx_v_sw = 0;
7544 PyArrayObject *__pyx_v_mw = 0;
7545 PyArrayObject *__pyx_v_dmw_dpsiw = 0;
7546 PyArrayObject *__pyx_v_dmw_dpsic = 0;
7547 PyArrayObject *__pyx_v_mn = 0;
7548 PyArrayObject *__pyx_v_dmn_dpsiw = 0;
7549 PyArrayObject *__pyx_v_dmn_dpsic = 0;
7550 PyArrayObject *__pyx_v_phi_psiw = 0;
7551 PyArrayObject *__pyx_v_dphi_psiw_dpsiw = 0;
7552 PyArrayObject *__pyx_v_phi_psin = 0;
7553 PyArrayObject *__pyx_v_dphi_psin_dpsiw = 0;
7554 PyArrayObject *__pyx_v_dphi_psin_dpsic = 0;
7555 PyArrayObject *__pyx_v_aw = 0;
7556 PyArrayObject *__pyx_v_daw_dpsiw = 0;
7557 PyArrayObject *__pyx_v_daw_dpsic = 0;
7558 PyArrayObject *__pyx_v_an = 0;
7559 PyArrayObject *__pyx_v_dan_dpsiw = 0;
7560 PyArrayObject *__pyx_v_dan_dpsic = 0;
7561 #if !CYTHON_VECTORCALL
7562 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
7563 #endif
7564 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
7565 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};
7566 int __pyx_lineno = 0;
7567 const char *__pyx_filename = NULL;
7568 int __pyx_clineno = 0;
7569 PyObject *__pyx_r = 0;
7570 __Pyx_RefNannyDeclarations
7571 __Pyx_RefNannySetupContext("twophaseDarcy_fc_pp_sd_het_matType (wrapper)", 0);
7572 #if !CYTHON_VECTORCALL
7573 #if CYTHON_ASSUME_SAFE_SIZE
7574 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
7575 #else
7576 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
7577 #endif
7578 #endif
7579 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
7580 {
7581 PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pskModelFlag,&__pyx_mstate_global->__pyx_n_u_density_w_flag,&__pyx_mstate_global->__pyx_n_u_density_n_flag,&__pyx_mstate_global->__pyx_n_u_rowptr,&__pyx_mstate_global->__pyx_n_u_colind,&__pyx_mstate_global->__pyx_n_u_matType,&__pyx_mstate_global->__pyx_n_u_muw,&__pyx_mstate_global->__pyx_n_u_mun,&__pyx_mstate_global->__pyx_n_u_omega,&__pyx_mstate_global->__pyx_n_u_Kbar,&__pyx_mstate_global->__pyx_n_u_b,&__pyx_mstate_global->__pyx_n_u_rwork_psk,&__pyx_mstate_global->__pyx_n_u_iwork_psk,&__pyx_mstate_global->__pyx_n_u_rwork_psk_tol,&__pyx_mstate_global->__pyx_n_u_rwork_density_w,&__pyx_mstate_global->__pyx_n_u_rwork_density_n,&__pyx_mstate_global->__pyx_n_u_g,&__pyx_mstate_global->__pyx_n_u_x,&__pyx_mstate_global->__pyx_n_u_psiw,&__pyx_mstate_global->__pyx_n_u_psic,&__pyx_mstate_global->__pyx_n_u_sw,&__pyx_mstate_global->__pyx_n_u_mw,&__pyx_mstate_global->__pyx_n_u_dmw_dpsiw,&__pyx_mstate_global->__pyx_n_u_dmw_dpsic,&__pyx_mstate_global->__pyx_n_u_mn,&__pyx_mstate_global->__pyx_n_u_dmn_dpsiw,&__pyx_mstate_global->__pyx_n_u_dmn_dpsic,&__pyx_mstate_global->__pyx_n_u_phi_psiw,&__pyx_mstate_global->__pyx_n_u_dphi_psiw_dpsiw,&__pyx_mstate_global->__pyx_n_u_phi_psin,&__pyx_mstate_global->__pyx_n_u_dphi_psin_dpsiw,&__pyx_mstate_global->__pyx_n_u_dphi_psin_dpsic,&__pyx_mstate_global->__pyx_n_u_aw,&__pyx_mstate_global->__pyx_n_u_daw_dpsiw,&__pyx_mstate_global->__pyx_n_u_daw_dpsic,&__pyx_mstate_global->__pyx_n_u_an,&__pyx_mstate_global->__pyx_n_u_dan_dpsiw,&__pyx_mstate_global->__pyx_n_u_dan_dpsic,0};
7582 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
7583 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 724, __pyx_L3_error)
7584 if (__pyx_kwds_len > 0) {
7585 switch (__pyx_nargs) {
7586 case 38:
7587 values[37] = __Pyx_ArgRef_FASTCALL(__pyx_args, 37);
7588 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[37])) __PYX_ERR(0, 724, __pyx_L3_error)
7589 CYTHON_FALLTHROUGH;
7590 case 37:
7591 values[36] = __Pyx_ArgRef_FASTCALL(__pyx_args, 36);
7592 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[36])) __PYX_ERR(0, 724, __pyx_L3_error)
7593 CYTHON_FALLTHROUGH;
7594 case 36:
7595 values[35] = __Pyx_ArgRef_FASTCALL(__pyx_args, 35);
7596 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[35])) __PYX_ERR(0, 724, __pyx_L3_error)
7597 CYTHON_FALLTHROUGH;
7598 case 35:
7599 values[34] = __Pyx_ArgRef_FASTCALL(__pyx_args, 34);
7600 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[34])) __PYX_ERR(0, 724, __pyx_L3_error)
7601 CYTHON_FALLTHROUGH;
7602 case 34:
7603 values[33] = __Pyx_ArgRef_FASTCALL(__pyx_args, 33);
7604 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[33])) __PYX_ERR(0, 724, __pyx_L3_error)
7605 CYTHON_FALLTHROUGH;
7606 case 33:
7607 values[32] = __Pyx_ArgRef_FASTCALL(__pyx_args, 32);
7608 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[32])) __PYX_ERR(0, 724, __pyx_L3_error)
7609 CYTHON_FALLTHROUGH;
7610 case 32:
7611 values[31] = __Pyx_ArgRef_FASTCALL(__pyx_args, 31);
7612 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[31])) __PYX_ERR(0, 724, __pyx_L3_error)
7613 CYTHON_FALLTHROUGH;
7614 case 31:
7615 values[30] = __Pyx_ArgRef_FASTCALL(__pyx_args, 30);
7616 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[30])) __PYX_ERR(0, 724, __pyx_L3_error)
7617 CYTHON_FALLTHROUGH;
7618 case 30:
7619 values[29] = __Pyx_ArgRef_FASTCALL(__pyx_args, 29);
7620 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[29])) __PYX_ERR(0, 724, __pyx_L3_error)
7621 CYTHON_FALLTHROUGH;
7622 case 29:
7623 values[28] = __Pyx_ArgRef_FASTCALL(__pyx_args, 28);
7624 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[28])) __PYX_ERR(0, 724, __pyx_L3_error)
7625 CYTHON_FALLTHROUGH;
7626 case 28:
7627 values[27] = __Pyx_ArgRef_FASTCALL(__pyx_args, 27);
7628 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[27])) __PYX_ERR(0, 724, __pyx_L3_error)
7629 CYTHON_FALLTHROUGH;
7630 case 27:
7631 values[26] = __Pyx_ArgRef_FASTCALL(__pyx_args, 26);
7632 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[26])) __PYX_ERR(0, 724, __pyx_L3_error)
7633 CYTHON_FALLTHROUGH;
7634 case 26:
7635 values[25] = __Pyx_ArgRef_FASTCALL(__pyx_args, 25);
7636 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[25])) __PYX_ERR(0, 724, __pyx_L3_error)
7637 CYTHON_FALLTHROUGH;
7638 case 25:
7639 values[24] = __Pyx_ArgRef_FASTCALL(__pyx_args, 24);
7640 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[24])) __PYX_ERR(0, 724, __pyx_L3_error)
7641 CYTHON_FALLTHROUGH;
7642 case 24:
7643 values[23] = __Pyx_ArgRef_FASTCALL(__pyx_args, 23);
7644 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[23])) __PYX_ERR(0, 724, __pyx_L3_error)
7645 CYTHON_FALLTHROUGH;
7646 case 23:
7647 values[22] = __Pyx_ArgRef_FASTCALL(__pyx_args, 22);
7648 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[22])) __PYX_ERR(0, 724, __pyx_L3_error)
7649 CYTHON_FALLTHROUGH;
7650 case 22:
7651 values[21] = __Pyx_ArgRef_FASTCALL(__pyx_args, 21);
7652 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[21])) __PYX_ERR(0, 724, __pyx_L3_error)
7653 CYTHON_FALLTHROUGH;
7654 case 21:
7655 values[20] = __Pyx_ArgRef_FASTCALL(__pyx_args, 20);
7656 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[20])) __PYX_ERR(0, 724, __pyx_L3_error)
7657 CYTHON_FALLTHROUGH;
7658 case 20:
7659 values[19] = __Pyx_ArgRef_FASTCALL(__pyx_args, 19);
7660 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[19])) __PYX_ERR(0, 724, __pyx_L3_error)
7661 CYTHON_FALLTHROUGH;
7662 case 19:
7663 values[18] = __Pyx_ArgRef_FASTCALL(__pyx_args, 18);
7664 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[18])) __PYX_ERR(0, 724, __pyx_L3_error)
7665 CYTHON_FALLTHROUGH;
7666 case 18:
7667 values[17] = __Pyx_ArgRef_FASTCALL(__pyx_args, 17);
7668 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[17])) __PYX_ERR(0, 724, __pyx_L3_error)
7669 CYTHON_FALLTHROUGH;
7670 case 17:
7671 values[16] = __Pyx_ArgRef_FASTCALL(__pyx_args, 16);
7672 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[16])) __PYX_ERR(0, 724, __pyx_L3_error)
7673 CYTHON_FALLTHROUGH;
7674 case 16:
7675 values[15] = __Pyx_ArgRef_FASTCALL(__pyx_args, 15);
7676 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[15])) __PYX_ERR(0, 724, __pyx_L3_error)
7677 CYTHON_FALLTHROUGH;
7678 case 15:
7679 values[14] = __Pyx_ArgRef_FASTCALL(__pyx_args, 14);
7680 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[14])) __PYX_ERR(0, 724, __pyx_L3_error)
7681 CYTHON_FALLTHROUGH;
7682 case 14:
7683 values[13] = __Pyx_ArgRef_FASTCALL(__pyx_args, 13);
7684 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[13])) __PYX_ERR(0, 724, __pyx_L3_error)
7685 CYTHON_FALLTHROUGH;
7686 case 13:
7687 values[12] = __Pyx_ArgRef_FASTCALL(__pyx_args, 12);
7688 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[12])) __PYX_ERR(0, 724, __pyx_L3_error)
7689 CYTHON_FALLTHROUGH;
7690 case 12:
7691 values[11] = __Pyx_ArgRef_FASTCALL(__pyx_args, 11);
7692 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[11])) __PYX_ERR(0, 724, __pyx_L3_error)
7693 CYTHON_FALLTHROUGH;
7694 case 11:
7695 values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10);
7696 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 724, __pyx_L3_error)
7697 CYTHON_FALLTHROUGH;
7698 case 10:
7699 values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
7700 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 724, __pyx_L3_error)
7701 CYTHON_FALLTHROUGH;
7702 case 9:
7703 values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
7704 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 724, __pyx_L3_error)
7705 CYTHON_FALLTHROUGH;
7706 case 8:
7707 values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
7708 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 724, __pyx_L3_error)
7709 CYTHON_FALLTHROUGH;
7710 case 7:
7711 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
7712 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 724, __pyx_L3_error)
7713 CYTHON_FALLTHROUGH;
7714 case 6:
7715 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
7716 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 724, __pyx_L3_error)
7717 CYTHON_FALLTHROUGH;
7718 case 5:
7719 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
7720 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 724, __pyx_L3_error)
7721 CYTHON_FALLTHROUGH;
7722 case 4:
7723 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
7724 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 724, __pyx_L3_error)
7725 CYTHON_FALLTHROUGH;
7726 case 3:
7727 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
7728 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 724, __pyx_L3_error)
7729 CYTHON_FALLTHROUGH;
7730 case 2:
7731 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
7732 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 724, __pyx_L3_error)
7733 CYTHON_FALLTHROUGH;
7734 case 1:
7735 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
7736 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 724, __pyx_L3_error)
7737 CYTHON_FALLTHROUGH;
7738 case 0: break;
7739 default: goto __pyx_L5_argtuple_error;
7740 }
7741 const Py_ssize_t kwd_pos_args = __pyx_nargs;
7742 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "twophaseDarcy_fc_pp_sd_het_matType", 0) < (0)) __PYX_ERR(0, 724, __pyx_L3_error)
7743 for (Py_ssize_t i = __pyx_nargs; i < 38; i++) {
7744 if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("twophaseDarcy_fc_pp_sd_het_matType", 1, 38, 38, i); __PYX_ERR(0, 724, __pyx_L3_error) }
7745 }
7746 } else if (unlikely(__pyx_nargs != 38)) {
7747 goto __pyx_L5_argtuple_error;
7748 } else {
7749 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
7750 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 724, __pyx_L3_error)
7751 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
7752 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 724, __pyx_L3_error)
7753 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
7754 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 724, __pyx_L3_error)
7755 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
7756 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 724, __pyx_L3_error)
7757 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
7758 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 724, __pyx_L3_error)
7759 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
7760 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 724, __pyx_L3_error)
7761 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
7762 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 724, __pyx_L3_error)
7763 values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
7764 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 724, __pyx_L3_error)
7765 values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
7766 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 724, __pyx_L3_error)
7767 values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
7768 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 724, __pyx_L3_error)
7769 values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10);
7770 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 724, __pyx_L3_error)
7771 values[11] = __Pyx_ArgRef_FASTCALL(__pyx_args, 11);
7772 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[11])) __PYX_ERR(0, 724, __pyx_L3_error)
7773 values[12] = __Pyx_ArgRef_FASTCALL(__pyx_args, 12);
7774 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[12])) __PYX_ERR(0, 724, __pyx_L3_error)
7775 values[13] = __Pyx_ArgRef_FASTCALL(__pyx_args, 13);
7776 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[13])) __PYX_ERR(0, 724, __pyx_L3_error)
7777 values[14] = __Pyx_ArgRef_FASTCALL(__pyx_args, 14);
7778 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[14])) __PYX_ERR(0, 724, __pyx_L3_error)
7779 values[15] = __Pyx_ArgRef_FASTCALL(__pyx_args, 15);
7780 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[15])) __PYX_ERR(0, 724, __pyx_L3_error)
7781 values[16] = __Pyx_ArgRef_FASTCALL(__pyx_args, 16);
7782 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[16])) __PYX_ERR(0, 724, __pyx_L3_error)
7783 values[17] = __Pyx_ArgRef_FASTCALL(__pyx_args, 17);
7784 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[17])) __PYX_ERR(0, 724, __pyx_L3_error)
7785 values[18] = __Pyx_ArgRef_FASTCALL(__pyx_args, 18);
7786 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[18])) __PYX_ERR(0, 724, __pyx_L3_error)
7787 values[19] = __Pyx_ArgRef_FASTCALL(__pyx_args, 19);
7788 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[19])) __PYX_ERR(0, 724, __pyx_L3_error)
7789 values[20] = __Pyx_ArgRef_FASTCALL(__pyx_args, 20);
7790 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[20])) __PYX_ERR(0, 724, __pyx_L3_error)
7791 values[21] = __Pyx_ArgRef_FASTCALL(__pyx_args, 21);
7792 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[21])) __PYX_ERR(0, 724, __pyx_L3_error)
7793 values[22] = __Pyx_ArgRef_FASTCALL(__pyx_args, 22);
7794 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[22])) __PYX_ERR(0, 724, __pyx_L3_error)
7795 values[23] = __Pyx_ArgRef_FASTCALL(__pyx_args, 23);
7796 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[23])) __PYX_ERR(0, 724, __pyx_L3_error)
7797 values[24] = __Pyx_ArgRef_FASTCALL(__pyx_args, 24);
7798 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[24])) __PYX_ERR(0, 724, __pyx_L3_error)
7799 values[25] = __Pyx_ArgRef_FASTCALL(__pyx_args, 25);
7800 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[25])) __PYX_ERR(0, 724, __pyx_L3_error)
7801 values[26] = __Pyx_ArgRef_FASTCALL(__pyx_args, 26);
7802 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[26])) __PYX_ERR(0, 724, __pyx_L3_error)
7803 values[27] = __Pyx_ArgRef_FASTCALL(__pyx_args, 27);
7804 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[27])) __PYX_ERR(0, 724, __pyx_L3_error)
7805 values[28] = __Pyx_ArgRef_FASTCALL(__pyx_args, 28);
7806 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[28])) __PYX_ERR(0, 724, __pyx_L3_error)
7807 values[29] = __Pyx_ArgRef_FASTCALL(__pyx_args, 29);
7808 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[29])) __PYX_ERR(0, 724, __pyx_L3_error)
7809 values[30] = __Pyx_ArgRef_FASTCALL(__pyx_args, 30);
7810 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[30])) __PYX_ERR(0, 724, __pyx_L3_error)
7811 values[31] = __Pyx_ArgRef_FASTCALL(__pyx_args, 31);
7812 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[31])) __PYX_ERR(0, 724, __pyx_L3_error)
7813 values[32] = __Pyx_ArgRef_FASTCALL(__pyx_args, 32);
7814 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[32])) __PYX_ERR(0, 724, __pyx_L3_error)
7815 values[33] = __Pyx_ArgRef_FASTCALL(__pyx_args, 33);
7816 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[33])) __PYX_ERR(0, 724, __pyx_L3_error)
7817 values[34] = __Pyx_ArgRef_FASTCALL(__pyx_args, 34);
7818 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[34])) __PYX_ERR(0, 724, __pyx_L3_error)
7819 values[35] = __Pyx_ArgRef_FASTCALL(__pyx_args, 35);
7820 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[35])) __PYX_ERR(0, 724, __pyx_L3_error)
7821 values[36] = __Pyx_ArgRef_FASTCALL(__pyx_args, 36);
7822 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[36])) __PYX_ERR(0, 724, __pyx_L3_error)
7823 values[37] = __Pyx_ArgRef_FASTCALL(__pyx_args, 37);
7824 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[37])) __PYX_ERR(0, 724, __pyx_L3_error)
7825 }
7826 __pyx_v_pskModelFlag = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_pskModelFlag == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 724, __pyx_L3_error)
7827 __pyx_v_density_w_flag = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_density_w_flag == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 725, __pyx_L3_error)
7828 __pyx_v_density_n_flag = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_density_n_flag == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 726, __pyx_L3_error)
7829 __pyx_v_rowptr = ((PyArrayObject *)values[3]);
7830 __pyx_v_colind = ((PyArrayObject *)values[4]);
7831 __pyx_v_matType = ((PyArrayObject *)values[5]);
7832 __pyx_v_muw = __Pyx_PyFloat_AsDouble(values[6]); if (unlikely((__pyx_v_muw == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 730, __pyx_L3_error)
7833 __pyx_v_mun = __Pyx_PyFloat_AsDouble(values[7]); if (unlikely((__pyx_v_mun == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 731, __pyx_L3_error)
7834 __pyx_v_omega = ((PyArrayObject *)values[8]);
7835 __pyx_v_Kbar = ((PyArrayObject *)values[9]);
7836 __pyx_v_b = __Pyx_PyFloat_AsDouble(values[10]); if (unlikely((__pyx_v_b == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 734, __pyx_L3_error)
7837 __pyx_v_rwork_psk = ((PyArrayObject *)values[11]);
7838 __pyx_v_iwork_psk = ((PyArrayObject *)values[12]);
7839 __pyx_v_rwork_psk_tol = ((PyArrayObject *)values[13]);
7840 __pyx_v_rwork_density_w = ((PyArrayObject *)values[14]);
7841 __pyx_v_rwork_density_n = ((PyArrayObject *)values[15]);
7842 __pyx_v_g = ((PyArrayObject *)values[16]);
7843 __pyx_v_x = ((PyArrayObject *)values[17]);
7844 __pyx_v_psiw = ((PyArrayObject *)values[18]);
7845 __pyx_v_psic = ((PyArrayObject *)values[19]);
7846 __pyx_v_sw = ((PyArrayObject *)values[20]);
7847 __pyx_v_mw = ((PyArrayObject *)values[21]);
7848 __pyx_v_dmw_dpsiw = ((PyArrayObject *)values[22]);
7849 __pyx_v_dmw_dpsic = ((PyArrayObject *)values[23]);
7850 __pyx_v_mn = ((PyArrayObject *)values[24]);
7851 __pyx_v_dmn_dpsiw = ((PyArrayObject *)values[25]);
7852 __pyx_v_dmn_dpsic = ((PyArrayObject *)values[26]);
7853 __pyx_v_phi_psiw = ((PyArrayObject *)values[27]);
7854 __pyx_v_dphi_psiw_dpsiw = ((PyArrayObject *)values[28]);
7855 __pyx_v_phi_psin = ((PyArrayObject *)values[29]);
7856 __pyx_v_dphi_psin_dpsiw = ((PyArrayObject *)values[30]);
7857 __pyx_v_dphi_psin_dpsic = ((PyArrayObject *)values[31]);
7858 __pyx_v_aw = ((PyArrayObject *)values[32]);
7859 __pyx_v_daw_dpsiw = ((PyArrayObject *)values[33]);
7860 __pyx_v_daw_dpsic = ((PyArrayObject *)values[34]);
7861 __pyx_v_an = ((PyArrayObject *)values[35]);
7862 __pyx_v_dan_dpsiw = ((PyArrayObject *)values[36]);
7863 __pyx_v_dan_dpsic = ((PyArrayObject *)values[37]);
7864 }
7865 goto __pyx_L6_skip;
7866 __pyx_L5_argtuple_error:;
7867 __Pyx_RaiseArgtupleInvalid("twophaseDarcy_fc_pp_sd_het_matType", 1, 38, 38, __pyx_nargs); __PYX_ERR(0, 724, __pyx_L3_error)
7868 __pyx_L6_skip:;
7869 goto __pyx_L4_argument_unpacking_done;
7870 __pyx_L3_error:;
7871 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
7872 Py_XDECREF(values[__pyx_temp]);
7873 }
7874 __Pyx_AddTraceback("cTwophaseDarcyCoefficients.twophaseDarcy_fc_pp_sd_het_matType", __pyx_clineno, __pyx_lineno, __pyx_filename);
7875 __Pyx_RefNannyFinishContext();
7876 return NULL;
7877 __pyx_L4_argument_unpacking_done:;
7878 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rowptr), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "rowptr", 0))) __PYX_ERR(0, 727, __pyx_L1_error)
7879 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_colind), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "colind", 0))) __PYX_ERR(0, 728, __pyx_L1_error)
7880 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_matType), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "matType", 0))) __PYX_ERR(0, 729, __pyx_L1_error)
7881 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_omega), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "omega", 0))) __PYX_ERR(0, 732, __pyx_L1_error)
7882 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Kbar), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "Kbar", 0))) __PYX_ERR(0, 733, __pyx_L1_error)
7883 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_psk), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "rwork_psk", 0))) __PYX_ERR(0, 735, __pyx_L1_error)
7884 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork_psk), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "iwork_psk", 0))) __PYX_ERR(0, 736, __pyx_L1_error)
7885 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_psk_tol), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "rwork_psk_tol", 0))) __PYX_ERR(0, 737, __pyx_L1_error)
7886 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_density_w), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "rwork_density_w", 0))) __PYX_ERR(0, 738, __pyx_L1_error)
7887 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_density_n), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "rwork_density_n", 0))) __PYX_ERR(0, 739, __pyx_L1_error)
7888 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_g), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "g", 0))) __PYX_ERR(0, 740, __pyx_L1_error)
7889 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "x", 0))) __PYX_ERR(0, 741, __pyx_L1_error)
7890 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_psiw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "psiw", 0))) __PYX_ERR(0, 742, __pyx_L1_error)
7891 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_psic), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "psic", 0))) __PYX_ERR(0, 743, __pyx_L1_error)
7892 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "sw", 0))) __PYX_ERR(0, 744, __pyx_L1_error)
7893 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "mw", 0))) __PYX_ERR(0, 745, __pyx_L1_error)
7894 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dmw_dpsiw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "dmw_dpsiw", 0))) __PYX_ERR(0, 746, __pyx_L1_error)
7895 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dmw_dpsic), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "dmw_dpsic", 0))) __PYX_ERR(0, 747, __pyx_L1_error)
7896 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mn), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "mn", 0))) __PYX_ERR(0, 748, __pyx_L1_error)
7897 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dmn_dpsiw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "dmn_dpsiw", 0))) __PYX_ERR(0, 749, __pyx_L1_error)
7898 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dmn_dpsic), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "dmn_dpsic", 0))) __PYX_ERR(0, 750, __pyx_L1_error)
7899 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_phi_psiw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "phi_psiw", 0))) __PYX_ERR(0, 751, __pyx_L1_error)
7900 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dphi_psiw_dpsiw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "dphi_psiw_dpsiw", 0))) __PYX_ERR(0, 752, __pyx_L1_error)
7901 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_phi_psin), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "phi_psin", 0))) __PYX_ERR(0, 753, __pyx_L1_error)
7902 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dphi_psin_dpsiw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "dphi_psin_dpsiw", 0))) __PYX_ERR(0, 754, __pyx_L1_error)
7903 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dphi_psin_dpsic), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "dphi_psin_dpsic", 0))) __PYX_ERR(0, 755, __pyx_L1_error)
7904 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_aw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "aw", 0))) __PYX_ERR(0, 756, __pyx_L1_error)
7905 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_daw_dpsiw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "daw_dpsiw", 0))) __PYX_ERR(0, 757, __pyx_L1_error)
7906 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_daw_dpsic), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "daw_dpsic", 0))) __PYX_ERR(0, 758, __pyx_L1_error)
7907 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_an), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "an", 0))) __PYX_ERR(0, 759, __pyx_L1_error)
7908 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dan_dpsiw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "dan_dpsiw", 0))) __PYX_ERR(0, 760, __pyx_L1_error)
7909 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dan_dpsic), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "dan_dpsic", 0))) __PYX_ERR(0, 761, __pyx_L1_error)
7910 __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);
7911
7912 /* function exit code */
7913 goto __pyx_L0;
7914 __pyx_L1_error:;
7915 __pyx_r = NULL;
7916 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
7917 Py_XDECREF(values[__pyx_temp]);
7918 }
7919 goto __pyx_L7_cleaned_up;
7920 __pyx_L0:;
7921 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
7922 Py_XDECREF(values[__pyx_temp]);
7923 }
7924 __pyx_L7_cleaned_up:;
7925
7926
7927
7928
7929
7930
7931 __Pyx_RefNannyFinishContext();
7932 return __pyx_r;
7933}
7934
7935static 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) {
7936 int __pyx_v_nPointsPerSimplex;
7937 int __pyx_v_nSimplex;
7938 PyObject *__pyx_r = NULL;
7939 __Pyx_RefNannyDeclarations
7940 npy_intp __pyx_t_1;
7941 int __pyx_t_2;
7942 PyObject *__pyx_t_3 = NULL;
7943 PyObject *__pyx_t_4 = NULL;
7944 PyObject *__pyx_t_5 = NULL;
7945 PyObject *__pyx_t_6 = NULL;
7946 size_t __pyx_t_7;
7947 int __pyx_lineno = 0;
7948 const char *__pyx_filename = NULL;
7949 int __pyx_clineno = 0;
7950 __Pyx_RefNannySetupContext("twophaseDarcy_fc_pp_sd_het_matType", 0);
7951
7952 /* "cTwophaseDarcyCoefficients.pyx":767
7953 *
7954 * """
7955 * cdef int nPointsPerSimplex=sw.shape[sw.ndim-1] # <<<<<<<<<<<<<<
7956 * cdef int nSimplex=sw.size//nPointsPerSimplex
7957 * #while debugging allow only one option
7958*/
7959 __pyx_v_nPointsPerSimplex = (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_sw)[(__pyx_f_5numpy_7ndarray_4ndim___get__(__pyx_v_sw) - 1)]);
7960
7961 /* "cTwophaseDarcyCoefficients.pyx":768
7962 * """
7963 * cdef int nPointsPerSimplex=sw.shape[sw.ndim-1]
7964 * cdef int nSimplex=sw.size//nPointsPerSimplex # <<<<<<<<<<<<<<
7965 * #while debugging allow only one option
7966 * #exponential for wetting phase
7967*/
7968 __pyx_t_1 = __pyx_f_5numpy_7ndarray_4size___get__(__pyx_v_sw);
7969
7970 if (unlikely(__pyx_v_nPointsPerSimplex == 0)) {
7971 PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
7972 __PYX_ERR(0, 768, __pyx_L1_error)
7973 }
7974 else if (sizeof(npy_intp) == sizeof(long) && (!(((int)-1) > 0)) && unlikely(__pyx_v_nPointsPerSimplex == (int)-1) && unlikely(__Pyx_UNARY_NEG_WOULD_OVERFLOW(__pyx_t_1))) {
7975 PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
7976 __PYX_ERR(0, 768, __pyx_L1_error)
7977 }
7978 __pyx_v_nSimplex = __Pyx_div_npy_intp(__pyx_t_1, __pyx_v_nPointsPerSimplex, 0);
7979
7980
7981 /* "cTwophaseDarcyCoefficients.pyx":771
7982 * #while debugging allow only one option
7983 * #exponential for wetting phase
7984 * assert density_w_flag == 1 # <<<<<<<<<<<<<<
7985 * if density_n_flag == 1: #nonwetting exponential
7986 * if pskModelFlag == 0:
7987*/
7988 #ifndef CYTHON_WITHOUT_ASSERTIONS
7989 if (unlikely(__pyx_assertions_enabled())) {
7990 __pyx_t_2 = (__pyx_v_density_w_flag == 1);
7991
7992 if (unlikely(!__pyx_t_2)) {
7993 __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
7994 __PYX_ERR(0, 771, __pyx_L1_error)
7995 }
7996
7997 }
7998 #else
7999 if ((1)); else __PYX_ERR(0, 771, __pyx_L1_error)
8000 #endif
8001
8002 /* "cTwophaseDarcyCoefficients.pyx":772
8003 * #exponential for wetting phase
8004 * assert density_w_flag == 1
8005 * if density_n_flag == 1: #nonwetting exponential # <<<<<<<<<<<<<<
8006 * if pskModelFlag == 0:
8007 * tpdc.twophaseDarcy_fc_pp_sd_het_matType[SimplePSK,ExponentialDensity,ExponentialDensity](nSimplex,
8008*/
8009 switch (__pyx_v_density_n_flag) {
8010 case 1:
8011
8012 /* "cTwophaseDarcyCoefficients.pyx":773
8013 * assert density_w_flag == 1
8014 * if density_n_flag == 1: #nonwetting exponential
8015 * if pskModelFlag == 0: # <<<<<<<<<<<<<<
8016 * tpdc.twophaseDarcy_fc_pp_sd_het_matType[SimplePSK,ExponentialDensity,ExponentialDensity](nSimplex,
8017 * nPointsPerSimplex,
8018*/
8019 switch (__pyx_v_pskModelFlag) {
8020 case 0:
8021
8022 /* "cTwophaseDarcyCoefficients.pyx":774
8023 * if density_n_flag == 1: #nonwetting exponential
8024 * if pskModelFlag == 0:
8025 * tpdc.twophaseDarcy_fc_pp_sd_het_matType[SimplePSK,ExponentialDensity,ExponentialDensity](nSimplex, # <<<<<<<<<<<<<<
8026 * nPointsPerSimplex,
8027 * g.shape[0],
8028*/
8029 (void)(twophaseDarcy_fc_pp_sd_het_matType<SimplePSK,ExponentialDensity,ExponentialDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_g)[0]), 2, ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rowptr)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_colind)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_matType)), __pyx_v_muw, __pyx_v_mun, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_omega)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Kbar)), __pyx_v_b, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_iwork_psk)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk_tol)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_w)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_n)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_g)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_x)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psic)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_sw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_mw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmw_dpsic)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_mn)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmn_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmn_dpsic)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi_psiw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi_psin)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi_psin_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi_psin_dpsic)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_aw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_daw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_daw_dpsic)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_an)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dan_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dan_dpsic))));
8030
8031 /* "cTwophaseDarcyCoefficients.pyx":773
8032 * assert density_w_flag == 1
8033 * if density_n_flag == 1: #nonwetting exponential
8034 * if pskModelFlag == 0: # <<<<<<<<<<<<<<
8035 * tpdc.twophaseDarcy_fc_pp_sd_het_matType[SimplePSK,ExponentialDensity,ExponentialDensity](nSimplex,
8036 * nPointsPerSimplex,
8037*/
8038 break;
8039 case 1:
8040
8041 /* "cTwophaseDarcyCoefficients.pyx":814
8042 * <double*>(dan_dpsic.data))
8043 * elif pskModelFlag == 1:
8044 * tpdc.twophaseDarcy_fc_pp_sd_het_matType[VGM,ExponentialDensity,ExponentialDensity](nSimplex, # <<<<<<<<<<<<<<
8045 * nPointsPerSimplex,
8046 * g.shape[0],
8047*/
8048 (void)(twophaseDarcy_fc_pp_sd_het_matType<VGM,ExponentialDensity,ExponentialDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_g)[0]), 4, ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rowptr)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_colind)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_matType)), __pyx_v_muw, __pyx_v_mun, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_omega)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Kbar)), __pyx_v_b, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_iwork_psk)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk_tol)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_w)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_n)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_g)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_x)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psic)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_sw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_mw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmw_dpsic)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_mn)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmn_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmn_dpsic)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi_psiw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi_psin)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi_psin_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi_psin_dpsic)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_aw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_daw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_daw_dpsic)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_an)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dan_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dan_dpsic))));
8049
8050 /* "cTwophaseDarcyCoefficients.pyx":813
8051 * <double*>(dan_dpsiw.data),
8052 * <double*>(dan_dpsic.data))
8053 * elif pskModelFlag == 1: # <<<<<<<<<<<<<<
8054 * tpdc.twophaseDarcy_fc_pp_sd_het_matType[VGM,ExponentialDensity,ExponentialDensity](nSimplex,
8055 * nPointsPerSimplex,
8056*/
8057 break;
8058 default:
8059
8060 /* "cTwophaseDarcyCoefficients.pyx":854
8061 * <double*>(dan_dpsic.data))
8062 * else:
8063 * tpdc.twophaseDarcy_fc_pp_sd_het_matType[SimplePSK,ExponentialDensity,ExponentialDensity](nSimplex, # <<<<<<<<<<<<<<
8064 * nPointsPerSimplex,
8065 * g.shape[0],
8066*/
8067 (void)(twophaseDarcy_fc_pp_sd_het_matType<SimplePSK,ExponentialDensity,ExponentialDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_g)[0]), 2, ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rowptr)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_colind)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_matType)), __pyx_v_muw, __pyx_v_mun, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_omega)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Kbar)), __pyx_v_b, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_iwork_psk)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk_tol)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_w)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_n)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_g)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_x)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psic)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_sw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_mw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmw_dpsic)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_mn)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmn_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmn_dpsic)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi_psiw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi_psin)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi_psin_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi_psin_dpsic)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_aw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_daw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_daw_dpsic)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_an)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dan_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dan_dpsic))));
8068 break;
8069 }
8070
8071 /* "cTwophaseDarcyCoefficients.pyx":772
8072 * #exponential for wetting phase
8073 * assert density_w_flag == 1
8074 * if density_n_flag == 1: #nonwetting exponential # <<<<<<<<<<<<<<
8075 * if pskModelFlag == 0:
8076 * tpdc.twophaseDarcy_fc_pp_sd_het_matType[SimplePSK,ExponentialDensity,ExponentialDensity](nSimplex,
8077*/
8078 break;
8079 case 2:
8080
8081 /* "cTwophaseDarcyCoefficients.pyx":894
8082 * <double*>(dan_dpsic.data))
8083 * elif density_n_flag == 2: #nonwetting IdealGas
8084 * if pskModelFlag == 0: # <<<<<<<<<<<<<<
8085 * tpdc.twophaseDarcy_fc_pp_sd_het_matType[SimplePSK,ExponentialDensity,IdealGasDensity](nSimplex,
8086 * nPointsPerSimplex,
8087*/
8088 switch (__pyx_v_pskModelFlag) {
8089 case 0:
8090
8091 /* "cTwophaseDarcyCoefficients.pyx":895
8092 * elif density_n_flag == 2: #nonwetting IdealGas
8093 * if pskModelFlag == 0:
8094 * tpdc.twophaseDarcy_fc_pp_sd_het_matType[SimplePSK,ExponentialDensity,IdealGasDensity](nSimplex, # <<<<<<<<<<<<<<
8095 * nPointsPerSimplex,
8096 * g.shape[0],
8097*/
8098 (void)(twophaseDarcy_fc_pp_sd_het_matType<SimplePSK,ExponentialDensity,IdealGasDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_g)[0]), 2, ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rowptr)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_colind)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_matType)), __pyx_v_muw, __pyx_v_mun, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_omega)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Kbar)), __pyx_v_b, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_iwork_psk)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk_tol)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_w)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_n)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_g)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_x)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psic)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_sw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_mw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmw_dpsic)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_mn)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmn_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmn_dpsic)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi_psiw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi_psin)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi_psin_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi_psin_dpsic)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_aw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_daw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_daw_dpsic)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_an)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dan_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dan_dpsic))));
8099
8100 /* "cTwophaseDarcyCoefficients.pyx":894
8101 * <double*>(dan_dpsic.data))
8102 * elif density_n_flag == 2: #nonwetting IdealGas
8103 * if pskModelFlag == 0: # <<<<<<<<<<<<<<
8104 * tpdc.twophaseDarcy_fc_pp_sd_het_matType[SimplePSK,ExponentialDensity,IdealGasDensity](nSimplex,
8105 * nPointsPerSimplex,
8106*/
8107 break;
8108 case 1:
8109
8110 /* "cTwophaseDarcyCoefficients.pyx":935
8111 * <double*>(dan_dpsic.data))
8112 * elif pskModelFlag == 1:
8113 * tpdc.twophaseDarcy_fc_pp_sd_het_matType[VGM,ExponentialDensity,IdealGasDensity](nSimplex, # <<<<<<<<<<<<<<
8114 * nPointsPerSimplex,
8115 * g.shape[0],
8116*/
8117 (void)(twophaseDarcy_fc_pp_sd_het_matType<VGM,ExponentialDensity,IdealGasDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_g)[0]), 4, ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rowptr)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_colind)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_matType)), __pyx_v_muw, __pyx_v_mun, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_omega)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Kbar)), __pyx_v_b, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_iwork_psk)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk_tol)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_w)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_n)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_g)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_x)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psic)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_sw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_mw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmw_dpsic)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_mn)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmn_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmn_dpsic)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi_psiw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi_psin)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi_psin_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi_psin_dpsic)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_aw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_daw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_daw_dpsic)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_an)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dan_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dan_dpsic))));
8118
8119 /* "cTwophaseDarcyCoefficients.pyx":934
8120 * <double*>(dan_dpsiw.data),
8121 * <double*>(dan_dpsic.data))
8122 * elif pskModelFlag == 1: # <<<<<<<<<<<<<<
8123 * tpdc.twophaseDarcy_fc_pp_sd_het_matType[VGM,ExponentialDensity,IdealGasDensity](nSimplex,
8124 * nPointsPerSimplex,
8125*/
8126 break;
8127 default:
8128
8129 /* "cTwophaseDarcyCoefficients.pyx":975
8130 * <double*>(dan_dpsic.data))
8131 * else:
8132 * tpdc.twophaseDarcy_fc_pp_sd_het_matType[SimplePSK,ExponentialDensity,IdealGasDensity](nSimplex, # <<<<<<<<<<<<<<
8133 * nPointsPerSimplex,
8134 * g.shape[0],
8135*/
8136 (void)(twophaseDarcy_fc_pp_sd_het_matType<SimplePSK,ExponentialDensity,IdealGasDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_g)[0]), 2, ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rowptr)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_colind)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_matType)), __pyx_v_muw, __pyx_v_mun, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_omega)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Kbar)), __pyx_v_b, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_iwork_psk)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk_tol)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_w)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_n)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_g)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_x)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psic)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_sw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_mw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmw_dpsic)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_mn)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmn_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dmn_dpsic)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi_psiw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi_psin)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi_psin_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi_psin_dpsic)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_aw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_daw_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_daw_dpsic)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_an)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dan_dpsiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dan_dpsic))));
8137 break;
8138 }
8139
8140 /* "cTwophaseDarcyCoefficients.pyx":893
8141 * <double*>(dan_dpsiw.data),
8142 * <double*>(dan_dpsic.data))
8143 * elif density_n_flag == 2: #nonwetting IdealGas # <<<<<<<<<<<<<<
8144 * if pskModelFlag == 0:
8145 * tpdc.twophaseDarcy_fc_pp_sd_het_matType[SimplePSK,ExponentialDensity,IdealGasDensity](nSimplex,
8146*/
8147 break;
8148 default:
8149
8150 /* "cTwophaseDarcyCoefficients.pyx":1015
8151 * <double*>(dan_dpsic.data))
8152 * else:
8153 * assert False, "configuration density_w_flag= {0} and density_n_flag= {1} not found ".format(density_w_flag, density_n_flag) # <<<<<<<<<<<<<<
8154 *
8155 * def twophaseDarcy_incompressible_split_sd_pressure_het_matType(int pskModelFlag,
8156*/
8157 #ifndef CYTHON_WITHOUT_ASSERTIONS
8158 if (unlikely(__pyx_assertions_enabled())) {
8159 __pyx_t_4 = __pyx_mstate_global->__pyx_kp_u_configuration_density_w_flag_0_a;
8160 __Pyx_INCREF(__pyx_t_4);
8161 __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_density_w_flag); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1015, __pyx_L1_error)
8162 __Pyx_GOTREF(__pyx_t_5);
8163 __pyx_t_6 = __Pyx_PyLong_From_int(__pyx_v_density_n_flag); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1015, __pyx_L1_error)
8164 __Pyx_GOTREF(__pyx_t_6);
8165 __pyx_t_7 = 0;
8166 {
8167 PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_5, __pyx_t_6};
8168 __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
8169 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
8170 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8171 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
8172 if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1015, __pyx_L1_error)
8173 __Pyx_GOTREF(__pyx_t_3);
8174 }
8175 if (!(likely(PyUnicode_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_3))) __PYX_ERR(0, 1015, __pyx_L1_error)
8176 __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_3, 0, 0);
8177 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8178 __PYX_ERR(0, 1015, __pyx_L1_error)
8179 }
8180 #else
8181 if ((1)); else __PYX_ERR(0, 1015, __pyx_L1_error)
8182 #endif
8183 break;
8184 }
8185
8186 /* "cTwophaseDarcyCoefficients.pyx":724
8187 * assert False, "configuration density_w_flag= {0} and density_n_flag= {1} not found ".format(density_w_flag, density_n_flag)
8188 *
8189 * def twophaseDarcy_fc_pp_sd_het_matType(int pskModelFlag, # <<<<<<<<<<<<<<
8190 * int density_w_flag,
8191 * int density_n_flag,
8192*/
8193
8194 /* function exit code */
8195 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8196 goto __pyx_L0;
8197 __pyx_L1_error:;
8198 __Pyx_XDECREF(__pyx_t_3);
8199 __Pyx_XDECREF(__pyx_t_4);
8200 __Pyx_XDECREF(__pyx_t_5);
8201 __Pyx_XDECREF(__pyx_t_6);
8202 __Pyx_AddTraceback("cTwophaseDarcyCoefficients.twophaseDarcy_fc_pp_sd_het_matType", __pyx_clineno, __pyx_lineno, __pyx_filename);
8203 __pyx_r = NULL;
8204 __pyx_L0:;
8205
8206
8207 __Pyx_XGIVEREF(__pyx_r);
8208 __Pyx_RefNannyFinishContext();
8209 return __pyx_r;
8210}
8211
8212/* "cTwophaseDarcyCoefficients.pyx":1017
8213 * assert False, "configuration density_w_flag= {0} and density_n_flag= {1} not found ".format(density_w_flag, density_n_flag)
8214 *
8215 * def twophaseDarcy_incompressible_split_sd_pressure_het_matType(int pskModelFlag, # <<<<<<<<<<<<<<
8216 * np.ndarray rowptr,
8217 * np.ndarray colind,
8218*/
8219
8220/* Python wrapper */
8221static PyObject *__pyx_pw_26cTwophaseDarcyCoefficients_7twophaseDarcy_incompressible_split_sd_pressure_het_matType(PyObject *__pyx_self,
8222#if CYTHON_VECTORCALL
8223PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
8224#else
8225PyObject *__pyx_args, PyObject *__pyx_kwds
8226#endif
8227); /*proto*/
8228PyDoc_STRVAR(__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 ");
8229static PyMethodDef __pyx_mdef_26cTwophaseDarcyCoefficients_7twophaseDarcy_incompressible_split_sd_pressure_het_matType = {"twophaseDarcy_incompressible_split_sd_pressure_het_matType", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_26cTwophaseDarcyCoefficients_7twophaseDarcy_incompressible_split_sd_pressure_het_matType, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_26cTwophaseDarcyCoefficients_6twophaseDarcy_incompressible_split_sd_pressure_het_matType};
8230static PyObject *__pyx_pw_26cTwophaseDarcyCoefficients_7twophaseDarcy_incompressible_split_sd_pressure_het_matType(PyObject *__pyx_self,
8231#if CYTHON_VECTORCALL
8232PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
8233#else
8234PyObject *__pyx_args, PyObject *__pyx_kwds
8235#endif
8236) {
8237 int __pyx_v_pskModelFlag;
8238 PyArrayObject *__pyx_v_rowptr = 0;
8239 PyArrayObject *__pyx_v_colind = 0;
8240 PyArrayObject *__pyx_v_matType = 0;
8241 double __pyx_v_muw;
8242 double __pyx_v_mun;
8243 PyArrayObject *__pyx_v_omega = 0;
8244 PyArrayObject *__pyx_v_Kbar = 0;
8245 double __pyx_v_b;
8246 PyArrayObject *__pyx_v_capillaryDiffusionScaling = 0;
8247 PyArrayObject *__pyx_v_rwork_psk = 0;
8248 PyArrayObject *__pyx_v_iwork_psk = 0;
8249 PyArrayObject *__pyx_v_rwork_psk_tol = 0;
8250 PyArrayObject *__pyx_v_rwork_density_w = 0;
8251 PyArrayObject *__pyx_v_rwork_density_n = 0;
8252 PyArrayObject *__pyx_v_g = 0;
8253 PyArrayObject *__pyx_v_sw = 0;
8254 PyArrayObject *__pyx_v_grad_psic = 0;
8255 PyArrayObject *__pyx_v_f = 0;
8256 PyArrayObject *__pyx_v_a = 0;
8257 #if !CYTHON_VECTORCALL
8258 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
8259 #endif
8260 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
8261 PyObject* values[20] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
8262 int __pyx_lineno = 0;
8263 const char *__pyx_filename = NULL;
8264 int __pyx_clineno = 0;
8265 PyObject *__pyx_r = 0;
8266 __Pyx_RefNannyDeclarations
8267 __Pyx_RefNannySetupContext("twophaseDarcy_incompressible_split_sd_pressure_het_matType (wrapper)", 0);
8268 #if !CYTHON_VECTORCALL
8269 #if CYTHON_ASSUME_SAFE_SIZE
8270 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
8271 #else
8272 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
8273 #endif
8274 #endif
8275 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
8276 {
8277 PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pskModelFlag,&__pyx_mstate_global->__pyx_n_u_rowptr,&__pyx_mstate_global->__pyx_n_u_colind,&__pyx_mstate_global->__pyx_n_u_matType,&__pyx_mstate_global->__pyx_n_u_muw,&__pyx_mstate_global->__pyx_n_u_mun,&__pyx_mstate_global->__pyx_n_u_omega,&__pyx_mstate_global->__pyx_n_u_Kbar,&__pyx_mstate_global->__pyx_n_u_b,&__pyx_mstate_global->__pyx_n_u_capillaryDiffusionScaling,&__pyx_mstate_global->__pyx_n_u_rwork_psk,&__pyx_mstate_global->__pyx_n_u_iwork_psk,&__pyx_mstate_global->__pyx_n_u_rwork_psk_tol,&__pyx_mstate_global->__pyx_n_u_rwork_density_w,&__pyx_mstate_global->__pyx_n_u_rwork_density_n,&__pyx_mstate_global->__pyx_n_u_g,&__pyx_mstate_global->__pyx_n_u_sw,&__pyx_mstate_global->__pyx_n_u_grad_psic,&__pyx_mstate_global->__pyx_n_u_f,&__pyx_mstate_global->__pyx_n_u_a,0};
8278 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
8279 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1017, __pyx_L3_error)
8280 if (__pyx_kwds_len > 0) {
8281 switch (__pyx_nargs) {
8282 case 20:
8283 values[19] = __Pyx_ArgRef_FASTCALL(__pyx_args, 19);
8284 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[19])) __PYX_ERR(0, 1017, __pyx_L3_error)
8285 CYTHON_FALLTHROUGH;
8286 case 19:
8287 values[18] = __Pyx_ArgRef_FASTCALL(__pyx_args, 18);
8288 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[18])) __PYX_ERR(0, 1017, __pyx_L3_error)
8289 CYTHON_FALLTHROUGH;
8290 case 18:
8291 values[17] = __Pyx_ArgRef_FASTCALL(__pyx_args, 17);
8292 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[17])) __PYX_ERR(0, 1017, __pyx_L3_error)
8293 CYTHON_FALLTHROUGH;
8294 case 17:
8295 values[16] = __Pyx_ArgRef_FASTCALL(__pyx_args, 16);
8296 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[16])) __PYX_ERR(0, 1017, __pyx_L3_error)
8297 CYTHON_FALLTHROUGH;
8298 case 16:
8299 values[15] = __Pyx_ArgRef_FASTCALL(__pyx_args, 15);
8300 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[15])) __PYX_ERR(0, 1017, __pyx_L3_error)
8301 CYTHON_FALLTHROUGH;
8302 case 15:
8303 values[14] = __Pyx_ArgRef_FASTCALL(__pyx_args, 14);
8304 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[14])) __PYX_ERR(0, 1017, __pyx_L3_error)
8305 CYTHON_FALLTHROUGH;
8306 case 14:
8307 values[13] = __Pyx_ArgRef_FASTCALL(__pyx_args, 13);
8308 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[13])) __PYX_ERR(0, 1017, __pyx_L3_error)
8309 CYTHON_FALLTHROUGH;
8310 case 13:
8311 values[12] = __Pyx_ArgRef_FASTCALL(__pyx_args, 12);
8312 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[12])) __PYX_ERR(0, 1017, __pyx_L3_error)
8313 CYTHON_FALLTHROUGH;
8314 case 12:
8315 values[11] = __Pyx_ArgRef_FASTCALL(__pyx_args, 11);
8316 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[11])) __PYX_ERR(0, 1017, __pyx_L3_error)
8317 CYTHON_FALLTHROUGH;
8318 case 11:
8319 values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10);
8320 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 1017, __pyx_L3_error)
8321 CYTHON_FALLTHROUGH;
8322 case 10:
8323 values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
8324 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 1017, __pyx_L3_error)
8325 CYTHON_FALLTHROUGH;
8326 case 9:
8327 values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
8328 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 1017, __pyx_L3_error)
8329 CYTHON_FALLTHROUGH;
8330 case 8:
8331 values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
8332 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 1017, __pyx_L3_error)
8333 CYTHON_FALLTHROUGH;
8334 case 7:
8335 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
8336 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 1017, __pyx_L3_error)
8337 CYTHON_FALLTHROUGH;
8338 case 6:
8339 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
8340 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1017, __pyx_L3_error)
8341 CYTHON_FALLTHROUGH;
8342 case 5:
8343 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
8344 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1017, __pyx_L3_error)
8345 CYTHON_FALLTHROUGH;
8346 case 4:
8347 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
8348 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1017, __pyx_L3_error)
8349 CYTHON_FALLTHROUGH;
8350 case 3:
8351 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
8352 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1017, __pyx_L3_error)
8353 CYTHON_FALLTHROUGH;
8354 case 2:
8355 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
8356 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1017, __pyx_L3_error)
8357 CYTHON_FALLTHROUGH;
8358 case 1:
8359 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
8360 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1017, __pyx_L3_error)
8361 CYTHON_FALLTHROUGH;
8362 case 0: break;
8363 default: goto __pyx_L5_argtuple_error;
8364 }
8365 const Py_ssize_t kwd_pos_args = __pyx_nargs;
8366 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "twophaseDarcy_incompressible_split_sd_pressure_het_matType", 0) < (0)) __PYX_ERR(0, 1017, __pyx_L3_error)
8367 for (Py_ssize_t i = __pyx_nargs; i < 20; i++) {
8368 if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("twophaseDarcy_incompressible_split_sd_pressure_het_matType", 1, 20, 20, i); __PYX_ERR(0, 1017, __pyx_L3_error) }
8369 }
8370 } else if (unlikely(__pyx_nargs != 20)) {
8371 goto __pyx_L5_argtuple_error;
8372 } else {
8373 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
8374 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1017, __pyx_L3_error)
8375 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
8376 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1017, __pyx_L3_error)
8377 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
8378 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1017, __pyx_L3_error)
8379 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
8380 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1017, __pyx_L3_error)
8381 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
8382 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1017, __pyx_L3_error)
8383 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
8384 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1017, __pyx_L3_error)
8385 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
8386 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 1017, __pyx_L3_error)
8387 values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
8388 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 1017, __pyx_L3_error)
8389 values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
8390 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 1017, __pyx_L3_error)
8391 values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
8392 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 1017, __pyx_L3_error)
8393 values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10);
8394 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 1017, __pyx_L3_error)
8395 values[11] = __Pyx_ArgRef_FASTCALL(__pyx_args, 11);
8396 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[11])) __PYX_ERR(0, 1017, __pyx_L3_error)
8397 values[12] = __Pyx_ArgRef_FASTCALL(__pyx_args, 12);
8398 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[12])) __PYX_ERR(0, 1017, __pyx_L3_error)
8399 values[13] = __Pyx_ArgRef_FASTCALL(__pyx_args, 13);
8400 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[13])) __PYX_ERR(0, 1017, __pyx_L3_error)
8401 values[14] = __Pyx_ArgRef_FASTCALL(__pyx_args, 14);
8402 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[14])) __PYX_ERR(0, 1017, __pyx_L3_error)
8403 values[15] = __Pyx_ArgRef_FASTCALL(__pyx_args, 15);
8404 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[15])) __PYX_ERR(0, 1017, __pyx_L3_error)
8405 values[16] = __Pyx_ArgRef_FASTCALL(__pyx_args, 16);
8406 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[16])) __PYX_ERR(0, 1017, __pyx_L3_error)
8407 values[17] = __Pyx_ArgRef_FASTCALL(__pyx_args, 17);
8408 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[17])) __PYX_ERR(0, 1017, __pyx_L3_error)
8409 values[18] = __Pyx_ArgRef_FASTCALL(__pyx_args, 18);
8410 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[18])) __PYX_ERR(0, 1017, __pyx_L3_error)
8411 values[19] = __Pyx_ArgRef_FASTCALL(__pyx_args, 19);
8412 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[19])) __PYX_ERR(0, 1017, __pyx_L3_error)
8413 }
8414 __pyx_v_pskModelFlag = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_pskModelFlag == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1017, __pyx_L3_error)
8415 __pyx_v_rowptr = ((PyArrayObject *)values[1]);
8416 __pyx_v_colind = ((PyArrayObject *)values[2]);
8417 __pyx_v_matType = ((PyArrayObject *)values[3]);
8418 __pyx_v_muw = __Pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_muw == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1021, __pyx_L3_error)
8419 __pyx_v_mun = __Pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_mun == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1022, __pyx_L3_error)
8420 __pyx_v_omega = ((PyArrayObject *)values[6]);
8421 __pyx_v_Kbar = ((PyArrayObject *)values[7]);
8422 __pyx_v_b = __Pyx_PyFloat_AsDouble(values[8]); if (unlikely((__pyx_v_b == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1025, __pyx_L3_error)
8423 __pyx_v_capillaryDiffusionScaling = ((PyArrayObject *)values[9]);
8424 __pyx_v_rwork_psk = ((PyArrayObject *)values[10]);
8425 __pyx_v_iwork_psk = ((PyArrayObject *)values[11]);
8426 __pyx_v_rwork_psk_tol = ((PyArrayObject *)values[12]);
8427 __pyx_v_rwork_density_w = ((PyArrayObject *)values[13]);
8428 __pyx_v_rwork_density_n = ((PyArrayObject *)values[14]);
8429 __pyx_v_g = ((PyArrayObject *)values[15]);
8430 __pyx_v_sw = ((PyArrayObject *)values[16]);
8431 __pyx_v_grad_psic = ((PyArrayObject *)values[17]);
8432 __pyx_v_f = ((PyArrayObject *)values[18]);
8433 __pyx_v_a = ((PyArrayObject *)values[19]);
8434 }
8435 goto __pyx_L6_skip;
8436 __pyx_L5_argtuple_error:;
8437 __Pyx_RaiseArgtupleInvalid("twophaseDarcy_incompressible_split_sd_pressure_het_matType", 1, 20, 20, __pyx_nargs); __PYX_ERR(0, 1017, __pyx_L3_error)
8438 __pyx_L6_skip:;
8439 goto __pyx_L4_argument_unpacking_done;
8440 __pyx_L3_error:;
8441 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
8442 Py_XDECREF(values[__pyx_temp]);
8443 }
8444 __Pyx_AddTraceback("cTwophaseDarcyCoefficients.twophaseDarcy_incompressible_split_sd_pressure_het_matType", __pyx_clineno, __pyx_lineno, __pyx_filename);
8445 __Pyx_RefNannyFinishContext();
8446 return NULL;
8447 __pyx_L4_argument_unpacking_done:;
8448 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rowptr), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "rowptr", 0))) __PYX_ERR(0, 1018, __pyx_L1_error)
8449 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_colind), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "colind", 0))) __PYX_ERR(0, 1019, __pyx_L1_error)
8450 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_matType), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "matType", 0))) __PYX_ERR(0, 1020, __pyx_L1_error)
8451 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_omega), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "omega", 0))) __PYX_ERR(0, 1023, __pyx_L1_error)
8452 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Kbar), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "Kbar", 0))) __PYX_ERR(0, 1024, __pyx_L1_error)
8453 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_capillaryDiffusionScaling), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "capillaryDiffusionScaling", 0))) __PYX_ERR(0, 1026, __pyx_L1_error)
8454 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_psk), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "rwork_psk", 0))) __PYX_ERR(0, 1027, __pyx_L1_error)
8455 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork_psk), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "iwork_psk", 0))) __PYX_ERR(0, 1028, __pyx_L1_error)
8456 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_psk_tol), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "rwork_psk_tol", 0))) __PYX_ERR(0, 1029, __pyx_L1_error)
8457 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_density_w), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "rwork_density_w", 0))) __PYX_ERR(0, 1030, __pyx_L1_error)
8458 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_density_n), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "rwork_density_n", 0))) __PYX_ERR(0, 1031, __pyx_L1_error)
8459 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_g), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "g", 0))) __PYX_ERR(0, 1032, __pyx_L1_error)
8460 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "sw", 0))) __PYX_ERR(0, 1033, __pyx_L1_error)
8461 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_psic), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "grad_psic", 0))) __PYX_ERR(0, 1034, __pyx_L1_error)
8462 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_f), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "f", 0))) __PYX_ERR(0, 1035, __pyx_L1_error)
8463 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "a", 0))) __PYX_ERR(0, 1036, __pyx_L1_error)
8464 __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);
8465
8466 /* function exit code */
8467 goto __pyx_L0;
8468 __pyx_L1_error:;
8469 __pyx_r = NULL;
8470 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
8471 Py_XDECREF(values[__pyx_temp]);
8472 }
8473 goto __pyx_L7_cleaned_up;
8474 __pyx_L0:;
8475 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
8476 Py_XDECREF(values[__pyx_temp]);
8477 }
8478 __pyx_L7_cleaned_up:;
8479
8480
8481
8482
8483 __Pyx_RefNannyFinishContext();
8484 return __pyx_r;
8485}
8486
8487static 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) {
8488 int __pyx_v_nPointsPerSimplex;
8489 int __pyx_v_nSimplex;
8490 PyObject *__pyx_r = NULL;
8491 __Pyx_RefNannyDeclarations
8492 npy_intp __pyx_t_1;
8493 double __pyx_t_2;
8494 int __pyx_lineno = 0;
8495 const char *__pyx_filename = NULL;
8496 int __pyx_clineno = 0;
8497 __Pyx_RefNannySetupContext("twophaseDarcy_incompressible_split_sd_pressure_het_matType", 0);
8498
8499 /* "cTwophaseDarcyCoefficients.pyx":1043
8500 *
8501 * """
8502 * cdef int nPointsPerSimplex=sw.shape[sw.ndim-1] # <<<<<<<<<<<<<<
8503 * cdef int nSimplex=sw.size//nPointsPerSimplex
8504 * if pskModelFlag == 0:
8505*/
8506 __pyx_v_nPointsPerSimplex = (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_sw)[(__pyx_f_5numpy_7ndarray_4ndim___get__(__pyx_v_sw) - 1)]);
8507
8508 /* "cTwophaseDarcyCoefficients.pyx":1044
8509 * """
8510 * cdef int nPointsPerSimplex=sw.shape[sw.ndim-1]
8511 * cdef int nSimplex=sw.size//nPointsPerSimplex # <<<<<<<<<<<<<<
8512 * if pskModelFlag == 0:
8513 * tpdc.twophaseDarcy_incompressible_split_sd_pressure_het_matType[SimplePSK](nSimplex,
8514*/
8515 __pyx_t_1 = __pyx_f_5numpy_7ndarray_4size___get__(__pyx_v_sw);
8516
8517 if (unlikely(__pyx_v_nPointsPerSimplex == 0)) {
8518 PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
8519 __PYX_ERR(0, 1044, __pyx_L1_error)
8520 }
8521 else if (sizeof(npy_intp) == sizeof(long) && (!(((int)-1) > 0)) && unlikely(__pyx_v_nPointsPerSimplex == (int)-1) && unlikely(__Pyx_UNARY_NEG_WOULD_OVERFLOW(__pyx_t_1))) {
8522 PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
8523 __PYX_ERR(0, 1044, __pyx_L1_error)
8524 }
8525 __pyx_v_nSimplex = __Pyx_div_npy_intp(__pyx_t_1, __pyx_v_nPointsPerSimplex, 0);
8526
8527
8528 /* "cTwophaseDarcyCoefficients.pyx":1045
8529 * cdef int nPointsPerSimplex=sw.shape[sw.ndim-1]
8530 * cdef int nSimplex=sw.size//nPointsPerSimplex
8531 * if pskModelFlag == 0: # <<<<<<<<<<<<<<
8532 * tpdc.twophaseDarcy_incompressible_split_sd_pressure_het_matType[SimplePSK](nSimplex,
8533 * nPointsPerSimplex,
8534*/
8535 switch (__pyx_v_pskModelFlag) {
8536 case 0:
8537
8538 /* "cTwophaseDarcyCoefficients.pyx":1058
8539 * <double*>(Kbar.data),
8540 * b,
8541 * capillaryDiffusionScaling, # <<<<<<<<<<<<<<
8542 * <double*>(rwork_psk.data),
8543 * <int*>(iwork_psk.data),
8544*/
8545 __pyx_t_2 = __Pyx_PyFloat_AsDouble(((PyObject *)__pyx_v_capillaryDiffusionScaling)); if (unlikely((__pyx_t_2 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1058, __pyx_L1_error)
8546
8547 /* "cTwophaseDarcyCoefficients.pyx":1046
8548 * cdef int nSimplex=sw.size//nPointsPerSimplex
8549 * if pskModelFlag == 0:
8550 * tpdc.twophaseDarcy_incompressible_split_sd_pressure_het_matType[SimplePSK](nSimplex, # <<<<<<<<<<<<<<
8551 * nPointsPerSimplex,
8552 * g.shape[0],
8553*/
8554 (void)(twophaseDarcy_incompressible_split_sd_pressure_het_matType<SimplePSK>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_g)[0]), 2, ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rowptr)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_colind)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_matType)), __pyx_v_muw, __pyx_v_mun, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_omega)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Kbar)), __pyx_v_b, __pyx_t_2, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_iwork_psk)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk_tol)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_w)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_n)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_g)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_sw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_grad_psic)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_f)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_a))));
8555
8556
8557 /* "cTwophaseDarcyCoefficients.pyx":1045
8558 * cdef int nPointsPerSimplex=sw.shape[sw.ndim-1]
8559 * cdef int nSimplex=sw.size//nPointsPerSimplex
8560 * if pskModelFlag == 0: # <<<<<<<<<<<<<<
8561 * tpdc.twophaseDarcy_incompressible_split_sd_pressure_het_matType[SimplePSK](nSimplex,
8562 * nPointsPerSimplex,
8563*/
8564 break;
8565 case 1:
8566
8567 /* "cTwophaseDarcyCoefficients.pyx":1081
8568 * <double*>(Kbar.data),
8569 * b,
8570 * capillaryDiffusionScaling, # <<<<<<<<<<<<<<
8571 * <double*>(rwork_psk.data),
8572 * <int*>(iwork_psk.data),
8573*/
8574 __pyx_t_2 = __Pyx_PyFloat_AsDouble(((PyObject *)__pyx_v_capillaryDiffusionScaling)); if (unlikely((__pyx_t_2 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1081, __pyx_L1_error)
8575
8576 /* "cTwophaseDarcyCoefficients.pyx":1069
8577 * <double*>(a.data))
8578 * elif pskModelFlag == 1:
8579 * tpdc.twophaseDarcy_incompressible_split_sd_pressure_het_matType[VGM](nSimplex, # <<<<<<<<<<<<<<
8580 * nPointsPerSimplex,
8581 * g.shape[0],
8582*/
8583 (void)(twophaseDarcy_incompressible_split_sd_pressure_het_matType<VGM>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_g)[0]), 4, ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rowptr)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_colind)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_matType)), __pyx_v_muw, __pyx_v_mun, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_omega)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Kbar)), __pyx_v_b, __pyx_t_2, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_iwork_psk)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk_tol)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_w)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_n)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_g)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_sw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_grad_psic)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_f)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_a))));
8584
8585
8586 /* "cTwophaseDarcyCoefficients.pyx":1068
8587 * <double*>(f.data),
8588 * <double*>(a.data))
8589 * elif pskModelFlag == 1: # <<<<<<<<<<<<<<
8590 * tpdc.twophaseDarcy_incompressible_split_sd_pressure_het_matType[VGM](nSimplex,
8591 * nPointsPerSimplex,
8592*/
8593 break;
8594 default:
8595
8596 /* "cTwophaseDarcyCoefficients.pyx":1105
8597 * <double*>(Kbar.data),
8598 * b,
8599 * capillaryDiffusionScaling, # <<<<<<<<<<<<<<
8600 * <double*>(rwork_psk.data),
8601 * <int*>(iwork_psk.data),
8602*/
8603 __pyx_t_2 = __Pyx_PyFloat_AsDouble(((PyObject *)__pyx_v_capillaryDiffusionScaling)); if (unlikely((__pyx_t_2 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1105, __pyx_L1_error)
8604
8605 /* "cTwophaseDarcyCoefficients.pyx":1093
8606 * <double*>(a.data))
8607 * else:
8608 * tpdc.twophaseDarcy_incompressible_split_sd_pressure_het_matType[SimplePSK](nSimplex, # <<<<<<<<<<<<<<
8609 * nPointsPerSimplex,
8610 * g.shape[0],
8611*/
8612 (void)(twophaseDarcy_incompressible_split_sd_pressure_het_matType<SimplePSK>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_g)[0]), 2, ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rowptr)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_colind)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_matType)), __pyx_v_muw, __pyx_v_mun, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_omega)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Kbar)), __pyx_v_b, __pyx_t_2, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_iwork_psk)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk_tol)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_w)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_n)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_g)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_sw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_grad_psic)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_f)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_a))));
8613
8614 break;
8615 }
8616
8617 /* "cTwophaseDarcyCoefficients.pyx":1017
8618 * assert False, "configuration density_w_flag= {0} and density_n_flag= {1} not found ".format(density_w_flag, density_n_flag)
8619 *
8620 * def twophaseDarcy_incompressible_split_sd_pressure_het_matType(int pskModelFlag, # <<<<<<<<<<<<<<
8621 * np.ndarray rowptr,
8622 * np.ndarray colind,
8623*/
8624
8625 /* function exit code */
8626 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8627 goto __pyx_L0;
8628 __pyx_L1_error:;
8629 __Pyx_AddTraceback("cTwophaseDarcyCoefficients.twophaseDarcy_incompressible_split_sd_pressure_het_matType", __pyx_clineno, __pyx_lineno, __pyx_filename);
8630 __pyx_r = NULL;
8631 __pyx_L0:;
8632
8633
8634 __Pyx_XGIVEREF(__pyx_r);
8635 __Pyx_RefNannyFinishContext();
8636 return __pyx_r;
8637}
8638
8639/* "cTwophaseDarcyCoefficients.pyx":1117
8640 * <double*>(a.data))
8641 *
8642 * def twophaseDarcy_incompressible_split_sd_saturation_het_matType(int pskModelFlag, # <<<<<<<<<<<<<<
8643 * int density_w_flag,
8644 * int density_n_flag,
8645*/
8646
8647/* Python wrapper */
8648static PyObject *__pyx_pw_26cTwophaseDarcyCoefficients_9twophaseDarcy_incompressible_split_sd_saturation_het_matType(PyObject *__pyx_self,
8649#if CYTHON_VECTORCALL
8650PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
8651#else
8652PyObject *__pyx_args, PyObject *__pyx_kwds
8653#endif
8654); /*proto*/
8655PyDoc_STRVAR(__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 ");
8656static PyMethodDef __pyx_mdef_26cTwophaseDarcyCoefficients_9twophaseDarcy_incompressible_split_sd_saturation_het_matType = {"twophaseDarcy_incompressible_split_sd_saturation_het_matType", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_26cTwophaseDarcyCoefficients_9twophaseDarcy_incompressible_split_sd_saturation_het_matType, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_26cTwophaseDarcyCoefficients_8twophaseDarcy_incompressible_split_sd_saturation_het_matType};
8657static PyObject *__pyx_pw_26cTwophaseDarcyCoefficients_9twophaseDarcy_incompressible_split_sd_saturation_het_matType(PyObject *__pyx_self,
8658#if CYTHON_VECTORCALL
8659PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
8660#else
8661PyObject *__pyx_args, PyObject *__pyx_kwds
8662#endif
8663) {
8664 int __pyx_v_pskModelFlag;
8665 int __pyx_v_density_w_flag;
8666 CYTHON_UNUSED int __pyx_v_density_n_flag;
8667 PyArrayObject *__pyx_v_rowptr = 0;
8668 PyArrayObject *__pyx_v_colind = 0;
8669 PyArrayObject *__pyx_v_matType = 0;
8670 double __pyx_v_muw;
8671 double __pyx_v_mun;
8672 PyArrayObject *__pyx_v_omega = 0;
8673 PyArrayObject *__pyx_v_Kbar = 0;
8674 double __pyx_v_b;
8675 double __pyx_v_capillaryDiffusionScaling;
8676 double __pyx_v_advectionScaling;
8677 PyArrayObject *__pyx_v_rwork_psk = 0;
8678 PyArrayObject *__pyx_v_iwork_psk = 0;
8679 PyArrayObject *__pyx_v_rwork_psk_tol = 0;
8680 PyArrayObject *__pyx_v_rwork_density_w = 0;
8681 PyArrayObject *__pyx_v_rwork_density_n = 0;
8682 PyArrayObject *__pyx_v_g = 0;
8683 PyArrayObject *__pyx_v_qt = 0;
8684 PyArrayObject *__pyx_v_psiw = 0;
8685 PyArrayObject *__pyx_v_sw = 0;
8686 PyArrayObject *__pyx_v_m = 0;
8687 PyArrayObject *__pyx_v_dm = 0;
8688 PyArrayObject *__pyx_v_phi = 0;
8689 PyArrayObject *__pyx_v_dphi = 0;
8690 PyArrayObject *__pyx_v_f = 0;
8691 PyArrayObject *__pyx_v_df = 0;
8692 PyArrayObject *__pyx_v_a = 0;
8693 PyArrayObject *__pyx_v_da = 0;
8694 #if !CYTHON_VECTORCALL
8695 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
8696 #endif
8697 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
8698 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};
8699 int __pyx_lineno = 0;
8700 const char *__pyx_filename = NULL;
8701 int __pyx_clineno = 0;
8702 PyObject *__pyx_r = 0;
8703 __Pyx_RefNannyDeclarations
8704 __Pyx_RefNannySetupContext("twophaseDarcy_incompressible_split_sd_saturation_het_matType (wrapper)", 0);
8705 #if !CYTHON_VECTORCALL
8706 #if CYTHON_ASSUME_SAFE_SIZE
8707 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
8708 #else
8709 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
8710 #endif
8711 #endif
8712 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
8713 {
8714 PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pskModelFlag,&__pyx_mstate_global->__pyx_n_u_density_w_flag,&__pyx_mstate_global->__pyx_n_u_density_n_flag,&__pyx_mstate_global->__pyx_n_u_rowptr,&__pyx_mstate_global->__pyx_n_u_colind,&__pyx_mstate_global->__pyx_n_u_matType,&__pyx_mstate_global->__pyx_n_u_muw,&__pyx_mstate_global->__pyx_n_u_mun,&__pyx_mstate_global->__pyx_n_u_omega,&__pyx_mstate_global->__pyx_n_u_Kbar,&__pyx_mstate_global->__pyx_n_u_b,&__pyx_mstate_global->__pyx_n_u_capillaryDiffusionScaling,&__pyx_mstate_global->__pyx_n_u_advectionScaling,&__pyx_mstate_global->__pyx_n_u_rwork_psk,&__pyx_mstate_global->__pyx_n_u_iwork_psk,&__pyx_mstate_global->__pyx_n_u_rwork_psk_tol,&__pyx_mstate_global->__pyx_n_u_rwork_density_w,&__pyx_mstate_global->__pyx_n_u_rwork_density_n,&__pyx_mstate_global->__pyx_n_u_g,&__pyx_mstate_global->__pyx_n_u_qt,&__pyx_mstate_global->__pyx_n_u_psiw,&__pyx_mstate_global->__pyx_n_u_sw,&__pyx_mstate_global->__pyx_n_u_m,&__pyx_mstate_global->__pyx_n_u_dm,&__pyx_mstate_global->__pyx_n_u_phi,&__pyx_mstate_global->__pyx_n_u_dphi,&__pyx_mstate_global->__pyx_n_u_f,&__pyx_mstate_global->__pyx_n_u_df,&__pyx_mstate_global->__pyx_n_u_a,&__pyx_mstate_global->__pyx_n_u_da,0};
8715 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
8716 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1117, __pyx_L3_error)
8717 if (__pyx_kwds_len > 0) {
8718 switch (__pyx_nargs) {
8719 case 30:
8720 values[29] = __Pyx_ArgRef_FASTCALL(__pyx_args, 29);
8721 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[29])) __PYX_ERR(0, 1117, __pyx_L3_error)
8722 CYTHON_FALLTHROUGH;
8723 case 29:
8724 values[28] = __Pyx_ArgRef_FASTCALL(__pyx_args, 28);
8725 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[28])) __PYX_ERR(0, 1117, __pyx_L3_error)
8726 CYTHON_FALLTHROUGH;
8727 case 28:
8728 values[27] = __Pyx_ArgRef_FASTCALL(__pyx_args, 27);
8729 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[27])) __PYX_ERR(0, 1117, __pyx_L3_error)
8730 CYTHON_FALLTHROUGH;
8731 case 27:
8732 values[26] = __Pyx_ArgRef_FASTCALL(__pyx_args, 26);
8733 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[26])) __PYX_ERR(0, 1117, __pyx_L3_error)
8734 CYTHON_FALLTHROUGH;
8735 case 26:
8736 values[25] = __Pyx_ArgRef_FASTCALL(__pyx_args, 25);
8737 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[25])) __PYX_ERR(0, 1117, __pyx_L3_error)
8738 CYTHON_FALLTHROUGH;
8739 case 25:
8740 values[24] = __Pyx_ArgRef_FASTCALL(__pyx_args, 24);
8741 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[24])) __PYX_ERR(0, 1117, __pyx_L3_error)
8742 CYTHON_FALLTHROUGH;
8743 case 24:
8744 values[23] = __Pyx_ArgRef_FASTCALL(__pyx_args, 23);
8745 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[23])) __PYX_ERR(0, 1117, __pyx_L3_error)
8746 CYTHON_FALLTHROUGH;
8747 case 23:
8748 values[22] = __Pyx_ArgRef_FASTCALL(__pyx_args, 22);
8749 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[22])) __PYX_ERR(0, 1117, __pyx_L3_error)
8750 CYTHON_FALLTHROUGH;
8751 case 22:
8752 values[21] = __Pyx_ArgRef_FASTCALL(__pyx_args, 21);
8753 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[21])) __PYX_ERR(0, 1117, __pyx_L3_error)
8754 CYTHON_FALLTHROUGH;
8755 case 21:
8756 values[20] = __Pyx_ArgRef_FASTCALL(__pyx_args, 20);
8757 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[20])) __PYX_ERR(0, 1117, __pyx_L3_error)
8758 CYTHON_FALLTHROUGH;
8759 case 20:
8760 values[19] = __Pyx_ArgRef_FASTCALL(__pyx_args, 19);
8761 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[19])) __PYX_ERR(0, 1117, __pyx_L3_error)
8762 CYTHON_FALLTHROUGH;
8763 case 19:
8764 values[18] = __Pyx_ArgRef_FASTCALL(__pyx_args, 18);
8765 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[18])) __PYX_ERR(0, 1117, __pyx_L3_error)
8766 CYTHON_FALLTHROUGH;
8767 case 18:
8768 values[17] = __Pyx_ArgRef_FASTCALL(__pyx_args, 17);
8769 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[17])) __PYX_ERR(0, 1117, __pyx_L3_error)
8770 CYTHON_FALLTHROUGH;
8771 case 17:
8772 values[16] = __Pyx_ArgRef_FASTCALL(__pyx_args, 16);
8773 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[16])) __PYX_ERR(0, 1117, __pyx_L3_error)
8774 CYTHON_FALLTHROUGH;
8775 case 16:
8776 values[15] = __Pyx_ArgRef_FASTCALL(__pyx_args, 15);
8777 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[15])) __PYX_ERR(0, 1117, __pyx_L3_error)
8778 CYTHON_FALLTHROUGH;
8779 case 15:
8780 values[14] = __Pyx_ArgRef_FASTCALL(__pyx_args, 14);
8781 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[14])) __PYX_ERR(0, 1117, __pyx_L3_error)
8782 CYTHON_FALLTHROUGH;
8783 case 14:
8784 values[13] = __Pyx_ArgRef_FASTCALL(__pyx_args, 13);
8785 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[13])) __PYX_ERR(0, 1117, __pyx_L3_error)
8786 CYTHON_FALLTHROUGH;
8787 case 13:
8788 values[12] = __Pyx_ArgRef_FASTCALL(__pyx_args, 12);
8789 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[12])) __PYX_ERR(0, 1117, __pyx_L3_error)
8790 CYTHON_FALLTHROUGH;
8791 case 12:
8792 values[11] = __Pyx_ArgRef_FASTCALL(__pyx_args, 11);
8793 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[11])) __PYX_ERR(0, 1117, __pyx_L3_error)
8794 CYTHON_FALLTHROUGH;
8795 case 11:
8796 values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10);
8797 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 1117, __pyx_L3_error)
8798 CYTHON_FALLTHROUGH;
8799 case 10:
8800 values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
8801 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 1117, __pyx_L3_error)
8802 CYTHON_FALLTHROUGH;
8803 case 9:
8804 values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
8805 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 1117, __pyx_L3_error)
8806 CYTHON_FALLTHROUGH;
8807 case 8:
8808 values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
8809 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 1117, __pyx_L3_error)
8810 CYTHON_FALLTHROUGH;
8811 case 7:
8812 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
8813 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 1117, __pyx_L3_error)
8814 CYTHON_FALLTHROUGH;
8815 case 6:
8816 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
8817 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1117, __pyx_L3_error)
8818 CYTHON_FALLTHROUGH;
8819 case 5:
8820 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
8821 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1117, __pyx_L3_error)
8822 CYTHON_FALLTHROUGH;
8823 case 4:
8824 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
8825 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1117, __pyx_L3_error)
8826 CYTHON_FALLTHROUGH;
8827 case 3:
8828 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
8829 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1117, __pyx_L3_error)
8830 CYTHON_FALLTHROUGH;
8831 case 2:
8832 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
8833 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1117, __pyx_L3_error)
8834 CYTHON_FALLTHROUGH;
8835 case 1:
8836 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
8837 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1117, __pyx_L3_error)
8838 CYTHON_FALLTHROUGH;
8839 case 0: break;
8840 default: goto __pyx_L5_argtuple_error;
8841 }
8842 const Py_ssize_t kwd_pos_args = __pyx_nargs;
8843 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "twophaseDarcy_incompressible_split_sd_saturation_het_matType", 0) < (0)) __PYX_ERR(0, 1117, __pyx_L3_error)
8844 for (Py_ssize_t i = __pyx_nargs; i < 30; i++) {
8845 if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("twophaseDarcy_incompressible_split_sd_saturation_het_matType", 1, 30, 30, i); __PYX_ERR(0, 1117, __pyx_L3_error) }
8846 }
8847 } else if (unlikely(__pyx_nargs != 30)) {
8848 goto __pyx_L5_argtuple_error;
8849 } else {
8850 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
8851 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1117, __pyx_L3_error)
8852 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
8853 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1117, __pyx_L3_error)
8854 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
8855 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1117, __pyx_L3_error)
8856 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
8857 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1117, __pyx_L3_error)
8858 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
8859 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1117, __pyx_L3_error)
8860 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
8861 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1117, __pyx_L3_error)
8862 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
8863 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 1117, __pyx_L3_error)
8864 values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
8865 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 1117, __pyx_L3_error)
8866 values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
8867 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 1117, __pyx_L3_error)
8868 values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
8869 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 1117, __pyx_L3_error)
8870 values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10);
8871 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 1117, __pyx_L3_error)
8872 values[11] = __Pyx_ArgRef_FASTCALL(__pyx_args, 11);
8873 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[11])) __PYX_ERR(0, 1117, __pyx_L3_error)
8874 values[12] = __Pyx_ArgRef_FASTCALL(__pyx_args, 12);
8875 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[12])) __PYX_ERR(0, 1117, __pyx_L3_error)
8876 values[13] = __Pyx_ArgRef_FASTCALL(__pyx_args, 13);
8877 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[13])) __PYX_ERR(0, 1117, __pyx_L3_error)
8878 values[14] = __Pyx_ArgRef_FASTCALL(__pyx_args, 14);
8879 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[14])) __PYX_ERR(0, 1117, __pyx_L3_error)
8880 values[15] = __Pyx_ArgRef_FASTCALL(__pyx_args, 15);
8881 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[15])) __PYX_ERR(0, 1117, __pyx_L3_error)
8882 values[16] = __Pyx_ArgRef_FASTCALL(__pyx_args, 16);
8883 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[16])) __PYX_ERR(0, 1117, __pyx_L3_error)
8884 values[17] = __Pyx_ArgRef_FASTCALL(__pyx_args, 17);
8885 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[17])) __PYX_ERR(0, 1117, __pyx_L3_error)
8886 values[18] = __Pyx_ArgRef_FASTCALL(__pyx_args, 18);
8887 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[18])) __PYX_ERR(0, 1117, __pyx_L3_error)
8888 values[19] = __Pyx_ArgRef_FASTCALL(__pyx_args, 19);
8889 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[19])) __PYX_ERR(0, 1117, __pyx_L3_error)
8890 values[20] = __Pyx_ArgRef_FASTCALL(__pyx_args, 20);
8891 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[20])) __PYX_ERR(0, 1117, __pyx_L3_error)
8892 values[21] = __Pyx_ArgRef_FASTCALL(__pyx_args, 21);
8893 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[21])) __PYX_ERR(0, 1117, __pyx_L3_error)
8894 values[22] = __Pyx_ArgRef_FASTCALL(__pyx_args, 22);
8895 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[22])) __PYX_ERR(0, 1117, __pyx_L3_error)
8896 values[23] = __Pyx_ArgRef_FASTCALL(__pyx_args, 23);
8897 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[23])) __PYX_ERR(0, 1117, __pyx_L3_error)
8898 values[24] = __Pyx_ArgRef_FASTCALL(__pyx_args, 24);
8899 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[24])) __PYX_ERR(0, 1117, __pyx_L3_error)
8900 values[25] = __Pyx_ArgRef_FASTCALL(__pyx_args, 25);
8901 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[25])) __PYX_ERR(0, 1117, __pyx_L3_error)
8902 values[26] = __Pyx_ArgRef_FASTCALL(__pyx_args, 26);
8903 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[26])) __PYX_ERR(0, 1117, __pyx_L3_error)
8904 values[27] = __Pyx_ArgRef_FASTCALL(__pyx_args, 27);
8905 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[27])) __PYX_ERR(0, 1117, __pyx_L3_error)
8906 values[28] = __Pyx_ArgRef_FASTCALL(__pyx_args, 28);
8907 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[28])) __PYX_ERR(0, 1117, __pyx_L3_error)
8908 values[29] = __Pyx_ArgRef_FASTCALL(__pyx_args, 29);
8909 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[29])) __PYX_ERR(0, 1117, __pyx_L3_error)
8910 }
8911 __pyx_v_pskModelFlag = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_pskModelFlag == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1117, __pyx_L3_error)
8912 __pyx_v_density_w_flag = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_density_w_flag == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1118, __pyx_L3_error)
8913 __pyx_v_density_n_flag = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_density_n_flag == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1119, __pyx_L3_error)
8914 __pyx_v_rowptr = ((PyArrayObject *)values[3]);
8915 __pyx_v_colind = ((PyArrayObject *)values[4]);
8916 __pyx_v_matType = ((PyArrayObject *)values[5]);
8917 __pyx_v_muw = __Pyx_PyFloat_AsDouble(values[6]); if (unlikely((__pyx_v_muw == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1123, __pyx_L3_error)
8918 __pyx_v_mun = __Pyx_PyFloat_AsDouble(values[7]); if (unlikely((__pyx_v_mun == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1124, __pyx_L3_error)
8919 __pyx_v_omega = ((PyArrayObject *)values[8]);
8920 __pyx_v_Kbar = ((PyArrayObject *)values[9]);
8921 __pyx_v_b = __Pyx_PyFloat_AsDouble(values[10]); if (unlikely((__pyx_v_b == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1127, __pyx_L3_error)
8922 __pyx_v_capillaryDiffusionScaling = __Pyx_PyFloat_AsDouble(values[11]); if (unlikely((__pyx_v_capillaryDiffusionScaling == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1128, __pyx_L3_error)
8923 __pyx_v_advectionScaling = __Pyx_PyFloat_AsDouble(values[12]); if (unlikely((__pyx_v_advectionScaling == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1129, __pyx_L3_error)
8924 __pyx_v_rwork_psk = ((PyArrayObject *)values[13]);
8925 __pyx_v_iwork_psk = ((PyArrayObject *)values[14]);
8926 __pyx_v_rwork_psk_tol = ((PyArrayObject *)values[15]);
8927 __pyx_v_rwork_density_w = ((PyArrayObject *)values[16]);
8928 __pyx_v_rwork_density_n = ((PyArrayObject *)values[17]);
8929 __pyx_v_g = ((PyArrayObject *)values[18]);
8930 __pyx_v_qt = ((PyArrayObject *)values[19]);
8931 __pyx_v_psiw = ((PyArrayObject *)values[20]);
8932 __pyx_v_sw = ((PyArrayObject *)values[21]);
8933 __pyx_v_m = ((PyArrayObject *)values[22]);
8934 __pyx_v_dm = ((PyArrayObject *)values[23]);
8935 __pyx_v_phi = ((PyArrayObject *)values[24]);
8936 __pyx_v_dphi = ((PyArrayObject *)values[25]);
8937 __pyx_v_f = ((PyArrayObject *)values[26]);
8938 __pyx_v_df = ((PyArrayObject *)values[27]);
8939 __pyx_v_a = ((PyArrayObject *)values[28]);
8940 __pyx_v_da = ((PyArrayObject *)values[29]);
8941 }
8942 goto __pyx_L6_skip;
8943 __pyx_L5_argtuple_error:;
8944 __Pyx_RaiseArgtupleInvalid("twophaseDarcy_incompressible_split_sd_saturation_het_matType", 1, 30, 30, __pyx_nargs); __PYX_ERR(0, 1117, __pyx_L3_error)
8945 __pyx_L6_skip:;
8946 goto __pyx_L4_argument_unpacking_done;
8947 __pyx_L3_error:;
8948 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
8949 Py_XDECREF(values[__pyx_temp]);
8950 }
8951 __Pyx_AddTraceback("cTwophaseDarcyCoefficients.twophaseDarcy_incompressible_split_sd_saturation_het_matType", __pyx_clineno, __pyx_lineno, __pyx_filename);
8952 __Pyx_RefNannyFinishContext();
8953 return NULL;
8954 __pyx_L4_argument_unpacking_done:;
8955 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rowptr), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "rowptr", 0))) __PYX_ERR(0, 1120, __pyx_L1_error)
8956 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_colind), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "colind", 0))) __PYX_ERR(0, 1121, __pyx_L1_error)
8957 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_matType), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "matType", 0))) __PYX_ERR(0, 1122, __pyx_L1_error)
8958 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_omega), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "omega", 0))) __PYX_ERR(0, 1125, __pyx_L1_error)
8959 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Kbar), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "Kbar", 0))) __PYX_ERR(0, 1126, __pyx_L1_error)
8960 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_psk), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "rwork_psk", 0))) __PYX_ERR(0, 1130, __pyx_L1_error)
8961 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork_psk), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "iwork_psk", 0))) __PYX_ERR(0, 1131, __pyx_L1_error)
8962 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_psk_tol), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "rwork_psk_tol", 0))) __PYX_ERR(0, 1132, __pyx_L1_error)
8963 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_density_w), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "rwork_density_w", 0))) __PYX_ERR(0, 1133, __pyx_L1_error)
8964 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_density_n), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "rwork_density_n", 0))) __PYX_ERR(0, 1134, __pyx_L1_error)
8965 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_g), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "g", 0))) __PYX_ERR(0, 1135, __pyx_L1_error)
8966 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_qt), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "qt", 0))) __PYX_ERR(0, 1136, __pyx_L1_error)
8967 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_psiw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "psiw", 0))) __PYX_ERR(0, 1137, __pyx_L1_error)
8968 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "sw", 0))) __PYX_ERR(0, 1138, __pyx_L1_error)
8969 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_m), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "m", 0))) __PYX_ERR(0, 1139, __pyx_L1_error)
8970 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dm), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "dm", 0))) __PYX_ERR(0, 1140, __pyx_L1_error)
8971 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_phi), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "phi", 0))) __PYX_ERR(0, 1141, __pyx_L1_error)
8972 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dphi), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "dphi", 0))) __PYX_ERR(0, 1142, __pyx_L1_error)
8973 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_f), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "f", 0))) __PYX_ERR(0, 1143, __pyx_L1_error)
8974 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_df), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "df", 0))) __PYX_ERR(0, 1144, __pyx_L1_error)
8975 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "a", 0))) __PYX_ERR(0, 1145, __pyx_L1_error)
8976 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_da), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "da", 0))) __PYX_ERR(0, 1146, __pyx_L1_error)
8977 __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);
8978
8979 /* function exit code */
8980 goto __pyx_L0;
8981 __pyx_L1_error:;
8982 __pyx_r = NULL;
8983 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
8984 Py_XDECREF(values[__pyx_temp]);
8985 }
8986 goto __pyx_L7_cleaned_up;
8987 __pyx_L0:;
8988 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
8989 Py_XDECREF(values[__pyx_temp]);
8990 }
8991 __pyx_L7_cleaned_up:;
8992
8993
8994
8995
8996
8997
8998
8999
9000 __Pyx_RefNannyFinishContext();
9001 return __pyx_r;
9002}
9003
9004static 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) {
9005 int __pyx_v_nPointsPerSimplex;
9006 int __pyx_v_nSimplex;
9007 PyObject *__pyx_r = NULL;
9008 __Pyx_RefNannyDeclarations
9009 npy_intp __pyx_t_1;
9010 int __pyx_t_2;
9011 int __pyx_lineno = 0;
9012 const char *__pyx_filename = NULL;
9013 int __pyx_clineno = 0;
9014 __Pyx_RefNannySetupContext("twophaseDarcy_incompressible_split_sd_saturation_het_matType", 0);
9015
9016 /* "cTwophaseDarcyCoefficients.pyx":1152
9017 * Darcy flow for a heterogeneous medium, sparse diffusion rep het
9018 * """
9019 * cdef int nPointsPerSimplex=sw.shape[sw.ndim-1] # <<<<<<<<<<<<<<
9020 * cdef int nSimplex=sw.size//nPointsPerSimplex
9021 * #while debugging allow only one option
9022*/
9023 __pyx_v_nPointsPerSimplex = (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_sw)[(__pyx_f_5numpy_7ndarray_4ndim___get__(__pyx_v_sw) - 1)]);
9024
9025 /* "cTwophaseDarcyCoefficients.pyx":1153
9026 * """
9027 * cdef int nPointsPerSimplex=sw.shape[sw.ndim-1]
9028 * cdef int nSimplex=sw.size//nPointsPerSimplex # <<<<<<<<<<<<<<
9029 * #while debugging allow only one option
9030 * #exponential for wetting phase
9031*/
9032 __pyx_t_1 = __pyx_f_5numpy_7ndarray_4size___get__(__pyx_v_sw);
9033
9034 if (unlikely(__pyx_v_nPointsPerSimplex == 0)) {
9035 PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
9036 __PYX_ERR(0, 1153, __pyx_L1_error)
9037 }
9038 else if (sizeof(npy_intp) == sizeof(long) && (!(((int)-1) > 0)) && unlikely(__pyx_v_nPointsPerSimplex == (int)-1) && unlikely(__Pyx_UNARY_NEG_WOULD_OVERFLOW(__pyx_t_1))) {
9039 PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
9040 __PYX_ERR(0, 1153, __pyx_L1_error)
9041 }
9042 __pyx_v_nSimplex = __Pyx_div_npy_intp(__pyx_t_1, __pyx_v_nPointsPerSimplex, 0);
9043
9044
9045 /* "cTwophaseDarcyCoefficients.pyx":1156
9046 * #while debugging allow only one option
9047 * #exponential for wetting phase
9048 * assert density_w_flag == 1 # <<<<<<<<<<<<<<
9049 * #for slight compressible, non-wetting phase density psk doesn't matter
9050 * if pskModelFlag == 0:
9051*/
9052 #ifndef CYTHON_WITHOUT_ASSERTIONS
9053 if (unlikely(__pyx_assertions_enabled())) {
9054 __pyx_t_2 = (__pyx_v_density_w_flag == 1);
9055
9056 if (unlikely(!__pyx_t_2)) {
9057 __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
9058 __PYX_ERR(0, 1156, __pyx_L1_error)
9059 }
9060
9061 }
9062 #else
9063 if ((1)); else __PYX_ERR(0, 1156, __pyx_L1_error)
9064 #endif
9065
9066 /* "cTwophaseDarcyCoefficients.pyx":1158
9067 * assert density_w_flag == 1
9068 * #for slight compressible, non-wetting phase density psk doesn't matter
9069 * if pskModelFlag == 0: # <<<<<<<<<<<<<<
9070 * tpdc.twophaseDarcy_slightCompressible_split_sd_saturation_het_matType[SimplePSK,ExponentialDensity](nSimplex,
9071 * nPointsPerSimplex,
9072*/
9073 switch (__pyx_v_pskModelFlag) {
9074 case 0:
9075
9076 /* "cTwophaseDarcyCoefficients.pyx":1159
9077 * #for slight compressible, non-wetting phase density psk doesn't matter
9078 * if pskModelFlag == 0:
9079 * tpdc.twophaseDarcy_slightCompressible_split_sd_saturation_het_matType[SimplePSK,ExponentialDensity](nSimplex, # <<<<<<<<<<<<<<
9080 * nPointsPerSimplex,
9081 * g.shape[0],
9082*/
9083 (void)(twophaseDarcy_slightCompressible_split_sd_saturation_het_matType<SimplePSK,ExponentialDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_g)[0]), 2, ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rowptr)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_colind)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_matType)), __pyx_v_muw, __pyx_v_mun, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_omega)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Kbar)), __pyx_v_b, __pyx_v_capillaryDiffusionScaling, __pyx_v_advectionScaling, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_iwork_psk)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk_tol)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_w)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_n)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_g)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_qt)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_sw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_m)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dm)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_f)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_df)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_a)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_da))));
9084
9085 /* "cTwophaseDarcyCoefficients.pyx":1158
9086 * assert density_w_flag == 1
9087 * #for slight compressible, non-wetting phase density psk doesn't matter
9088 * if pskModelFlag == 0: # <<<<<<<<<<<<<<
9089 * tpdc.twophaseDarcy_slightCompressible_split_sd_saturation_het_matType[SimplePSK,ExponentialDensity](nSimplex,
9090 * nPointsPerSimplex,
9091*/
9092 break;
9093 case 1:
9094
9095 /* "cTwophaseDarcyCoefficients.pyx":1190
9096 * <double*>(da.data))
9097 * elif pskModelFlag == 1:
9098 * tpdc.twophaseDarcy_slightCompressible_split_sd_saturation_het_matType[VGM,ExponentialDensity](nSimplex, # <<<<<<<<<<<<<<
9099 * nPointsPerSimplex,
9100 * g.shape[0],
9101*/
9102 (void)(twophaseDarcy_slightCompressible_split_sd_saturation_het_matType<VGM,ExponentialDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_g)[0]), 4, ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rowptr)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_colind)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_matType)), __pyx_v_muw, __pyx_v_mun, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_omega)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Kbar)), __pyx_v_b, __pyx_v_capillaryDiffusionScaling, __pyx_v_advectionScaling, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_iwork_psk)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk_tol)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_w)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_n)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_g)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_qt)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_sw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_m)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dm)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_f)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_df)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_a)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_da))));
9103
9104 /* "cTwophaseDarcyCoefficients.pyx":1189
9105 * <double*>(a.data),
9106 * <double*>(da.data))
9107 * elif pskModelFlag == 1: # <<<<<<<<<<<<<<
9108 * tpdc.twophaseDarcy_slightCompressible_split_sd_saturation_het_matType[VGM,ExponentialDensity](nSimplex,
9109 * nPointsPerSimplex,
9110*/
9111 break;
9112 default:
9113
9114 /* "cTwophaseDarcyCoefficients.pyx":1222
9115 * <double*>(da.data))
9116 * else:
9117 * tpdc.twophaseDarcy_slightCompressible_split_sd_saturation_het_matType[VGM,ExponentialDensity](nSimplex, # <<<<<<<<<<<<<<
9118 * nPointsPerSimplex,
9119 * g.shape[0],
9120*/
9121 (void)(twophaseDarcy_slightCompressible_split_sd_saturation_het_matType<VGM,ExponentialDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_g)[0]), 4, ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rowptr)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_colind)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_matType)), __pyx_v_muw, __pyx_v_mun, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_omega)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Kbar)), __pyx_v_b, __pyx_v_capillaryDiffusionScaling, __pyx_v_advectionScaling, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_iwork_psk)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk_tol)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_w)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_n)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_g)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_qt)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_sw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_m)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dm)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_f)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_df)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_a)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_da))));
9122 break;
9123 }
9124
9125 /* "cTwophaseDarcyCoefficients.pyx":1117
9126 * <double*>(a.data))
9127 *
9128 * def twophaseDarcy_incompressible_split_sd_saturation_het_matType(int pskModelFlag, # <<<<<<<<<<<<<<
9129 * int density_w_flag,
9130 * int density_n_flag,
9131*/
9132
9133 /* function exit code */
9134 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9135 goto __pyx_L0;
9136 __pyx_L1_error:;
9137 __Pyx_AddTraceback("cTwophaseDarcyCoefficients.twophaseDarcy_incompressible_split_sd_saturation_het_matType", __pyx_clineno, __pyx_lineno, __pyx_filename);
9138 __pyx_r = NULL;
9139 __pyx_L0:;
9140
9141
9142 __Pyx_XGIVEREF(__pyx_r);
9143 __Pyx_RefNannyFinishContext();
9144 return __pyx_r;
9145}
9146
9147/* "cTwophaseDarcyCoefficients.pyx":1254
9148 * <double*>(da.data))
9149 *
9150 * def twophaseDarcy_slightCompressible_split_sd_pressure_het_matType(int pskModelFlag, # <<<<<<<<<<<<<<
9151 * int density_w_flag,
9152 * int density_n_flag,
9153*/
9154
9155/* Python wrapper */
9156static PyObject *__pyx_pw_26cTwophaseDarcyCoefficients_11twophaseDarcy_slightCompressible_split_sd_pressure_het_matType(PyObject *__pyx_self,
9157#if CYTHON_VECTORCALL
9158PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
9159#else
9160PyObject *__pyx_args, PyObject *__pyx_kwds
9161#endif
9162); /*proto*/
9163PyDoc_STRVAR(__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 ");
9164static PyMethodDef __pyx_mdef_26cTwophaseDarcyCoefficients_11twophaseDarcy_slightCompressible_split_sd_pressure_het_matType = {"twophaseDarcy_slightCompressible_split_sd_pressure_het_matType", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_26cTwophaseDarcyCoefficients_11twophaseDarcy_slightCompressible_split_sd_pressure_het_matType, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_26cTwophaseDarcyCoefficients_10twophaseDarcy_slightCompressible_split_sd_pressure_het_matType};
9165static PyObject *__pyx_pw_26cTwophaseDarcyCoefficients_11twophaseDarcy_slightCompressible_split_sd_pressure_het_matType(PyObject *__pyx_self,
9166#if CYTHON_VECTORCALL
9167PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
9168#else
9169PyObject *__pyx_args, PyObject *__pyx_kwds
9170#endif
9171) {
9172 int __pyx_v_pskModelFlag;
9173 int __pyx_v_density_w_flag;
9174 CYTHON_UNUSED int __pyx_v_density_n_flag;
9175 PyArrayObject *__pyx_v_rowptr = 0;
9176 PyArrayObject *__pyx_v_colind = 0;
9177 PyArrayObject *__pyx_v_matType = 0;
9178 double __pyx_v_muw;
9179 double __pyx_v_mun;
9180 PyArrayObject *__pyx_v_omega = 0;
9181 PyArrayObject *__pyx_v_Kbar = 0;
9182 double __pyx_v_b;
9183 double __pyx_v_capillaryDiffusionScaling;
9184 double __pyx_v_advectionScaling;
9185 PyArrayObject *__pyx_v_rwork_psk = 0;
9186 PyArrayObject *__pyx_v_iwork_psk = 0;
9187 PyArrayObject *__pyx_v_rwork_psk_tol = 0;
9188 PyArrayObject *__pyx_v_rwork_density_w = 0;
9189 PyArrayObject *__pyx_v_rwork_density_n = 0;
9190 PyArrayObject *__pyx_v_g = 0;
9191 PyArrayObject *__pyx_v_qt = 0;
9192 PyArrayObject *__pyx_v_psiw = 0;
9193 PyArrayObject *__pyx_v_sw = 0;
9194 PyArrayObject *__pyx_v_m = 0;
9195 PyArrayObject *__pyx_v_dm = 0;
9196 PyArrayObject *__pyx_v_phi = 0;
9197 PyArrayObject *__pyx_v_dphi = 0;
9198 PyArrayObject *__pyx_v_f = 0;
9199 PyArrayObject *__pyx_v_df = 0;
9200 PyArrayObject *__pyx_v_a = 0;
9201 PyArrayObject *__pyx_v_da = 0;
9202 #if !CYTHON_VECTORCALL
9203 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
9204 #endif
9205 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
9206 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};
9207 int __pyx_lineno = 0;
9208 const char *__pyx_filename = NULL;
9209 int __pyx_clineno = 0;
9210 PyObject *__pyx_r = 0;
9211 __Pyx_RefNannyDeclarations
9212 __Pyx_RefNannySetupContext("twophaseDarcy_slightCompressible_split_sd_pressure_het_matType (wrapper)", 0);
9213 #if !CYTHON_VECTORCALL
9214 #if CYTHON_ASSUME_SAFE_SIZE
9215 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
9216 #else
9217 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
9218 #endif
9219 #endif
9220 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
9221 {
9222 PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pskModelFlag,&__pyx_mstate_global->__pyx_n_u_density_w_flag,&__pyx_mstate_global->__pyx_n_u_density_n_flag,&__pyx_mstate_global->__pyx_n_u_rowptr,&__pyx_mstate_global->__pyx_n_u_colind,&__pyx_mstate_global->__pyx_n_u_matType,&__pyx_mstate_global->__pyx_n_u_muw,&__pyx_mstate_global->__pyx_n_u_mun,&__pyx_mstate_global->__pyx_n_u_omega,&__pyx_mstate_global->__pyx_n_u_Kbar,&__pyx_mstate_global->__pyx_n_u_b,&__pyx_mstate_global->__pyx_n_u_capillaryDiffusionScaling,&__pyx_mstate_global->__pyx_n_u_advectionScaling,&__pyx_mstate_global->__pyx_n_u_rwork_psk,&__pyx_mstate_global->__pyx_n_u_iwork_psk,&__pyx_mstate_global->__pyx_n_u_rwork_psk_tol,&__pyx_mstate_global->__pyx_n_u_rwork_density_w,&__pyx_mstate_global->__pyx_n_u_rwork_density_n,&__pyx_mstate_global->__pyx_n_u_g,&__pyx_mstate_global->__pyx_n_u_qt,&__pyx_mstate_global->__pyx_n_u_psiw,&__pyx_mstate_global->__pyx_n_u_sw,&__pyx_mstate_global->__pyx_n_u_m,&__pyx_mstate_global->__pyx_n_u_dm,&__pyx_mstate_global->__pyx_n_u_phi,&__pyx_mstate_global->__pyx_n_u_dphi,&__pyx_mstate_global->__pyx_n_u_f,&__pyx_mstate_global->__pyx_n_u_df,&__pyx_mstate_global->__pyx_n_u_a,&__pyx_mstate_global->__pyx_n_u_da,0};
9223 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
9224 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1254, __pyx_L3_error)
9225 if (__pyx_kwds_len > 0) {
9226 switch (__pyx_nargs) {
9227 case 30:
9228 values[29] = __Pyx_ArgRef_FASTCALL(__pyx_args, 29);
9229 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[29])) __PYX_ERR(0, 1254, __pyx_L3_error)
9230 CYTHON_FALLTHROUGH;
9231 case 29:
9232 values[28] = __Pyx_ArgRef_FASTCALL(__pyx_args, 28);
9233 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[28])) __PYX_ERR(0, 1254, __pyx_L3_error)
9234 CYTHON_FALLTHROUGH;
9235 case 28:
9236 values[27] = __Pyx_ArgRef_FASTCALL(__pyx_args, 27);
9237 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[27])) __PYX_ERR(0, 1254, __pyx_L3_error)
9238 CYTHON_FALLTHROUGH;
9239 case 27:
9240 values[26] = __Pyx_ArgRef_FASTCALL(__pyx_args, 26);
9241 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[26])) __PYX_ERR(0, 1254, __pyx_L3_error)
9242 CYTHON_FALLTHROUGH;
9243 case 26:
9244 values[25] = __Pyx_ArgRef_FASTCALL(__pyx_args, 25);
9245 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[25])) __PYX_ERR(0, 1254, __pyx_L3_error)
9246 CYTHON_FALLTHROUGH;
9247 case 25:
9248 values[24] = __Pyx_ArgRef_FASTCALL(__pyx_args, 24);
9249 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[24])) __PYX_ERR(0, 1254, __pyx_L3_error)
9250 CYTHON_FALLTHROUGH;
9251 case 24:
9252 values[23] = __Pyx_ArgRef_FASTCALL(__pyx_args, 23);
9253 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[23])) __PYX_ERR(0, 1254, __pyx_L3_error)
9254 CYTHON_FALLTHROUGH;
9255 case 23:
9256 values[22] = __Pyx_ArgRef_FASTCALL(__pyx_args, 22);
9257 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[22])) __PYX_ERR(0, 1254, __pyx_L3_error)
9258 CYTHON_FALLTHROUGH;
9259 case 22:
9260 values[21] = __Pyx_ArgRef_FASTCALL(__pyx_args, 21);
9261 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[21])) __PYX_ERR(0, 1254, __pyx_L3_error)
9262 CYTHON_FALLTHROUGH;
9263 case 21:
9264 values[20] = __Pyx_ArgRef_FASTCALL(__pyx_args, 20);
9265 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[20])) __PYX_ERR(0, 1254, __pyx_L3_error)
9266 CYTHON_FALLTHROUGH;
9267 case 20:
9268 values[19] = __Pyx_ArgRef_FASTCALL(__pyx_args, 19);
9269 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[19])) __PYX_ERR(0, 1254, __pyx_L3_error)
9270 CYTHON_FALLTHROUGH;
9271 case 19:
9272 values[18] = __Pyx_ArgRef_FASTCALL(__pyx_args, 18);
9273 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[18])) __PYX_ERR(0, 1254, __pyx_L3_error)
9274 CYTHON_FALLTHROUGH;
9275 case 18:
9276 values[17] = __Pyx_ArgRef_FASTCALL(__pyx_args, 17);
9277 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[17])) __PYX_ERR(0, 1254, __pyx_L3_error)
9278 CYTHON_FALLTHROUGH;
9279 case 17:
9280 values[16] = __Pyx_ArgRef_FASTCALL(__pyx_args, 16);
9281 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[16])) __PYX_ERR(0, 1254, __pyx_L3_error)
9282 CYTHON_FALLTHROUGH;
9283 case 16:
9284 values[15] = __Pyx_ArgRef_FASTCALL(__pyx_args, 15);
9285 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[15])) __PYX_ERR(0, 1254, __pyx_L3_error)
9286 CYTHON_FALLTHROUGH;
9287 case 15:
9288 values[14] = __Pyx_ArgRef_FASTCALL(__pyx_args, 14);
9289 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[14])) __PYX_ERR(0, 1254, __pyx_L3_error)
9290 CYTHON_FALLTHROUGH;
9291 case 14:
9292 values[13] = __Pyx_ArgRef_FASTCALL(__pyx_args, 13);
9293 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[13])) __PYX_ERR(0, 1254, __pyx_L3_error)
9294 CYTHON_FALLTHROUGH;
9295 case 13:
9296 values[12] = __Pyx_ArgRef_FASTCALL(__pyx_args, 12);
9297 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[12])) __PYX_ERR(0, 1254, __pyx_L3_error)
9298 CYTHON_FALLTHROUGH;
9299 case 12:
9300 values[11] = __Pyx_ArgRef_FASTCALL(__pyx_args, 11);
9301 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[11])) __PYX_ERR(0, 1254, __pyx_L3_error)
9302 CYTHON_FALLTHROUGH;
9303 case 11:
9304 values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10);
9305 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 1254, __pyx_L3_error)
9306 CYTHON_FALLTHROUGH;
9307 case 10:
9308 values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
9309 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 1254, __pyx_L3_error)
9310 CYTHON_FALLTHROUGH;
9311 case 9:
9312 values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
9313 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 1254, __pyx_L3_error)
9314 CYTHON_FALLTHROUGH;
9315 case 8:
9316 values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
9317 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 1254, __pyx_L3_error)
9318 CYTHON_FALLTHROUGH;
9319 case 7:
9320 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
9321 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 1254, __pyx_L3_error)
9322 CYTHON_FALLTHROUGH;
9323 case 6:
9324 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
9325 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1254, __pyx_L3_error)
9326 CYTHON_FALLTHROUGH;
9327 case 5:
9328 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
9329 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1254, __pyx_L3_error)
9330 CYTHON_FALLTHROUGH;
9331 case 4:
9332 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
9333 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1254, __pyx_L3_error)
9334 CYTHON_FALLTHROUGH;
9335 case 3:
9336 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
9337 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1254, __pyx_L3_error)
9338 CYTHON_FALLTHROUGH;
9339 case 2:
9340 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
9341 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1254, __pyx_L3_error)
9342 CYTHON_FALLTHROUGH;
9343 case 1:
9344 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
9345 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1254, __pyx_L3_error)
9346 CYTHON_FALLTHROUGH;
9347 case 0: break;
9348 default: goto __pyx_L5_argtuple_error;
9349 }
9350 const Py_ssize_t kwd_pos_args = __pyx_nargs;
9351 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "twophaseDarcy_slightCompressible_split_sd_pressure_het_matType", 0) < (0)) __PYX_ERR(0, 1254, __pyx_L3_error)
9352 for (Py_ssize_t i = __pyx_nargs; i < 30; i++) {
9353 if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("twophaseDarcy_slightCompressible_split_sd_pressure_het_matType", 1, 30, 30, i); __PYX_ERR(0, 1254, __pyx_L3_error) }
9354 }
9355 } else if (unlikely(__pyx_nargs != 30)) {
9356 goto __pyx_L5_argtuple_error;
9357 } else {
9358 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
9359 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1254, __pyx_L3_error)
9360 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
9361 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1254, __pyx_L3_error)
9362 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
9363 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1254, __pyx_L3_error)
9364 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
9365 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1254, __pyx_L3_error)
9366 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
9367 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1254, __pyx_L3_error)
9368 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
9369 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1254, __pyx_L3_error)
9370 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
9371 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 1254, __pyx_L3_error)
9372 values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
9373 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 1254, __pyx_L3_error)
9374 values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
9375 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 1254, __pyx_L3_error)
9376 values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
9377 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 1254, __pyx_L3_error)
9378 values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10);
9379 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 1254, __pyx_L3_error)
9380 values[11] = __Pyx_ArgRef_FASTCALL(__pyx_args, 11);
9381 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[11])) __PYX_ERR(0, 1254, __pyx_L3_error)
9382 values[12] = __Pyx_ArgRef_FASTCALL(__pyx_args, 12);
9383 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[12])) __PYX_ERR(0, 1254, __pyx_L3_error)
9384 values[13] = __Pyx_ArgRef_FASTCALL(__pyx_args, 13);
9385 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[13])) __PYX_ERR(0, 1254, __pyx_L3_error)
9386 values[14] = __Pyx_ArgRef_FASTCALL(__pyx_args, 14);
9387 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[14])) __PYX_ERR(0, 1254, __pyx_L3_error)
9388 values[15] = __Pyx_ArgRef_FASTCALL(__pyx_args, 15);
9389 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[15])) __PYX_ERR(0, 1254, __pyx_L3_error)
9390 values[16] = __Pyx_ArgRef_FASTCALL(__pyx_args, 16);
9391 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[16])) __PYX_ERR(0, 1254, __pyx_L3_error)
9392 values[17] = __Pyx_ArgRef_FASTCALL(__pyx_args, 17);
9393 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[17])) __PYX_ERR(0, 1254, __pyx_L3_error)
9394 values[18] = __Pyx_ArgRef_FASTCALL(__pyx_args, 18);
9395 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[18])) __PYX_ERR(0, 1254, __pyx_L3_error)
9396 values[19] = __Pyx_ArgRef_FASTCALL(__pyx_args, 19);
9397 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[19])) __PYX_ERR(0, 1254, __pyx_L3_error)
9398 values[20] = __Pyx_ArgRef_FASTCALL(__pyx_args, 20);
9399 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[20])) __PYX_ERR(0, 1254, __pyx_L3_error)
9400 values[21] = __Pyx_ArgRef_FASTCALL(__pyx_args, 21);
9401 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[21])) __PYX_ERR(0, 1254, __pyx_L3_error)
9402 values[22] = __Pyx_ArgRef_FASTCALL(__pyx_args, 22);
9403 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[22])) __PYX_ERR(0, 1254, __pyx_L3_error)
9404 values[23] = __Pyx_ArgRef_FASTCALL(__pyx_args, 23);
9405 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[23])) __PYX_ERR(0, 1254, __pyx_L3_error)
9406 values[24] = __Pyx_ArgRef_FASTCALL(__pyx_args, 24);
9407 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[24])) __PYX_ERR(0, 1254, __pyx_L3_error)
9408 values[25] = __Pyx_ArgRef_FASTCALL(__pyx_args, 25);
9409 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[25])) __PYX_ERR(0, 1254, __pyx_L3_error)
9410 values[26] = __Pyx_ArgRef_FASTCALL(__pyx_args, 26);
9411 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[26])) __PYX_ERR(0, 1254, __pyx_L3_error)
9412 values[27] = __Pyx_ArgRef_FASTCALL(__pyx_args, 27);
9413 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[27])) __PYX_ERR(0, 1254, __pyx_L3_error)
9414 values[28] = __Pyx_ArgRef_FASTCALL(__pyx_args, 28);
9415 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[28])) __PYX_ERR(0, 1254, __pyx_L3_error)
9416 values[29] = __Pyx_ArgRef_FASTCALL(__pyx_args, 29);
9417 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[29])) __PYX_ERR(0, 1254, __pyx_L3_error)
9418 }
9419 __pyx_v_pskModelFlag = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_pskModelFlag == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1254, __pyx_L3_error)
9420 __pyx_v_density_w_flag = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_density_w_flag == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1255, __pyx_L3_error)
9421 __pyx_v_density_n_flag = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_density_n_flag == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1256, __pyx_L3_error)
9422 __pyx_v_rowptr = ((PyArrayObject *)values[3]);
9423 __pyx_v_colind = ((PyArrayObject *)values[4]);
9424 __pyx_v_matType = ((PyArrayObject *)values[5]);
9425 __pyx_v_muw = __Pyx_PyFloat_AsDouble(values[6]); if (unlikely((__pyx_v_muw == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1260, __pyx_L3_error)
9426 __pyx_v_mun = __Pyx_PyFloat_AsDouble(values[7]); if (unlikely((__pyx_v_mun == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1261, __pyx_L3_error)
9427 __pyx_v_omega = ((PyArrayObject *)values[8]);
9428 __pyx_v_Kbar = ((PyArrayObject *)values[9]);
9429 __pyx_v_b = __Pyx_PyFloat_AsDouble(values[10]); if (unlikely((__pyx_v_b == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1264, __pyx_L3_error)
9430 __pyx_v_capillaryDiffusionScaling = __Pyx_PyFloat_AsDouble(values[11]); if (unlikely((__pyx_v_capillaryDiffusionScaling == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1265, __pyx_L3_error)
9431 __pyx_v_advectionScaling = __Pyx_PyFloat_AsDouble(values[12]); if (unlikely((__pyx_v_advectionScaling == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1266, __pyx_L3_error)
9432 __pyx_v_rwork_psk = ((PyArrayObject *)values[13]);
9433 __pyx_v_iwork_psk = ((PyArrayObject *)values[14]);
9434 __pyx_v_rwork_psk_tol = ((PyArrayObject *)values[15]);
9435 __pyx_v_rwork_density_w = ((PyArrayObject *)values[16]);
9436 __pyx_v_rwork_density_n = ((PyArrayObject *)values[17]);
9437 __pyx_v_g = ((PyArrayObject *)values[18]);
9438 __pyx_v_qt = ((PyArrayObject *)values[19]);
9439 __pyx_v_psiw = ((PyArrayObject *)values[20]);
9440 __pyx_v_sw = ((PyArrayObject *)values[21]);
9441 __pyx_v_m = ((PyArrayObject *)values[22]);
9442 __pyx_v_dm = ((PyArrayObject *)values[23]);
9443 __pyx_v_phi = ((PyArrayObject *)values[24]);
9444 __pyx_v_dphi = ((PyArrayObject *)values[25]);
9445 __pyx_v_f = ((PyArrayObject *)values[26]);
9446 __pyx_v_df = ((PyArrayObject *)values[27]);
9447 __pyx_v_a = ((PyArrayObject *)values[28]);
9448 __pyx_v_da = ((PyArrayObject *)values[29]);
9449 }
9450 goto __pyx_L6_skip;
9451 __pyx_L5_argtuple_error:;
9452 __Pyx_RaiseArgtupleInvalid("twophaseDarcy_slightCompressible_split_sd_pressure_het_matType", 1, 30, 30, __pyx_nargs); __PYX_ERR(0, 1254, __pyx_L3_error)
9453 __pyx_L6_skip:;
9454 goto __pyx_L4_argument_unpacking_done;
9455 __pyx_L3_error:;
9456 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
9457 Py_XDECREF(values[__pyx_temp]);
9458 }
9459 __Pyx_AddTraceback("cTwophaseDarcyCoefficients.twophaseDarcy_slightCompressible_split_sd_pressure_het_matType", __pyx_clineno, __pyx_lineno, __pyx_filename);
9460 __Pyx_RefNannyFinishContext();
9461 return NULL;
9462 __pyx_L4_argument_unpacking_done:;
9463 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rowptr), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "rowptr", 0))) __PYX_ERR(0, 1257, __pyx_L1_error)
9464 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_colind), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "colind", 0))) __PYX_ERR(0, 1258, __pyx_L1_error)
9465 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_matType), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "matType", 0))) __PYX_ERR(0, 1259, __pyx_L1_error)
9466 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_omega), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "omega", 0))) __PYX_ERR(0, 1262, __pyx_L1_error)
9467 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Kbar), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "Kbar", 0))) __PYX_ERR(0, 1263, __pyx_L1_error)
9468 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_psk), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "rwork_psk", 0))) __PYX_ERR(0, 1267, __pyx_L1_error)
9469 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork_psk), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "iwork_psk", 0))) __PYX_ERR(0, 1268, __pyx_L1_error)
9470 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_psk_tol), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "rwork_psk_tol", 0))) __PYX_ERR(0, 1269, __pyx_L1_error)
9471 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_density_w), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "rwork_density_w", 0))) __PYX_ERR(0, 1270, __pyx_L1_error)
9472 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_density_n), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "rwork_density_n", 0))) __PYX_ERR(0, 1271, __pyx_L1_error)
9473 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_g), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "g", 0))) __PYX_ERR(0, 1272, __pyx_L1_error)
9474 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_qt), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "qt", 0))) __PYX_ERR(0, 1273, __pyx_L1_error)
9475 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_psiw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "psiw", 0))) __PYX_ERR(0, 1274, __pyx_L1_error)
9476 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "sw", 0))) __PYX_ERR(0, 1275, __pyx_L1_error)
9477 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_m), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "m", 0))) __PYX_ERR(0, 1276, __pyx_L1_error)
9478 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dm), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "dm", 0))) __PYX_ERR(0, 1277, __pyx_L1_error)
9479 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_phi), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "phi", 0))) __PYX_ERR(0, 1278, __pyx_L1_error)
9480 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dphi), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "dphi", 0))) __PYX_ERR(0, 1279, __pyx_L1_error)
9481 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_f), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "f", 0))) __PYX_ERR(0, 1280, __pyx_L1_error)
9482 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_df), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "df", 0))) __PYX_ERR(0, 1281, __pyx_L1_error)
9483 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "a", 0))) __PYX_ERR(0, 1282, __pyx_L1_error)
9484 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_da), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "da", 0))) __PYX_ERR(0, 1283, __pyx_L1_error)
9485 __pyx_r = __pyx_pf_26cTwophaseDarcyCoefficients_10twophaseDarcy_slightCompressible_split_sd_pressure_het_matType(__pyx_self, __pyx_v_pskModelFlag, __pyx_v_density_w_flag, __pyx_v_density_n_flag, __pyx_v_rowptr, __pyx_v_colind, __pyx_v_matType, __pyx_v_muw, __pyx_v_mun, __pyx_v_omega, __pyx_v_Kbar, __pyx_v_b, __pyx_v_capillaryDiffusionScaling, __pyx_v_advectionScaling, __pyx_v_rwork_psk, __pyx_v_iwork_psk, __pyx_v_rwork_psk_tol, __pyx_v_rwork_density_w, __pyx_v_rwork_density_n, __pyx_v_g, __pyx_v_qt, __pyx_v_psiw, __pyx_v_sw, __pyx_v_m, __pyx_v_dm, __pyx_v_phi, __pyx_v_dphi, __pyx_v_f, __pyx_v_df, __pyx_v_a, __pyx_v_da);
9486
9487 /* function exit code */
9488 goto __pyx_L0;
9489 __pyx_L1_error:;
9490 __pyx_r = NULL;
9491 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
9492 Py_XDECREF(values[__pyx_temp]);
9493 }
9494 goto __pyx_L7_cleaned_up;
9495 __pyx_L0:;
9496 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
9497 Py_XDECREF(values[__pyx_temp]);
9498 }
9499 __pyx_L7_cleaned_up:;
9500
9501
9502
9503
9504
9505
9506
9507
9508 __Pyx_RefNannyFinishContext();
9509 return __pyx_r;
9510}
9511
9512static 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) {
9513 int __pyx_v_nPointsPerSimplex;
9514 int __pyx_v_nSimplex;
9515 PyObject *__pyx_r = NULL;
9516 __Pyx_RefNannyDeclarations
9517 npy_intp __pyx_t_1;
9518 int __pyx_t_2;
9519 int __pyx_lineno = 0;
9520 const char *__pyx_filename = NULL;
9521 int __pyx_clineno = 0;
9522 __Pyx_RefNannySetupContext("twophaseDarcy_slightCompressible_split_sd_pressure_het_matType", 0);
9523
9524 /* "cTwophaseDarcyCoefficients.pyx":1291
9525 *
9526 * """
9527 * cdef int nPointsPerSimplex=sw.shape[sw.ndim-1] # <<<<<<<<<<<<<<
9528 * cdef int nSimplex=sw.size//nPointsPerSimplex
9529 * #while debugging allow only one option
9530*/
9531 __pyx_v_nPointsPerSimplex = (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_sw)[(__pyx_f_5numpy_7ndarray_4ndim___get__(__pyx_v_sw) - 1)]);
9532
9533 /* "cTwophaseDarcyCoefficients.pyx":1292
9534 * """
9535 * cdef int nPointsPerSimplex=sw.shape[sw.ndim-1]
9536 * cdef int nSimplex=sw.size//nPointsPerSimplex # <<<<<<<<<<<<<<
9537 * #while debugging allow only one option
9538 * #exponential for wetting phase
9539*/
9540 __pyx_t_1 = __pyx_f_5numpy_7ndarray_4size___get__(__pyx_v_sw);
9541
9542 if (unlikely(__pyx_v_nPointsPerSimplex == 0)) {
9543 PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
9544 __PYX_ERR(0, 1292, __pyx_L1_error)
9545 }
9546 else if (sizeof(npy_intp) == sizeof(long) && (!(((int)-1) > 0)) && unlikely(__pyx_v_nPointsPerSimplex == (int)-1) && unlikely(__Pyx_UNARY_NEG_WOULD_OVERFLOW(__pyx_t_1))) {
9547 PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
9548 __PYX_ERR(0, 1292, __pyx_L1_error)
9549 }
9550 __pyx_v_nSimplex = __Pyx_div_npy_intp(__pyx_t_1, __pyx_v_nPointsPerSimplex, 0);
9551
9552
9553 /* "cTwophaseDarcyCoefficients.pyx":1295
9554 * #while debugging allow only one option
9555 * #exponential for wetting phase
9556 * assert density_w_flag == 1 # <<<<<<<<<<<<<<
9557 * #for slight compressible, non-wetting phase density psk doesn't matter
9558 * if pskModelFlag == 0:
9559*/
9560 #ifndef CYTHON_WITHOUT_ASSERTIONS
9561 if (unlikely(__pyx_assertions_enabled())) {
9562 __pyx_t_2 = (__pyx_v_density_w_flag == 1);
9563
9564 if (unlikely(!__pyx_t_2)) {
9565 __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
9566 __PYX_ERR(0, 1295, __pyx_L1_error)
9567 }
9568
9569 }
9570 #else
9571 if ((1)); else __PYX_ERR(0, 1295, __pyx_L1_error)
9572 #endif
9573
9574 /* "cTwophaseDarcyCoefficients.pyx":1297
9575 * assert density_w_flag == 1
9576 * #for slight compressible, non-wetting phase density psk doesn't matter
9577 * if pskModelFlag == 0: # <<<<<<<<<<<<<<
9578 * tpdc.twophaseDarcy_slightCompressible_split_sd_saturation_het_matType[SimplePSK,ExponentialDensity](nSimplex,
9579 * nPointsPerSimplex,
9580*/
9581 switch (__pyx_v_pskModelFlag) {
9582 case 0:
9583
9584 /* "cTwophaseDarcyCoefficients.pyx":1298
9585 * #for slight compressible, non-wetting phase density psk doesn't matter
9586 * if pskModelFlag == 0:
9587 * tpdc.twophaseDarcy_slightCompressible_split_sd_saturation_het_matType[SimplePSK,ExponentialDensity](nSimplex, # <<<<<<<<<<<<<<
9588 * nPointsPerSimplex,
9589 * g.shape[0],
9590*/
9591 (void)(twophaseDarcy_slightCompressible_split_sd_saturation_het_matType<SimplePSK,ExponentialDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_g)[0]), 2, ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rowptr)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_colind)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_matType)), __pyx_v_muw, __pyx_v_mun, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_omega)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Kbar)), __pyx_v_b, __pyx_v_capillaryDiffusionScaling, __pyx_v_advectionScaling, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_iwork_psk)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk_tol)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_w)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_n)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_g)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_qt)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_sw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_m)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dm)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_f)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_df)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_a)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_da))));
9592
9593 /* "cTwophaseDarcyCoefficients.pyx":1297
9594 * assert density_w_flag == 1
9595 * #for slight compressible, non-wetting phase density psk doesn't matter
9596 * if pskModelFlag == 0: # <<<<<<<<<<<<<<
9597 * tpdc.twophaseDarcy_slightCompressible_split_sd_saturation_het_matType[SimplePSK,ExponentialDensity](nSimplex,
9598 * nPointsPerSimplex,
9599*/
9600 break;
9601 case 1:
9602
9603 /* "cTwophaseDarcyCoefficients.pyx":1327
9604 * <double*>(df.data), <double*>(a.data), <double*>(da.data))
9605 * elif pskModelFlag == 1:
9606 * tpdc.twophaseDarcy_slightCompressible_split_sd_saturation_het_matType[VGM,ExponentialDensity](nSimplex, # <<<<<<<<<<<<<<
9607 * nPointsPerSimplex,
9608 * g.shape[0],
9609*/
9610 (void)(twophaseDarcy_slightCompressible_split_sd_saturation_het_matType<VGM,ExponentialDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_g)[0]), 4, ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rowptr)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_colind)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_matType)), __pyx_v_muw, __pyx_v_mun, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_omega)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Kbar)), __pyx_v_b, __pyx_v_capillaryDiffusionScaling, __pyx_v_advectionScaling, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_iwork_psk)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk_tol)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_w)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_n)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_g)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_qt)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_sw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_m)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dm)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_f)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_df)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_a)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_da))));
9611
9612 /* "cTwophaseDarcyCoefficients.pyx":1326
9613 * <double*>(dphi.data), <double*>(f.data),
9614 * <double*>(df.data), <double*>(a.data), <double*>(da.data))
9615 * elif pskModelFlag == 1: # <<<<<<<<<<<<<<
9616 * tpdc.twophaseDarcy_slightCompressible_split_sd_saturation_het_matType[VGM,ExponentialDensity](nSimplex,
9617 * nPointsPerSimplex,
9618*/
9619 break;
9620 default:
9621
9622 /* "cTwophaseDarcyCoefficients.pyx":1348
9623 * <double*>(df.data), <double*>(a.data), <double*>(da.data))
9624 * else:
9625 * tpdc.twophaseDarcy_slightCompressible_split_sd_saturation_het_matType[VGM,ExponentialDensity](nSimplex, # <<<<<<<<<<<<<<
9626 * nPointsPerSimplex,
9627 * g.shape[0],
9628*/
9629 (void)(twophaseDarcy_slightCompressible_split_sd_saturation_het_matType<VGM,ExponentialDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_g)[0]), 4, ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rowptr)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_colind)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_matType)), __pyx_v_muw, __pyx_v_mun, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_omega)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Kbar)), __pyx_v_b, __pyx_v_capillaryDiffusionScaling, __pyx_v_advectionScaling, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_iwork_psk)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk_tol)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_w)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_n)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_g)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_qt)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_sw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_m)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dm)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_f)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_df)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_a)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_da))));
9630 break;
9631 }
9632
9633 /* "cTwophaseDarcyCoefficients.pyx":1254
9634 * <double*>(da.data))
9635 *
9636 * def twophaseDarcy_slightCompressible_split_sd_pressure_het_matType(int pskModelFlag, # <<<<<<<<<<<<<<
9637 * int density_w_flag,
9638 * int density_n_flag,
9639*/
9640
9641 /* function exit code */
9642 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9643 goto __pyx_L0;
9644 __pyx_L1_error:;
9645 __Pyx_AddTraceback("cTwophaseDarcyCoefficients.twophaseDarcy_slightCompressible_split_sd_pressure_het_matType", __pyx_clineno, __pyx_lineno, __pyx_filename);
9646 __pyx_r = NULL;
9647 __pyx_L0:;
9648
9649
9650 __Pyx_XGIVEREF(__pyx_r);
9651 __Pyx_RefNannyFinishContext();
9652 return __pyx_r;
9653}
9654
9655/* "cTwophaseDarcyCoefficients.pyx":1368
9656 * <double*>(df.data), <double*>(a.data), <double*>(da.data))
9657 *
9658 * def twophaseDarcy_slightCompressible_split_sd_saturation_het_matType( int pskModelFlag, # <<<<<<<<<<<<<<
9659 * int density_w_flag,
9660 * int density_n_flag,
9661*/
9662
9663/* Python wrapper */
9664static PyObject *__pyx_pw_26cTwophaseDarcyCoefficients_13twophaseDarcy_slightCompressible_split_sd_saturation_het_matType(PyObject *__pyx_self,
9665#if CYTHON_VECTORCALL
9666PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
9667#else
9668PyObject *__pyx_args, PyObject *__pyx_kwds
9669#endif
9670); /*proto*/
9671PyDoc_STRVAR(__pyx_doc_26cTwophaseDarcyCoefficients_12twophaseDarcy_slightCompressible_split_sd_saturation_het_matType, "Evaluate the saturation coefficients\n\nUse the split fractional flow formulation of slight compressible,\ntwo-phase Darcy flow for a heterogeneous medium, sparse diffusion rep\nhet\n\n ");
9672static PyMethodDef __pyx_mdef_26cTwophaseDarcyCoefficients_13twophaseDarcy_slightCompressible_split_sd_saturation_het_matType = {"twophaseDarcy_slightCompressible_split_sd_saturation_het_matType", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_26cTwophaseDarcyCoefficients_13twophaseDarcy_slightCompressible_split_sd_saturation_het_matType, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_26cTwophaseDarcyCoefficients_12twophaseDarcy_slightCompressible_split_sd_saturation_het_matType};
9673static PyObject *__pyx_pw_26cTwophaseDarcyCoefficients_13twophaseDarcy_slightCompressible_split_sd_saturation_het_matType(PyObject *__pyx_self,
9674#if CYTHON_VECTORCALL
9675PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
9676#else
9677PyObject *__pyx_args, PyObject *__pyx_kwds
9678#endif
9679) {
9680 int __pyx_v_pskModelFlag;
9681 int __pyx_v_density_w_flag;
9682 int __pyx_v_density_n_flag;
9683 PyArrayObject *__pyx_v_rowptr = 0;
9684 PyArrayObject *__pyx_v_colind = 0;
9685 PyArrayObject *__pyx_v_matType = 0;
9686 double __pyx_v_muw;
9687 double __pyx_v_mun;
9688 PyArrayObject *__pyx_v_omega = 0;
9689 PyArrayObject *__pyx_v_Kbar = 0;
9690 double __pyx_v_b;
9691 double __pyx_v_capillaryDiffusionScaling;
9692 double __pyx_v_advectionScaling;
9693 PyArrayObject *__pyx_v_rwork_psk = 0;
9694 PyArrayObject *__pyx_v_iwork_psk = 0;
9695 PyArrayObject *__pyx_v_rwork_psk_tol = 0;
9696 PyArrayObject *__pyx_v_rwork_density_w = 0;
9697 PyArrayObject *__pyx_v_rwork_density_n = 0;
9698 PyArrayObject *__pyx_v_g = 0;
9699 PyArrayObject *__pyx_v_qt = 0;
9700 PyArrayObject *__pyx_v_psiw = 0;
9701 PyArrayObject *__pyx_v_sw = 0;
9702 PyArrayObject *__pyx_v_m = 0;
9703 PyArrayObject *__pyx_v_dm = 0;
9704 PyArrayObject *__pyx_v_phi = 0;
9705 PyArrayObject *__pyx_v_dphi = 0;
9706 PyArrayObject *__pyx_v_f = 0;
9707 PyArrayObject *__pyx_v_df = 0;
9708 PyArrayObject *__pyx_v_a = 0;
9709 PyArrayObject *__pyx_v_da = 0;
9710 #if !CYTHON_VECTORCALL
9711 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
9712 #endif
9713 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
9714 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};
9715 int __pyx_lineno = 0;
9716 const char *__pyx_filename = NULL;
9717 int __pyx_clineno = 0;
9718 PyObject *__pyx_r = 0;
9719 __Pyx_RefNannyDeclarations
9720 __Pyx_RefNannySetupContext("twophaseDarcy_slightCompressible_split_sd_saturation_het_matType (wrapper)", 0);
9721 #if !CYTHON_VECTORCALL
9722 #if CYTHON_ASSUME_SAFE_SIZE
9723 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
9724 #else
9725 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
9726 #endif
9727 #endif
9728 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
9729 {
9730 PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pskModelFlag,&__pyx_mstate_global->__pyx_n_u_density_w_flag,&__pyx_mstate_global->__pyx_n_u_density_n_flag,&__pyx_mstate_global->__pyx_n_u_rowptr,&__pyx_mstate_global->__pyx_n_u_colind,&__pyx_mstate_global->__pyx_n_u_matType,&__pyx_mstate_global->__pyx_n_u_muw,&__pyx_mstate_global->__pyx_n_u_mun,&__pyx_mstate_global->__pyx_n_u_omega,&__pyx_mstate_global->__pyx_n_u_Kbar,&__pyx_mstate_global->__pyx_n_u_b,&__pyx_mstate_global->__pyx_n_u_capillaryDiffusionScaling,&__pyx_mstate_global->__pyx_n_u_advectionScaling,&__pyx_mstate_global->__pyx_n_u_rwork_psk,&__pyx_mstate_global->__pyx_n_u_iwork_psk,&__pyx_mstate_global->__pyx_n_u_rwork_psk_tol,&__pyx_mstate_global->__pyx_n_u_rwork_density_w,&__pyx_mstate_global->__pyx_n_u_rwork_density_n,&__pyx_mstate_global->__pyx_n_u_g,&__pyx_mstate_global->__pyx_n_u_qt,&__pyx_mstate_global->__pyx_n_u_psiw,&__pyx_mstate_global->__pyx_n_u_sw,&__pyx_mstate_global->__pyx_n_u_m,&__pyx_mstate_global->__pyx_n_u_dm,&__pyx_mstate_global->__pyx_n_u_phi,&__pyx_mstate_global->__pyx_n_u_dphi,&__pyx_mstate_global->__pyx_n_u_f,&__pyx_mstate_global->__pyx_n_u_df,&__pyx_mstate_global->__pyx_n_u_a,&__pyx_mstate_global->__pyx_n_u_da,0};
9731 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
9732 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1368, __pyx_L3_error)
9733 if (__pyx_kwds_len > 0) {
9734 switch (__pyx_nargs) {
9735 case 30:
9736 values[29] = __Pyx_ArgRef_FASTCALL(__pyx_args, 29);
9737 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[29])) __PYX_ERR(0, 1368, __pyx_L3_error)
9738 CYTHON_FALLTHROUGH;
9739 case 29:
9740 values[28] = __Pyx_ArgRef_FASTCALL(__pyx_args, 28);
9741 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[28])) __PYX_ERR(0, 1368, __pyx_L3_error)
9742 CYTHON_FALLTHROUGH;
9743 case 28:
9744 values[27] = __Pyx_ArgRef_FASTCALL(__pyx_args, 27);
9745 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[27])) __PYX_ERR(0, 1368, __pyx_L3_error)
9746 CYTHON_FALLTHROUGH;
9747 case 27:
9748 values[26] = __Pyx_ArgRef_FASTCALL(__pyx_args, 26);
9749 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[26])) __PYX_ERR(0, 1368, __pyx_L3_error)
9750 CYTHON_FALLTHROUGH;
9751 case 26:
9752 values[25] = __Pyx_ArgRef_FASTCALL(__pyx_args, 25);
9753 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[25])) __PYX_ERR(0, 1368, __pyx_L3_error)
9754 CYTHON_FALLTHROUGH;
9755 case 25:
9756 values[24] = __Pyx_ArgRef_FASTCALL(__pyx_args, 24);
9757 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[24])) __PYX_ERR(0, 1368, __pyx_L3_error)
9758 CYTHON_FALLTHROUGH;
9759 case 24:
9760 values[23] = __Pyx_ArgRef_FASTCALL(__pyx_args, 23);
9761 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[23])) __PYX_ERR(0, 1368, __pyx_L3_error)
9762 CYTHON_FALLTHROUGH;
9763 case 23:
9764 values[22] = __Pyx_ArgRef_FASTCALL(__pyx_args, 22);
9765 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[22])) __PYX_ERR(0, 1368, __pyx_L3_error)
9766 CYTHON_FALLTHROUGH;
9767 case 22:
9768 values[21] = __Pyx_ArgRef_FASTCALL(__pyx_args, 21);
9769 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[21])) __PYX_ERR(0, 1368, __pyx_L3_error)
9770 CYTHON_FALLTHROUGH;
9771 case 21:
9772 values[20] = __Pyx_ArgRef_FASTCALL(__pyx_args, 20);
9773 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[20])) __PYX_ERR(0, 1368, __pyx_L3_error)
9774 CYTHON_FALLTHROUGH;
9775 case 20:
9776 values[19] = __Pyx_ArgRef_FASTCALL(__pyx_args, 19);
9777 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[19])) __PYX_ERR(0, 1368, __pyx_L3_error)
9778 CYTHON_FALLTHROUGH;
9779 case 19:
9780 values[18] = __Pyx_ArgRef_FASTCALL(__pyx_args, 18);
9781 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[18])) __PYX_ERR(0, 1368, __pyx_L3_error)
9782 CYTHON_FALLTHROUGH;
9783 case 18:
9784 values[17] = __Pyx_ArgRef_FASTCALL(__pyx_args, 17);
9785 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[17])) __PYX_ERR(0, 1368, __pyx_L3_error)
9786 CYTHON_FALLTHROUGH;
9787 case 17:
9788 values[16] = __Pyx_ArgRef_FASTCALL(__pyx_args, 16);
9789 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[16])) __PYX_ERR(0, 1368, __pyx_L3_error)
9790 CYTHON_FALLTHROUGH;
9791 case 16:
9792 values[15] = __Pyx_ArgRef_FASTCALL(__pyx_args, 15);
9793 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[15])) __PYX_ERR(0, 1368, __pyx_L3_error)
9794 CYTHON_FALLTHROUGH;
9795 case 15:
9796 values[14] = __Pyx_ArgRef_FASTCALL(__pyx_args, 14);
9797 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[14])) __PYX_ERR(0, 1368, __pyx_L3_error)
9798 CYTHON_FALLTHROUGH;
9799 case 14:
9800 values[13] = __Pyx_ArgRef_FASTCALL(__pyx_args, 13);
9801 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[13])) __PYX_ERR(0, 1368, __pyx_L3_error)
9802 CYTHON_FALLTHROUGH;
9803 case 13:
9804 values[12] = __Pyx_ArgRef_FASTCALL(__pyx_args, 12);
9805 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[12])) __PYX_ERR(0, 1368, __pyx_L3_error)
9806 CYTHON_FALLTHROUGH;
9807 case 12:
9808 values[11] = __Pyx_ArgRef_FASTCALL(__pyx_args, 11);
9809 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[11])) __PYX_ERR(0, 1368, __pyx_L3_error)
9810 CYTHON_FALLTHROUGH;
9811 case 11:
9812 values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10);
9813 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 1368, __pyx_L3_error)
9814 CYTHON_FALLTHROUGH;
9815 case 10:
9816 values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
9817 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 1368, __pyx_L3_error)
9818 CYTHON_FALLTHROUGH;
9819 case 9:
9820 values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
9821 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 1368, __pyx_L3_error)
9822 CYTHON_FALLTHROUGH;
9823 case 8:
9824 values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
9825 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 1368, __pyx_L3_error)
9826 CYTHON_FALLTHROUGH;
9827 case 7:
9828 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
9829 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 1368, __pyx_L3_error)
9830 CYTHON_FALLTHROUGH;
9831 case 6:
9832 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
9833 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1368, __pyx_L3_error)
9834 CYTHON_FALLTHROUGH;
9835 case 5:
9836 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
9837 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1368, __pyx_L3_error)
9838 CYTHON_FALLTHROUGH;
9839 case 4:
9840 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
9841 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1368, __pyx_L3_error)
9842 CYTHON_FALLTHROUGH;
9843 case 3:
9844 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
9845 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1368, __pyx_L3_error)
9846 CYTHON_FALLTHROUGH;
9847 case 2:
9848 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
9849 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1368, __pyx_L3_error)
9850 CYTHON_FALLTHROUGH;
9851 case 1:
9852 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
9853 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1368, __pyx_L3_error)
9854 CYTHON_FALLTHROUGH;
9855 case 0: break;
9856 default: goto __pyx_L5_argtuple_error;
9857 }
9858 const Py_ssize_t kwd_pos_args = __pyx_nargs;
9859 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "twophaseDarcy_slightCompressible_split_sd_saturation_het_matType", 0) < (0)) __PYX_ERR(0, 1368, __pyx_L3_error)
9860 for (Py_ssize_t i = __pyx_nargs; i < 30; i++) {
9861 if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("twophaseDarcy_slightCompressible_split_sd_saturation_het_matType", 1, 30, 30, i); __PYX_ERR(0, 1368, __pyx_L3_error) }
9862 }
9863 } else if (unlikely(__pyx_nargs != 30)) {
9864 goto __pyx_L5_argtuple_error;
9865 } else {
9866 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
9867 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1368, __pyx_L3_error)
9868 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
9869 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1368, __pyx_L3_error)
9870 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
9871 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1368, __pyx_L3_error)
9872 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
9873 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1368, __pyx_L3_error)
9874 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
9875 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1368, __pyx_L3_error)
9876 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
9877 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1368, __pyx_L3_error)
9878 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
9879 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 1368, __pyx_L3_error)
9880 values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
9881 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 1368, __pyx_L3_error)
9882 values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
9883 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 1368, __pyx_L3_error)
9884 values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
9885 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 1368, __pyx_L3_error)
9886 values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10);
9887 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 1368, __pyx_L3_error)
9888 values[11] = __Pyx_ArgRef_FASTCALL(__pyx_args, 11);
9889 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[11])) __PYX_ERR(0, 1368, __pyx_L3_error)
9890 values[12] = __Pyx_ArgRef_FASTCALL(__pyx_args, 12);
9891 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[12])) __PYX_ERR(0, 1368, __pyx_L3_error)
9892 values[13] = __Pyx_ArgRef_FASTCALL(__pyx_args, 13);
9893 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[13])) __PYX_ERR(0, 1368, __pyx_L3_error)
9894 values[14] = __Pyx_ArgRef_FASTCALL(__pyx_args, 14);
9895 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[14])) __PYX_ERR(0, 1368, __pyx_L3_error)
9896 values[15] = __Pyx_ArgRef_FASTCALL(__pyx_args, 15);
9897 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[15])) __PYX_ERR(0, 1368, __pyx_L3_error)
9898 values[16] = __Pyx_ArgRef_FASTCALL(__pyx_args, 16);
9899 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[16])) __PYX_ERR(0, 1368, __pyx_L3_error)
9900 values[17] = __Pyx_ArgRef_FASTCALL(__pyx_args, 17);
9901 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[17])) __PYX_ERR(0, 1368, __pyx_L3_error)
9902 values[18] = __Pyx_ArgRef_FASTCALL(__pyx_args, 18);
9903 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[18])) __PYX_ERR(0, 1368, __pyx_L3_error)
9904 values[19] = __Pyx_ArgRef_FASTCALL(__pyx_args, 19);
9905 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[19])) __PYX_ERR(0, 1368, __pyx_L3_error)
9906 values[20] = __Pyx_ArgRef_FASTCALL(__pyx_args, 20);
9907 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[20])) __PYX_ERR(0, 1368, __pyx_L3_error)
9908 values[21] = __Pyx_ArgRef_FASTCALL(__pyx_args, 21);
9909 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[21])) __PYX_ERR(0, 1368, __pyx_L3_error)
9910 values[22] = __Pyx_ArgRef_FASTCALL(__pyx_args, 22);
9911 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[22])) __PYX_ERR(0, 1368, __pyx_L3_error)
9912 values[23] = __Pyx_ArgRef_FASTCALL(__pyx_args, 23);
9913 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[23])) __PYX_ERR(0, 1368, __pyx_L3_error)
9914 values[24] = __Pyx_ArgRef_FASTCALL(__pyx_args, 24);
9915 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[24])) __PYX_ERR(0, 1368, __pyx_L3_error)
9916 values[25] = __Pyx_ArgRef_FASTCALL(__pyx_args, 25);
9917 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[25])) __PYX_ERR(0, 1368, __pyx_L3_error)
9918 values[26] = __Pyx_ArgRef_FASTCALL(__pyx_args, 26);
9919 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[26])) __PYX_ERR(0, 1368, __pyx_L3_error)
9920 values[27] = __Pyx_ArgRef_FASTCALL(__pyx_args, 27);
9921 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[27])) __PYX_ERR(0, 1368, __pyx_L3_error)
9922 values[28] = __Pyx_ArgRef_FASTCALL(__pyx_args, 28);
9923 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[28])) __PYX_ERR(0, 1368, __pyx_L3_error)
9924 values[29] = __Pyx_ArgRef_FASTCALL(__pyx_args, 29);
9925 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[29])) __PYX_ERR(0, 1368, __pyx_L3_error)
9926 }
9927 __pyx_v_pskModelFlag = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_pskModelFlag == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1368, __pyx_L3_error)
9928 __pyx_v_density_w_flag = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_density_w_flag == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1369, __pyx_L3_error)
9929 __pyx_v_density_n_flag = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_density_n_flag == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1370, __pyx_L3_error)
9930 __pyx_v_rowptr = ((PyArrayObject *)values[3]);
9931 __pyx_v_colind = ((PyArrayObject *)values[4]);
9932 __pyx_v_matType = ((PyArrayObject *)values[5]);
9933 __pyx_v_muw = __Pyx_PyFloat_AsDouble(values[6]); if (unlikely((__pyx_v_muw == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1374, __pyx_L3_error)
9934 __pyx_v_mun = __Pyx_PyFloat_AsDouble(values[7]); if (unlikely((__pyx_v_mun == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1375, __pyx_L3_error)
9935 __pyx_v_omega = ((PyArrayObject *)values[8]);
9936 __pyx_v_Kbar = ((PyArrayObject *)values[9]);
9937 __pyx_v_b = __Pyx_PyFloat_AsDouble(values[10]); if (unlikely((__pyx_v_b == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1378, __pyx_L3_error)
9938 __pyx_v_capillaryDiffusionScaling = __Pyx_PyFloat_AsDouble(values[11]); if (unlikely((__pyx_v_capillaryDiffusionScaling == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1379, __pyx_L3_error)
9939 __pyx_v_advectionScaling = __Pyx_PyFloat_AsDouble(values[12]); if (unlikely((__pyx_v_advectionScaling == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1380, __pyx_L3_error)
9940 __pyx_v_rwork_psk = ((PyArrayObject *)values[13]);
9941 __pyx_v_iwork_psk = ((PyArrayObject *)values[14]);
9942 __pyx_v_rwork_psk_tol = ((PyArrayObject *)values[15]);
9943 __pyx_v_rwork_density_w = ((PyArrayObject *)values[16]);
9944 __pyx_v_rwork_density_n = ((PyArrayObject *)values[17]);
9945 __pyx_v_g = ((PyArrayObject *)values[18]);
9946 __pyx_v_qt = ((PyArrayObject *)values[19]);
9947 __pyx_v_psiw = ((PyArrayObject *)values[20]);
9948 __pyx_v_sw = ((PyArrayObject *)values[21]);
9949 __pyx_v_m = ((PyArrayObject *)values[22]);
9950 __pyx_v_dm = ((PyArrayObject *)values[23]);
9951 __pyx_v_phi = ((PyArrayObject *)values[24]);
9952 __pyx_v_dphi = ((PyArrayObject *)values[25]);
9953 __pyx_v_f = ((PyArrayObject *)values[26]);
9954 __pyx_v_df = ((PyArrayObject *)values[27]);
9955 __pyx_v_a = ((PyArrayObject *)values[28]);
9956 __pyx_v_da = ((PyArrayObject *)values[29]);
9957 }
9958 goto __pyx_L6_skip;
9959 __pyx_L5_argtuple_error:;
9960 __Pyx_RaiseArgtupleInvalid("twophaseDarcy_slightCompressible_split_sd_saturation_het_matType", 1, 30, 30, __pyx_nargs); __PYX_ERR(0, 1368, __pyx_L3_error)
9961 __pyx_L6_skip:;
9962 goto __pyx_L4_argument_unpacking_done;
9963 __pyx_L3_error:;
9964 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
9965 Py_XDECREF(values[__pyx_temp]);
9966 }
9967 __Pyx_AddTraceback("cTwophaseDarcyCoefficients.twophaseDarcy_slightCompressible_split_sd_saturation_het_matType", __pyx_clineno, __pyx_lineno, __pyx_filename);
9968 __Pyx_RefNannyFinishContext();
9969 return NULL;
9970 __pyx_L4_argument_unpacking_done:;
9971 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rowptr), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "rowptr", 0))) __PYX_ERR(0, 1371, __pyx_L1_error)
9972 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_colind), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "colind", 0))) __PYX_ERR(0, 1372, __pyx_L1_error)
9973 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_matType), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "matType", 0))) __PYX_ERR(0, 1373, __pyx_L1_error)
9974 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_omega), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "omega", 0))) __PYX_ERR(0, 1376, __pyx_L1_error)
9975 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Kbar), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "Kbar", 0))) __PYX_ERR(0, 1377, __pyx_L1_error)
9976 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_psk), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "rwork_psk", 0))) __PYX_ERR(0, 1381, __pyx_L1_error)
9977 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork_psk), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "iwork_psk", 0))) __PYX_ERR(0, 1382, __pyx_L1_error)
9978 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_psk_tol), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "rwork_psk_tol", 0))) __PYX_ERR(0, 1383, __pyx_L1_error)
9979 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_density_w), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "rwork_density_w", 0))) __PYX_ERR(0, 1384, __pyx_L1_error)
9980 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_density_n), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "rwork_density_n", 0))) __PYX_ERR(0, 1385, __pyx_L1_error)
9981 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_g), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "g", 0))) __PYX_ERR(0, 1386, __pyx_L1_error)
9982 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_qt), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "qt", 0))) __PYX_ERR(0, 1386, __pyx_L1_error)
9983 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_psiw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "psiw", 0))) __PYX_ERR(0, 1386, __pyx_L1_error)
9984 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "sw", 0))) __PYX_ERR(0, 1386, __pyx_L1_error)
9985 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_m), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "m", 0))) __PYX_ERR(0, 1386, __pyx_L1_error)
9986 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dm), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "dm", 0))) __PYX_ERR(0, 1386, __pyx_L1_error)
9987 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_phi), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "phi", 0))) __PYX_ERR(0, 1386, __pyx_L1_error)
9988 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dphi), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "dphi", 0))) __PYX_ERR(0, 1386, __pyx_L1_error)
9989 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_f), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "f", 0))) __PYX_ERR(0, 1387, __pyx_L1_error)
9990 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_df), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "df", 0))) __PYX_ERR(0, 1387, __pyx_L1_error)
9991 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "a", 0))) __PYX_ERR(0, 1387, __pyx_L1_error)
9992 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_da), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "da", 0))) __PYX_ERR(0, 1387, __pyx_L1_error)
9993 __pyx_r = __pyx_pf_26cTwophaseDarcyCoefficients_12twophaseDarcy_slightCompressible_split_sd_saturation_het_matType(__pyx_self, __pyx_v_pskModelFlag, __pyx_v_density_w_flag, __pyx_v_density_n_flag, __pyx_v_rowptr, __pyx_v_colind, __pyx_v_matType, __pyx_v_muw, __pyx_v_mun, __pyx_v_omega, __pyx_v_Kbar, __pyx_v_b, __pyx_v_capillaryDiffusionScaling, __pyx_v_advectionScaling, __pyx_v_rwork_psk, __pyx_v_iwork_psk, __pyx_v_rwork_psk_tol, __pyx_v_rwork_density_w, __pyx_v_rwork_density_n, __pyx_v_g, __pyx_v_qt, __pyx_v_psiw, __pyx_v_sw, __pyx_v_m, __pyx_v_dm, __pyx_v_phi, __pyx_v_dphi, __pyx_v_f, __pyx_v_df, __pyx_v_a, __pyx_v_da);
9994
9995 /* function exit code */
9996 goto __pyx_L0;
9997 __pyx_L1_error:;
9998 __pyx_r = NULL;
9999 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
10000 Py_XDECREF(values[__pyx_temp]);
10001 }
10002 goto __pyx_L7_cleaned_up;
10003 __pyx_L0:;
10004 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
10005 Py_XDECREF(values[__pyx_temp]);
10006 }
10007 __pyx_L7_cleaned_up:;
10008
10009
10010
10011
10012
10013
10014
10015
10016 __Pyx_RefNannyFinishContext();
10017 return __pyx_r;
10018}
10019
10020static 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) {
10021 int __pyx_v_nPointsPerSimplex;
10022 int __pyx_v_nSimplex;
10023 PyObject *__pyx_r = NULL;
10024 __Pyx_RefNannyDeclarations
10025 npy_intp __pyx_t_1;
10026 PyObject *__pyx_t_2 = NULL;
10027 PyObject *__pyx_t_3 = NULL;
10028 PyObject *__pyx_t_4 = NULL;
10029 PyObject *__pyx_t_5 = NULL;
10030 size_t __pyx_t_6;
10031 int __pyx_lineno = 0;
10032 const char *__pyx_filename = NULL;
10033 int __pyx_clineno = 0;
10034 __Pyx_RefNannySetupContext("twophaseDarcy_slightCompressible_split_sd_saturation_het_matType", 0);
10035
10036 /* "cTwophaseDarcyCoefficients.pyx":1395
10037 *
10038 * """
10039 * cdef int nPointsPerSimplex=sw.shape[sw.ndim-1] # <<<<<<<<<<<<<<
10040 * cdef int nSimplex=sw.size//nPointsPerSimplex
10041 * if density_n_flag == 1: #nonwetting exponential
10042*/
10043 __pyx_v_nPointsPerSimplex = (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_sw)[(__pyx_f_5numpy_7ndarray_4ndim___get__(__pyx_v_sw) - 1)]);
10044
10045 /* "cTwophaseDarcyCoefficients.pyx":1396
10046 * """
10047 * cdef int nPointsPerSimplex=sw.shape[sw.ndim-1]
10048 * cdef int nSimplex=sw.size//nPointsPerSimplex # <<<<<<<<<<<<<<
10049 * if density_n_flag == 1: #nonwetting exponential
10050 * if pskModelFlag == 0:
10051*/
10052 __pyx_t_1 = __pyx_f_5numpy_7ndarray_4size___get__(__pyx_v_sw);
10053
10054 if (unlikely(__pyx_v_nPointsPerSimplex == 0)) {
10055 PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
10056 __PYX_ERR(0, 1396, __pyx_L1_error)
10057 }
10058 else if (sizeof(npy_intp) == sizeof(long) && (!(((int)-1) > 0)) && unlikely(__pyx_v_nPointsPerSimplex == (int)-1) && unlikely(__Pyx_UNARY_NEG_WOULD_OVERFLOW(__pyx_t_1))) {
10059 PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
10060 __PYX_ERR(0, 1396, __pyx_L1_error)
10061 }
10062 __pyx_v_nSimplex = __Pyx_div_npy_intp(__pyx_t_1, __pyx_v_nPointsPerSimplex, 0);
10063
10064
10065 /* "cTwophaseDarcyCoefficients.pyx":1397
10066 * cdef int nPointsPerSimplex=sw.shape[sw.ndim-1]
10067 * cdef int nSimplex=sw.size//nPointsPerSimplex
10068 * if density_n_flag == 1: #nonwetting exponential # <<<<<<<<<<<<<<
10069 * if pskModelFlag == 0:
10070 * tpdc.twophaseDarcy_compressibleN_split_sd_saturation_het_matType[SimplePSK,ExponentialDensity](nSimplex,
10071*/
10072 switch (__pyx_v_density_n_flag) {
10073 case 1:
10074
10075 /* "cTwophaseDarcyCoefficients.pyx":1398
10076 * cdef int nSimplex=sw.size//nPointsPerSimplex
10077 * if density_n_flag == 1: #nonwetting exponential
10078 * if pskModelFlag == 0: # <<<<<<<<<<<<<<
10079 * tpdc.twophaseDarcy_compressibleN_split_sd_saturation_het_matType[SimplePSK,ExponentialDensity](nSimplex,
10080 * nPointsPerSimplex,
10081*/
10082 switch (__pyx_v_pskModelFlag) {
10083 case 0:
10084
10085 /* "cTwophaseDarcyCoefficients.pyx":1399
10086 * if density_n_flag == 1: #nonwetting exponential
10087 * if pskModelFlag == 0:
10088 * tpdc.twophaseDarcy_compressibleN_split_sd_saturation_het_matType[SimplePSK,ExponentialDensity](nSimplex, # <<<<<<<<<<<<<<
10089 * nPointsPerSimplex,
10090 * g.shape[0],
10091*/
10092 (void)(twophaseDarcy_compressibleN_split_sd_saturation_het_matType<SimplePSK,ExponentialDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_g)[0]), 2, ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rowptr)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_colind)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_matType)), __pyx_v_muw, __pyx_v_mun, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_omega)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Kbar)), __pyx_v_b, __pyx_v_capillaryDiffusionScaling, __pyx_v_advectionScaling, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_iwork_psk)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk_tol)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_w)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_n)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_g)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_qt)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_sw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_m)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dm)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_f)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_df)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_a)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_da))));
10093
10094 /* "cTwophaseDarcyCoefficients.pyx":1398
10095 * cdef int nSimplex=sw.size//nPointsPerSimplex
10096 * if density_n_flag == 1: #nonwetting exponential
10097 * if pskModelFlag == 0: # <<<<<<<<<<<<<<
10098 * tpdc.twophaseDarcy_compressibleN_split_sd_saturation_het_matType[SimplePSK,ExponentialDensity](nSimplex,
10099 * nPointsPerSimplex,
10100*/
10101 break;
10102 case 1:
10103
10104 /* "cTwophaseDarcyCoefficients.pyx":1420
10105 * <double*>(df.data), <double*>(a.data), <double*>(da.data))
10106 * elif pskModelFlag == 1:
10107 * tpdc.twophaseDarcy_compressibleN_split_sd_saturation_het_matType[VGM,ExponentialDensity](nSimplex, # <<<<<<<<<<<<<<
10108 * nPointsPerSimplex,
10109 * g.shape[0],
10110*/
10111 (void)(twophaseDarcy_compressibleN_split_sd_saturation_het_matType<VGM,ExponentialDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_g)[0]), 4, ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rowptr)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_colind)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_matType)), __pyx_v_muw, __pyx_v_mun, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_omega)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Kbar)), __pyx_v_b, __pyx_v_capillaryDiffusionScaling, __pyx_v_advectionScaling, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_iwork_psk)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk_tol)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_w)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_n)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_g)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_qt)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_sw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_m)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dm)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_f)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_df)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_a)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_da))));
10112
10113 /* "cTwophaseDarcyCoefficients.pyx":1419
10114 * <double*>(m.data), <double*>(dm.data), <double*>(phi.data), <double*>(dphi.data), <double*>(f.data),
10115 * <double*>(df.data), <double*>(a.data), <double*>(da.data))
10116 * elif pskModelFlag == 1: # <<<<<<<<<<<<<<
10117 * tpdc.twophaseDarcy_compressibleN_split_sd_saturation_het_matType[VGM,ExponentialDensity](nSimplex,
10118 * nPointsPerSimplex,
10119*/
10120 break;
10121 default:
10122
10123 /* "cTwophaseDarcyCoefficients.pyx":1441
10124 * <double*>(df.data), <double*>(a.data), <double*>(da.data))
10125 * else:
10126 * tpdc.twophaseDarcy_compressibleN_split_sd_saturation_het_matType[VGM,ExponentialDensity](nSimplex, # <<<<<<<<<<<<<<
10127 * nPointsPerSimplex,
10128 * g.shape[0],
10129*/
10130 (void)(twophaseDarcy_compressibleN_split_sd_saturation_het_matType<VGM,ExponentialDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_g)[0]), 4, ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rowptr)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_colind)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_matType)), __pyx_v_muw, __pyx_v_mun, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_omega)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Kbar)), __pyx_v_b, __pyx_v_capillaryDiffusionScaling, __pyx_v_advectionScaling, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_iwork_psk)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk_tol)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_w)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_n)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_g)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_qt)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_sw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_m)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dm)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_f)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_df)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_a)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_da))));
10131 break;
10132 }
10133
10134 /* "cTwophaseDarcyCoefficients.pyx":1397
10135 * cdef int nPointsPerSimplex=sw.shape[sw.ndim-1]
10136 * cdef int nSimplex=sw.size//nPointsPerSimplex
10137 * if density_n_flag == 1: #nonwetting exponential # <<<<<<<<<<<<<<
10138 * if pskModelFlag == 0:
10139 * tpdc.twophaseDarcy_compressibleN_split_sd_saturation_het_matType[SimplePSK,ExponentialDensity](nSimplex,
10140*/
10141 break;
10142 case 2:
10143
10144 /* "cTwophaseDarcyCoefficients.pyx":1463
10145 * <double*>(df.data), <double*>(a.data), <double*>(da.data))
10146 * elif density_n_flag == 2:#nonwetting IdealGas
10147 * if pskModelFlag == 0: # <<<<<<<<<<<<<<
10148 * tpdc.twophaseDarcy_compressibleN_split_sd_saturation_het_matType[SimplePSK,IdealGasDensity](nSimplex,
10149 * nPointsPerSimplex,
10150*/
10151 switch (__pyx_v_pskModelFlag) {
10152 case 0:
10153
10154 /* "cTwophaseDarcyCoefficients.pyx":1464
10155 * elif density_n_flag == 2:#nonwetting IdealGas
10156 * if pskModelFlag == 0:
10157 * tpdc.twophaseDarcy_compressibleN_split_sd_saturation_het_matType[SimplePSK,IdealGasDensity](nSimplex, # <<<<<<<<<<<<<<
10158 * nPointsPerSimplex,
10159 * g.shape[0],
10160*/
10161 (void)(twophaseDarcy_compressibleN_split_sd_saturation_het_matType<SimplePSK,IdealGasDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_g)[0]), 2, ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rowptr)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_colind)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_matType)), __pyx_v_muw, __pyx_v_mun, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_omega)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Kbar)), __pyx_v_b, __pyx_v_capillaryDiffusionScaling, __pyx_v_advectionScaling, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_iwork_psk)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk_tol)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_w)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_n)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_g)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_qt)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_sw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_m)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dm)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_f)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_df)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_a)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_da))));
10162
10163 /* "cTwophaseDarcyCoefficients.pyx":1463
10164 * <double*>(df.data), <double*>(a.data), <double*>(da.data))
10165 * elif density_n_flag == 2:#nonwetting IdealGas
10166 * if pskModelFlag == 0: # <<<<<<<<<<<<<<
10167 * tpdc.twophaseDarcy_compressibleN_split_sd_saturation_het_matType[SimplePSK,IdealGasDensity](nSimplex,
10168 * nPointsPerSimplex,
10169*/
10170 break;
10171 case 1:
10172
10173 /* "cTwophaseDarcyCoefficients.pyx":1485
10174 * <double*>(df.data), <double*>(a.data), <double*>(da.data))
10175 * elif pskModelFlag == 1:
10176 * tpdc.twophaseDarcy_compressibleN_split_sd_saturation_het_matType[VGM,IdealGasDensity](nSimplex, # <<<<<<<<<<<<<<
10177 * nPointsPerSimplex,
10178 * g.shape[0],
10179*/
10180 (void)(twophaseDarcy_compressibleN_split_sd_saturation_het_matType<VGM,IdealGasDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_g)[0]), 4, ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rowptr)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_colind)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_matType)), __pyx_v_muw, __pyx_v_mun, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_omega)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Kbar)), __pyx_v_b, __pyx_v_capillaryDiffusionScaling, __pyx_v_advectionScaling, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_iwork_psk)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk_tol)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_w)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_n)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_g)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_qt)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_sw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_m)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dm)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_f)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_df)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_a)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_da))));
10181
10182 /* "cTwophaseDarcyCoefficients.pyx":1484
10183 * <double*>(m.data), <double*>(dm.data), <double*>(phi.data), <double*>(dphi.data), <double*>(f.data),
10184 * <double*>(df.data), <double*>(a.data), <double*>(da.data))
10185 * elif pskModelFlag == 1: # <<<<<<<<<<<<<<
10186 * tpdc.twophaseDarcy_compressibleN_split_sd_saturation_het_matType[VGM,IdealGasDensity](nSimplex,
10187 * nPointsPerSimplex,
10188*/
10189 break;
10190 default:
10191
10192 /* "cTwophaseDarcyCoefficients.pyx":1506
10193 * <double*>(df.data), <double*>(a.data), <double*>(da.data))
10194 * else:
10195 * tpdc.twophaseDarcy_compressibleN_split_sd_saturation_het_matType[VGM,IdealGasDensity](nSimplex, # <<<<<<<<<<<<<<
10196 * nPointsPerSimplex,
10197 * g.shape[0],
10198*/
10199 (void)(twophaseDarcy_compressibleN_split_sd_saturation_het_matType<VGM,IdealGasDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_g)[0]), 4, ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rowptr)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_colind)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_matType)), __pyx_v_muw, __pyx_v_mun, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_omega)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Kbar)), __pyx_v_b, __pyx_v_capillaryDiffusionScaling, __pyx_v_advectionScaling, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_iwork_psk)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk_tol)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_w)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_n)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_g)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_qt)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_sw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_m)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dm)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_f)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_df)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_a)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_da))));
10200 break;
10201 }
10202
10203 /* "cTwophaseDarcyCoefficients.pyx":1462
10204 * <double*>(m.data), <double*>(dm.data), <double*>(phi.data), <double*>(dphi.data), <double*>(f.data),
10205 * <double*>(df.data), <double*>(a.data), <double*>(da.data))
10206 * elif density_n_flag == 2:#nonwetting IdealGas # <<<<<<<<<<<<<<
10207 * if pskModelFlag == 0:
10208 * tpdc.twophaseDarcy_compressibleN_split_sd_saturation_het_matType[SimplePSK,IdealGasDensity](nSimplex,
10209*/
10210 break;
10211 default:
10212
10213 /* "cTwophaseDarcyCoefficients.pyx":1527
10214 * <double*>(df.data), <double*>(a.data), <double*>(da.data))
10215 * else:
10216 * assert False, "configuration density_w_flag= {0} and density_n_flag= {1} not found ".format(density_w_flag, density_n_flag) # <<<<<<<<<<<<<<
10217 *
10218 * def twophaseDarcy_compressibleN_split_sd_pressure_het_matType( int pskModelFlag,
10219*/
10220 #ifndef CYTHON_WITHOUT_ASSERTIONS
10221 if (unlikely(__pyx_assertions_enabled())) {
10222 __pyx_t_3 = __pyx_mstate_global->__pyx_kp_u_configuration_density_w_flag_0_a;
10223 __Pyx_INCREF(__pyx_t_3);
10224 __pyx_t_4 = __Pyx_PyLong_From_int(__pyx_v_density_w_flag); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1527, __pyx_L1_error)
10225 __Pyx_GOTREF(__pyx_t_4);
10226 __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_density_n_flag); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1527, __pyx_L1_error)
10227 __Pyx_GOTREF(__pyx_t_5);
10228 __pyx_t_6 = 0;
10229 {
10230 PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_t_4, __pyx_t_5};
10231 __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
10232 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
10233 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
10234 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
10235 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1527, __pyx_L1_error)
10236 __Pyx_GOTREF(__pyx_t_2);
10237 }
10238 if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_2))) __PYX_ERR(0, 1527, __pyx_L1_error)
10239 __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_2, 0, 0);
10240 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10241 __PYX_ERR(0, 1527, __pyx_L1_error)
10242 }
10243 #else
10244 if ((1)); else __PYX_ERR(0, 1527, __pyx_L1_error)
10245 #endif
10246 break;
10247 }
10248
10249 /* "cTwophaseDarcyCoefficients.pyx":1368
10250 * <double*>(df.data), <double*>(a.data), <double*>(da.data))
10251 *
10252 * def twophaseDarcy_slightCompressible_split_sd_saturation_het_matType( int pskModelFlag, # <<<<<<<<<<<<<<
10253 * int density_w_flag,
10254 * int density_n_flag,
10255*/
10256
10257 /* function exit code */
10258 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10259 goto __pyx_L0;
10260 __pyx_L1_error:;
10261 __Pyx_XDECREF(__pyx_t_2);
10262 __Pyx_XDECREF(__pyx_t_3);
10263 __Pyx_XDECREF(__pyx_t_4);
10264 __Pyx_XDECREF(__pyx_t_5);
10265 __Pyx_AddTraceback("cTwophaseDarcyCoefficients.twophaseDarcy_slightCompressible_split_sd_saturation_het_matType", __pyx_clineno, __pyx_lineno, __pyx_filename);
10266 __pyx_r = NULL;
10267 __pyx_L0:;
10268
10269
10270 __Pyx_XGIVEREF(__pyx_r);
10271 __Pyx_RefNannyFinishContext();
10272 return __pyx_r;
10273}
10274
10275/* "cTwophaseDarcyCoefficients.pyx":1529
10276 * assert False, "configuration density_w_flag= {0} and density_n_flag= {1} not found ".format(density_w_flag, density_n_flag)
10277 *
10278 * def twophaseDarcy_compressibleN_split_sd_pressure_het_matType( int pskModelFlag, # <<<<<<<<<<<<<<
10279 * int density_w_flag,
10280 * int density_n_flag,
10281*/
10282
10283/* Python wrapper */
10284static PyObject *__pyx_pw_26cTwophaseDarcyCoefficients_15twophaseDarcy_compressibleN_split_sd_pressure_het_matType(PyObject *__pyx_self,
10285#if CYTHON_VECTORCALL
10286PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
10287#else
10288PyObject *__pyx_args, PyObject *__pyx_kwds
10289#endif
10290); /*proto*/
10291PyDoc_STRVAR(__pyx_doc_26cTwophaseDarcyCoefficients_14twophaseDarcy_compressibleN_split_sd_pressure_het_matType, "Evaluate the pressure coefficients\n\nUse the split fractional flow formulation of compressible non-wetting\nphase, two-phase Darcy flow for a heterogeneous medium, sparse\ndiffusion rep het\n\n ");
10292static PyMethodDef __pyx_mdef_26cTwophaseDarcyCoefficients_15twophaseDarcy_compressibleN_split_sd_pressure_het_matType = {"twophaseDarcy_compressibleN_split_sd_pressure_het_matType", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_26cTwophaseDarcyCoefficients_15twophaseDarcy_compressibleN_split_sd_pressure_het_matType, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_26cTwophaseDarcyCoefficients_14twophaseDarcy_compressibleN_split_sd_pressure_het_matType};
10293static PyObject *__pyx_pw_26cTwophaseDarcyCoefficients_15twophaseDarcy_compressibleN_split_sd_pressure_het_matType(PyObject *__pyx_self,
10294#if CYTHON_VECTORCALL
10295PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
10296#else
10297PyObject *__pyx_args, PyObject *__pyx_kwds
10298#endif
10299) {
10300 int __pyx_v_pskModelFlag;
10301 int __pyx_v_density_w_flag;
10302 int __pyx_v_density_n_flag;
10303 PyArrayObject *__pyx_v_rowptr = 0;
10304 PyArrayObject *__pyx_v_colind = 0;
10305 PyArrayObject *__pyx_v_matType = 0;
10306 double __pyx_v_muw;
10307 double __pyx_v_mun;
10308 PyArrayObject *__pyx_v_omega = 0;
10309 PyArrayObject *__pyx_v_Kbar = 0;
10310 double __pyx_v_b;
10311 double __pyx_v_capillaryDiffusionScaling;
10312 PyArrayObject *__pyx_v_rwork_psk = 0;
10313 PyArrayObject *__pyx_v_iwork_psk = 0;
10314 PyArrayObject *__pyx_v_rwork_psk_tol = 0;
10315 PyArrayObject *__pyx_v_rwork_density_w = 0;
10316 PyArrayObject *__pyx_v_rwork_density_n = 0;
10317 PyArrayObject *__pyx_v_g = 0;
10318 PyArrayObject *__pyx_v_sw = 0;
10319 PyArrayObject *__pyx_v_psiw = 0;
10320 PyArrayObject *__pyx_v_psin = 0;
10321 PyArrayObject *__pyx_v_grad_psic = 0;
10322 PyArrayObject *__pyx_v_m = 0;
10323 PyArrayObject *__pyx_v_dm = 0;
10324 PyArrayObject *__pyx_v_f = 0;
10325 PyArrayObject *__pyx_v_a = 0;
10326 #if !CYTHON_VECTORCALL
10327 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
10328 #endif
10329 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
10330 PyObject* values[26] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
10331 int __pyx_lineno = 0;
10332 const char *__pyx_filename = NULL;
10333 int __pyx_clineno = 0;
10334 PyObject *__pyx_r = 0;
10335 __Pyx_RefNannyDeclarations
10336 __Pyx_RefNannySetupContext("twophaseDarcy_compressibleN_split_sd_pressure_het_matType (wrapper)", 0);
10337 #if !CYTHON_VECTORCALL
10338 #if CYTHON_ASSUME_SAFE_SIZE
10339 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
10340 #else
10341 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
10342 #endif
10343 #endif
10344 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
10345 {
10346 PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pskModelFlag,&__pyx_mstate_global->__pyx_n_u_density_w_flag,&__pyx_mstate_global->__pyx_n_u_density_n_flag,&__pyx_mstate_global->__pyx_n_u_rowptr,&__pyx_mstate_global->__pyx_n_u_colind,&__pyx_mstate_global->__pyx_n_u_matType,&__pyx_mstate_global->__pyx_n_u_muw,&__pyx_mstate_global->__pyx_n_u_mun,&__pyx_mstate_global->__pyx_n_u_omega,&__pyx_mstate_global->__pyx_n_u_Kbar,&__pyx_mstate_global->__pyx_n_u_b,&__pyx_mstate_global->__pyx_n_u_capillaryDiffusionScaling,&__pyx_mstate_global->__pyx_n_u_rwork_psk,&__pyx_mstate_global->__pyx_n_u_iwork_psk,&__pyx_mstate_global->__pyx_n_u_rwork_psk_tol,&__pyx_mstate_global->__pyx_n_u_rwork_density_w,&__pyx_mstate_global->__pyx_n_u_rwork_density_n,&__pyx_mstate_global->__pyx_n_u_g,&__pyx_mstate_global->__pyx_n_u_sw,&__pyx_mstate_global->__pyx_n_u_psiw,&__pyx_mstate_global->__pyx_n_u_psin,&__pyx_mstate_global->__pyx_n_u_grad_psic,&__pyx_mstate_global->__pyx_n_u_m,&__pyx_mstate_global->__pyx_n_u_dm,&__pyx_mstate_global->__pyx_n_u_f,&__pyx_mstate_global->__pyx_n_u_a,0};
10347 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
10348 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1529, __pyx_L3_error)
10349 if (__pyx_kwds_len > 0) {
10350 switch (__pyx_nargs) {
10351 case 26:
10352 values[25] = __Pyx_ArgRef_FASTCALL(__pyx_args, 25);
10353 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[25])) __PYX_ERR(0, 1529, __pyx_L3_error)
10354 CYTHON_FALLTHROUGH;
10355 case 25:
10356 values[24] = __Pyx_ArgRef_FASTCALL(__pyx_args, 24);
10357 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[24])) __PYX_ERR(0, 1529, __pyx_L3_error)
10358 CYTHON_FALLTHROUGH;
10359 case 24:
10360 values[23] = __Pyx_ArgRef_FASTCALL(__pyx_args, 23);
10361 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[23])) __PYX_ERR(0, 1529, __pyx_L3_error)
10362 CYTHON_FALLTHROUGH;
10363 case 23:
10364 values[22] = __Pyx_ArgRef_FASTCALL(__pyx_args, 22);
10365 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[22])) __PYX_ERR(0, 1529, __pyx_L3_error)
10366 CYTHON_FALLTHROUGH;
10367 case 22:
10368 values[21] = __Pyx_ArgRef_FASTCALL(__pyx_args, 21);
10369 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[21])) __PYX_ERR(0, 1529, __pyx_L3_error)
10370 CYTHON_FALLTHROUGH;
10371 case 21:
10372 values[20] = __Pyx_ArgRef_FASTCALL(__pyx_args, 20);
10373 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[20])) __PYX_ERR(0, 1529, __pyx_L3_error)
10374 CYTHON_FALLTHROUGH;
10375 case 20:
10376 values[19] = __Pyx_ArgRef_FASTCALL(__pyx_args, 19);
10377 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[19])) __PYX_ERR(0, 1529, __pyx_L3_error)
10378 CYTHON_FALLTHROUGH;
10379 case 19:
10380 values[18] = __Pyx_ArgRef_FASTCALL(__pyx_args, 18);
10381 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[18])) __PYX_ERR(0, 1529, __pyx_L3_error)
10382 CYTHON_FALLTHROUGH;
10383 case 18:
10384 values[17] = __Pyx_ArgRef_FASTCALL(__pyx_args, 17);
10385 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[17])) __PYX_ERR(0, 1529, __pyx_L3_error)
10386 CYTHON_FALLTHROUGH;
10387 case 17:
10388 values[16] = __Pyx_ArgRef_FASTCALL(__pyx_args, 16);
10389 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[16])) __PYX_ERR(0, 1529, __pyx_L3_error)
10390 CYTHON_FALLTHROUGH;
10391 case 16:
10392 values[15] = __Pyx_ArgRef_FASTCALL(__pyx_args, 15);
10393 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[15])) __PYX_ERR(0, 1529, __pyx_L3_error)
10394 CYTHON_FALLTHROUGH;
10395 case 15:
10396 values[14] = __Pyx_ArgRef_FASTCALL(__pyx_args, 14);
10397 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[14])) __PYX_ERR(0, 1529, __pyx_L3_error)
10398 CYTHON_FALLTHROUGH;
10399 case 14:
10400 values[13] = __Pyx_ArgRef_FASTCALL(__pyx_args, 13);
10401 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[13])) __PYX_ERR(0, 1529, __pyx_L3_error)
10402 CYTHON_FALLTHROUGH;
10403 case 13:
10404 values[12] = __Pyx_ArgRef_FASTCALL(__pyx_args, 12);
10405 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[12])) __PYX_ERR(0, 1529, __pyx_L3_error)
10406 CYTHON_FALLTHROUGH;
10407 case 12:
10408 values[11] = __Pyx_ArgRef_FASTCALL(__pyx_args, 11);
10409 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[11])) __PYX_ERR(0, 1529, __pyx_L3_error)
10410 CYTHON_FALLTHROUGH;
10411 case 11:
10412 values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10);
10413 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 1529, __pyx_L3_error)
10414 CYTHON_FALLTHROUGH;
10415 case 10:
10416 values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
10417 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 1529, __pyx_L3_error)
10418 CYTHON_FALLTHROUGH;
10419 case 9:
10420 values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
10421 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 1529, __pyx_L3_error)
10422 CYTHON_FALLTHROUGH;
10423 case 8:
10424 values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
10425 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 1529, __pyx_L3_error)
10426 CYTHON_FALLTHROUGH;
10427 case 7:
10428 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
10429 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 1529, __pyx_L3_error)
10430 CYTHON_FALLTHROUGH;
10431 case 6:
10432 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
10433 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1529, __pyx_L3_error)
10434 CYTHON_FALLTHROUGH;
10435 case 5:
10436 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
10437 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1529, __pyx_L3_error)
10438 CYTHON_FALLTHROUGH;
10439 case 4:
10440 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
10441 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1529, __pyx_L3_error)
10442 CYTHON_FALLTHROUGH;
10443 case 3:
10444 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
10445 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1529, __pyx_L3_error)
10446 CYTHON_FALLTHROUGH;
10447 case 2:
10448 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
10449 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1529, __pyx_L3_error)
10450 CYTHON_FALLTHROUGH;
10451 case 1:
10452 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
10453 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1529, __pyx_L3_error)
10454 CYTHON_FALLTHROUGH;
10455 case 0: break;
10456 default: goto __pyx_L5_argtuple_error;
10457 }
10458 const Py_ssize_t kwd_pos_args = __pyx_nargs;
10459 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "twophaseDarcy_compressibleN_split_sd_pressure_het_matType", 0) < (0)) __PYX_ERR(0, 1529, __pyx_L3_error)
10460 for (Py_ssize_t i = __pyx_nargs; i < 26; i++) {
10461 if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("twophaseDarcy_compressibleN_split_sd_pressure_het_matType", 1, 26, 26, i); __PYX_ERR(0, 1529, __pyx_L3_error) }
10462 }
10463 } else if (unlikely(__pyx_nargs != 26)) {
10464 goto __pyx_L5_argtuple_error;
10465 } else {
10466 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
10467 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1529, __pyx_L3_error)
10468 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
10469 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1529, __pyx_L3_error)
10470 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
10471 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1529, __pyx_L3_error)
10472 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
10473 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1529, __pyx_L3_error)
10474 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
10475 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1529, __pyx_L3_error)
10476 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
10477 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1529, __pyx_L3_error)
10478 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
10479 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 1529, __pyx_L3_error)
10480 values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
10481 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 1529, __pyx_L3_error)
10482 values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
10483 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 1529, __pyx_L3_error)
10484 values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
10485 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 1529, __pyx_L3_error)
10486 values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10);
10487 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 1529, __pyx_L3_error)
10488 values[11] = __Pyx_ArgRef_FASTCALL(__pyx_args, 11);
10489 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[11])) __PYX_ERR(0, 1529, __pyx_L3_error)
10490 values[12] = __Pyx_ArgRef_FASTCALL(__pyx_args, 12);
10491 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[12])) __PYX_ERR(0, 1529, __pyx_L3_error)
10492 values[13] = __Pyx_ArgRef_FASTCALL(__pyx_args, 13);
10493 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[13])) __PYX_ERR(0, 1529, __pyx_L3_error)
10494 values[14] = __Pyx_ArgRef_FASTCALL(__pyx_args, 14);
10495 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[14])) __PYX_ERR(0, 1529, __pyx_L3_error)
10496 values[15] = __Pyx_ArgRef_FASTCALL(__pyx_args, 15);
10497 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[15])) __PYX_ERR(0, 1529, __pyx_L3_error)
10498 values[16] = __Pyx_ArgRef_FASTCALL(__pyx_args, 16);
10499 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[16])) __PYX_ERR(0, 1529, __pyx_L3_error)
10500 values[17] = __Pyx_ArgRef_FASTCALL(__pyx_args, 17);
10501 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[17])) __PYX_ERR(0, 1529, __pyx_L3_error)
10502 values[18] = __Pyx_ArgRef_FASTCALL(__pyx_args, 18);
10503 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[18])) __PYX_ERR(0, 1529, __pyx_L3_error)
10504 values[19] = __Pyx_ArgRef_FASTCALL(__pyx_args, 19);
10505 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[19])) __PYX_ERR(0, 1529, __pyx_L3_error)
10506 values[20] = __Pyx_ArgRef_FASTCALL(__pyx_args, 20);
10507 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[20])) __PYX_ERR(0, 1529, __pyx_L3_error)
10508 values[21] = __Pyx_ArgRef_FASTCALL(__pyx_args, 21);
10509 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[21])) __PYX_ERR(0, 1529, __pyx_L3_error)
10510 values[22] = __Pyx_ArgRef_FASTCALL(__pyx_args, 22);
10511 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[22])) __PYX_ERR(0, 1529, __pyx_L3_error)
10512 values[23] = __Pyx_ArgRef_FASTCALL(__pyx_args, 23);
10513 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[23])) __PYX_ERR(0, 1529, __pyx_L3_error)
10514 values[24] = __Pyx_ArgRef_FASTCALL(__pyx_args, 24);
10515 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[24])) __PYX_ERR(0, 1529, __pyx_L3_error)
10516 values[25] = __Pyx_ArgRef_FASTCALL(__pyx_args, 25);
10517 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[25])) __PYX_ERR(0, 1529, __pyx_L3_error)
10518 }
10519 __pyx_v_pskModelFlag = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_pskModelFlag == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1529, __pyx_L3_error)
10520 __pyx_v_density_w_flag = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_density_w_flag == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1530, __pyx_L3_error)
10521 __pyx_v_density_n_flag = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_density_n_flag == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1531, __pyx_L3_error)
10522 __pyx_v_rowptr = ((PyArrayObject *)values[3]);
10523 __pyx_v_colind = ((PyArrayObject *)values[4]);
10524 __pyx_v_matType = ((PyArrayObject *)values[5]);
10525 __pyx_v_muw = __Pyx_PyFloat_AsDouble(values[6]); if (unlikely((__pyx_v_muw == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1535, __pyx_L3_error)
10526 __pyx_v_mun = __Pyx_PyFloat_AsDouble(values[7]); if (unlikely((__pyx_v_mun == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1536, __pyx_L3_error)
10527 __pyx_v_omega = ((PyArrayObject *)values[8]);
10528 __pyx_v_Kbar = ((PyArrayObject *)values[9]);
10529 __pyx_v_b = __Pyx_PyFloat_AsDouble(values[10]); if (unlikely((__pyx_v_b == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1539, __pyx_L3_error)
10530 __pyx_v_capillaryDiffusionScaling = __Pyx_PyFloat_AsDouble(values[11]); if (unlikely((__pyx_v_capillaryDiffusionScaling == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1540, __pyx_L3_error)
10531 __pyx_v_rwork_psk = ((PyArrayObject *)values[12]);
10532 __pyx_v_iwork_psk = ((PyArrayObject *)values[13]);
10533 __pyx_v_rwork_psk_tol = ((PyArrayObject *)values[14]);
10534 __pyx_v_rwork_density_w = ((PyArrayObject *)values[15]);
10535 __pyx_v_rwork_density_n = ((PyArrayObject *)values[16]);
10536 __pyx_v_g = ((PyArrayObject *)values[17]);
10537 __pyx_v_sw = ((PyArrayObject *)values[18]);
10538 __pyx_v_psiw = ((PyArrayObject *)values[19]);
10539 __pyx_v_psin = ((PyArrayObject *)values[20]);
10540 __pyx_v_grad_psic = ((PyArrayObject *)values[21]);
10541 __pyx_v_m = ((PyArrayObject *)values[22]);
10542 __pyx_v_dm = ((PyArrayObject *)values[23]);
10543 __pyx_v_f = ((PyArrayObject *)values[24]);
10544 __pyx_v_a = ((PyArrayObject *)values[25]);
10545 }
10546 goto __pyx_L6_skip;
10547 __pyx_L5_argtuple_error:;
10548 __Pyx_RaiseArgtupleInvalid("twophaseDarcy_compressibleN_split_sd_pressure_het_matType", 1, 26, 26, __pyx_nargs); __PYX_ERR(0, 1529, __pyx_L3_error)
10549 __pyx_L6_skip:;
10550 goto __pyx_L4_argument_unpacking_done;
10551 __pyx_L3_error:;
10552 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
10553 Py_XDECREF(values[__pyx_temp]);
10554 }
10555 __Pyx_AddTraceback("cTwophaseDarcyCoefficients.twophaseDarcy_compressibleN_split_sd_pressure_het_matType", __pyx_clineno, __pyx_lineno, __pyx_filename);
10556 __Pyx_RefNannyFinishContext();
10557 return NULL;
10558 __pyx_L4_argument_unpacking_done:;
10559 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rowptr), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "rowptr", 0))) __PYX_ERR(0, 1532, __pyx_L1_error)
10560 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_colind), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "colind", 0))) __PYX_ERR(0, 1533, __pyx_L1_error)
10561 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_matType), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "matType", 0))) __PYX_ERR(0, 1534, __pyx_L1_error)
10562 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_omega), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "omega", 0))) __PYX_ERR(0, 1537, __pyx_L1_error)
10563 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Kbar), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "Kbar", 0))) __PYX_ERR(0, 1538, __pyx_L1_error)
10564 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_psk), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "rwork_psk", 0))) __PYX_ERR(0, 1541, __pyx_L1_error)
10565 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork_psk), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "iwork_psk", 0))) __PYX_ERR(0, 1542, __pyx_L1_error)
10566 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_psk_tol), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "rwork_psk_tol", 0))) __PYX_ERR(0, 1543, __pyx_L1_error)
10567 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_density_w), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "rwork_density_w", 0))) __PYX_ERR(0, 1544, __pyx_L1_error)
10568 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_density_n), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "rwork_density_n", 0))) __PYX_ERR(0, 1545, __pyx_L1_error)
10569 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_g), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "g", 0))) __PYX_ERR(0, 1546, __pyx_L1_error)
10570 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "sw", 0))) __PYX_ERR(0, 1546, __pyx_L1_error)
10571 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_psiw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "psiw", 0))) __PYX_ERR(0, 1546, __pyx_L1_error)
10572 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_psin), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "psin", 0))) __PYX_ERR(0, 1546, __pyx_L1_error)
10573 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_psic), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "grad_psic", 0))) __PYX_ERR(0, 1546, __pyx_L1_error)
10574 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_m), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "m", 0))) __PYX_ERR(0, 1546, __pyx_L1_error)
10575 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dm), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "dm", 0))) __PYX_ERR(0, 1546, __pyx_L1_error)
10576 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_f), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "f", 0))) __PYX_ERR(0, 1546, __pyx_L1_error)
10577 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "a", 0))) __PYX_ERR(0, 1546, __pyx_L1_error)
10578 __pyx_r = __pyx_pf_26cTwophaseDarcyCoefficients_14twophaseDarcy_compressibleN_split_sd_pressure_het_matType(__pyx_self, __pyx_v_pskModelFlag, __pyx_v_density_w_flag, __pyx_v_density_n_flag, __pyx_v_rowptr, __pyx_v_colind, __pyx_v_matType, __pyx_v_muw, __pyx_v_mun, __pyx_v_omega, __pyx_v_Kbar, __pyx_v_b, __pyx_v_capillaryDiffusionScaling, __pyx_v_rwork_psk, __pyx_v_iwork_psk, __pyx_v_rwork_psk_tol, __pyx_v_rwork_density_w, __pyx_v_rwork_density_n, __pyx_v_g, __pyx_v_sw, __pyx_v_psiw, __pyx_v_psin, __pyx_v_grad_psic, __pyx_v_m, __pyx_v_dm, __pyx_v_f, __pyx_v_a);
10579
10580 /* function exit code */
10581 goto __pyx_L0;
10582 __pyx_L1_error:;
10583 __pyx_r = NULL;
10584 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
10585 Py_XDECREF(values[__pyx_temp]);
10586 }
10587 goto __pyx_L7_cleaned_up;
10588 __pyx_L0:;
10589 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
10590 Py_XDECREF(values[__pyx_temp]);
10591 }
10592 __pyx_L7_cleaned_up:;
10593
10594
10595
10596
10597
10598
10599
10600 __Pyx_RefNannyFinishContext();
10601 return __pyx_r;
10602}
10603
10604static 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) {
10605 int __pyx_v_nPointsPerSimplex;
10606 int __pyx_v_nSimplex;
10607 PyObject *__pyx_r = NULL;
10608 __Pyx_RefNannyDeclarations
10609 npy_intp __pyx_t_1;
10610 PyObject *__pyx_t_2 = NULL;
10611 PyObject *__pyx_t_3 = NULL;
10612 PyObject *__pyx_t_4 = NULL;
10613 PyObject *__pyx_t_5 = NULL;
10614 size_t __pyx_t_6;
10615 int __pyx_lineno = 0;
10616 const char *__pyx_filename = NULL;
10617 int __pyx_clineno = 0;
10618 __Pyx_RefNannySetupContext("twophaseDarcy_compressibleN_split_sd_pressure_het_matType", 0);
10619
10620 /* "cTwophaseDarcyCoefficients.pyx":1554
10621 *
10622 * """
10623 * cdef int nPointsPerSimplex=sw.shape[sw.ndim-1] # <<<<<<<<<<<<<<
10624 * cdef int nSimplex=sw.size//nPointsPerSimplex
10625 * if density_n_flag == 1: #nonwetting exponential
10626*/
10627 __pyx_v_nPointsPerSimplex = (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_sw)[(__pyx_f_5numpy_7ndarray_4ndim___get__(__pyx_v_sw) - 1)]);
10628
10629 /* "cTwophaseDarcyCoefficients.pyx":1555
10630 * """
10631 * cdef int nPointsPerSimplex=sw.shape[sw.ndim-1]
10632 * cdef int nSimplex=sw.size//nPointsPerSimplex # <<<<<<<<<<<<<<
10633 * if density_n_flag == 1: #nonwetting exponential
10634 * if pskModelFlag == 0:
10635*/
10636 __pyx_t_1 = __pyx_f_5numpy_7ndarray_4size___get__(__pyx_v_sw);
10637
10638 if (unlikely(__pyx_v_nPointsPerSimplex == 0)) {
10639 PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
10640 __PYX_ERR(0, 1555, __pyx_L1_error)
10641 }
10642 else if (sizeof(npy_intp) == sizeof(long) && (!(((int)-1) > 0)) && unlikely(__pyx_v_nPointsPerSimplex == (int)-1) && unlikely(__Pyx_UNARY_NEG_WOULD_OVERFLOW(__pyx_t_1))) {
10643 PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
10644 __PYX_ERR(0, 1555, __pyx_L1_error)
10645 }
10646 __pyx_v_nSimplex = __Pyx_div_npy_intp(__pyx_t_1, __pyx_v_nPointsPerSimplex, 0);
10647
10648
10649 /* "cTwophaseDarcyCoefficients.pyx":1556
10650 * cdef int nPointsPerSimplex=sw.shape[sw.ndim-1]
10651 * cdef int nSimplex=sw.size//nPointsPerSimplex
10652 * if density_n_flag == 1: #nonwetting exponential # <<<<<<<<<<<<<<
10653 * if pskModelFlag == 0:
10654 * tpdc.twophaseDarcy_compressibleN_split_sd_pressure_het_matType[SimplePSK,ExponentialDensity](nSimplex,
10655*/
10656 switch (__pyx_v_density_n_flag) {
10657 case 1:
10658
10659 /* "cTwophaseDarcyCoefficients.pyx":1557
10660 * cdef int nSimplex=sw.size//nPointsPerSimplex
10661 * if density_n_flag == 1: #nonwetting exponential
10662 * if pskModelFlag == 0: # <<<<<<<<<<<<<<
10663 * tpdc.twophaseDarcy_compressibleN_split_sd_pressure_het_matType[SimplePSK,ExponentialDensity](nSimplex,
10664 * nPointsPerSimplex,
10665*/
10666 switch (__pyx_v_pskModelFlag) {
10667 case 0:
10668
10669 /* "cTwophaseDarcyCoefficients.pyx":1558
10670 * if density_n_flag == 1: #nonwetting exponential
10671 * if pskModelFlag == 0:
10672 * tpdc.twophaseDarcy_compressibleN_split_sd_pressure_het_matType[SimplePSK,ExponentialDensity](nSimplex, # <<<<<<<<<<<<<<
10673 * nPointsPerSimplex,
10674 * g.shape[0],
10675*/
10676 (void)(twophaseDarcy_compressibleN_split_sd_pressure_het_matType<SimplePSK,ExponentialDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_g)[0]), 2, ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rowptr)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_colind)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_matType)), __pyx_v_muw, __pyx_v_mun, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_omega)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Kbar)), __pyx_v_b, __pyx_v_capillaryDiffusionScaling, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_iwork_psk)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk_tol)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_w)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_n)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_g)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_sw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psin)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_grad_psic)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_m)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dm)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_f)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_a))));
10677
10678 /* "cTwophaseDarcyCoefficients.pyx":1557
10679 * cdef int nSimplex=sw.size//nPointsPerSimplex
10680 * if density_n_flag == 1: #nonwetting exponential
10681 * if pskModelFlag == 0: # <<<<<<<<<<<<<<
10682 * tpdc.twophaseDarcy_compressibleN_split_sd_pressure_het_matType[SimplePSK,ExponentialDensity](nSimplex,
10683 * nPointsPerSimplex,
10684*/
10685 break;
10686 case 1:
10687
10688 /* "cTwophaseDarcyCoefficients.pyx":1578
10689 * <double*>(m.data), <double*>(dm.data), <double*>(f.data), <double*>(a.data))
10690 * elif pskModelFlag == 1:
10691 * tpdc.twophaseDarcy_compressibleN_split_sd_pressure_het_matType[VGM,ExponentialDensity](nSimplex, # <<<<<<<<<<<<<<
10692 * nPointsPerSimplex,
10693 * g.shape[0],
10694*/
10695 (void)(twophaseDarcy_compressibleN_split_sd_pressure_het_matType<VGM,ExponentialDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_g)[0]), 4, ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rowptr)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_colind)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_matType)), __pyx_v_muw, __pyx_v_mun, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_omega)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Kbar)), __pyx_v_b, __pyx_v_capillaryDiffusionScaling, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_iwork_psk)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk_tol)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_w)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_n)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_g)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_sw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psin)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_grad_psic)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_m)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dm)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_f)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_a))));
10696
10697 /* "cTwophaseDarcyCoefficients.pyx":1577
10698 * <double*>(g.data), <double*>(sw.data), <double*>(psiw.data), <double*>(psin.data), <double*>(grad_psic.data),
10699 * <double*>(m.data), <double*>(dm.data), <double*>(f.data), <double*>(a.data))
10700 * elif pskModelFlag == 1: # <<<<<<<<<<<<<<
10701 * tpdc.twophaseDarcy_compressibleN_split_sd_pressure_het_matType[VGM,ExponentialDensity](nSimplex,
10702 * nPointsPerSimplex,
10703*/
10704 break;
10705 default:
10706
10707 /* "cTwophaseDarcyCoefficients.pyx":1598
10708 * <double*>(m.data), <double*>(dm.data), <double*>(f.data), <double*>(a.data))
10709 * else:
10710 * tpdc.twophaseDarcy_compressibleN_split_sd_pressure_het_matType[VGM,ExponentialDensity](nSimplex, # <<<<<<<<<<<<<<
10711 * nPointsPerSimplex,
10712 * g.shape[0],
10713*/
10714 (void)(twophaseDarcy_compressibleN_split_sd_pressure_het_matType<VGM,ExponentialDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_g)[0]), 4, ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rowptr)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_colind)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_matType)), __pyx_v_muw, __pyx_v_mun, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_omega)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Kbar)), __pyx_v_b, __pyx_v_capillaryDiffusionScaling, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_iwork_psk)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk_tol)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_w)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_n)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_g)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_sw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psin)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_grad_psic)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_m)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dm)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_f)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_a))));
10715 break;
10716 }
10717
10718 /* "cTwophaseDarcyCoefficients.pyx":1556
10719 * cdef int nPointsPerSimplex=sw.shape[sw.ndim-1]
10720 * cdef int nSimplex=sw.size//nPointsPerSimplex
10721 * if density_n_flag == 1: #nonwetting exponential # <<<<<<<<<<<<<<
10722 * if pskModelFlag == 0:
10723 * tpdc.twophaseDarcy_compressibleN_split_sd_pressure_het_matType[SimplePSK,ExponentialDensity](nSimplex,
10724*/
10725 break;
10726 case 2:
10727
10728 /* "cTwophaseDarcyCoefficients.pyx":1619
10729 * <double*>(m.data), <double*>(dm.data), <double*>(f.data), <double*>(a.data))
10730 * elif density_n_flag == 2: #nonwetting IdealGas
10731 * if pskModelFlag == 0: # <<<<<<<<<<<<<<
10732 * tpdc.twophaseDarcy_compressibleN_split_sd_pressure_het_matType[SimplePSK,IdealGasDensity](nSimplex,
10733 * nPointsPerSimplex,
10734*/
10735 switch (__pyx_v_pskModelFlag) {
10736 case 0:
10737
10738 /* "cTwophaseDarcyCoefficients.pyx":1620
10739 * elif density_n_flag == 2: #nonwetting IdealGas
10740 * if pskModelFlag == 0:
10741 * tpdc.twophaseDarcy_compressibleN_split_sd_pressure_het_matType[SimplePSK,IdealGasDensity](nSimplex, # <<<<<<<<<<<<<<
10742 * nPointsPerSimplex,
10743 * g.shape[0],
10744*/
10745 (void)(twophaseDarcy_compressibleN_split_sd_pressure_het_matType<SimplePSK,IdealGasDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_g)[0]), 2, ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rowptr)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_colind)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_matType)), __pyx_v_muw, __pyx_v_mun, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_omega)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Kbar)), __pyx_v_b, __pyx_v_capillaryDiffusionScaling, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_iwork_psk)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk_tol)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_w)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_n)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_g)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_sw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psin)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_grad_psic)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_m)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dm)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_f)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_a))));
10746
10747 /* "cTwophaseDarcyCoefficients.pyx":1619
10748 * <double*>(m.data), <double*>(dm.data), <double*>(f.data), <double*>(a.data))
10749 * elif density_n_flag == 2: #nonwetting IdealGas
10750 * if pskModelFlag == 0: # <<<<<<<<<<<<<<
10751 * tpdc.twophaseDarcy_compressibleN_split_sd_pressure_het_matType[SimplePSK,IdealGasDensity](nSimplex,
10752 * nPointsPerSimplex,
10753*/
10754 break;
10755 case 1:
10756
10757 /* "cTwophaseDarcyCoefficients.pyx":1641
10758 * <double*>(m.data), <double*>(dm.data), <double*>(f.data), <double*>(a.data))
10759 * elif pskModelFlag == 1:
10760 * tpdc.twophaseDarcy_compressibleN_split_sd_pressure_het_matType[VGM,IdealGasDensity](nSimplex, # <<<<<<<<<<<<<<
10761 * nPointsPerSimplex,
10762 * g.shape[0],
10763*/
10764 (void)(twophaseDarcy_compressibleN_split_sd_pressure_het_matType<VGM,IdealGasDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_g)[0]), 4, ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rowptr)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_colind)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_matType)), __pyx_v_muw, __pyx_v_mun, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_omega)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Kbar)), __pyx_v_b, __pyx_v_capillaryDiffusionScaling, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_iwork_psk)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk_tol)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_w)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_n)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_g)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_sw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psin)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_grad_psic)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_m)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dm)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_f)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_a))));
10765
10766 /* "cTwophaseDarcyCoefficients.pyx":1640
10767 * <double*>(g.data), <double*>(sw.data), <double*>(psiw.data), <double*>(psin.data), <double*>(grad_psic.data),
10768 * <double*>(m.data), <double*>(dm.data), <double*>(f.data), <double*>(a.data))
10769 * elif pskModelFlag == 1: # <<<<<<<<<<<<<<
10770 * tpdc.twophaseDarcy_compressibleN_split_sd_pressure_het_matType[VGM,IdealGasDensity](nSimplex,
10771 * nPointsPerSimplex,
10772*/
10773 break;
10774 default:
10775
10776 /* "cTwophaseDarcyCoefficients.pyx":1662
10777 * <double*>(m.data), <double*>(dm.data), <double*>(f.data), <double*>(a.data))
10778 * else:
10779 * tpdc.twophaseDarcy_compressibleN_split_sd_pressure_het_matType[VGM,IdealGasDensity](nSimplex, # <<<<<<<<<<<<<<
10780 * nPointsPerSimplex,
10781 * g.shape[0],
10782*/
10783 (void)(twophaseDarcy_compressibleN_split_sd_pressure_het_matType<VGM,IdealGasDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_g)[0]), 4, ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rowptr)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_colind)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_matType)), __pyx_v_muw, __pyx_v_mun, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_omega)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Kbar)), __pyx_v_b, __pyx_v_capillaryDiffusionScaling, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_iwork_psk)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk_tol)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_w)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_n)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_g)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_sw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psin)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_grad_psic)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_m)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dm)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_f)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_a))));
10784 break;
10785 }
10786
10787 /* "cTwophaseDarcyCoefficients.pyx":1618
10788 * <double*>(g.data), <double*>(sw.data), <double*>(psiw.data), <double*>(psin.data), <double*>(grad_psic.data),
10789 * <double*>(m.data), <double*>(dm.data), <double*>(f.data), <double*>(a.data))
10790 * elif density_n_flag == 2: #nonwetting IdealGas # <<<<<<<<<<<<<<
10791 * if pskModelFlag == 0:
10792 * tpdc.twophaseDarcy_compressibleN_split_sd_pressure_het_matType[SimplePSK,IdealGasDensity](nSimplex,
10793*/
10794 break;
10795 default:
10796
10797 /* "cTwophaseDarcyCoefficients.pyx":1683
10798 * <double*>(m.data), <double*>(dm.data), <double*>(f.data), <double*>(a.data))
10799 * else:
10800 * assert False, "configuration density_w_flag= {0} and density_n_flag= {1} not found ".format(density_w_flag, density_n_flag) # <<<<<<<<<<<<<<
10801 *
10802 * def twophaseDarcy_compressibleN_split_sd_saturation_het_matType( int pskModelFlag,
10803*/
10804 #ifndef CYTHON_WITHOUT_ASSERTIONS
10805 if (unlikely(__pyx_assertions_enabled())) {
10806 __pyx_t_3 = __pyx_mstate_global->__pyx_kp_u_configuration_density_w_flag_0_a;
10807 __Pyx_INCREF(__pyx_t_3);
10808 __pyx_t_4 = __Pyx_PyLong_From_int(__pyx_v_density_w_flag); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1683, __pyx_L1_error)
10809 __Pyx_GOTREF(__pyx_t_4);
10810 __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_density_n_flag); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1683, __pyx_L1_error)
10811 __Pyx_GOTREF(__pyx_t_5);
10812 __pyx_t_6 = 0;
10813 {
10814 PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_t_4, __pyx_t_5};
10815 __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
10816 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
10817 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
10818 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
10819 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1683, __pyx_L1_error)
10820 __Pyx_GOTREF(__pyx_t_2);
10821 }
10822 if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_2))) __PYX_ERR(0, 1683, __pyx_L1_error)
10823 __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_2, 0, 0);
10824 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10825 __PYX_ERR(0, 1683, __pyx_L1_error)
10826 }
10827 #else
10828 if ((1)); else __PYX_ERR(0, 1683, __pyx_L1_error)
10829 #endif
10830 break;
10831 }
10832
10833 /* "cTwophaseDarcyCoefficients.pyx":1529
10834 * assert False, "configuration density_w_flag= {0} and density_n_flag= {1} not found ".format(density_w_flag, density_n_flag)
10835 *
10836 * def twophaseDarcy_compressibleN_split_sd_pressure_het_matType( int pskModelFlag, # <<<<<<<<<<<<<<
10837 * int density_w_flag,
10838 * int density_n_flag,
10839*/
10840
10841 /* function exit code */
10842 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10843 goto __pyx_L0;
10844 __pyx_L1_error:;
10845 __Pyx_XDECREF(__pyx_t_2);
10846 __Pyx_XDECREF(__pyx_t_3);
10847 __Pyx_XDECREF(__pyx_t_4);
10848 __Pyx_XDECREF(__pyx_t_5);
10849 __Pyx_AddTraceback("cTwophaseDarcyCoefficients.twophaseDarcy_compressibleN_split_sd_pressure_het_matType", __pyx_clineno, __pyx_lineno, __pyx_filename);
10850 __pyx_r = NULL;
10851 __pyx_L0:;
10852
10853
10854 __Pyx_XGIVEREF(__pyx_r);
10855 __Pyx_RefNannyFinishContext();
10856 return __pyx_r;
10857}
10858
10859/* "cTwophaseDarcyCoefficients.pyx":1685
10860 * assert False, "configuration density_w_flag= {0} and density_n_flag= {1} not found ".format(density_w_flag, density_n_flag)
10861 *
10862 * def twophaseDarcy_compressibleN_split_sd_saturation_het_matType( int pskModelFlag, # <<<<<<<<<<<<<<
10863 * int density_w_flag,
10864 * int density_n_flag,
10865*/
10866
10867/* Python wrapper */
10868static PyObject *__pyx_pw_26cTwophaseDarcyCoefficients_17twophaseDarcy_compressibleN_split_sd_saturation_het_matType(PyObject *__pyx_self,
10869#if CYTHON_VECTORCALL
10870PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
10871#else
10872PyObject *__pyx_args, PyObject *__pyx_kwds
10873#endif
10874); /*proto*/
10875PyDoc_STRVAR(__pyx_doc_26cTwophaseDarcyCoefficients_16twophaseDarcy_compressibleN_split_sd_saturation_het_matType, "Evaluate the saturation coefficients\n\nUse the split fractional flow formulation of compressible non-wetting\nphase, two-phase Darcy flow for a heterogeneous medium, sparse\ndiffusion rep het\n\n ");
10876static PyMethodDef __pyx_mdef_26cTwophaseDarcyCoefficients_17twophaseDarcy_compressibleN_split_sd_saturation_het_matType = {"twophaseDarcy_compressibleN_split_sd_saturation_het_matType", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_26cTwophaseDarcyCoefficients_17twophaseDarcy_compressibleN_split_sd_saturation_het_matType, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_26cTwophaseDarcyCoefficients_16twophaseDarcy_compressibleN_split_sd_saturation_het_matType};
10877static PyObject *__pyx_pw_26cTwophaseDarcyCoefficients_17twophaseDarcy_compressibleN_split_sd_saturation_het_matType(PyObject *__pyx_self,
10878#if CYTHON_VECTORCALL
10879PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
10880#else
10881PyObject *__pyx_args, PyObject *__pyx_kwds
10882#endif
10883) {
10884 int __pyx_v_pskModelFlag;
10885 int __pyx_v_density_w_flag;
10886 int __pyx_v_density_n_flag;
10887 PyArrayObject *__pyx_v_rowptr = 0;
10888 PyArrayObject *__pyx_v_colind = 0;
10889 PyArrayObject *__pyx_v_matType = 0;
10890 double __pyx_v_muw;
10891 double __pyx_v_mun;
10892 PyArrayObject *__pyx_v_omega = 0;
10893 PyArrayObject *__pyx_v_Kbar = 0;
10894 double __pyx_v_b;
10895 double __pyx_v_capillaryDiffusionScaling;
10896 double __pyx_v_advectionScaling;
10897 PyArrayObject *__pyx_v_rwork_psk = 0;
10898 PyArrayObject *__pyx_v_iwork_psk = 0;
10899 PyArrayObject *__pyx_v_rwork_psk_tol = 0;
10900 PyArrayObject *__pyx_v_rwork_density_w = 0;
10901 PyArrayObject *__pyx_v_rwork_density_n = 0;
10902 PyArrayObject *__pyx_v_g = 0;
10903 PyArrayObject *__pyx_v_qt = 0;
10904 PyArrayObject *__pyx_v_psiw = 0;
10905 PyArrayObject *__pyx_v_sw = 0;
10906 PyArrayObject *__pyx_v_m = 0;
10907 PyArrayObject *__pyx_v_dm = 0;
10908 PyArrayObject *__pyx_v_phi = 0;
10909 PyArrayObject *__pyx_v_dphi = 0;
10910 PyArrayObject *__pyx_v_f = 0;
10911 PyArrayObject *__pyx_v_df = 0;
10912 PyArrayObject *__pyx_v_a = 0;
10913 PyArrayObject *__pyx_v_da = 0;
10914 #if !CYTHON_VECTORCALL
10915 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
10916 #endif
10917 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
10918 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};
10919 int __pyx_lineno = 0;
10920 const char *__pyx_filename = NULL;
10921 int __pyx_clineno = 0;
10922 PyObject *__pyx_r = 0;
10923 __Pyx_RefNannyDeclarations
10924 __Pyx_RefNannySetupContext("twophaseDarcy_compressibleN_split_sd_saturation_het_matType (wrapper)", 0);
10925 #if !CYTHON_VECTORCALL
10926 #if CYTHON_ASSUME_SAFE_SIZE
10927 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
10928 #else
10929 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
10930 #endif
10931 #endif
10932 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
10933 {
10934 PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pskModelFlag,&__pyx_mstate_global->__pyx_n_u_density_w_flag,&__pyx_mstate_global->__pyx_n_u_density_n_flag,&__pyx_mstate_global->__pyx_n_u_rowptr,&__pyx_mstate_global->__pyx_n_u_colind,&__pyx_mstate_global->__pyx_n_u_matType,&__pyx_mstate_global->__pyx_n_u_muw,&__pyx_mstate_global->__pyx_n_u_mun,&__pyx_mstate_global->__pyx_n_u_omega,&__pyx_mstate_global->__pyx_n_u_Kbar,&__pyx_mstate_global->__pyx_n_u_b,&__pyx_mstate_global->__pyx_n_u_capillaryDiffusionScaling,&__pyx_mstate_global->__pyx_n_u_advectionScaling,&__pyx_mstate_global->__pyx_n_u_rwork_psk,&__pyx_mstate_global->__pyx_n_u_iwork_psk,&__pyx_mstate_global->__pyx_n_u_rwork_psk_tol,&__pyx_mstate_global->__pyx_n_u_rwork_density_w,&__pyx_mstate_global->__pyx_n_u_rwork_density_n,&__pyx_mstate_global->__pyx_n_u_g,&__pyx_mstate_global->__pyx_n_u_qt,&__pyx_mstate_global->__pyx_n_u_psiw,&__pyx_mstate_global->__pyx_n_u_sw,&__pyx_mstate_global->__pyx_n_u_m,&__pyx_mstate_global->__pyx_n_u_dm,&__pyx_mstate_global->__pyx_n_u_phi,&__pyx_mstate_global->__pyx_n_u_dphi,&__pyx_mstate_global->__pyx_n_u_f,&__pyx_mstate_global->__pyx_n_u_df,&__pyx_mstate_global->__pyx_n_u_a,&__pyx_mstate_global->__pyx_n_u_da,0};
10935 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
10936 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1685, __pyx_L3_error)
10937 if (__pyx_kwds_len > 0) {
10938 switch (__pyx_nargs) {
10939 case 30:
10940 values[29] = __Pyx_ArgRef_FASTCALL(__pyx_args, 29);
10941 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[29])) __PYX_ERR(0, 1685, __pyx_L3_error)
10942 CYTHON_FALLTHROUGH;
10943 case 29:
10944 values[28] = __Pyx_ArgRef_FASTCALL(__pyx_args, 28);
10945 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[28])) __PYX_ERR(0, 1685, __pyx_L3_error)
10946 CYTHON_FALLTHROUGH;
10947 case 28:
10948 values[27] = __Pyx_ArgRef_FASTCALL(__pyx_args, 27);
10949 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[27])) __PYX_ERR(0, 1685, __pyx_L3_error)
10950 CYTHON_FALLTHROUGH;
10951 case 27:
10952 values[26] = __Pyx_ArgRef_FASTCALL(__pyx_args, 26);
10953 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[26])) __PYX_ERR(0, 1685, __pyx_L3_error)
10954 CYTHON_FALLTHROUGH;
10955 case 26:
10956 values[25] = __Pyx_ArgRef_FASTCALL(__pyx_args, 25);
10957 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[25])) __PYX_ERR(0, 1685, __pyx_L3_error)
10958 CYTHON_FALLTHROUGH;
10959 case 25:
10960 values[24] = __Pyx_ArgRef_FASTCALL(__pyx_args, 24);
10961 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[24])) __PYX_ERR(0, 1685, __pyx_L3_error)
10962 CYTHON_FALLTHROUGH;
10963 case 24:
10964 values[23] = __Pyx_ArgRef_FASTCALL(__pyx_args, 23);
10965 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[23])) __PYX_ERR(0, 1685, __pyx_L3_error)
10966 CYTHON_FALLTHROUGH;
10967 case 23:
10968 values[22] = __Pyx_ArgRef_FASTCALL(__pyx_args, 22);
10969 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[22])) __PYX_ERR(0, 1685, __pyx_L3_error)
10970 CYTHON_FALLTHROUGH;
10971 case 22:
10972 values[21] = __Pyx_ArgRef_FASTCALL(__pyx_args, 21);
10973 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[21])) __PYX_ERR(0, 1685, __pyx_L3_error)
10974 CYTHON_FALLTHROUGH;
10975 case 21:
10976 values[20] = __Pyx_ArgRef_FASTCALL(__pyx_args, 20);
10977 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[20])) __PYX_ERR(0, 1685, __pyx_L3_error)
10978 CYTHON_FALLTHROUGH;
10979 case 20:
10980 values[19] = __Pyx_ArgRef_FASTCALL(__pyx_args, 19);
10981 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[19])) __PYX_ERR(0, 1685, __pyx_L3_error)
10982 CYTHON_FALLTHROUGH;
10983 case 19:
10984 values[18] = __Pyx_ArgRef_FASTCALL(__pyx_args, 18);
10985 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[18])) __PYX_ERR(0, 1685, __pyx_L3_error)
10986 CYTHON_FALLTHROUGH;
10987 case 18:
10988 values[17] = __Pyx_ArgRef_FASTCALL(__pyx_args, 17);
10989 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[17])) __PYX_ERR(0, 1685, __pyx_L3_error)
10990 CYTHON_FALLTHROUGH;
10991 case 17:
10992 values[16] = __Pyx_ArgRef_FASTCALL(__pyx_args, 16);
10993 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[16])) __PYX_ERR(0, 1685, __pyx_L3_error)
10994 CYTHON_FALLTHROUGH;
10995 case 16:
10996 values[15] = __Pyx_ArgRef_FASTCALL(__pyx_args, 15);
10997 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[15])) __PYX_ERR(0, 1685, __pyx_L3_error)
10998 CYTHON_FALLTHROUGH;
10999 case 15:
11000 values[14] = __Pyx_ArgRef_FASTCALL(__pyx_args, 14);
11001 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[14])) __PYX_ERR(0, 1685, __pyx_L3_error)
11002 CYTHON_FALLTHROUGH;
11003 case 14:
11004 values[13] = __Pyx_ArgRef_FASTCALL(__pyx_args, 13);
11005 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[13])) __PYX_ERR(0, 1685, __pyx_L3_error)
11006 CYTHON_FALLTHROUGH;
11007 case 13:
11008 values[12] = __Pyx_ArgRef_FASTCALL(__pyx_args, 12);
11009 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[12])) __PYX_ERR(0, 1685, __pyx_L3_error)
11010 CYTHON_FALLTHROUGH;
11011 case 12:
11012 values[11] = __Pyx_ArgRef_FASTCALL(__pyx_args, 11);
11013 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[11])) __PYX_ERR(0, 1685, __pyx_L3_error)
11014 CYTHON_FALLTHROUGH;
11015 case 11:
11016 values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10);
11017 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 1685, __pyx_L3_error)
11018 CYTHON_FALLTHROUGH;
11019 case 10:
11020 values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
11021 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 1685, __pyx_L3_error)
11022 CYTHON_FALLTHROUGH;
11023 case 9:
11024 values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
11025 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 1685, __pyx_L3_error)
11026 CYTHON_FALLTHROUGH;
11027 case 8:
11028 values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
11029 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 1685, __pyx_L3_error)
11030 CYTHON_FALLTHROUGH;
11031 case 7:
11032 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
11033 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 1685, __pyx_L3_error)
11034 CYTHON_FALLTHROUGH;
11035 case 6:
11036 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
11037 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1685, __pyx_L3_error)
11038 CYTHON_FALLTHROUGH;
11039 case 5:
11040 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
11041 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1685, __pyx_L3_error)
11042 CYTHON_FALLTHROUGH;
11043 case 4:
11044 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
11045 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1685, __pyx_L3_error)
11046 CYTHON_FALLTHROUGH;
11047 case 3:
11048 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
11049 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1685, __pyx_L3_error)
11050 CYTHON_FALLTHROUGH;
11051 case 2:
11052 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
11053 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1685, __pyx_L3_error)
11054 CYTHON_FALLTHROUGH;
11055 case 1:
11056 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
11057 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1685, __pyx_L3_error)
11058 CYTHON_FALLTHROUGH;
11059 case 0: break;
11060 default: goto __pyx_L5_argtuple_error;
11061 }
11062 const Py_ssize_t kwd_pos_args = __pyx_nargs;
11063 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "twophaseDarcy_compressibleN_split_sd_saturation_het_matType", 0) < (0)) __PYX_ERR(0, 1685, __pyx_L3_error)
11064 for (Py_ssize_t i = __pyx_nargs; i < 30; i++) {
11065 if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("twophaseDarcy_compressibleN_split_sd_saturation_het_matType", 1, 30, 30, i); __PYX_ERR(0, 1685, __pyx_L3_error) }
11066 }
11067 } else if (unlikely(__pyx_nargs != 30)) {
11068 goto __pyx_L5_argtuple_error;
11069 } else {
11070 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
11071 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1685, __pyx_L3_error)
11072 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
11073 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1685, __pyx_L3_error)
11074 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
11075 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1685, __pyx_L3_error)
11076 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
11077 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1685, __pyx_L3_error)
11078 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
11079 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1685, __pyx_L3_error)
11080 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
11081 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1685, __pyx_L3_error)
11082 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
11083 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 1685, __pyx_L3_error)
11084 values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
11085 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 1685, __pyx_L3_error)
11086 values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
11087 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 1685, __pyx_L3_error)
11088 values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
11089 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 1685, __pyx_L3_error)
11090 values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10);
11091 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 1685, __pyx_L3_error)
11092 values[11] = __Pyx_ArgRef_FASTCALL(__pyx_args, 11);
11093 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[11])) __PYX_ERR(0, 1685, __pyx_L3_error)
11094 values[12] = __Pyx_ArgRef_FASTCALL(__pyx_args, 12);
11095 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[12])) __PYX_ERR(0, 1685, __pyx_L3_error)
11096 values[13] = __Pyx_ArgRef_FASTCALL(__pyx_args, 13);
11097 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[13])) __PYX_ERR(0, 1685, __pyx_L3_error)
11098 values[14] = __Pyx_ArgRef_FASTCALL(__pyx_args, 14);
11099 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[14])) __PYX_ERR(0, 1685, __pyx_L3_error)
11100 values[15] = __Pyx_ArgRef_FASTCALL(__pyx_args, 15);
11101 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[15])) __PYX_ERR(0, 1685, __pyx_L3_error)
11102 values[16] = __Pyx_ArgRef_FASTCALL(__pyx_args, 16);
11103 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[16])) __PYX_ERR(0, 1685, __pyx_L3_error)
11104 values[17] = __Pyx_ArgRef_FASTCALL(__pyx_args, 17);
11105 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[17])) __PYX_ERR(0, 1685, __pyx_L3_error)
11106 values[18] = __Pyx_ArgRef_FASTCALL(__pyx_args, 18);
11107 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[18])) __PYX_ERR(0, 1685, __pyx_L3_error)
11108 values[19] = __Pyx_ArgRef_FASTCALL(__pyx_args, 19);
11109 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[19])) __PYX_ERR(0, 1685, __pyx_L3_error)
11110 values[20] = __Pyx_ArgRef_FASTCALL(__pyx_args, 20);
11111 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[20])) __PYX_ERR(0, 1685, __pyx_L3_error)
11112 values[21] = __Pyx_ArgRef_FASTCALL(__pyx_args, 21);
11113 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[21])) __PYX_ERR(0, 1685, __pyx_L3_error)
11114 values[22] = __Pyx_ArgRef_FASTCALL(__pyx_args, 22);
11115 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[22])) __PYX_ERR(0, 1685, __pyx_L3_error)
11116 values[23] = __Pyx_ArgRef_FASTCALL(__pyx_args, 23);
11117 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[23])) __PYX_ERR(0, 1685, __pyx_L3_error)
11118 values[24] = __Pyx_ArgRef_FASTCALL(__pyx_args, 24);
11119 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[24])) __PYX_ERR(0, 1685, __pyx_L3_error)
11120 values[25] = __Pyx_ArgRef_FASTCALL(__pyx_args, 25);
11121 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[25])) __PYX_ERR(0, 1685, __pyx_L3_error)
11122 values[26] = __Pyx_ArgRef_FASTCALL(__pyx_args, 26);
11123 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[26])) __PYX_ERR(0, 1685, __pyx_L3_error)
11124 values[27] = __Pyx_ArgRef_FASTCALL(__pyx_args, 27);
11125 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[27])) __PYX_ERR(0, 1685, __pyx_L3_error)
11126 values[28] = __Pyx_ArgRef_FASTCALL(__pyx_args, 28);
11127 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[28])) __PYX_ERR(0, 1685, __pyx_L3_error)
11128 values[29] = __Pyx_ArgRef_FASTCALL(__pyx_args, 29);
11129 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[29])) __PYX_ERR(0, 1685, __pyx_L3_error)
11130 }
11131 __pyx_v_pskModelFlag = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_pskModelFlag == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1685, __pyx_L3_error)
11132 __pyx_v_density_w_flag = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_density_w_flag == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1686, __pyx_L3_error)
11133 __pyx_v_density_n_flag = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_density_n_flag == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1687, __pyx_L3_error)
11134 __pyx_v_rowptr = ((PyArrayObject *)values[3]);
11135 __pyx_v_colind = ((PyArrayObject *)values[4]);
11136 __pyx_v_matType = ((PyArrayObject *)values[5]);
11137 __pyx_v_muw = __Pyx_PyFloat_AsDouble(values[6]); if (unlikely((__pyx_v_muw == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1691, __pyx_L3_error)
11138 __pyx_v_mun = __Pyx_PyFloat_AsDouble(values[7]); if (unlikely((__pyx_v_mun == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1692, __pyx_L3_error)
11139 __pyx_v_omega = ((PyArrayObject *)values[8]);
11140 __pyx_v_Kbar = ((PyArrayObject *)values[9]);
11141 __pyx_v_b = __Pyx_PyFloat_AsDouble(values[10]); if (unlikely((__pyx_v_b == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1695, __pyx_L3_error)
11142 __pyx_v_capillaryDiffusionScaling = __Pyx_PyFloat_AsDouble(values[11]); if (unlikely((__pyx_v_capillaryDiffusionScaling == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1696, __pyx_L3_error)
11143 __pyx_v_advectionScaling = __Pyx_PyFloat_AsDouble(values[12]); if (unlikely((__pyx_v_advectionScaling == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1697, __pyx_L3_error)
11144 __pyx_v_rwork_psk = ((PyArrayObject *)values[13]);
11145 __pyx_v_iwork_psk = ((PyArrayObject *)values[14]);
11146 __pyx_v_rwork_psk_tol = ((PyArrayObject *)values[15]);
11147 __pyx_v_rwork_density_w = ((PyArrayObject *)values[16]);
11148 __pyx_v_rwork_density_n = ((PyArrayObject *)values[17]);
11149 __pyx_v_g = ((PyArrayObject *)values[18]);
11150 __pyx_v_qt = ((PyArrayObject *)values[19]);
11151 __pyx_v_psiw = ((PyArrayObject *)values[20]);
11152 __pyx_v_sw = ((PyArrayObject *)values[21]);
11153 __pyx_v_m = ((PyArrayObject *)values[22]);
11154 __pyx_v_dm = ((PyArrayObject *)values[23]);
11155 __pyx_v_phi = ((PyArrayObject *)values[24]);
11156 __pyx_v_dphi = ((PyArrayObject *)values[25]);
11157 __pyx_v_f = ((PyArrayObject *)values[26]);
11158 __pyx_v_df = ((PyArrayObject *)values[27]);
11159 __pyx_v_a = ((PyArrayObject *)values[28]);
11160 __pyx_v_da = ((PyArrayObject *)values[29]);
11161 }
11162 goto __pyx_L6_skip;
11163 __pyx_L5_argtuple_error:;
11164 __Pyx_RaiseArgtupleInvalid("twophaseDarcy_compressibleN_split_sd_saturation_het_matType", 1, 30, 30, __pyx_nargs); __PYX_ERR(0, 1685, __pyx_L3_error)
11165 __pyx_L6_skip:;
11166 goto __pyx_L4_argument_unpacking_done;
11167 __pyx_L3_error:;
11168 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
11169 Py_XDECREF(values[__pyx_temp]);
11170 }
11171 __Pyx_AddTraceback("cTwophaseDarcyCoefficients.twophaseDarcy_compressibleN_split_sd_saturation_het_matType", __pyx_clineno, __pyx_lineno, __pyx_filename);
11172 __Pyx_RefNannyFinishContext();
11173 return NULL;
11174 __pyx_L4_argument_unpacking_done:;
11175 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rowptr), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "rowptr", 0))) __PYX_ERR(0, 1688, __pyx_L1_error)
11176 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_colind), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "colind", 0))) __PYX_ERR(0, 1689, __pyx_L1_error)
11177 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_matType), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "matType", 0))) __PYX_ERR(0, 1690, __pyx_L1_error)
11178 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_omega), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "omega", 0))) __PYX_ERR(0, 1693, __pyx_L1_error)
11179 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Kbar), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "Kbar", 0))) __PYX_ERR(0, 1694, __pyx_L1_error)
11180 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_psk), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "rwork_psk", 0))) __PYX_ERR(0, 1698, __pyx_L1_error)
11181 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork_psk), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "iwork_psk", 0))) __PYX_ERR(0, 1699, __pyx_L1_error)
11182 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_psk_tol), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "rwork_psk_tol", 0))) __PYX_ERR(0, 1700, __pyx_L1_error)
11183 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_density_w), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "rwork_density_w", 0))) __PYX_ERR(0, 1701, __pyx_L1_error)
11184 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_density_n), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "rwork_density_n", 0))) __PYX_ERR(0, 1702, __pyx_L1_error)
11185 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_g), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "g", 0))) __PYX_ERR(0, 1703, __pyx_L1_error)
11186 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_qt), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "qt", 0))) __PYX_ERR(0, 1703, __pyx_L1_error)
11187 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_psiw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "psiw", 0))) __PYX_ERR(0, 1703, __pyx_L1_error)
11188 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "sw", 0))) __PYX_ERR(0, 1703, __pyx_L1_error)
11189 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_m), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "m", 0))) __PYX_ERR(0, 1703, __pyx_L1_error)
11190 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dm), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "dm", 0))) __PYX_ERR(0, 1703, __pyx_L1_error)
11191 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_phi), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "phi", 0))) __PYX_ERR(0, 1703, __pyx_L1_error)
11192 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dphi), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "dphi", 0))) __PYX_ERR(0, 1703, __pyx_L1_error)
11193 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_f), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "f", 0))) __PYX_ERR(0, 1704, __pyx_L1_error)
11194 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_df), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "df", 0))) __PYX_ERR(0, 1704, __pyx_L1_error)
11195 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "a", 0))) __PYX_ERR(0, 1704, __pyx_L1_error)
11196 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_da), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "da", 0))) __PYX_ERR(0, 1704, __pyx_L1_error)
11197 __pyx_r = __pyx_pf_26cTwophaseDarcyCoefficients_16twophaseDarcy_compressibleN_split_sd_saturation_het_matType(__pyx_self, __pyx_v_pskModelFlag, __pyx_v_density_w_flag, __pyx_v_density_n_flag, __pyx_v_rowptr, __pyx_v_colind, __pyx_v_matType, __pyx_v_muw, __pyx_v_mun, __pyx_v_omega, __pyx_v_Kbar, __pyx_v_b, __pyx_v_capillaryDiffusionScaling, __pyx_v_advectionScaling, __pyx_v_rwork_psk, __pyx_v_iwork_psk, __pyx_v_rwork_psk_tol, __pyx_v_rwork_density_w, __pyx_v_rwork_density_n, __pyx_v_g, __pyx_v_qt, __pyx_v_psiw, __pyx_v_sw, __pyx_v_m, __pyx_v_dm, __pyx_v_phi, __pyx_v_dphi, __pyx_v_f, __pyx_v_df, __pyx_v_a, __pyx_v_da);
11198
11199 /* function exit code */
11200 goto __pyx_L0;
11201 __pyx_L1_error:;
11202 __pyx_r = NULL;
11203 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
11204 Py_XDECREF(values[__pyx_temp]);
11205 }
11206 goto __pyx_L7_cleaned_up;
11207 __pyx_L0:;
11208 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
11209 Py_XDECREF(values[__pyx_temp]);
11210 }
11211 __pyx_L7_cleaned_up:;
11212
11213
11214
11215
11216
11217
11218
11219
11220 __Pyx_RefNannyFinishContext();
11221 return __pyx_r;
11222}
11223
11224static 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) {
11225 int __pyx_v_nPointsPerSimplex;
11226 int __pyx_v_nSimplex;
11227 PyObject *__pyx_r = NULL;
11228 __Pyx_RefNannyDeclarations
11229 npy_intp __pyx_t_1;
11230 PyObject *__pyx_t_2 = NULL;
11231 PyObject *__pyx_t_3 = NULL;
11232 PyObject *__pyx_t_4 = NULL;
11233 PyObject *__pyx_t_5 = NULL;
11234 size_t __pyx_t_6;
11235 int __pyx_lineno = 0;
11236 const char *__pyx_filename = NULL;
11237 int __pyx_clineno = 0;
11238 __Pyx_RefNannySetupContext("twophaseDarcy_compressibleN_split_sd_saturation_het_matType", 0);
11239
11240 /* "cTwophaseDarcyCoefficients.pyx":1712
11241 *
11242 * """
11243 * cdef int nPointsPerSimplex=sw.shape[sw.ndim-1] # <<<<<<<<<<<<<<
11244 * cdef int nSimplex=sw.size//nPointsPerSimplex
11245 * if density_n_flag == 1: #nonwetting exponential
11246*/
11247 __pyx_v_nPointsPerSimplex = (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_sw)[(__pyx_f_5numpy_7ndarray_4ndim___get__(__pyx_v_sw) - 1)]);
11248
11249 /* "cTwophaseDarcyCoefficients.pyx":1713
11250 * """
11251 * cdef int nPointsPerSimplex=sw.shape[sw.ndim-1]
11252 * cdef int nSimplex=sw.size//nPointsPerSimplex # <<<<<<<<<<<<<<
11253 * if density_n_flag == 1: #nonwetting exponential
11254 * if pskModelFlag == 0:
11255*/
11256 __pyx_t_1 = __pyx_f_5numpy_7ndarray_4size___get__(__pyx_v_sw);
11257
11258 if (unlikely(__pyx_v_nPointsPerSimplex == 0)) {
11259 PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
11260 __PYX_ERR(0, 1713, __pyx_L1_error)
11261 }
11262 else if (sizeof(npy_intp) == sizeof(long) && (!(((int)-1) > 0)) && unlikely(__pyx_v_nPointsPerSimplex == (int)-1) && unlikely(__Pyx_UNARY_NEG_WOULD_OVERFLOW(__pyx_t_1))) {
11263 PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
11264 __PYX_ERR(0, 1713, __pyx_L1_error)
11265 }
11266 __pyx_v_nSimplex = __Pyx_div_npy_intp(__pyx_t_1, __pyx_v_nPointsPerSimplex, 0);
11267
11268
11269 /* "cTwophaseDarcyCoefficients.pyx":1714
11270 * cdef int nPointsPerSimplex=sw.shape[sw.ndim-1]
11271 * cdef int nSimplex=sw.size//nPointsPerSimplex
11272 * if density_n_flag == 1: #nonwetting exponential # <<<<<<<<<<<<<<
11273 * if pskModelFlag == 0:
11274 * tpdc.twophaseDarcy_compressibleN_split_sd_saturation_het_matType[SimplePSK,ExponentialDensity](nSimplex,
11275*/
11276 switch (__pyx_v_density_n_flag) {
11277 case 1:
11278
11279 /* "cTwophaseDarcyCoefficients.pyx":1715
11280 * cdef int nSimplex=sw.size//nPointsPerSimplex
11281 * if density_n_flag == 1: #nonwetting exponential
11282 * if pskModelFlag == 0: # <<<<<<<<<<<<<<
11283 * tpdc.twophaseDarcy_compressibleN_split_sd_saturation_het_matType[SimplePSK,ExponentialDensity](nSimplex,
11284 * nPointsPerSimplex,
11285*/
11286 switch (__pyx_v_pskModelFlag) {
11287 case 0:
11288
11289 /* "cTwophaseDarcyCoefficients.pyx":1716
11290 * if density_n_flag == 1: #nonwetting exponential
11291 * if pskModelFlag == 0:
11292 * tpdc.twophaseDarcy_compressibleN_split_sd_saturation_het_matType[SimplePSK,ExponentialDensity](nSimplex, # <<<<<<<<<<<<<<
11293 * nPointsPerSimplex,
11294 * g.shape[0],
11295*/
11296 (void)(twophaseDarcy_compressibleN_split_sd_saturation_het_matType<SimplePSK,ExponentialDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_g)[0]), 2, ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rowptr)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_colind)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_matType)), __pyx_v_muw, __pyx_v_mun, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_omega)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Kbar)), __pyx_v_b, __pyx_v_capillaryDiffusionScaling, __pyx_v_advectionScaling, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_iwork_psk)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk_tol)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_w)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_n)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_g)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_qt)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_sw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_m)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dm)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_f)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_df)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_a)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_da))));
11297
11298 /* "cTwophaseDarcyCoefficients.pyx":1715
11299 * cdef int nSimplex=sw.size//nPointsPerSimplex
11300 * if density_n_flag == 1: #nonwetting exponential
11301 * if pskModelFlag == 0: # <<<<<<<<<<<<<<
11302 * tpdc.twophaseDarcy_compressibleN_split_sd_saturation_het_matType[SimplePSK,ExponentialDensity](nSimplex,
11303 * nPointsPerSimplex,
11304*/
11305 break;
11306 case 1:
11307
11308 /* "cTwophaseDarcyCoefficients.pyx":1737
11309 * <double*>(df.data), <double*>(a.data), <double*>(da.data))
11310 * elif pskModelFlag == 1:
11311 * tpdc.twophaseDarcy_compressibleN_split_sd_saturation_het_matType[VGM,ExponentialDensity](nSimplex, # <<<<<<<<<<<<<<
11312 * nPointsPerSimplex,
11313 * g.shape[0],
11314*/
11315 (void)(twophaseDarcy_compressibleN_split_sd_saturation_het_matType<VGM,ExponentialDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_g)[0]), 4, ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rowptr)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_colind)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_matType)), __pyx_v_muw, __pyx_v_mun, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_omega)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Kbar)), __pyx_v_b, __pyx_v_capillaryDiffusionScaling, __pyx_v_advectionScaling, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_iwork_psk)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk_tol)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_w)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_n)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_g)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_qt)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_sw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_m)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dm)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_f)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_df)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_a)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_da))));
11316
11317 /* "cTwophaseDarcyCoefficients.pyx":1736
11318 * <double*>(m.data), <double*>(dm.data), <double*>(phi.data), <double*>(dphi.data), <double*>(f.data),
11319 * <double*>(df.data), <double*>(a.data), <double*>(da.data))
11320 * elif pskModelFlag == 1: # <<<<<<<<<<<<<<
11321 * tpdc.twophaseDarcy_compressibleN_split_sd_saturation_het_matType[VGM,ExponentialDensity](nSimplex,
11322 * nPointsPerSimplex,
11323*/
11324 break;
11325 default:
11326
11327 /* "cTwophaseDarcyCoefficients.pyx":1758
11328 * <double*>(df.data), <double*>(a.data), <double*>(da.data))
11329 * else:
11330 * tpdc.twophaseDarcy_compressibleN_split_sd_saturation_het_matType[VGM,ExponentialDensity](nSimplex, # <<<<<<<<<<<<<<
11331 * nPointsPerSimplex,
11332 * g.shape[0],
11333*/
11334 (void)(twophaseDarcy_compressibleN_split_sd_saturation_het_matType<VGM,ExponentialDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_g)[0]), 4, ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rowptr)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_colind)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_matType)), __pyx_v_muw, __pyx_v_mun, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_omega)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Kbar)), __pyx_v_b, __pyx_v_capillaryDiffusionScaling, __pyx_v_advectionScaling, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_iwork_psk)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk_tol)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_w)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_n)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_g)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_qt)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_sw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_m)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dm)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_f)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_df)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_a)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_da))));
11335 break;
11336 }
11337
11338 /* "cTwophaseDarcyCoefficients.pyx":1714
11339 * cdef int nPointsPerSimplex=sw.shape[sw.ndim-1]
11340 * cdef int nSimplex=sw.size//nPointsPerSimplex
11341 * if density_n_flag == 1: #nonwetting exponential # <<<<<<<<<<<<<<
11342 * if pskModelFlag == 0:
11343 * tpdc.twophaseDarcy_compressibleN_split_sd_saturation_het_matType[SimplePSK,ExponentialDensity](nSimplex,
11344*/
11345 break;
11346 case 2:
11347
11348 /* "cTwophaseDarcyCoefficients.pyx":1780
11349 * <double*>(df.data), <double*>(a.data), <double*>(da.data))
11350 * elif density_n_flag == 2:#nonwetting IdealGas
11351 * if pskModelFlag == 0: # <<<<<<<<<<<<<<
11352 * tpdc.twophaseDarcy_compressibleN_split_sd_saturation_het_matType[SimplePSK,IdealGasDensity](nSimplex,
11353 * nPointsPerSimplex,
11354*/
11355 switch (__pyx_v_pskModelFlag) {
11356 case 0:
11357
11358 /* "cTwophaseDarcyCoefficients.pyx":1781
11359 * elif density_n_flag == 2:#nonwetting IdealGas
11360 * if pskModelFlag == 0:
11361 * tpdc.twophaseDarcy_compressibleN_split_sd_saturation_het_matType[SimplePSK,IdealGasDensity](nSimplex, # <<<<<<<<<<<<<<
11362 * nPointsPerSimplex,
11363 * g.shape[0],
11364*/
11365 (void)(twophaseDarcy_compressibleN_split_sd_saturation_het_matType<SimplePSK,IdealGasDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_g)[0]), 2, ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rowptr)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_colind)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_matType)), __pyx_v_muw, __pyx_v_mun, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_omega)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Kbar)), __pyx_v_b, __pyx_v_capillaryDiffusionScaling, __pyx_v_advectionScaling, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_iwork_psk)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk_tol)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_w)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_n)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_g)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_qt)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_sw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_m)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dm)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_f)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_df)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_a)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_da))));
11366
11367 /* "cTwophaseDarcyCoefficients.pyx":1780
11368 * <double*>(df.data), <double*>(a.data), <double*>(da.data))
11369 * elif density_n_flag == 2:#nonwetting IdealGas
11370 * if pskModelFlag == 0: # <<<<<<<<<<<<<<
11371 * tpdc.twophaseDarcy_compressibleN_split_sd_saturation_het_matType[SimplePSK,IdealGasDensity](nSimplex,
11372 * nPointsPerSimplex,
11373*/
11374 break;
11375 case 1:
11376
11377 /* "cTwophaseDarcyCoefficients.pyx":1802
11378 * <double*>(df.data), <double*>(a.data), <double*>(da.data))
11379 * elif pskModelFlag == 1:
11380 * tpdc.twophaseDarcy_compressibleN_split_sd_saturation_het_matType[VGM,IdealGasDensity](nSimplex, # <<<<<<<<<<<<<<
11381 * nPointsPerSimplex,
11382 * g.shape[0],
11383*/
11384 (void)(twophaseDarcy_compressibleN_split_sd_saturation_het_matType<VGM,IdealGasDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_g)[0]), 4, ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rowptr)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_colind)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_matType)), __pyx_v_muw, __pyx_v_mun, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_omega)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Kbar)), __pyx_v_b, __pyx_v_capillaryDiffusionScaling, __pyx_v_advectionScaling, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_iwork_psk)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk_tol)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_w)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_n)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_g)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_qt)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_sw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_m)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dm)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_f)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_df)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_a)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_da))));
11385
11386 /* "cTwophaseDarcyCoefficients.pyx":1801
11387 * <double*>(m.data), <double*>(dm.data), <double*>(phi.data), <double*>(dphi.data), <double*>(f.data),
11388 * <double*>(df.data), <double*>(a.data), <double*>(da.data))
11389 * elif pskModelFlag == 1: # <<<<<<<<<<<<<<
11390 * tpdc.twophaseDarcy_compressibleN_split_sd_saturation_het_matType[VGM,IdealGasDensity](nSimplex,
11391 * nPointsPerSimplex,
11392*/
11393 break;
11394 default:
11395
11396 /* "cTwophaseDarcyCoefficients.pyx":1823
11397 * <double*>(df.data), <double*>(a.data), <double*>(da.data))
11398 * else:
11399 * tpdc.twophaseDarcy_compressibleN_split_sd_saturation_het_matType[VGM,IdealGasDensity](nSimplex, # <<<<<<<<<<<<<<
11400 * nPointsPerSimplex,
11401 * g.shape[0],
11402*/
11403 (void)(twophaseDarcy_compressibleN_split_sd_saturation_het_matType<VGM,IdealGasDensity>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_g)[0]), 4, ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rowptr)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_colind)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_matType)), __pyx_v_muw, __pyx_v_mun, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_omega)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Kbar)), __pyx_v_b, __pyx_v_capillaryDiffusionScaling, __pyx_v_advectionScaling, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_iwork_psk)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk_tol)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_w)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_n)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_g)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_qt)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_psiw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_sw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_m)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dm)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_f)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_df)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_a)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_da))));
11404 break;
11405 }
11406
11407 /* "cTwophaseDarcyCoefficients.pyx":1779
11408 * <double*>(m.data), <double*>(dm.data), <double*>(phi.data), <double*>(dphi.data), <double*>(f.data),
11409 * <double*>(df.data), <double*>(a.data), <double*>(da.data))
11410 * elif density_n_flag == 2:#nonwetting IdealGas # <<<<<<<<<<<<<<
11411 * if pskModelFlag == 0:
11412 * tpdc.twophaseDarcy_compressibleN_split_sd_saturation_het_matType[SimplePSK,IdealGasDensity](nSimplex,
11413*/
11414 break;
11415 default:
11416
11417 /* "cTwophaseDarcyCoefficients.pyx":1844
11418 * <double*>(df.data), <double*>(a.data), <double*>(da.data))
11419 * else:
11420 * assert False, "configuration density_w_flag= {0} and density_n_flag= {1} not found ".format(density_w_flag, density_n_flag) # <<<<<<<<<<<<<<
11421 *
11422 * def twophaseDarcy_vol_frac( np.ndarray matType,
11423*/
11424 #ifndef CYTHON_WITHOUT_ASSERTIONS
11425 if (unlikely(__pyx_assertions_enabled())) {
11426 __pyx_t_3 = __pyx_mstate_global->__pyx_kp_u_configuration_density_w_flag_0_a;
11427 __Pyx_INCREF(__pyx_t_3);
11428 __pyx_t_4 = __Pyx_PyLong_From_int(__pyx_v_density_w_flag); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1844, __pyx_L1_error)
11429 __Pyx_GOTREF(__pyx_t_4);
11430 __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_density_n_flag); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1844, __pyx_L1_error)
11431 __Pyx_GOTREF(__pyx_t_5);
11432 __pyx_t_6 = 0;
11433 {
11434 PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_t_4, __pyx_t_5};
11435 __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
11436 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
11437 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
11438 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
11439 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1844, __pyx_L1_error)
11440 __Pyx_GOTREF(__pyx_t_2);
11441 }
11442 if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_2))) __PYX_ERR(0, 1844, __pyx_L1_error)
11443 __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_2, 0, 0);
11444 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11445 __PYX_ERR(0, 1844, __pyx_L1_error)
11446 }
11447 #else
11448 if ((1)); else __PYX_ERR(0, 1844, __pyx_L1_error)
11449 #endif
11450 break;
11451 }
11452
11453 /* "cTwophaseDarcyCoefficients.pyx":1685
11454 * assert False, "configuration density_w_flag= {0} and density_n_flag= {1} not found ".format(density_w_flag, density_n_flag)
11455 *
11456 * def twophaseDarcy_compressibleN_split_sd_saturation_het_matType( int pskModelFlag, # <<<<<<<<<<<<<<
11457 * int density_w_flag,
11458 * int density_n_flag,
11459*/
11460
11461 /* function exit code */
11462 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11463 goto __pyx_L0;
11464 __pyx_L1_error:;
11465 __Pyx_XDECREF(__pyx_t_2);
11466 __Pyx_XDECREF(__pyx_t_3);
11467 __Pyx_XDECREF(__pyx_t_4);
11468 __Pyx_XDECREF(__pyx_t_5);
11469 __Pyx_AddTraceback("cTwophaseDarcyCoefficients.twophaseDarcy_compressibleN_split_sd_saturation_het_matType", __pyx_clineno, __pyx_lineno, __pyx_filename);
11470 __pyx_r = NULL;
11471 __pyx_L0:;
11472
11473
11474 __Pyx_XGIVEREF(__pyx_r);
11475 __Pyx_RefNannyFinishContext();
11476 return __pyx_r;
11477}
11478
11479/* "cTwophaseDarcyCoefficients.pyx":1846
11480 * assert False, "configuration density_w_flag= {0} and density_n_flag= {1} not found ".format(density_w_flag, density_n_flag)
11481 *
11482 * def twophaseDarcy_vol_frac( np.ndarray matType, # <<<<<<<<<<<<<<
11483 * np.ndarray omega,
11484 * np.ndarray sw,
11485*/
11486
11487/* Python wrapper */
11488static PyObject *__pyx_pw_26cTwophaseDarcyCoefficients_19twophaseDarcy_vol_frac(PyObject *__pyx_self,
11489#if CYTHON_VECTORCALL
11490PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
11491#else
11492PyObject *__pyx_args, PyObject *__pyx_kwds
11493#endif
11494); /*proto*/
11495PyDoc_STRVAR(__pyx_doc_26cTwophaseDarcyCoefficients_18twophaseDarcy_vol_frac, "compute phase volume fractions\n\nUse point-vals for sw and zoned material types for porosity (omega)\n\n ");
11496static PyMethodDef __pyx_mdef_26cTwophaseDarcyCoefficients_19twophaseDarcy_vol_frac = {"twophaseDarcy_vol_frac", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_26cTwophaseDarcyCoefficients_19twophaseDarcy_vol_frac, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_26cTwophaseDarcyCoefficients_18twophaseDarcy_vol_frac};
11497static PyObject *__pyx_pw_26cTwophaseDarcyCoefficients_19twophaseDarcy_vol_frac(PyObject *__pyx_self,
11498#if CYTHON_VECTORCALL
11499PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
11500#else
11501PyObject *__pyx_args, PyObject *__pyx_kwds
11502#endif
11503) {
11504 PyArrayObject *__pyx_v_matType = 0;
11505 PyArrayObject *__pyx_v_omega = 0;
11506 PyArrayObject *__pyx_v_sw = 0;
11507 PyArrayObject *__pyx_v_vol_frac_w = 0;
11508 PyArrayObject *__pyx_v_vol_frac_n = 0;
11509 #if !CYTHON_VECTORCALL
11510 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
11511 #endif
11512 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
11513 PyObject* values[5] = {0,0,0,0,0};
11514 int __pyx_lineno = 0;
11515 const char *__pyx_filename = NULL;
11516 int __pyx_clineno = 0;
11517 PyObject *__pyx_r = 0;
11518 __Pyx_RefNannyDeclarations
11519 __Pyx_RefNannySetupContext("twophaseDarcy_vol_frac (wrapper)", 0);
11520 #if !CYTHON_VECTORCALL
11521 #if CYTHON_ASSUME_SAFE_SIZE
11522 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
11523 #else
11524 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
11525 #endif
11526 #endif
11527 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
11528 {
11529 PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_matType,&__pyx_mstate_global->__pyx_n_u_omega,&__pyx_mstate_global->__pyx_n_u_sw,&__pyx_mstate_global->__pyx_n_u_vol_frac_w,&__pyx_mstate_global->__pyx_n_u_vol_frac_n,0};
11530 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
11531 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1846, __pyx_L3_error)
11532 if (__pyx_kwds_len > 0) {
11533 switch (__pyx_nargs) {
11534 case 5:
11535 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
11536 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1846, __pyx_L3_error)
11537 CYTHON_FALLTHROUGH;
11538 case 4:
11539 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
11540 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1846, __pyx_L3_error)
11541 CYTHON_FALLTHROUGH;
11542 case 3:
11543 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
11544 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1846, __pyx_L3_error)
11545 CYTHON_FALLTHROUGH;
11546 case 2:
11547 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
11548 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1846, __pyx_L3_error)
11549 CYTHON_FALLTHROUGH;
11550 case 1:
11551 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
11552 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1846, __pyx_L3_error)
11553 CYTHON_FALLTHROUGH;
11554 case 0: break;
11555 default: goto __pyx_L5_argtuple_error;
11556 }
11557 const Py_ssize_t kwd_pos_args = __pyx_nargs;
11558 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "twophaseDarcy_vol_frac", 0) < (0)) __PYX_ERR(0, 1846, __pyx_L3_error)
11559 for (Py_ssize_t i = __pyx_nargs; i < 5; i++) {
11560 if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("twophaseDarcy_vol_frac", 1, 5, 5, i); __PYX_ERR(0, 1846, __pyx_L3_error) }
11561 }
11562 } else if (unlikely(__pyx_nargs != 5)) {
11563 goto __pyx_L5_argtuple_error;
11564 } else {
11565 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
11566 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1846, __pyx_L3_error)
11567 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
11568 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1846, __pyx_L3_error)
11569 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
11570 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1846, __pyx_L3_error)
11571 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
11572 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1846, __pyx_L3_error)
11573 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
11574 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1846, __pyx_L3_error)
11575 }
11576 __pyx_v_matType = ((PyArrayObject *)values[0]);
11577 __pyx_v_omega = ((PyArrayObject *)values[1]);
11578 __pyx_v_sw = ((PyArrayObject *)values[2]);
11579 __pyx_v_vol_frac_w = ((PyArrayObject *)values[3]);
11580 __pyx_v_vol_frac_n = ((PyArrayObject *)values[4]);
11581 }
11582 goto __pyx_L6_skip;
11583 __pyx_L5_argtuple_error:;
11584 __Pyx_RaiseArgtupleInvalid("twophaseDarcy_vol_frac", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 1846, __pyx_L3_error)
11585 __pyx_L6_skip:;
11586 goto __pyx_L4_argument_unpacking_done;
11587 __pyx_L3_error:;
11588 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
11589 Py_XDECREF(values[__pyx_temp]);
11590 }
11591 __Pyx_AddTraceback("cTwophaseDarcyCoefficients.twophaseDarcy_vol_frac", __pyx_clineno, __pyx_lineno, __pyx_filename);
11592 __Pyx_RefNannyFinishContext();
11593 return NULL;
11594 __pyx_L4_argument_unpacking_done:;
11595 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_matType), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "matType", 0))) __PYX_ERR(0, 1846, __pyx_L1_error)
11596 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_omega), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "omega", 0))) __PYX_ERR(0, 1847, __pyx_L1_error)
11597 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "sw", 0))) __PYX_ERR(0, 1848, __pyx_L1_error)
11598 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vol_frac_w), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "vol_frac_w", 0))) __PYX_ERR(0, 1849, __pyx_L1_error)
11599 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vol_frac_n), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "vol_frac_n", 0))) __PYX_ERR(0, 1850, __pyx_L1_error)
11600 __pyx_r = __pyx_pf_26cTwophaseDarcyCoefficients_18twophaseDarcy_vol_frac(__pyx_self, __pyx_v_matType, __pyx_v_omega, __pyx_v_sw, __pyx_v_vol_frac_w, __pyx_v_vol_frac_n);
11601
11602 /* function exit code */
11603 goto __pyx_L0;
11604 __pyx_L1_error:;
11605 __pyx_r = NULL;
11606 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
11607 Py_XDECREF(values[__pyx_temp]);
11608 }
11609 goto __pyx_L7_cleaned_up;
11610 __pyx_L0:;
11611 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
11612 Py_XDECREF(values[__pyx_temp]);
11613 }
11614 __pyx_L7_cleaned_up:;
11615 __Pyx_RefNannyFinishContext();
11616 return __pyx_r;
11617}
11618
11619static 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) {
11620 int __pyx_v_nPointsPerSimplex;
11621 int __pyx_v_nSimplex;
11622 PyObject *__pyx_r = NULL;
11623 __Pyx_RefNannyDeclarations
11624 npy_intp __pyx_t_1;
11625 int __pyx_lineno = 0;
11626 const char *__pyx_filename = NULL;
11627 int __pyx_clineno = 0;
11628 __Pyx_RefNannySetupContext("twophaseDarcy_vol_frac", 0);
11629
11630 /* "cTwophaseDarcyCoefficients.pyx":1856
11631 *
11632 * """
11633 * cdef int nPointsPerSimplex=sw.shape[sw.ndim-1] # <<<<<<<<<<<<<<
11634 * cdef int nSimplex=sw.size//nPointsPerSimplex
11635 * tpdc.twophaseDarcy_vol_frac(nSimplex,
11636*/
11637 __pyx_v_nPointsPerSimplex = (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_sw)[(__pyx_f_5numpy_7ndarray_4ndim___get__(__pyx_v_sw) - 1)]);
11638
11639 /* "cTwophaseDarcyCoefficients.pyx":1857
11640 * """
11641 * cdef int nPointsPerSimplex=sw.shape[sw.ndim-1]
11642 * cdef int nSimplex=sw.size//nPointsPerSimplex # <<<<<<<<<<<<<<
11643 * tpdc.twophaseDarcy_vol_frac(nSimplex,
11644 * nPointsPerSimplex,
11645*/
11646 __pyx_t_1 = __pyx_f_5numpy_7ndarray_4size___get__(__pyx_v_sw);
11647
11648 if (unlikely(__pyx_v_nPointsPerSimplex == 0)) {
11649 PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
11650 __PYX_ERR(0, 1857, __pyx_L1_error)
11651 }
11652 else if (sizeof(npy_intp) == sizeof(long) && (!(((int)-1) > 0)) && unlikely(__pyx_v_nPointsPerSimplex == (int)-1) && unlikely(__Pyx_UNARY_NEG_WOULD_OVERFLOW(__pyx_t_1))) {
11653 PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
11654 __PYX_ERR(0, 1857, __pyx_L1_error)
11655 }
11656 __pyx_v_nSimplex = __Pyx_div_npy_intp(__pyx_t_1, __pyx_v_nPointsPerSimplex, 0);
11657
11658
11659 /* "cTwophaseDarcyCoefficients.pyx":1858
11660 * cdef int nPointsPerSimplex=sw.shape[sw.ndim-1]
11661 * cdef int nSimplex=sw.size//nPointsPerSimplex
11662 * tpdc.twophaseDarcy_vol_frac(nSimplex, # <<<<<<<<<<<<<<
11663 * nPointsPerSimplex,
11664 * <int*>(matType.data),
11665*/
11666 (void)(twophaseDarcy_vol_frac(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_matType)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_omega)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_sw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_vol_frac_w)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_vol_frac_n))));
11667
11668 /* "cTwophaseDarcyCoefficients.pyx":1846
11669 * assert False, "configuration density_w_flag= {0} and density_n_flag= {1} not found ".format(density_w_flag, density_n_flag)
11670 *
11671 * def twophaseDarcy_vol_frac( np.ndarray matType, # <<<<<<<<<<<<<<
11672 * np.ndarray omega,
11673 * np.ndarray sw,
11674*/
11675
11676 /* function exit code */
11677 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11678 goto __pyx_L0;
11679 __pyx_L1_error:;
11680 __Pyx_AddTraceback("cTwophaseDarcyCoefficients.twophaseDarcy_vol_frac", __pyx_clineno, __pyx_lineno, __pyx_filename);
11681 __pyx_r = NULL;
11682 __pyx_L0:;
11683
11684
11685 __Pyx_XGIVEREF(__pyx_r);
11686 __Pyx_RefNannyFinishContext();
11687 return __pyx_r;
11688}
11689
11690/* "cTwophaseDarcyCoefficients.pyx":1866
11691 * <double*>(vol_frac_n.data))
11692 *
11693 * def generateSplineTables(int pskModelFlag, # <<<<<<<<<<<<<<
11694 * int startIndex, #where to insert into splineTable
11695 * int calcFlag, #f(Sw) or f(psic)
11696*/
11697
11698/* Python wrapper */
11699static PyObject *__pyx_pw_26cTwophaseDarcyCoefficients_21generateSplineTables(PyObject *__pyx_self,
11700#if CYTHON_VECTORCALL
11701PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
11702#else
11703PyObject *__pyx_args, PyObject *__pyx_kwds
11704#endif
11705); /*proto*/
11706PyDoc_STRVAR(__pyx_doc_26cTwophaseDarcyCoefficients_20generateSplineTables, "generate spline table look up arrays");
11707static PyMethodDef __pyx_mdef_26cTwophaseDarcyCoefficients_21generateSplineTables = {"generateSplineTables", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_26cTwophaseDarcyCoefficients_21generateSplineTables, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_26cTwophaseDarcyCoefficients_20generateSplineTables};
11708static PyObject *__pyx_pw_26cTwophaseDarcyCoefficients_21generateSplineTables(PyObject *__pyx_self,
11709#if CYTHON_VECTORCALL
11710PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
11711#else
11712PyObject *__pyx_args, PyObject *__pyx_kwds
11713#endif
11714) {
11715 int __pyx_v_pskModelFlag;
11716 int __pyx_v_startIndex;
11717 int __pyx_v_calcFlag;
11718 PyArrayObject *__pyx_v_domain = 0;
11719 PyArrayObject *__pyx_v_rwork_psk = 0;
11720 PyArrayObject *__pyx_v_iwork_psk = 0;
11721 PyArrayObject *__pyx_v_rwork_psk_tol = 0;
11722 PyArrayObject *__pyx_v_splineTable = 0;
11723 #if !CYTHON_VECTORCALL
11724 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
11725 #endif
11726 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
11727 PyObject* values[8] = {0,0,0,0,0,0,0,0};
11728 int __pyx_lineno = 0;
11729 const char *__pyx_filename = NULL;
11730 int __pyx_clineno = 0;
11731 PyObject *__pyx_r = 0;
11732 __Pyx_RefNannyDeclarations
11733 __Pyx_RefNannySetupContext("generateSplineTables (wrapper)", 0);
11734 #if !CYTHON_VECTORCALL
11735 #if CYTHON_ASSUME_SAFE_SIZE
11736 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
11737 #else
11738 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
11739 #endif
11740 #endif
11741 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
11742 {
11743 PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pskModelFlag,&__pyx_mstate_global->__pyx_n_u_startIndex,&__pyx_mstate_global->__pyx_n_u_calcFlag,&__pyx_mstate_global->__pyx_n_u_domain,&__pyx_mstate_global->__pyx_n_u_rwork_psk,&__pyx_mstate_global->__pyx_n_u_iwork_psk,&__pyx_mstate_global->__pyx_n_u_rwork_psk_tol,&__pyx_mstate_global->__pyx_n_u_splineTable,0};
11744 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
11745 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1866, __pyx_L3_error)
11746 if (__pyx_kwds_len > 0) {
11747 switch (__pyx_nargs) {
11748 case 8:
11749 values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
11750 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 1866, __pyx_L3_error)
11751 CYTHON_FALLTHROUGH;
11752 case 7:
11753 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
11754 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 1866, __pyx_L3_error)
11755 CYTHON_FALLTHROUGH;
11756 case 6:
11757 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
11758 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1866, __pyx_L3_error)
11759 CYTHON_FALLTHROUGH;
11760 case 5:
11761 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
11762 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1866, __pyx_L3_error)
11763 CYTHON_FALLTHROUGH;
11764 case 4:
11765 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
11766 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1866, __pyx_L3_error)
11767 CYTHON_FALLTHROUGH;
11768 case 3:
11769 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
11770 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1866, __pyx_L3_error)
11771 CYTHON_FALLTHROUGH;
11772 case 2:
11773 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
11774 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1866, __pyx_L3_error)
11775 CYTHON_FALLTHROUGH;
11776 case 1:
11777 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
11778 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1866, __pyx_L3_error)
11779 CYTHON_FALLTHROUGH;
11780 case 0: break;
11781 default: goto __pyx_L5_argtuple_error;
11782 }
11783 const Py_ssize_t kwd_pos_args = __pyx_nargs;
11784 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "generateSplineTables", 0) < (0)) __PYX_ERR(0, 1866, __pyx_L3_error)
11785 for (Py_ssize_t i = __pyx_nargs; i < 8; i++) {
11786 if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("generateSplineTables", 1, 8, 8, i); __PYX_ERR(0, 1866, __pyx_L3_error) }
11787 }
11788 } else if (unlikely(__pyx_nargs != 8)) {
11789 goto __pyx_L5_argtuple_error;
11790 } else {
11791 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
11792 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1866, __pyx_L3_error)
11793 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
11794 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1866, __pyx_L3_error)
11795 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
11796 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1866, __pyx_L3_error)
11797 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
11798 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1866, __pyx_L3_error)
11799 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
11800 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1866, __pyx_L3_error)
11801 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
11802 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1866, __pyx_L3_error)
11803 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
11804 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 1866, __pyx_L3_error)
11805 values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
11806 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 1866, __pyx_L3_error)
11807 }
11808 __pyx_v_pskModelFlag = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_pskModelFlag == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1866, __pyx_L3_error)
11809 __pyx_v_startIndex = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_startIndex == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1867, __pyx_L3_error)
11810 __pyx_v_calcFlag = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_calcFlag == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1868, __pyx_L3_error)
11811 __pyx_v_domain = ((PyArrayObject *)values[3]);
11812 __pyx_v_rwork_psk = ((PyArrayObject *)values[4]);
11813 __pyx_v_iwork_psk = ((PyArrayObject *)values[5]);
11814 __pyx_v_rwork_psk_tol = ((PyArrayObject *)values[6]);
11815 __pyx_v_splineTable = ((PyArrayObject *)values[7]);
11816 }
11817 goto __pyx_L6_skip;
11818 __pyx_L5_argtuple_error:;
11819 __Pyx_RaiseArgtupleInvalid("generateSplineTables", 1, 8, 8, __pyx_nargs); __PYX_ERR(0, 1866, __pyx_L3_error)
11820 __pyx_L6_skip:;
11821 goto __pyx_L4_argument_unpacking_done;
11822 __pyx_L3_error:;
11823 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
11824 Py_XDECREF(values[__pyx_temp]);
11825 }
11826 __Pyx_AddTraceback("cTwophaseDarcyCoefficients.generateSplineTables", __pyx_clineno, __pyx_lineno, __pyx_filename);
11827 __Pyx_RefNannyFinishContext();
11828 return NULL;
11829 __pyx_L4_argument_unpacking_done:;
11830 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domain), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "domain", 0))) __PYX_ERR(0, 1869, __pyx_L1_error)
11831 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_psk), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "rwork_psk", 0))) __PYX_ERR(0, 1870, __pyx_L1_error)
11832 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork_psk), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "iwork_psk", 0))) __PYX_ERR(0, 1871, __pyx_L1_error)
11833 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_psk_tol), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "rwork_psk_tol", 0))) __PYX_ERR(0, 1872, __pyx_L1_error)
11834 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_splineTable), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "splineTable", 0))) __PYX_ERR(0, 1873, __pyx_L1_error)
11835 __pyx_r = __pyx_pf_26cTwophaseDarcyCoefficients_20generateSplineTables(__pyx_self, __pyx_v_pskModelFlag, __pyx_v_startIndex, __pyx_v_calcFlag, __pyx_v_domain, __pyx_v_rwork_psk, __pyx_v_iwork_psk, __pyx_v_rwork_psk_tol, __pyx_v_splineTable);
11836
11837 /* function exit code */
11838 goto __pyx_L0;
11839 __pyx_L1_error:;
11840 __pyx_r = NULL;
11841 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
11842 Py_XDECREF(values[__pyx_temp]);
11843 }
11844 goto __pyx_L7_cleaned_up;
11845 __pyx_L0:;
11846 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
11847 Py_XDECREF(values[__pyx_temp]);
11848 }
11849 __pyx_L7_cleaned_up:;
11850
11851
11852
11853 __Pyx_RefNannyFinishContext();
11854 return __pyx_r;
11855}
11856
11857static 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) {
11858 npy_intp __pyx_v_nknots;
11859 PyObject *__pyx_r = NULL;
11860 __Pyx_RefNannyDeclarations
11861 __Pyx_RefNannySetupContext("generateSplineTables", 0);
11862
11863 /* "cTwophaseDarcyCoefficients.pyx":1875
11864 * np.ndarray splineTable):
11865 * """generate spline table look up arrays"""
11866 * nknots = domain.shape[0] # <<<<<<<<<<<<<<
11867 * if pskModelFlag == 0:
11868 * tpdc.generateSplineTables[SimplePSK](nknots,
11869*/
11870 __pyx_v_nknots = (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_domain)[0]);
11871
11872 /* "cTwophaseDarcyCoefficients.pyx":1876
11873 * """generate spline table look up arrays"""
11874 * nknots = domain.shape[0]
11875 * if pskModelFlag == 0: # <<<<<<<<<<<<<<
11876 * tpdc.generateSplineTables[SimplePSK](nknots,
11877 * startIndex,
11878*/
11879 switch (__pyx_v_pskModelFlag) {
11880 case 0:
11881
11882 /* "cTwophaseDarcyCoefficients.pyx":1877
11883 * nknots = domain.shape[0]
11884 * if pskModelFlag == 0:
11885 * tpdc.generateSplineTables[SimplePSK](nknots, # <<<<<<<<<<<<<<
11886 * startIndex,
11887 * calcFlag,
11888*/
11889 generateSplineTables<SimplePSK>(__pyx_v_nknots, __pyx_v_startIndex, __pyx_v_calcFlag, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_domain)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_iwork_psk)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk_tol)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_splineTable)));
11890
11891 /* "cTwophaseDarcyCoefficients.pyx":1876
11892 * """generate spline table look up arrays"""
11893 * nknots = domain.shape[0]
11894 * if pskModelFlag == 0: # <<<<<<<<<<<<<<
11895 * tpdc.generateSplineTables[SimplePSK](nknots,
11896 * startIndex,
11897*/
11898 break;
11899 case 1:
11900
11901 /* "cTwophaseDarcyCoefficients.pyx":1886
11902 * <double*>(splineTable.data))
11903 * elif pskModelFlag == 1:
11904 * tpdc.generateSplineTables[VGM](nknots, # <<<<<<<<<<<<<<
11905 * startIndex,
11906 * calcFlag,
11907*/
11908 generateSplineTables<VGM>(__pyx_v_nknots, __pyx_v_startIndex, __pyx_v_calcFlag, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_domain)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_iwork_psk)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk_tol)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_splineTable)));
11909
11910 /* "cTwophaseDarcyCoefficients.pyx":1885
11911 * <double*>(rwork_psk_tol.data),
11912 * <double*>(splineTable.data))
11913 * elif pskModelFlag == 1: # <<<<<<<<<<<<<<
11914 * tpdc.generateSplineTables[VGM](nknots,
11915 * startIndex,
11916*/
11917 break;
11918 case 2:
11919
11920 /* "cTwophaseDarcyCoefficients.pyx":1895
11921 * <double*>(splineTable.data))
11922 * elif pskModelFlag == 2:
11923 * tpdc.generateSplineTables[VGB](nknots, # <<<<<<<<<<<<<<
11924 * startIndex,
11925 * calcFlag,
11926*/
11927 generateSplineTables<VGB>(__pyx_v_nknots, __pyx_v_startIndex, __pyx_v_calcFlag, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_domain)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_iwork_psk)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk_tol)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_splineTable)));
11928
11929 /* "cTwophaseDarcyCoefficients.pyx":1894
11930 * <double*>(rwork_psk_tol.data),
11931 * <double*>(splineTable.data))
11932 * elif pskModelFlag == 2: # <<<<<<<<<<<<<<
11933 * tpdc.generateSplineTables[VGB](nknots,
11934 * startIndex,
11935*/
11936 break;
11937 case 3:
11938
11939 /* "cTwophaseDarcyCoefficients.pyx":1904
11940 * <double*>(splineTable.data))
11941 * elif pskModelFlag == 3:
11942 * tpdc.generateSplineTables[BCM](nknots, # <<<<<<<<<<<<<<
11943 * startIndex,
11944 * calcFlag,
11945*/
11946 generateSplineTables<BCM>(__pyx_v_nknots, __pyx_v_startIndex, __pyx_v_calcFlag, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_domain)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_iwork_psk)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk_tol)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_splineTable)));
11947
11948 /* "cTwophaseDarcyCoefficients.pyx":1903
11949 * <double*>(rwork_psk_tol.data),
11950 * <double*>(splineTable.data))
11951 * elif pskModelFlag == 3: # <<<<<<<<<<<<<<
11952 * tpdc.generateSplineTables[BCM](nknots,
11953 * startIndex,
11954*/
11955 break;
11956 case 4:
11957
11958 /* "cTwophaseDarcyCoefficients.pyx":1913
11959 * <double*>(splineTable.data))
11960 * elif pskModelFlag == 4:
11961 * tpdc.generateSplineTables[BCB](nknots, # <<<<<<<<<<<<<<
11962 * startIndex,
11963 * calcFlag,
11964*/
11965 generateSplineTables<BCB>(__pyx_v_nknots, __pyx_v_startIndex, __pyx_v_calcFlag, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_domain)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_iwork_psk)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk_tol)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_splineTable)));
11966
11967 /* "cTwophaseDarcyCoefficients.pyx":1912
11968 * <double*>(rwork_psk_tol.data),
11969 * <double*>(splineTable.data))
11970 * elif pskModelFlag == 4: # <<<<<<<<<<<<<<
11971 * tpdc.generateSplineTables[BCB](nknots,
11972 * startIndex,
11973*/
11974 break;
11975 default:
11976
11977 /* "cTwophaseDarcyCoefficients.pyx":1922
11978 * <double*>(splineTable.data))
11979 * else:
11980 * tpdc.generateSplineTables[VGM](nknots, # <<<<<<<<<<<<<<
11981 * startIndex,
11982 * calcFlag,
11983*/
11984 generateSplineTables<VGM>(__pyx_v_nknots, __pyx_v_startIndex, __pyx_v_calcFlag, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_domain)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_iwork_psk)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk_tol)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_splineTable)));
11985 break;
11986 }
11987
11988 /* "cTwophaseDarcyCoefficients.pyx":1866
11989 * <double*>(vol_frac_n.data))
11990 *
11991 * def generateSplineTables(int pskModelFlag, # <<<<<<<<<<<<<<
11992 * int startIndex, #where to insert into splineTable
11993 * int calcFlag, #f(Sw) or f(psic)
11994*/
11995
11996 /* function exit code */
11997 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11998
11999 __Pyx_XGIVEREF(__pyx_r);
12000 __Pyx_RefNannyFinishContext();
12001 return __pyx_r;
12002}
12003
12004/* "cTwophaseDarcyCoefficients.pyx":1931
12005 * <double*>(splineTable.data))
12006 *
12007 * def twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType(int pskModelFlag, # <<<<<<<<<<<<<<
12008 * np.ndarray rowptr,
12009 * np.ndarray colind,
12010*/
12011
12012/* Python wrapper */
12013static PyObject *__pyx_pw_26cTwophaseDarcyCoefficients_23twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType(PyObject *__pyx_self,
12014#if CYTHON_VECTORCALL
12015PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
12016#else
12017PyObject *__pyx_args, PyObject *__pyx_kwds
12018#endif
12019); /*proto*/
12020PyDoc_STRVAR(__pyx_doc_26cTwophaseDarcyCoefficients_22twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType, "Evaluate the saturation coefficients\n\nUse the split fractional flow formulation of incompressible, two-phase\nDarcy flow for a heterogeneous medium, sparse diffusion rep het\ncapillary pressure is primary variable\n\n ");
12021static PyMethodDef __pyx_mdef_26cTwophaseDarcyCoefficients_23twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType = {"twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_26cTwophaseDarcyCoefficients_23twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_26cTwophaseDarcyCoefficients_22twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType};
12022static PyObject *__pyx_pw_26cTwophaseDarcyCoefficients_23twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType(PyObject *__pyx_self,
12023#if CYTHON_VECTORCALL
12024PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
12025#else
12026PyObject *__pyx_args, PyObject *__pyx_kwds
12027#endif
12028) {
12029 int __pyx_v_pskModelFlag;
12030 PyArrayObject *__pyx_v_rowptr = 0;
12031 PyArrayObject *__pyx_v_colind = 0;
12032 PyArrayObject *__pyx_v_matType = 0;
12033 double __pyx_v_muw;
12034 double __pyx_v_mun;
12035 PyArrayObject *__pyx_v_omega = 0;
12036 PyArrayObject *__pyx_v_Kbar = 0;
12037 double __pyx_v_b;
12038 double __pyx_v_capillaryDiffusionScaling;
12039 double __pyx_v_advectionScaling;
12040 PyArrayObject *__pyx_v_rwork_psk = 0;
12041 PyArrayObject *__pyx_v_iwork_psk = 0;
12042 PyArrayObject *__pyx_v_rwork_psk_tol = 0;
12043 PyArrayObject *__pyx_v_rwork_density_w = 0;
12044 PyArrayObject *__pyx_v_rwork_density_n = 0;
12045 PyArrayObject *__pyx_v_g = 0;
12046 PyArrayObject *__pyx_v_qt = 0;
12047 PyArrayObject *__pyx_v_u = 0;
12048 PyArrayObject *__pyx_v_sw = 0;
12049 PyArrayObject *__pyx_v_m = 0;
12050 PyArrayObject *__pyx_v_dm = 0;
12051 PyArrayObject *__pyx_v_phi = 0;
12052 PyArrayObject *__pyx_v_dphi = 0;
12053 PyArrayObject *__pyx_v_f = 0;
12054 PyArrayObject *__pyx_v_df = 0;
12055 PyArrayObject *__pyx_v_a = 0;
12056 PyArrayObject *__pyx_v_da = 0;
12057 #if !CYTHON_VECTORCALL
12058 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
12059 #endif
12060 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
12061 PyObject* values[28] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
12062 int __pyx_lineno = 0;
12063 const char *__pyx_filename = NULL;
12064 int __pyx_clineno = 0;
12065 PyObject *__pyx_r = 0;
12066 __Pyx_RefNannyDeclarations
12067 __Pyx_RefNannySetupContext("twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType (wrapper)", 0);
12068 #if !CYTHON_VECTORCALL
12069 #if CYTHON_ASSUME_SAFE_SIZE
12070 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
12071 #else
12072 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
12073 #endif
12074 #endif
12075 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
12076 {
12077 PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pskModelFlag,&__pyx_mstate_global->__pyx_n_u_rowptr,&__pyx_mstate_global->__pyx_n_u_colind,&__pyx_mstate_global->__pyx_n_u_matType,&__pyx_mstate_global->__pyx_n_u_muw,&__pyx_mstate_global->__pyx_n_u_mun,&__pyx_mstate_global->__pyx_n_u_omega,&__pyx_mstate_global->__pyx_n_u_Kbar,&__pyx_mstate_global->__pyx_n_u_b,&__pyx_mstate_global->__pyx_n_u_capillaryDiffusionScaling,&__pyx_mstate_global->__pyx_n_u_advectionScaling,&__pyx_mstate_global->__pyx_n_u_rwork_psk,&__pyx_mstate_global->__pyx_n_u_iwork_psk,&__pyx_mstate_global->__pyx_n_u_rwork_psk_tol,&__pyx_mstate_global->__pyx_n_u_rwork_density_w,&__pyx_mstate_global->__pyx_n_u_rwork_density_n,&__pyx_mstate_global->__pyx_n_u_g,&__pyx_mstate_global->__pyx_n_u_qt,&__pyx_mstate_global->__pyx_n_u_u,&__pyx_mstate_global->__pyx_n_u_sw,&__pyx_mstate_global->__pyx_n_u_m,&__pyx_mstate_global->__pyx_n_u_dm,&__pyx_mstate_global->__pyx_n_u_phi,&__pyx_mstate_global->__pyx_n_u_dphi,&__pyx_mstate_global->__pyx_n_u_f,&__pyx_mstate_global->__pyx_n_u_df,&__pyx_mstate_global->__pyx_n_u_a,&__pyx_mstate_global->__pyx_n_u_da,0};
12078 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
12079 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1931, __pyx_L3_error)
12080 if (__pyx_kwds_len > 0) {
12081 switch (__pyx_nargs) {
12082 case 28:
12083 values[27] = __Pyx_ArgRef_FASTCALL(__pyx_args, 27);
12084 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[27])) __PYX_ERR(0, 1931, __pyx_L3_error)
12085 CYTHON_FALLTHROUGH;
12086 case 27:
12087 values[26] = __Pyx_ArgRef_FASTCALL(__pyx_args, 26);
12088 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[26])) __PYX_ERR(0, 1931, __pyx_L3_error)
12089 CYTHON_FALLTHROUGH;
12090 case 26:
12091 values[25] = __Pyx_ArgRef_FASTCALL(__pyx_args, 25);
12092 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[25])) __PYX_ERR(0, 1931, __pyx_L3_error)
12093 CYTHON_FALLTHROUGH;
12094 case 25:
12095 values[24] = __Pyx_ArgRef_FASTCALL(__pyx_args, 24);
12096 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[24])) __PYX_ERR(0, 1931, __pyx_L3_error)
12097 CYTHON_FALLTHROUGH;
12098 case 24:
12099 values[23] = __Pyx_ArgRef_FASTCALL(__pyx_args, 23);
12100 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[23])) __PYX_ERR(0, 1931, __pyx_L3_error)
12101 CYTHON_FALLTHROUGH;
12102 case 23:
12103 values[22] = __Pyx_ArgRef_FASTCALL(__pyx_args, 22);
12104 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[22])) __PYX_ERR(0, 1931, __pyx_L3_error)
12105 CYTHON_FALLTHROUGH;
12106 case 22:
12107 values[21] = __Pyx_ArgRef_FASTCALL(__pyx_args, 21);
12108 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[21])) __PYX_ERR(0, 1931, __pyx_L3_error)
12109 CYTHON_FALLTHROUGH;
12110 case 21:
12111 values[20] = __Pyx_ArgRef_FASTCALL(__pyx_args, 20);
12112 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[20])) __PYX_ERR(0, 1931, __pyx_L3_error)
12113 CYTHON_FALLTHROUGH;
12114 case 20:
12115 values[19] = __Pyx_ArgRef_FASTCALL(__pyx_args, 19);
12116 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[19])) __PYX_ERR(0, 1931, __pyx_L3_error)
12117 CYTHON_FALLTHROUGH;
12118 case 19:
12119 values[18] = __Pyx_ArgRef_FASTCALL(__pyx_args, 18);
12120 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[18])) __PYX_ERR(0, 1931, __pyx_L3_error)
12121 CYTHON_FALLTHROUGH;
12122 case 18:
12123 values[17] = __Pyx_ArgRef_FASTCALL(__pyx_args, 17);
12124 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[17])) __PYX_ERR(0, 1931, __pyx_L3_error)
12125 CYTHON_FALLTHROUGH;
12126 case 17:
12127 values[16] = __Pyx_ArgRef_FASTCALL(__pyx_args, 16);
12128 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[16])) __PYX_ERR(0, 1931, __pyx_L3_error)
12129 CYTHON_FALLTHROUGH;
12130 case 16:
12131 values[15] = __Pyx_ArgRef_FASTCALL(__pyx_args, 15);
12132 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[15])) __PYX_ERR(0, 1931, __pyx_L3_error)
12133 CYTHON_FALLTHROUGH;
12134 case 15:
12135 values[14] = __Pyx_ArgRef_FASTCALL(__pyx_args, 14);
12136 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[14])) __PYX_ERR(0, 1931, __pyx_L3_error)
12137 CYTHON_FALLTHROUGH;
12138 case 14:
12139 values[13] = __Pyx_ArgRef_FASTCALL(__pyx_args, 13);
12140 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[13])) __PYX_ERR(0, 1931, __pyx_L3_error)
12141 CYTHON_FALLTHROUGH;
12142 case 13:
12143 values[12] = __Pyx_ArgRef_FASTCALL(__pyx_args, 12);
12144 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[12])) __PYX_ERR(0, 1931, __pyx_L3_error)
12145 CYTHON_FALLTHROUGH;
12146 case 12:
12147 values[11] = __Pyx_ArgRef_FASTCALL(__pyx_args, 11);
12148 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[11])) __PYX_ERR(0, 1931, __pyx_L3_error)
12149 CYTHON_FALLTHROUGH;
12150 case 11:
12151 values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10);
12152 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 1931, __pyx_L3_error)
12153 CYTHON_FALLTHROUGH;
12154 case 10:
12155 values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
12156 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 1931, __pyx_L3_error)
12157 CYTHON_FALLTHROUGH;
12158 case 9:
12159 values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
12160 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 1931, __pyx_L3_error)
12161 CYTHON_FALLTHROUGH;
12162 case 8:
12163 values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
12164 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 1931, __pyx_L3_error)
12165 CYTHON_FALLTHROUGH;
12166 case 7:
12167 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
12168 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 1931, __pyx_L3_error)
12169 CYTHON_FALLTHROUGH;
12170 case 6:
12171 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
12172 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1931, __pyx_L3_error)
12173 CYTHON_FALLTHROUGH;
12174 case 5:
12175 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
12176 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1931, __pyx_L3_error)
12177 CYTHON_FALLTHROUGH;
12178 case 4:
12179 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
12180 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1931, __pyx_L3_error)
12181 CYTHON_FALLTHROUGH;
12182 case 3:
12183 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
12184 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1931, __pyx_L3_error)
12185 CYTHON_FALLTHROUGH;
12186 case 2:
12187 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
12188 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1931, __pyx_L3_error)
12189 CYTHON_FALLTHROUGH;
12190 case 1:
12191 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
12192 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1931, __pyx_L3_error)
12193 CYTHON_FALLTHROUGH;
12194 case 0: break;
12195 default: goto __pyx_L5_argtuple_error;
12196 }
12197 const Py_ssize_t kwd_pos_args = __pyx_nargs;
12198 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType", 0) < (0)) __PYX_ERR(0, 1931, __pyx_L3_error)
12199 for (Py_ssize_t i = __pyx_nargs; i < 28; i++) {
12200 if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType", 1, 28, 28, i); __PYX_ERR(0, 1931, __pyx_L3_error) }
12201 }
12202 } else if (unlikely(__pyx_nargs != 28)) {
12203 goto __pyx_L5_argtuple_error;
12204 } else {
12205 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
12206 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1931, __pyx_L3_error)
12207 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
12208 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1931, __pyx_L3_error)
12209 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
12210 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1931, __pyx_L3_error)
12211 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
12212 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1931, __pyx_L3_error)
12213 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
12214 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1931, __pyx_L3_error)
12215 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
12216 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1931, __pyx_L3_error)
12217 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
12218 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 1931, __pyx_L3_error)
12219 values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
12220 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 1931, __pyx_L3_error)
12221 values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
12222 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 1931, __pyx_L3_error)
12223 values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
12224 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 1931, __pyx_L3_error)
12225 values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10);
12226 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 1931, __pyx_L3_error)
12227 values[11] = __Pyx_ArgRef_FASTCALL(__pyx_args, 11);
12228 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[11])) __PYX_ERR(0, 1931, __pyx_L3_error)
12229 values[12] = __Pyx_ArgRef_FASTCALL(__pyx_args, 12);
12230 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[12])) __PYX_ERR(0, 1931, __pyx_L3_error)
12231 values[13] = __Pyx_ArgRef_FASTCALL(__pyx_args, 13);
12232 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[13])) __PYX_ERR(0, 1931, __pyx_L3_error)
12233 values[14] = __Pyx_ArgRef_FASTCALL(__pyx_args, 14);
12234 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[14])) __PYX_ERR(0, 1931, __pyx_L3_error)
12235 values[15] = __Pyx_ArgRef_FASTCALL(__pyx_args, 15);
12236 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[15])) __PYX_ERR(0, 1931, __pyx_L3_error)
12237 values[16] = __Pyx_ArgRef_FASTCALL(__pyx_args, 16);
12238 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[16])) __PYX_ERR(0, 1931, __pyx_L3_error)
12239 values[17] = __Pyx_ArgRef_FASTCALL(__pyx_args, 17);
12240 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[17])) __PYX_ERR(0, 1931, __pyx_L3_error)
12241 values[18] = __Pyx_ArgRef_FASTCALL(__pyx_args, 18);
12242 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[18])) __PYX_ERR(0, 1931, __pyx_L3_error)
12243 values[19] = __Pyx_ArgRef_FASTCALL(__pyx_args, 19);
12244 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[19])) __PYX_ERR(0, 1931, __pyx_L3_error)
12245 values[20] = __Pyx_ArgRef_FASTCALL(__pyx_args, 20);
12246 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[20])) __PYX_ERR(0, 1931, __pyx_L3_error)
12247 values[21] = __Pyx_ArgRef_FASTCALL(__pyx_args, 21);
12248 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[21])) __PYX_ERR(0, 1931, __pyx_L3_error)
12249 values[22] = __Pyx_ArgRef_FASTCALL(__pyx_args, 22);
12250 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[22])) __PYX_ERR(0, 1931, __pyx_L3_error)
12251 values[23] = __Pyx_ArgRef_FASTCALL(__pyx_args, 23);
12252 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[23])) __PYX_ERR(0, 1931, __pyx_L3_error)
12253 values[24] = __Pyx_ArgRef_FASTCALL(__pyx_args, 24);
12254 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[24])) __PYX_ERR(0, 1931, __pyx_L3_error)
12255 values[25] = __Pyx_ArgRef_FASTCALL(__pyx_args, 25);
12256 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[25])) __PYX_ERR(0, 1931, __pyx_L3_error)
12257 values[26] = __Pyx_ArgRef_FASTCALL(__pyx_args, 26);
12258 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[26])) __PYX_ERR(0, 1931, __pyx_L3_error)
12259 values[27] = __Pyx_ArgRef_FASTCALL(__pyx_args, 27);
12260 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[27])) __PYX_ERR(0, 1931, __pyx_L3_error)
12261 }
12262 __pyx_v_pskModelFlag = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_pskModelFlag == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1931, __pyx_L3_error)
12263 __pyx_v_rowptr = ((PyArrayObject *)values[1]);
12264 __pyx_v_colind = ((PyArrayObject *)values[2]);
12265 __pyx_v_matType = ((PyArrayObject *)values[3]);
12266 __pyx_v_muw = __Pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_muw == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1935, __pyx_L3_error)
12267 __pyx_v_mun = __Pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_mun == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1936, __pyx_L3_error)
12268 __pyx_v_omega = ((PyArrayObject *)values[6]);
12269 __pyx_v_Kbar = ((PyArrayObject *)values[7]);
12270 __pyx_v_b = __Pyx_PyFloat_AsDouble(values[8]); if (unlikely((__pyx_v_b == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1939, __pyx_L3_error)
12271 __pyx_v_capillaryDiffusionScaling = __Pyx_PyFloat_AsDouble(values[9]); if (unlikely((__pyx_v_capillaryDiffusionScaling == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1940, __pyx_L3_error)
12272 __pyx_v_advectionScaling = __Pyx_PyFloat_AsDouble(values[10]); if (unlikely((__pyx_v_advectionScaling == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1941, __pyx_L3_error)
12273 __pyx_v_rwork_psk = ((PyArrayObject *)values[11]);
12274 __pyx_v_iwork_psk = ((PyArrayObject *)values[12]);
12275 __pyx_v_rwork_psk_tol = ((PyArrayObject *)values[13]);
12276 __pyx_v_rwork_density_w = ((PyArrayObject *)values[14]);
12277 __pyx_v_rwork_density_n = ((PyArrayObject *)values[15]);
12278 __pyx_v_g = ((PyArrayObject *)values[16]);
12279 __pyx_v_qt = ((PyArrayObject *)values[17]);
12280 __pyx_v_u = ((PyArrayObject *)values[18]);
12281 __pyx_v_sw = ((PyArrayObject *)values[19]);
12282 __pyx_v_m = ((PyArrayObject *)values[20]);
12283 __pyx_v_dm = ((PyArrayObject *)values[21]);
12284 __pyx_v_phi = ((PyArrayObject *)values[22]);
12285 __pyx_v_dphi = ((PyArrayObject *)values[23]);
12286 __pyx_v_f = ((PyArrayObject *)values[24]);
12287 __pyx_v_df = ((PyArrayObject *)values[25]);
12288 __pyx_v_a = ((PyArrayObject *)values[26]);
12289 __pyx_v_da = ((PyArrayObject *)values[27]);
12290 }
12291 goto __pyx_L6_skip;
12292 __pyx_L5_argtuple_error:;
12293 __Pyx_RaiseArgtupleInvalid("twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType", 1, 28, 28, __pyx_nargs); __PYX_ERR(0, 1931, __pyx_L3_error)
12294 __pyx_L6_skip:;
12295 goto __pyx_L4_argument_unpacking_done;
12296 __pyx_L3_error:;
12297 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
12298 Py_XDECREF(values[__pyx_temp]);
12299 }
12300 __Pyx_AddTraceback("cTwophaseDarcyCoefficients.twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType", __pyx_clineno, __pyx_lineno, __pyx_filename);
12301 __Pyx_RefNannyFinishContext();
12302 return NULL;
12303 __pyx_L4_argument_unpacking_done:;
12304 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rowptr), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "rowptr", 0))) __PYX_ERR(0, 1932, __pyx_L1_error)
12305 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_colind), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "colind", 0))) __PYX_ERR(0, 1933, __pyx_L1_error)
12306 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_matType), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "matType", 0))) __PYX_ERR(0, 1934, __pyx_L1_error)
12307 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_omega), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "omega", 0))) __PYX_ERR(0, 1937, __pyx_L1_error)
12308 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Kbar), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "Kbar", 0))) __PYX_ERR(0, 1938, __pyx_L1_error)
12309 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_psk), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "rwork_psk", 0))) __PYX_ERR(0, 1942, __pyx_L1_error)
12310 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork_psk), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "iwork_psk", 0))) __PYX_ERR(0, 1943, __pyx_L1_error)
12311 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_psk_tol), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "rwork_psk_tol", 0))) __PYX_ERR(0, 1944, __pyx_L1_error)
12312 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_density_w), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "rwork_density_w", 0))) __PYX_ERR(0, 1945, __pyx_L1_error)
12313 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork_density_n), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "rwork_density_n", 0))) __PYX_ERR(0, 1946, __pyx_L1_error)
12314 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_g), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "g", 0))) __PYX_ERR(0, 1947, __pyx_L1_error)
12315 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_qt), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "qt", 0))) __PYX_ERR(0, 1947, __pyx_L1_error)
12316 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "u", 0))) __PYX_ERR(0, 1947, __pyx_L1_error)
12317 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sw), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "sw", 0))) __PYX_ERR(0, 1947, __pyx_L1_error)
12318 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_m), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "m", 0))) __PYX_ERR(0, 1947, __pyx_L1_error)
12319 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dm), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "dm", 0))) __PYX_ERR(0, 1947, __pyx_L1_error)
12320 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_phi), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "phi", 0))) __PYX_ERR(0, 1947, __pyx_L1_error)
12321 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dphi), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "dphi", 0))) __PYX_ERR(0, 1947, __pyx_L1_error)
12322 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_f), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "f", 0))) __PYX_ERR(0, 1948, __pyx_L1_error)
12323 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_df), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "df", 0))) __PYX_ERR(0, 1948, __pyx_L1_error)
12324 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "a", 0))) __PYX_ERR(0, 1948, __pyx_L1_error)
12325 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_da), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "da", 0))) __PYX_ERR(0, 1948, __pyx_L1_error)
12326 __pyx_r = __pyx_pf_26cTwophaseDarcyCoefficients_22twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType(__pyx_self, __pyx_v_pskModelFlag, __pyx_v_rowptr, __pyx_v_colind, __pyx_v_matType, __pyx_v_muw, __pyx_v_mun, __pyx_v_omega, __pyx_v_Kbar, __pyx_v_b, __pyx_v_capillaryDiffusionScaling, __pyx_v_advectionScaling, __pyx_v_rwork_psk, __pyx_v_iwork_psk, __pyx_v_rwork_psk_tol, __pyx_v_rwork_density_w, __pyx_v_rwork_density_n, __pyx_v_g, __pyx_v_qt, __pyx_v_u, __pyx_v_sw, __pyx_v_m, __pyx_v_dm, __pyx_v_phi, __pyx_v_dphi, __pyx_v_f, __pyx_v_df, __pyx_v_a, __pyx_v_da);
12327
12328 /* function exit code */
12329 goto __pyx_L0;
12330 __pyx_L1_error:;
12331 __pyx_r = NULL;
12332 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
12333 Py_XDECREF(values[__pyx_temp]);
12334 }
12335 goto __pyx_L7_cleaned_up;
12336 __pyx_L0:;
12337 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
12338 Py_XDECREF(values[__pyx_temp]);
12339 }
12340 __pyx_L7_cleaned_up:;
12341
12342
12343
12344
12345
12346
12347 __Pyx_RefNannyFinishContext();
12348 return __pyx_r;
12349}
12350
12351static 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) {
12352 int __pyx_v_nPointsPerSimplex;
12353 int __pyx_v_nSimplex;
12354 PyObject *__pyx_r = NULL;
12355 __Pyx_RefNannyDeclarations
12356 npy_intp __pyx_t_1;
12357 int __pyx_lineno = 0;
12358 const char *__pyx_filename = NULL;
12359 int __pyx_clineno = 0;
12360 __Pyx_RefNannySetupContext("twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType", 0);
12361
12362 /* "cTwophaseDarcyCoefficients.pyx":1956
12363 *
12364 * """
12365 * cdef int nPointsPerSimplex=sw.shape[sw.ndim-1] # <<<<<<<<<<<<<<
12366 * cdef int nSimplex=sw.size//nPointsPerSimplex
12367 * if pskModelFlag == 0:
12368*/
12369 __pyx_v_nPointsPerSimplex = (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_sw)[(__pyx_f_5numpy_7ndarray_4ndim___get__(__pyx_v_sw) - 1)]);
12370
12371 /* "cTwophaseDarcyCoefficients.pyx":1957
12372 * """
12373 * cdef int nPointsPerSimplex=sw.shape[sw.ndim-1]
12374 * cdef int nSimplex=sw.size//nPointsPerSimplex # <<<<<<<<<<<<<<
12375 * if pskModelFlag == 0:
12376 * tpdc.twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType[SimplePSK](nSimplex,
12377*/
12378 __pyx_t_1 = __pyx_f_5numpy_7ndarray_4size___get__(__pyx_v_sw);
12379
12380 if (unlikely(__pyx_v_nPointsPerSimplex == 0)) {
12381 PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
12382 __PYX_ERR(0, 1957, __pyx_L1_error)
12383 }
12384 else if (sizeof(npy_intp) == sizeof(long) && (!(((int)-1) > 0)) && unlikely(__pyx_v_nPointsPerSimplex == (int)-1) && unlikely(__Pyx_UNARY_NEG_WOULD_OVERFLOW(__pyx_t_1))) {
12385 PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
12386 __PYX_ERR(0, 1957, __pyx_L1_error)
12387 }
12388 __pyx_v_nSimplex = __Pyx_div_npy_intp(__pyx_t_1, __pyx_v_nPointsPerSimplex, 0);
12389
12390
12391 /* "cTwophaseDarcyCoefficients.pyx":1958
12392 * cdef int nPointsPerSimplex=sw.shape[sw.ndim-1]
12393 * cdef int nSimplex=sw.size//nPointsPerSimplex
12394 * if pskModelFlag == 0: # <<<<<<<<<<<<<<
12395 * tpdc.twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType[SimplePSK](nSimplex,
12396 * nPointsPerSimplex,
12397*/
12398 switch (__pyx_v_pskModelFlag) {
12399 case 0:
12400
12401 /* "cTwophaseDarcyCoefficients.pyx":1959
12402 * cdef int nSimplex=sw.size//nPointsPerSimplex
12403 * if pskModelFlag == 0:
12404 * tpdc.twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType[SimplePSK](nSimplex, # <<<<<<<<<<<<<<
12405 * nPointsPerSimplex,
12406 * g.shape[0],
12407*/
12408 (void)(twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType<SimplePSK>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_g)[0]), 2, ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rowptr)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_colind)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_matType)), __pyx_v_muw, __pyx_v_mun, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_omega)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Kbar)), __pyx_v_b, __pyx_v_capillaryDiffusionScaling, __pyx_v_advectionScaling, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_iwork_psk)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk_tol)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_w)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_n)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_g)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_qt)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_u)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_sw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_m)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dm)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_f)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_df)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_a)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_da))));
12409
12410 /* "cTwophaseDarcyCoefficients.pyx":1958
12411 * cdef int nPointsPerSimplex=sw.shape[sw.ndim-1]
12412 * cdef int nSimplex=sw.size//nPointsPerSimplex
12413 * if pskModelFlag == 0: # <<<<<<<<<<<<<<
12414 * tpdc.twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType[SimplePSK](nSimplex,
12415 * nPointsPerSimplex,
12416*/
12417 break;
12418 case 1:
12419
12420 /* "cTwophaseDarcyCoefficients.pyx":1980
12421 * <double*>(df.data), <double*>(a.data), <double*>(da.data))
12422 * elif pskModelFlag == 1:
12423 * tpdc.twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType[VGM](nSimplex, # <<<<<<<<<<<<<<
12424 * nPointsPerSimplex,
12425 * g.shape[0],
12426*/
12427 (void)(twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType<VGM>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_g)[0]), 4, ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rowptr)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_colind)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_matType)), __pyx_v_muw, __pyx_v_mun, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_omega)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Kbar)), __pyx_v_b, __pyx_v_capillaryDiffusionScaling, __pyx_v_advectionScaling, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_iwork_psk)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk_tol)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_w)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_n)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_g)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_qt)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_u)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_sw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_m)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dm)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_f)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_df)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_a)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_da))));
12428
12429 /* "cTwophaseDarcyCoefficients.pyx":1979
12430 * <double*>(dm.data), <double*>(phi.data), <double*>(dphi.data), <double*>(f.data),
12431 * <double*>(df.data), <double*>(a.data), <double*>(da.data))
12432 * elif pskModelFlag == 1: # <<<<<<<<<<<<<<
12433 * tpdc.twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType[VGM](nSimplex,
12434 * nPointsPerSimplex,
12435*/
12436 break;
12437 default:
12438
12439 /* "cTwophaseDarcyCoefficients.pyx":2001
12440 * <double*>(df.data), <double*>(a.data), <double*>(da.data))
12441 * else:
12442 * tpdc.twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType[SimplePSK](nSimplex, # <<<<<<<<<<<<<<
12443 * nPointsPerSimplex,
12444 * g.shape[0],
12445*/
12446 (void)(twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType<SimplePSK>(__pyx_v_nSimplex, __pyx_v_nPointsPerSimplex, (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_g)[0]), 2, ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rowptr)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_colind)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_matType)), __pyx_v_muw, __pyx_v_mun, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_omega)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Kbar)), __pyx_v_b, __pyx_v_capillaryDiffusionScaling, __pyx_v_advectionScaling, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_iwork_psk)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_psk_tol)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_w)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_rwork_density_n)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_g)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_qt)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_u)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_sw)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_m)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dm)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_phi)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dphi)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_f)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_df)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_a)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_da))));
12447 break;
12448 }
12449
12450 /* "cTwophaseDarcyCoefficients.pyx":1931
12451 * <double*>(splineTable.data))
12452 *
12453 * def twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType(int pskModelFlag, # <<<<<<<<<<<<<<
12454 * np.ndarray rowptr,
12455 * np.ndarray colind,
12456*/
12457
12458 /* function exit code */
12459 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
12460 goto __pyx_L0;
12461 __pyx_L1_error:;
12462 __Pyx_AddTraceback("cTwophaseDarcyCoefficients.twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType", __pyx_clineno, __pyx_lineno, __pyx_filename);
12463 __pyx_r = NULL;
12464 __pyx_L0:;
12465
12466
12467 __Pyx_XGIVEREF(__pyx_r);
12468 __Pyx_RefNannyFinishContext();
12469 return __pyx_r;
12470}
12471/* #### Code section: module_exttypes ### */
12472
12473static PyMethodDef __pyx_methods[] = {
12474 {0, 0, 0, 0}
12475};
12476/* #### Code section: initfunc_declarations ### */
12477static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate); /*proto*/
12478static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/
12479static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void); /*proto*/
12480static CYTHON_SMALL_CODE int __Pyx_InitAfterSharedUtility(void); /*proto*/
12481static CYTHON_SMALL_CODE int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/
12482static CYTHON_SMALL_CODE int __Pyx_modinit_Global_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
12483static CYTHON_SMALL_CODE int __Pyx_modinit_Variable_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
12484static CYTHON_SMALL_CODE int __Pyx_modinit_Function_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
12485static CYTHON_SMALL_CODE int __Pyx_modinit_Type_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
12486static CYTHON_SMALL_CODE int __Pyx_modinit_Variable_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
12487static CYTHON_SMALL_CODE int __Pyx_modinit_Function_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
12488static CYTHON_SMALL_CODE int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate); /*proto*/
12489/* #### Code section: init_module ### */
12490
12491static int __Pyx_modinit_Global_init_code(__pyx_mstatetype *__pyx_mstate) {
12492 __Pyx_RefNannyDeclarations
12493 CYTHON_UNUSED_VAR(__pyx_mstate);
12494 __Pyx_RefNannySetupContext("__Pyx_modinit_Global_init_code", 0);
12495 /*--- Global init code ---*/
12496 __Pyx_RefNannyFinishContext();
12497 return 0;
12498}
12499
12500static int __Pyx_modinit_Variable_export_code(__pyx_mstatetype *__pyx_mstate) {
12501 __Pyx_RefNannyDeclarations
12502 CYTHON_UNUSED_VAR(__pyx_mstate);
12503 __Pyx_RefNannySetupContext("__Pyx_modinit_Variable_export_code", 0);
12504 /*--- Variable export code ---*/
12505 __Pyx_RefNannyFinishContext();
12506 return 0;
12507}
12508
12509static int __Pyx_modinit_Function_export_code(__pyx_mstatetype *__pyx_mstate) {
12510 __Pyx_RefNannyDeclarations
12511 CYTHON_UNUSED_VAR(__pyx_mstate);
12512 __Pyx_RefNannySetupContext("__Pyx_modinit_Function_export_code", 0);
12513 /*--- Function export code ---*/
12514 __Pyx_RefNannyFinishContext();
12515 return 0;
12516}
12517
12518static int __Pyx_modinit_Type_import_code(__pyx_mstatetype *__pyx_mstate) {
12519 __Pyx_RefNannyDeclarations
12520 PyObject *__pyx_t_1 = NULL;
12521 int __pyx_lineno = 0;
12522 const char *__pyx_filename = NULL;
12523 int __pyx_clineno = 0;
12524 CYTHON_UNUSED_VAR(__pyx_mstate);
12525 __Pyx_RefNannySetupContext("__Pyx_modinit_Type_import_code", 0);
12526 /*--- Type import code ---*/
12527 __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 9, __pyx_L1_error)
12528 __Pyx_GOTREF(__pyx_t_1);
12529 __pyx_mstate->__pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_3_0(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type",
12530 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
12531 sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyTypeObject),
12532 #elif CYTHON_COMPILING_IN_LIMITED_API
12533 0, 0,
12534 #else
12535 sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyHeapTypeObject),
12536 #endif
12537 __Pyx_ImportType_CheckSize_Warn_3_3_0); if (!__pyx_mstate->__pyx_ptype_7cpython_4type_type) __PYX_ERR(2, 9, __pyx_L1_error)
12538 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12539 __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 229, __pyx_L1_error)
12540 __Pyx_GOTREF(__pyx_t_1);
12541 __pyx_mstate->__pyx_ptype_5numpy_dtype = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "dtype",
12542 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
12543 sizeof(PyArray_Descr), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArray_Descr),
12544 #elif CYTHON_COMPILING_IN_LIMITED_API
12545 sizeof(PyArray_Descr), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArray_Descr),
12546 #else
12547 sizeof(PyArray_Descr), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArray_Descr),
12548 #endif
12549 __Pyx_ImportType_CheckSize_Ignore_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_dtype) __PYX_ERR(1, 229, __pyx_L1_error)
12550 __pyx_mstate->__pyx_ptype_5numpy_flatiter = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "flatiter",
12551 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
12552 sizeof(PyArrayIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArrayIterObject),
12553 #elif CYTHON_COMPILING_IN_LIMITED_API
12554 sizeof(PyArrayIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArrayIterObject),
12555 #else
12556 sizeof(PyArrayIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArrayIterObject),
12557 #endif
12558 __Pyx_ImportType_CheckSize_Ignore_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_flatiter) __PYX_ERR(1, 286, __pyx_L1_error)
12559 __pyx_mstate->__pyx_ptype_5numpy_broadcast = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "broadcast",
12560 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
12561 sizeof(PyArrayMultiIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArrayMultiIterObject),
12562 #elif CYTHON_COMPILING_IN_LIMITED_API
12563 sizeof(PyArrayMultiIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArrayMultiIterObject),
12564 #else
12565 sizeof(PyArrayMultiIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArrayMultiIterObject),
12566 #endif
12567 __Pyx_ImportType_CheckSize_Ignore_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_broadcast) __PYX_ERR(1, 290, __pyx_L1_error)
12568 __pyx_mstate->__pyx_ptype_5numpy_ndarray = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "ndarray",
12569 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
12570 sizeof(PyArrayObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArrayObject),
12571 #elif CYTHON_COMPILING_IN_LIMITED_API
12572 sizeof(PyArrayObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArrayObject),
12573 #else
12574 sizeof(PyArrayObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArrayObject),
12575 #endif
12576 __Pyx_ImportType_CheckSize_Ignore_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_ndarray) __PYX_ERR(1, 329, __pyx_L1_error)
12577 __pyx_mstate->__pyx_ptype_5numpy_generic = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "generic",
12578 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
12579 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
12580 #elif CYTHON_COMPILING_IN_LIMITED_API
12581 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
12582 #else
12583 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
12584 #endif
12585 __Pyx_ImportType_CheckSize_Warn_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_generic) __PYX_ERR(1, 847, __pyx_L1_error)
12586 __pyx_mstate->__pyx_ptype_5numpy_number = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "number",
12587 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
12588 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
12589 #elif CYTHON_COMPILING_IN_LIMITED_API
12590 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
12591 #else
12592 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
12593 #endif
12594 __Pyx_ImportType_CheckSize_Warn_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_number) __PYX_ERR(1, 849, __pyx_L1_error)
12595 __pyx_mstate->__pyx_ptype_5numpy_integer = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "integer",
12596 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
12597 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
12598 #elif CYTHON_COMPILING_IN_LIMITED_API
12599 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
12600 #else
12601 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
12602 #endif
12603 __Pyx_ImportType_CheckSize_Warn_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_integer) __PYX_ERR(1, 851, __pyx_L1_error)
12604 __pyx_mstate->__pyx_ptype_5numpy_signedinteger = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "signedinteger",
12605 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
12606 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
12607 #elif CYTHON_COMPILING_IN_LIMITED_API
12608 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
12609 #else
12610 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
12611 #endif
12612 __Pyx_ImportType_CheckSize_Warn_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_signedinteger) __PYX_ERR(1, 853, __pyx_L1_error)
12613 __pyx_mstate->__pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "unsignedinteger",
12614 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
12615 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
12616 #elif CYTHON_COMPILING_IN_LIMITED_API
12617 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
12618 #else
12619 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
12620 #endif
12621 __Pyx_ImportType_CheckSize_Warn_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(1, 855, __pyx_L1_error)
12622 __pyx_mstate->__pyx_ptype_5numpy_inexact = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "inexact",
12623 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
12624 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
12625 #elif CYTHON_COMPILING_IN_LIMITED_API
12626 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
12627 #else
12628 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
12629 #endif
12630 __Pyx_ImportType_CheckSize_Warn_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_inexact) __PYX_ERR(1, 857, __pyx_L1_error)
12631 __pyx_mstate->__pyx_ptype_5numpy_floating = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "floating",
12632 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
12633 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
12634 #elif CYTHON_COMPILING_IN_LIMITED_API
12635 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
12636 #else
12637 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
12638 #endif
12639 __Pyx_ImportType_CheckSize_Warn_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_floating) __PYX_ERR(1, 859, __pyx_L1_error)
12640 __pyx_mstate->__pyx_ptype_5numpy_complexfloating = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "complexfloating",
12641 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
12642 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
12643 #elif CYTHON_COMPILING_IN_LIMITED_API
12644 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
12645 #else
12646 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
12647 #endif
12648 __Pyx_ImportType_CheckSize_Warn_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_complexfloating) __PYX_ERR(1, 861, __pyx_L1_error)
12649 __pyx_mstate->__pyx_ptype_5numpy_flexible = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "flexible",
12650 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
12651 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
12652 #elif CYTHON_COMPILING_IN_LIMITED_API
12653 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
12654 #else
12655 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
12656 #endif
12657 __Pyx_ImportType_CheckSize_Warn_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_flexible) __PYX_ERR(1, 863, __pyx_L1_error)
12658 __pyx_mstate->__pyx_ptype_5numpy_character = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "character",
12659 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
12660 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
12661 #elif CYTHON_COMPILING_IN_LIMITED_API
12662 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
12663 #else
12664 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
12665 #endif
12666 __Pyx_ImportType_CheckSize_Warn_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_character) __PYX_ERR(1, 865, __pyx_L1_error)
12667 __pyx_mstate->__pyx_ptype_5numpy_ufunc = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "ufunc",
12668 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
12669 sizeof(PyUFuncObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyUFuncObject),
12670 #elif CYTHON_COMPILING_IN_LIMITED_API
12671 sizeof(PyUFuncObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyUFuncObject),
12672 #else
12673 sizeof(PyUFuncObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyUFuncObject),
12674 #endif
12675 __Pyx_ImportType_CheckSize_Ignore_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_ufunc) __PYX_ERR(1, 946, __pyx_L1_error)
12676 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12677 __Pyx_RefNannyFinishContext();
12678 return 0;
12679 __pyx_L1_error:;
12680 __Pyx_XDECREF(__pyx_t_1);
12681 __Pyx_RefNannyFinishContext();
12682 return -1;
12683}
12684
12685static int __Pyx_modinit_Variable_import_code(__pyx_mstatetype *__pyx_mstate) {
12686 __Pyx_RefNannyDeclarations
12687 CYTHON_UNUSED_VAR(__pyx_mstate);
12688 __Pyx_RefNannySetupContext("__Pyx_modinit_Variable_import_code", 0);
12689 /*--- Variable import code ---*/
12690 __Pyx_RefNannyFinishContext();
12691 return 0;
12692}
12693
12694static int __Pyx_modinit_Function_import_code(__pyx_mstatetype *__pyx_mstate) {
12695 __Pyx_RefNannyDeclarations
12696 CYTHON_UNUSED_VAR(__pyx_mstate);
12697 __Pyx_RefNannySetupContext("__Pyx_modinit_Function_import_code", 0);
12698 /*--- Function import code ---*/
12699 __Pyx_RefNannyFinishContext();
12700 return 0;
12701}
12702
12703#if CYTHON_PEP489_MULTI_PHASE_INIT
12704static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
12705static int __pyx_pymod_exec_cTwophaseDarcyCoefficients(PyObject* module); /*proto*/
12706static PyModuleDef_Slot __pyx_moduledef_slots[] = {
12707 {Py_mod_create, (void*)__pyx_pymod_create},
12708 {Py_mod_exec, (void*)__pyx_pymod_exec_cTwophaseDarcyCoefficients},
12709 #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
12710 {Py_mod_gil, __Pyx_FREETHREADING_COMPATIBLE},
12711 #endif
12712 #if PY_VERSION_HEX >= 0x030C0000 && CYTHON_USE_MODULE_STATE
12713 {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED},
12714 #endif
12715 {0, NULL}
12716};
12717#endif
12718
12719#ifdef __cplusplus
12720namespace {
12721 struct PyModuleDef __pyx_moduledef =
12722 #else
12723 static struct PyModuleDef __pyx_moduledef =
12724 #endif
12725 {
12726 PyModuleDef_HEAD_INIT,
12727 "cTwophaseDarcyCoefficients",
12728 0, /* m_doc */
12729 #if CYTHON_USE_MODULE_STATE
12730 sizeof(__pyx_mstatetype), /* m_size */
12731 #else
12732 (CYTHON_PEP489_MULTI_PHASE_INIT) ? 0 : -1, /* m_size */
12733 #endif
12734 __pyx_methods /* m_methods */,
12735 #if CYTHON_PEP489_MULTI_PHASE_INIT
12736 __pyx_moduledef_slots, /* m_slots */
12737 #else
12738 NULL, /* m_reload */
12739 #endif
12740 #if CYTHON_USE_MODULE_STATE
12741 __pyx_m_traverse, /* m_traverse */
12742 __pyx_m_clear, /* m_clear */
12743 NULL /* m_free */
12744 #else
12745 NULL, /* m_traverse */
12746 NULL, /* m_clear */
12747 NULL /* m_free */
12748 #endif
12749 };
12750 #ifdef __cplusplus
12751} /* anonymous namespace */
12752#endif
12753
12754/* PyModInitFuncType */
12755#ifndef CYTHON_NO_PYINIT_EXPORT
12756 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
12757#else
12758 #ifdef __cplusplus
12759 #define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
12760 #else
12761 #define __Pyx_PyMODINIT_FUNC PyObject *
12762 #endif
12763#endif
12764
12765__Pyx_PyMODINIT_FUNC PyInit_cTwophaseDarcyCoefficients(void) CYTHON_SMALL_CODE; /*proto*/
12766__Pyx_PyMODINIT_FUNC PyInit_cTwophaseDarcyCoefficients(void)
12767#if CYTHON_PEP489_MULTI_PHASE_INIT
12768{
12769 return PyModuleDef_Init(&__pyx_moduledef);
12770}
12771/* ModuleCreationPEP489 */
12772#if CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x030A0000 &&\
12773 (defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)))
12774static PY_INT64_T __Pyx_GetCurrentInterpreterId(void) {
12775 {
12776 PyObject *module = PyImport_ImportModule("_interpreters"); // 3.13+ I think
12777 if (!module) {
12778 if (!PyErr_ExceptionMatches(PyExc_Exception)) {
12779 goto bad; // BaseException
12780 }
12781 PyErr_Clear(); // just try the 3.8-3.12 version
12782 module = PyImport_ImportModule("_xxsubinterpreters");
12783 if (!module) goto bad;
12784 }
12785 PyObject *current = PyObject_CallMethod(module, "get_current", NULL);
12786 Py_DECREF(module);
12787 if (!current) goto bad;
12788 if (PyTuple_Check(current)) {
12789 PyObject *new_current = PySequence_GetItem(current, 0);
12790 Py_DECREF(current);
12791 current = new_current;
12792 if (!new_current) goto bad;
12793 }
12794 long long as_c_int = PyLong_AsLongLong(current);
12795 Py_DECREF(current);
12796 return as_c_int;
12797 }
12798 bad:
12799 PySys_WriteStderr("__Pyx_GetCurrentInterpreterId failed. Try setting the C define CYTHON_PEP489_MULTI_PHASE_INIT=0\n");
12800 return -1;
12801}
12802#endif
12803#if !CYTHON_USE_MODULE_STATE
12804static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
12805 static PY_INT64_T main_interpreter_id = -1;
12806#if CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000
12807 PY_INT64_T current_id = GraalPyInterpreterState_GetIDFromThreadState(PyThreadState_Get());
12808#elif CYTHON_COMPILING_IN_GRAAL
12809 PY_INT64_T current_id = PyInterpreterState_GetIDFromThreadState(PyThreadState_Get());
12810#elif CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x030A0000 &&\
12811 (defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)))
12812 PY_INT64_T current_id = __Pyx_GetCurrentInterpreterId();
12813#elif CYTHON_COMPILING_IN_LIMITED_API
12814 PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get());
12815#else
12816 PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
12817#endif
12818 if (unlikely(current_id == -1)) {
12819 return -1;
12820 }
12821 if (main_interpreter_id == -1) {
12822 main_interpreter_id = current_id;
12823 return 0;
12824 } else if (unlikely(main_interpreter_id != current_id)) {
12825 PyErr_SetString(
12826 PyExc_ImportError,
12827 "Interpreter change detected - this module can only be loaded into one interpreter per process.");
12828 return -1;
12829 }
12830 return 0;
12831}
12832#endif
12833static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none)
12834{
12835 PyObject *value = PyObject_GetAttrString(spec, from_name);
12836 int result = 0;
12837 if (likely(value)) {
12838 if (allow_none || value != Py_None) {
12839 result = PyDict_SetItemString(moddict, to_name, value);
12840 }
12841 Py_DECREF(value);
12842 } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
12843 PyErr_Clear();
12844 } else {
12845 result = -1;
12846 }
12847 return result;
12848}
12849static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) {
12850 PyObject *module = NULL, *moddict, *modname;
12851 CYTHON_UNUSED_VAR(def);
12852 #if !CYTHON_USE_MODULE_STATE
12853 if (__Pyx_check_single_interpreter())
12854 return NULL;
12855 #endif
12856 if (__pyx_m)
12857 return __Pyx_NewRef(__pyx_m);
12858 modname = PyObject_GetAttrString(spec, "name");
12859 if (unlikely(!modname)) goto bad;
12860 module = PyModule_NewObject(modname);
12861 Py_DECREF(modname);
12862 if (unlikely(!module)) goto bad;
12863 moddict = PyModule_GetDict(module);
12864 if (unlikely(!moddict)) goto bad;
12865 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
12866 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
12867 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
12868 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
12869 return module;
12870bad:
12871 Py_XDECREF(module);
12872 return NULL;
12873}
12874
12875
12876static CYTHON_SMALL_CODE int __pyx_pymod_exec_cTwophaseDarcyCoefficients(PyObject *__pyx_pyinit_module)
12877#endif
12878{
12879 int stringtab_initialized = 0;
12880 #if CYTHON_USE_MODULE_STATE
12881 int pystate_addmodule_run = 0;
12882 #endif
12883 __pyx_mstatetype *__pyx_mstate = NULL;
12884 PyObject *__pyx_t_1 = NULL;
12885 PyObject *__pyx_t_2 = NULL;
12886 int __pyx_lineno = 0;
12887 const char *__pyx_filename = NULL;
12888 int __pyx_clineno = 0;
12889 __Pyx_RefNannyDeclarations
12890 #if CYTHON_PEP489_MULTI_PHASE_INIT
12891 if (__pyx_m) {
12892 if (__pyx_m == __pyx_pyinit_module) return 0;
12893 PyErr_SetString(PyExc_RuntimeError, "Module 'cTwophaseDarcyCoefficients' has already been imported. Re-initialisation is not supported.");
12894 return -1;
12895 }
12896 #else
12897 if (__pyx_m) return __Pyx_NewRef(__pyx_m);
12898 #endif
12899 /*--- Module creation code ---*/
12900 #if CYTHON_PEP489_MULTI_PHASE_INIT
12901 __pyx_t_1 = __pyx_pyinit_module;
12902 Py_INCREF(__pyx_t_1);
12903 #else
12904 __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
12905 #endif
12906 #if CYTHON_USE_MODULE_STATE
12907 {
12908 int add_module_result = __Pyx_State_AddModule(__pyx_t_1, &__pyx_moduledef);
12909 __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "cTwophaseDarcyCoefficients" pseudovariable */
12910 if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
12911 pystate_addmodule_run = 1;
12912 }
12913 #else
12914 __pyx_m = __pyx_t_1;
12915 #endif
12916 #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
12917 PyUnstable_Module_SetGIL(__pyx_m, Py_MOD_GIL_USED);
12918 #endif
12919 __pyx_mstate = __pyx_mstate_global;
12920 CYTHON_UNUSED_VAR(__pyx_t_1);
12921 __pyx_mstate->__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_mstate->__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
12922 Py_INCREF(__pyx_mstate->__pyx_d);
12923 __pyx_mstate->__pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_mstate->__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
12924 __pyx_mstate->__pyx_cython_runtime = __Pyx_PyImport_AddModuleRef("cython_runtime"); if (unlikely(!__pyx_mstate->__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
12925 if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_mstate->__pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
12926 /* ImportRefnannyAPI */
12927 #if CYTHON_REFNANNY
12928 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
12929 if (!__Pyx_RefNanny) {
12930 if (PyErr_ExceptionMatches(PyExc_Exception)) {
12931 PyErr_Clear();
12932 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
12933 }
12934 if (!__Pyx_RefNanny)
12935 Py_FatalError("failed to import 'refnanny' module");
12936 }
12937 #endif
12938
12939__Pyx_RefNannySetupContext("PyInit_cTwophaseDarcyCoefficients", 0);
12940 __Pyx_init_runtime_version();
12941 if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
12942 __pyx_mstate->__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
12943 __pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
12944 __pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
12945 /*--- Library function declarations ---*/
12946 /*--- Initialize various global constants etc. ---*/
12947 if (__Pyx_InitConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
12948 stringtab_initialized = 1;
12949 if (__Pyx_InitGlobals() < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
12950 if (__pyx_module_is_main_cTwophaseDarcyCoefficients) {
12951 if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_main) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
12952 }
12953 {
12954 PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
12955 if (!PyDict_GetItemString(modules, "cTwophaseDarcyCoefficients")) {
12956 if (unlikely((PyDict_SetItemString(modules, "cTwophaseDarcyCoefficients", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
12957 }
12958 }
12959 /*--- Builtin init code ---*/
12960 if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
12961 /*--- Constants init code ---*/
12962 if (__Pyx_InitCachedConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
12963 if (__Pyx_CreateCodeObjects(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
12964 /*--- Global type/function init code ---*/
12965 (void)__Pyx_modinit_Global_init_code(__pyx_mstate);
12966 (void)__Pyx_modinit_Variable_export_code(__pyx_mstate);
12967 (void)__Pyx_modinit_Function_export_code(__pyx_mstate);
12968 /*--- Type init code ---*/
12969 if (unlikely((__Pyx_modinit_Type_import_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
12970 (void)__Pyx_modinit_Variable_import_code(__pyx_mstate);
12971 (void)__Pyx_modinit_Function_import_code(__pyx_mstate);
12972 if (__Pyx_InitAfterSharedUtility() < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
12973 /*--- Execution code ---*/
12974
12975 /* "cTwophaseDarcyCoefficients.pyx":3
12976 * # A type of -*- python -*- file
12977 * # cython: language_level=3
12978 * import numpy as np # <<<<<<<<<<<<<<
12979 * cimport numpy as np
12980 * cimport twophaseDarcyCoefficients as tpdc
12981*/
12982 __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_numpy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3, __pyx_L1_error)
12983 __pyx_t_2 = __pyx_t_1;
12984 __Pyx_GOTREF(__pyx_t_2);
12985 if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_np, __pyx_t_2) < (0)) __PYX_ERR(0, 3, __pyx_L1_error)
12986 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12987
12988 /* "cTwophaseDarcyCoefficients.pyx":33
12989 * pass
12990 *
12991 * def twophaseDarcy_fc_sd_het_matType(int pskModelFlag, # <<<<<<<<<<<<<<
12992 * int density_w_flag,
12993 * int density_n_flag,
12994*/
12995 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_26cTwophaseDarcyCoefficients_1twophaseDarcy_fc_sd_het_matType, 0, __pyx_mstate_global->__pyx_n_u_twophaseDarcy_fc_sd_het_matType, NULL, __pyx_mstate_global->__pyx_n_u_cTwophaseDarcyCoefficients, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 33, __pyx_L1_error)
12996 __Pyx_GOTREF(__pyx_t_2);
12997 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
12998 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
12999 #endif
13000 if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_twophaseDarcy_fc_sd_het_matType, __pyx_t_2) < (0)) __PYX_ERR(0, 33, __pyx_L1_error)
13001 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13002
13003 /* "cTwophaseDarcyCoefficients.pyx":424
13004 * assert False, "configuration density_w_flag= {0} and density_n_flag= {1} not found ".format(density_w_flag, density_n_flag)
13005 *
13006 * def twophaseDarcy_fc_sd_het_matType_nonPotentialForm(int pskModelFlag, # <<<<<<<<<<<<<<
13007 * int density_w_flag,
13008 * int density_n_flag,
13009*/
13010 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_26cTwophaseDarcyCoefficients_3twophaseDarcy_fc_sd_het_matType_nonPotentialForm, 0, __pyx_mstate_global->__pyx_n_u_twophaseDarcy_fc_sd_het_matType_2, NULL, __pyx_mstate_global->__pyx_n_u_cTwophaseDarcyCoefficients, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 424, __pyx_L1_error)
13011 __Pyx_GOTREF(__pyx_t_2);
13012 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
13013 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
13014 #endif
13015 if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_twophaseDarcy_fc_sd_het_matType_2, __pyx_t_2) < (0)) __PYX_ERR(0, 424, __pyx_L1_error)
13016 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13017
13018 /* "cTwophaseDarcyCoefficients.pyx":724
13019 * assert False, "configuration density_w_flag= {0} and density_n_flag= {1} not found ".format(density_w_flag, density_n_flag)
13020 *
13021 * def twophaseDarcy_fc_pp_sd_het_matType(int pskModelFlag, # <<<<<<<<<<<<<<
13022 * int density_w_flag,
13023 * int density_n_flag,
13024*/
13025 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_26cTwophaseDarcyCoefficients_5twophaseDarcy_fc_pp_sd_het_matType, 0, __pyx_mstate_global->__pyx_n_u_twophaseDarcy_fc_pp_sd_het_matTy, NULL, __pyx_mstate_global->__pyx_n_u_cTwophaseDarcyCoefficients, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 724, __pyx_L1_error)
13026 __Pyx_GOTREF(__pyx_t_2);
13027 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
13028 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
13029 #endif
13030 if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_twophaseDarcy_fc_pp_sd_het_matTy, __pyx_t_2) < (0)) __PYX_ERR(0, 724, __pyx_L1_error)
13031 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13032
13033 /* "cTwophaseDarcyCoefficients.pyx":1017
13034 * assert False, "configuration density_w_flag= {0} and density_n_flag= {1} not found ".format(density_w_flag, density_n_flag)
13035 *
13036 * def twophaseDarcy_incompressible_split_sd_pressure_het_matType(int pskModelFlag, # <<<<<<<<<<<<<<
13037 * np.ndarray rowptr,
13038 * np.ndarray colind,
13039*/
13040 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_26cTwophaseDarcyCoefficients_7twophaseDarcy_incompressible_split_sd_pressure_het_matType, 0, __pyx_mstate_global->__pyx_n_u_twophaseDarcy_incompressible_spl, NULL, __pyx_mstate_global->__pyx_n_u_cTwophaseDarcyCoefficients, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1017, __pyx_L1_error)
13041 __Pyx_GOTREF(__pyx_t_2);
13042 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
13043 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
13044 #endif
13045 if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_twophaseDarcy_incompressible_spl, __pyx_t_2) < (0)) __PYX_ERR(0, 1017, __pyx_L1_error)
13046 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13047
13048 /* "cTwophaseDarcyCoefficients.pyx":1117
13049 * <double*>(a.data))
13050 *
13051 * def twophaseDarcy_incompressible_split_sd_saturation_het_matType(int pskModelFlag, # <<<<<<<<<<<<<<
13052 * int density_w_flag,
13053 * int density_n_flag,
13054*/
13055 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_26cTwophaseDarcyCoefficients_9twophaseDarcy_incompressible_split_sd_saturation_het_matType, 0, __pyx_mstate_global->__pyx_n_u_twophaseDarcy_incompressible_spl_2, NULL, __pyx_mstate_global->__pyx_n_u_cTwophaseDarcyCoefficients, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1117, __pyx_L1_error)
13056 __Pyx_GOTREF(__pyx_t_2);
13057 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
13058 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
13059 #endif
13060 if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_twophaseDarcy_incompressible_spl_2, __pyx_t_2) < (0)) __PYX_ERR(0, 1117, __pyx_L1_error)
13061 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13062
13063 /* "cTwophaseDarcyCoefficients.pyx":1254
13064 * <double*>(da.data))
13065 *
13066 * def twophaseDarcy_slightCompressible_split_sd_pressure_het_matType(int pskModelFlag, # <<<<<<<<<<<<<<
13067 * int density_w_flag,
13068 * int density_n_flag,
13069*/
13070 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_26cTwophaseDarcyCoefficients_11twophaseDarcy_slightCompressible_split_sd_pressure_het_matType, 0, __pyx_mstate_global->__pyx_n_u_twophaseDarcy_slightCompressible, NULL, __pyx_mstate_global->__pyx_n_u_cTwophaseDarcyCoefficients, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1254, __pyx_L1_error)
13071 __Pyx_GOTREF(__pyx_t_2);
13072 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
13073 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
13074 #endif
13075 if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_twophaseDarcy_slightCompressible, __pyx_t_2) < (0)) __PYX_ERR(0, 1254, __pyx_L1_error)
13076 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13077
13078 /* "cTwophaseDarcyCoefficients.pyx":1368
13079 * <double*>(df.data), <double*>(a.data), <double*>(da.data))
13080 *
13081 * def twophaseDarcy_slightCompressible_split_sd_saturation_het_matType( int pskModelFlag, # <<<<<<<<<<<<<<
13082 * int density_w_flag,
13083 * int density_n_flag,
13084*/
13085 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_26cTwophaseDarcyCoefficients_13twophaseDarcy_slightCompressible_split_sd_saturation_het_matType, 0, __pyx_mstate_global->__pyx_n_u_twophaseDarcy_slightCompressible_2, NULL, __pyx_mstate_global->__pyx_n_u_cTwophaseDarcyCoefficients, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[6])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1368, __pyx_L1_error)
13086 __Pyx_GOTREF(__pyx_t_2);
13087 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
13088 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
13089 #endif
13090 if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_twophaseDarcy_slightCompressible_2, __pyx_t_2) < (0)) __PYX_ERR(0, 1368, __pyx_L1_error)
13091 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13092
13093 /* "cTwophaseDarcyCoefficients.pyx":1529
13094 * assert False, "configuration density_w_flag= {0} and density_n_flag= {1} not found ".format(density_w_flag, density_n_flag)
13095 *
13096 * def twophaseDarcy_compressibleN_split_sd_pressure_het_matType( int pskModelFlag, # <<<<<<<<<<<<<<
13097 * int density_w_flag,
13098 * int density_n_flag,
13099*/
13100 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_26cTwophaseDarcyCoefficients_15twophaseDarcy_compressibleN_split_sd_pressure_het_matType, 0, __pyx_mstate_global->__pyx_n_u_twophaseDarcy_compressibleN_spli, NULL, __pyx_mstate_global->__pyx_n_u_cTwophaseDarcyCoefficients, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[7])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1529, __pyx_L1_error)
13101 __Pyx_GOTREF(__pyx_t_2);
13102 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
13103 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
13104 #endif
13105 if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_twophaseDarcy_compressibleN_spli, __pyx_t_2) < (0)) __PYX_ERR(0, 1529, __pyx_L1_error)
13106 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13107
13108 /* "cTwophaseDarcyCoefficients.pyx":1685
13109 * assert False, "configuration density_w_flag= {0} and density_n_flag= {1} not found ".format(density_w_flag, density_n_flag)
13110 *
13111 * def twophaseDarcy_compressibleN_split_sd_saturation_het_matType( int pskModelFlag, # <<<<<<<<<<<<<<
13112 * int density_w_flag,
13113 * int density_n_flag,
13114*/
13115 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_26cTwophaseDarcyCoefficients_17twophaseDarcy_compressibleN_split_sd_saturation_het_matType, 0, __pyx_mstate_global->__pyx_n_u_twophaseDarcy_compressibleN_spli_2, NULL, __pyx_mstate_global->__pyx_n_u_cTwophaseDarcyCoefficients, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[8])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1685, __pyx_L1_error)
13116 __Pyx_GOTREF(__pyx_t_2);
13117 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
13118 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
13119 #endif
13120 if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_twophaseDarcy_compressibleN_spli_2, __pyx_t_2) < (0)) __PYX_ERR(0, 1685, __pyx_L1_error)
13121 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13122
13123 /* "cTwophaseDarcyCoefficients.pyx":1846
13124 * assert False, "configuration density_w_flag= {0} and density_n_flag= {1} not found ".format(density_w_flag, density_n_flag)
13125 *
13126 * def twophaseDarcy_vol_frac( np.ndarray matType, # <<<<<<<<<<<<<<
13127 * np.ndarray omega,
13128 * np.ndarray sw,
13129*/
13130 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_26cTwophaseDarcyCoefficients_19twophaseDarcy_vol_frac, 0, __pyx_mstate_global->__pyx_n_u_twophaseDarcy_vol_frac, NULL, __pyx_mstate_global->__pyx_n_u_cTwophaseDarcyCoefficients, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[9])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1846, __pyx_L1_error)
13131 __Pyx_GOTREF(__pyx_t_2);
13132 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
13133 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
13134 #endif
13135 if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_twophaseDarcy_vol_frac, __pyx_t_2) < (0)) __PYX_ERR(0, 1846, __pyx_L1_error)
13136 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13137
13138 /* "cTwophaseDarcyCoefficients.pyx":1866
13139 * <double*>(vol_frac_n.data))
13140 *
13141 * def generateSplineTables(int pskModelFlag, # <<<<<<<<<<<<<<
13142 * int startIndex, #where to insert into splineTable
13143 * int calcFlag, #f(Sw) or f(psic)
13144*/
13145 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_26cTwophaseDarcyCoefficients_21generateSplineTables, 0, __pyx_mstate_global->__pyx_n_u_generateSplineTables, NULL, __pyx_mstate_global->__pyx_n_u_cTwophaseDarcyCoefficients, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[10])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1866, __pyx_L1_error)
13146 __Pyx_GOTREF(__pyx_t_2);
13147 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
13148 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
13149 #endif
13150 if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_generateSplineTables, __pyx_t_2) < (0)) __PYX_ERR(0, 1866, __pyx_L1_error)
13151 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13152
13153 /* "cTwophaseDarcyCoefficients.pyx":1931
13154 * <double*>(splineTable.data))
13155 *
13156 * def twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType(int pskModelFlag, # <<<<<<<<<<<<<<
13157 * np.ndarray rowptr,
13158 * np.ndarray colind,
13159*/
13160 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_26cTwophaseDarcyCoefficients_23twophaseDarcy_incompressible_split_pp_sd_saturation_het_matType, 0, __pyx_mstate_global->__pyx_n_u_twophaseDarcy_incompressible_spl_3, NULL, __pyx_mstate_global->__pyx_n_u_cTwophaseDarcyCoefficients, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[11])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1931, __pyx_L1_error)
13161 __Pyx_GOTREF(__pyx_t_2);
13162 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
13163 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
13164 #endif
13165 if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_twophaseDarcy_incompressible_spl_3, __pyx_t_2) < (0)) __PYX_ERR(0, 1931, __pyx_L1_error)
13166 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13167
13168 /* "cTwophaseDarcyCoefficients.pyx":1
13169 * # A type of -*- python -*- file # <<<<<<<<<<<<<<
13170 * # cython: language_level=3
13171 * import numpy as np
13172*/
13173 __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)
13174 __Pyx_GOTREF(__pyx_t_2);
13175 if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
13176 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13177
13178 /*--- Wrapped vars code ---*/
13179
13180 goto __pyx_L0;
13181 __pyx_L1_error:;
13182 __Pyx_XDECREF(__pyx_t_2);
13183 if (__pyx_m) {
13184 if (__pyx_mstate->__pyx_d && stringtab_initialized) {
13185 __Pyx_AddTraceback("init cTwophaseDarcyCoefficients", __pyx_clineno, __pyx_lineno, __pyx_filename);
13186 }
13187 #if !CYTHON_USE_MODULE_STATE
13188 Py_CLEAR(__pyx_m);
13189 #else
13190 Py_DECREF(__pyx_m);
13191 if (pystate_addmodule_run) {
13192 PyObject *tp, *value, *tb;
13193 __Pyx_PyErr_FetchException(&tp, &value, &tb);
13194 __Pyx_State_RemoveModule(&__pyx_moduledef);
13195 __Pyx_PyErr_RestoreException(tp, value, tb);
13196 }
13197 #endif
13198 } else if (!PyErr_Occurred()) {
13199 PyErr_SetString(PyExc_ImportError, "init cTwophaseDarcyCoefficients");
13200 }
13201 __pyx_L0:;
13202 __Pyx_RefNannyFinishContext();
13203 #if CYTHON_PEP489_MULTI_PHASE_INIT
13204 return (__pyx_m != NULL) ? 0 : -1;
13205 #else
13206 return __pyx_m;
13207 #endif
13208}
13209/* #### Code section: pystring_table ### */
13210/* #### Code section: cached_builtins ### */
13211
13212static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) {
13213 CYTHON_UNUSED_VAR(__pyx_mstate);
13214
13215 /* Cached unbound methods */
13216 __pyx_mstate->__pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type;
13217 __pyx_mstate->__pyx_umethod_PyDict_Type_items.method_name = &__pyx_mstate->__pyx_n_u_items;
13218 __pyx_mstate->__pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type;
13219 __pyx_mstate->__pyx_umethod_PyDict_Type_pop.method_name = &__pyx_mstate->__pyx_n_u_pop;
13220 __pyx_mstate->__pyx_umethod_PyDict_Type_values.type = (PyObject*)&PyDict_Type;
13221 __pyx_mstate->__pyx_umethod_PyDict_Type_values.method_name = &__pyx_mstate->__pyx_n_u_values;
13222 return 0;
13223}
13224/* #### Code section: cached_constants ### */
13225
13226static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) {
13227 __Pyx_RefNannyDeclarations
13228 CYTHON_UNUSED_VAR(__pyx_mstate);
13229 __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
13230 __Pyx_RefNannyFinishContext();
13231 return 0;
13232}
13233/* #### Code section: init_constants ### */
13234
13235static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) {
13236 int __pyx_lineno = 0;
13237 const char *__pyx_filename = NULL;
13238 int __pyx_clineno = 0;
13239 CYTHON_UNUSED_VAR(__pyx_mstate);
13240 {
13241 const struct { const unsigned int length: 8; } str_length_index[] = {{1},{179},{8},{68},{39},{34},{38},{4},{20},{12},{8},{8},{10},{8},{12},{8},{13},{1},{16},{2},{18},{2},{1},{26},{8},{25},{18},{6},{19},{2},{3},{9},{9},{3},{9},{9},{14},{14},{2},{9},{7},{9},{7},{2},{3},{9},{9},{3},{9},{9},{6},{4},{15},{15},{13},{15},{5},{11},{1},{2},{6},{2},{1},{20},{9},{5},{9},{1},{7},{2},{3},{3},{2},{17},{8},{6},{2},{5},{5},{3},{8},{8},{3},{4},{4},{4},{12},{2},{6},{15},{15},{9},{13},{10},{11},{10},{2},{57},{59},{34},{31},{48},{63},{58},{60},{62},{64},{22},{1},{6},{10},{10},{1}};
13242 const struct { const unsigned int length: 12; } bytes_length_index[] = {{352},{77},{977},{1830},{566},{2182},{817},{1069},{2074},{2898},{3029}};
13243 #ifndef CYTHON_COMPRESS_STRINGS
13244 #define CYTHON_COMPRESS_STRINGS 90
13245 #endif
13246 #if (CYTHON_COMPRESS_STRINGS) == 3 && __PYX_LIMITED_VERSION_HEX >= 0x030e0000 /* compression: zstd (3490 bytes) */
13247static const char cstring[] = "(\265/\375`\226C\305l\000JSp\021:\000ys\374?\356\337/u\352_}\351^%\334\377\376\325\227D\323x{\333\026\331\335+\273\361\266%\241M\032.\\\301\231\312\351L)\327\264\302\n\361+XX\250\370DF\233\017\366\000\006\001\020\001Xt\211a\213\367\010Z\212\332\335Xc\023\213=b\246\215\030g\026\335%\337\231\233\230UO\254MvDu\211OQ\263$\230A\220\314<\274\226s@\230\232\373\002\301\025\207657\035\331\\\347R,I2\243-W\\1L\336X\226\242-L$\331\354\232\3128>Y\276\242\351Y\232%&?\027\257+f\317\221\274\242\"8\342\246\047\253Y\224\374\276\233\211\276\225\330>\226\0306I\260\005]^n\275\262\261\222\324\250\250\301q\304#y\233\330\225i\345Z\216_GL\227\240FK\2169\2525\356\370x\336\237\316\033\247\037\312\2771g\375\261\250\373\2214\337\310\316\251\313?]r\263d\303\217D\277\235\367\306\246\030\262\373\333\\\314Iy\375F\215\277\224\225\024\221W\314\353\323k\346b\271\362\375\271f\346x\315ai\346\361\333\345\247Q\031w[\037\3072\376e\216\346\264\004\271\025\367\t\000<\354\324(\233\006)\234\t\335G\306\273\023E\203\021\345\322\205hd\274j\016\347 \032p\"T\204\301\273#\005\242J\211\270:\022\217\327D\352c%\305\021u\362\341\361\356\350X\272\212\034\006\302\253B\265\240nN\004\001/\006\256\001\247\002\365\363\244 \000\340P\265r\252\265\032\334\23151\215\025\361J\202&JkqY\2544\267.]&.\271\316<MA\221\344x\203<\313\300\274\262\340\270A\016\346\200\274\335\265<j\032\276b\2761\231G\023\345`\273\256<m\321\225\253(N\212\2468\226O4\325\233\243z\246k\331\354Y\363ks]\242/\335\236-{\352\023v\316f+zf^\202#^c;\233!\206\245=:\307b-\311\361\271\242\244&\311\335\202\245,\035Q}\216\347&Gr\304c+\226;\035A\215G<\232eX\356\235\327\364D\305\021\025g\"\016\263\210W\016fq\263$\271b\323,\323/\377\265O\323\237\237\277\271y\030\230\177yY\325Z\264\243K\266n\373\327\353\350\360\335\367\316=\217oR\331KY\227\325\364\032\206\327\004\347\341X\236\016\n\232v\377\322$\004\004\36488\317b\255Z\332\254\317\204\272\320\313>\026{\222\374\242\242\207\301\236\207\347g\\\232\230:S,\217}\254\265\275\325]\313\214\212z\021P\007\372\361\351>\260NR\345\340\274=<""\235g\247\307\374\014\370GGod\364==oc\36322\253\333\022\357\\\355j\254\307\300\016\276\376\363|\323\3740\374\241\241\017\n\372\234\234w\271>\346cV6\000\200*\245\265\257iO\217\372\321ivs\226\324\223\230n\375\306;\047;\251\317~\212a\017\215\272Q\210;\306H\035\251\210\250\023\r\365!X\207\365\274BA=\010\250\333P\335\234\350\206\324\034\017\206\316\047\267Q\3616\350:r\031\025\257E\305\273\312\251\270\213\202W\305\361\340\004p!TD\300\273\212Ru\033\272\327\251\271\2106_S\223\252\273S\337z\314\303lVg\035\004\274\262\035\210\324w\331\250\227\364\222\241]\2713Q:\312\317\216\3637\037G\014\277\310V\263\3331\234\216\263kyB\020\000\030\250Z\271vKo\263\275\222R\316\355\323\004y/\236\307\362<\227\247\321^\353\333R_z\035Z\247\361]\32331\375\355\366{\377l\346\343#\223)\271\335\305\035#\021\275^\214\007\003\343\265Z\252JD\224>\213G\311\215\001|\025y\323oTv0\367\247}u\225*\202\212f\346\335\241bQ\261C \320O\247Q\351\344t\333\224L\312\330#z\373\264P\260\373\3601~$$\257\345\272\217\242\255VQ/\"\362h<o\346\233\232\236emJ]\311ey\347j\332\3234\354!\226Xw\237\177\034_\024_H\350wv<\227\347\305\374\322\322\257\353\353\305t\243\261\235\375\232\247\241\251\365\032\330\301\243w\024\373\016N\003G\221\360\376\354\223\222\276,\037\004\275\033\317\306\306\363\002\204\306\250s{%\250FfD$IJ*\351\263qH`8\025\n\005eM\265\0073\202\244!P\244f\030\006a\033B\214\000\021D\004BF$\232`DDdH\222\264\001\242\246\375o\270\250S\256\nm<\000\242\315\202\047\013\207\036\363\251bNk\001\310+`r\201\324@\346\211\216\306f\253\177\277\221\255\321A$#9\036\212\210\0334S\302\316P\t\270J\221\377\005\240\026x\260\236J\310\376+\334\225\364Dh87\271\321V\352:_\324\277\246l\2070\200\351s\016\347{\300Xp\037\207\\\307\323\022&\243a\276\022\0358\n\263t\007~/\202U\336k*\306\310[R\301\013dTM\301\003&\310\005U\313\034\354\241_]f\273\305f\3222\235Z!\004Q\034r\022\202\370(\300\010zT\374B\260H\212?\247\212\017\342\307\240*\202Q\245Lv\376\337?\243\271\201\330R\213\332\237\023A\211.H\271\316D\231\260\365X=)\037#\347\206W\225*\3357\2721$\343\374!n""7\016&\022\030\260i\025\241C\245Z\2501\020\372v\222\033\211\206\346P\354\356PZ\003\323\355\330#\262-\266\354\222\266\313Z?\025\273\327h\342\322\001\356\357>J\027\344\271J\210\002QH\047\270\003IY\202\031_#\334!q&\014>\216\241\014\006\220\250\251<\304\277\014O\271h!L\047ss\002\211\343]`\243\227\014\233!zd\006\001\300h\203\004\336\252\301MV\030Q\373\030U4\345\nf9!:\376\023\262\254F\347\016\246\226L@\016hRat\324!\251\017L\213?\224r\272\221\251\375s|\253j\227\360*\021L\207\223\354\252\013i`\230\344\030\257\014\314\337\006\253\241H\033\010\0246L\324+\300\355\352\233\250\202\\}\256Q\220\354@?\267&\000q\2712\254\222\363\301^\202ew\"\027#M~\227\023\020\350 @\256,\2457I\231\246^&\311\363\365Xa\356\005\354o\007\005P\\~\013\230\250I\224 \310\355\355\231SaT?\227k4M\266\357vR !\023\324Y\367\341l\037\253\255,N\333t\242\235\010\t\017\321\201\372H`\312\354#~\344\002\263\235}n\0221+\021P\007\047\231t\345\0278\3142\346k\006\3707\003u(\340\r\006\214m2J\010r\363\366\346\262\263\366\270PA\365cO\375\013L\030A8\252\225\323\004%\3349q\251\370>]\000!;\313\300\031\036r\310\021\375\367\373\215%\034[>\304g\030\230z[\253[\021@\210\020>\310F\335\002h=\202\tS\310\245)\003\210\365\006\034\310\310\203\312\325\254\375;Qx\374\347\177\262\211HQ-gr\246\203KC$q;.p\270\370\003\234\200Nqb\325\322\201@\267w&h(>\346\010\246,\317\344\242\252\270\270\230`\241W*Sm7\266\341st\376\331\344\013\026\204\344`\324\234\264P\320\374\365\006\222\013\0344\226~\003~s\020\013\326K\261\177\371\377\277)\264\273\345\272\322\353X\357i9\363\013\331z\341\345\237B\036RL/~\260\2619\367\341\256\301\tB\316\020%\312U\356\316\334\367\247\257\367k\2070\221n\346W\262\365\302K\002\205<\244\230^\234sc\343\374\332\263\270\023d\270\324\324Sr\362\t{\277>l\0013<i\032S\026Cy\253\021\017\266\213\316\227\270\t\270\330\031%mR \216\"\352\376\271$\321|!\245\316xG\014x\374+\231\335x\233\316\355\320\315\320\027EY$\254\321[\234\277(0\001\006\227n\335\230\336\214%#\032\224R\3542v\261\005\2539\205\303z\216u?\251\301\270\222\213\343C\323t\272\217T\233""\211\314\275c\025O\266\377\003-\302\265\226|\377|\227I\037\222\330\033\361\2020U\"\323\264\273\235\244D\2162Znt\227\333\034\027\214\302\024\005L\000\273\2142\t\216&\222\031\322l$x\333\047uS\206\025\231%\035I\271\241\332\315\027w\336\320\336_\024\340=f\030\254\314\242\013\234\333\305kJ.\325\371]8\030>\034Oz\2528ZJX\364\237_q\367\263\325\220\203D\350C\316\027.\2322\025\010;\262\014]\037*\214|\361\222\3370\023V\262L\037\r6;l\362e\335\327p\326\321\024A\270_5\034&)=8O\260\364N%\004\006F&\201\177\016\272\361\327$\271\047\355\032\"\301\360gNY\325k\242\204\352\361s\025\226W\021P\222\027\233\n\000\250U\230]:\321\331Z\033\034h9\370:,,\027k\360\226\251n\262\304\336\311\004s\262 :\341\026\035\333\302\371WO\362d\000!\237\361\365\003Dz3\254]\220\202\266$)f\225\025@en\362*\271\3744xyvo\360S\354\261N\336vt\0077A\362\013\205\225;\020)\003\241N\224\240ZoU\274>\000,\255\237\242\347\363\267\2673\024\331\031\342U\214\277\311\243\020\375\254w\274\343\227\236\226\331\t\212\263\253R3E\004\273\326\270\225\373\227\001\030\376\026k\005\220\204\324\2016\313\333\225\270b\355\341\317\037T\323\271\016\220T4\333\007{\361\254|`\006\n\344\250\026\242\024\266X\313\203\220R\352E\346-US\363\300\235\331\266\332-f\022\016q\n\306\t&\024CB4\003\240\234\232\006\342\024M\242\332\272\361}\222\0207Hg`E@\353\263\363\212V\303\002\263\316\017\017o\025\320&\035\327\237D&`Q@\344\372\201\235\246\340d\204+\234_6\265\375R\036\273\267\002\"\032F\257e\371\375\346\206\355\216u\223k\250I!\350\373D\342\\\336\324\326\230\025w\202;\276\223\306\254\047Y_q\346\240\035\3443aF\373L\037\346\010\343 AS\314\305\0232\336\314\221\240\373\215K\001n\001\211\215\211\331\no\022\261\207\312\356\370\221Q\337\235.\211e\314\240F\241<\307\277)?r\356d\205\374!\332\230|\010\355\240sP3\\-28\047\241\211\001\355\024W#\000\211\221\366\017\220j\236\014_\202\027\316a\243\327\274#\302\211\010\204\333\346^\236\276\024)k\234\265\037\320\006\211\276\024\026\034~\014\371\217\202\321\246J%&t\244,|\223\223S\260\177\034\263w\340\214\213\035&\271i\2616\275""\021\231\2104\371\332b\3113\275\204g\017\n\342[\316\036\334\241K\342\350\247\263%\230\217\301Bs\351\267 \351L]D\255SB\037\267\020\225E\002H\321\234Tq\214q\3029\320M\047S\022u\222\342RZ\242F\214\323|\233\032\362A?\213\017-fA\306\352\351m\001\022f\017\353G\30711\305\200\355\014\225\216\305!\326\301\230n\r.I%\013\006B\301\3361\361\263xY\2405k1`\335\177\256z\232\317qm\357\033\371\350\306\317\013C\273A\212+\317\215\267\036W\204[Sk\217)<\244\013,\047\047\030\261nG,T:\364\321\306{\370\221?G\216x\345:\236\027\024\263^\223!<e-8\035k\004H-\365\047\027w\213W\222!\034Rz`lvG\222\234\033\237\244\002\014e$8\017fb4\356\216t\202\247\233DY}\211I\032I\275\025o\023\007\265\005\221\274\021\"\265\217d\022j-/\257\301\311!E\266\221o\306\231\020\031\260\023\202CS\211\257]\n\327\265\257\363*\220Lj\342\307\016\357w\2417Q\226\327.\331\225X5}d\333\025\333d\202\027\326\022_j\253\205\262\205\206\310Fy\3102\270\001\202\210\373\256w\312%\005\204V\236Z\250\307\312D@\350%\245$P\234\036h:T\367\344\216s\303\251\275\236\2261m\247e\3021\361\345\303\200\020\344\n\230\340\377\310\007\251\244+9T\002\306\236Qk\347.\212_83\224\020\264\214CT,x\034\013\n\0214WS\"\313C\273\205\023\036t`\033\310\263\257\257\3349\264\324A\024\327\n5\234\005\r\362\373Kb\272gi\200c\310\2426\264t\001\313\242\013\260\337\375\237\336\217 \334;\346\317,W\022\033&\rh\360m\267(r\313\365\000R\342Lu(\323;S.\231\215\333\347\375\361\243M\257\373\313,J/\364\024h\266\264\376*\2053\245\003\2702TL?\362\2052U\250\313\024\024M^\356\004\277\005\"7\332\360]\364\2679\0323\300\032\243\254\351K\214\220\306\212\035[EDr\325{j1]\256\034b\244\272\231bJ\374\037\274\006b\253\tiH@d!\252+L\037;Jo^d\306\037\301\t3p\225\276\2159v\306\323\241\376\260z[\207\346K\314\322(\355/T\242\314\212\256\256\347\321Rc\336\342y\047\354\207\376\230ZH\373Zz+\274\233\024^\021\251w\025i5\027\317\206\302\035\203\240\271\355\0220\225\300\321\047\252\234\323\341?\210PP\331B\230\212\030\301\242~(\250\334%DIy\021";
13248 PyObject *data = __Pyx_DecompressString(cstring, 3490, 3);
13249 #define __Pyx_DecompressString_LZSS_UNUSED
13250 if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error)
13251 const char* const bytes = __Pyx_PyBytes_AsString(data);
13252 #if !CYTHON_ASSUME_SAFE_MACROS
13253 if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) }
13254 #endif
13255 #elif (CYTHON_COMPRESS_STRINGS) == 1 /* compression: zlib (3639 bytes) */
13256static const char cstring[] = "x\332\355[Ks\033\307\021\026\007Vb\227\235\207R\211*\211R\025\310)\307v%\226\237\345\312\305eQ|H\024\037\342\233\022\037Z-v\027\300\222\300.\260\273 \010Q\224|\324QG\036y\344QG\035}\344q\216{\304O\320OHw\357\314\354\016\000\202\000#Ub\207\256\225\373\233\236\236\231\236\236\236\236\236]\360\3739?r\362Q\331\214\362c\255\250\354{y7\314\333N\305-8\201\0319\225V>\214\002\327\212\234\000\205\274\374\374\304\374g\337\374\353\233\274\351\331\371\300\331v\254(\314\207\215\202U1\303\320\t\363~1_h\270\225\310\365\362Q\253\346\2047\362S\305|\313o\344=\307\261\363\221\237\257\201\\\266ATv\274|\350D\010\362\037\233\236\347Gf\344\372\236\001\315]\257\364q\336v\003\030\304\335u\260\365\244Y\t\235\033\246m\033 \347X\276WtK\215\200\032\200\322^\350F-\243i\024+f\351\273\374\376\027\007\244\245\344{\222\377\345A\036Z\347\213~\003j\275F\265\326\272aX~\340\334\2506@q3\010\314V\276h\272\225Da\267Z\363\203(+\326\250\232Q\271K\242\026\200F\215\360sk\271\351\327\312f\350\214\233\201\325\032\363\235b\321\265\\\307\213\302\033\265\326\336t\301\014\014c\276\265\007\377\306\301\254\306\234\263\027-:E\303\020Sw\014\370\257\330\360,\244U\323\365\210\372v\243B5\236Y%Zo\230\025\211#\047\214\200\270!\252\3477\300\366\216i\332\273h5\337[\262\314\n\330\321\364\314\260\345Y\256\177C\311\204f\263p\272\262\320\314\232\004{Yf\315\255T\314\000\264-\026\033a\332\243\005\377s\014\320/\nL\313)\230\326\216\345\003\313\266\374j-p\302\320-\270\0250;\366a\2336,\204\351\031v-t-\t\232\266\211\217d6\005S[-}M\355\242]\224m\021\204@d3\004P\256\332U\017\036\321iUJW\361\221L\331\304G\363\332\265\262\213\377\014`\311fZ\261\231)\206\252 \373@\276\235\312\026\213^\321\017\300?\212\315R\311\361h\013-\325\320R\313f\241\342\204\245\300\264\261\271\345FN\025\344\375`\007\212;Uh\261\014\333\245\352U\033\3604\253Mo\336wa\025\346\235`\t\334\253\342\354y\222\356\200\233\204^\215\034\322\257:%\0234\222\032J\345j~\r\007!\026\026\303\235Y\037\3664\256E=\n\374f-\n\002\032[Y[/6\003\251\231\002F\344\303\326\213l\247h\302.\t3s\212\314 ""\232\362lg/lFYo2RO\2508s\0066\211\214\020\246\217\274F\340\030e\0472\304\304\007j\030\232\221\330\353\2477-ZF\255\206\302\375$\206\252\206H\003\213\021\301\236p\315\312$,\256.\357zYm\205\262\211\n\203\350\333\263\371@F:\255\345 \243\206\025\267T\216\306\3169r\277\326\203\214\276\353W\214\"\004\215\306\256Yi8\241,\032\236B\315\275\037F^\377\356\322\345_?_}\361\355\341\225\303\353\361;\277\374\341\340\305\330\213z\374\301\365\243k\307\243\307\013\361\047\237\322\363\325\313\277\277\032A\362\351\253/\343O>?n%\245\317^\325\221\374\343\325B\374\336\325\027\326\341\025l\370\207#\363\250\036\177\3707z\376y<\371\362:\222\251\227\013\361\207\237\036\377))\315\276\272\202d\372e\375\047\324\260=t\013\260\357\357/]\316\037\006GW\217\352\307\354\370\243\343\372\313\221\370\235\253/\n\207\227\017\027\017\353\361\273\177=\254\037\215\304\327\376\022_\373\360\350\343\343+\361\265\217\216V\216\257#Y\204q\200\254\037K\002\235}\325\267\263t\365fN\246\371\332}~\377A\274\264\014\017_^\347\353\033|c\223\212\200\037\361G\246\016Ln\026\022\341xi\213o\025x\301\"\240\370U^\365\210S\344E\300\021\217\016\370\301S\342l\363\355\035\002\025^\251\352\340!\177\010\3625^\013x\360\370\365\245K\373#\023\014\310\004\233D2\311\346\220\314\261\373H\356\263u$\353\254\200\244\300*H*\254\212\244\312<F\035\032\334(\361R\235\327A\201\047Pq0r\033\353o\263i$\323l\t\311\022\333B\262\305\036\"y\310\214\216\266\235\312\210.\3560\345\0323\047\023|a\221/.\305\263s\360\234\024\371\362\n_Y\245\2220\247\016\310\272$\033\317\256\361\265M\276\271E@\361a\3442q\300\344\200=\3565ys\21786\267\035\002`\252\222\016`\rA\036\014\014\026\205\031?\345O\237\201\2527AU w\330\"\222E\266\214d\231m\"\331dE$EVBRbeF\035=\340\017`)w\370\016\014\274\013\025\315\221Q\254\037e\302\004\263Hf\331\032\2225\271\036\017:\332\n%\240\356\231l~\213\265/\274\355\234\3366\310\206~F\376\370\356\373\317\277;\314\035~\031\377\366.\277[\346e\227\273\33318\215\355p\047Y\227*\025\001\343\200:\200\361\303D8\266a\365C\036F\004:\370\340\216\311\312\nc\335Cr""\217\3153\252\335\347\373O\010\320:h\300\347~\023D\367Fna\213[l\034\3118\233A2\303V\221\254\3666v\rI\215\355!\331c\267r\330<7\215d:7\223\033\274s\341\265\006\022\203\271H\\\266\215d\233\355\260\370W\177>\374\333\341\002\331\016=\215[v\374\320\200\207\033`>\332jX\024\246\324\001Y\226\204\343\207`wrK\004\035|\260\365\036\337K\266\346\024\216;\305\3562\252i\360\306.\001\332\355\032\200E\204v`\330\003h\360T\232}\036\311|\357--\246\024 \t\330\023$O\330\004\332k\"7\231;\273\323\005$\013\260\255\201<`\026\022\213\331Hl\346\260\366\3335P@\362\270\244?5\303\304\357\375\2216\237\266\013\245e `\231`4\271)\261\010\230\246\251\001p\344Z\"\034c(\205 U\047\320\301\207@\323 y\262\030r\300\261Z\004\036\363\307\373:\350\021\217\205\367\211\300\324sc\210\020\327@\322`\317\220<cw\320XwrS\271\301:>\343\304\311\3548p\"\n\373p\034l\300\251(\375\013\213\302l: +\222p\274\0016\246h\217\240\203OvEy\362D\344P8C@&\324\000,\024\310\203!\2238<\206z\216\311#\257\347\332\213\251\370H|\326B\322\222\001j,wv\247\342\244\021\361\351\021\222G\314DbB\014l_\030\346\024\303\274\373\233\347M~\025\314\201\266\3406*\n\247\3447\003\246\275\267\177\334\207\224\215C\0021w\017\236\223]H\331\370\352\032\225 }\243\234D\003\224\246\221l<\007\t\014\246\020\004:\370\224\226\240<$\030\006qp\232\004(\255\323\200\312\226(\026\246\315\223\252\365\024\310\\\363\366\217\215\223\321\223\205\370\316\024<\047WO\352|>)$\023\310\322&\316\206\344\342;\220\235b\202H`U\347\323\374@\274\2059\0312\320\327\010\220*\032 s!\200\274m%\323:[\205\240\375?c\335\304\204\224y\237n]\360\232o\207\315\255f\370\014\356*\3347\020\330\2130&.!\356\047,\002\246\324I\003\264\223H8\306\274\223\0165\004\202\377\232]*\245\2312\325\264\240\360X\362D\032/v\332b\"A\211\025\202$\237\030e\335\0058\034\222~D:\3243\277\025\301Yl\\\021\365\305\306\255\r\321\317\006\222\215\216~\352H\3522\000\214a\000\030\313\215#\031\317M\344\342a\223\360\215\364\314\200U\300\013\021\272\000D\307G\260\274\270\370\030\005\261(\026E\007\264F$\034\343]\211\216T\004\212O\047&r`\341""\022\235D:)\362\370\031F\265\224\201 h\361\326c\035\200W@[X\232^\367/\021\315D\376_FR\316\344\237g\266_A\262\"\257\021\"\304\356 \331a!\222\220\035 9`O\221<\205C;\036\364R\270\002\247\315\3336iDM(\245\371\371\232\261;\013\004\263J;\302\301\215\347\225\014\037X\004L\026\321\000eu$\034[`k:\232\021(>m~\344\354\362\335$S\025\273Gl\233{\214j\311\372\010\236\360\047\007:\350\274\340\213\363Wx\272\260\2218\324\305\371+l\254\256\300\203\367#v\261\336\217\207\304c\273Hv\331M\014\n7s\243HFs\267r\324y\347\265\256g\347\352eD66`\270\307\327\005p\226\340}_\3725\026\305\002\350\200\326\203\204\343-X-\272\227 P|\362\326\255\304\177\325\035X\370\300\024\243\032\212\346\010`Q\232:\200\325\207v\260\034\311\353\001\261X\342\356,\222e\021@\035$N&K>\263\275pA\021#\305}D\354\013qw~\214\3441\333G\262\0177\037\352T\335uzu\252\016\233\366\2059\337\2509{\347\256\223#\375\322\220\327\277\270t\371\203\347\337\243w\267\323<v\226\317\312\267:\220\366\224\3045\022C0\026\001\223\0055@\231\007\t\307\370\316\211\014\212 \313O\252(t\250\367\217\310\301\310\007\000\357\316\231d\245\007\243\337\233\323t0\000t&\010\371P\347$\032g\205\273et\216\314\223\301*o\343\322}\276{w5V)~\332a\226\323-\223h\225\025\356\226\3218\355\377\277)\303\206\271\373s\3330\035\316=\354&I\262\000\025A\345\313E!\277\217\257\272\344\333,\261\033Ed\022g\274\010\227\233\254\327F\202\310\377f\274\212\336\017\013\257Jt\022G\272xS;\313\336\316\313,\221\336U\330`}\364L1E\336\023!\211\322\334\220\336\213\335\314I\337\204\245\220w\260\036\035\213\224e\225\265\377+\346\325?D\2449\363\317\332\324\020,V\007\r\026\275\356\373_\363\257\337\370\265\350\034\027\242\212\016\222\256\262\200\342\232\006\222!\262\240O\025\205\027m\320n\216\002\303\017!ss\260&\276\300\3017M\353\0331~\000\224\271%\026\205qu@\266&\341x\035V\202\366\010\002\305\007L\246GaJA\221C\307\025\002\032^\003\264\226\032H\272\312\002\332\230\032H\206\310\202>Ud\005m\320n\216\002C\017\321\276p\3127\342\224]wu0\353\033\277\352Hkn\311U<\373r\343\352 \351*\013h\017h \031\"\013\372T""\321\332k\203vs\024\030~\210\314^\307\267\274\370\036w\355~\214\337\376\345\326\307\2420\256\016\310\326$\034\257\301J\220\373#P|\271\305Q\230\"\004r\310\335\020\320\360\032\240\265\324@\322U\026\320\027\025\r$CdA\237*\262\2026h7G\201\241\207hg\235\022Lw\341\224\347\032\342\224{\367\372\177\222\031|\301\277\220\013C\017\267pl\\\003,\002\246\th\200t\022\362\260*tH!P|\300\224\372\2430\305:\344P\210C@\t\236\006h\3614@\233!\3553\313I\324PC\364\257R\315\225\222t\026\024\222\224\256\241\253\321\315Q:\017?\272\214\037`_\031?\350\341[\311\3329T\024\346\326\001Y_\310C\360 \337D\240\370\200i0\024\246m\201\034:\014\020\320\360\032\240\030\243\001\332\001i\237YN\242\206\032\242\177\225j\256\224$Co&\037F}]\215n\216\322y\370\3213\366=\315\177\345=\371\302\213\317\353\305\355\213\360\360\226\302CW\326\006\206\226\211\005=\374\221\334\257X\004L\256\254\0012\207\220\007S\322H\010\024_\332\327\220\233\0069t\374 \240\027\024\032\240u\325\000m\353\264\317,\047QC\r\321\277J5WJ\2225\215\344}s\240\253\321\315Q:\017?z&N\310\017\347\364$?\321\304\017\352X\024\346\326\001Y_\310\203\343S B\240\3702\374\2420E\047\344\220O!\240\3415@a_\003\224\001\245}f9\211\032j\210\376U\252\271R\222\014\215\200\354\242\251\321\315Q:\017?z\306\276\247\371\257|\047t\341\305\347\365\342\366ExxK\206\355\235Q\227G\372\377\240\346\375\323\363\351Q>\212\035\343K\277\314\267@HsB\350\033_K\342\341\201\305\344\343R\372\n\3754\206\372l\234t\022\207\311[r\361Rt\234I\206.\227\360\322oV\2423\361\343\227\t\325*\375U\210`\250\037\257\365b\360\003\372\036\240\001\365k\235n=z\324f\246\327\245\342\260\342]\303\3656L\372!!\324~\020{\373\3649\237-\221\265[\267\332\352g@\203\315rH\3617gC\031\274\301iq[\340o\0312\006\205=Y\025\337\2210e\301\242\360a\035\220K\223p\\\205\374\211~\236\201@\361\223\337?\244z\250?r\0205\351\374\005#\325\260\007\00324\334\370\032\240L,\0353\313I\324\354Ra0\021\325\235\230\024\211\244\036\2065\312\334=U\355W\3335\367\214J\264\275\372k=\200\310y\347\336\276\010c\027a\354\247\023\306\272.S\340\275I\232B""\313\013\311\312\266\370+!\314\006\260\010\230nz\032\240hB\302\3616x9m\021\004\212/\303\326\266\374T\276\035\341\037\026d\026O0R\377\354\301\020\341T\003\224\301\244ce9\211zj\350\376U\252\271R^\231\021\013\024\305z\252tZM\327\3742\303S\014\350\255Y\237\252A\347C1\010\323R\374\365m\306\267\340\246R\023\253\206\223\305\"`\352L\003\264\364$\034\343\257\244\224\035\260\240\352:\303I\2553V\n\2114\004\n\306]d\334e\323=\031\"<j\200\014\234\216\235\345$*w\2512\230\210\352.3A\022K7\177M\373\353\204\361\323\347p\266D\326\016J\275\216\370\336o&C\210\236\337.\275\222\372\177\003_;\206_";
13257 PyObject *data = __Pyx_DecompressString(cstring, 3639, 1);
13258 #define __Pyx_DecompressString_LZSS_UNUSED
13259 if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error)
13260 const char* const bytes = __Pyx_PyBytes_AsString(data);
13261 #if !CYTHON_ASSUME_SAFE_MACROS
13262 if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) }
13263 #endif
13264 #elif (CYTHON_COMPRESS_STRINGS) > 0 && (CYTHON_COMPRESS_STRINGS) <= 90 /* compression: lzss (5376 bytes) */
13265static const char cstring[] = "\377?Note th\377at Cytho\377n is del\377iberatel\377y strict\373er!\001n PEP\377-484 and\377 rejects\377 subclas\377ses of b\377uiltin t\377ypes. If\377 you nee?d to p%\000%\t\377then set\376\200\000e \047anno\177tation_<\000\377ing\047 dir\366b\000iv\242\000o Fa\377lse.add_\376%\000econfig\363ur,\002\262\000nsit\377y_w_flag\337= {0}\241\002de\272\022\003n\020\0051} c\000 \367fou\301\000nump\377y._core.\373mu\266\000array\337 fail\253\003im\357port\033\tuma\333th\021\016pr\306 us\377/cTwopha\377seDarcyC\377oefficie\377nts.pyxK\377bar__Pyx\372\001\000D\324 _Next\337Ref__\364\004e_\177___func\004\001\357main\003\002odu\335l\025\002nam\035\002qu{al\004\005test3\000\333is\302\001ou\371 ea\367adv\262!onSc\373al\305 anasy\237ncio.\347\000\036\003sgawb\223\0274\000cF\305 \377capillar\377yDiffusi\332I\006cT\000e_\235\000tr\377acebackc\375og\000dcompr\177essibil\214@\356@\001dad\254`an_\277dpsicd\002\004wKda\000\000w\r\005\003\003w\240K\274\264E\316Cdfdf?\003w\222\004\002s\004\000/\005fF\000\r\000m\247dmn\000\000c\004m&\005m\347wdmb\005\002\004wdo^\333!dphi\000\001_\230\000(\231\005\020\000\005\007w\023\010s\004\006\246\005\3722\001d2\006wffnf\373or\235`fwgge\355n\276\205\002Sp\246!Tab\177lesgradf\001\377citemsiw\267orkv\000km\317`T\177ypemnmu\000\000\177wmwnPoi\260`\357PerS\376`lex\375n\000\005knotsn}p\263\204\002omega\276\000<\251\005\262\004wpop\346!\317\001\376\357 wpskMod\373el\314Aqtrow\217ptrrw\002\223\205\006\001\013w\371r\222\005\000\006_tols\377etdefaul\373ts\311\010tartI\177ndexswt\357\204\t\275_\200gleN_/\001t\363_s\374\000\232aure_\317het_\362\004\024\"sa\371t\345\206\004!\027fc_pp\300b\001D\026\037\000\202\000\000\034\220\010_n\375o\212@tentia3lF\332@\327\013in\333\t\337\004\300}\003\214\200!*\022\200\201\"\"\025\202\201!sl\337ightC\241\206\006le\370\363\201)\"\031\200\202!vol_f\377racuvalu\333es\007\005_n\001\006wx\377\200\001\360\022\000\005\016\210\377V\2206\230\021\230!\330\377\004\007\200}\220C\220q\377\330\014!\240\033\250A\250\357Q\330()\000\000\330(2""\357\260&\270\001\003\001)\2701\337\330(/\250y\010\003-\270\375q\030\001+\270Q\330\t\026\357\220c\230\0215\001\025\240a\337\240q\330\"#\000\000\330\"\337,\250F\260!\003\001I\260\277Q\330\")\250\031\010\003M;\270\021\030\001K\260q\0006\000o\361\340\223 \257\200+\335 \024\000\005 \377\230r\240\026\240q\250\002\377\250%\250q\260\001\330\004\377\026\220b\230\005\230R\230\377q\330\010\037\230q\240\001\377\330\033\034\330\033\"\240\047\377\250\021\330\033%\240U\250\345!\003\001R\302 \013\000Z\250q\311\330\001\003\252@20\032\264GL\310\377K\320WX\320XY\330\373ST\000\000\320TZ\320Z\317[\320[\\\n\002\t\000`\320\317`a\330S\000\006\033\000a\320\373ab\047\003\330S]\320]\317b\320bc\004\002\017\006m\320\273mn\026\002f\320f\t\000t\277\320t}\320}~(\002j\367\320jk1\002l\320lm\334\000\006C\002^\320^-\000p\320\377pr\320rz\360\000\000\357{\001E\002\004\000E\002F\356\003\001F\002N\n\001N\002X\356\021\001X\002Z\030\001Z\002b\356\037\001b\002l&\001l\002m\336-\001m\002n\002\224\002_\320\177_g\320gq\320q~\000\335|N\000}\001GM\001G\002\335KT\001K\002S[\001S\002\335]b\001]\002^i\001^\002\261_-\014}\r<\004H\002\275\204\006L\377\310E\320QR\320RS\367\330MN\000\000\310f\320T\257U\320UV\t\002T\311#\330\341M\000\006\017\000\331\"\047\002\330MW?\320W\\\320\\]\004\002\017\006\342\263\000h\026\002\371 \277\000n\320n\357w\320wx(\002d\320d\te1\002\330 g\000\006C\002\301@\251@x\336 \330 \360 ~\320~\177\303 w@\002H\302!H\002R\311!wR\002T\320!T\002\\\327!w\\\002f\336!f\002g\345!\357g\002h\002\214\002Y\320Y\256\340@k\320kv\000v\206@w[\001A\205AA\002\211DM\223AWM\002W\232AW\210EY-\014\364~\004\305@\1777\005B\002\340\014\350\354\201\377\270\2033\255\206!\177\321\211\002\010\013\210\377=\230\003\2301\330\020J\377\320Jh\320hi\320i{j\330\262`de\320e\321@\370\363\205\002\013\001\335@q\320qr\330yd\000\006\357@r\320rs\047\003{\330d\364`s\320st\004\002\236\t\014w\320w~\325B\224\206\004O\336\245\206\001O\002P\0021\002{\320\303{|:\002\361\206\002D\001\000\006o\320\377ow\360\000\000x\001B\356\327\206\001B\002D\336\206""\001D\002L\256\345\206\001L\002V\354\206\001V\305\206\023p\356\210\207\001p\002x\217\207\001x\002B\177\003\360\000\000B\003K\003\001\217K\003L\003\251\0028\"\257\204\004_\356\327\207\001_\002i\336\207\001i\002j\376\345\207\001j\002k\002\330\r\032\317\230#\230Q\267\"\324\210\001\320cod\330^_\000\000\320_\274 \030\357\205\002\013\001\304$\330^\000\006\332 \315\210\002\206(\002\330^\365 \200\211\002\005\001\t\014q_\320qx\320x\225\206\003I\335\210\001\357I\002J\002-\002u\320u\301v6\002\351\206\002@\001\000\006\302@q\320\375q\326 }\360\000\000~\001J\213\211\004P\234\211\001P\275\206\023\314\004r\277\211\001wr\002|\306\211\001|\002E\263!OE\003F\003\235\0028\032Q\370\211\001wQ\002Y\377\211\001Y\002c\206\212\001\367c\002d\215\212\001d\002e\002\351\340\331a\307\200Wr\325\"n\320n\035oi\255\330\t\030\370\205\002\371\205\n\263e\177ab\330ab\320b\215\206\005\256\013\001h\320h\342\002a\000\006h\177\320ho\320op\330(\002\377\330ak\320kp\320p\371q\004\002\t\014t\320tu\330\3205\001\303\206\002&\001\326`y.\002z\320\003z{\000\006@\002\375\211\020\367d\200\215\004\204\205\022\272\312\215\004u\205\216\001u\002\177\214\216\001\177{\002H\371\205\001H\003I\0033#\334\323\213\034\347\205\010_\320_\351\217\002[\\\037\330[\\\320\\\371\205\005\013\001\260$;\330[\000\006b\320b\326\210\002(\002\037\330[e\320e\327\217\002\005\001\t\014\000\303b5\001\373\210\001%\002\342\210\002/\001\276\"\000\006\375[\336\206\003n\320nx\320x\032\375\217\003C\377\217\001C\002\354\214\004\200\205\022\266\215\004]o\251\220\001o\002y\260\220\001y\231\210\005GC\003\3304\036\321\220\004\366\210\004`\360\220\001w`\002a\367\220\001a\002b\344\205\003\366\027\377V\002\210.\010\017\210w\377\320\026\\\320\\c\320c\367d\320d\212\205\001\200\001\3604\376\320\224$G\300{\320RS\320\337ST\330NO\000\000\310v\277\320UV\320VW\t\002U\353\320U\375\224\002N\000\006U\320U\374\242\222\002\047\002\330NX\320X]\207\320]^\004\002\t\014\230\225\0025\001^\007\320^_%\002\265\213\001.\002\322\222\0028\001\300\000\006\341\221\006\255\225\002S\0019""\003\213\226\001\320Y\345Zd\002Y\005\001\252\231\005G\300u\177\310A\310Q\330HI\000\000\277\310\026\310q\320P\007\003Ov\274\002\330H\000\005O\310w\312\001\376#\002\330HR\320RW\320\213WX\004\002V\n\013\346\226\0024\000y\000\376\226\001%\001\201\206\001-\002\342\226\0027\001\000\006\252\"\236I\001T\320TUQ\0028\003R\032\303$H\002\004\340\014\326\200\205\275#\316\230\001=\330\3047\200\001\3606\215\231\035\314\221\r\367L\320L\307\230\001\320kl\330\033fg\000\000\320g\361\230\001\255\214\001\013\001\227m\320m\266\221\002f\000\006\201\231\003u>\047\003\330fp\320p\351\216\002\005\001~\302\212\002fg\360\002\000g\240\225\007>\036\002y\360\000\000z\365\225\005\300\226\004\206\221\216\004R\002@\002\323\231\002J\001\345\226\003A\034\020\003\000\nq\320qB\003\345\221\004\271\231\022\220\210\227\004\340\216\004\300\231\004\313\210\004pe\003#\"[V\256\232\001[\002:\013q\303\232\001q\222\211\005\335C\267\222\001C\003D\276\222\001D\003\023E\003\210\"\307\232)[\234\222\007\203@\215\231\001\277\320ef\330`a\000\000\320]a\267\231\001\320hi\n\002g\217C\323\330`\000\006\307\231\003o\047\003\330`\007j\320j\346\215\002\005\001\350\217\002A\001\266\215\002\216\027\001s\320s\201\234\003\245\224\004\257\233\004L\361\0024\002\215\232\002>\001y\320yz\365\330\000\006`\220cs\320s}\243\320}\354\231\021\335\224\004\347\233\004h\336\234\001h\224\365\223\010\037\036U\220\235\001U\255\234\005\262\232\004k\356\245\235\001k\002s\254\235\001s\002}\356\263\235\001}\002~\272\235\001~\002\177\274\252\003\361\232!U\002\340\020\363\200]t\340\212B\316\220\002\374!q\323\364\222\017L\320L\216\223\204\005cd\330\254\214\001\267\207\005\013\001j\353\320j\340\222\002c\000\006j\320j|\231\232\002(\002\330cm\320m\226\232\002p\005\001\017\006\320\241\002\027\001v\320v\222\227\003\214\252\241\004\243\241\004O\0024\002\207\223\002>\001|/\320|}\330\000\006c\253\210\003\324\236\n\200\347\220\004\231\241\004\344d\374\226\004\222\220\004\244\231\004\350\241\006\330\350\037&\262\242\004:\013n\337\242\001n\002v\356\346\242\001v\002@""\323\232\001@\003A\036\332\232\001A\003B\003\364\002\244\233\r\220\022\234\204\240\006\271\232\006L\320L\245\244\001\231\244\001]?^\330]^\320^\243\207\005\013\001\327d\320d\206\244\002]\000\006d\320\366\206\235\001l\330(\002\330]g\320\201g\236\244\002\005\001\263\223\002A\001\202\242\002\027\001p3\320p\373\234\006\331\241\004I\0020\002\220\226\002\254:\001\222@w\330\000\006]\223\210\003p\037\320pz\320z\207\244\003\327\244\004\265\235\004\024\206\244\004\272\211\004e\366\244\001e\215\242\010\037\036\330\242\004\320\220\245\004\242\232\004\330\207\004\265\235\004z\313\245\001z\002\035{\322\245\001{\002|\252\003\321\233\006\201\021\300\344\213\006\223\207\002M\377\250\212\003\214\201@\246\224\023F\001\376\345\252\031\360\006\000\005\014\210?\272\234\240\001\340\363\255\007M\320M\316\242\005g\307h\330g\311\233\004\275\233\001\013\001n\320un\241\233\002g\000\006n\320n\343\237\002B(\002\330\232\251\001\244\204\002\243\251\001\014\th\026\002\302\302\233\002g\370\247\005\307\251\001\322\247\0013\000\360\000\333\000r\242\220\010gq\000\016\320q\034\240\251\027c\007q\320q\337\243\002\242\252\001\367\243\0029g\006\t\265\003q\320q\254\003\253\244\001B\234\244\001g\034\027\322\257\005\223 \241\235Qb\213\236\002\302\310\235-m\301\236\002\220\255\002\313\236\001\330\236\003k\320\311k\t\006\207\255\002a\006\t\216\237\003k\320\261k$\006\022\017)\n\340\014\002\356\2007\001\360J\341\203\315s\330\364\204\n\357\204\0068\376\204$\230\247\003\210\214\006\360\000\000\330\247\002\316\205\004\037{\360\000\000|\264\247\005\204\261\004\263\252\004d\340\246\004\270\226\004\\\323\260\007\276\205\010bc\367\243D\034\233\253\002\325\244\001t\320t\216\003\337\241\004\200\253\004gM\002\330\370\243R\237\225\004l\002\353\244#\224\225\226\022\342\263\004t\226\264\001t\331\225\007\343\260\001\002\273@\003\341\206\005u\320u\211\232\005\360\317\000\000A\002\334\245\013\274\226\004V\002\200\250\206\n\366\200f\351\264\013\361\254\007\347\247\001\360\246E\332\200\216\200\307\001\360V\266\215%\327\274\001\274""\261\r3\320\0353\231\233Nj\320j\334\261\002\234\234\001\352\230$\343l\330\332\233\004\003\003\257\234\003j\320jt\000\006\322\271\002`\377\266\003m\330`Z\006\034c\006\000\030j\320j\373\262\002\311\234\n\000\017\200\350\234\006c\006\300\003@ \326\261\005\313 \233\245\001\320\337_`\330Z[\000\000\320[\264\243\226\005\013\001a\301\236\003\330Z\000\006a\365\320\234\255\001i\047\003\330Zd\320\341d\321\264\002\005\001\336\264\001@\002d\320d\000\363\273\0022\001\341\273\002#\001\335\264\002,\001\305\264\002\000\006qZ\256\237\005\000\006A\007d\320dN\003\027d\320d\340\271\002Z\000\006Z\006c\006\016\000\030d\320d\337\274\002q\n\000\017\220\006\030c\006\300\003A\037\340\020\223\202\377\353\241\017\343\203/\356\241\262\0163\3203\351\232Ng\320gb\302\262\002]\237\204\005\335\233\001\216\233\033i\330\256\233\004\034\003\003\377\233\003g\320g\000\006\325\272\002\245\234\0018\000\006]\003c\006g\320g\000\030\341\263\002\200\235\234\n\000\017\274\234\0061/\341\206\010\313\303\001\341\300\001W\303X\330\346\303\001\363\206\005\013\001\220\236\004\330W\266\000\006^\320\322\271\001f\330(\002\330\017Wa\320a\346\300\002\005\001\305\255\002A\001\007a\320a\304\303\0022\001\250\301\002#\001\252\267\002\210,\001\253\265\002\000\006W\376\236\005\000\006A\007a;\320aN\003a\320a\302\257\001j\002\000\000\006]\003c\006\030\t\t\017\342\275\002q\n\000\0170\220\0062.\347\206\002\307\240\005_`\210\240D\244\202\356u\340\236\263\023Z\336\21690\3200\340\243\005\177bc\330bc\320c\356\301\001\\\343\310\001\013\001i\320i\311\272\002b\000\006\347i\320i\314\272\002(\002\330bl\343\320l\202\302\002\005\001\017\006l\320l\000\210\277\002\336\270\001\216\302\002#\001\344\253\002,\001\333\301\002\000\006\300>\001\354\311\002\000\006P\001\267\275\002J\007l\320\341l\t\006\212\003Z\006\000\030l\320lh\245\003\231\t\206\310\002b\336\307\003u\330\203\n\200\214\274\002\225\n\253\006L/\202\302\005\335 \270\207\005\\\277]\330\\]\320]\352\266\003e\006\t\000\330\\\350$\000\006\r\002\340\313\002(\002\037\330\\f\320f\362\272\002\005""\001\017\006\007f\320f\337\275\002\267\267\001\204\314\002#\001\350\304\002\000,\001\203\302\002\000\006>\001\214\312\002\000\006P\001\362\217\002NJ\007f\320f\t\006\354\305\002\\Z\006\016\000\030f\320f\245\003\231\t\220\306\002\263\001\000\372\300\002\203\n\000\017\253\006L/\325(\250\204\025\247\307\005\335b\304\202\377z\330b\220\2051\340\020p\235\205\377\246\210\006\322\206J\327\305\0160\3200\314\227\005\347_`\330\305\303\001\237\321\001\320gh>\t\000\330_f\320f\355\323\002\000\006\345_\226\324\003n\031\002-\000i\320i^\353\307\002_i\320i\273\324\002_\017\003\002\215\315\002_\251\207\005\032\001\324\256\002#\001\351\305\002\000\006\301_\357\212\005\000\006G\001\356\303\002J\007i\3209i\t\006\212\003i\320i]\003\000\030h\212\006\231\t\371\306\002_\223\313\003r\330\203\n\300\323\316\002\225\n\253\006L/\375\211\010\217\300\005YZ\343\330Y\223\327\004\207\327\001\013\001`\320`\262\215\324\002Y\000\006\266\324\003h\330(\002\330\017Yc\320c\246\232\002\005\001\333\324\002A\001\007c\320c\203\327\0022\001\243\320\002#\001\352\310\002\010,\001\210\320\002\000\006Y\357\212\005\000\006P\001\330\301\002\016J\007c\320c\t\006\212\003Z\006\000\030\007c\320c\215\003\231\t\371\313\002\263\001\261\307\002\000\203\n\000\017\253\006L/\335\214\010\250\204\025\276\322\005\304\202\377\217vw\330_\220\2051\203\212\002\235\205\377y\321\330\233\207\023\345\2067\273\225\024h\255\264\032\330\004\271\013\302\264\003\326\245\021A\320A\202\330\001\360\357\000\000t\001\321\271\007st\330\017st\320t\324\320\001\332\327\001\013\001\236\337\003\236\224\334\004B\002\330s\000\016\262\302\nC\314\037\000A\001\330s\276\325\003\323\316\004D\002\200\t\005\214\330\004!\004\343\325\003\344\336\007\205\303\004\252\330\004E\220-\006\214\303\007Q\004\227\335\004NO\006\005\t\320\001}\274\265\002\231\303\001\000\006\262\306\006\222\004}\010\273\303\006\001A\235\006\345\010\222\016\000,\306\327\003c\t\330\327\002\024\210.\234\330\007s\362\327\nG\316\022\225\330\t\007\030@\254)\242\305\005\334\007\361\342\006\246E\376(}""\000,\270L\017\372\200G\247\333\005A\320A\315\344\001\360\357\000\000n\001\276gmn\330am\373\271\004\327\332\001\013\001\275\204\004\330m\000\006\370\201\261\001\255\335\001(\002\330mw\320wD\243\302\002\005\001{\020\005\256\335\003\341\204\007m\313\345\005\001m\310\335\003\245\047\n\004\234\344\007\000\016^\001\243\327\002p\000\006p\001\301\310\002j\007w\320w\t\006r\307\327\002mr\016\000 w\320w\275\003\000\313\007\370\336\002\361\205\007\353\001\262\314\006\226\022\002\031\305\337\002\300\360\t\253\010\244\274\002\230\033\000 \304\2005\340\020\300\305\206\377\334\342\003\363\211\001\305\206\377\250\207\234\244\340\016A\320yA\300\244\003\353\302\002jk\330j\250\347\004\\\234\347\001\013\001q\320q\217\354\002j\000\006\366\322\344\003y\330(\002\330jt\320\001t\225\321\002\005\001\222\340\002A\001\202\357\005\330\314\001\236\340\002?jt\360\000\000u\250\211\010\n\004\000\335\215\007\000\016V\001\245\345\002\000\006h\001\351\311\002b\007\207t\320t\t\006\242\003r\006\000\030t\003\320t\245\003\261\t\321\325\006\317\001\276\315\002~\022\020\002\025\317\016\217\010\244\351\002j\205\022\000\030\250\200%\274\377\207\002\307\343\001\360\000\000q\302\361\007\330spq\000\000\271C\320xy\n\002\227w\320w\235\362\002p\000\006\336\352\001\320\213~\177\047\003\330\261\314\001\331\327\006\276\314\001~(\024\005\243\362\003\214\221\007p\233\214\rp\305\362\003\233\315\007\372\n\004J\330\362\001J\002K\002\330\002\000\016p\336\222\005\000\006\260\315\002\272\320\001r\007\303\315\001p\n\005\266\003z\016\000 z\320z\305\003Gz\320z\326\010\371\363\002\360\363\004G\231\006\260\250\223\007\254\025\000\037\374\t\320z\215\322\002p\242\227\224\rp\257\030\223\365\002\240\224\007p\276\2004|\000\236:\223\255\021";
13266 PyObject *data = __Pyx_DecompressString_LZSS(cstring, 5376, 17558);
13267 #define __Pyx_DecompressString_UNUSED
13268 if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error)
13269 const char* const bytes = __Pyx_PyBytes_AsString(data);
13270 #if !CYTHON_ASSUME_SAFE_MACROS
13271 if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) }
13272 #endif
13273 #else /* compression: none (17558 bytes) */
13274static const char bytes[] = "?Note that Cython is deliberately stricter than PEP-484 and rejects subclasses of builtin types. If you need to pass subclasses then set the \047annotation_typing\047 directive to False.add_noteconfiguration density_w_flag= {0} and density_n_flag= {1} not found numpy._core.multiarray failed to importnumpy._core.umath failed to importproteus/cTwophaseDarcyCoefficients.pyxKbar__Pyx_PyDict_NextRef__annotate____func____main____module____name____qualname____test___is_coroutineaadvectionScalinganasyncio.coroutinesawbcTwophaseDarcyCoefficientscalcFlagcapillaryDiffusionScalingcline_in_tracebackcolindcompressibilityFlagdadandan_dpsicdan_dpsiwdawdaw_dpsicdaw_dpsiwdensity_n_flagdensity_w_flagdfdfn_dpsiwdfn_dswdfw_dpsiwdfw_dswdmdmndmn_dpsicdmn_dpsiwdmwdmw_dpsicdmw_dpsiwdomaindphidphi_psin_dpsicdphi_psin_dpsiwdphi_psin_dswdphi_psiw_dpsiwdpsindpsin_dpsiwffnformatfwggenerateSplineTablesgrad_psicitemsiwork_pskmmatTypemnmunmuwmwnPointsPerSimplexnSimplexnknotsnpnumpyomegaphiphi_psinphi_psiwpoppsicpsinpsiwpskModelFlagqtrowptrrwork_density_nrwork_density_wrwork_pskrwork_psk_tolsetdefaultsplineTablestartIndexswtwophaseDarcy_compressibleN_split_sd_pressure_het_matTypetwophaseDarcy_compressibleN_split_sd_saturation_het_matTypetwophaseDarcy_fc_pp_sd_het_matTypetwophaseDarcy_fc_sd_het_matTypetwophaseDarcy_fc_sd_het_matType_nonPotentialFormtwophaseDarcy_incompressible_split_pp_sd_saturation_het_matTypetwophaseDarcy_incompressible_split_sd_pressure_het_matTypetwophaseDarcy_incompressible_split_sd_saturation_het_matTypetwophaseDarcy_slightCompressible_split_sd_pressure_het_matTypetwophaseDarcy_slightCompressible_split_sd_saturation_het_matTypetwophaseDarcy_vol_fracuvaluesvol_frac_nvol_frac_wx\200\001\360\022\000\005\016\210V\2206\230\021\230!\330\004\007\200}\220C\220q\330\014!\240\033\250A\250Q\330()\330()\330(2\260&\270\001\330(2\260)\2701\330(/\250y\270\001\330(2\260-\270q\330(2\260+\270Q\330\t\026\220c\230\021\330\014!\240\025\240a\240q\330\"#\330\"#\330\",\250F\260!\330\",\250I\260Q\330""\")\250\031\260!\330\",\250M\270\021\330\",\250K\260q\330\t\026\220c\230\021\330\014!\240\025\240a\240q\330\"#\330\"#\330\",\250F\260!\330\",\250I\260Q\330\")\250\031\260!\330\",\250M\270\021\330\",\250K\260q\330\t\026\220c\230\021\330\014!\240\025\240a\240q\330\"#\330\"#\330\",\250F\260!\330\",\250I\260Q\330\")\250\031\260!\330\",\250M\270\021\330\",\250K\260q\330\t\026\220c\230\021\330\014!\240\025\240a\240q\330\"#\330\"#\330\",\250F\260!\330\",\250I\260Q\330\")\250\031\260!\330\",\250M\270\021\330\",\250K\260q\340\014!\240\025\240a\240q\330\"#\330\"#\330\",\250F\260!\330\",\250I\260Q\330\")\250\031\260!\330\",\250M\270\021\330\",\250K\260q\200\001\360\024\000\005 \230r\240\026\240q\250\002\250%\250q\260\001\330\004\026\220b\230\005\230R\230q\330\010\037\230q\240\001\330\033\034\330\033\"\240\047\250\021\330\033%\240U\250!\330\033%\240R\240q\330\033%\240Z\250q\330\033%\240Z\250q\200\001\3602\000\005 \230r\240\026\240q\250\002\250%\250q\260\001\330\004\026\220b\230\005\230R\230q\330\004\007\200}\220C\220q\330\014L\310K\320WX\320XY\330ST\330ST\320TZ\320Z[\320[\\\330ST\330SZ\320Z`\320`a\330SZ\320Z`\320`a\330SZ\320Za\320ab\330ST\330ST\330S]\320]b\320bc\330S]\320]a\320ab\330ST\330Sm\320mn\330S]\320]f\320fm\320mt\320t}\320}~\330S]\320]j\320jk\330S]\320]l\320lm\330S]\320]l\320lm\330S]\320]^\320^f\320fp\320pr\320rz\360\000\000{\001E\002\360\000\000E\002F\002\360\000\000F\002N\002\360\000\000N\002X\002\360\000\000X\002Z\002\360\000\000Z\002b\002\360\000\000b\002l\002\360\000\000l\002m\002\360\000\000m\002n\002\330S]\320]_\320_g\320gq\320qt\320t|\360\000\000}\001G\002\360\000\000G\002K\002\360\000\000K\002S\002\360\000\000S\002]\002\360\000\000]\002^\002\360\000\000^\002_\002\330S]\320]_\320_g\320gq\320qr\320rz\360\000\000{\001E\002\360\000\000E\002G\002\360\000\000G\002H\002\330\t\026\220c\230\021\330\014L\310E\320QR\320RS\330MN\330MN\310f\320TU\320UV\330MN\330MT\320TZ\320Z[\330MT\320TZ\320Z[\330MT\320T[\320[\\\330MN\330MN\330MW\320W\\\320\\]\330MW\320W[\320[\\\330MN\330Mg""\320gh\330MW\320W`\320`g\320gn\320nw\320wx\330MW\320Wd\320de\330MW\320Wf\320fg\330MW\320Wf\320fg\330MW\320WX\320X`\320`j\320jl\320lt\320t~\320~\177\360\000\000@\002H\002\360\000\000H\002R\002\360\000\000R\002T\002\360\000\000T\002\\\002\360\000\000\\\002f\002\360\000\000f\002g\002\360\000\000g\002h\002\330MW\320WY\320Ya\320ak\320kn\320nv\360\000\000w\001A\002\360\000\000A\002E\002\360\000\000E\002M\002\360\000\000M\002W\002\360\000\000W\002X\002\360\000\000X\002Y\002\330MW\320WY\320Ya\320ak\320kl\320lt\320t~\360\000\000\177\001A\002\360\000\000A\002B\002\340\014L\310K\320WX\320XY\330ST\330ST\320TZ\320Z[\320[\\\330ST\330SZ\320Z`\320`a\330SZ\320Z`\320`a\330SZ\320Za\320ab\330ST\330ST\330S]\320]b\320bc\330S]\320]a\320ab\330ST\330Sm\320mn\330S]\320]f\320fm\320mt\320t}\320}~\330S]\320]j\320jk\330S]\320]l\320lm\330S]\320]l\320lm\330S]\320]^\320^f\320fp\320pr\320rz\360\000\000{\001E\002\360\000\000E\002F\002\360\000\000F\002N\002\360\000\000N\002X\002\360\000\000X\002Z\002\360\000\000Z\002b\002\360\000\000b\002l\002\360\000\000l\002m\002\360\000\000m\002n\002\330S]\320]_\320_g\320gq\320qt\320t|\360\000\000}\001G\002\360\000\000G\002K\002\360\000\000K\002S\002\360\000\000S\002]\002\360\000\000]\002^\002\360\000\000^\002_\002\330S]\320]_\320_g\320gq\320qr\320rz\360\000\000{\001E\002\360\000\000E\002G\002\360\000\000G\002H\002\200\001\3602\000\005 \230r\240\026\240q\250\002\250%\250q\260\001\330\004\026\220b\230\005\230R\230q\330\004\007\200\177\220c\230\021\330\010\013\210=\230\003\2301\330\020J\320Jh\320hi\320ij\330de\330de\320ek\320kl\320lm\330de\330dk\320kq\320qr\330dk\320kq\320qr\330dk\320kr\320rs\330de\330de\330dn\320ns\320st\330dn\320nr\320rs\330de\330de\330dn\320nw\320w~\360\000\000\177\001F\002\360\000\000F\002O\002\360\000\000O\002P\002\330dn\320n{\320{|\330dn\320n}\320}~\330dn\320n}\320}~\330dn\320no\320ow\360\000\000x\001B\002\360\000\000B\002D\002\360\000\000D\002L\002\360\000\000L\002V\002\360\000\000V\002Z\002\360\000\000Z\002b\002\360\000\000b\002l\002\360\000""\000l\002p\002\360\000\000p\002x\002\360\000\000x\002B\003\360\000\000B\003K\003\360\000\000K\003L\003\330dn\320no\320ow\360\000\000x\001B\002\360\000\000B\002D\002\360\000\000D\002L\002\360\000\000L\002V\002\360\000\000V\002W\002\360\000\000W\002_\002\360\000\000_\002i\002\360\000\000i\002j\002\360\000\000j\002k\002\330\r\032\230#\230Q\330\020J\320Jb\320bc\320cd\330^_\330^_\320_e\320ef\320fg\330^_\330^e\320ek\320kl\330^e\320ek\320kl\330^e\320el\320lm\330^_\330^_\330^h\320hm\320mn\330^h\320hl\320lm\330^_\330^_\330^h\320hq\320qx\320x\177\360\000\000@\002I\002\360\000\000I\002J\002\330^h\320hu\320uv\330^h\320hw\320wx\330^h\320hw\320wx\330^h\320hi\320iq\320q{\320{}\360\000\000~\001F\002\360\000\000F\002P\002\360\000\000P\002T\002\360\000\000T\002\\\002\360\000\000\\\002f\002\360\000\000f\002j\002\360\000\000j\002r\002\360\000\000r\002|\002\360\000\000|\002E\003\360\000\000E\003F\003\330^h\320hi\320iq\320q{\320{}\360\000\000~\001F\002\360\000\000F\002P\002\360\000\000P\002Q\002\360\000\000Q\002Y\002\360\000\000Y\002c\002\360\000\000c\002d\002\360\000\000d\002e\002\340\020J\320Jb\320bc\320cd\330^_\330^_\320_e\320ef\320fg\330^_\330^e\320ek\320kl\330^e\320ek\320kl\330^e\320el\320lm\330^_\330^_\330^h\320hm\320mn\330^h\320hl\320lm\330^_\330^_\330^h\320hq\320qr\330^e\320en\320no\330^h\320hu\320uv\330^h\320hw\320wx\330^h\320hw\320wx\330^h\320hi\320iq\320q{\320{}\360\000\000~\001F\002\360\000\000F\002P\002\360\000\000P\002T\002\360\000\000T\002\\\002\360\000\000\\\002f\002\360\000\000f\002j\002\360\000\000j\002r\002\360\000\000r\002|\002\360\000\000|\002E\003\360\000\000E\003F\003\330^h\320hi\320iq\320q{\320{}\360\000\000~\001F\002\360\000\000F\002P\002\360\000\000P\002Q\002\360\000\000Q\002Y\002\360\000\000Y\002c\002\360\000\000c\002d\002\360\000\000d\002e\002\330\t\030\230\003\2301\330\010\013\210=\230\003\2301\330\020J\320Je\320ef\320fg\330ab\330ab\320bh\320hi\320ij\330ab\330ah\320hn\320no\330ah\320hn\320no\330ah\320ho\320op\330ab\330ab\330ak\320kp\320pq\330ak\320ko\320op""\330ab\330ab\330ak\320kt\320tu\330ah\320hq\320qr\330ak\320kx\320xy\330ak\320kz\320z{\330ak\320kz\320z{\330ak\320kl\320lt\320t~\360\000\000\177\001A\002\360\000\000A\002I\002\360\000\000I\002S\002\360\000\000S\002W\002\360\000\000W\002_\002\360\000\000_\002i\002\360\000\000i\002m\002\360\000\000m\002u\002\360\000\000u\002\177\002\360\000\000\177\002H\003\360\000\000H\003I\003\330ak\320kl\320lt\320t~\360\000\000\177\001A\002\360\000\000A\002I\002\360\000\000I\002S\002\360\000\000S\002T\002\360\000\000T\002\\\002\360\000\000\\\002f\002\360\000\000f\002g\002\360\000\000g\002h\002\330\r\032\230#\230Q\330\020J\320J_\320_`\320`a\330[\\\330[\\\320\\b\320bc\320cd\330[\\\330[b\320bh\320hi\330[b\320bh\320hi\330[b\320bi\320ij\330[\\\330[\\\330[e\320ej\320jk\330[e\320ei\320ij\330[\\\330[\\\330[e\320en\320no\330[b\320bk\320kl\330[e\320er\320rs\330[e\320et\320tu\330[e\320et\320tu\330[e\320ef\320fn\320nx\320xz\360\000\000{\001C\002\360\000\000C\002M\002\360\000\000M\002Q\002\360\000\000Q\002Y\002\360\000\000Y\002c\002\360\000\000c\002g\002\360\000\000g\002o\002\360\000\000o\002y\002\360\000\000y\002B\003\360\000\000B\003C\003\330[e\320ef\320fn\320nx\320xz\360\000\000{\001C\002\360\000\000C\002M\002\360\000\000M\002N\002\360\000\000N\002V\002\360\000\000V\002`\002\360\000\000`\002a\002\360\000\000a\002b\002\340\020J\320J_\320_`\320`a\330[\\\330[\\\320\\b\320bc\320cd\330[\\\330[b\320bh\320hi\330[b\320bh\320hi\330[b\320bi\320ij\330[\\\330[\\\330[e\320ej\320jk\330[e\320ei\320ij\330[\\\330[\\\330[e\320en\320no\330[b\320bk\320kl\330[e\320er\320rs\330[e\320et\320tu\330[e\320et\320tu\330[e\320ef\320fn\320nx\320xz\360\000\000{\001C\002\360\000\000C\002M\002\360\000\000M\002Q\002\360\000\000Q\002Y\002\360\000\000Y\002c\002\360\000\000c\002g\002\360\000\000g\002o\002\360\000\000o\002y\002\360\000\000y\002B\003\360\000\000B\003C\003\330[e\320ef\320fn\320nx\320xz\360\000\000{\001C\002\360\000\000C\002M\002\360\000\000M\002N\002\360\000\000N\002V\002\360\000\000V\002`\002\360\000\000`\002a\002""\360\000\000a\002b\002\340\010\017\210w\320\026\\\320\\c\320cd\320dt\320tu\200\001\3604\000\005 \230r\240\026\240q\250\002\250%\250q\260\001\330\004\026\220b\230\005\230R\230q\330\004\007\200}\220C\220q\330\014G\300{\320RS\320ST\330NO\330NO\310v\320UV\320VW\330NO\330NU\320U[\320[\\\330NU\320U[\320[\\\330NU\320U\\\320\\]\330NO\330NO\330NX\320X]\320]^\330NX\320X\\\320\\]\330NO\330NO\330NX\320Xa\320ab\330NU\320U^\320^_\330NX\320Xe\320ef\330NX\320Xg\320gh\330NX\320Xg\320gh\330NX\320XY\320Ya\320ak\320km\320mn\330NX\320Xa\320ab\330NX\320XY\320YZ\330NX\320XY\320YZ\330\t\026\220c\230\021\330\014G\300u\310A\310Q\330HI\330HI\310\026\310q\320PQ\330HI\330HO\310v\320UV\330HO\310v\320UV\330HO\310w\320VW\330HI\330HI\330HR\320RW\320WX\330HR\320RV\320VW\330HI\330HI\330HR\320R[\320[\\\330HO\310y\320XY\330HR\320R_\320_`\330HR\320Ra\320ab\330HR\320Ra\320ab\330HR\320RS\320ST\330HR\320RT\320TU\330HR\320R[\320[\\\330HR\320RS\320ST\330HR\320RS\320ST\340\014G\300{\320RS\320ST\330NO\330NO\310v\320UV\320VW\330NO\330NU\320U[\320[\\\330NU\320U[\320[\\\330NU\320U\\\320\\]\330NO\330NO\330NX\320X]\320]^\330NX\320X\\\320\\]\330NO\330NO\330NX\320Xa\320ab\330NU\320U^\320^_\330NX\320Xe\320ef\330NX\320Xg\320gh\330NX\320Xg\320gh\330NX\320XY\320YZ\330NX\320XZ\320Z[\330NX\320Xa\320ab\330NX\320XY\320YZ\330NX\320XY\320YZ\200\001\3606\000\005 \230r\240\026\240q\250\002\250%\250q\260\001\330\004\026\220b\230\005\230R\230q\330\004\007\200\177\220c\230\021\330\010\013\210=\230\003\2301\330\020L\320Lj\320jk\320kl\330fg\330fg\320gm\320mn\320no\330fg\330fm\320ms\320st\330fm\320ms\320st\330fm\320mt\320tu\330fg\330fg\330fp\320pu\320uv\330fp\320pt\320tu\330fg\360\002\000g\001A\002\360\000\000A\002B\002\330fp\320py\360\000\000z\001A\002\360\000\000A\002H\002\360\000\000H\002Q\002\360\000\000Q\002R\002\330fp\320p}\320}~\330fp\320p\177\360\000\000@\002A\002\330fp\320p\177\360\000\000@\002A\002\330fp\320pq\320qy\360\000\000z\001D\002\360\000\000D\002F\002\360\000\000F\002N\002\360\000\000N\002X\002\360\000\000X\002""\\\002\360\000\000\\\002c\002\360\000\000c\002m\002\360\000\000m\002o\002\360\000\000o\002p\002\330fp\320pq\320qy\360\000\000z\001D\002\360\000\000D\002F\002\360\000\000F\002N\002\360\000\000N\002X\002\360\000\000X\002[\002\360\000\000[\002c\002\360\000\000c\002m\002\360\000\000m\002q\002\360\000\000q\002y\002\360\000\000y\002C\003\360\000\000C\003D\003\360\000\000D\003E\003\330fp\320pr\320rz\360\000\000{\001E\002\360\000\000E\002F\002\360\000\000F\002N\002\360\000\000N\002X\002\360\000\000X\002Z\002\360\000\000Z\002[\002\330\r\032\230#\230Q\330\020L\320Ld\320de\320ef\330`a\330`a\320ag\320gh\320hi\330`a\330`g\320gm\320mn\330`g\320gm\320mn\330`g\320gn\320no\330`a\330`a\330`j\320jo\320op\330`j\320jn\320no\330`a\330`z\320z{\330`j\320js\320sz\360\000\000{\001B\002\360\000\000B\002K\002\360\000\000K\002L\002\330`j\320jw\320wx\330`j\320jy\320yz\330`j\320jy\320yz\330`j\320jk\320ks\320s}\320}\177\360\000\000@\002H\002\360\000\000H\002R\002\360\000\000R\002V\002\360\000\000V\002^\002\360\000\000^\002h\002\360\000\000h\002j\002\360\000\000j\002k\002\330`j\320jk\320ks\320s}\320}\177\360\000\000@\002H\002\360\000\000H\002R\002\360\000\000R\002U\002\360\000\000U\002]\002\360\000\000]\002g\002\360\000\000g\002k\002\360\000\000k\002s\002\360\000\000s\002}\002\360\000\000}\002~\002\360\000\000~\002\177\002\330`j\320jl\320lt\320t~\320~\177\360\000\000@\002H\002\360\000\000H\002R\002\360\000\000R\002T\002\360\000\000T\002U\002\340\020L\320Ld\320de\320ef\330`a\330`a\320ag\320gh\320hi\330`a\330`g\320gm\320mn\330`g\320gm\320mn\330`g\320gn\320no\330`a\330`a\330`j\320jo\320op\330`j\320jn\320no\330`a\330`z\320z{\330`j\320js\320st\330`g\320gp\320pq\330`j\320jw\320wx\330`j\320jy\320yz\330`j\320jy\320yz\330`j\320jk\320ks\320s}\320}\177\360\000\000@\002H\002\360\000\000H\002R\002\360\000\000R\002V\002\360\000\000V\002^\002\360\000\000^\002h\002\360\000\000h\002j\002\360\000\000j\002k\002\330`j\320jk\320ks\320s}\320}\177\360\000\000@\002H\002\360\000\000H\002R\002\360\000\000R\002U\002\360\000""\000U\002]\002\360\000\000]\002g\002\360\000\000g\002k\002\360\000\000k\002s\002\360\000\000s\002}\002\360\000\000}\002~\002\360\000\000~\002\177\002\330`j\320jl\320lt\320t~\320~\177\360\000\000@\002H\002\360\000\000H\002R\002\360\000\000R\002T\002\360\000\000T\002U\002\330\t\030\230\003\2301\330\010\013\210=\230\003\2301\330\020L\320Lg\320gh\320hi\330cd\330cd\320dj\320jk\320kl\330cd\330cj\320jp\320pq\330cj\320jp\320pq\330cj\320jq\320qr\330cd\330cd\330cm\320mr\320rs\330cm\320mq\320qr\330cd\330c}\320}~\330cm\320mv\320v}\360\000\000~\001E\002\360\000\000E\002N\002\360\000\000N\002O\002\330cm\320mz\320z{\330cm\320m|\320|}\330cm\320m|\320|}\330cm\320mn\320nv\360\000\000w\001A\002\360\000\000A\002C\002\360\000\000C\002K\002\360\000\000K\002U\002\360\000\000U\002Y\002\360\000\000Y\002`\002\360\000\000`\002j\002\360\000\000j\002l\002\360\000\000l\002m\002\330cm\320mn\320nv\360\000\000w\001A\002\360\000\000A\002C\002\360\000\000C\002K\002\360\000\000K\002U\002\360\000\000U\002X\002\360\000\000X\002`\002\360\000\000`\002j\002\360\000\000j\002n\002\360\000\000n\002v\002\360\000\000v\002@\003\360\000\000@\003A\003\360\000\000A\003B\003\330cm\320mo\320ow\360\000\000x\001B\002\360\000\000B\002C\002\360\000\000C\002K\002\360\000\000K\002U\002\360\000\000U\002W\002\360\000\000W\002X\002\330\r\032\230#\230Q\330\020L\320La\320ab\320bc\330]^\330]^\320^d\320de\320ef\330]^\330]d\320dj\320jk\330]d\320dj\320jk\330]d\320dk\320kl\330]^\330]^\330]g\320gl\320lm\330]g\320gk\320kl\330]^\330]w\320wx\330]g\320gp\320pw\320w~\360\000\000\177\001H\002\360\000\000H\002I\002\330]g\320gt\320tu\330]g\320gv\320vw\330]g\320gv\320vw\330]g\320gh\320hp\320pz\320z|\360\000\000}\001E\002\360\000\000E\002O\002\360\000\000O\002S\002\360\000\000S\002[\002\360\000\000[\002e\002\360\000\000e\002g\002\360\000\000g\002h\002\330]g\320gh\320hp\320pz\320z|\360\000\000}\001E\002\360\000\000E\002O\002\360\000\000O\002R\002\360\000\000R\002Z\002\360\000\000Z\002d\002\360\000\000d\002h\002\360\000\000h\002p\002\360\000""\000p\002z\002\360\000\000z\002{\002\360\000\000{\002|\002\330]g\320gi\320iq\320q{\320{|\360\000\000}\001E\002\360\000\000E\002O\002\360\000\000O\002Q\002\360\000\000Q\002R\002\340\020L\320La\320ab\320bc\330]^\330]^\320^d\320de\320ef\330]^\330]d\320dj\320jk\330]d\320dj\320jk\330]d\320dk\320kl\330]^\330]^\330]g\320gl\320lm\330]g\320gk\320kl\330]^\330]w\320wx\330]g\320gp\320pw\320w~\360\000\000\177\001H\002\360\000\000H\002I\002\330]g\320gt\320tu\330]g\320gv\320vw\330]g\320gv\320vw\330]g\320gh\320hp\320pz\320z|\360\000\000}\001E\002\360\000\000E\002O\002\360\000\000O\002S\002\360\000\000S\002[\002\360\000\000[\002e\002\360\000\000e\002g\002\360\000\000g\002h\002\330]g\320gh\320hp\320pz\320z|\360\000\000}\001E\002\360\000\000E\002O\002\360\000\000O\002R\002\360\000\000R\002Z\002\360\000\000Z\002d\002\360\000\000d\002h\002\360\000\000h\002p\002\360\000\000p\002z\002\360\000\000z\002{\002\360\000\000{\002|\002\330]g\320gi\320iq\320q{\320{|\360\000\000}\001E\002\360\000\000E\002O\002\360\000\000O\002Q\002\360\000\000Q\002R\002\340\010\017\210w\320\026\\\320\\c\320cd\320dt\320tu\200\001\360F\001\000\005 \230r\240\026\240q\250\002\250%\250q\260\001\330\004\026\220b\230\005\230R\230q\360\006\000\005\014\210?\230#\230Q\340\004\007\200}\220C\220q\330\014M\320Mk\320kl\320lm\330gh\330gh\320hn\320no\320op\330gh\330gn\320nt\320tu\330gn\320nt\320tu\330gn\320nu\320uv\330gh\330gh\330gq\320qv\320vw\330gq\320qu\320uv\330gh\330gh\330gh\330gq\320qz\320z{\330gn\320nw\320wx\330gq\320q~\320~\177\330gq\360\000\000r\001A\002\360\000\000A\002B\002\330gq\360\000\000r\001A\002\360\000\000A\002B\002\330gq\320qr\320rz\360\000\000{\001E\002\360\000\000E\002G\002\360\000\000G\002H\002\330gq\320qu\320uv\330gq\320qs\320st\330gq\320qr\320rs\330gq\320qs\320st\330gq\320qt\320tu\330gq\320qu\320uv\330gq\320qr\320rs\330gq\320qs\320st\330gq\320qr\320rs\330gq\320qs\320st\330\t\026\220c\230\021\330\014M\320Me\320ef\320fg\330ab\330ab\320bh\320hi\320ij\330ab\330ah\320hn\320no\330ah\320hn\320no\330ah\320ho\320op""\330ab\330ab\330ak\320kp\320pq\330ak\320ko\320op\330ab\330ab\330ab\330ak\320kt\320tu\330ah\320hq\320qr\330ak\320kx\320xy\330ak\320kz\320z{\330ak\320kz\320z{\330ak\320kl\320lm\330ak\320km\320mn\330ak\320ko\320op\330ak\320km\320mn\330ak\320kl\320lm\330ak\320km\320mn\330ak\320kn\320no\330ak\320ko\320op\330ak\320kl\320lm\330ak\320km\320mn\330ak\320kl\320lm\330ak\320km\320mn\340\014M\320Me\320ef\320fg\330ab\330ab\320bh\320hi\320ij\330ab\330ah\320hn\320no\330ah\320hn\320no\330ah\320ho\320op\330ab\330ab\330ak\320kp\320pq\330ak\320ko\320op\330ab\330ab\330ab\330ak\320kt\320tu\330ah\320hq\320qr\330ak\320kx\320xy\330ak\320kz\320z{\330ak\320kz\320z{\330ak\320kl\320lm\330ak\320km\320mn\330ak\320ko\320op\330ak\320km\320mn\330ak\320kl\320lm\330ak\320km\320mn\330ak\320kn\320no\330ak\320ko\320op\330ak\320kl\320lm\330ak\320km\320mn\330ak\320kl\320lm\330ak\320km\320mn\200\001\360J\001\000\005 \230r\240\026\240q\250\002\250%\250q\260\001\330\004\026\220b\230\005\230R\230q\360\006\000\005\014\210?\230#\230Q\340\004\007\200}\220C\220q\330\014M\320Mk\320kl\320lm\330gh\330gh\320hn\320no\320op\330gh\330gn\320nt\320tu\330gn\320nt\320tu\330gn\320nu\320uv\330gh\330gh\330gq\320qv\320vw\330gq\320qu\320uv\330gh\330gh\330gh\330gq\320qz\320z{\330gn\320nw\320wx\330gq\320q~\320~\177\330gq\360\000\000r\001A\002\360\000\000A\002B\002\330gq\360\000\000r\001A\002\360\000\000A\002B\002\330gq\320qr\320rs\330gq\320qs\320st\330gq\320qu\320uv\330gq\320qs\320st\330gq\320qr\320rs\330gq\320qs\320st\330gq\320qt\320tu\330gq\320qu\320u}\360\000\000~\001H\002\360\000\000H\002I\002\360\000\000I\002J\002\330gq\320qs\320s{\360\000\000|\001F\002\360\000\000F\002G\002\360\000\000G\002O\002\360\000\000O\002Y\002\360\000\000Y\002[\002\360\000\000[\002\\\002\330\t\026\220c\230\021\330\014M\320Me\320ef\320fg\330bc\330ab\320bh\320hi\320ij\330ab\330ah\320hn\320no\330ah\320hn\320no\330ah\320ho\320op\330ab\330ab\330ak\320kp\320pq\330ak\320ko\320op\330ab\330a{\320{|\330ak\320kt\320t{\360\000\000|\001C\002\360\000\000C\002L\002""\360\000\000L\002M\002\330ak\320kx\320xy\330ak\320kz\320z{\330ak\320kz\320z{\330ak\320kl\320lt\320t~\360\000\000\177\001A\002\360\000\000A\002I\002\360\000\000I\002S\002\360\000\000S\002W\002\360\000\000W\002_\002\360\000\000_\002i\002\360\000\000i\002k\002\360\000\000k\002l\002\330ak\320kl\320lt\320t~\360\000\000\177\001A\002\360\000\000A\002I\002\360\000\000I\002S\002\360\000\000S\002V\002\360\000\000V\002^\002\360\000\000^\002h\002\360\000\000h\002l\002\360\000\000l\002t\002\360\000\000t\002~\002\360\000\000~\002\177\002\360\000\000\177\002@\003\330ak\320km\320mu\320u\177\360\000\000@\002A\002\360\000\000A\002I\002\360\000\000I\002S\002\360\000\000S\002U\002\360\000\000U\002V\002\340\014M\320Me\320ef\320fg\330bc\330ab\320bh\320hi\320ij\330ab\330ah\320hn\320no\330ah\320hn\320no\330ah\320ho\320op\330ab\330ab\330ak\320kp\320pq\330ak\320ko\320op\330ab\330a{\320{|\330ak\320kt\320t{\360\000\000|\001C\002\360\000\000C\002L\002\360\000\000L\002S\002\360\000\000S\002]\002\360\000\000]\002j\002\360\000\000j\002k\002\330ak\320kz\320z{\330ak\320kz\320z{\330ak\320kl\320lt\320t~\360\000\000\177\001A\002\360\000\000A\002I\002\360\000\000I\002S\002\360\000\000S\002W\002\360\000\000W\002_\002\360\000\000_\002i\002\360\000\000i\002k\002\360\000\000k\002l\002\330ak\320kl\320lt\320t~\360\000\000\177\001A\002\360\000\000A\002I\002\360\000\000I\002S\002\360\000\000S\002V\002\360\000\000V\002^\002\360\000\000^\002h\002\360\000\000h\002l\002\360\000\000l\002t\002\360\000\000t\002~\002\360\000\000~\002\177\002\360\000\000\177\002@\003\330ak\320km\320mu\320u\177\360\000\000@\002A\002\360\000\000A\002I\002\360\000\000I\002S\002\360\000\000S\002U\002\360\000\000U\002V\002\200\001\360V\001\000\005 \230r\240\026\240q\250\002\250%\250q\260\001\330\004\026\220b\230\005\230R\230q\360\006\000\005\014\210?\230#\230Q\330\004\007\200\177\220c\230\021\330\010\013\210=\230\003\2301\330\0203\3203d\320de\320ef\330`a\330`a\320ag\320gh\320hi\330`a\330`g\320gm\320mn\330`g\320gm\320mn\330`g\320gn\320no\330`""a\330`a\330`j\320jo\320op\330`j\320jn\320no\330`a\330`j\320js\320st\330`g\320gp\320pq\330`j\320jw\320wx\330`j\320jy\320yz\330`j\320jy\320yz\330`j\320jk\320kl\330`j\320jk\320kl\330`j\320jn\320no\330`j\320jn\320no\330`j\320jl\320lm\330`j\320jl\320lm\330`j\320js\320st\330`j\320js\320st\330`j\320jl\320lm\330`j\320js\320st\330`j\320js\320st\330`j\320jr\320rs\330`j\320jy\320yz\330`j\320jr\320rs\330`j\320jy\320yz\330`j\320jy\320yz\330`j\320jl\320lm\330`j\320js\320st\330`j\320js\320st\330`j\320jl\320lm\330`j\320js\320st\330`j\320js\320st\330\r\032\230#\230Q\330\0203\3203^\320^_\320_`\330Z[\330Z[\320[a\320ab\320bc\330Z[\330Za\320ag\320gh\330Za\320ag\320gh\330Za\320ah\320hi\330Z[\330Z[\330Zd\320di\320ij\330Zd\320dh\320hi\330Z[\330Zd\320dm\320mn\330Za\320aj\320jk\330Zd\320dq\320qr\330Zd\320ds\320st\330Zd\320ds\320st\330Zd\320de\320ef\330Zd\320de\320ef\330Zd\320dh\320hi\330Zd\320dh\320hi\330Zd\320df\320fg\330Zd\320df\320fg\330Zd\320dm\320mn\330Zd\320dm\320mn\330Zd\320df\320fg\330Zd\320dm\320mn\330Zd\320dm\320mn\330Zd\320dl\320lm\330Zd\320ds\320st\330Zd\320dl\320lm\330Zd\320ds\320st\330Zd\320ds\320st\330Zd\320df\320fg\330Zd\320dm\320mn\330Zd\320dm\320mn\330Zd\320df\320fg\330Zd\320dm\320mn\330Zd\320dm\320mn\340\0203\3203d\320de\320ef\330`a\330`a\320ag\320gh\320hi\330`a\330`g\320gm\320mn\330`g\320gm\320mn\330`g\320gn\320no\330`a\330`a\330`j\320jo\320op\330`j\320jn\320no\330`a\330`j\320js\320st\330`g\320gp\320pq\330`j\320jw\320wx\330`j\320jy\320yz\330`j\320jy\320yz\330`j\320jk\320kl\330`j\320jk\320kl\330`j\320jn\320no\330`j\320jn\320no\330`j\320jl\320lm\330`j\320jl\320lm\330`j\320js\320st\330`j\320js\320st\330`j\320jl\320lm\330`j\320js\320st\330`j\320js\320st\330`j\320jr\320rs\330`j\320jy\320yz\330`j\320jr\320rs\330`j\320jy\320yz\330`j\320jy\320yz\330`j\320jl\320lm\330`j\320js\320st\330`j\320js\320st\330`j\320jl\320lm\330`j\320js\320st\330`j\320js\320st\330\t\030\230\003\2301\330\010\013\210=\230\003\2301\330\0203\3203a\320ab\320bc\330]^\330]^\320^d\320de\320ef\330]^\330]d\320dj""\320jk\330]d\320dj\320jk\330]d\320dk\320kl\330]^\330]^\330]g\320gl\320lm\330]g\320gk\320kl\330]^\330]g\320gp\320pq\330]d\320dm\320mn\330]g\320gt\320tu\330]g\320gv\320vw\330]g\320gv\320vw\330]g\320gh\320hi\330]g\320gh\320hi\330]g\320gk\320kl\330]g\320gk\320kl\330]g\320gi\320ij\330]g\320gi\320ij\330]g\320gp\320pq\330]g\320gp\320pq\330]g\320gi\320ij\330]g\320gp\320pq\330]g\320gp\320pq\330]g\320go\320op\330]g\320gv\320vw\330]g\320go\320op\330]g\320gv\320vw\330]g\320gv\320vw\330]g\320gi\320ij\330]g\320gp\320pq\330]g\320gp\320pq\330]g\320gi\320ij\330]g\320gp\320pq\330]g\320gp\320pq\330\r\032\230#\230Q\330\0203\3203[\320[\\\320\\]\330WX\330WX\320X^\320^_\320_`\330WX\330W^\320^d\320de\330W^\320^d\320de\330W^\320^e\320ef\330WX\330WX\330Wa\320af\320fg\330Wa\320ae\320ef\330WX\330Wa\320aj\320jk\330W^\320^g\320gh\330Wa\320an\320no\330Wa\320ap\320pq\330Wa\320ap\320pq\330Wa\320ab\320bc\330Wa\320ab\320bc\330Wa\320ae\320ef\330Wa\320ae\320ef\330Wa\320ac\320cd\330Wa\320ac\320cd\330Wa\320aj\320jk\330Wa\320aj\320jk\330Wa\320ac\320cd\330Wa\320aj\320jk\330Wa\320aj\320jk\330Wa\320ai\320ij\330Wa\320ap\320pq\330Wa\320ai\320ij\330Wa\320ap\320pq\330Wa\320ap\320pq\330Wa\320ac\320cd\330Wa\320aj\320jk\330Wa\320aj\320jk\330Wa\320ac\320cd\330Wa\320aj\320jk\330Wa\320aj\320jk\340\0203\3203a\320ab\320bc\330_`\330]^\320^d\320de\320ef\330]^\330]d\320dj\320jk\330]d\320dj\320jk\330]d\320dk\320kl\330]^\330]^\330]g\320gl\320lm\330]g\320gk\320kl\330]^\330]g\320gp\320pq\330]d\320dm\320mn\330]g\320gt\320tu\330]g\320gv\320vw\330]g\320gv\320vw\330]g\320gh\320hi\330]g\320gh\320hi\330]g\320gk\320kl\330]g\320gk\320kl\330]g\320gi\320ij\330]g\320gi\320ij\330]g\320gp\320pq\330]g\320gp\320pq\330]g\320gi\320ij\330]g\320gp\320pq\330]g\320gp\320pq\330]g\320go\320op\330]g\320gv\320vw\330]g\320go\320op\330]g\320gv\320vw\330]g\320gv\320vw\330]g\320gi\320ij\330]g\320gp\320pq\330]g\320gp\320pq\330]g\320gi\320ij\330]g\320gp\320pq\330]g\320gp\320pq\340\010\017\210w\320\026\\\320\\c\320cd\320dt\320tu\200\001\360Z\001\000\005 ""\230r\240\026\240q\250\002\250%\250q\260\001\330\004\026\220b\230\005\230R\230q\360\006\000\005\014\210?\230#\230Q\330\004\007\200\177\220c\230\021\330\010\013\210=\230\003\2301\330\0200\3200a\320ab\320bc\330bc\330bc\320ci\320ij\320jk\330bc\330bi\320io\320op\330bi\320io\320op\330bi\320ip\320pq\330bc\330bc\330bl\320lq\320qr\330bl\320lp\320pq\330bc\330bl\320lu\320uv\330bi\320ir\320rs\330bl\320ly\320yz\330bl\320l{\320{|\330bl\320l{\320{|\330bl\320lm\320mn\330bl\320lm\320mn\330bl\320ln\320no\330bl\320lp\320pq\330bl\320ln\320no\330bl\320lo\320op\330bl\320lu\320uv\330bl\320ln\320no\330bl\320lo\320op\330bl\320lu\320uv\330bl\320lp\320pq\330bl\320lq\320qr\330bl\320lw\320wx\330bl\320lt\320tu\330bl\320l{\320{|\330bl\320lt\320tu\330bl\320l{\320{|\330bl\320ly\320yz\330bl\320ln\320no\330bl\320lo\320op\330bl\320lu\320uv\330bl\320ln\320no\330bl\320lo\320op\330bl\320lu\320uv\330\r\032\230#\230Q\330\0200\3200[\320[\\\320\\]\330\\]\330\\]\320]c\320cd\320de\330\\]\330\\c\320ci\320ij\330\\c\320ci\320ij\330\\c\320cj\320jk\330\\]\330\\]\330\\f\320fk\320kl\330\\f\320fj\320jk\330\\]\330\\f\320fo\320op\330\\c\320cl\320lm\330\\f\320fs\320st\330\\f\320fu\320uv\330\\f\320fu\320uv\330\\f\320fg\320gh\330\\f\320fg\320gh\330\\f\320fh\320hi\330\\f\320fj\320jk\330\\f\320fh\320hi\330\\f\320fi\320ij\330\\f\320fo\320op\330\\f\320fh\320hi\330\\f\320fi\320ij\330\\f\320fo\320op\330\\f\320fj\320jk\330\\f\320fk\320kl\330\\f\320fq\320qr\330\\f\320fn\320no\330\\f\320fu\320uv\330\\f\320fn\320no\330\\f\320fu\320uv\330\\f\320fs\320st\330\\f\320fh\320hi\330\\f\320fi\320ij\330\\f\320fo\320op\330\\f\320fh\320hi\330\\f\320fi\320ij\330\\f\320fo\320op\330\r\032\230#\230Q\330\0200\3200a\320ab\320bc\330bc\330bc\320ci\320ij\320jk\330bk\320kl\320lm\330bi\320io\320op\330bi\320io\320op\330bi\320ip\320pq\330bc\330bc\330bl\320lq\320qr\330bl\320lp\320pq\330bc\330bl\320lu\320uv\330bi\320ir\320rs\330bl\320ly\320yz\330bl\320l{\320{|\330bl\320l{\320{|\330bl\320lm\320mn\330bl\320lm\320mn\330bl\320ln\320no\330bl\320lp\320pq\330bl""\320ln\320no\330bl\320lo\320op\330bl\320lu\320uv\330bl\320ln\320no\330bl\320lo\320op\330bl\320lu\320uv\330bl\320lp\320pq\330bl\320lq\320qr\330bl\320lw\320wx\330bl\320lt\320tu\330bl\320l{\320{|\330bl\320lt\320tu\330bl\320l{\320{|\330bl\320ly\320yz\330bl\320ln\320no\330bl\320lo\320op\330bl\320lu\320uv\330bl\320ln\320no\330bl\320lo\320op\330bl\320lu\320uv\340\0200\3200a\320ab\320bc\330bc\330bc\320ci\320ij\320jk\330bc\330bi\320io\320op\330bi\320io\320op\330bi\320ip\320pq\330bc\330bc\330bl\320lq\320qr\330bl\320lp\320pq\330bc\330bl\320lu\320uv\330bi\320ir\320rs\330bl\320ly\320yz\330bl\320l{\320{|\330bl\320l{\320{|\330bl\320lm\320mn\330bl\320lm\320mn\330bl\320ln\320no\330bl\320lp\320pq\330bl\320ln\320no\330bl\320lo\320op\330bl\320lu\320uv\330bl\320ln\320no\330bl\320lo\320op\330bl\320lu\320uv\330bl\320lp\320pq\330bl\320lq\320qr\330bl\320lw\320wx\330bl\320lt\320tu\330bl\320l{\320{|\330bl\320lt\320tu\330bl\320l{\320{|\330bl\320ly\320yz\330bl\320ln\320no\330bl\320lo\320op\330bl\320lu\320uv\330bl\320ln\320no\330bl\320lo\320op\330bl\320lu\320uv\330\t\030\230\003\2301\330\010\013\210=\230\003\2301\330\0200\3200^\320^_\320_`\330_`\330_`\320`f\320fg\320gh\330_`\330_f\320fl\320lm\330_f\320fl\320lm\330_f\320fm\320mn\330_`\330_`\330_i\320in\320no\330_i\320im\320mn\330_`\330_i\320ir\320rs\330_f\320fo\320op\330_i\320iv\320vw\330_i\320ix\320xy\330_i\320ix\320xy\330_i\320ij\320jk\330_i\320ij\320jk\330_i\320ik\320kl\330_i\320im\320mn\330_i\320ik\320kl\330_i\320il\320lm\330_i\320ir\320rs\330_i\320ik\320kl\330_i\320il\320lm\330_i\320ir\320rs\330_i\320im\320mn\330_i\320in\320no\330_i\320it\320tu\330_i\320iq\320qr\330_i\320ix\320xy\330_i\320iq\320qr\330_i\320ix\320xy\330_i\320iv\320vw\330_i\320ik\320kl\330_i\320il\320lm\330_i\320ir\320rs\330_i\320ik\320kl\330_i\320il\320lm\330_i\320ir\320rs\330\r\032\230#\230Q\330\0200\3200X\320XY\320YZ\330YZ\330YZ\320Z`\320`a\320ab\330YZ\330Y`\320`f\320fg\330Y`\320`f\320fg\330Y`\320`g\320gh\330YZ\330YZ\330Yc\320ch\320hi\330Yc\320cg\320gh\330YZ\330Yc\320cl""\320lm\330Y`\320`i\320ij\330Yc\320cp\320pq\330Yc\320cr\320rs\330Yc\320cr\320rs\330Yc\320cd\320de\330Yc\320cd\320de\330Yc\320ce\320ef\330Yc\320cg\320gh\330Yc\320ce\320ef\330Yc\320cf\320fg\330Yc\320cl\320lm\330Yc\320ce\320ef\330Yc\320cf\320fg\330Yc\320cl\320lm\330Yc\320cg\320gh\330Yc\320ch\320hi\330Yc\320cn\320no\330Yc\320ck\320kl\330Yc\320cr\320rs\330Yc\320ck\320kl\330Yc\320cr\320rs\330Yc\320cp\320pq\330Yc\320ce\320ef\330Yc\320cf\320fg\330Yc\320cl\320lm\330Yc\320ce\320ef\330Yc\320cf\320fg\330Yc\320cl\320lm\330\r\032\230#\230Q\330\0200\3200^\320^_\320_`\330_`\330_`\320`f\320fg\320gh\330_h\320hi\320ij\330_f\320fl\320lm\330_f\320fl\320lm\330_f\320fm\320mn\330_`\330_`\330_i\320in\320no\330_i\320im\320mn\330_`\330_i\320ir\320rs\330_f\320fo\320op\330_i\320iv\320vw\330_i\320ix\320xy\330_i\320ix\320xy\330_i\320ij\320jk\330_i\320ij\320jk\330_i\320ik\320kl\330_i\320im\320mn\330_i\320ik\320kl\330_i\320il\320lm\330_i\320ir\320rs\330_i\320ik\320kl\330_i\320il\320lm\330_i\320ir\320rs\330_i\320im\320mn\330_i\320in\320no\330_i\320it\320tu\330_i\320iq\320qr\330_i\320ix\320xy\330_i\320iq\320qr\330_i\320ix\320xy\330_i\320iv\320vw\330_i\320ik\320kl\330_i\320il\320lm\330_i\320ir\320rs\330_i\320ik\320kl\330_i\320il\320lm\330_i\320ir\320rs\340\0200\3200^\320^_\320_`\330_`\330_`\320`f\320fg\320gh\330_`\330_f\320fl\320lm\330_f\320fl\320lm\330_f\320fm\320mn\330_`\330_`\330_i\320in\320no\330_i\320im\320mn\330_`\330_i\320ir\320rs\330_f\320fo\320op\330_i\320iv\320vw\330_i\320ix\320xy\330_i\320ix\320xy\330_i\320ij\320jk\330_i\320ij\320jk\330_i\320ik\320kl\330_i\320im\320mn\330_i\320ik\320kl\330_i\320il\320lm\330_i\320ir\320rs\330_i\320ik\320kl\330_i\320il\320lm\330_i\320ir\320rs\330_i\320im\320mn\330_i\320in\320no\330_i\320it\320tu\330_i\320iq\320qr\330_i\320ix\320xy\330_i\320iq\320qr\330_i\320ix\320xy\330_i\320iv\320vw\330_i\320ik\320kl\330_i\320il\320lm\330_i\320ir\320rs\330_i\320ik\320kl\330_i\320il\320lm\330_i\320ir\320rs\340\010\017\210w\320\026\\\320\\c\320cd\320dt\320tu\200\001\360h\001""\000\005 \230r\240\026\240q\250\002\250%\250q\260\001\330\004\026\220b\230\005\230R\230q\330\004\013\210?\230#\230Q\330\004\007\200\177\220c\230\021\330\010\013\210=\230\003\2301\330\020A\320Ar\320rs\360\000\000t\001H\002\360\000\000H\002I\002\330st\330st\320tz\320z{\320{|\330st\330sz\360\000\000{\001A\002\360\000\000A\002B\002\330sz\360\000\000{\001A\002\360\000\000A\002B\002\330sz\360\000\000{\001B\002\360\000\000B\002C\002\330st\330st\330s}\360\000\000~\001C\002\360\000\000C\002D\002\330s}\360\000\000~\001B\002\360\000\000B\002C\002\330st\330s}\360\000\000~\001G\002\360\000\000G\002H\002\330sz\360\000\000{\001D\002\360\000\000D\002E\002\330s}\360\000\000~\001K\002\360\000\000K\002L\002\330s}\360\000\000~\001M\002\360\000\000M\002N\002\330s}\360\000\000~\001M\002\360\000\000M\002N\002\330s}\320}~\320~\177\330s}\320}~\320~\177\330s}\320}\177\360\000\000@\002A\002\330s}\360\000\000~\001B\002\360\000\000B\002C\002\330s}\320}\177\360\000\000@\002A\002\330s}\360\000\000~\001A\002\360\000\000A\002B\002\330s}\360\000\000~\001G\002\360\000\000G\002H\002\330s}\320}\177\360\000\000@\002A\002\330s}\360\000\000~\001A\002\360\000\000A\002B\002\330s}\360\000\000~\001G\002\360\000\000G\002H\002\330s}\360\000\000~\001B\002\360\000\000B\002C\002\330s}\360\000\000~\001C\002\360\000\000C\002D\002\330s}\360\000\000~\001I\002\360\000\000I\002J\002\330s}\360\000\000~\001F\002\360\000\000F\002G\002\330s}\360\000\000~\001M\002\360\000\000M\002N\002\330s}\360\000\000~\001F\002\360\000\000F\002G\002\330s}\360\000\000~\001M\002\360\000\000M\002N\002\330s}\360\000\000~\001K\002\360\000\000K\002L\002\330s}\320}\177\360\000\000@\002A\002\330s}\360\000\000~\001E\002\360\000\000E\002F\002\330s}\360\000\000~\001G\002\360\000\000G\002H\002\330s}\320}\177\360\000\000@\002A\002\330s}\360\000\000~\001E\002\360\000\000E\002F\002\330s}\360\000\000~\001G\002\360\000\000G\002H\002\330s}\320}\177\360\000\000@\002A\002\330s}\360\000\000~\001A\002\360\000\000A\002B\002\330s}\360\000\000~\001G\002\360\000""\000G\002H\002\330s}\320}\177\360\000\000@\002A\002\330s}\360\000\000~\001A\002\360\000\000A\002B\002\330s}\360\000\000~\001G\002\360\000\000G\002H\002\330\r\032\230#\230Q\330\020A\320Al\320lm\360\000\000n\001B\002\360\000\000B\002C\002\330mn\330mn\320nt\320tu\320uv\330mn\330mt\320tz\320z{\330mt\320tz\320z{\330mt\320t{\320{|\330mn\330mn\330mw\320w|\320|}\330mw\320w{\320{|\330mn\330mw\360\000\000x\001A\002\360\000\000A\002B\002\330mt\320t}\320}~\330mw\360\000\000x\001E\002\360\000\000E\002F\002\330mw\360\000\000x\001G\002\360\000\000G\002H\002\330mw\360\000\000x\001G\002\360\000\000G\002H\002\330mw\320wx\320xy\330mw\320wx\320xy\330mw\320wy\320yz\330mw\320w{\320{|\330mw\320wy\320yz\330mw\320wz\320z{\330mw\360\000\000x\001A\002\360\000\000A\002B\002\330mw\320wy\320yz\330mw\320wz\320z{\330mw\360\000\000x\001A\002\360\000\000A\002B\002\330mw\320w{\320{|\330mw\320w|\320|}\330mw\360\000\000x\001C\002\360\000\000C\002D\002\330mw\320w\177\360\000\000@\002A\002\330mw\360\000\000x\001G\002\360\000\000G\002H\002\330mw\320w\177\360\000\000@\002A\002\330mw\360\000\000x\001G\002\360\000\000G\002H\002\330mw\360\000\000x\001E\002\360\000\000E\002F\002\330mw\320wy\320yz\330mw\320w~\320~\177\330mw\360\000\000x\001A\002\360\000\000A\002B\002\330mw\320wy\320yz\330mw\320w~\320~\177\330mw\360\000\000x\001A\002\360\000\000A\002B\002\330mw\320wy\320yz\330mw\320wz\320z{\330mw\360\000\000x\001A\002\360\000\000A\002B\002\330mw\320wy\320yz\330mw\320wz\320z{\330mw\360\000\000x\001A\002\360\000\000A\002B\002\340\020A\320Ar\320rs\360\000\000t\001H\002\360\000\000H\002I\002\330st\330st\320tz\320z{\320{|\330st\330sz\360\000\000{\001A\002\360\000\000A\002B\002\330sz\360\000\000{\001A\002\360\000\000A\002B\002\330sz\360\000\000{\001B\002\360\000\000B\002C\002\330st\330st\330s}\360\000\000~\001C\002\360\000\000C\002D\002\330s}\360\000\000~\001B\002\360\000\000B\002C\002\330st\330s}\360\000\000~\001G\002\360\000\000G\002H\002\330sz\360\000\000{\001D\002\360\000\000D\002E\002\330s}\360\000\000~\001K\002""\360\000\000K\002L\002\330s}\360\000\000~\001M\002\360\000\000M\002N\002\330s}\360\000\000~\001M\002\360\000\000M\002N\002\330s}\320}~\320~\177\330s}\320}~\320~\177\330s}\320}\177\360\000\000@\002A\002\330s}\360\000\000~\001B\002\360\000\000B\002C\002\330s}\320}\177\360\000\000@\002A\002\330s}\360\000\000~\001A\002\360\000\000A\002B\002\330s}\360\000\000~\001G\002\360\000\000G\002H\002\330s}\320}\177\360\000\000@\002A\002\330s}\360\000\000~\001A\002\360\000\000A\002B\002\330s}\360\000\000~\001G\002\360\000\000G\002H\002\330s}\360\000\000~\001B\002\360\000\000B\002C\002\330s}\360\000\000~\001C\002\360\000\000C\002D\002\330s}\360\000\000~\001I\002\360\000\000I\002J\002\330s}\360\000\000~\001F\002\360\000\000F\002G\002\330s}\360\000\000~\001M\002\360\000\000M\002N\002\330s}\360\000\000~\001F\002\360\000\000F\002G\002\330s}\360\000\000~\001M\002\360\000\000M\002N\002\330s}\360\000\000~\001K\002\360\000\000K\002L\002\330s}\320}\177\360\000\000@\002A\002\330s}\360\000\000~\001E\002\360\000\000E\002F\002\330s}\360\000\000~\001G\002\360\000\000G\002H\002\330s}\320}\177\360\000\000@\002A\002\330s}\360\000\000~\001E\002\360\000\000E\002F\002\330s}\360\000\000~\001G\002\360\000\000G\002H\002\330s}\320}\177\360\000\000@\002A\002\330s}\360\000\000~\001A\002\360\000\000A\002B\002\330s}\360\000\000~\001G\002\360\000\000G\002H\002\330s}\320}\177\360\000\000@\002A\002\330s}\360\000\000~\001A\002\360\000\000A\002B\002\330s}\360\000\000~\001G\002\360\000\000G\002H\002\330\t\030\230\003\2301\330\010\013\210=\230\003\2301\330\020A\320Ai\320ij\320j~\320~\177\330jk\330jk\320kq\320qr\320rs\330jk\330jq\320qw\320wx\330jq\320qw\320wx\330jq\320qx\320xy\330jk\330jk\330jt\320ty\320yz\330jt\320tx\320xy\330jk\330jt\320t}\320}~\330jq\320qz\320z{\330jt\360\000\000u\001B\002\360\000\000B\002C\002\330jt\360\000\000u\001D\002\360\000\000D\002E\002\330jt\360\000\000u\001D\002\360\000\000D\002E\002\330jt\320tu\320uv\330jt\320tu\320uv\330jt\320tv\320vw\330jt\320tx\320xy\330jt\320tv\320vw\330jt\320tw\320wx""\330jt\320t}\320}~\330jt\320tv\320vw\330jt\320tw\320wx\330jt\320t}\320}~\330jt\320tx\320xy\330jt\320ty\320yz\330jt\320t\177\360\000\000@\002A\002\330jt\320t|\320|}\330jt\360\000\000u\001D\002\360\000\000D\002E\002\330jt\320t|\320|}\330jt\360\000\000u\001D\002\360\000\000D\002E\002\330jt\360\000\000u\001B\002\360\000\000B\002C\002\330jt\320tv\320vw\330jt\320t{\320{|\330jt\320t}\320}~\330jt\320tv\320vw\330jt\320t{\320{|\330jt\320t}\320}~\330jt\320tv\320vw\330jt\320tw\320wx\330jt\320t}\320}~\330jt\320tv\320vw\330jt\320tw\320wx\330jt\320t}\320}~\340\020A\320Ao\320op\360\000\000q\001E\002\360\000\000E\002F\002\330pq\330pq\320qw\320wx\320xy\330pq\330pw\320w}\320}~\330pw\320w}\320}~\330pw\320w~\320~\177\330pq\330pq\330pz\320z\177\360\000\000@\002A\002\330pz\320z~\320~\177\330pq\330pz\360\000\000{\001D\002\360\000\000D\002E\002\330pw\360\000\000x\001A\002\360\000\000A\002B\002\330pz\360\000\000{\001H\002\360\000\000H\002I\002\330pz\360\000\000{\001J\002\360\000\000J\002K\002\330pz\360\000\000{\001J\002\360\000\000J\002K\002\330pz\320z{\320{|\330pz\320z{\320{|\330pz\320z|\320|}\330pz\320z~\320~\177\330pz\320z|\320|}\330pz\320z}\320}~\330pz\360\000\000{\001D\002\360\000\000D\002E\002\330pz\320z|\320|}\330pz\320z}\320}~\330pz\360\000\000{\001D\002\360\000\000D\002E\002\330pz\320z~\320~\177\330pz\320z\177\360\000\000@\002A\002\330pz\360\000\000{\001F\002\360\000\000F\002G\002\330pz\360\000\000{\001C\002\360\000\000C\002D\002\330pz\360\000\000{\001J\002\360\000\000J\002K\002\330pz\360\000\000{\001C\002\360\000\000C\002D\002\330pz\360\000\000{\001J\002\360\000\000J\002K\002\330pz\360\000\000{\001H\002\360\000\000H\002I\002\330pz\320z|\320|}\330pz\360\000\000{\001B\002\360\000\000B\002C\002\330pz\360\000\000{\001D\002\360\000\000D\002E\002\330pz\320z|\320|}\330pz\360\000\000{\001B\002\360\000\000B\002C\002\330pz\360\000\000{\001D\002\360\000\000D\002E\002\330pz\320z|\320|}\330pz\320z}\320}~\330pz\360\000\000{\001D\002\360\000\000D\002E\002\330pz\320z|\320|}\330pz\320z}\320}~\330pz""\360\000\000{\001D\002\360\000\000D\002E\002\340\010\017\210w\320\026\\\320\\c\320cd\320dt\320tu";
13275 PyObject *data = NULL;
13276 #define __Pyx_DecompressString_UNUSED
13277 #define __Pyx_DecompressString_LZSS_UNUSED
13278 #endif
13279 PyObject **stringtab = __pyx_mstate->__pyx_string_tab;
13280 Py_ssize_t pos = 0;
13281 for (int i = 0; i < 113; i++) {
13282 Py_ssize_t bytes_length = str_length_index[i].length;
13283 PyObject *string = PyUnicode_DecodeUTF8(bytes + pos, bytes_length, NULL);
13284 if (likely(string) && i >= 7) PyUnicode_InternInPlace(&string);
13285 if (unlikely(!string)) {
13286 Py_XDECREF(data);
13287 __PYX_ERR(0, 1, __pyx_L1_error)
13288 }
13289 stringtab[i] = string;
13290 pos += bytes_length;
13291 }
13292 for (int i = 113; i < 124; i++) {
13293 Py_ssize_t bytes_length = bytes_length_index[i-113].length;
13294 PyObject *string = PyBytes_FromStringAndSize(bytes + pos, bytes_length);
13295 stringtab[i] = string;
13296 pos += bytes_length;
13297 if (unlikely(!string)) {
13298 Py_XDECREF(data);
13299 __PYX_ERR(0, 1, __pyx_L1_error)
13300 }
13301 }
13302 Py_XDECREF(data);
13303 for (Py_ssize_t i = 0; i < 124; i++) {
13304 if (unlikely(PyObject_Hash(stringtab[i]) == -1)) {
13305 __PYX_ERR(0, 1, __pyx_L1_error)
13306 }
13307 }
13308 #if CYTHON_IMMORTAL_CONSTANTS
13309 {
13310 PyObject **table = stringtab + 113;
13311 for (Py_ssize_t i=0; i<11; ++i) {
13312 #if PY_VERSION_HEX >= 0x030F0000
13313 PyUnstable_SetImmortal(table[i]);
13314 #elif CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
13315 if ((PY_SSIZE_T_MAX <= _Py_IMMORTAL_REFCNT_LOCAL)) break;
13316 #if PY_VERSION_HEX < 0x030E0000
13317 if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1)
13318 #else
13319 if (PyUnstable_Object_IsUniquelyReferenced(table[i]))
13320 #endif
13321 {
13322 Py_SET_REFCNT(table[i], ((Py_ssize_t)_Py_IMMORTAL_REFCNT_LOCAL + 1));
13323 }
13324 #else
13325 if ((PY_SSIZE_T_MAX < _Py_IMMORTAL_INITIAL_REFCNT)) break;
13326 Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT);
13327 #endif
13328 }
13329 }
13330 #endif
13331 }
13332 return 0;
13333 __pyx_L1_error:;
13334 return -1;
13335}
13336/* #### Code section: init_codeobjects ### */
13337#ifdef __cplusplus
13338namespace {
13339#endif
13340typedef struct {
13341 unsigned int argcount : 6;
13342 unsigned int num_posonly_args : 1;
13343 unsigned int num_kwonly_args : 1;
13344 unsigned int nlocals : 6;
13345 unsigned int flags : 10;
13346 unsigned int first_line : 11;
13347} __Pyx_PyCode_New_function_description;
13348#ifdef __cplusplus
13349} /* anonymous namespace */
13350#endif
13351/* NewCodeObj.proto */
13352static PyObject* __Pyx_PyCode_New(
13353 const __Pyx_PyCode_New_function_description descr,
13354 PyObject * const *varnames,
13355 PyObject *filename,
13356 PyObject *funcname,
13357 PyObject *line_table,
13358 PyObject *tuple_dedup_map
13359);
13360
13361
13362static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) {
13363 PyObject* tuple_dedup_map = PyDict_New();
13364 if (unlikely(!tuple_dedup_map)) return -1;
13365 {
13366 const __Pyx_PyCode_New_function_description descr = {40, 0, 0, 42, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 33};
13367 PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pskModelFlag, __pyx_mstate->__pyx_n_u_density_w_flag, __pyx_mstate->__pyx_n_u_density_n_flag, __pyx_mstate->__pyx_n_u_rowptr, __pyx_mstate->__pyx_n_u_colind, __pyx_mstate->__pyx_n_u_matType, __pyx_mstate->__pyx_n_u_muw, __pyx_mstate->__pyx_n_u_mun, __pyx_mstate->__pyx_n_u_omega, __pyx_mstate->__pyx_n_u_Kbar, __pyx_mstate->__pyx_n_u_b, __pyx_mstate->__pyx_n_u_rwork_psk, __pyx_mstate->__pyx_n_u_iwork_psk, __pyx_mstate->__pyx_n_u_rwork_psk_tol, __pyx_mstate->__pyx_n_u_rwork_density_w, __pyx_mstate->__pyx_n_u_rwork_density_n, __pyx_mstate->__pyx_n_u_g, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_sw, __pyx_mstate->__pyx_n_u_psiw, __pyx_mstate->__pyx_n_u_mw, __pyx_mstate->__pyx_n_u_dmw, __pyx_mstate->__pyx_n_u_dmw_dpsiw, __pyx_mstate->__pyx_n_u_mn, __pyx_mstate->__pyx_n_u_dmn, __pyx_mstate->__pyx_n_u_dmn_dpsiw, __pyx_mstate->__pyx_n_u_psin, __pyx_mstate->__pyx_n_u_dpsin, __pyx_mstate->__pyx_n_u_dpsin_dpsiw, __pyx_mstate->__pyx_n_u_phi_psiw, __pyx_mstate->__pyx_n_u_dphi_psiw_dpsiw, __pyx_mstate->__pyx_n_u_phi_psin, __pyx_mstate->__pyx_n_u_dphi_psin_dpsiw, __pyx_mstate->__pyx_n_u_dphi_psin_dsw, __pyx_mstate->__pyx_n_u_aw, __pyx_mstate->__pyx_n_u_daw, __pyx_mstate->__pyx_n_u_daw_dpsiw, __pyx_mstate->__pyx_n_u_an, __pyx_mstate->__pyx_n_u_dan, __pyx_mstate->__pyx_n_u_dan_dpsiw, __pyx_mstate->__pyx_n_u_nPointsPerSimplex, __pyx_mstate->__pyx_n_u_nSimplex};
13368 __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_cTwophaseDarcyCoefficien, __pyx_mstate->__pyx_n_u_twophaseDarcy_fc_sd_het_matType, __pyx_mstate->__pyx_kp_b_iso88591_Z_r_q_q_b_Rq_Q_c_1_00aabbcbcbcc, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad;
13369 }
13370 {
13371 const __Pyx_PyCode_New_function_description descr = {47, 0, 0, 49, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 424};
13372 PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pskModelFlag, __pyx_mstate->__pyx_n_u_density_w_flag, __pyx_mstate->__pyx_n_u_density_n_flag, __pyx_mstate->__pyx_n_u_rowptr, __pyx_mstate->__pyx_n_u_colind, __pyx_mstate->__pyx_n_u_matType, __pyx_mstate->__pyx_n_u_muw, __pyx_mstate->__pyx_n_u_mun, __pyx_mstate->__pyx_n_u_omega, __pyx_mstate->__pyx_n_u_Kbar, __pyx_mstate->__pyx_n_u_b, __pyx_mstate->__pyx_n_u_rwork_psk, __pyx_mstate->__pyx_n_u_iwork_psk, __pyx_mstate->__pyx_n_u_rwork_psk_tol, __pyx_mstate->__pyx_n_u_rwork_density_w, __pyx_mstate->__pyx_n_u_rwork_density_n, __pyx_mstate->__pyx_n_u_g, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_sw, __pyx_mstate->__pyx_n_u_psiw, __pyx_mstate->__pyx_n_u_mw, __pyx_mstate->__pyx_n_u_dmw, __pyx_mstate->__pyx_n_u_dmw_dpsiw, __pyx_mstate->__pyx_n_u_mn, __pyx_mstate->__pyx_n_u_dmn, __pyx_mstate->__pyx_n_u_dmn_dpsiw, __pyx_mstate->__pyx_n_u_psin, __pyx_mstate->__pyx_n_u_dpsin, __pyx_mstate->__pyx_n_u_dpsin_dpsiw, __pyx_mstate->__pyx_n_u_phi_psiw, __pyx_mstate->__pyx_n_u_dphi_psiw_dpsiw, __pyx_mstate->__pyx_n_u_phi_psin, __pyx_mstate->__pyx_n_u_dphi_psin_dpsiw, __pyx_mstate->__pyx_n_u_dphi_psin_dsw, __pyx_mstate->__pyx_n_u_fw, __pyx_mstate->__pyx_n_u_dfw_dsw, __pyx_mstate->__pyx_n_u_dfw_dpsiw, __pyx_mstate->__pyx_n_u_fn, __pyx_mstate->__pyx_n_u_dfn_dsw, __pyx_mstate->__pyx_n_u_dfn_dpsiw, __pyx_mstate->__pyx_n_u_aw, __pyx_mstate->__pyx_n_u_daw, __pyx_mstate->__pyx_n_u_daw_dpsiw, __pyx_mstate->__pyx_n_u_an, __pyx_mstate->__pyx_n_u_dan, __pyx_mstate->__pyx_n_u_dan_dpsiw, __pyx_mstate->__pyx_n_u_compressibilityFlag, __pyx_mstate->__pyx_n_u_nPointsPerSimplex, __pyx_mstate->__pyx_n_u_nSimplex};
13373 __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_cTwophaseDarcyCoefficien, __pyx_mstate->__pyx_n_u_twophaseDarcy_fc_sd_het_matType_2, __pyx_mstate->__pyx_kp_b_iso88591_h_r_q_q_b_Rq_Q_c_1_AArrs_t_H_H, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad;
13374 }
13375 {
13376 const __Pyx_PyCode_New_function_description descr = {38, 0, 0, 40, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 724};
13377 PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pskModelFlag, __pyx_mstate->__pyx_n_u_density_w_flag, __pyx_mstate->__pyx_n_u_density_n_flag, __pyx_mstate->__pyx_n_u_rowptr, __pyx_mstate->__pyx_n_u_colind, __pyx_mstate->__pyx_n_u_matType, __pyx_mstate->__pyx_n_u_muw, __pyx_mstate->__pyx_n_u_mun, __pyx_mstate->__pyx_n_u_omega, __pyx_mstate->__pyx_n_u_Kbar, __pyx_mstate->__pyx_n_u_b, __pyx_mstate->__pyx_n_u_rwork_psk, __pyx_mstate->__pyx_n_u_iwork_psk, __pyx_mstate->__pyx_n_u_rwork_psk_tol, __pyx_mstate->__pyx_n_u_rwork_density_w, __pyx_mstate->__pyx_n_u_rwork_density_n, __pyx_mstate->__pyx_n_u_g, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_psiw, __pyx_mstate->__pyx_n_u_psic, __pyx_mstate->__pyx_n_u_sw, __pyx_mstate->__pyx_n_u_mw, __pyx_mstate->__pyx_n_u_dmw_dpsiw, __pyx_mstate->__pyx_n_u_dmw_dpsic, __pyx_mstate->__pyx_n_u_mn, __pyx_mstate->__pyx_n_u_dmn_dpsiw, __pyx_mstate->__pyx_n_u_dmn_dpsic, __pyx_mstate->__pyx_n_u_phi_psiw, __pyx_mstate->__pyx_n_u_dphi_psiw_dpsiw, __pyx_mstate->__pyx_n_u_phi_psin, __pyx_mstate->__pyx_n_u_dphi_psin_dpsiw, __pyx_mstate->__pyx_n_u_dphi_psin_dpsic, __pyx_mstate->__pyx_n_u_aw, __pyx_mstate->__pyx_n_u_daw_dpsiw, __pyx_mstate->__pyx_n_u_daw_dpsic, __pyx_mstate->__pyx_n_u_an, __pyx_mstate->__pyx_n_u_dan_dpsiw, __pyx_mstate->__pyx_n_u_dan_dpsic, __pyx_mstate->__pyx_n_u_nPointsPerSimplex, __pyx_mstate->__pyx_n_u_nSimplex};
13378 __pyx_mstate_global->__pyx_codeobj_tab[2] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_cTwophaseDarcyCoefficien, __pyx_mstate->__pyx_n_u_twophaseDarcy_fc_pp_sd_het_matTy, __pyx_mstate->__pyx_kp_b_iso88591_V_r_q_q_b_Rq_Q_c_1_33ddeef_a_aa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[2])) goto bad;
13379 }
13380 {
13381 const __Pyx_PyCode_New_function_description descr = {20, 0, 0, 22, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1017};
13382 PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pskModelFlag, __pyx_mstate->__pyx_n_u_rowptr, __pyx_mstate->__pyx_n_u_colind, __pyx_mstate->__pyx_n_u_matType, __pyx_mstate->__pyx_n_u_muw, __pyx_mstate->__pyx_n_u_mun, __pyx_mstate->__pyx_n_u_omega, __pyx_mstate->__pyx_n_u_Kbar, __pyx_mstate->__pyx_n_u_b, __pyx_mstate->__pyx_n_u_capillaryDiffusionScaling, __pyx_mstate->__pyx_n_u_rwork_psk, __pyx_mstate->__pyx_n_u_iwork_psk, __pyx_mstate->__pyx_n_u_rwork_psk_tol, __pyx_mstate->__pyx_n_u_rwork_density_w, __pyx_mstate->__pyx_n_u_rwork_density_n, __pyx_mstate->__pyx_n_u_g, __pyx_mstate->__pyx_n_u_sw, __pyx_mstate->__pyx_n_u_grad_psic, __pyx_mstate->__pyx_n_u_f, __pyx_mstate->__pyx_n_u_a, __pyx_mstate->__pyx_n_u_nPointsPerSimplex, __pyx_mstate->__pyx_n_u_nSimplex};
13383 __pyx_mstate_global->__pyx_codeobj_tab[3] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_cTwophaseDarcyCoefficien, __pyx_mstate->__pyx_n_u_twophaseDarcy_incompressible_spl, __pyx_mstate->__pyx_kp_b_iso88591_4_r_q_q_b_Rq_Cq_G_RSSTNONOvUVVW, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[3])) goto bad;
13384 }
13385 {
13386 const __Pyx_PyCode_New_function_description descr = {30, 0, 0, 32, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1117};
13387 PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pskModelFlag, __pyx_mstate->__pyx_n_u_density_w_flag, __pyx_mstate->__pyx_n_u_density_n_flag, __pyx_mstate->__pyx_n_u_rowptr, __pyx_mstate->__pyx_n_u_colind, __pyx_mstate->__pyx_n_u_matType, __pyx_mstate->__pyx_n_u_muw, __pyx_mstate->__pyx_n_u_mun, __pyx_mstate->__pyx_n_u_omega, __pyx_mstate->__pyx_n_u_Kbar, __pyx_mstate->__pyx_n_u_b, __pyx_mstate->__pyx_n_u_capillaryDiffusionScaling, __pyx_mstate->__pyx_n_u_advectionScaling, __pyx_mstate->__pyx_n_u_rwork_psk, __pyx_mstate->__pyx_n_u_iwork_psk, __pyx_mstate->__pyx_n_u_rwork_psk_tol, __pyx_mstate->__pyx_n_u_rwork_density_w, __pyx_mstate->__pyx_n_u_rwork_density_n, __pyx_mstate->__pyx_n_u_g, __pyx_mstate->__pyx_n_u_qt, __pyx_mstate->__pyx_n_u_psiw, __pyx_mstate->__pyx_n_u_sw, __pyx_mstate->__pyx_n_u_m, __pyx_mstate->__pyx_n_u_dm, __pyx_mstate->__pyx_n_u_phi, __pyx_mstate->__pyx_n_u_dphi, __pyx_mstate->__pyx_n_u_f, __pyx_mstate->__pyx_n_u_df, __pyx_mstate->__pyx_n_u_a, __pyx_mstate->__pyx_n_u_da, __pyx_mstate->__pyx_n_u_nPointsPerSimplex, __pyx_mstate->__pyx_n_u_nSimplex};
13388 __pyx_mstate_global->__pyx_codeobj_tab[4] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_cTwophaseDarcyCoefficien, __pyx_mstate->__pyx_n_u_twophaseDarcy_incompressible_spl_2, __pyx_mstate->__pyx_kp_b_iso88591_F_r_q_q_b_Rq_Q_Cq_MMkkllmghghhn, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[4])) goto bad;
13389 }
13390 {
13391 const __Pyx_PyCode_New_function_description descr = {30, 0, 0, 32, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1254};
13392 PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pskModelFlag, __pyx_mstate->__pyx_n_u_density_w_flag, __pyx_mstate->__pyx_n_u_density_n_flag, __pyx_mstate->__pyx_n_u_rowptr, __pyx_mstate->__pyx_n_u_colind, __pyx_mstate->__pyx_n_u_matType, __pyx_mstate->__pyx_n_u_muw, __pyx_mstate->__pyx_n_u_mun, __pyx_mstate->__pyx_n_u_omega, __pyx_mstate->__pyx_n_u_Kbar, __pyx_mstate->__pyx_n_u_b, __pyx_mstate->__pyx_n_u_capillaryDiffusionScaling, __pyx_mstate->__pyx_n_u_advectionScaling, __pyx_mstate->__pyx_n_u_rwork_psk, __pyx_mstate->__pyx_n_u_iwork_psk, __pyx_mstate->__pyx_n_u_rwork_psk_tol, __pyx_mstate->__pyx_n_u_rwork_density_w, __pyx_mstate->__pyx_n_u_rwork_density_n, __pyx_mstate->__pyx_n_u_g, __pyx_mstate->__pyx_n_u_qt, __pyx_mstate->__pyx_n_u_psiw, __pyx_mstate->__pyx_n_u_sw, __pyx_mstate->__pyx_n_u_m, __pyx_mstate->__pyx_n_u_dm, __pyx_mstate->__pyx_n_u_phi, __pyx_mstate->__pyx_n_u_dphi, __pyx_mstate->__pyx_n_u_f, __pyx_mstate->__pyx_n_u_df, __pyx_mstate->__pyx_n_u_a, __pyx_mstate->__pyx_n_u_da, __pyx_mstate->__pyx_n_u_nPointsPerSimplex, __pyx_mstate->__pyx_n_u_nSimplex};
13393 __pyx_mstate_global->__pyx_codeobj_tab[5] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_cTwophaseDarcyCoefficien, __pyx_mstate->__pyx_n_u_twophaseDarcy_slightCompressible, __pyx_mstate->__pyx_kp_b_iso88591_J_r_q_q_b_Rq_Q_Cq_MMkkllmghghhn, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[5])) goto bad;
13394 }
13395 {
13396 const __Pyx_PyCode_New_function_description descr = {30, 0, 0, 32, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1368};
13397 PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pskModelFlag, __pyx_mstate->__pyx_n_u_density_w_flag, __pyx_mstate->__pyx_n_u_density_n_flag, __pyx_mstate->__pyx_n_u_rowptr, __pyx_mstate->__pyx_n_u_colind, __pyx_mstate->__pyx_n_u_matType, __pyx_mstate->__pyx_n_u_muw, __pyx_mstate->__pyx_n_u_mun, __pyx_mstate->__pyx_n_u_omega, __pyx_mstate->__pyx_n_u_Kbar, __pyx_mstate->__pyx_n_u_b, __pyx_mstate->__pyx_n_u_capillaryDiffusionScaling, __pyx_mstate->__pyx_n_u_advectionScaling, __pyx_mstate->__pyx_n_u_rwork_psk, __pyx_mstate->__pyx_n_u_iwork_psk, __pyx_mstate->__pyx_n_u_rwork_psk_tol, __pyx_mstate->__pyx_n_u_rwork_density_w, __pyx_mstate->__pyx_n_u_rwork_density_n, __pyx_mstate->__pyx_n_u_g, __pyx_mstate->__pyx_n_u_qt, __pyx_mstate->__pyx_n_u_psiw, __pyx_mstate->__pyx_n_u_sw, __pyx_mstate->__pyx_n_u_m, __pyx_mstate->__pyx_n_u_dm, __pyx_mstate->__pyx_n_u_phi, __pyx_mstate->__pyx_n_u_dphi, __pyx_mstate->__pyx_n_u_f, __pyx_mstate->__pyx_n_u_df, __pyx_mstate->__pyx_n_u_a, __pyx_mstate->__pyx_n_u_da, __pyx_mstate->__pyx_n_u_nPointsPerSimplex, __pyx_mstate->__pyx_n_u_nSimplex};
13398 __pyx_mstate_global->__pyx_codeobj_tab[6] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_cTwophaseDarcyCoefficien, __pyx_mstate->__pyx_n_u_twophaseDarcy_slightCompressible_2, __pyx_mstate->__pyx_kp_b_iso88591_6_r_q_q_b_Rq_c_1_LLjjkklfgfggmm, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[6])) goto bad;
13399 }
13400 {
13401 const __Pyx_PyCode_New_function_description descr = {26, 0, 0, 28, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1529};
13402 PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pskModelFlag, __pyx_mstate->__pyx_n_u_density_w_flag, __pyx_mstate->__pyx_n_u_density_n_flag, __pyx_mstate->__pyx_n_u_rowptr, __pyx_mstate->__pyx_n_u_colind, __pyx_mstate->__pyx_n_u_matType, __pyx_mstate->__pyx_n_u_muw, __pyx_mstate->__pyx_n_u_mun, __pyx_mstate->__pyx_n_u_omega, __pyx_mstate->__pyx_n_u_Kbar, __pyx_mstate->__pyx_n_u_b, __pyx_mstate->__pyx_n_u_capillaryDiffusionScaling, __pyx_mstate->__pyx_n_u_rwork_psk, __pyx_mstate->__pyx_n_u_iwork_psk, __pyx_mstate->__pyx_n_u_rwork_psk_tol, __pyx_mstate->__pyx_n_u_rwork_density_w, __pyx_mstate->__pyx_n_u_rwork_density_n, __pyx_mstate->__pyx_n_u_g, __pyx_mstate->__pyx_n_u_sw, __pyx_mstate->__pyx_n_u_psiw, __pyx_mstate->__pyx_n_u_psin, __pyx_mstate->__pyx_n_u_grad_psic, __pyx_mstate->__pyx_n_u_m, __pyx_mstate->__pyx_n_u_dm, __pyx_mstate->__pyx_n_u_f, __pyx_mstate->__pyx_n_u_a, __pyx_mstate->__pyx_n_u_nPointsPerSimplex, __pyx_mstate->__pyx_n_u_nSimplex};
13403 __pyx_mstate_global->__pyx_codeobj_tab[7] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_cTwophaseDarcyCoefficien, __pyx_mstate->__pyx_n_u_twophaseDarcy_compressibleN_spli, __pyx_mstate->__pyx_kp_b_iso88591_2_r_q_q_b_Rq_c_1_JJhhiijdedeekk, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[7])) goto bad;
13404 }
13405 {
13406 const __Pyx_PyCode_New_function_description descr = {30, 0, 0, 32, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1685};
13407 PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pskModelFlag, __pyx_mstate->__pyx_n_u_density_w_flag, __pyx_mstate->__pyx_n_u_density_n_flag, __pyx_mstate->__pyx_n_u_rowptr, __pyx_mstate->__pyx_n_u_colind, __pyx_mstate->__pyx_n_u_matType, __pyx_mstate->__pyx_n_u_muw, __pyx_mstate->__pyx_n_u_mun, __pyx_mstate->__pyx_n_u_omega, __pyx_mstate->__pyx_n_u_Kbar, __pyx_mstate->__pyx_n_u_b, __pyx_mstate->__pyx_n_u_capillaryDiffusionScaling, __pyx_mstate->__pyx_n_u_advectionScaling, __pyx_mstate->__pyx_n_u_rwork_psk, __pyx_mstate->__pyx_n_u_iwork_psk, __pyx_mstate->__pyx_n_u_rwork_psk_tol, __pyx_mstate->__pyx_n_u_rwork_density_w, __pyx_mstate->__pyx_n_u_rwork_density_n, __pyx_mstate->__pyx_n_u_g, __pyx_mstate->__pyx_n_u_qt, __pyx_mstate->__pyx_n_u_psiw, __pyx_mstate->__pyx_n_u_sw, __pyx_mstate->__pyx_n_u_m, __pyx_mstate->__pyx_n_u_dm, __pyx_mstate->__pyx_n_u_phi, __pyx_mstate->__pyx_n_u_dphi, __pyx_mstate->__pyx_n_u_f, __pyx_mstate->__pyx_n_u_df, __pyx_mstate->__pyx_n_u_a, __pyx_mstate->__pyx_n_u_da, __pyx_mstate->__pyx_n_u_nPointsPerSimplex, __pyx_mstate->__pyx_n_u_nSimplex};
13408 __pyx_mstate_global->__pyx_codeobj_tab[8] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_cTwophaseDarcyCoefficien, __pyx_mstate->__pyx_n_u_twophaseDarcy_compressibleN_spli_2, __pyx_mstate->__pyx_kp_b_iso88591_6_r_q_q_b_Rq_c_1_LLjjkklfgfggmm, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[8])) goto bad;
13409 }
13410 {
13411 const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1846};
13412 PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_matType, __pyx_mstate->__pyx_n_u_omega, __pyx_mstate->__pyx_n_u_sw, __pyx_mstate->__pyx_n_u_vol_frac_w, __pyx_mstate->__pyx_n_u_vol_frac_n, __pyx_mstate->__pyx_n_u_nPointsPerSimplex, __pyx_mstate->__pyx_n_u_nSimplex};
13413 __pyx_mstate_global->__pyx_codeobj_tab[9] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_cTwophaseDarcyCoefficien, __pyx_mstate->__pyx_n_u_twophaseDarcy_vol_frac, __pyx_mstate->__pyx_kp_b_iso88591_r_q_q_b_Rq_q_U_Rq_Zq_Zq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[9])) goto bad;
13414 }
13415 {
13416 const __Pyx_PyCode_New_function_description descr = {8, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1866};
13417 PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pskModelFlag, __pyx_mstate->__pyx_n_u_startIndex, __pyx_mstate->__pyx_n_u_calcFlag, __pyx_mstate->__pyx_n_u_domain, __pyx_mstate->__pyx_n_u_rwork_psk, __pyx_mstate->__pyx_n_u_iwork_psk, __pyx_mstate->__pyx_n_u_rwork_psk_tol, __pyx_mstate->__pyx_n_u_splineTable, __pyx_mstate->__pyx_n_u_nknots};
13418 __pyx_mstate_global->__pyx_codeobj_tab[10] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_cTwophaseDarcyCoefficien, __pyx_mstate->__pyx_n_u_generateSplineTables, __pyx_mstate->__pyx_kp_b_iso88591_V6_Cq_AQ_2_2_1_y_2_q_2_Q_c_aq_F, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[10])) goto bad;
13419 }
13420 {
13421 const __Pyx_PyCode_New_function_description descr = {28, 0, 0, 30, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1931};
13422 PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pskModelFlag, __pyx_mstate->__pyx_n_u_rowptr, __pyx_mstate->__pyx_n_u_colind, __pyx_mstate->__pyx_n_u_matType, __pyx_mstate->__pyx_n_u_muw, __pyx_mstate->__pyx_n_u_mun, __pyx_mstate->__pyx_n_u_omega, __pyx_mstate->__pyx_n_u_Kbar, __pyx_mstate->__pyx_n_u_b, __pyx_mstate->__pyx_n_u_capillaryDiffusionScaling, __pyx_mstate->__pyx_n_u_advectionScaling, __pyx_mstate->__pyx_n_u_rwork_psk, __pyx_mstate->__pyx_n_u_iwork_psk, __pyx_mstate->__pyx_n_u_rwork_psk_tol, __pyx_mstate->__pyx_n_u_rwork_density_w, __pyx_mstate->__pyx_n_u_rwork_density_n, __pyx_mstate->__pyx_n_u_g, __pyx_mstate->__pyx_n_u_qt, __pyx_mstate->__pyx_n_u_u, __pyx_mstate->__pyx_n_u_sw, __pyx_mstate->__pyx_n_u_m, __pyx_mstate->__pyx_n_u_dm, __pyx_mstate->__pyx_n_u_phi, __pyx_mstate->__pyx_n_u_dphi, __pyx_mstate->__pyx_n_u_f, __pyx_mstate->__pyx_n_u_df, __pyx_mstate->__pyx_n_u_a, __pyx_mstate->__pyx_n_u_da, __pyx_mstate->__pyx_n_u_nPointsPerSimplex, __pyx_mstate->__pyx_n_u_nSimplex};
13423 __pyx_mstate_global->__pyx_codeobj_tab[11] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_cTwophaseDarcyCoefficien, __pyx_mstate->__pyx_n_u_twophaseDarcy_incompressible_spl_3, __pyx_mstate->__pyx_kp_b_iso88591_2_r_q_q_b_Rq_Cq_LKWXXYSTSTTZZ_S, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[11])) goto bad;
13424 }
13425 Py_DECREF(tuple_dedup_map);
13426 return 0;
13427 bad:
13428 Py_DECREF(tuple_dedup_map);
13429 return -1;
13430}
13431/* #### Code section: init_globals ### */
13432
13433static int __Pyx_InitGlobals(void) {
13434 int __pyx_lineno = 0;
13435 const char *__pyx_filename = NULL;
13436 int __pyx_clineno = 0;
13437 /* PythonCompatibility.init */
13438 if (likely(__Pyx_init_co_variables() == 0 && __Pyx_init_tpflags_variables() == 0)); else
13439
13440 if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
13441
13442 /* AssertionsEnabled.init */
13443 if (likely(__Pyx_init_assertions_enabled() == 0)); else
13444
13445 if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
13446
13447 /* PyFrozenDict.init */
13448 #if CYTHON_COMPILING_IN_LIMITED_API
13449 {
13450 PyObject *builtins = PyEval_GetBuiltins(); // borrowed
13451 if (likely(builtins)) {
13452 PyObject *type_name = PyUnicode_FromStringAndSize("frozendict", sizeof("frozendict")-1);
13453 if (likely(type_name)) {
13454 PyObject *frozendict_type = PyObject_GetItem(builtins, type_name);
13455 Py_DECREF(type_name);
13456 if (!frozendict_type && PyErr_ExceptionMatches(PyExc_KeyError)) {
13457 PyErr_Clear();
13458 frozendict_type = (PyObject*) &PyDict_Type;
13459 Py_INCREF(frozendict_type);
13460 }
13461 __pyx_mstate_global->__Pyx_PyFrozenDictType = frozendict_type;
13462 }
13463 }
13464 } // error handling follows
13465 #endif
13466
13467 if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
13468
13469 /* NumpyImportArray.init */
13470 /*
13471 * Cython has automatically inserted a call to _import_array since
13472 * you didn't include one when you cimported numpy. To disable this
13473 * add the line
13474 * <void>numpy._import_array
13475 */
13476 #ifdef NPY_FEATURE_VERSION
13477 #ifndef NO_IMPORT_ARRAY
13478 if (unlikely(_import_array() == -1)) {
13479 PyErr_SetString(PyExc_ImportError, "numpy.core.multiarray failed to import "
13480 "(auto-generated because you didn't call 'numpy.import_array()' after cimporting numpy; "
13481 "use '<void>numpy._import_array' to disable if you are certain you don't need it).");
13482 }
13483 #endif
13484 #endif
13485
13486 if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
13487
13488 /* CommonTypesMetaclass.init */
13489 if (likely(__pyx_CommonTypesMetaclass_init(__pyx_m) == 0)); else
13490
13491 if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
13492
13493 /* CachedMethodType.init */
13494 #if CYTHON_COMPILING_IN_LIMITED_API
13495 {
13496 PyObject *typesModule=NULL;
13497 typesModule = PyImport_ImportModule("types");
13498 if (typesModule) {
13499 __pyx_mstate_global->__Pyx_CachedMethodType = PyObject_GetAttrString(typesModule, "MethodType");
13500 Py_DECREF(typesModule);
13501 }
13502 } // error handling follows
13503 #endif
13504
13505 if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
13506
13507 return 0;
13508 __pyx_L1_error:;
13509 return -1;
13510}
13511/* #### Code section: init_after_shared_utility ### */
13512
13513static int __Pyx_InitAfterSharedUtility(void) {
13514 int __pyx_lineno = 0;
13515 const char *__pyx_filename = NULL;
13516 int __pyx_clineno = 0;
13517 /* CythonFunctionPerModule.init */
13518 if (likely(__pyx_CyFunction_init(__pyx_m) == 0)); else
13519
13520 if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
13521
13522 return 0;
13523 __pyx_L1_error:;
13524 return -1;
13525}
13526/* #### Code section: cleanup_globals ### */
13527/* #### Code section: cleanup_module ### */
13528/* #### Code section: main_method ### */
13529/* #### Code section: utility_code_pragmas ### */
13530#ifdef _MSC_VER
13531#pragma warning( push )
13532/* Warning 4127: conditional expression is constant
13533 * Cython uses constant conditional expressions to allow in inline functions to be optimized at
13534 * compile-time, so this warning is not useful
13535 */
13536#pragma warning( disable : 4127 )
13537#endif
13538
13539
13540
13541/* #### Code section: utility_code_def ### */
13542
13543/* --- Runtime support code --- */
13544/* Refnanny */
13545#if CYTHON_REFNANNY
13546static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
13547 PyObject *m = NULL, *p = NULL;
13548 void *r = NULL;
13549 m = PyImport_ImportModule(modname);
13550 if (!m) goto end;
13551 p = PyObject_GetAttrString(m, "RefNannyAPI");
13552 if (!p) goto end;
13553 r = PyLong_AsVoidPtr(p);
13554end:
13555 Py_XDECREF(p);
13556 Py_XDECREF(m);
13557 return (__Pyx_RefNannyAPIStruct *)r;
13558}
13559#endif
13560
13561/* GetTopmostException (used by SaveResetException) */
13562#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
13563static _PyErr_StackItem *
13564__Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
13565{
13566 _PyErr_StackItem *exc_info = tstate->exc_info;
13567 while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) &&
13568 exc_info->previous_item != NULL)
13569 {
13570 exc_info = exc_info->previous_item;
13571 }
13572 return exc_info;
13573}
13574#endif
13575
13576/* SaveResetException */
13577#if CYTHON_FAST_THREAD_STATE
13578static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
13579 #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
13580 _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
13581 PyObject *exc_value = exc_info->exc_value;
13582 if (exc_value == NULL || exc_value == Py_None) {
13583 *value = NULL;
13584 *type = NULL;
13585 *tb = NULL;
13586 } else {
13587 *value = exc_value;
13588 Py_INCREF(*value);
13589 *type = (PyObject*) Py_TYPE(exc_value);
13590 Py_INCREF(*type);
13591 *tb = PyException_GetTraceback(exc_value);
13592 }
13593 #elif CYTHON_USE_EXC_INFO_STACK
13594 _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
13595 *type = exc_info->exc_type;
13596 *value = exc_info->exc_value;
13597 *tb = exc_info->exc_traceback;
13598 Py_XINCREF(*type);
13599 Py_XINCREF(*value);
13600 Py_XINCREF(*tb);
13601 #else
13602 *type = tstate->exc_type;
13603 *value = tstate->exc_value;
13604 *tb = tstate->exc_traceback;
13605 Py_XINCREF(*type);
13606 Py_XINCREF(*value);
13607 Py_XINCREF(*tb);
13608 #endif
13609}
13610static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
13611 #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
13612 _PyErr_StackItem *exc_info = tstate->exc_info;
13613 PyObject *tmp_value = exc_info->exc_value;
13614 exc_info->exc_value = value;
13615 Py_XDECREF(tmp_value);
13616 Py_XDECREF(type);
13617 Py_XDECREF(tb);
13618 #else
13619 PyObject *tmp_type, *tmp_value, *tmp_tb;
13620 #if CYTHON_USE_EXC_INFO_STACK
13621 _PyErr_StackItem *exc_info = tstate->exc_info;
13622 tmp_type = exc_info->exc_type;
13623 tmp_value = exc_info->exc_value;
13624 tmp_tb = exc_info->exc_traceback;
13625 exc_info->exc_type = type;
13626 exc_info->exc_value = value;
13627 exc_info->exc_traceback = tb;
13628 #else
13629 tmp_type = tstate->exc_type;
13630 tmp_value = tstate->exc_value;
13631 tmp_tb = tstate->exc_traceback;
13632 tstate->exc_type = type;
13633 tstate->exc_value = value;
13634 tstate->exc_traceback = tb;
13635 #endif
13636 Py_XDECREF(tmp_type);
13637 Py_XDECREF(tmp_value);
13638 Py_XDECREF(tmp_tb);
13639 #endif
13640}
13641#endif
13642
13643/* FastTypeChecks (used by PyException_Check) */
13644#if CYTHON_COMPILING_IN_CPYTHON
13645static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
13646 while (a) {
13647 a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*);
13648 if (a == b)
13649 return 1;
13650 }
13651 return b == &PyBaseObject_Type;
13652}
13653static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
13654 PyObject *mro;
13655 if (a == b) return 1;
13656 mro = a->tp_mro;
13657 if (likely(mro)) {
13658 Py_ssize_t i, n;
13659 n = PyTuple_GET_SIZE(mro);
13660 for (i = 0; i < n; i++) {
13661 if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
13662 return 1;
13663 }
13664 return 0;
13665 }
13666 return __Pyx_InBases(a, b);
13667}
13668static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) {
13669 PyObject *mro;
13670 if (cls == a || cls == b) return 1;
13671 mro = cls->tp_mro;
13672 if (likely(mro)) {
13673 Py_ssize_t i, n;
13674 n = PyTuple_GET_SIZE(mro);
13675 for (i = 0; i < n; i++) {
13676 PyObject *base = PyTuple_GET_ITEM(mro, i);
13677 if (base == (PyObject *)a || base == (PyObject *)b)
13678 return 1;
13679 }
13680 return 0;
13681 }
13682 return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b);
13683}
13684#endif
13685
13686/* PyErrFetchRestore (used by GivenExceptionMatches) */
13687#if CYTHON_FAST_THREAD_STATE
13688static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
13689#if PY_VERSION_HEX >= 0x030C00A6
13690 PyObject *tmp_value;
13691 assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value)));
13692 if (value) {
13693 #if CYTHON_COMPILING_IN_CPYTHON
13694 if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb))
13695 #endif
13696 PyException_SetTraceback(value, tb);
13697 }
13698 tmp_value = tstate->current_exception;
13699 tstate->current_exception = value;
13700 Py_XDECREF(tmp_value);
13701 Py_XDECREF(type);
13702 Py_XDECREF(tb);
13703#else
13704 PyObject *tmp_type, *tmp_value, *tmp_tb;
13705 tmp_type = tstate->curexc_type;
13706 tmp_value = tstate->curexc_value;
13707 tmp_tb = tstate->curexc_traceback;
13708 tstate->curexc_type = type;
13709 tstate->curexc_value = value;
13710 tstate->curexc_traceback = tb;
13711 Py_XDECREF(tmp_type);
13712 Py_XDECREF(tmp_value);
13713 Py_XDECREF(tmp_tb);
13714#endif
13715}
13716static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
13717#if PY_VERSION_HEX >= 0x030C00A6
13718 PyObject* exc_value;
13719 exc_value = tstate->current_exception;
13720 tstate->current_exception = 0;
13721 *value = exc_value;
13722 *type = NULL;
13723 *tb = NULL;
13724 if (exc_value) {
13725 *type = (PyObject*) Py_TYPE(exc_value);
13726 Py_INCREF(*type);
13727 #if CYTHON_COMPILING_IN_CPYTHON
13728 *tb = ((PyBaseExceptionObject*) exc_value)->traceback;
13729 Py_XINCREF(*tb);
13730 #else
13731 *tb = PyException_GetTraceback(exc_value);
13732 #endif
13733 }
13734#else
13735 *type = tstate->curexc_type;
13736 *value = tstate->curexc_value;
13737 *tb = tstate->curexc_traceback;
13738 tstate->curexc_type = 0;
13739 tstate->curexc_value = 0;
13740 tstate->curexc_traceback = 0;
13741#endif
13742}
13743#endif
13744
13745/* GivenExceptionMatches (used by PyErrExceptionMatches) */
13746#if CYTHON_COMPILING_IN_CPYTHON
13747static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
13748 if (exc_type1) {
13749 return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2);
13750 } else {
13751 return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
13752 }
13753}
13754static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
13755 Py_ssize_t i, n;
13756 assert(PyExceptionClass_Check(exc_type));
13757 n = PyTuple_GET_SIZE(tuple);
13758 for (i=0; i<n; i++) {
13759 if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
13760 }
13761 for (i=0; i<n; i++) {
13762 PyObject *t = PyTuple_GET_ITEM(tuple, i);
13763 if (likely(PyExceptionClass_Check(t))) {
13764 if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
13765 } else {
13766 }
13767 }
13768 return 0;
13769}
13770static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
13771 if (likely(err == exc_type)) return 1;
13772 if (likely(PyExceptionClass_Check(err))) {
13773 if (likely(PyExceptionClass_Check(exc_type))) {
13774 return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
13775 } else if (likely(PyTuple_Check(exc_type))) {
13776 return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
13777 } else {
13778 }
13779 }
13780 return PyErr_GivenExceptionMatches(err, exc_type);
13781}
13782static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
13783 assert(PyExceptionClass_Check(exc_type1));
13784 assert(PyExceptionClass_Check(exc_type2));
13785 if (likely(err == exc_type1 || err == exc_type2)) return 1;
13786 if (likely(PyExceptionClass_Check(err))) {
13787 return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
13788 }
13789 return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
13790}
13791#endif
13792
13793/* PyErrExceptionMatches */
13794#if CYTHON_FAST_THREAD_STATE
13795static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
13796 Py_ssize_t i, n;
13797 n = PyTuple_GET_SIZE(tuple);
13798 for (i=0; i<n; i++) {
13799 if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
13800 }
13801 for (i=0; i<n; i++) {
13802 if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
13803 }
13804 return 0;
13805}
13806static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
13807 int result;
13808 PyObject *exc_type;
13809#if PY_VERSION_HEX >= 0x030C00A6
13810 PyObject *current_exception = tstate->current_exception;
13811 if (unlikely(!current_exception)) return 0;
13812 exc_type = (PyObject*) Py_TYPE(current_exception);
13813 if (exc_type == err) return 1;
13814#else
13815 exc_type = tstate->curexc_type;
13816 if (exc_type == err) return 1;
13817 if (unlikely(!exc_type)) return 0;
13818#endif
13819 #if CYTHON_AVOID_BORROWED_REFS
13820 Py_INCREF(exc_type);
13821 #endif
13822 if (unlikely(PyTuple_Check(err))) {
13823 result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
13824 } else {
13825 result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
13826 }
13827 #if CYTHON_AVOID_BORROWED_REFS
13828 Py_DECREF(exc_type);
13829 #endif
13830 return result;
13831}
13832#endif
13833
13834/* GetException */
13835#if CYTHON_FAST_THREAD_STATE
13836static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
13837#else
13838static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
13839#endif
13840{
13841 PyObject *local_type = NULL, *local_value, *local_tb = NULL;
13842#if CYTHON_FAST_THREAD_STATE
13843 PyObject *tmp_type, *tmp_value, *tmp_tb;
13844 #if PY_VERSION_HEX >= 0x030C0000
13845 local_value = tstate->current_exception;
13846 tstate->current_exception = 0;
13847 #else
13848 local_type = tstate->curexc_type;
13849 local_value = tstate->curexc_value;
13850 local_tb = tstate->curexc_traceback;
13851 tstate->curexc_type = 0;
13852 tstate->curexc_value = 0;
13853 tstate->curexc_traceback = 0;
13854 #endif
13855#elif __PYX_LIMITED_VERSION_HEX >= 0x030C0000
13856 local_value = PyErr_GetRaisedException();
13857#else
13858 PyErr_Fetch(&local_type, &local_value, &local_tb);
13859#endif
13860#if __PYX_LIMITED_VERSION_HEX >= 0x030C0000
13861 if (likely(local_value)) {
13862 local_type = (PyObject*) Py_TYPE(local_value);
13863 Py_INCREF(local_type);
13864 local_tb = PyException_GetTraceback(local_value);
13865 }
13866#else
13867 PyErr_NormalizeException(&local_type, &local_value, &local_tb);
13868#if CYTHON_FAST_THREAD_STATE
13869 if (unlikely(tstate->curexc_type))
13870#else
13871 if (unlikely(PyErr_Occurred()))
13872#endif
13873 goto bad;
13874 if (local_tb) {
13875 if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
13876 goto bad;
13877 }
13878#endif // __PYX_LIMITED_VERSION_HEX >= 0x030C0000
13879 Py_XINCREF(local_tb);
13880 Py_XINCREF(local_type);
13881 Py_XINCREF(local_value);
13882 *type = local_type;
13883 *value = local_value;
13884 *tb = local_tb;
13885#if CYTHON_FAST_THREAD_STATE
13886 #if CYTHON_USE_EXC_INFO_STACK
13887 {
13888 _PyErr_StackItem *exc_info = tstate->exc_info;
13889 #if PY_VERSION_HEX >= 0x030B00a4
13890 tmp_value = exc_info->exc_value;
13891 exc_info->exc_value = local_value;
13892 tmp_type = NULL;
13893 tmp_tb = NULL;
13894 Py_XDECREF(local_type);
13895 Py_XDECREF(local_tb);
13896 #else
13897 tmp_type = exc_info->exc_type;
13898 tmp_value = exc_info->exc_value;
13899 tmp_tb = exc_info->exc_traceback;
13900 exc_info->exc_type = local_type;
13901 exc_info->exc_value = local_value;
13902 exc_info->exc_traceback = local_tb;
13903 #endif
13904 }
13905 #else
13906 tmp_type = tstate->exc_type;
13907 tmp_value = tstate->exc_value;
13908 tmp_tb = tstate->exc_traceback;
13909 tstate->exc_type = local_type;
13910 tstate->exc_value = local_value;
13911 tstate->exc_traceback = local_tb;
13912 #endif
13913 Py_XDECREF(tmp_type);
13914 Py_XDECREF(tmp_value);
13915 Py_XDECREF(tmp_tb);
13916#elif __PYX_LIMITED_VERSION_HEX >= 0x030b0000
13917 PyErr_SetHandledException(local_value);
13918 Py_XDECREF(local_value);
13919 Py_XDECREF(local_type);
13920 Py_XDECREF(local_tb);
13921#else
13922 PyErr_SetExcInfo(local_type, local_value, local_tb);
13923#endif
13924 return 0;
13925#if __PYX_LIMITED_VERSION_HEX < 0x030C0000
13926bad:
13927 *type = 0;
13928 *value = 0;
13929 *tb = 0;
13930 Py_XDECREF(local_type);
13931 Py_XDECREF(local_value);
13932 Py_XDECREF(local_tb);
13933 return -1;
13934#endif
13935}
13936
13937/* PyObjectCall (used by PyObjectFastCall) */
13938#if CYTHON_COMPILING_IN_CPYTHON
13939static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
13940 PyObject *result;
13941 ternaryfunc call = Py_TYPE(func)->tp_call;
13942 if (unlikely(!call))
13943 return PyObject_Call(func, arg, kw);
13944 if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
13945 return NULL;
13946 result = (*call)(func, arg, kw);
13947 Py_LeaveRecursiveCall();
13948 if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
13949 PyErr_SetString(
13950 PyExc_SystemError,
13951 "NULL result without error in PyObject_Call");
13952 }
13953 return result;
13954}
13955#endif
13956
13957/* PyObjectCallMethO (used by PyObjectFastCall) */
13958#if CYTHON_COMPILING_IN_CPYTHON
13959static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
13960 PyObject *self, *result;
13961 PyCFunction cfunc;
13962 cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func);
13963 self = __Pyx_CyOrPyCFunction_GET_SELF(func);
13964 if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
13965 return NULL;
13966 result = cfunc(self, arg);
13967 Py_LeaveRecursiveCall();
13968 if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
13969 PyErr_SetString(
13970 PyExc_SystemError,
13971 "NULL result without error in PyObject_Call");
13972 }
13973 return result;
13974}
13975#endif
13976
13977/* PyObjectFastCall */
13978#if CYTHON_COMPILING_IN_LIMITED_API
13979static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs) {
13980 PyObject *argstuple;
13981 PyObject *result = 0;
13982 size_t i;
13983 argstuple = PyTuple_New((Py_ssize_t)nargs);
13984 if (unlikely(!argstuple)) return NULL;
13985 for (i = 0; i < nargs; i++) {
13986 Py_INCREF(args[i]);
13987 if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0)) goto bad;
13988 }
13989 result = __Pyx_PyObject_Call(func, argstuple, kwargs);
13990 bad:
13991 Py_DECREF(argstuple);
13992 return result;
13993}
13994#endif
13995#if CYTHON_VECTORCALL && !(CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY)
13996 #if CYTHON_COMPILING_IN_CPYTHON
13997static CYTHON_INLINE vectorcallfunc __Pyx_PyVectorcall_Function(PyObject *callable) {
13998 PyTypeObject *tp = Py_TYPE(callable);
13999 #if defined(__Pyx_CyFunction_USED)
14000 if (__Pyx_CyFunction_CheckExact(callable)) {
14001 return __Pyx_CyFunction_func_vectorcall(callable);
14002 }
14003 #endif
14004 if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) {
14005 return NULL;
14006 }
14007 assert(PyCallable_Check(callable));
14008 Py_ssize_t offset = tp->tp_vectorcall_offset;
14009 assert(offset > 0);
14010 vectorcallfunc ptr;
14011 memcpy(&ptr, (char *) callable + offset, sizeof(ptr));
14012 return ptr;
14013}
14014 #else
14015 #define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable)
14016 #endif
14017#endif
14018static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwargs) {
14019 Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(nargsf);
14020#if CYTHON_COMPILING_IN_CPYTHON
14021 if (nargs == 0 && kwargs == NULL) {
14022 if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS))
14023 return __Pyx_PyObject_CallMethO(func, NULL);
14024 }
14025 else if (nargs == 1 && kwargs == NULL) {
14026 if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O))
14027 return __Pyx_PyObject_CallMethO(func, args[0]);
14028 }
14029#endif
14030 if (kwargs == NULL) {
14031 #if CYTHON_VECTORCALL
14032 #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
14033 return PyObject_Vectorcall(func, args, nargsf, NULL);
14034 #else
14035 vectorcallfunc f = __Pyx_PyVectorcall_Function(func);
14036 if (f) {
14037 return f(func, args, nargsf, NULL);
14038 }
14039 #endif
14040 #endif
14041 }
14042 if (nargs == 0) {
14043 return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs);
14044 }
14045 #if CYTHON_COMPILING_IN_LIMITED_API
14046 return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs);
14047 #elif CYTHON_COMPILING_IN_PYPY
14048 return PyObject_VectorcallDict(func, args, (size_t) nargs, kwargs);
14049 #else
14050 return PyObject_VectorcallDict(func, args, nargsf, kwargs);
14051 #endif
14052}
14053
14054/* RaiseException */
14055static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
14056 PyObject* owned_instance = NULL;
14057 if (tb == Py_None) {
14058 tb = 0;
14059 } else if (tb && !PyTraceBack_Check(tb)) {
14060 PyErr_SetString(PyExc_TypeError,
14061 "raise: arg 3 must be a traceback or None");
14062 goto bad;
14063 }
14064 if (value == Py_None)
14065 value = 0;
14066 if (PyExceptionInstance_Check(type)) {
14067 if (value) {
14068 PyErr_SetString(PyExc_TypeError,
14069 "instance exception may not have a separate value");
14070 goto bad;
14071 }
14072 value = type;
14073 type = (PyObject*) Py_TYPE(value);
14074 } else if (PyExceptionClass_Check(type)) {
14075 PyObject *instance_class = NULL;
14076 if (value && PyExceptionInstance_Check(value)) {
14077 instance_class = (PyObject*) Py_TYPE(value);
14078 if (instance_class != type) {
14079 int is_subclass = PyObject_IsSubclass(instance_class, type);
14080 if (!is_subclass) {
14081 instance_class = NULL;
14082 } else if (unlikely(is_subclass == -1)) {
14083 goto bad;
14084 } else {
14085 type = instance_class;
14086 }
14087 }
14088 }
14089 if (!instance_class) {
14090 PyObject *args;
14091 if (!value)
14092 args = PyTuple_New(0);
14093 else if (PyTuple_Check(value)) {
14094 Py_INCREF(value);
14095 args = value;
14096 } else
14097 args = PyTuple_Pack(1, value);
14098 if (!args)
14099 goto bad;
14100 owned_instance = PyObject_Call(type, args, NULL);
14101 Py_DECREF(args);
14102 if (!owned_instance)
14103 goto bad;
14104 value = owned_instance;
14105 if (!PyExceptionInstance_Check(value)) {
14106 PyErr_Format(PyExc_TypeError,
14107 "calling %R should have returned an instance of "
14108 "BaseException, not %R",
14109 type, Py_TYPE(value));
14110 goto bad;
14111 }
14112 }
14113 } else {
14114 PyErr_SetString(PyExc_TypeError,
14115 "raise: exception class must be a subclass of BaseException");
14116 goto bad;
14117 }
14118 if (cause) {
14119 PyObject *fixed_cause;
14120 if (cause == Py_None) {
14121 fixed_cause = NULL;
14122 } else if (PyExceptionClass_Check(cause)) {
14123 fixed_cause = PyObject_CallObject(cause, NULL);
14124 if (fixed_cause == NULL)
14125 goto bad;
14126 } else if (PyExceptionInstance_Check(cause)) {
14127 fixed_cause = cause;
14128 Py_INCREF(fixed_cause);
14129 } else {
14130 PyErr_SetString(PyExc_TypeError,
14131 "exception causes must derive from "
14132 "BaseException");
14133 goto bad;
14134 }
14135 PyException_SetCause(value, fixed_cause);
14136 }
14137 PyErr_SetObject(type, value);
14138 if (tb) {
14139#if PY_VERSION_HEX >= 0x030C00A6
14140 PyException_SetTraceback(value, tb);
14141#elif CYTHON_FAST_THREAD_STATE
14142 PyThreadState *tstate = __Pyx_PyThreadState_Current;
14143 PyObject* tmp_tb = tstate->curexc_traceback;
14144 if (tb != tmp_tb) {
14145 Py_INCREF(tb);
14146 tstate->curexc_traceback = tb;
14147 Py_XDECREF(tmp_tb);
14148 }
14149#else
14150 PyObject *tmp_type, *tmp_value, *tmp_tb;
14151 PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
14152 Py_INCREF(tb);
14153 PyErr_Restore(tmp_type, tmp_value, tb);
14154 Py_XDECREF(tmp_tb);
14155#endif
14156 }
14157bad:
14158 Py_XDECREF(owned_instance);
14159 return;
14160}
14161
14162/* CopyObjectArray (used by TupleOrListFromArrayImpl) */
14163#if CYTHON_COMPILING_IN_CPYTHON
14164static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) {
14165 PyObject *v;
14166 Py_ssize_t i;
14167 for (i = 0; i < length; i++) {
14168 v = dest[i] = src[i];
14169 Py_INCREF(v);
14170 }
14171}
14172#endif
14173
14174/* TupleOrListFromArrayImpl (used by TupleFromArray) */
14175#if !(PY_VERSION_HEX >= 0x030F0000 && !CYTHON_COMPILING_IN_LIMITED_API)
14176CYTHON_UNUSED static PyObject *
14177__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) {
14178 if (n <= 0) {
14179 return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple);
14180 }
14181 PyObject *res = PyTuple_New(n);
14182 if (unlikely(res == NULL)) return NULL;
14183 #if CYTHON_COMPILING_IN_CPYTHON
14184 __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n);
14185 #else
14186 Py_ssize_t i;
14187 for (i = 0; i < n; i++) {
14188 Py_INCREF(src[i]);
14189 if (unlikely(__Pyx_PyTuple_SET_ITEM(res, i, src[i]) < (0))) {
14190 Py_DECREF(res);
14191 return NULL;
14192 }
14193 }
14194 #endif
14195 return res;
14196}
14197#endif
14198
14199/* PyObjectCompare (used by UnicodeEquals) */
14200#ifndef __Pyx_DEFINED_PyObject_CompareStrStrBoolEq
14201#define __Pyx_DEFINED_PyObject_CompareStrStrBoolEq
14202static CYTHON_INLINE int __Pyx_PyObject_CompareStrStrBoolEq(PyObject* s1, PyObject* s2) {
14203 #if __PYX_LIMITED_VERSION_HEX >= 0x030e0000
14204 int result = PyUnicode_Equal(s1, s2);
14205 #if !CYTHON_COMPILING_IN_CPYTHON
14206 if (unlikely(result == -1)) return -1;
14207 #endif
14208 if (result == 0) goto __pyx_return_false; else goto __pyx_return_true;
14209 #else
14210 int result = PyUnicode_Compare(s1, s2);
14211 if (unlikely((result == -1) && PyErr_Occurred())) return -1;
14212 if (result == 0) goto __pyx_return_true; else goto __pyx_return_false;
14213 #endif
14214__pyx_return_true:
14215 return 1;
14216__pyx_return_false:
14217 return 0;
14218}
14219#endif
14220static CYTHON_INLINE int __Pyx_PyObject_CompareBoolEq_str_str(PyObject *op1, PyObject *op2, int pyop) {
14221 CYTHON_UNUSED_VAR(pyop);
14222 if (unlikely(op1 == Py_None)) {
14223 if (op2 == Py_None) goto __pyx_return_true; else goto __pyx_return_false;
14224 }
14225 if (unlikely(op2 == Py_None)) {
14226 if (op1 == Py_None) goto __pyx_return_true; else goto __pyx_return_false;
14227 }
14228
14229 if (likely(op1 != Py_None)) {
14230 if (op1 == op2) goto __pyx_return_true;
14231 if (likely(op2 != Py_None)) {
14232 return __Pyx_PyObject_CompareStrStrBoolEq(op1, op2);
14233 }
14234 goto __pyx_richcmp;
14235 }
14236
14237 if ((0)) goto __pyx_richcmp;
14238 if ((0)) goto __pyx_return_true;
14239 if ((0)) goto __pyx_return_false;
14240__pyx_richcmp:
14241 return __Pyx_PyObject_RichCompareBool(op1, op2, Py_EQ);
14242__pyx_return_true:
14243 return 1;
14244__pyx_return_false:
14245 return 0;
14246}
14247
14248/* fastcall */
14249#if CYTHON_VECTORCALL
14250static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s)
14251{
14252 Py_ssize_t i, n = __Pyx_PyTuple_GET_SIZE(kwnames);
14253 #if !CYTHON_ASSUME_SAFE_SIZE
14254 if (unlikely(n == -1)) return NULL;
14255 #endif
14256 for (i = 0; i < n; i++)
14257 {
14258 PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i);
14259 #if !CYTHON_ASSUME_SAFE_MACROS
14260 if (unlikely(!namei)) return NULL;
14261 #endif
14262 if (s == namei) return kwvalues[i];
14263 }
14264 for (i = 0; i < n; i++)
14265 {
14266 PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i);
14267 #if !CYTHON_ASSUME_SAFE_MACROS
14268 if (unlikely(!namei)) return NULL;
14269 #endif
14270 int eq = __Pyx_PyUnicode_Equals(s, namei);
14271 if (unlikely(eq != 0)) {
14272 if (unlikely(eq < 0)) return NULL;
14273 return kwvalues[i];
14274 }
14275 }
14276 return NULL;
14277}
14278#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_GRAAL
14279CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) {
14280 Py_ssize_t i, nkwargs;
14281 PyObject *dict;
14282#if !CYTHON_ASSUME_SAFE_SIZE
14283 nkwargs = PyTuple_Size(kwnames);
14284 if (unlikely(nkwargs < 0)) return NULL;
14285#else
14286 nkwargs = PyTuple_GET_SIZE(kwnames);
14287#endif
14288 dict = PyDict_New();
14289 if (unlikely(!dict))
14290 return NULL;
14291 for (i=0; i<nkwargs; i++) {
14292#if !CYTHON_ASSUME_SAFE_MACROS
14293 PyObject *key = PyTuple_GetItem(kwnames, i);
14294 if (!key) goto bad;
14295#else
14296 PyObject *key = PyTuple_GET_ITEM(kwnames, i);
14297#endif
14298 if (unlikely(PyDict_SetItem(dict, key, kwvalues[i]) < 0))
14299 goto bad;
14300 }
14301 return dict;
14302bad:
14303 Py_DECREF(dict);
14304 return NULL;
14305}
14306#endif
14307#endif
14308
14309/* PyObjectCallOneArg (used by CallUnboundCMethod0) */
14310static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
14311 PyObject *args[2] = {NULL, arg};
14312 return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
14313}
14314
14315/* IgnoreException (used by UnpackUnboundCMethod_impl) */
14316static CYTHON_INLINE int __Pyx_IgnoreGivenException(PyObject *given_exception, PyObject *ignorable_exception) {
14317 if (PyErr_GivenExceptionMatches(given_exception ? given_exception : PyErr_Occurred(), ignorable_exception)) {
14318 PyErr_Clear();
14319 return 1;
14320 }
14321 return 0;
14322}
14323
14324/* PyObjectGetAttrStr (used by UnpackUnboundCMethod_impl) */
14325#if CYTHON_USE_TYPE_SLOTS
14326static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
14327 PyTypeObject* tp = Py_TYPE(obj);
14328 if (likely(tp->tp_getattro))
14329 return tp->tp_getattro(obj, attr_name);
14330 return PyObject_GetAttr(obj, attr_name);
14331}
14332#endif
14333
14334/* UnpackUnboundCMethod_impl (used by UnpackUnboundCMethod) */
14335#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000
14336static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *kwargs) {
14337 PyObject *result;
14338 PyObject *selfless_args = PyTuple_GetSlice(args, 1, PyTuple_Size(args));
14339 if (unlikely(!selfless_args)) return NULL;
14340 result = PyObject_Call(method, selfless_args, kwargs);
14341 Py_DECREF(selfless_args);
14342 return result;
14343}
14344#else
14345static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) {
14346 return PyObject_Vectorcall(method, args ? args+1 : NULL, nargs ? (size_t) nargs-1 : 0, kwnames);
14347}
14348#endif
14349static PyMethodDef __Pyx_UnboundCMethod_Def = {
14350 "CythonUnboundCMethod",
14351 __PYX_REINTERPRET_FUNCION(PyCFunction, __Pyx_SelflessCall),
14352#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000
14353 METH_VARARGS | METH_KEYWORDS,
14354#else
14355 METH_FASTCALL | METH_KEYWORDS,
14356#endif
14357 NULL
14358};
14359static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
14360 PyObject *method, *result=NULL;
14361 method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
14362 if (unlikely(!method))
14363 return -1;
14364 result = method;
14365#if CYTHON_COMPILING_IN_CPYTHON
14366 if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
14367 {
14368 PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
14369 target->func = descr->d_method->ml_meth;
14370 target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST);
14371 } else
14372#endif
14373#if CYTHON_COMPILING_IN_PYPY
14374#else
14375 if (PyCFunction_Check(method))
14376#endif
14377 {
14378 PyObject *self;
14379 int self_found;
14380#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
14381 self = PyObject_GetAttrString(method, "__self__");
14382 if (!self && !__Pyx_IgnoreException(PyExc_AttributeError)) {
14383 return -1;
14384 }
14385#else
14386 self = PyCFunction_GET_SELF(method);
14387#endif
14388 self_found = (self && self != Py_None);
14389#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
14390 Py_XDECREF(self);
14391#endif
14392 if (self_found) {
14393 PyObject *unbound_method = PyCFunction_New(&__Pyx_UnboundCMethod_Def, method);
14394 if (unlikely(!unbound_method)) return -1;
14395 Py_DECREF(method);
14396 result = unbound_method;
14397 }
14398 }
14399#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
14400 if (unlikely(target->method)) {
14401 Py_DECREF(result);
14402 } else
14403#endif
14404 target->method = result;
14405 return 0;
14406}
14407
14408/* CallUnboundCMethod0 */
14409#if CYTHON_COMPILING_IN_CPYTHON
14410static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
14411 int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc);
14412 if (likely(was_initialized == 2 && cfunc->func)) {
14413 if (likely(cfunc->flag == METH_NOARGS))
14414 return __Pyx_CallCFunction(cfunc, self, NULL);
14415 if (likely(cfunc->flag == METH_FASTCALL))
14416 return __Pyx_CallCFunctionFast(cfunc, self, NULL, 0);
14417 if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
14418 return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, NULL, 0, NULL);
14419 if (likely(cfunc->flag == (METH_VARARGS | METH_KEYWORDS)))
14420 return __Pyx_CallCFunctionWithKeywords(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple, NULL);
14421 if (cfunc->flag == METH_VARARGS)
14422 return __Pyx_CallCFunction(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple);
14423 return __Pyx__CallUnboundCMethod0(cfunc, self);
14424 }
14425#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
14426 else if (unlikely(was_initialized == 1)) {
14427 __Pyx_CachedCFunction tmp_cfunc = {
14428#ifndef __cplusplus
14429 0
14430#endif
14431 };
14432 tmp_cfunc.type = cfunc->type;
14433 tmp_cfunc.method_name = cfunc->method_name;
14434 return __Pyx__CallUnboundCMethod0(&tmp_cfunc, self);
14435 }
14436#endif
14437 PyObject *result = __Pyx__CallUnboundCMethod0(cfunc, self);
14438 __Pyx_CachedCFunction_SetFinishedInitializing(cfunc);
14439 return result;
14440}
14441#endif
14442static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
14443 PyObject *result;
14444 if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
14445 result = __Pyx_PyObject_CallOneArg(cfunc->method, self);
14446 return result;
14447}
14448
14449/* py_dict_items (used by OwnedDictNext) */
14450static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) {
14451 return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_items, d);
14452}
14453
14454/* py_dict_values (used by OwnedDictNext) */
14455static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d) {
14456 return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_values, d);
14457}
14458
14459/* OwnedDictNext (used by ParseKeywordsImpl) */
14460#if CYTHON_AVOID_BORROWED_REFS
14461static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue) {
14462 PyObject *next = NULL;
14463 if (!*ppos) {
14464 if (pvalue) {
14465 PyObject *dictview = pkey ? __Pyx_PyDict_Items(p) : __Pyx_PyDict_Values(p);
14466 if (unlikely(!dictview)) goto bad;
14467 *ppos = PyObject_GetIter(dictview);
14468 Py_DECREF(dictview);
14469 } else {
14470 *ppos = PyObject_GetIter(p);
14471 }
14472 if (unlikely(!*ppos)) goto bad;
14473 }
14474 next = PyIter_Next(*ppos);
14475 if (!next) {
14476 if (PyErr_Occurred()) goto bad;
14477 return 0;
14478 }
14479 if (pkey && pvalue) {
14480 *pkey = __Pyx_PySequence_ITEM(next, 0);
14481 if (unlikely(*pkey)) goto bad;
14482 *pvalue = __Pyx_PySequence_ITEM(next, 1);
14483 if (unlikely(*pvalue)) goto bad;
14484 Py_DECREF(next);
14485 } else if (pkey) {
14486 *pkey = next;
14487 } else {
14488 assert(pvalue);
14489 *pvalue = next;
14490 }
14491 return 1;
14492 bad:
14493 Py_XDECREF(next);
14494#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000
14495 PyErr_FormatUnraisable("Exception ignored in __Pyx_PyDict_NextRef");
14496#else
14497 PyErr_WriteUnraisable(__pyx_mstate_global->__pyx_n_u_Pyx_PyDict_NextRef);
14498#endif
14499 if (pkey) *pkey = NULL;
14500 if (pvalue) *pvalue = NULL;
14501 return 0;
14502}
14503#else // !CYTHON_AVOID_BORROWED_REFS
14504static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue) {
14505 int result = PyDict_Next(p, ppos, pkey, pvalue);
14506 if (likely(result == 1)) {
14507 if (pkey) Py_INCREF(*pkey);
14508 if (pvalue) Py_INCREF(*pvalue);
14509 }
14510 return result;
14511}
14512#endif
14513
14514/* RaiseDoubleKeywords (used by ParseKeywordsImpl) */
14515static void __Pyx_RaiseDoubleKeywordsError(
14516 const char* func_name,
14517 PyObject* kw_name)
14518{
14519 PyErr_Format(PyExc_TypeError,
14520 "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
14521}
14522
14523/* CallUnboundCMethod2 */
14524#if CYTHON_COMPILING_IN_CPYTHON
14525static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) {
14526 int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc);
14527 if (likely(was_initialized == 2 && cfunc->func)) {
14528 PyObject *args[2] = {arg1, arg2};
14529 if (cfunc->flag == METH_FASTCALL) {
14530 return __Pyx_CallCFunctionFast(cfunc, self, args, 2);
14531 }
14532 if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
14533 return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, 2, NULL);
14534 }
14535#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
14536 else if (unlikely(was_initialized == 1)) {
14537 __Pyx_CachedCFunction tmp_cfunc = {
14538#ifndef __cplusplus
14539 0
14540#endif
14541 };
14542 tmp_cfunc.type = cfunc->type;
14543 tmp_cfunc.method_name = cfunc->method_name;
14544 return __Pyx__CallUnboundCMethod2(&tmp_cfunc, self, arg1, arg2);
14545 }
14546#endif
14547 PyObject *result = __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2);
14548 __Pyx_CachedCFunction_SetFinishedInitializing(cfunc);
14549 return result;
14550}
14551#endif
14552static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){
14553 if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
14554#if CYTHON_COMPILING_IN_CPYTHON
14555 if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
14556 PyObject *result = NULL;
14557 PyObject *args = PyTuple_New(2);
14558 if (unlikely(!args)) return NULL;
14559 Py_INCREF(arg1);
14560 PyTuple_SET_ITEM(args, 0, arg1);
14561 Py_INCREF(arg2);
14562 PyTuple_SET_ITEM(args, 1, arg2);
14563 if (cfunc->flag & METH_KEYWORDS)
14564 result = __Pyx_CallCFunctionWithKeywords(cfunc, self, args, NULL);
14565 else
14566 result = __Pyx_CallCFunction(cfunc, self, args);
14567 Py_DECREF(args);
14568 return result;
14569 }
14570#endif
14571 {
14572 PyObject *args[4] = {NULL, self, arg1, arg2};
14573 return __Pyx_PyObject_FastCall(cfunc->method, args+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
14574 }
14575}
14576
14577/* ParseKeywordsImpl (used by ParseKeywords) */
14578static int __Pyx_ValidateDuplicatePosArgs(
14579 PyObject *kwds,
14580 PyObject ** const argnames[],
14581 PyObject ** const *first_kw_arg,
14582 const char* function_name)
14583{
14584 PyObject ** const *name = argnames;
14585 while (name != first_kw_arg) {
14586 PyObject *key = **name;
14587 int found = PyDict_Contains(kwds, key);
14588 if (unlikely(found)) {
14589 if (found == 1) __Pyx_RaiseDoubleKeywordsError(function_name, key);
14590 goto bad;
14591 }
14592 name++;
14593 }
14594 return 0;
14595bad:
14596 return -1;
14597}
14598#if CYTHON_USE_UNICODE_INTERNALS
14599static CYTHON_INLINE int __Pyx_UnicodeKeywordsEqual(PyObject *s1, PyObject *s2) {
14600 int kind;
14601 Py_ssize_t len = PyUnicode_GET_LENGTH(s1);
14602 if (len != PyUnicode_GET_LENGTH(s2)) return 0;
14603 kind = PyUnicode_KIND(s1);
14604 if (kind != PyUnicode_KIND(s2)) return 0;
14605 const void *data1 = PyUnicode_DATA(s1);
14606 const void *data2 = PyUnicode_DATA(s2);
14607 return (memcmp(data1, data2, (size_t) len * (size_t) kind) == 0);
14608}
14609#endif
14610static int __Pyx_MatchKeywordArg_str(
14611 PyObject *key,
14612 PyObject ** const argnames[],
14613 PyObject ** const *first_kw_arg,
14614 size_t *index_found,
14615 const char *function_name)
14616{
14617 PyObject ** const *name;
14618 #if CYTHON_USE_UNICODE_INTERNALS
14619 Py_hash_t key_hash = ((PyASCIIObject*)key)->hash;
14620 if (unlikely(key_hash == -1)) {
14621 key_hash = PyObject_Hash(key);
14622 if (unlikely(key_hash == -1))
14623 goto bad;
14624 }
14625 #endif
14626 name = first_kw_arg;
14627 while (*name) {
14628 PyObject *name_str = **name;
14629 #if CYTHON_USE_UNICODE_INTERNALS
14630 if (key_hash == ((PyASCIIObject*)name_str)->hash && __Pyx_UnicodeKeywordsEqual(name_str, key)) {
14631 *index_found = (size_t) (name - argnames);
14632 return 1;
14633 }
14634 #else
14635 #if CYTHON_ASSUME_SAFE_SIZE
14636 if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key))
14637 #endif
14638 {
14639 int cmp = PyUnicode_Compare(name_str, key);
14640 if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
14641 if (cmp == 0) {
14642 *index_found = (size_t) (name - argnames);
14643 return 1;
14644 }
14645 }
14646 #endif
14647 name++;
14648 }
14649 name = argnames;
14650 while (name != first_kw_arg) {
14651 PyObject *name_str = **name;
14652 #if CYTHON_USE_UNICODE_INTERNALS
14653 if (unlikely(key_hash == ((PyASCIIObject*)name_str)->hash)) {
14654 if (__Pyx_UnicodeKeywordsEqual(name_str, key))
14655 goto arg_passed_twice;
14656 }
14657 #else
14658 #if CYTHON_ASSUME_SAFE_SIZE
14659 if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key))
14660 #endif
14661 {
14662 if (unlikely(name_str == key)) goto arg_passed_twice;
14663 int cmp = PyUnicode_Compare(name_str, key);
14664 if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
14665 if (cmp == 0) goto arg_passed_twice;
14666 }
14667 #endif
14668 name++;
14669 }
14670 return 0;
14671arg_passed_twice:
14672 __Pyx_RaiseDoubleKeywordsError(function_name, key);
14673 goto bad;
14674bad:
14675 return -1;
14676}
14677static int __Pyx_MatchKeywordArg_nostr(
14678 PyObject *key,
14679 PyObject ** const argnames[],
14680 PyObject ** const *first_kw_arg,
14681 size_t *index_found,
14682 const char *function_name)
14683{
14684 PyObject ** const *name;
14685 if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type;
14686 name = first_kw_arg;
14687 while (*name) {
14688 int cmp = PyObject_RichCompareBool(**name, key, Py_EQ);
14689 if (cmp == 1) {
14690 *index_found = (size_t) (name - argnames);
14691 return 1;
14692 }
14693 if (unlikely(cmp == -1)) goto bad;
14694 name++;
14695 }
14696 name = argnames;
14697 while (name != first_kw_arg) {
14698 int cmp = PyObject_RichCompareBool(**name, key, Py_EQ);
14699 if (unlikely(cmp != 0)) {
14700 if (cmp == 1) goto arg_passed_twice;
14701 else goto bad;
14702 }
14703 name++;
14704 }
14705 return 0;
14706arg_passed_twice:
14707 __Pyx_RaiseDoubleKeywordsError(function_name, key);
14708 goto bad;
14709invalid_keyword_type:
14710 PyErr_Format(PyExc_TypeError,
14711 "%.200s() keywords must be strings", function_name);
14712 goto bad;
14713bad:
14714 return -1;
14715}
14716static CYTHON_INLINE int __Pyx_MatchKeywordArg(
14717 PyObject *key,
14718 PyObject ** const argnames[],
14719 PyObject ** const *first_kw_arg,
14720 size_t *index_found,
14721 const char *function_name)
14722{
14723 return likely(PyUnicode_CheckExact(key)) ?
14724 __Pyx_MatchKeywordArg_str(key, argnames, first_kw_arg, index_found, function_name) :
14725 __Pyx_MatchKeywordArg_nostr(key, argnames, first_kw_arg, index_found, function_name);
14726}
14727static void __Pyx_RejectUnknownKeyword(
14728 PyObject *kwds,
14729 PyObject ** const argnames[],
14730 PyObject ** const *first_kw_arg,
14731 const char *function_name)
14732{
14733 #if CYTHON_AVOID_BORROWED_REFS
14734 PyObject *pos = NULL;
14735 #else
14736 Py_ssize_t pos = 0;
14737 #endif
14738 PyObject *key = NULL;
14739 __Pyx_BEGIN_CRITICAL_SECTION(kwds);
14740 #if CYTHON_AVOID_BORROWED_REFS
14741 while (__Pyx_PyDict_NextRef(kwds, &pos, &key, NULL))
14742 #else
14743 (void) __Pyx_PyDict_NextRef;
14744 while (PyDict_Next(kwds, &pos, &key, NULL))
14745 #endif
14746 {
14747 PyObject** const *name = first_kw_arg;
14748 while (*name && (**name != key)) name++;
14749 if (!*name) {
14750 size_t index_found = 0;
14751 int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name);
14752 if (cmp != 1) {
14753 if (cmp == 0) {
14754 PyErr_Format(PyExc_TypeError,
14755 "%s() got an unexpected keyword argument '%U'",
14756 function_name, key);
14757 }
14758 #if CYTHON_AVOID_BORROWED_REFS
14759 Py_DECREF(key);
14760 #endif
14761 break;
14762 }
14763 }
14764 #if CYTHON_AVOID_BORROWED_REFS
14765 Py_DECREF(key);
14766 #endif
14767 }
14768 __Pyx_END_CRITICAL_SECTION();
14769 #if CYTHON_AVOID_BORROWED_REFS
14770 Py_XDECREF(pos);
14771 #endif
14772 assert(PyErr_Occurred());
14773}
14774static int __Pyx_ParseKeywordDict(
14775 PyObject *kwds,
14776 PyObject ** const argnames[],
14777 PyObject *values[],
14778 Py_ssize_t num_pos_args,
14779 Py_ssize_t num_kwargs,
14780 const char* function_name,
14781 int ignore_unknown_kwargs)
14782{
14783 PyObject** const *name;
14784 PyObject** const *first_kw_arg = argnames + num_pos_args;
14785 Py_ssize_t extracted = 0;
14786#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments)
14787 if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1;
14788#endif
14789 name = first_kw_arg;
14790 while (*name && num_kwargs > extracted) {
14791 PyObject * key = **name;
14792 PyObject *value;
14793 int found = 0;
14794 #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
14795 found = PyDict_GetItemRef(kwds, key, &value);
14796 #else
14797 value = PyDict_GetItemWithError(kwds, key);
14798 if (value) {
14799 Py_INCREF(value);
14800 found = 1;
14801 } else {
14802 if (unlikely(PyErr_Occurred())) goto bad;
14803 }
14804 #endif
14805 if (found) {
14806 if (unlikely(found < 0)) goto bad;
14807 values[name-argnames] = value;
14808 extracted++;
14809 }
14810 name++;
14811 }
14812 if (num_kwargs > extracted) {
14813 if (ignore_unknown_kwargs) {
14814 if (unlikely(__Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name) == -1))
14815 goto bad;
14816 } else {
14817 __Pyx_RejectUnknownKeyword(kwds, argnames, first_kw_arg, function_name);
14818 goto bad;
14819 }
14820 }
14821 return 0;
14822bad:
14823 return -1;
14824}
14825static int __Pyx_ParseKeywordDictToDict(
14826 PyObject *kwds,
14827 PyObject ** const argnames[],
14828 PyObject *kwds2,
14829 PyObject *values[],
14830 Py_ssize_t num_pos_args,
14831 const char* function_name)
14832{
14833 PyObject** const *name;
14834 PyObject** const *first_kw_arg = argnames + num_pos_args;
14835 Py_ssize_t len;
14836#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments)
14837 if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1;
14838#endif
14839 if (PyDict_Update(kwds2, kwds) < 0) goto bad;
14840 name = first_kw_arg;
14841 while (*name) {
14842 PyObject *key = **name;
14843 PyObject *value;
14844#if !CYTHON_COMPILING_IN_LIMITED_API && (PY_VERSION_HEX >= 0x030d00A2 || defined(PyDict_Pop))
14845 int found = PyDict_Pop(kwds2, key, &value);
14846 if (found) {
14847 if (unlikely(found < 0)) goto bad;
14848 values[name-argnames] = value;
14849 }
14850#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000
14851 int found = PyDict_GetItemRef(kwds2, key, &value);
14852 if (found) {
14853 if (unlikely(found < 0)) goto bad;
14854 values[name-argnames] = value;
14855 if (unlikely(PyDict_DelItem(kwds2, key) < 0)) goto bad;
14856 }
14857#else
14858 #if CYTHON_COMPILING_IN_CPYTHON
14859 value = _PyDict_Pop(kwds2, key, kwds2);
14860 #else
14861 value = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_pop, kwds2, key, kwds2);
14862 #endif
14863 if (value == kwds2) {
14864 Py_DECREF(value);
14865 } else {
14866 if (unlikely(!value)) goto bad;
14867 values[name-argnames] = value;
14868 }
14869#endif
14870 name++;
14871 }
14872 len = PyDict_Size(kwds2);
14873 if (len > 0) {
14874 return __Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name);
14875 } else if (unlikely(len == -1)) {
14876 goto bad;
14877 }
14878 return 0;
14879bad:
14880 return -1;
14881}
14882static int __Pyx_ParseKeywordsTuple(
14883 PyObject *kwds,
14884 PyObject * const *kwvalues,
14885 PyObject ** const argnames[],
14886 PyObject *kwds2,
14887 PyObject *values[],
14888 Py_ssize_t num_pos_args,
14889 Py_ssize_t num_kwargs,
14890 const char* function_name,
14891 int ignore_unknown_kwargs)
14892{
14893 PyObject *key = NULL;
14894 PyObject** const * name;
14895 PyObject** const *first_kw_arg = argnames + num_pos_args;
14896 for (Py_ssize_t pos = 0; pos < num_kwargs; pos++) {
14897#if CYTHON_AVOID_BORROWED_REFS
14898 key = __Pyx_PySequence_ITEM(kwds, pos);
14899#else
14900 key = __Pyx_PyTuple_GET_ITEM(kwds, pos);
14901#endif
14902#if !CYTHON_ASSUME_SAFE_MACROS
14903 if (unlikely(!key)) goto bad;
14904#endif
14905 name = first_kw_arg;
14906 while (*name && (**name != key)) name++;
14907 if (*name) {
14908 PyObject *value = kwvalues[pos];
14909 values[name-argnames] = __Pyx_NewRef(value);
14910 } else {
14911 size_t index_found = 0;
14912 int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name);
14913 if (cmp == 1) {
14914 PyObject *value = kwvalues[pos];
14915 values[index_found] = __Pyx_NewRef(value);
14916 } else {
14917 if (unlikely(cmp == -1)) goto bad;
14918 if (kwds2) {
14919 PyObject *value = kwvalues[pos];
14920 if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
14921 } else if (!ignore_unknown_kwargs) {
14922 goto invalid_keyword;
14923 }
14924 }
14925 }
14926 #if CYTHON_AVOID_BORROWED_REFS
14927 Py_DECREF(key);
14928 key = NULL;
14929 #endif
14930 }
14931 return 0;
14932invalid_keyword:
14933 PyErr_Format(PyExc_TypeError,
14934 "%s() got an unexpected keyword argument '%U'",
14935 function_name, key);
14936 goto bad;
14937bad:
14938 #if CYTHON_AVOID_BORROWED_REFS
14939 Py_XDECREF(key);
14940 #endif
14941 return -1;
14942}
14943
14944/* ParseKeywords */
14945static int __Pyx_ParseKeywords(
14946 PyObject *kwds,
14947 PyObject * const *kwvalues,
14948 PyObject ** const argnames[],
14949 PyObject *kwds2,
14950 PyObject *values[],
14951 Py_ssize_t num_pos_args,
14952 Py_ssize_t num_kwargs,
14953 const char* function_name,
14954 int ignore_unknown_kwargs)
14955{
14956 if (CYTHON_VECTORCALL && likely(PyTuple_Check(kwds)))
14957 return __Pyx_ParseKeywordsTuple(kwds, kwvalues, argnames, kwds2, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs);
14958 else if (kwds2)
14959 return __Pyx_ParseKeywordDictToDict(kwds, argnames, kwds2, values, num_pos_args, function_name);
14960 else
14961 return __Pyx_ParseKeywordDict(kwds, argnames, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs);
14962}
14963
14964/* RaiseArgTupleInvalid */
14965static void __Pyx_RaiseArgtupleInvalid(
14966 const char* func_name,
14967 int exact,
14968 Py_ssize_t num_min,
14969 Py_ssize_t num_max,
14970 Py_ssize_t num_found)
14971{
14972 Py_ssize_t num_expected;
14973 const char *more_or_less;
14974 if (num_found < num_min) {
14975 num_expected = num_min;
14976 more_or_less = "at least";
14977 } else {
14978 num_expected = num_max;
14979 more_or_less = "at most";
14980 }
14981 if (exact) {
14982 more_or_less = "exactly";
14983 }
14984 PyErr_Format(PyExc_TypeError,
14985 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
14986 func_name, more_or_less, num_expected,
14987 (num_expected == 1) ? "" : "s", num_found);
14988}
14989
14990/* ArgTypeTestError (used by ArgTypeTest) */
14991static void __Pyx_ArgTypeError(PyObject *obj, PyTypeObject *type, const char *name, int exact)
14992{
14993 __Pyx_TypeName type_name;
14994 __Pyx_TypeName obj_type_name;
14995 PyObject *extra_info = __pyx_mstate_global->__pyx_empty_unicode;
14996 int from_annotation_subclass = 0;
14997 if (unlikely(!type)) {
14998 PyErr_SetString(PyExc_SystemError, "Missing type object");
14999 return;
15000 } else if (exact == 2) {
15001 if (__Pyx_TypeCheck(obj, type)) {
15002 from_annotation_subclass = 1;
15003 extra_info = __pyx_mstate_global->__pyx_kp_u_Note_that_Cython_is_deliberately;
15004 }
15005 }
15006 type_name = __Pyx_PyType_GetFullyQualifiedName(type);
15007 #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000
15008 if (unlikely(!type_name)) return;
15009 #endif
15010 obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj));
15011 #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000
15012 if (unlikely(!obj_type_name)) goto obj_type_name_failed;
15013 #endif
15014 PyErr_Format(PyExc_TypeError,
15015 "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME ", got " __Pyx_FMT_TYPENAME ")"
15016#if __PYX_LIMITED_VERSION_HEX < 0x030C0000
15017 "%s%U"
15018#endif
15019 , name, type_name, obj_type_name
15020#if __PYX_LIMITED_VERSION_HEX < 0x030C0000
15021 , (from_annotation_subclass ? ". " : ""), extra_info
15022#endif
15023 );
15024#if __PYX_LIMITED_VERSION_HEX >= 0x030C0000
15025 if (exact == 2 && from_annotation_subclass) {
15026 PyObject *res;
15027 PyObject *vargs[2];
15028 vargs[0] = PyErr_GetRaisedException();
15029 vargs[1] = extra_info;
15030 res = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_kp_u_add_note, vargs, 2, NULL);
15031 Py_XDECREF(res);
15032 PyErr_SetRaisedException(vargs[0]);
15033 }
15034#endif
15035 __Pyx_DECREF_TypeName(obj_type_name);
15036#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000
15037obj_type_name_failed:
15038#endif
15039 __Pyx_DECREF_TypeName(type_name);
15040 return;
15041}
15042
15043/* ArgTypeTest */
15044static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact) {
15045 if (likely(Py_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None))))
15046 return 1;
15047 if (!exact && likely(type) && likely(__Pyx_TypeCheck(obj, type)))
15048 return 1;
15049 __Pyx_ArgTypeError(obj, type, name, exact);
15050 return 0;
15051}
15052
15053/* DivInt[npy_intp] */
15054static CYTHON_INLINE npy_intp __Pyx_div_npy_intp(npy_intp a, npy_intp b, int b_is_constant) {
15055 npy_intp q = a / b;
15056 npy_intp r = a - q*b;
15057 npy_intp adapt_python = (b_is_constant ?
15058 ((r != 0) & ((r < 0) ^ (b < 0))) :
15059 ((r != 0) & ((r ^ b) < 0))
15060 );
15061 return q - adapt_python;
15062}
15063
15064/* PyFrozenDict (used by GetItemInt) */
15065#if CYTHON_COMPILING_IN_LIMITED_API
15066static CYTHON_INLINE PyObject* __Pyx__PyFrozenDict_New(PyObject* frozendict_type, PyObject* it) {
15067 return PyObject_CallFunctionObjArgs(frozendict_type, it, NULL);
15068}
15069#endif
15070
15071/* GettItemInt_wraparound (used by GetItemInt) */
15072#if CYTHON_USE_TYPE_SLOTS && !CYTHON_COMPILING_IN_PYPY
15073static int __Pyx_GetItemInt_wraparound(PyObject *o, PySequenceMethods *sm, Py_ssize_t *i) {
15074 assert(*i < 0);
15075 if (likely(sm->sq_length)) {
15076 Py_ssize_t l = sm->sq_length(o);
15077 if (likely(l >= 0)) {
15078 *i += l;
15079 } else {
15080 if (!PyErr_ExceptionMatches(PyExc_OverflowError))
15081 return -1;
15082 PyErr_Clear();
15083 }
15084 }
15085 return 0;
15086}
15087#endif
15088
15089/* GetItemInt */
15090static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
15091 PyObject *r;
15092 if (unlikely(!j)) return NULL;
15093 r = PyObject_GetItem(o, j);
15094 Py_DECREF(j);
15095 return r;
15096}
15097static PyObject *__Pyx_GetItemInt_Generic_size(PyObject *o, Py_ssize_t i) {
15098 return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i));
15099}
15100static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
15101 int wraparound, int boundscheck, int unsafe_shared) {
15102 CYTHON_MAYBE_UNUSED_VAR(unsafe_shared);
15103#if CYTHON_AVOID_BORROWED_REFS
15104 CYTHON_UNUSED_VAR(boundscheck);
15105 Py_ssize_t wrapped_i = i;
15106 if (wraparound & unlikely(i < 0)) {
15107 Py_ssize_t size = __Pyx_PyList_GET_SIZE(o);
15108 #if !CYTHON_ASSUME_SAFE_SIZE
15109 if (unlikely(size < 0)) return NULL;
15110 #endif
15111 wrapped_i += size;
15112 }
15113 return __Pyx_PyList_GetItemRef(o, wrapped_i);
15114#elif CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS
15115 Py_ssize_t wrapped_i = i;
15116 Py_ssize_t size = (wraparound | boundscheck) ? PyList_GET_SIZE(o) : -1;
15117 if (wraparound & unlikely(i < 0)) {
15118 wrapped_i += size;
15119 }
15120 if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, size))) {
15121 return __Pyx_PyList_GET_ITEM_REF(o, wrapped_i, unsafe_shared);
15122 }
15123 return __Pyx_GetItemInt_Generic_size(o, i);
15124#else
15125 (void)wraparound;
15126 (void)boundscheck;
15127 return PySequence_GetItem(o, i);
15128#endif
15129}
15130static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
15131 int wraparound, int boundscheck, int unsafe_shared) {
15132 CYTHON_MAYBE_UNUSED_VAR(unsafe_shared);
15133#if CYTHON_AVOID_BORROWED_REFS
15134 CYTHON_UNUSED_VAR(boundscheck);
15135 Py_ssize_t wrapped_i = i;
15136 if (wraparound & unlikely(i < 0)) {
15137 Py_ssize_t size = __Pyx_PyTuple_GET_SIZE(o);
15138 #if !CYTHON_ASSUME_SAFE_SIZE
15139 if (unlikely(size < 0)) return NULL;
15140 #endif
15141 wrapped_i += size;
15142 }
15143 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_COMPILING_IN_LIMITED_API
15144 return PySequence_ITEM(o, wrapped_i);
15145 #else
15146 if (unlikely(wrapped_i < 0)) {
15147 PyErr_SetString(PyExc_IndexError, "tuple index out of range");
15148 return NULL;
15149 }
15150 return PySequence_GetItem(o, wrapped_i);
15151 #endif
15152#elif CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS
15153 Py_ssize_t wrapped_i = i;
15154 Py_ssize_t size = (wraparound | boundscheck) ? PyTuple_GET_SIZE(o) : -1;
15155 if (wraparound & unlikely(i < 0)) {
15156 wrapped_i += size;
15157 }
15158 if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, size))) {
15159 return __Pyx_NewRef(__Pyx_PyTuple_GET_ITEM(o, wrapped_i));
15160 }
15161 return __Pyx_GetItemInt_Generic_size(o, i);
15162#else
15163 (void)wraparound;
15164 (void)boundscheck;
15165 return PySequence_GetItem(o, i);
15166#endif
15167}
15168#if CYTHON_USE_TYPE_SLOTS && !CYTHON_COMPILING_IN_PYPY
15169static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast_mapping(PyObject *o, binaryfunc getitem, Py_ssize_t i) {
15170 PyObject *r, *key = PyLong_FromSsize_t(i);
15171 if (unlikely(!key)) return NULL;
15172 r = getitem(o, key);
15173 Py_DECREF(key);
15174 return r;
15175}
15176#endif
15177static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
15178 int wraparound, int boundscheck, int unsafe_shared) {
15179 CYTHON_MAYBE_UNUSED_VAR(unsafe_shared);
15180#if CYTHON_ASSUME_SAFE_SIZE
15181 if (PyList_CheckExact(o)) {
15182 return __Pyx_GetItemInt_List_Fast(o, i, wraparound, boundscheck, unsafe_shared);
15183 } else
15184 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
15185 if (PyTuple_CheckExact(o)) {
15186 return __Pyx_GetItemInt_Tuple_Fast(o, i, wraparound, boundscheck, unsafe_shared);
15187 } else
15188 #endif
15189#else
15190 if ((!wraparound || i >= 0) & PyList_CheckExact(o)) {
15191 return boundscheck ? __Pyx_PyList_GetItemRef(o, i) : __Pyx_PyList_GET_ITEM_REF(o, i, unsafe_shared);
15192 } else
15193#endif
15194#if CYTHON_USE_TYPE_SLOTS && !CYTHON_COMPILING_IN_PYPY
15195 if (PyDict_CheckExact(o)) {
15196 return __Pyx_GetItemInt_Fast_mapping(o, PyDict_Type.tp_as_mapping->mp_subscript, i);
15197 #if defined(PyFrozenDict_CheckExact)
15198 } else if (PyFrozenDict_CheckExact(o)) {
15199 return __Pyx_GetItemInt_Fast_mapping(o, PyFrozenDict_Type.tp_as_mapping->mp_subscript, i);
15200 #endif
15201 } else
15202 {
15203 PyTypeObject *obj_type = Py_TYPE(o);
15204 int seq_or_mapping = __Pyx_PyType_GetFlags(obj_type) & (Py_TPFLAGS_SEQUENCE|Py_TPFLAGS_MAPPING);
15205 if (seq_or_mapping != Py_TPFLAGS_SEQUENCE) {
15206 PyMappingMethods *mm = obj_type->tp_as_mapping;
15207 if (mm && mm->mp_subscript)
15208 return __Pyx_GetItemInt_Fast_mapping(o, mm->mp_subscript, i);
15209 }
15210 PySequenceMethods *sm = obj_type->tp_as_sequence;
15211 if (likely(sm && sm->sq_item)) {
15212 if (wraparound && (i < 0) && unlikely(__Pyx_GetItemInt_wraparound(o, sm, &i) == -1))
15213 return NULL;
15214 return sm->sq_item(o, i);
15215 }
15216 if (seq_or_mapping == Py_TPFLAGS_SEQUENCE) {
15217 PyMappingMethods *mm = obj_type->tp_as_mapping;
15218 if (likely(mm && mm->mp_subscript))
15219 return __Pyx_GetItemInt_Fast_mapping(o, mm->mp_subscript, i);
15220 }
15221 }
15222#else
15223 if (!PyMapping_Check(o)) {
15224 return PySequence_GetItem(o, i);
15225 }
15226#endif
15227 (void)wraparound;
15228 (void)boundscheck;
15229 return __Pyx_GetItemInt_Generic_size(o, i);
15230}
15231
15232/* PyObjectFastCallMethod */
15233#if !CYTHON_VECTORCALL
15234static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf) {
15235 PyObject *result;
15236 switch (__Pyx_PyVectorcall_NARGS(nargsf)) {
15237 case 1:
15238 return PyObject_CallMethodObjArgs(args[0], name, NULL);
15239 case 2:
15240 return PyObject_CallMethodObjArgs(args[0], name, args[1], NULL);
15241 case 3:
15242 return PyObject_CallMethodObjArgs(args[0], name, args[1], args[2], NULL);
15243 case 4:
15244 return PyObject_CallMethodObjArgs(args[0], name, args[1], args[2], args[3], NULL);
15245 case 5:
15246 return PyObject_CallMethodObjArgs(args[0], name, args[1], args[2], args[3], args[4], NULL);
15247 }
15248 PyObject *attr = PyObject_GetAttr(args[0], name);
15249 if (unlikely(!attr))
15250 return NULL;
15251 result = __Pyx_PyObject_FastCall(attr, args+1, nargsf - 1);
15252 Py_DECREF(attr);
15253 return result;
15254}
15255#endif
15256
15257/* FormatTypeName (used by RaiseErrorWithObjectType1) */
15258#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000
15259static __Pyx_TypeName
15260__Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp)
15261{
15262 PyObject *module = NULL, *name = NULL, *result = NULL;
15263 #if __PYX_LIMITED_VERSION_HEX < 0x030b0000
15264 name = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
15265 __pyx_mstate_global->__pyx_n_u_qualname);
15266 #else
15267 name = PyType_GetQualName(tp);
15268 #endif
15269 if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) goto bad;
15270 module = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
15271 __pyx_mstate_global->__pyx_n_u_module);
15272 if (unlikely(module == NULL) || unlikely(!PyUnicode_Check(module))) goto bad;
15273 if (PyUnicode_CompareWithASCIIString(module, "builtins") == 0) {
15274 result = name;
15275 name = NULL;
15276 goto done;
15277 }
15278 result = PyUnicode_FromFormat("%U.%U", module, name);
15279 if (unlikely(result == NULL)) goto bad;
15280 done:
15281 Py_XDECREF(name);
15282 Py_XDECREF(module);
15283 return result;
15284 bad:
15285 PyErr_Clear();
15286 if (name) {
15287 result = name;
15288 name = NULL;
15289 } else {
15290 result = __Pyx_NewRef(__pyx_mstate_global->__pyx_kp_u_);
15291 }
15292 goto done;
15293}
15294#endif
15295
15296/* RaiseErrorWithObjectType1 (used by RaiseUnexpectedTypeError) */
15297static void __Pyx_RaiseErrorWithType1(PyObject* exc_type, const char* message, const char *arg, PyTypeObject *type_obj) {
15298 __Pyx_TypeName type_name = __Pyx_PyType_GetFullyQualifiedName(type_obj);
15299 #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000
15300 if (unlikely(!type_name)) return;
15301 #endif
15302 PyErr_Format(exc_type, message, arg, type_name);
15303 __Pyx_DECREF_TypeName(type_name);
15304}
15305
15306/* RaiseUnexpectedTypeError */
15307static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj) {
15308 __Pyx_RaiseTypeErrorWithObjectType1(
15309 "Expected %.42s, got " __Pyx_FMT_TYPENAME,
15310 expected, obj);
15311 return 0;
15312}
15313
15314/* TypeImport */
15315#ifndef __PYX_HAVE_RT_ImportType_3_3_0
15316#define __PYX_HAVE_RT_ImportType_3_3_0
15317static PyTypeObject *__Pyx_ImportType_3_3_0(PyObject *module, const char *module_name, const char *class_name,
15318 size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_3_0 check_size)
15319{
15320 PyObject *result = 0;
15321 Py_ssize_t basicsize;
15322 Py_ssize_t itemsize;
15323#if defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API)
15324 PyObject *py_basicsize;
15325 PyObject *py_itemsize;
15326#endif
15327 result = PyObject_GetAttrString(module, class_name);
15328 if (!result)
15329 goto bad;
15330 if (!PyType_Check(result)) {
15331 PyErr_Format(PyExc_TypeError,
15332 "%.200s.%.200s is not a type object",
15333 module_name, class_name);
15334 goto bad;
15335 }
15336#if !( defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API) )
15337 basicsize = ((PyTypeObject *)result)->tp_basicsize;
15338 itemsize = ((PyTypeObject *)result)->tp_itemsize;
15339#else
15340 if (size == 0) {
15341 return (PyTypeObject *)result;
15342 }
15343 py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
15344 if (!py_basicsize)
15345 goto bad;
15346 basicsize = PyLong_AsSsize_t(py_basicsize);
15347 Py_DECREF(py_basicsize);
15348 py_basicsize = 0;
15349 if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
15350 goto bad;
15351 py_itemsize = PyObject_GetAttrString(result, "__itemsize__");
15352 if (!py_itemsize)
15353 goto bad;
15354 itemsize = PyLong_AsSsize_t(py_itemsize);
15355 Py_DECREF(py_itemsize);
15356 py_itemsize = 0;
15357 if (itemsize == (Py_ssize_t)-1 && PyErr_Occurred())
15358 goto bad;
15359#endif
15360 if (itemsize) {
15361 if (size % alignment) {
15362 alignment = size % alignment;
15363 }
15364 if (itemsize < (Py_ssize_t)alignment)
15365 itemsize = (Py_ssize_t)alignment;
15366 }
15367 if ((size_t)(basicsize + itemsize) < size) {
15368 PyErr_Format(PyExc_ValueError,
15369 "%.200s.%.200s size changed, may indicate binary incompatibility. "
15370 "Expected %zd from C header, got %zd from PyObject",
15371 module_name, class_name, size, basicsize+itemsize);
15372 goto bad;
15373 }
15374 if (check_size == __Pyx_ImportType_CheckSize_Error_3_3_0 &&
15375 ((size_t)basicsize > size || (size_t)(basicsize + itemsize) < size)) {
15376 PyErr_Format(PyExc_ValueError,
15377 "%.200s.%.200s size changed, may indicate binary incompatibility. "
15378 "Expected %zd from C header, got %zd-%zd from PyObject",
15379 module_name, class_name, size, basicsize, basicsize+itemsize);
15380 goto bad;
15381 }
15382 else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_3_0 && (size_t)basicsize > size) {
15383 if (PyErr_WarnFormat(NULL, 0,
15384 "%.200s.%.200s size changed, may indicate binary incompatibility. "
15385 "Expected %zd from C header, got %zd from PyObject",
15386 module_name, class_name, size, basicsize) < 0) {
15387 goto bad;
15388 }
15389 }
15390 return (PyTypeObject *)result;
15391bad:
15392 Py_XDECREF(result);
15393 return NULL;
15394}
15395#endif
15396
15397/* PyObjectGetAttrStrNoError (used by HasAttr) */
15398#if __PYX_LIMITED_VERSION_HEX < 0x030d0000
15399static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
15400 __Pyx_PyThreadState_declare
15401 __Pyx_PyThreadState_assign
15402 if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
15403 __Pyx_PyErr_Clear();
15404}
15405#endif
15406static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
15407 PyObject *result;
15408#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
15409 (void) PyObject_GetOptionalAttr(obj, attr_name, &result);
15410 return result;
15411#else
15412#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS
15413 PyTypeObject* tp = Py_TYPE(obj);
15414 if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
15415 return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
15416 }
15417#endif
15418 result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
15419 if (unlikely(!result)) {
15420 __Pyx_PyObject_GetAttrStr_ClearAttributeError();
15421 }
15422 return result;
15423#endif
15424}
15425
15426/* HasAttr (used by ImportImpl) */
15427#if __PYX_LIMITED_VERSION_HEX < 0x030d0000
15428static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
15429 PyObject *r;
15430 if (unlikely(!PyUnicode_Check(n))) {
15431 PyErr_SetString(PyExc_TypeError,
15432 "hasattr(): attribute name must be string");
15433 return -1;
15434 }
15435 r = __Pyx_PyObject_GetAttrStrNoError(o, n);
15436 if (!r) {
15437 return (unlikely(PyErr_Occurred())) ? -1 : 0;
15438 } else {
15439 Py_DECREF(r);
15440 return 1;
15441 }
15442}
15443#endif
15444
15445/* TupleOrListFromArrayImpl (used by ListFromArray) */
15446CYTHON_UNUSED static PyObject *
15447__Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n) {
15448 PyObject *res = PyList_New(n);
15449 if (unlikely(res == NULL)) return NULL;
15450 #if CYTHON_COMPILING_IN_CPYTHON
15451 __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n);
15452 #else
15453 Py_ssize_t i;
15454 for (i = 0; i < n; i++) {
15455 Py_INCREF(src[i]);
15456 if (unlikely(__Pyx_PyList_SET_ITEM(res, i, src[i]) < (0))) {
15457 Py_DECREF(res);
15458 return NULL;
15459 }
15460 }
15461 #endif
15462 return res;
15463}
15464
15465/* ImportImpl (used by Import) */
15466static int __Pyx__Import_GetModule(PyObject *qualname, PyObject **module) {
15467 PyObject *imported_module = PyImport_GetModule(qualname);
15468 if (unlikely(!imported_module)) {
15469 *module = NULL;
15470 if (PyErr_Occurred()) {
15471 return -1;
15472 }
15473 return 0;
15474 }
15475 *module = imported_module;
15476 return 1;
15477}
15478static int __Pyx__Import_Lookup(PyObject *qualname, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject **module) {
15479 PyObject *imported_module;
15480 PyObject *top_level_package_name;
15481 Py_ssize_t i;
15482 int status, module_found;
15483 Py_ssize_t dot_index;
15484 module_found = __Pyx__Import_GetModule(qualname, &imported_module);
15485 if (unlikely(!module_found || module_found == -1)) {
15486 *module = NULL;
15487 return module_found;
15488 }
15489 if (imported_names) {
15490 for (i = 0; i < len_imported_names; i++) {
15491 PyObject *imported_name = imported_names[i];
15492#if __PYX_LIMITED_VERSION_HEX < 0x030d0000
15493 int has_imported_attribute = PyObject_HasAttr(imported_module, imported_name);
15494#else
15495 int has_imported_attribute = PyObject_HasAttrWithError(imported_module, imported_name);
15496 if (unlikely(has_imported_attribute == -1)) goto error;
15497#endif
15498 if (!has_imported_attribute) {
15499 goto not_found;
15500 }
15501 }
15502 *module = imported_module;
15503 return 1;
15504 }
15505 dot_index = PyUnicode_FindChar(qualname, '.', 0, PY_SSIZE_T_MAX, 1);
15506 if (dot_index == -1) {
15507 *module = imported_module;
15508 return 1;
15509 }
15510 if (unlikely(dot_index == -2)) goto error;
15511 top_level_package_name = PyUnicode_Substring(qualname, 0, dot_index);
15512 if (unlikely(!top_level_package_name)) goto error;
15513 Py_DECREF(imported_module);
15514 status = __Pyx__Import_GetModule(top_level_package_name, module);
15515 Py_DECREF(top_level_package_name);
15516 return status;
15517error:
15518 Py_DECREF(imported_module);
15519 *module = NULL;
15520 return -1;
15521not_found:
15522 Py_DECREF(imported_module);
15523 *module = NULL;
15524 return 0;
15525}
15526static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level) {
15527 PyObject *module = 0;
15528 PyObject *empty_dict = 0;
15529 PyObject *from_list = 0;
15530 int module_found;
15531 if (!qualname) {
15532 qualname = name;
15533 }
15534 module_found = __Pyx__Import_Lookup(qualname, imported_names, len_imported_names, &module);
15535 if (likely(module_found == 1)) {
15536 return module;
15537 } else if (unlikely(module_found == -1)) {
15538 return NULL;
15539 }
15540 #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030f00a6
15541 empty_dict = PyFrozenDict_New(NULL);
15542 #else
15543 empty_dict = PyDict_New();
15544 #endif
15545 if (unlikely(!empty_dict))
15546 goto bad;
15547 if (imported_names) {
15548 from_list = __Pyx_PyList_FromArray(imported_names, len_imported_names);
15549 if (unlikely(!from_list))
15550 goto bad;
15551 }
15552 if (level == -1) {
15553 const char* package_sep = strchr(__Pyx_MODULE_NAME, '.');
15554 if (package_sep != (0)) {
15555 module = PyImport_ImportModuleLevelObject(
15556 name, moddict, empty_dict, from_list, 1);
15557 if (unlikely(!module)) {
15558 if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError)))
15559 goto bad;
15560 PyErr_Clear();
15561 }
15562 }
15563 level = 0;
15564 }
15565 if (!module) {
15566 module = PyImport_ImportModuleLevelObject(
15567 name, moddict, empty_dict, from_list, level);
15568 }
15569bad:
15570 Py_XDECREF(from_list);
15571 Py_XDECREF(empty_dict);
15572 return module;
15573}
15574
15575/* Import */
15576static PyObject *__Pyx_Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, int level) {
15577 return __Pyx__Import(name, imported_names, len_imported_names, qualname, __pyx_mstate_global->__pyx_d, level);
15578}
15579
15580/* dict_setdefault (used by FetchCommonType) */
15581static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value) {
15582 PyObject* value;
15583#if __PYX_LIMITED_VERSION_HEX >= 0x030F0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4)
15584 PyDict_SetDefaultRef(d, key, default_value, &value);
15585#elif CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x030C0000
15586 PyObject *args[] = {d, key, default_value};
15587 value = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_n_u_setdefault, args, 3 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
15588#elif CYTHON_COMPILING_IN_LIMITED_API
15589 value = PyObject_CallMethodObjArgs(d, __pyx_mstate_global->__pyx_n_u_setdefault, key, default_value, NULL);
15590#else
15591 value = PyDict_SetDefault(d, key, default_value);
15592 if (unlikely(!value)) return NULL;
15593 Py_INCREF(value);
15594#endif
15595 return value;
15596}
15597
15598/* AddModuleRef (used by FetchSharedCythonModule) */
15599#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && PY_VERSION_HEX < 0x030F00a3
15600 static PyObject *__Pyx_PyImport_AddModuleObjectRef(PyObject *name) {
15601 PyObject *module_dict = PyImport_GetModuleDict();
15602 PyObject *m;
15603 if (PyMapping_GetOptionalItem(module_dict, name, &m) < 0) {
15604 return NULL;
15605 }
15606 if (m != NULL && PyModule_Check(m)) {
15607 return m;
15608 }
15609 Py_XDECREF(m);
15610 m = PyModule_NewObject(name);
15611 if (m == NULL)
15612 return NULL;
15613 if (PyDict_CheckExact(module_dict)) {
15614 PyObject *new_m;
15615 (void)PyDict_SetDefaultRef(module_dict, name, m, &new_m);
15616 Py_DECREF(m);
15617 return new_m;
15618 } else {
15619 if (PyObject_SetItem(module_dict, name, m) != 0) {
15620 Py_DECREF(m);
15621 return NULL;
15622 }
15623 return m;
15624 }
15625 }
15626 static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) {
15627 if ((PY_VERSION_HEX >= 0x030E0000) && Py_Version >= 0x030E0100) {
15628 return PyImport_AddModuleRef(name);
15629 }
15630 PyObject *py_name = PyUnicode_FromString(name);
15631 if (!py_name) return NULL;
15632 PyObject *module = __Pyx_PyImport_AddModuleObjectRef(py_name);
15633 Py_DECREF(py_name);
15634 return module;
15635 }
15636#elif __PYX_LIMITED_VERSION_HEX < 0x030d0000
15637 static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) {
15638 PyObject *module = PyImport_AddModule(name);
15639 Py_XINCREF(module);
15640 return module;
15641 }
15642#endif
15643
15644/* FetchSharedCythonModule (used by FetchCommonType) */
15645static PyObject *__Pyx_FetchSharedCythonABIModule(void) {
15646 return __Pyx_PyImport_AddModuleRef(__PYX_ABI_MODULE_NAME);
15647}
15648
15649/* VerifyCachedType (used by FetchCommonType) */
15650static int __Pyx_VerifyCachedType(PyObject *cached_type,
15651 const char *name,
15652 Py_ssize_t expected_basicsize) {
15653 Py_ssize_t basicsize;
15654 if (!PyType_Check(cached_type)) {
15655 PyErr_Format(PyExc_TypeError,
15656 "Shared Cython type %.200s is not a type object", name);
15657 return -1;
15658 }
15659 if (expected_basicsize == 0) {
15660 return 0; // size is inherited, nothing useful to check
15661 }
15662#if CYTHON_COMPILING_IN_LIMITED_API && CYTHON_OPAQUE_OBJECTS
15663 if (expected_basicsize < 0) {
15664 basicsize = PyType_GetTypeDataSize((PyTypeObject*)cached_type);
15665 } else
15666#endif
15667 {
15668 #if CYTHON_COMPILING_IN_LIMITED_API
15669 PyObject *py_basicsize;
15670 py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__");
15671 if (unlikely(!py_basicsize)) return -1;
15672 basicsize = PyLong_AsSsize_t(py_basicsize);
15673 Py_DECREF(py_basicsize);
15674 py_basicsize = NULL;
15675 if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) return -1;
15676 #else
15677 basicsize = ((PyTypeObject*) cached_type)->tp_basicsize;
15678 #endif
15679 }
15680 if ((expected_basicsize >= 0) ?
15681 (basicsize != expected_basicsize) :
15682 (basicsize < -expected_basicsize)) {
15683 PyErr_Format(PyExc_TypeError,
15684 "Shared Cython type %.200s has the wrong size, try recompiling",
15685 name);
15686 return -1;
15687 }
15688 return 0;
15689}
15690
15691/* FetchCommonType (used by CommonTypesMetaclass) */
15692#if __PYX_LIMITED_VERSION_HEX < 0x030C0000
15693static PyObject* __Pyx_PyType_FromMetaclass(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) {
15694 PyObject *result = __Pyx_PyType_FromModuleAndSpec(module, spec, bases);
15695 if (result && metaclass) {
15696 PyObject *old_tp = (PyObject*)Py_TYPE(result);
15697 Py_INCREF((PyObject*)metaclass);
15698 Py_SET_TYPE(result, metaclass);
15699 Py_DECREF(old_tp);
15700 PyType_Modified((PyTypeObject*)result);
15701 }
15702 return result;
15703}
15704#else
15705#define __Pyx_PyType_FromMetaclass(me, mo, s, b) PyType_FromMetaclass(me, mo, s, b)
15706#endif
15707static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) {
15708 PyObject *abi_module = NULL, *cached_type = NULL, *abi_module_dict, *new_cached_type, *py_object_name;
15709 int get_item_ref_result;
15710 const char* object_name = strrchr(spec->name, '.');
15711 object_name = object_name ? object_name+1 : spec->name;
15712 py_object_name = PyUnicode_FromString(object_name);
15713 if (!py_object_name) return NULL;
15714 abi_module = __Pyx_FetchSharedCythonABIModule();
15715 if (!abi_module) goto done;
15716 abi_module_dict = PyModule_GetDict(abi_module);
15717 if (!abi_module_dict) goto done;
15718 get_item_ref_result = __Pyx_PyDict_GetItemRef(abi_module_dict, py_object_name, &cached_type);
15719 if (get_item_ref_result == 1) {
15720 if (__Pyx_VerifyCachedType(
15721 cached_type,
15722 object_name,
15723 spec->basicsize) < 0) {
15724 goto bad;
15725 }
15726 goto done;
15727 } else if (unlikely(get_item_ref_result == -1)) {
15728 goto bad;
15729 }
15730 cached_type = __Pyx_PyType_FromMetaclass(
15731 metaclass,
15732 CYTHON_USE_MODULE_STATE ? module : abi_module,
15733 spec, bases);
15734 if (unlikely(!cached_type)) goto bad;
15735 new_cached_type = __Pyx_PyDict_SetDefault(abi_module_dict, py_object_name, cached_type);
15736 if (unlikely(new_cached_type != cached_type)) {
15737 if (unlikely(!new_cached_type)) goto bad;
15738 Py_DECREF(cached_type);
15739 cached_type = new_cached_type;
15740 if (__Pyx_VerifyCachedType(
15741 cached_type,
15742 object_name,
15743 spec->basicsize) < 0) {
15744 goto bad;
15745 }
15746 goto done;
15747 } else {
15748 Py_DECREF(new_cached_type);
15749 }
15750done:
15751 Py_XDECREF(abi_module);
15752 Py_DECREF(py_object_name);
15753 assert(cached_type == NULL || PyType_Check(cached_type));
15754 return (PyTypeObject *) cached_type;
15755bad:
15756 Py_XDECREF(cached_type);
15757 cached_type = NULL;
15758 goto done;
15759}
15760
15761/* CommonTypesMetaclass (used by CythonFunctionShared) */
15762static PyObject* __pyx_CommonTypesMetaclass_get_module(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED void* context) {
15763 return PyUnicode_FromString(__PYX_ABI_MODULE_NAME);
15764}
15765#if __PYX_LIMITED_VERSION_HEX < 0x030A0000
15766static PyObject* __pyx_CommonTypesMetaclass_call(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *args, CYTHON_UNUSED PyObject *kwds) {
15767 PyErr_SetString(PyExc_TypeError, "Cannot instantiate Cython internal types");
15768 return NULL;
15769}
15770static int __pyx_CommonTypesMetaclass_setattr(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *attr, CYTHON_UNUSED PyObject *value) {
15771 PyErr_SetString(PyExc_TypeError, "Cython internal types are immutable");
15772 return -1;
15773}
15774#endif
15775static PyGetSetDef __pyx_CommonTypesMetaclass_getset[] = {
15776 {"__module__", __pyx_CommonTypesMetaclass_get_module, NULL, NULL, NULL},
15777 {0, 0, 0, 0, 0}
15778};
15779static PyType_Slot __pyx_CommonTypesMetaclass_slots[] = {
15780 {Py_tp_getset, (void *)__pyx_CommonTypesMetaclass_getset},
15781 #if __PYX_LIMITED_VERSION_HEX < 0x030A0000
15782 {Py_tp_call, (void*)__pyx_CommonTypesMetaclass_call},
15783 {Py_tp_new, (void*)__pyx_CommonTypesMetaclass_call},
15784 {Py_tp_setattro, (void*)__pyx_CommonTypesMetaclass_setattr},
15785 #endif
15786 {0, 0}
15787};
15788static PyType_Spec __pyx_CommonTypesMetaclass_spec = {
15789 __PYX_TYPE_MODULE_PREFIX "_common_types_metatype",
15790 0,
15791 0,
15792 Py_TPFLAGS_IMMUTABLETYPE |
15793 Py_TPFLAGS_DISALLOW_INSTANTIATION |
15794 Py_TPFLAGS_DEFAULT,
15795 __pyx_CommonTypesMetaclass_slots
15796};
15797static int __pyx_CommonTypesMetaclass_init(PyObject *module) {
15798 __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module);
15799 PyObject *bases = PyTuple_Pack(1, &PyType_Type);
15800 if (unlikely(!bases)) {
15801 return -1;
15802 }
15803 mstate->__pyx_CommonTypesMetaclassType = __Pyx_FetchCommonTypeFromSpec(NULL, module, &__pyx_CommonTypesMetaclass_spec, bases);
15804 Py_DECREF(bases);
15805 if (unlikely(mstate->__pyx_CommonTypesMetaclassType == NULL)) {
15806 return -1;
15807 }
15808 return 0;
15809}
15810
15811/* CythonFunctionPerModule (used by CythonFunctionShared) */
15812#if CYTHON_COMPILING_IN_LIMITED_API
15813static CYTHON_INLINE int __Pyx__IsSameCyOrCFunctionNoMethod(PyObject *func, void (*cfunc)(void)) {
15814 if (__Pyx_CyFunction_Check(func)) {
15815 return __Pyx_as_CyFunctionObject(func)->func_methoddef->ml_meth == (PyCFunction) cfunc;
15816 } else if (PyCFunction_Check(func)) {
15817 return PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
15818 }
15819 return 0;
15820}
15821static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) {
15822 if ((PyObject*)Py_TYPE(func) == __pyx_mstate_global->__Pyx_CachedMethodType) {
15823 int result;
15824 PyObject *newFunc = PyObject_GetAttr(func, __pyx_mstate_global->__pyx_n_u_func);
15825 if (unlikely(!newFunc)) {
15826 PyErr_Clear(); // It's only an optimization, so don't throw an error
15827 return 0;
15828 }
15829 result = __Pyx__IsSameCyOrCFunctionNoMethod(newFunc, cfunc);
15830 Py_DECREF(newFunc);
15831 return result;
15832 }
15833 return __Pyx__IsSameCyOrCFunctionNoMethod(func, cfunc);
15834}
15835#else
15836static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) {
15837 if (PyMethod_Check(func)) {
15838 func = PyMethod_GET_FUNCTION(func);
15839 }
15840 return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
15841}
15842#endif
15843static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) {
15844#if CYTHON_COMPILING_IN_LIMITED_API
15845 __Pyx_Py_XDECREF_SET(
15846 __Pyx__CyFunction_GetClassObj(f),
15847 ((classobj) ? __Pyx_NewRef(classobj) : NULL));
15848#else
15849 __Pyx_Py_XDECREF_SET(
15850 ((PyCMethodObject *) (f))->mm_class,
15851 (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL));
15852#endif
15853}
15854static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, PyTypeObject *defaults_type) {
15855 __pyx_CyFunctionObject *m = __Pyx_as_CyFunctionObject(func);
15856 m->defaults = PyObject_CallObject((PyObject*)defaults_type, NULL); // _PyObject_New(defaults_type);
15857 if (unlikely(!m->defaults))
15858 return NULL;
15859 return m->defaults;
15860}
15861static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
15862 __pyx_CyFunctionObject *m = __Pyx_as_CyFunctionObject(func);
15863 m->defaults_tuple = tuple;
15864 Py_INCREF(tuple);
15865}
15866static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
15867 __pyx_CyFunctionObject *m = __Pyx_as_CyFunctionObject(func);
15868 m->defaults_kwdict = dict;
15869 Py_INCREF(dict);
15870}
15871static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
15872 __pyx_CyFunctionObject *m = __Pyx_as_CyFunctionObject(func);
15873 m->func_annotations = dict;
15874 Py_INCREF(dict);
15875}
15876
15877/* CallTypeTraverse (used by CythonFunctionShared) */
15878#if !CYTHON_USE_TYPE_SPECS
15879#else
15880static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg) {
15881 if (!always_call) {
15882 PyTypeObject *base = __Pyx_PyObject_GetSlot(o, tp_base, PyTypeObject*);
15883 unsigned long flags = PyType_GetFlags(base);
15884 if (flags & Py_TPFLAGS_HEAPTYPE) {
15885 return 0;
15886 }
15887 }
15888 Py_VISIT((PyObject*)Py_TYPE(o));
15889 return 0;
15890}
15891#endif
15892
15893/* PyMethodNew (used by CythonFunctionShared) */
15894#if CYTHON_COMPILING_IN_LIMITED_API
15895static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
15896 PyObject *result;
15897 CYTHON_UNUSED_VAR(typ);
15898 if (!self)
15899 return __Pyx_NewRef(func);
15900 #if __PYX_LIMITED_VERSION_HEX >= 0x030C0000
15901 {
15902 PyObject *args[] = {func, self};
15903 result = PyObject_Vectorcall(__pyx_mstate_global->__Pyx_CachedMethodType, args, 2, NULL);
15904 }
15905 #else
15906 result = PyObject_CallFunctionObjArgs(__pyx_mstate_global->__Pyx_CachedMethodType, func, self, NULL);
15907 #endif
15908 return result;
15909}
15910#else
15911static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
15912 CYTHON_UNUSED_VAR(typ);
15913 if (!self)
15914 return __Pyx_NewRef(func);
15915 return PyMethod_New(func, self);
15916}
15917#endif
15918
15919/* PyVectorcallFastCallDict (used by CythonFunctionShared) */
15920#if CYTHON_VECTORCALL
15921static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
15922{
15923 PyObject *res = NULL;
15924 PyObject *kwnames;
15925 PyObject **newargs;
15926 PyObject **kwvalues;
15927 Py_ssize_t i;
15928 #if CYTHON_AVOID_BORROWED_REFS
15929 PyObject *pos;
15930 #else
15931 Py_ssize_t pos;
15932 #endif
15933 size_t j;
15934 PyObject *key, *value;
15935 unsigned long keys_are_strings;
15936 #if !CYTHON_ASSUME_SAFE_SIZE
15937 Py_ssize_t nkw = PyDict_Size(kw);
15938 if (unlikely(nkw == -1)) return NULL;
15939 #else
15940 Py_ssize_t nkw = PyDict_GET_SIZE(kw);
15941 #endif
15942 newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0]));
15943 if (unlikely(newargs == NULL)) {
15944 PyErr_NoMemory();
15945 return NULL;
15946 }
15947 for (j = 0; j < nargs; j++) newargs[j] = args[j];
15948 kwnames = PyTuple_New(nkw);
15949 if (unlikely(kwnames == NULL)) {
15950 PyMem_Free(newargs);
15951 return NULL;
15952 }
15953 kwvalues = newargs + nargs;
15954 pos = 0;
15955 i = 0;
15956 keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS;
15957 while (__Pyx_PyDict_NextRef(kw, &pos, &key, &value)) {
15958 keys_are_strings &=
15959 #if CYTHON_COMPILING_IN_LIMITED_API
15960 PyType_GetFlags(Py_TYPE(key));
15961 #else
15962 Py_TYPE(key)->tp_flags;
15963 #endif
15964 #if !CYTHON_ASSUME_SAFE_MACROS
15965 if (unlikely(PyTuple_SetItem(kwnames, i, key) < 0)) goto cleanup;
15966 #else
15967 PyTuple_SET_ITEM(kwnames, i, key);
15968 #endif
15969 kwvalues[i] = value;
15970 i++;
15971 }
15972 if (unlikely(!keys_are_strings)) {
15973 PyErr_SetString(PyExc_TypeError, "keywords must be strings");
15974 goto cleanup;
15975 }
15976 res = vc(func, newargs, nargs, kwnames);
15977cleanup:
15978 #if CYTHON_AVOID_BORROWED_REFS
15979 Py_DECREF(pos);
15980 #endif
15981 Py_DECREF(kwnames);
15982 for (i = 0; i < nkw; i++)
15983 Py_DECREF(kwvalues[i]);
15984 PyMem_Free(newargs);
15985 return res;
15986}
15987static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
15988{
15989 Py_ssize_t kw_size =
15990 likely(kw == NULL) ?
15991 0 :
15992#if !CYTHON_ASSUME_SAFE_SIZE
15993 PyDict_Size(kw);
15994#else
15995 PyDict_GET_SIZE(kw);
15996#endif
15997 if (kw_size == 0) {
15998 return vc(func, args, nargs, NULL);
15999 }
16000#if !CYTHON_ASSUME_SAFE_SIZE
16001 else if (unlikely(kw_size == -1)) {
16002 return NULL;
16003 }
16004#endif
16005 return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw);
16006}
16007#endif
16008
16009/* CythonFunctionShared (used by CythonFunction) */
16010static PyObject *
16011__Pyx_CyFunction_get_doc_locked(__pyx_CyFunctionObject *op)
16012{
16013 if (unlikely(op->func_doc == NULL)) {
16014#if CYTHON_COMPILING_IN_LIMITED_API
16015 const char *doc = op->func_methoddef->ml_doc;
16016#else
16017 const char *doc = ((PyCFunctionObject*)op)->m_ml->ml_doc;
16018#endif
16019 if (doc) {
16020 op->func_doc = PyUnicode_FromString(doc);
16021 if (unlikely(op->func_doc == NULL))
16022 return NULL;
16023 } else {
16024 Py_INCREF(Py_None);
16025 return Py_None;
16026 }
16027 }
16028 Py_INCREF(op->func_doc);
16029 return op->func_doc;
16030}
16031static PyObject *
16032__Pyx_CyFunction_get_doc(PyObject *op_in, void *closure) {
16033 PyObject *result;
16034 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
16035 CYTHON_UNUSED_VAR(closure);
16036 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
16037 result = __Pyx_CyFunction_get_doc_locked(op);
16038 __Pyx_END_CRITICAL_SECTION();
16039 return result;
16040}
16041static int
16042__Pyx_CyFunction_set_doc(PyObject *op_in, PyObject *value, void *context)
16043{
16044 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
16045 CYTHON_UNUSED_VAR(context);
16046 if (value == NULL) {
16047 value = Py_None;
16048 }
16049 Py_INCREF(value);
16050 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
16051 __Pyx_Py_XDECREF_SET(op->func_doc, value);
16052 __Pyx_END_CRITICAL_SECTION();
16053 return 0;
16054}
16055static PyObject *
16056__Pyx_CyFunction_get_name_locked(__pyx_CyFunctionObject *op)
16057{
16058 if (unlikely(op->func_name == NULL)) {
16059#if CYTHON_COMPILING_IN_LIMITED_API
16060 const char *name = op->func_methoddef->ml_name;
16061#else
16062 const char *name = ((PyCFunctionObject*)op)->m_ml->ml_name;
16063#endif
16064 op->func_name = PyUnicode_InternFromString(name);
16065 if (unlikely(op->func_name == NULL))
16066 return NULL;
16067 }
16068 Py_INCREF(op->func_name);
16069 return op->func_name;
16070}
16071static PyObject *
16072__Pyx_CyFunction_get_name(PyObject *op, void *context)
16073{
16074 PyObject *result = NULL;
16075 CYTHON_UNUSED_VAR(context);
16076 __Pyx_BEGIN_CRITICAL_SECTION(op);
16077 result = __Pyx_CyFunction_get_name_locked(__Pyx_as_CyFunctionObject(op));
16078 __Pyx_END_CRITICAL_SECTION();
16079 return result;
16080}
16081static int
16082__Pyx_CyFunction_set_name(PyObject *op_in, PyObject *value, void *context)
16083{
16084 CYTHON_UNUSED_VAR(context);
16085 if (unlikely(value == NULL || !PyUnicode_Check(value))) {
16086 PyErr_SetString(PyExc_TypeError,
16087 "__name__ must be set to a string object");
16088 return -1;
16089 }
16090 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
16091 Py_INCREF(value);
16092 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
16093 __Pyx_Py_XDECREF_SET(op->func_name, value);
16094 __Pyx_END_CRITICAL_SECTION();
16095 return 0;
16096}
16097static PyObject *
16098__Pyx_CyFunction_get_qualname(PyObject *op_in, void *context)
16099{
16100 CYTHON_UNUSED_VAR(context);
16101 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
16102 PyObject *result;
16103 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
16104 Py_INCREF(op->func_qualname);
16105 result = op->func_qualname;
16106 __Pyx_END_CRITICAL_SECTION();
16107 return result;
16108}
16109static int
16110__Pyx_CyFunction_set_qualname(PyObject *op_in, PyObject *value, void *context)
16111{
16112 CYTHON_UNUSED_VAR(context);
16113 if (unlikely(value == NULL || !PyUnicode_Check(value))) {
16114 PyErr_SetString(PyExc_TypeError,
16115 "__qualname__ must be set to a string object");
16116 return -1;
16117 }
16118 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
16119 Py_INCREF(value);
16120 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
16121 __Pyx_Py_XDECREF_SET(op->func_qualname, value);
16122 __Pyx_END_CRITICAL_SECTION();
16123 return 0;
16124}
16125#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
16126static PyObject *
16127__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context)
16128{
16129 CYTHON_UNUSED_VAR(context);
16130 if (unlikely(op->func_dict == NULL)) {
16131 op->func_dict = PyDict_New();
16132 if (unlikely(op->func_dict == NULL))
16133 return NULL;
16134 }
16135 Py_INCREF(op->func_dict);
16136 return op->func_dict;
16137}
16138#endif
16139static PyObject *
16140__Pyx_CyFunction_get_globals(PyObject *op_in, void *context)
16141{
16142 CYTHON_UNUSED_VAR(context);
16143 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
16144 Py_INCREF(op->func_globals);
16145 return op->func_globals;
16146}
16147static PyObject *
16148__Pyx_CyFunction_get_closure(PyObject *op, void *context)
16149{
16150 CYTHON_UNUSED_VAR(op);
16151 CYTHON_UNUSED_VAR(context);
16152 Py_INCREF(Py_None);
16153 return Py_None;
16154}
16155static PyObject *
16156__Pyx_CyFunction_get_code(PyObject *op_in, void *context)
16157{
16158 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
16159 PyObject* result = (op->func_code) ? op->func_code : Py_None;
16160 CYTHON_UNUSED_VAR(context);
16161 Py_INCREF(result);
16162 return result;
16163}
16164static int
16165__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op, PyObject *op_obj) {
16166 int result = 0;
16167 PyObject *res = op->defaults_getter(op_obj);
16168 if (unlikely(!res))
16169 return -1;
16170 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
16171 op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
16172 Py_INCREF(op->defaults_tuple);
16173 op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
16174 Py_INCREF(op->defaults_kwdict);
16175 #else
16176 op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0);
16177 if (unlikely(!op->defaults_tuple)) result = -1;
16178 else {
16179 op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1);
16180 if (unlikely(!op->defaults_kwdict)) result = -1;
16181 }
16182 #endif
16183 Py_DECREF(res);
16184 return result;
16185}
16186static int
16187__Pyx_CyFunction_set_defaults(PyObject *op_in, PyObject* value, void *context) {
16188 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
16189 CYTHON_UNUSED_VAR(context);
16190 if (!value) {
16191 value = Py_None;
16192 } else if (unlikely(value != Py_None && !PyTuple_Check(value))) {
16193 PyErr_SetString(PyExc_TypeError,
16194 "__defaults__ must be set to a tuple object");
16195 return -1;
16196 }
16197 PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not "
16198 "currently affect the values used in function calls", 1);
16199 Py_INCREF(value);
16200 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
16201 __Pyx_Py_XDECREF_SET(op->defaults_tuple, value);
16202 __Pyx_END_CRITICAL_SECTION();
16203 return 0;
16204}
16205static PyObject *
16206__Pyx_CyFunction_get_defaults_locked(PyObject *op_in) {
16207 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
16208 PyObject* result = op->defaults_tuple;
16209 if (unlikely(!result)) {
16210 if (op->defaults_getter) {
16211 if (unlikely(__Pyx_CyFunction_init_defaults(op, op_in) < 0)) return NULL;
16212 result = op->defaults_tuple;
16213 } else {
16214 result = Py_None;
16215 }
16216 }
16217 Py_INCREF(result);
16218 return result;
16219}
16220static PyObject *
16221__Pyx_CyFunction_get_defaults(PyObject *op, void *context) {
16222 PyObject* result = NULL;
16223 CYTHON_UNUSED_VAR(context);
16224 __Pyx_BEGIN_CRITICAL_SECTION(op);
16225 result = __Pyx_CyFunction_get_defaults_locked(op);
16226 __Pyx_END_CRITICAL_SECTION();
16227 return result;
16228}
16229static int
16230__Pyx_CyFunction_set_kwdefaults(PyObject *op_in, PyObject* value, void *context) {
16231 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
16232 CYTHON_UNUSED_VAR(context);
16233 if (!value) {
16234 value = Py_None;
16235 } else if (unlikely(value != Py_None && !PyDict_Check(value))) {
16236 PyErr_SetString(PyExc_TypeError,
16237 "__kwdefaults__ must be set to a dict object");
16238 return -1;
16239 }
16240 PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not "
16241 "currently affect the values used in function calls", 1);
16242 Py_INCREF(value);
16243 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
16244 __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value);
16245 __Pyx_END_CRITICAL_SECTION();
16246 return 0;
16247}
16248static PyObject *
16249__Pyx_CyFunction_get_kwdefaults_locked(PyObject *op_in) {
16250 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
16251 PyObject* result = op->defaults_kwdict;
16252 if (unlikely(!result)) {
16253 if (op->defaults_getter) {
16254 if (unlikely(__Pyx_CyFunction_init_defaults(op, op_in) < 0)) return NULL;
16255 result = op->defaults_kwdict;
16256 } else {
16257 result = Py_None;
16258 }
16259 }
16260 Py_INCREF(result);
16261 return result;
16262}
16263static PyObject *
16264__Pyx_CyFunction_get_kwdefaults(PyObject *op, void *context) {
16265 PyObject* result;
16266 CYTHON_UNUSED_VAR(context);
16267 __Pyx_BEGIN_CRITICAL_SECTION(op);
16268 result = __Pyx_CyFunction_get_kwdefaults_locked(op);
16269 __Pyx_END_CRITICAL_SECTION();
16270 return result;
16271}
16272static int __Pyx_CyFunction_set_annotate_in_dict_if_exists(PyObject *op_in, PyObject *value);
16273static int
16274__Pyx_CyFunction_set_annotations(PyObject *op_in, PyObject* value, void *context) {
16275 CYTHON_UNUSED_VAR(context);
16276 if (!value || value == Py_None) {
16277 value = NULL;
16278 } else if (unlikely(!PyDict_Check(value))) {
16279 PyErr_SetString(PyExc_TypeError,
16280 "__annotations__ must be set to a dict object");
16281 return -1;
16282 }
16283 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
16284 Py_XINCREF(value);
16285 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
16286 __Pyx_Py_XDECREF_SET(op->func_annotations, value);
16287 __Pyx_END_CRITICAL_SECTION();
16288 if (unlikely(__Pyx_CyFunction_set_annotate_in_dict_if_exists(op_in, Py_None) < 0)) return -1;
16289 return 0;
16290}
16291static int
16292__Pyx_CyFunction_get_dict_if_exists(PyObject *op_in, PyObject **dict) {
16293 /* Return 1 if the function dict exists, 0 otherwise. This cannot fail:
16294 * _PyObject_GetDictPtr() may clear errors internally, but never reports them. */
16295#if CYTHON_COMPILING_IN_PYPY
16296 *dict = PyObject_GenericGetDict(op_in, NULL);
16297#elif CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030C0000
16298 *dict = __Pyx_as_CyFunctionObject(op_in)->func_dict;
16299#else
16300 PyObject **dictptr = _PyObject_GetDictPtr(op_in);
16301 *dict = likely(dictptr) ? *dictptr : NULL;
16302#endif
16303 return *dict ? 1 : 0;
16304}
16305static int
16306__Pyx_CyFunction_get_annotate_from_dict_if_exists(PyObject *op_in, PyObject **annotate) {
16307 PyObject *dict;
16308 int dict_found;
16309 *annotate = NULL;
16310 dict_found = __Pyx_CyFunction_get_dict_if_exists(op_in, &dict);
16311 if (!dict_found) return 0;
16312 return __Pyx_PyDict_GetItemRef(dict, __pyx_mstate_global->__pyx_n_u_annotate, annotate);
16313}
16314static int
16315__Pyx_CyFunction_set_annotate_in_dict_if_exists(PyObject *op_in, PyObject *value) {
16316 PyObject *dict;
16317 int dict_found;
16318 dict_found = __Pyx_CyFunction_get_dict_if_exists(op_in, &dict);
16319 if (!dict_found) return 0;
16320 if (value) {
16321 return PyDict_SetItem(dict, __pyx_mstate_global->__pyx_n_u_annotate, value);
16322 } else {
16323#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000
16324 return PyDict_Pop(dict, __pyx_mstate_global->__pyx_n_u_annotate, NULL);
16325#else
16326 int result = PyDict_Contains(dict, __pyx_mstate_global->__pyx_n_u_annotate);
16327 if (result == 1) {
16328 result = PyDict_DelItem(dict, __pyx_mstate_global->__pyx_n_u_annotate);
16329 }
16330 return result;
16331#endif
16332 }
16333}
16334static int
16335__Pyx_CyFunction_set_annotate_in_dict(PyObject *op_in, PyObject *value) {
16336 PyObject *dict;
16337 int result;
16338#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
16339 dict = __Pyx_CyFunction_get_dict(__Pyx_as_CyFunctionObject(op_in), NULL);
16340#else
16341 dict = PyObject_GenericGetDict(op_in, NULL);
16342#endif
16343 if (unlikely(!dict)) return -1;
16344 result = PyDict_SetItem(dict, __pyx_mstate_global->__pyx_n_u_annotate, value);
16345 Py_DECREF(dict);
16346 return result;
16347}
16348static PyObject *
16349__Pyx_CyFunction_get_annotations_locked(__pyx_CyFunctionObject *op) {
16350 PyObject* result = op->func_annotations;
16351 if (unlikely(!result)) {
16352 result = PyDict_New();
16353 if (unlikely(!result)) return NULL;
16354 op->func_annotations = result;
16355 }
16356 Py_INCREF(result);
16357 return result;
16358}
16359static PyObject *
16360__Pyx_CyFunction_get_annotations(PyObject *op_in, void *context) {
16361 PyObject *annotate = NULL;
16362 PyObject *result = NULL;
16363 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
16364 CYTHON_UNUSED_VAR(context);
16365 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
16366 result = __Pyx_XNewRef(op->func_annotations);
16367 __Pyx_END_CRITICAL_SECTION();
16368 if (result) return result;
16369 if (unlikely(__Pyx_CyFunction_get_annotate_from_dict_if_exists(op_in, &annotate) < 0)) return NULL;
16370 if (!annotate || annotate == Py_None) {
16371 Py_XDECREF(annotate);
16372 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
16373 result = __Pyx_CyFunction_get_annotations_locked(op);
16374 __Pyx_END_CRITICAL_SECTION();
16375 return result;
16376 }
16377 PyObject *format = PyLong_FromLong(1L); // annotationlib.Format.VALUE
16378 if (likely(format)) {
16379 if (!Py_EnterRecursiveCall(" cyfunction __annotations__.__get__")) {
16380 result = __Pyx_PyObject_CallOneArg(annotate, format);
16381 Py_LeaveRecursiveCall();
16382 Py_DECREF(format);
16383 }
16384 }
16385 Py_DECREF(annotate);
16386 if (unlikely(!result)) return NULL;
16387 if (unlikely(!PyDict_Check(result))) {
16388 PyErr_SetString(PyExc_TypeError, "__annotate__ must return a dict");
16389 Py_DECREF(result);
16390 return NULL;
16391 }
16392 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
16393 __Pyx_Py_XDECREF_SET(op->func_annotations, __Pyx_NewRef(result));
16394 __Pyx_END_CRITICAL_SECTION();
16395 return result;
16396}
16397static PyObject *__Pyx_CyFunction_annotate_impl(PyObject *self, PyObject *arg) {
16398 CYTHON_UNUSED_VAR(arg);
16399 if (unlikely(!self)) {
16400 PyErr_SetString(PyExc_SystemError, "cython __annotate__ called without 'self' argument");
16401 return NULL;
16402 }
16403 PyObject *result;
16404 if (Py_EnterRecursiveCall(" in cyfunction annotate")) {
16405 return NULL;
16406 }
16407 result = __Pyx_CyFunction_get_annotations(self, NULL);
16408 Py_LeaveRecursiveCall();
16409 return result;
16410}
16411static PyObject *
16412__Pyx_CyFunction_get_annotate(PyObject *op_in, void *context);
16413static int
16414__Pyx_CyFunction_set_annotate(PyObject *op_in, PyObject* value, void *context) {
16415 CYTHON_UNUSED_VAR(context);
16416 if (value == NULL) {
16417 PyErr_SetString(PyExc_TypeError, "__annotate__ cannot be deleted");
16418 return -1;
16419 }
16420 if (unlikely(value != Py_None && !PyCallable_Check(value))) {
16421 PyErr_SetString(PyExc_TypeError, "__annotate__ must be callable or None");
16422 return -1;
16423 }
16424 if (unlikely(__Pyx_TypeCheck(value, &PyCFunction_Type))) {
16425#if !CYTHON_ASSUME_SAFE_MACROS && !CYTHON_COMPILING_IN_PYPY
16426 PyCFunction cfunction = PyCFunction_GetFunction(value);
16427 if (unlikely(!cfunction)) return -1;
16428 PyObject *value_self = PyCFunction_GetSelf(value);
16429 if (unlikely(!value_self && PyErr_Occurred())) return -1;
16430#else
16431 PyCFunction cfunction = PyCFunction_GET_FUNCTION(value);
16432 PyObject *value_self = PyCFunction_GET_SELF(value);
16433#endif
16434 if (cfunction == __Pyx_CyFunction_annotate_impl && value_self == op_in) {
16435 return __Pyx_CyFunction_set_annotate_in_dict_if_exists(op_in, NULL);
16436 }
16437 }
16438 if (value != Py_None) {
16439 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
16440 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
16441 Py_CLEAR(op->func_annotations);
16442 __Pyx_END_CRITICAL_SECTION();
16443 }
16444 return __Pyx_CyFunction_set_annotate_in_dict(op_in, value);
16445}
16446#if __PYX_LIMITED_VERSION_HEX < 0x030B0000
16447static PyObject *
16448__Pyx_CyFunction_get_is_coroutine_value(__pyx_CyFunctionObject *op) {
16449 int is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE;
16450 if (is_coroutine) {
16451 PyObject *is_coroutine_value, *module, *fromlist, *marker = __pyx_mstate_global->__pyx_n_u_is_coroutine;
16452 fromlist = PyList_New(1);
16453 if (unlikely(!fromlist)) return NULL;
16454 Py_INCREF(marker);
16455#if CYTHON_ASSUME_SAFE_MACROS
16456 PyList_SET_ITEM(fromlist, 0, marker);
16457#else
16458 if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) {
16459 Py_DECREF(fromlist);
16460 return NULL;
16461 }
16462#endif
16463 module = PyImport_ImportModuleLevelObject(__pyx_mstate_global->__pyx_n_u_asyncio_coroutines, NULL, NULL, fromlist, 0);
16464 Py_DECREF(fromlist);
16465 if (unlikely(!module)) {
16466 goto ignore_or_error;
16467 }
16468 is_coroutine_value = __Pyx_PyObject_GetAttrStr(module, marker);
16469 Py_DECREF(module);
16470 if (likely(is_coroutine_value)) {
16471 return is_coroutine_value;
16472 }
16473ignore_or_error:
16474 if (!__Pyx_IgnoreException(PyExc_Exception)) {
16475 return NULL;
16476 }
16477 }
16478 return __Pyx_PyBool_FromLong(is_coroutine);
16479}
16480static PyObject *
16481__Pyx_CyFunction_get_is_coroutine(PyObject *op_in, void *context) {
16482 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
16483 PyObject *result;
16484 CYTHON_UNUSED_VAR(context);
16485 if (op->func_is_coroutine) {
16486 return __Pyx_NewRef(op->func_is_coroutine);
16487 }
16488 result = __Pyx_CyFunction_get_is_coroutine_value(op);
16489 if (unlikely(!result))
16490 return NULL;
16491 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
16492 if (op->func_is_coroutine) {
16493 Py_DECREF(result);
16494 result = __Pyx_NewRef(op->func_is_coroutine);
16495 } else {
16496 op->func_is_coroutine = __Pyx_NewRef(result);
16497 }
16498 __Pyx_END_CRITICAL_SECTION();
16499 return result;
16500}
16501#endif
16502static void __Pyx_CyFunction_raise_argument_count_error(PyObject *func, const char* message, Py_ssize_t size) {
16503#if CYTHON_COMPILING_IN_LIMITED_API
16504 PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL);
16505 if (!py_name) return;
16506 PyErr_Format(PyExc_TypeError,
16507 "%.200S() %s (%" CYTHON_FORMAT_SSIZE_T "d given)",
16508 py_name, message, size);
16509 Py_DECREF(py_name);
16510#else
16511 const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name;
16512 PyErr_Format(PyExc_TypeError,
16513 "%.200s() %s (%" CYTHON_FORMAT_SSIZE_T "d given)",
16514 name, message, size);
16515#endif
16516}
16517static void __Pyx_CyFunction_raise_type_error(PyObject *func, const char* message) {
16518#if CYTHON_COMPILING_IN_LIMITED_API
16519 PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL);
16520 if (!py_name) return;
16521 PyErr_Format(PyExc_TypeError,
16522 "%.200S() %s",
16523 py_name, message);
16524 Py_DECREF(py_name);
16525#else
16526 const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name;
16527 PyErr_Format(PyExc_TypeError,
16528 "%.200s() %s",
16529 name, message);
16530#endif
16531}
16532#if CYTHON_COMPILING_IN_LIMITED_API
16533static PyObject *
16534__Pyx_CyFunction_get_module(PyObject *op_in, void *context) {
16535 CYTHON_UNUSED_VAR(context);
16536 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
16537 Py_INCREF(op->func_module);
16538 return op->func_module;
16539}
16540static int
16541__Pyx_CyFunction_set_module(PyObject *op_in, PyObject* value, void *context) {
16542 CYTHON_UNUSED_VAR(context);
16543 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
16544 if (value == NULL) {
16545 value = Py_None;
16546 }
16547 Py_INCREF(value);
16548 PyObject *old = op->func_module;
16549 op->func_module = value;
16550 Py_DECREF(old);
16551 return 0;
16552}
16553#endif
16554static PyGetSetDef __pyx_CyFunction_getsets[] = {
16555 {"func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
16556 {"__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
16557 {"func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
16558 {"__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
16559 {"__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
16560#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
16561 {"func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0},
16562 {"__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0},
16563#else
16564 {"func_dict", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0},
16565 {"__dict__", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0},
16566#endif
16567 {"func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
16568 {"__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
16569 {"func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
16570 {"__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
16571 {"func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
16572 {"__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
16573 {"func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
16574 {"__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
16575 {"__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
16576 {"__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
16577 {"__annotate__", (getter)__Pyx_CyFunction_get_annotate, (setter)__Pyx_CyFunction_set_annotate, 0, 0},
16578#if __PYX_LIMITED_VERSION_HEX < 0x030B0000
16579 {"_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0},
16580#endif
16581#if CYTHON_COMPILING_IN_LIMITED_API
16582 {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0},
16583#endif
16584 {0, 0, 0, 0, 0}
16585};
16586static PyMemberDef __pyx_CyFunction_members[] = {
16587#if !CYTHON_COMPILING_IN_LIMITED_API
16588 {"__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0},
16589#endif
16590#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
16591 {"__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict),
16592 __PYX_SHARED_RELATIVE_OFFSET | READONLY, 0},
16593#endif
16594#if CYTHON_VECTORCALL
16595#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
16596 {"__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall),
16597 __PYX_SHARED_RELATIVE_OFFSET | READONLY, 0},
16598#else
16599 {"__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0},
16600#endif
16601#if CYTHON_COMPILING_IN_LIMITED_API
16602 {"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist),
16603 __PYX_SHARED_RELATIVE_OFFSET | READONLY, 0},
16604#else
16605 {"__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0},
16606#endif
16607#endif
16608 {0, 0, 0, 0, 0}
16609};
16610static PyObject *
16611__Pyx_CyFunction_reduce(PyObject *m_in, PyObject *args)
16612{
16613 PyObject *result = NULL;
16614 __pyx_CyFunctionObject *m = __Pyx_as_CyFunctionObject(m_in);
16615 CYTHON_UNUSED_VAR(args);
16616 __Pyx_BEGIN_CRITICAL_SECTION(m_in);
16617 Py_INCREF(m->func_qualname);
16618 result = m->func_qualname;
16619 __Pyx_END_CRITICAL_SECTION();
16620 return result;
16621}
16622static PyMethodDef __pyx_CyFunction_methods[] = {
16623 {"__annotate_cython__", __Pyx_CyFunction_annotate_impl, METH_O,
16624 "Placeholder __annotate__ function to allow 'functools.wraps' to work "
16625 "on Cython functions."},
16626 {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_NOARGS, 0},
16627 {0, 0, 0, 0}
16628};
16629static PyObject *
16630__Pyx_CyFunction_get_annotate(PyObject *op_in, void *context) {
16631 PyObject *annotate = NULL;
16632 CYTHON_UNUSED_VAR(context);
16633 if (unlikely(__Pyx_CyFunction_get_annotate_from_dict_if_exists(op_in, &annotate) < 0)) return NULL;
16634 if (annotate) return annotate;
16635 PyObject *method = PyCFunction_New(
16636 &__pyx_CyFunction_methods[0],
16637 op_in);
16638 return method;
16639}
16640#if CYTHON_COMPILING_IN_LIMITED_API
16641#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
16642#else
16643#define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist)
16644#endif
16645static PyObject *__Pyx_CyFunction_Init(PyObject *op_in,
16646 PyMethodDef *ml, int flags, PyObject* qualname,
16647 PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
16648 __pyx_CyFunctionObject* op = __Pyx_as_CyFunctionObject(op_in);
16649#if !CYTHON_COMPILING_IN_LIMITED_API
16650 PyCFunctionObject *cf = (PyCFunctionObject*) op;
16651#endif
16652 if (unlikely(op == NULL))
16653 return NULL;
16654#if CYTHON_COMPILING_IN_LIMITED_API
16655 op->func_methoddef = ml;
16656 Py_INCREF(module);
16657 op->func_module = module;
16658#endif
16659 op->flags = flags;
16660 __Pyx_CyFunction_weakreflist(op) = NULL;
16661#if !CYTHON_COMPILING_IN_LIMITED_API
16662 cf->m_ml = ml;
16663 cf->m_self = (PyObject *) op;
16664#endif
16665 Py_XINCREF(closure);
16666 op->func_closure = closure;
16667#if !CYTHON_COMPILING_IN_LIMITED_API
16668 Py_XINCREF(module);
16669 cf->m_module = module;
16670#endif
16671#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
16672 op->func_dict = NULL;
16673#endif
16674 op->func_name = NULL;
16675 Py_INCREF(qualname);
16676 op->func_qualname = qualname;
16677 op->func_doc = NULL;
16678#if CYTHON_COMPILING_IN_LIMITED_API
16679 op->func_classobj = NULL;
16680#else
16681 ((PyCMethodObject*)op)->mm_class = NULL;
16682#endif
16683 op->func_globals = globals;
16684 Py_INCREF(op->func_globals);
16685 Py_XINCREF(code);
16686 op->func_code = code;
16687 op->defaults = NULL;
16688 op->defaults_tuple = NULL;
16689 op->defaults_kwdict = NULL;
16690 op->defaults_getter = NULL;
16691 op->func_annotations = NULL;
16692#if __PYX_LIMITED_VERSION_HEX < 0x030B0000
16693 op->func_is_coroutine = NULL;
16694#endif
16695#if CYTHON_VECTORCALL
16696 switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) {
16697 case METH_NOARGS:
16698 __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS;
16699 break;
16700 case METH_O:
16701 __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O;
16702 break;
16703 case METH_METHOD | METH_FASTCALL | METH_KEYWORDS:
16704 __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD;
16705 break;
16706 case METH_FASTCALL | METH_KEYWORDS:
16707 __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS;
16708 break;
16709 case METH_VARARGS | METH_KEYWORDS:
16710 __Pyx_CyFunction_func_vectorcall(op) = NULL;
16711 break;
16712 default:
16713 PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
16714 Py_DECREF(op_in);
16715 return NULL;
16716 }
16717#endif
16718 return op_in;
16719}
16720static int __Pyx__CyFunction_clear(__pyx_CyFunctionObject *m)
16721{
16722 Py_CLEAR(m->func_closure);
16723#if CYTHON_COMPILING_IN_LIMITED_API
16724 Py_CLEAR(m->func_module);
16725#else
16726 Py_CLEAR(((PyCFunctionObject*)m)->m_module);
16727#endif
16728#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
16729 Py_CLEAR(m->func_dict);
16730#elif PY_VERSION_HEX < 0x030d0000
16731 _PyObject_ClearManagedDict((PyObject*)m);
16732#else
16733 PyObject_ClearManagedDict((PyObject*)m);
16734#endif
16735 Py_CLEAR(m->func_name);
16736 Py_CLEAR(m->func_qualname);
16737 Py_CLEAR(m->func_doc);
16738 Py_CLEAR(m->func_globals);
16739 Py_CLEAR(m->func_code);
16740#if CYTHON_COMPILING_IN_LIMITED_API
16741 Py_CLEAR(m->func_classobj);
16742#else
16743 {
16744 PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class;
16745 ((PyCMethodObject *) (m))->mm_class = NULL;
16746 Py_XDECREF(cls);
16747 }
16748#endif
16749 Py_CLEAR(m->defaults_tuple);
16750 Py_CLEAR(m->defaults_kwdict);
16751 Py_CLEAR(m->func_annotations);
16752#if __PYX_LIMITED_VERSION_HEX < 0x030B0000
16753 Py_CLEAR(m->func_is_coroutine);
16754#endif
16755 Py_CLEAR(m->defaults);
16756 return 0;
16757}
16758static int
16759__Pyx_CyFunction_clear(PyObject *m)
16760{
16761 return __Pyx__CyFunction_clear(__Pyx_as_CyFunctionObject(m));
16762}
16763static void __Pyx__CyFunction_dealloc(PyObject *m)
16764{
16765 __pyx_CyFunctionObject *cyfunc = __Pyx_as_CyFunctionObject(m);
16766 if (__Pyx_CyFunction_weakreflist(cyfunc) != NULL)
16767 PyObject_ClearWeakRefs(m);
16768 __Pyx__CyFunction_clear(cyfunc);
16769 __Pyx_PyHeapTypeObject_GC_Del(m);
16770}
16771static void __Pyx_CyFunction_dealloc(PyObject *m)
16772{
16773 PyObject_GC_UnTrack(m);
16774 __Pyx__CyFunction_dealloc(m);
16775}
16776static int __Pyx_CyFunction_traverse(PyObject *m_in, visitproc visit, void *arg)
16777{
16778 __pyx_CyFunctionObject *m = __Pyx_as_CyFunctionObject(m_in);
16779 {
16780 int e = __Pyx_call_type_traverse(m_in, 1, visit, arg);
16781 if (e) return e;
16782 }
16783 Py_VISIT(m->func_closure);
16784#if CYTHON_COMPILING_IN_LIMITED_API
16785 Py_VISIT(m->func_module);
16786#else
16787 Py_VISIT(((PyCFunctionObject*)m)->m_module);
16788#endif
16789#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
16790 Py_VISIT(m->func_dict);
16791#else
16792 {
16793 int e =
16794#if PY_VERSION_HEX < 0x030d0000
16795 _PyObject_VisitManagedDict
16796#else
16797 PyObject_VisitManagedDict
16798#endif
16799 ((PyObject*)m, visit, arg);
16800 if (e != 0) return e;
16801 }
16802#endif
16803 __Pyx_VISIT_CONST(m->func_name);
16804 __Pyx_VISIT_CONST(m->func_qualname);
16805 Py_VISIT(m->func_doc);
16806 Py_VISIT(m->func_globals);
16807 __Pyx_VISIT_CONST(m->func_code);
16808 Py_VISIT(__Pyx__CyFunction_GetClassObj(m));
16809 Py_VISIT(m->defaults_tuple);
16810 Py_VISIT(m->defaults_kwdict);
16811 Py_VISIT(m->func_annotations);
16812#if __PYX_LIMITED_VERSION_HEX < 0x030B0000
16813 Py_VISIT(m->func_is_coroutine);
16814#endif
16815 Py_VISIT(m->defaults);
16816 return 0;
16817}
16818static PyObject*
16819__Pyx_CyFunction_repr(PyObject *op_in)
16820{
16821 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
16822 PyObject *repr;
16823 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
16824 repr = PyUnicode_FromFormat("<cyfunction %U at %p>",
16825 op->func_qualname, (void *)op);
16826 __Pyx_END_CRITICAL_SECTION();
16827 return repr;
16828}
16829static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
16830#if CYTHON_COMPILING_IN_LIMITED_API
16831 __pyx_CyFunctionObject *cyfunc = __Pyx_as_CyFunctionObject(func);
16832 PyCFunction meth = cyfunc->func_methoddef->ml_meth;
16833 int flags = cyfunc->func_methoddef->ml_flags;
16834#else
16835 PyCFunctionObject* f = (PyCFunctionObject*)func;
16836 PyCFunction meth = f->m_ml->ml_meth;
16837 int flags = f->m_ml->ml_flags;
16838#endif
16839 Py_ssize_t size;
16840 switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
16841 case METH_VARARGS:
16842 if (likely(kw == NULL || PyDict_Size(kw) == 0))
16843 return (*meth)(self, arg);
16844 break;
16845 case METH_VARARGS | METH_KEYWORDS:
16846 return (*(PyCFunctionWithKeywords)(void(*)(void))meth)(self, arg, kw);
16847 case METH_NOARGS:
16848 if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
16849#if CYTHON_ASSUME_SAFE_SIZE
16850 size = PyTuple_GET_SIZE(arg);
16851#else
16852 size = PyTuple_Size(arg);
16853 if (unlikely(size < 0)) return NULL;
16854#endif
16855 if (likely(size == 0))
16856 return (*meth)(self, NULL);
16857 __Pyx_CyFunction_raise_argument_count_error(
16858 func,
16859 "takes no arguments", size);
16860 return NULL;
16861 }
16862 break;
16863 case METH_O:
16864 if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
16865#if CYTHON_ASSUME_SAFE_SIZE
16866 size = PyTuple_GET_SIZE(arg);
16867#else
16868 size = PyTuple_Size(arg);
16869 if (unlikely(size < 0)) return NULL;
16870#endif
16871 if (likely(size == 1)) {
16872 PyObject *result, *arg0;
16873 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
16874 arg0 = PyTuple_GET_ITEM(arg, 0);
16875 #else
16876 arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
16877 #endif
16878 result = (*meth)(self, arg0);
16879 #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
16880 Py_DECREF(arg0);
16881 #endif
16882 return result;
16883 }
16884 __Pyx_CyFunction_raise_argument_count_error(
16885 func,
16886 "takes exactly one argument", size);
16887 return NULL;
16888 }
16889 break;
16890 default:
16891 PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
16892 return NULL;
16893 }
16894 __Pyx_CyFunction_raise_type_error(
16895 func, "takes no keyword arguments");
16896 return NULL;
16897}
16898static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
16899 PyObject *result;
16900 result = __Pyx_CyFunction_CallMethod(func, func, arg, kw);
16901 return result;
16902}
16903static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
16904 PyObject *result;
16905 __pyx_CyFunctionObject *cyfunc = __Pyx_as_CyFunctionObject(func);
16906#if CYTHON_VECTORCALL
16907 __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc);
16908 if (vc) {
16909#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
16910 return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw);
16911#else
16912 (void) &__Pyx_PyVectorcall_FastCallDict;
16913 return PyVectorcall_Call(func, args, kw);
16914#endif
16915 }
16916#endif
16917 if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
16918 Py_ssize_t argc;
16919 PyObject *new_args;
16920 PyObject *self;
16921#if CYTHON_ASSUME_SAFE_SIZE
16922 argc = PyTuple_GET_SIZE(args);
16923#else
16924 argc = PyTuple_Size(args);
16925 if (unlikely(argc < 0)) return NULL;
16926#endif
16927 new_args = PyTuple_GetSlice(args, 1, argc);
16928 if (unlikely(!new_args))
16929 return NULL;
16930 self = PyTuple_GetItem(args, 0);
16931 if (unlikely(!self)) {
16932 Py_DECREF(new_args);
16933 PyErr_Format(PyExc_TypeError,
16934 "unbound method %.200S() needs an argument",
16935 cyfunc->func_qualname);
16936 return NULL;
16937 }
16938 result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
16939 Py_DECREF(new_args);
16940 } else {
16941 result = __Pyx_CyFunction_Call(func, args, kw);
16942 }
16943 return result;
16944}
16945#if CYTHON_VECTORCALL
16946static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(PyObject *func, __pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames)
16947{
16948 int ret = 0;
16949 if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
16950 if (unlikely(nargs < 1)) {
16951 __Pyx_CyFunction_raise_type_error(
16952 func, "needs an argument");
16953 return -1;
16954 }
16955 ret = 1;
16956 }
16957 if (unlikely(kwnames) && unlikely(__Pyx_PyTuple_GET_SIZE(kwnames))) {
16958 __Pyx_CyFunction_raise_type_error(
16959 func, "takes no keyword arguments");
16960 return -1;
16961 }
16962 return ret;
16963}
16964static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
16965{
16966 __pyx_CyFunctionObject *cyfunc = __Pyx_as_CyFunctionObject(func);
16967 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
16968 PyObject *self;
16969#if CYTHON_COMPILING_IN_LIMITED_API
16970 PyCFunction meth = cyfunc->func_methoddef->ml_meth;
16971 if (unlikely(!meth)) return NULL;
16972#else
16973 PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
16974#endif
16975 switch (__Pyx_CyFunction_Vectorcall_CheckArgs(func, cyfunc, nargs, kwnames)) {
16976 case 1:
16977 self = args[0];
16978 args += 1;
16979 nargs -= 1;
16980 break;
16981 case 0:
16982 self = func;
16983 break;
16984 default:
16985 return NULL;
16986 }
16987 if (unlikely(nargs != 0)) {
16988 __Pyx_CyFunction_raise_argument_count_error(
16989 func, "takes no arguments", nargs);
16990 return NULL;
16991 }
16992 return meth(self, NULL);
16993}
16994static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
16995{
16996 __pyx_CyFunctionObject *cyfunc = __Pyx_as_CyFunctionObject(func);
16997 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
16998 PyObject *self;
16999#if CYTHON_COMPILING_IN_LIMITED_API
17000 PyCFunction meth = cyfunc->func_methoddef->ml_meth;
17001 if (unlikely(!meth)) return NULL;
17002#else
17003 PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
17004#endif
17005 switch (__Pyx_CyFunction_Vectorcall_CheckArgs(func, cyfunc, nargs, kwnames)) {
17006 case 1:
17007 self = args[0];
17008 args += 1;
17009 nargs -= 1;
17010 break;
17011 case 0:
17012 self = func;
17013 break;
17014 default:
17015 return NULL;
17016 }
17017 if (unlikely(nargs != 1)) {
17018 __Pyx_CyFunction_raise_argument_count_error(
17019 func, "takes exactly one argument", nargs);
17020 return NULL;
17021 }
17022 return meth(self, args[0]);
17023}
17024static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
17025{
17026 __pyx_CyFunctionObject *cyfunc = __Pyx_as_CyFunctionObject(func);
17027 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
17028 PyObject *self;
17029#if CYTHON_COMPILING_IN_LIMITED_API
17030 PyCFunction meth = cyfunc->func_methoddef->ml_meth;
17031 if (unlikely(!meth)) return NULL;
17032#else
17033 PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
17034#endif
17035 switch (__Pyx_CyFunction_Vectorcall_CheckArgs(func, cyfunc, nargs, NULL)) {
17036 case 1:
17037 self = args[0];
17038 args += 1;
17039 nargs -= 1;
17040 break;
17041 case 0:
17042 self = func;
17043 break;
17044 default:
17045 return NULL;
17046 }
17047 return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))meth)(self, args, nargs, kwnames);
17048}
17049static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
17050{
17051 __pyx_CyFunctionObject *cyfunc = __Pyx_as_CyFunctionObject(func);
17052 PyTypeObject *cls = (PyTypeObject *) __Pyx__CyFunction_GetClassObj(cyfunc);
17053 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
17054 PyObject *self;
17055#if CYTHON_COMPILING_IN_LIMITED_API
17056 PyCFunction meth = cyfunc->func_methoddef->ml_meth;
17057 if (unlikely(!meth)) return NULL;
17058#else
17059 PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
17060#endif
17061 switch (__Pyx_CyFunction_Vectorcall_CheckArgs(func, cyfunc, nargs, NULL)) {
17062 case 1:
17063 self = args[0];
17064 args += 1;
17065 nargs -= 1;
17066 break;
17067 case 0:
17068 self = func;
17069 break;
17070 default:
17071 return NULL;
17072 }
17073 #if PY_VERSION_HEX < 0x030e00A6
17074 size_t nargs_value = (size_t) nargs;
17075 #else
17076 Py_ssize_t nargs_value = nargs;
17077 #endif
17078 return ((__Pyx_PyCMethod)(void(*)(void))meth)(self, cls, args, nargs_value, kwnames);
17079}
17080#endif
17081static PyType_Slot __pyx_CyFunctionType_slots[] = {
17082 {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc},
17083 {Py_tp_repr, (void *)__Pyx_CyFunction_repr},
17084 {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod},
17085 {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse},
17086 {Py_tp_clear, (void *)__Pyx_CyFunction_clear},
17087 {Py_tp_methods, (void *)__pyx_CyFunction_methods},
17088 {Py_tp_members, (void *)__pyx_CyFunction_members},
17089 {Py_tp_getset, (void *)__pyx_CyFunction_getsets},
17090 {Py_tp_descr_get, (void *)__Pyx_PyMethod_New},
17091 {0, 0},
17092};
17093static PyType_Spec __pyx_CyFunctionType_spec = {
17094 __PYX_TYPE_MODULE_PREFIX "cython_function_or_method",
17095 __PYX_SHARED_SIZEOF(__pyx_CyFunctionObject),
17096 0,
17097#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR
17098 Py_TPFLAGS_METHOD_DESCRIPTOR |
17099#endif
17100#if CYTHON_VECTORCALL
17101#if defined(Py_TPFLAGS_HAVE_VECTORCALL)
17102 Py_TPFLAGS_HAVE_VECTORCALL |
17103#elif defined(_Py_TPFLAGS_HAVE_VECTORCALL)
17104 _Py_TPFLAGS_HAVE_VECTORCALL |
17105#endif
17106#endif // CYTHON_VECTORCALL
17107#if PY_VERSION_HEX >= 0x030C0000 && !CYTHON_COMPILING_IN_LIMITED_API
17108 Py_TPFLAGS_MANAGED_DICT |
17109#endif
17110 Py_TPFLAGS_IMMUTABLETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION |
17111 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
17112 __pyx_CyFunctionType_slots
17113};
17114static int __pyx_CyFunction_init(PyObject *module) {
17115 __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module);
17116 mstate->__pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec(
17117 mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_CyFunctionType_spec, NULL);
17118 if (unlikely(mstate->__pyx_CyFunctionType == NULL)) {
17119 return -1;
17120 }
17121 return 0;
17122}
17123
17124/* CythonFunction */
17125static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname,
17126 PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
17127 (void)&__Pyx_Get_CyFunction_Type;
17128 PyObject *op = __Pyx_CyFunction_Init(
17129 PyObject_GC_New(PyObject, __pyx_mstate_global->__pyx_CyFunctionType),
17130 ml, flags, qualname, closure, module, globals, code
17131 );
17132 if (likely(op)) {
17133 PyObject_GC_Track(op);
17134 }
17135 return op;
17136}
17137static PyTypeObject *__Pyx_Get_CyFunction_Type(void) {
17138 PyTypeObject *tp = __pyx_mstate_global->__pyx_CyFunctionType;
17139 Py_INCREF((PyObject*)tp);
17140 return tp;
17141}
17142
17143/* PyDictVersioning (used by CLineInTraceback) */
17144#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
17145static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
17146 PyObject *dict = Py_TYPE(obj)->tp_dict;
17147 return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
17148}
17149static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
17150 PyObject **dictptr = NULL;
17151 Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
17152 if (offset) {
17153#if CYTHON_COMPILING_IN_CPYTHON
17154 dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
17155#else
17156 dictptr = _PyObject_GetDictPtr(obj);
17157#endif
17158 }
17159 return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
17160}
17161static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
17162 PyObject *dict = Py_TYPE(obj)->tp_dict;
17163 if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
17164 return 0;
17165 return obj_dict_version == __Pyx_get_object_dict_version(obj);
17166}
17167#endif
17168
17169/* CLineInTraceback (used by AddTraceback) */
17170#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME
17171#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
17172#define __Pyx_PyProbablyModule_GetDict(o) __Pyx_XNewRef(PyModule_GetDict(o))
17173#elif !CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
17174#define __Pyx_PyProbablyModule_GetDict(o) PyObject_GenericGetDict(o, NULL);
17175#else
17176PyObject* __Pyx_PyProbablyModule_GetDict(PyObject *o) {
17177 PyObject **dict_ptr = _PyObject_GetDictPtr(o);
17178 return dict_ptr ? __Pyx_XNewRef(*dict_ptr) : NULL;
17179}
17180#endif
17181static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
17182 PyObject *use_cline = NULL;
17183 PyObject *ptype, *pvalue, *ptraceback;
17184 PyObject *cython_runtime_dict;
17185 CYTHON_MAYBE_UNUSED_VAR(tstate);
17186 if (unlikely(!__pyx_mstate_global->__pyx_cython_runtime)) {
17187 return c_line;
17188 }
17189 __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
17190 cython_runtime_dict = __Pyx_PyProbablyModule_GetDict(__pyx_mstate_global->__pyx_cython_runtime);
17191 if (likely(cython_runtime_dict)) {
17192 __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
17193 use_cline, cython_runtime_dict,
17194 __Pyx_PyDict_SetDefault(cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False))
17195 }
17196 if (use_cline == NULL || use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
17197 c_line = 0;
17198 }
17199 Py_XDECREF(use_cline);
17200 Py_XDECREF(cython_runtime_dict);
17201 __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
17202 return c_line;
17203}
17204#endif
17205
17206/* CodeObjectCache (used by AddTraceback) */
17207static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
17208 int start = 0, mid = 0, end = count - 1;
17209 if (end >= 0 && code_line > entries[end].code_line) {
17210 return count;
17211 }
17212 while (start < end) {
17213 mid = start + (end - start) / 2;
17214 if (code_line < entries[mid].code_line) {
17215 end = mid;
17216 } else if (code_line > entries[mid].code_line) {
17217 start = mid + 1;
17218 } else {
17219 return mid;
17220 }
17221 }
17222 if (code_line <= entries[mid].code_line) {
17223 return mid;
17224 } else {
17225 return mid + 1;
17226 }
17227}
17228static __Pyx_CachedCodeObjectType *__pyx__find_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line) {
17229 __Pyx_CachedCodeObjectType* code_object;
17230 int pos;
17231 if (unlikely(!code_line) || unlikely(!code_cache->entries)) {
17232 return NULL;
17233 }
17234 pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line);
17235 if (unlikely(pos >= code_cache->count) || unlikely(code_cache->entries[pos].code_line != code_line)) {
17236 return NULL;
17237 }
17238 code_object = code_cache->entries[pos].code_object;
17239 Py_INCREF(code_object);
17240 return code_object;
17241}
17242static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line) {
17243#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS
17244 (void)__pyx__find_code_object;
17245 return NULL; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just miss.
17246#else
17247 struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache;
17248#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
17249 __pyx_nonatomic_int_type old_count = __pyx_atomic_incr_acq_rel(&code_cache->accessor_count);
17250 if (old_count < 0) {
17251 __pyx_atomic_decr_acq_rel(&code_cache->accessor_count);
17252 return NULL;
17253 }
17254#endif
17255 __Pyx_CachedCodeObjectType *result = __pyx__find_code_object(code_cache, code_line);
17256#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
17257 __pyx_atomic_decr_acq_rel(&code_cache->accessor_count);
17258#endif
17259 return result;
17260#endif
17261}
17262static void __pyx__insert_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line, __Pyx_CachedCodeObjectType* code_object)
17263{
17264 int pos, i;
17265 __Pyx_CodeObjectCacheEntry* entries = code_cache->entries;
17266 if (unlikely(!code_line)) {
17267 return;
17268 }
17269 if (unlikely(!entries)) {
17270 entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
17271 if (likely(entries)) {
17272 code_cache->entries = entries;
17273 code_cache->max_count = 64;
17274 code_cache->count = 1;
17275 entries[0].code_line = code_line;
17276 entries[0].code_object = code_object;
17277 Py_INCREF(code_object);
17278 }
17279 return;
17280 }
17281 pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line);
17282 if ((pos < code_cache->count) && unlikely(code_cache->entries[pos].code_line == code_line)) {
17283 __Pyx_CachedCodeObjectType* tmp = entries[pos].code_object;
17284 entries[pos].code_object = code_object;
17285 Py_INCREF(code_object);
17286 Py_DECREF(tmp);
17287 return;
17288 }
17289 if (code_cache->count == code_cache->max_count) {
17290 int new_max = code_cache->max_count + 64;
17291 entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
17292 code_cache->entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
17293 if (unlikely(!entries)) {
17294 return;
17295 }
17296 code_cache->entries = entries;
17297 code_cache->max_count = new_max;
17298 }
17299 for (i=code_cache->count; i>pos; i--) {
17300 entries[i] = entries[i-1];
17301 }
17302 entries[pos].code_line = code_line;
17303 entries[pos].code_object = code_object;
17304 code_cache->count++;
17305 Py_INCREF(code_object);
17306}
17307static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object) {
17308#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS
17309 (void)__pyx__insert_code_object;
17310 return; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just fail.
17311#else
17312 struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache;
17313#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
17314 __pyx_nonatomic_int_type expected = 0;
17315 if (!__pyx_atomic_int_cmp_exchange(&code_cache->accessor_count, &expected, INT_MIN)) {
17316 return;
17317 }
17318#endif
17319 __pyx__insert_code_object(code_cache, code_line, code_object);
17320#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
17321 __pyx_atomic_sub(&code_cache->accessor_count, INT_MIN);
17322#endif
17323#endif
17324}
17325
17326/* AddTraceback */
17327#include "compile.h"
17328#include "frameobject.h"
17329#include "traceback.h"
17330#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API && !defined(PYPY_VERSION)
17331 #ifndef Py_BUILD_CORE
17332 #define Py_BUILD_CORE 1
17333 #endif
17334 #include "internal/pycore_frame.h"
17335#endif
17336#if CYTHON_COMPILING_IN_LIMITED_API
17337static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict,
17338 PyObject *firstlineno, PyObject *name) {
17339 PyObject *replace = NULL;
17340 if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL;
17341 if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL;
17342 replace = PyObject_GetAttrString(code, "replace");
17343 if (likely(replace)) {
17344 PyObject *result = PyObject_Call(replace, __pyx_mstate_global->__pyx_empty_tuple, scratch_dict);
17345 Py_DECREF(replace);
17346 return result;
17347 }
17348 return NULL;
17349}
17350static void __Pyx_AddTraceback(const char *funcname, int c_line,
17351 int py_line, const char *filename) {
17352 PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL;
17353 PyObject *replace = NULL, *getframe = NULL, *frame = NULL;
17354 PyObject *exc_type, *exc_value, *exc_traceback;
17355 int success = 0;
17356 if (c_line) {
17357 c_line = __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line);
17358 }
17359 __Pyx_PyErr_FetchException(&exc_type, &exc_value, &exc_traceback);
17360 code_object = __pyx_find_code_object(c_line ? -c_line : py_line);
17361 if (!code_object) {
17362 code_object = Py_CompileString("_getframe()", filename, Py_eval_input);
17363 if (unlikely(!code_object)) goto bad;
17364 py_py_line = PyLong_FromLong(py_line);
17365 if (unlikely(!py_py_line)) goto bad;
17366 if (c_line) {
17367 py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
17368 } else {
17369 py_funcname = PyUnicode_FromString(funcname);
17370 }
17371 if (unlikely(!py_funcname)) goto bad;
17372 dict = PyDict_New();
17373 if (unlikely(!dict)) goto bad;
17374 {
17375 PyObject *old_code_object = code_object;
17376 code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname);
17377 Py_DECREF(old_code_object);
17378 }
17379 if (unlikely(!code_object)) goto bad;
17380 __pyx_insert_code_object(c_line ? -c_line : py_line, code_object);
17381 } else {
17382 dict = PyDict_New();
17383 }
17384 getframe = PySys_GetObject("_getframe");
17385 if (unlikely(!getframe)) goto bad;
17386 if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad;
17387 frame = PyEval_EvalCode(code_object, dict, dict);
17388 if (unlikely(!frame) || frame == Py_None) goto bad;
17389 success = 1;
17390 bad:
17391 __Pyx_PyErr_RestoreException(exc_type, exc_value, exc_traceback);
17392 Py_XDECREF(code_object);
17393 Py_XDECREF(py_py_line);
17394 Py_XDECREF(py_funcname);
17395 Py_XDECREF(dict);
17396 Py_XDECREF(replace);
17397 if (success) {
17398 PyTraceBack_Here(
17399 (struct _frame*)frame);
17400 }
17401 Py_XDECREF(frame);
17402}
17403#else
17404static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
17405 const char *funcname, int c_line,
17406 int py_line, const char *filename) {
17407 PyCodeObject *py_code = NULL;
17408 PyObject *py_funcname = NULL;
17409 if (c_line) {
17410 py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
17411 if (!py_funcname) goto bad;
17412 funcname = PyUnicode_AsUTF8(py_funcname);
17413 if (!funcname) goto bad;
17414 }
17415 py_code = PyCode_NewEmpty(filename, funcname, py_line);
17416 Py_XDECREF(py_funcname);
17417 return py_code;
17418bad:
17419 Py_XDECREF(py_funcname);
17420 return NULL;
17421}
17422static void __Pyx_AddTraceback(const char *funcname, int c_line,
17423 int py_line, const char *filename) {
17424 PyCodeObject *py_code = 0;
17425 PyFrameObject *py_frame = 0;
17426 PyThreadState *tstate = __Pyx_PyThreadState_Current;
17427 PyObject *ptype, *pvalue, *ptraceback;
17428 if (c_line) {
17429 c_line = __Pyx_CLineForTraceback(tstate, c_line);
17430 }
17431 py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
17432 if (!py_code) {
17433 __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
17434 py_code = __Pyx_CreateCodeObjectForTraceback(
17435 funcname, c_line, py_line, filename);
17436 if (!py_code) {
17437 /* If the code object creation fails, then we should clear the
17438 fetched exception references and propagate the new exception */
17439 Py_XDECREF(ptype);
17440 Py_XDECREF(pvalue);
17441 Py_XDECREF(ptraceback);
17442 goto bad;
17443 }
17444 __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
17445 __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
17446 }
17447 py_frame = PyFrame_New(
17448 tstate, /*PyThreadState *tstate,*/
17449 py_code, /*PyCodeObject *code,*/
17450 __pyx_mstate_global->__pyx_d, /*PyObject *globals,*/
17451 0 /*PyObject *locals*/
17452 );
17453 if (!py_frame) goto bad;
17454 __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
17455 PyTraceBack_Here(py_frame);
17456bad:
17457 Py_XDECREF(py_code);
17458 Py_XDECREF(py_frame);
17459}
17460#endif
17461
17462/* CIntFromPyVerify */
17463#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
17464 __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
17465#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
17466 __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
17467#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
17468 {\
17469 func_type value = func_value;\
17470 if (sizeof(target_type) < sizeof(func_type)) {\
17471 if (unlikely(value != (func_type) (target_type) value)) {\
17472 func_type zero = 0;\
17473 if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
17474 return (target_type) -1;\
17475 if (is_unsigned && unlikely(value < zero))\
17476 goto raise_neg_overflow;\
17477 else\
17478 goto raise_overflow;\
17479 }\
17480 }\
17481 return (target_type) value;\
17482 }
17483
17484/* Declarations */
17485#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
17486 #ifdef __cplusplus
17487 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
17488 return ::std::complex< float >(x, y);
17489 }
17490 #else
17491 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
17492 return x + y*(__pyx_t_float_complex)_Complex_I;
17493 }
17494 #endif
17495#else
17496 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
17497 __pyx_t_float_complex z;
17498 z.real = x;
17499 z.imag = y;
17500 return z;
17501 }
17502#endif
17503
17504/* Arithmetic */
17505#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
17506#else
17507 static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
17508 return (a.real == b.real) && (a.imag == b.imag);
17509 }
17510 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
17511 __pyx_t_float_complex z;
17512 z.real = a.real + b.real;
17513 z.imag = a.imag + b.imag;
17514 return z;
17515 }
17516 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
17517 __pyx_t_float_complex z;
17518 z.real = a.real - b.real;
17519 z.imag = a.imag - b.imag;
17520 return z;
17521 }
17522 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
17523 __pyx_t_float_complex z;
17524 z.real = a.real * b.real - a.imag * b.imag;
17525 z.imag = a.real * b.imag + a.imag * b.real;
17526 return z;
17527 }
17528 #if 1
17529 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
17530 if (b.imag == 0) {
17531 return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
17532 } else if (fabsf(b.real) >= fabsf(b.imag)) {
17533 if (b.real == 0 && b.imag == 0) {
17534 return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.imag);
17535 } else {
17536 float r = b.imag / b.real;
17537 float s = (float)(1.0) / (b.real + b.imag * r);
17538 return __pyx_t_float_complex_from_parts(
17539 (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
17540 }
17541 } else {
17542 float r = b.real / b.imag;
17543 float s = (float)(1.0) / (b.imag + b.real * r);
17544 return __pyx_t_float_complex_from_parts(
17545 (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
17546 }
17547 }
17548 #else
17549 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
17550 if (b.imag == 0) {
17551 return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
17552 } else {
17553 float denom = b.real * b.real + b.imag * b.imag;
17554 return __pyx_t_float_complex_from_parts(
17555 (a.real * b.real + a.imag * b.imag) / denom,
17556 (a.imag * b.real - a.real * b.imag) / denom);
17557 }
17558 }
17559 #endif
17560 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex a) {
17561 __pyx_t_float_complex z;
17562 z.real = -a.real;
17563 z.imag = -a.imag;
17564 return z;
17565 }
17566 static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex a) {
17567 return (a.real == 0) && (a.imag == 0);
17568 }
17569 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex a) {
17570 __pyx_t_float_complex z;
17571 z.real = a.real;
17572 z.imag = -a.imag;
17573 return z;
17574 }
17575 #if 1
17576 static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex z) {
17577 #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
17578 return sqrtf(z.real*z.real + z.imag*z.imag);
17579 #else
17580 return hypotf(z.real, z.imag);
17581 #endif
17582 }
17583 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
17584 __pyx_t_float_complex z;
17585 float r, lnr, theta, z_r, z_theta;
17586 if (b.imag == 0 && b.real == (int)b.real) {
17587 if (b.real < 0) {
17588 float denom = a.real * a.real + a.imag * a.imag;
17589 a.real = a.real / denom;
17590 a.imag = -a.imag / denom;
17591 b.real = -b.real;
17592 }
17593 switch ((int)b.real) {
17594 case 0:
17595 z.real = 1;
17596 z.imag = 0;
17597 return z;
17598 case 1:
17599 return a;
17600 case 2:
17601 return __Pyx_c_prod_float(a, a);
17602 case 3:
17603 z = __Pyx_c_prod_float(a, a);
17604 return __Pyx_c_prod_float(z, a);
17605 case 4:
17606 z = __Pyx_c_prod_float(a, a);
17607 return __Pyx_c_prod_float(z, z);
17608 }
17609 }
17610 if (a.imag == 0) {
17611 if (a.real == 0) {
17612 return a;
17613 } else if ((b.imag == 0) && (a.real >= 0)) {
17614 z.real = powf(a.real, b.real);
17615 z.imag = 0;
17616 return z;
17617 } else if (a.real > 0) {
17618 r = a.real;
17619 theta = 0;
17620 } else {
17621 r = -a.real;
17622 theta = atan2f(0.0, -1.0);
17623 }
17624 } else {
17625 r = __Pyx_c_abs_float(a);
17626 theta = atan2f(a.imag, a.real);
17627 }
17628 lnr = logf(r);
17629 z_r = expf(lnr * b.real - theta * b.imag);
17630 z_theta = theta * b.real + lnr * b.imag;
17631 z.real = z_r * cosf(z_theta);
17632 z.imag = z_r * sinf(z_theta);
17633 return z;
17634 }
17635 #endif
17636#endif
17637
17638/* Declarations */
17639#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
17640 #ifdef __cplusplus
17641 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
17642 return ::std::complex< double >(x, y);
17643 }
17644 #else
17645 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
17646 return x + y*(__pyx_t_double_complex)_Complex_I;
17647 }
17648 #endif
17649#else
17650 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
17651 __pyx_t_double_complex z;
17652 z.real = x;
17653 z.imag = y;
17654 return z;
17655 }
17656#endif
17657
17658/* Arithmetic */
17659#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
17660#else
17661 static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
17662 return (a.real == b.real) && (a.imag == b.imag);
17663 }
17664 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
17665 __pyx_t_double_complex z;
17666 z.real = a.real + b.real;
17667 z.imag = a.imag + b.imag;
17668 return z;
17669 }
17670 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
17671 __pyx_t_double_complex z;
17672 z.real = a.real - b.real;
17673 z.imag = a.imag - b.imag;
17674 return z;
17675 }
17676 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
17677 __pyx_t_double_complex z;
17678 z.real = a.real * b.real - a.imag * b.imag;
17679 z.imag = a.real * b.imag + a.imag * b.real;
17680 return z;
17681 }
17682 #if 1
17683 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
17684 if (b.imag == 0) {
17685 return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
17686 } else if (fabs(b.real) >= fabs(b.imag)) {
17687 if (b.real == 0 && b.imag == 0) {
17688 return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.imag);
17689 } else {
17690 double r = b.imag / b.real;
17691 double s = (double)(1.0) / (b.real + b.imag * r);
17692 return __pyx_t_double_complex_from_parts(
17693 (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
17694 }
17695 } else {
17696 double r = b.real / b.imag;
17697 double s = (double)(1.0) / (b.imag + b.real * r);
17698 return __pyx_t_double_complex_from_parts(
17699 (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
17700 }
17701 }
17702 #else
17703 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
17704 if (b.imag == 0) {
17705 return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
17706 } else {
17707 double denom = b.real * b.real + b.imag * b.imag;
17708 return __pyx_t_double_complex_from_parts(
17709 (a.real * b.real + a.imag * b.imag) / denom,
17710 (a.imag * b.real - a.real * b.imag) / denom);
17711 }
17712 }
17713 #endif
17714 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex a) {
17715 __pyx_t_double_complex z;
17716 z.real = -a.real;
17717 z.imag = -a.imag;
17718 return z;
17719 }
17720 static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex a) {
17721 return (a.real == 0) && (a.imag == 0);
17722 }
17723 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex a) {
17724 __pyx_t_double_complex z;
17725 z.real = a.real;
17726 z.imag = -a.imag;
17727 return z;
17728 }
17729 #if 1
17730 static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex z) {
17731 #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
17732 return sqrt(z.real*z.real + z.imag*z.imag);
17733 #else
17734 return hypot(z.real, z.imag);
17735 #endif
17736 }
17737 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
17738 __pyx_t_double_complex z;
17739 double r, lnr, theta, z_r, z_theta;
17740 if (b.imag == 0 && b.real == (int)b.real) {
17741 if (b.real < 0) {
17742 double denom = a.real * a.real + a.imag * a.imag;
17743 a.real = a.real / denom;
17744 a.imag = -a.imag / denom;
17745 b.real = -b.real;
17746 }
17747 switch ((int)b.real) {
17748 case 0:
17749 z.real = 1;
17750 z.imag = 0;
17751 return z;
17752 case 1:
17753 return a;
17754 case 2:
17755 return __Pyx_c_prod_double(a, a);
17756 case 3:
17757 z = __Pyx_c_prod_double(a, a);
17758 return __Pyx_c_prod_double(z, a);
17759 case 4:
17760 z = __Pyx_c_prod_double(a, a);
17761 return __Pyx_c_prod_double(z, z);
17762 }
17763 }
17764 if (a.imag == 0) {
17765 if (a.real == 0) {
17766 return a;
17767 } else if ((b.imag == 0) && (a.real >= 0)) {
17768 z.real = pow(a.real, b.real);
17769 z.imag = 0;
17770 return z;
17771 } else if (a.real > 0) {
17772 r = a.real;
17773 theta = 0;
17774 } else {
17775 r = -a.real;
17776 theta = atan2(0.0, -1.0);
17777 }
17778 } else {
17779 r = __Pyx_c_abs_double(a);
17780 theta = atan2(a.imag, a.real);
17781 }
17782 lnr = log(r);
17783 z_r = exp(lnr * b.real - theta * b.imag);
17784 z_theta = theta * b.real + lnr * b.imag;
17785 z.real = z_r * cos(z_theta);
17786 z.imag = z_r * sin(z_theta);
17787 return z;
17788 }
17789 #endif
17790#endif
17791
17792/* Declarations */
17793#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
17794 #ifdef __cplusplus
17795 static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double x, long double y) {
17796 return ::std::complex< long double >(x, y);
17797 }
17798 #else
17799 static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double x, long double y) {
17800 return x + y*(__pyx_t_long_double_complex)_Complex_I;
17801 }
17802 #endif
17803#else
17804 static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double x, long double y) {
17805 __pyx_t_long_double_complex z;
17806 z.real = x;
17807 z.imag = y;
17808 return z;
17809 }
17810#endif
17811
17812/* Arithmetic */
17813#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
17814#else
17815 static CYTHON_INLINE int __Pyx_c_eq_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
17816 return (a.real == b.real) && (a.imag == b.imag);
17817 }
17818 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_sum_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
17819 __pyx_t_long_double_complex z;
17820 z.real = a.real + b.real;
17821 z.imag = a.imag + b.imag;
17822 return z;
17823 }
17824 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_diff_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
17825 __pyx_t_long_double_complex z;
17826 z.real = a.real - b.real;
17827 z.imag = a.imag - b.imag;
17828 return z;
17829 }
17830 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_prod_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
17831 __pyx_t_long_double_complex z;
17832 z.real = a.real * b.real - a.imag * b.imag;
17833 z.imag = a.real * b.imag + a.imag * b.real;
17834 return z;
17835 }
17836 #if 1
17837 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_quot_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
17838 if (b.imag == 0) {
17839 return __pyx_t_long_double_complex_from_parts(a.real / b.real, a.imag / b.real);
17840 } else if (fabsl(b.real) >= fabsl(b.imag)) {
17841 if (b.real == 0 && b.imag == 0) {
17842 return __pyx_t_long_double_complex_from_parts(a.real / b.real, a.imag / b.imag);
17843 } else {
17844 long double r = b.imag / b.real;
17845 long double s = (long double)(1.0) / (b.real + b.imag * r);
17846 return __pyx_t_long_double_complex_from_parts(
17847 (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
17848 }
17849 } else {
17850 long double r = b.real / b.imag;
17851 long double s = (long double)(1.0) / (b.imag + b.real * r);
17852 return __pyx_t_long_double_complex_from_parts(
17853 (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
17854 }
17855 }
17856 #else
17857 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_quot_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
17858 if (b.imag == 0) {
17859 return __pyx_t_long_double_complex_from_parts(a.real / b.real, a.imag / b.real);
17860 } else {
17861 long double denom = b.real * b.real + b.imag * b.imag;
17862 return __pyx_t_long_double_complex_from_parts(
17863 (a.real * b.real + a.imag * b.imag) / denom,
17864 (a.imag * b.real - a.real * b.imag) / denom);
17865 }
17866 }
17867 #endif
17868 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_neg_long__double(__pyx_t_long_double_complex a) {
17869 __pyx_t_long_double_complex z;
17870 z.real = -a.real;
17871 z.imag = -a.imag;
17872 return z;
17873 }
17874 static CYTHON_INLINE int __Pyx_c_is_zero_long__double(__pyx_t_long_double_complex a) {
17875 return (a.real == 0) && (a.imag == 0);
17876 }
17877 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_conj_long__double(__pyx_t_long_double_complex a) {
17878 __pyx_t_long_double_complex z;
17879 z.real = a.real;
17880 z.imag = -a.imag;
17881 return z;
17882 }
17883 #if 1
17884 static CYTHON_INLINE long double __Pyx_c_abs_long__double(__pyx_t_long_double_complex z) {
17885 #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
17886 return sqrtl(z.real*z.real + z.imag*z.imag);
17887 #else
17888 return hypotl(z.real, z.imag);
17889 #endif
17890 }
17891 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_pow_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
17892 __pyx_t_long_double_complex z;
17893 long double r, lnr, theta, z_r, z_theta;
17894 if (b.imag == 0 && b.real == (int)b.real) {
17895 if (b.real < 0) {
17896 long double denom = a.real * a.real + a.imag * a.imag;
17897 a.real = a.real / denom;
17898 a.imag = -a.imag / denom;
17899 b.real = -b.real;
17900 }
17901 switch ((int)b.real) {
17902 case 0:
17903 z.real = 1;
17904 z.imag = 0;
17905 return z;
17906 case 1:
17907 return a;
17908 case 2:
17909 return __Pyx_c_prod_long__double(a, a);
17910 case 3:
17911 z = __Pyx_c_prod_long__double(a, a);
17912 return __Pyx_c_prod_long__double(z, a);
17913 case 4:
17914 z = __Pyx_c_prod_long__double(a, a);
17915 return __Pyx_c_prod_long__double(z, z);
17916 }
17917 }
17918 if (a.imag == 0) {
17919 if (a.real == 0) {
17920 return a;
17921 } else if ((b.imag == 0) && (a.real >= 0)) {
17922 z.real = powl(a.real, b.real);
17923 z.imag = 0;
17924 return z;
17925 } else if (a.real > 0) {
17926 r = a.real;
17927 theta = 0;
17928 } else {
17929 r = -a.real;
17930 theta = atan2l(0.0, -1.0);
17931 }
17932 } else {
17933 r = __Pyx_c_abs_long__double(a);
17934 theta = atan2l(a.imag, a.real);
17935 }
17936 lnr = logl(r);
17937 z_r = expl(lnr * b.real - theta * b.imag);
17938 z_theta = theta * b.real + lnr * b.imag;
17939 z.real = z_r * cosl(z_theta);
17940 z.imag = z_r * sinl(z_theta);
17941 return z;
17942 }
17943 #endif
17944#endif
17945
17946/* CIntFromPy */
17947static int __Pyx_LargePyLong___Pyx_PyLong_As_int(PyObject *x);
17948static int __Pyx_raise_neg_overflow___Pyx_PyLong_As_int(void) {
17949 const char* type_name = "int";
17950 PyErr_Format(PyExc_OverflowError,
17951 "can't convert negative value to %.200s", type_name);
17952 return (int) -1;
17953}
17954static int __Pyx_raise_overflow___Pyx_PyLong_As_int(void) {
17955 const char* type_name = "int";
17956 PyErr_Format(PyExc_OverflowError,
17957 "value too large to convert to %.200s", type_name);
17958 return (int) -1;
17959}
17960static CYTHON_INLINE int __Pyx_PyULong___Pyx_PyLong_As_int(PyObject *x) {
17961 const int is_unsigned = 1;
17962#if CYTHON_USE_PYLONG_INTERNALS
17963 {
17964 const digit* digits = __Pyx_PyLong_Digits(x);
17965 const Py_ssize_t size = __Pyx_PyLong_DigitCount(x);
17966 if (size == 2 && (8 * sizeof(int) > 1 * PyLong_SHIFT)) {
17967 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
17968 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
17969 } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) {
17970 return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
17971 }
17972 } else
17973 if (size == 3 && (8 * sizeof(int) > 2 * PyLong_SHIFT)) {
17974 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
17975 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
17976 } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) {
17977 return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
17978 }
17979 } else
17980 if (size == 4 && (8 * sizeof(int) > 3 * PyLong_SHIFT)) {
17981 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
17982 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
17983 } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) {
17984 return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
17985 }
17986 } else
17987 {}
17988 }
17989#elif CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
17990 if (unlikely(Py_SIZE(x) < 0)) {
17991 goto raise_neg_overflow;
17992 }
17993#else
17994 {
17995 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
17996 if (unlikely(result < 0))
17997 return (int) -1;
17998 if (unlikely(result == 1))
17999 goto raise_neg_overflow;
18000 }
18001#endif
18002 if ((sizeof(int) <= sizeof(unsigned long))) {
18003 __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
18004 } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) {
18005 __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
18006 }
18007 return __Pyx_LargePyLong___Pyx_PyLong_As_int(x);
18008raise_neg_overflow:
18009 return __Pyx_raise_neg_overflow___Pyx_PyLong_As_int();
18010raise_overflow:
18011 return __Pyx_raise_overflow___Pyx_PyLong_As_int();
18012}
18013static CYTHON_INLINE int __Pyx_PySLong___Pyx_PyLong_As_int(PyObject *x) {
18014 const int is_unsigned = 0;
18015#if CYTHON_USE_PYLONG_INTERNALS
18016 if (__Pyx_PyLong_IsNeg(x)) {
18017 const Py_ssize_t size = __Pyx_PyLong_DigitCount(x);
18018 const digit* digits = __Pyx_PyLong_Digits(x);
18019 if (size == 2 && (8 * sizeof(int) > 1 * PyLong_SHIFT)) {
18020 if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
18021 long ival = - (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
18022 __PYX_VERIFY_RETURN_INT(int, long, ival)
18023 } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
18024 return (int) (((int) -1) * (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
18025 }
18026 } else
18027 if (size == 3 && (8 * sizeof(int) > 2 * PyLong_SHIFT)) {
18028 if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
18029 long ival = - (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
18030 __PYX_VERIFY_RETURN_INT(int, long, ival)
18031 } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
18032 return (int) (((int) -1) * (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
18033 }
18034 } else
18035 if (size == 4 && (8 * sizeof(int) > 3 * PyLong_SHIFT)) {
18036 if ((8 * sizeof(long) > 4 * PyLong_SHIFT)) {
18037 long ival = - (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
18038 __PYX_VERIFY_RETURN_INT(int, long, ival)
18039 } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
18040 return (int) (((int) -1) * (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
18041 }
18042 } else
18043 {}
18044 } else {
18045 const Py_ssize_t size = __Pyx_PyLong_DigitCount(x);
18046 const digit* digits = __Pyx_PyLong_Digits(x);
18047 if (size == 2 && (8 * sizeof(int) > 1 * PyLong_SHIFT)) {
18048 if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
18049 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
18050 } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
18051 return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
18052 }
18053 } else
18054 if (size == 3 && (8 * sizeof(int) > 2 * PyLong_SHIFT)) {
18055 if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
18056 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
18057 } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
18058 return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
18059 }
18060 } else
18061 if (size == 4 && (8 * sizeof(int) > 3 * PyLong_SHIFT)) {
18062 if ((8 * sizeof(long) > 4 * PyLong_SHIFT)) {
18063 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
18064 } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
18065 return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
18066 }
18067 } else
18068 {}
18069 }
18070#endif
18071 #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
18072 if ((sizeof(int) <= sizeof(int)) && (sizeof(int) < sizeof(long))) {
18073 __PYX_VERIFY_RETURN_INT_EXC(int, int, PyLong_AsInt(x))
18074 } else
18075 #endif
18076 if ((sizeof(int) <= sizeof(long))) {
18077 __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
18078 } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) {
18079 __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
18080 }
18081 return __Pyx_LargePyLong___Pyx_PyLong_As_int(x);
18082raise_neg_overflow:
18083 return __Pyx_raise_neg_overflow___Pyx_PyLong_As_int();
18084raise_overflow:
18085 return __Pyx_raise_overflow___Pyx_PyLong_As_int();
18086}
18087static int __Pyx_LargePyLong___Pyx_PyLong_As_int(PyObject *x) {
18088#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
18089#pragma GCC diagnostic push
18090#pragma GCC diagnostic ignored "-Wconversion"
18091#endif
18092 const int neg_one = (int) -1, const_zero = (int) 0;
18093#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
18094#pragma GCC diagnostic pop
18095#endif
18096 const int is_unsigned = neg_one > const_zero;
18097 int val;
18098 int ret = -1;
18099#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
18100 Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
18101 x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
18102 if (unlikely(bytes_copied == -1)) {
18103 } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
18104 goto raise_overflow;
18105 } else {
18106 ret = 0;
18107 }
18108#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
18109 int one = 1; int is_little = (int)*(unsigned char *)&one;
18110 unsigned char *bytes = (unsigned char *)&val;
18111 ret = _PyLong_AsByteArray((PyLongObject *)x,
18112 bytes, sizeof(val),
18113 is_little, !is_unsigned);
18114 if ((0)) goto raise_overflow;
18115#else
18116 PyObject *v;
18117 PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
18118 int bits, remaining_bits, is_negative = 0;
18119 int chunk_size = (sizeof(long) < 8) ? 30 : 62;
18120 if (likely(PyLong_CheckExact(x))) {
18121 v = __Pyx_NewRef(x);
18122 } else {
18123 v = PyNumber_Long(x);
18124 if (unlikely(!v)) return (int) -1;
18125 assert(PyLong_CheckExact(v));
18126 }
18127 {
18128 int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
18129 if (unlikely(result < 0)) {
18130 Py_DECREF(v);
18131 return (int) -1;
18132 }
18133 is_negative = result == 1;
18134 }
18135 if (is_unsigned && unlikely(is_negative)) {
18136 Py_DECREF(v);
18137 PyErr_SetString(PyExc_OverflowError,
18138 "can't convert negative value to int");
18139 return (int) -1;
18140 } else if (is_negative) {
18141 stepval = PyNumber_Invert(v);
18142 Py_DECREF(v);
18143 if (unlikely(!stepval))
18144 return (int) -1;
18145 } else {
18146 stepval = v;
18147 }
18148 v = NULL;
18149 val = (int) 0;
18150 mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
18151 shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
18152 for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) {
18153 PyObject *tmp, *digit;
18154 long idigit;
18155 digit = PyNumber_And(stepval, mask);
18156 if (unlikely(!digit)) goto done;
18157 idigit = PyLong_AsLong(digit);
18158 Py_DECREF(digit);
18159 if (unlikely(idigit < 0)) goto done;
18160 val |= ((int) idigit) << bits;
18161 tmp = PyNumber_Rshift(stepval, shift);
18162 if (unlikely(!tmp)) goto done;
18163 Py_DECREF(stepval); stepval = tmp;
18164 }
18165 Py_DECREF(shift); shift = NULL;
18166 Py_DECREF(mask); mask = NULL;
18167 {
18168 long idigit = PyLong_AsLong(stepval);
18169 if (unlikely(idigit < 0)) goto done;
18170 remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1);
18171 if (unlikely(idigit >= (1L << remaining_bits)))
18172 goto raise_overflow;
18173 val |= ((int) idigit) << bits;
18174 }
18175 if (!is_unsigned) {
18176 if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1))))
18177 goto raise_overflow;
18178 if (is_negative)
18179 val = ~val;
18180 }
18181 ret = 0;
18182done:
18183 Py_XDECREF(shift);
18184 Py_XDECREF(mask);
18185 Py_XDECREF(stepval);
18186#endif
18187 if (unlikely(ret))
18188 return (int) -1;
18189 return val;
18190raise_overflow:
18191 return __Pyx_raise_overflow___Pyx_PyLong_As_int();
18192}
18193static CYTHON_INLINE int __Pyx_PyLong___Pyx_PyLong_As_int(PyObject *x) {
18194#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
18195#pragma GCC diagnostic push
18196#pragma GCC diagnostic ignored "-Wconversion"
18197#endif
18198 const int neg_one = (int) -1, const_zero = (int) 0;
18199#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
18200#pragma GCC diagnostic pop
18201#endif
18202 const int is_unsigned = neg_one > const_zero;
18203 if (is_unsigned) {
18204 #if CYTHON_USE_PYLONG_INTERNALS
18205 if (unlikely(__Pyx_PyLong_IsNeg(x))) {
18206 goto raise_neg_overflow;
18207 } else if (__Pyx_PyLong_IsCompact(x)) {
18208 __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
18209 } else
18210 #endif
18211 {
18212 return __Pyx_PyULong___Pyx_PyLong_As_int(x);
18213 }
18214 } else {
18215 #if CYTHON_USE_PYLONG_INTERNALS
18216 if (__Pyx_PyLong_IsCompact(x)) {
18217 __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
18218 } else
18219 #endif
18220 {
18221 return __Pyx_PySLong___Pyx_PyLong_As_int(x);
18222 }
18223 }
18224#if CYTHON_USE_PYLONG_INTERNALS
18225raise_neg_overflow:
18226 return __Pyx_raise_neg_overflow___Pyx_PyLong_As_int();
18227raise_overflow:
18228 return __Pyx_raise_overflow___Pyx_PyLong_As_int();
18229#endif
18230}
18231static int __Pyx_NonPyLong___Pyx_PyLong_As_int(PyObject *x) {
18232 int val;
18233 PyObject *tmp = __Pyx_PyNumber_Long(x);
18234 if (!tmp) return (int) -1;
18235 val = __Pyx_PyLong_As_int(tmp);
18236 Py_DECREF(tmp);
18237 return val;
18238}
18239static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *x) {
18240 if (likely(PyLong_Check(x))) {
18241 return __Pyx_PyLong___Pyx_PyLong_As_int(x);
18242 } else {
18243 return __Pyx_NonPyLong___Pyx_PyLong_As_int(x);
18244 }
18245}
18246
18247/* PyObjectVectorcallKwds (used by PyObjectVectorcallMethodKwds) */
18248#if CYTHON_VECTORCALL
18249CYTHON_UNUSED static int __Pyx_CheckVectorcallKwarg(PyObject *kwnames, Py_ssize_t i) {
18250 PyObject *key = __Pyx_PyTuple_GET_ITEM(kwnames, i);
18251#if !CYTHON_ASSUME_SAFE_MACROS
18252 if (unlikely(!key)) return -1;
18253#endif
18254 if (unlikely(!PyUnicode_Check(key))) {
18255 PyErr_SetString(PyExc_TypeError, "keywords must be strings");
18256 return -1;
18257 }
18258 return 0;
18259}
18260#else
18261CYTHON_UNUSED static PyObject *__Pyx_MakeKwargDict(PyObject **keys, PyObject **values, Py_ssize_t n) {
18262 PyObject *out = PyDict_New();
18263 if (unlikely(!out)) return NULL;
18264 for (Py_ssize_t i=0; i<n; ++i) {
18265 if (unlikely(PyDict_SetItem(out, keys[i], values[i]) < 0)) {
18266 Py_DECREF(out);
18267 return NULL;
18268 }
18269 }
18270 return out;
18271}
18272CYTHON_UNUSED static int __Pyx_CheckVectorcallKwarg(PyObject **kwnames, Py_ssize_t i) {
18273 PyObject *key = kwnames[i];
18274 if (unlikely(!PyUnicode_Check(key))) {
18275 PyErr_SetString(PyExc_TypeError, "keywords must be strings");
18276 return -1;
18277 }
18278 return 0;
18279}
18280#endif
18281
18282/* PyObjectVectorcallMethodKwds (used by CIntToPy) */
18283#if !CYTHON_VECTORCALL
18284static PyObject *__Pyx_Object_VectorcallMethodKwds(PyObject *name, PyObject *const *args, size_t nargsf, PyObject *kwnames) {
18285 PyObject *result;
18286 PyObject *obj = PyObject_GetAttr(args[0], name);
18287 if (unlikely(!obj))
18288 return NULL;
18289 result = __Pyx_Object_VectorcallKwds(obj, args+1, nargsf-1, kwnames);
18290 Py_DECREF(obj);
18291 return result;
18292}
18293#endif
18294
18295/* CIntToPy */
18296static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) {
18297#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
18298#pragma GCC diagnostic push
18299#pragma GCC diagnostic ignored "-Wconversion"
18300#endif
18301 const long neg_one = (long) -1, const_zero = (long) 0;
18302#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
18303#pragma GCC diagnostic pop
18304#endif
18305 const int is_unsigned = neg_one > const_zero;
18306 if (is_unsigned) {
18307 if (sizeof(long) < sizeof(long)) {
18308 return PyLong_FromLong((long) value);
18309 } else if (sizeof(long) <= sizeof(unsigned long)) {
18310 return PyLong_FromUnsignedLong((unsigned long) value);
18311#if !CYTHON_COMPILING_IN_PYPY
18312 } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
18313 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
18314#endif
18315 }
18316 } else {
18317 if (sizeof(long) <= sizeof(long)) {
18318 return PyLong_FromLong((long) value);
18319 } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
18320 return PyLong_FromLongLong((PY_LONG_LONG) value);
18321 }
18322 }
18323 {
18324 unsigned char *bytes = (unsigned char *)&value;
18325#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
18326 if (is_unsigned) {
18327 return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
18328 } else {
18329 return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
18330 }
18331#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
18332 int one = 1; int little = (int)*(unsigned char *)&one;
18333 return _PyLong_FromByteArray(bytes, sizeof(long),
18334 little, !is_unsigned);
18335#else
18336 int one = 1; int little = (int)*(unsigned char *)&one;
18337 PyObject *result = NULL, *kwds = NULL;
18338 PyObject *py_bytes = NULL, *order_str = NULL, *from_bytes_str = NULL;;
18339 py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long));
18340 if (!py_bytes) goto limited_bad;
18341 from_bytes_str = PyUnicode_FromStringAndSize("from_bytes", 10);
18342 if (!from_bytes_str) goto limited_bad;
18343 order_str = PyUnicode_FromString(little ? "little" : "big");
18344 if (!order_str) goto limited_bad;
18345 {
18346 PyObject *args[] = { (PyObject*)&PyLong_Type, py_bytes, order_str, Py_True };
18347 if (!is_unsigned) {
18348 PyObject *signed_str = PyUnicode_FromStringAndSize("signed", 6);
18349 if (!signed_str) goto limited_bad;
18350#if CYTHON_VECTORCALL
18351 kwds = PyTuple_Pack(1, signed_str);
18352#else
18353 {
18354 PyObject *keys[] = {signed_str};
18355 PyObject *values[] = {Py_True};
18356 kwds = __Pyx_MakeKwargDict(keys, values, 1);
18357 }
18358#endif
18359 Py_DECREF(signed_str);
18360 if (unlikely(!kwds)) goto limited_bad;
18361 }
18362 result = __Pyx_Object_VectorcallMethodKwds(from_bytes_str, args, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
18363 }
18364 limited_bad:
18365 Py_XDECREF(kwds);
18366 Py_XDECREF(order_str);
18367 Py_XDECREF(py_bytes);
18368 Py_XDECREF(from_bytes_str);
18369 return result;
18370#endif
18371 }
18372}
18373
18374/* CIntToPy */
18375static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int(int value) {
18376#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
18377#pragma GCC diagnostic push
18378#pragma GCC diagnostic ignored "-Wconversion"
18379#endif
18380 const int neg_one = (int) -1, const_zero = (int) 0;
18381#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
18382#pragma GCC diagnostic pop
18383#endif
18384 const int is_unsigned = neg_one > const_zero;
18385 if (is_unsigned) {
18386 if (sizeof(int) < sizeof(long)) {
18387 return PyLong_FromLong((long) value);
18388 } else if (sizeof(int) <= sizeof(unsigned long)) {
18389 return PyLong_FromUnsignedLong((unsigned long) value);
18390#if !CYTHON_COMPILING_IN_PYPY
18391 } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
18392 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
18393#endif
18394 }
18395 } else {
18396 if (sizeof(int) <= sizeof(long)) {
18397 return PyLong_FromLong((long) value);
18398 } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
18399 return PyLong_FromLongLong((PY_LONG_LONG) value);
18400 }
18401 }
18402 {
18403 unsigned char *bytes = (unsigned char *)&value;
18404#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
18405 if (is_unsigned) {
18406 return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
18407 } else {
18408 return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
18409 }
18410#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
18411 int one = 1; int little = (int)*(unsigned char *)&one;
18412 return _PyLong_FromByteArray(bytes, sizeof(int),
18413 little, !is_unsigned);
18414#else
18415 int one = 1; int little = (int)*(unsigned char *)&one;
18416 PyObject *result = NULL, *kwds = NULL;
18417 PyObject *py_bytes = NULL, *order_str = NULL, *from_bytes_str = NULL;;
18418 py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int));
18419 if (!py_bytes) goto limited_bad;
18420 from_bytes_str = PyUnicode_FromStringAndSize("from_bytes", 10);
18421 if (!from_bytes_str) goto limited_bad;
18422 order_str = PyUnicode_FromString(little ? "little" : "big");
18423 if (!order_str) goto limited_bad;
18424 {
18425 PyObject *args[] = { (PyObject*)&PyLong_Type, py_bytes, order_str, Py_True };
18426 if (!is_unsigned) {
18427 PyObject *signed_str = PyUnicode_FromStringAndSize("signed", 6);
18428 if (!signed_str) goto limited_bad;
18429#if CYTHON_VECTORCALL
18430 kwds = PyTuple_Pack(1, signed_str);
18431#else
18432 {
18433 PyObject *keys[] = {signed_str};
18434 PyObject *values[] = {Py_True};
18435 kwds = __Pyx_MakeKwargDict(keys, values, 1);
18436 }
18437#endif
18438 Py_DECREF(signed_str);
18439 if (unlikely(!kwds)) goto limited_bad;
18440 }
18441 result = __Pyx_Object_VectorcallMethodKwds(from_bytes_str, args, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
18442 }
18443 limited_bad:
18444 Py_XDECREF(kwds);
18445 Py_XDECREF(order_str);
18446 Py_XDECREF(py_bytes);
18447 Py_XDECREF(from_bytes_str);
18448 return result;
18449#endif
18450 }
18451}
18452
18453/* CIntFromPy */
18454static long __Pyx_LargePyLong___Pyx_PyLong_As_long(PyObject *x);
18455static long __Pyx_raise_neg_overflow___Pyx_PyLong_As_long(void) {
18456 const char* type_name = "long";
18457 PyErr_Format(PyExc_OverflowError,
18458 "can't convert negative value to %.200s", type_name);
18459 return (long) -1;
18460}
18461static long __Pyx_raise_overflow___Pyx_PyLong_As_long(void) {
18462 const char* type_name = "long";
18463 PyErr_Format(PyExc_OverflowError,
18464 "value too large to convert to %.200s", type_name);
18465 return (long) -1;
18466}
18467static CYTHON_INLINE long __Pyx_PyULong___Pyx_PyLong_As_long(PyObject *x) {
18468 const int is_unsigned = 1;
18469#if CYTHON_USE_PYLONG_INTERNALS
18470 {
18471 const digit* digits = __Pyx_PyLong_Digits(x);
18472 const Py_ssize_t size = __Pyx_PyLong_DigitCount(x);
18473 if (size == 2 && (8 * sizeof(long) > 1 * PyLong_SHIFT)) {
18474 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
18475 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
18476 } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) {
18477 return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
18478 }
18479 } else
18480 if (size == 3 && (8 * sizeof(long) > 2 * PyLong_SHIFT)) {
18481 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
18482 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
18483 } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) {
18484 return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
18485 }
18486 } else
18487 if (size == 4 && (8 * sizeof(long) > 3 * PyLong_SHIFT)) {
18488 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
18489 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
18490 } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) {
18491 return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
18492 }
18493 } else
18494 {}
18495 }
18496#elif CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
18497 if (unlikely(Py_SIZE(x) < 0)) {
18498 goto raise_neg_overflow;
18499 }
18500#else
18501 {
18502 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
18503 if (unlikely(result < 0))
18504 return (long) -1;
18505 if (unlikely(result == 1))
18506 goto raise_neg_overflow;
18507 }
18508#endif
18509 if ((sizeof(long) <= sizeof(unsigned long))) {
18510 __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
18511 } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) {
18512 __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
18513 }
18514 return __Pyx_LargePyLong___Pyx_PyLong_As_long(x);
18515raise_neg_overflow:
18516 return __Pyx_raise_neg_overflow___Pyx_PyLong_As_long();
18517raise_overflow:
18518 return __Pyx_raise_overflow___Pyx_PyLong_As_long();
18519}
18520static CYTHON_INLINE long __Pyx_PySLong___Pyx_PyLong_As_long(PyObject *x) {
18521 const int is_unsigned = 0;
18522#if CYTHON_USE_PYLONG_INTERNALS
18523 if (__Pyx_PyLong_IsNeg(x)) {
18524 const Py_ssize_t size = __Pyx_PyLong_DigitCount(x);
18525 const digit* digits = __Pyx_PyLong_Digits(x);
18526 if (size == 2 && (8 * sizeof(long) > 1 * PyLong_SHIFT)) {
18527 if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
18528 long ival = - (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
18529 __PYX_VERIFY_RETURN_INT(long, long, ival)
18530 } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
18531 return (long) (((long) -1) * (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
18532 }
18533 } else
18534 if (size == 3 && (8 * sizeof(long) > 2 * PyLong_SHIFT)) {
18535 if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
18536 long ival = - (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
18537 __PYX_VERIFY_RETURN_INT(long, long, ival)
18538 } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
18539 return (long) (((long) -1) * (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
18540 }
18541 } else
18542 if (size == 4 && (8 * sizeof(long) > 3 * PyLong_SHIFT)) {
18543 if ((8 * sizeof(long) > 4 * PyLong_SHIFT)) {
18544 long ival = - (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
18545 __PYX_VERIFY_RETURN_INT(long, long, ival)
18546 } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
18547 return (long) (((long) -1) * (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
18548 }
18549 } else
18550 {}
18551 } else {
18552 const Py_ssize_t size = __Pyx_PyLong_DigitCount(x);
18553 const digit* digits = __Pyx_PyLong_Digits(x);
18554 if (size == 2 && (8 * sizeof(long) > 1 * PyLong_SHIFT)) {
18555 if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
18556 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
18557 } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
18558 return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
18559 }
18560 } else
18561 if (size == 3 && (8 * sizeof(long) > 2 * PyLong_SHIFT)) {
18562 if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
18563 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
18564 } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
18565 return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
18566 }
18567 } else
18568 if (size == 4 && (8 * sizeof(long) > 3 * PyLong_SHIFT)) {
18569 if ((8 * sizeof(long) > 4 * PyLong_SHIFT)) {
18570 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
18571 } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
18572 return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
18573 }
18574 } else
18575 {}
18576 }
18577#endif
18578 #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
18579 if ((sizeof(long) <= sizeof(int)) && (sizeof(int) < sizeof(long))) {
18580 __PYX_VERIFY_RETURN_INT_EXC(long, int, PyLong_AsInt(x))
18581 } else
18582 #endif
18583 if ((sizeof(long) <= sizeof(long))) {
18584 __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
18585 } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) {
18586 __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
18587 }
18588 return __Pyx_LargePyLong___Pyx_PyLong_As_long(x);
18589raise_neg_overflow:
18590 return __Pyx_raise_neg_overflow___Pyx_PyLong_As_long();
18591raise_overflow:
18592 return __Pyx_raise_overflow___Pyx_PyLong_As_long();
18593}
18594static long __Pyx_LargePyLong___Pyx_PyLong_As_long(PyObject *x) {
18595#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
18596#pragma GCC diagnostic push
18597#pragma GCC diagnostic ignored "-Wconversion"
18598#endif
18599 const long neg_one = (long) -1, const_zero = (long) 0;
18600#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
18601#pragma GCC diagnostic pop
18602#endif
18603 const int is_unsigned = neg_one > const_zero;
18604 long val;
18605 int ret = -1;
18606#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
18607 Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
18608 x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
18609 if (unlikely(bytes_copied == -1)) {
18610 } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
18611 goto raise_overflow;
18612 } else {
18613 ret = 0;
18614 }
18615#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
18616 int one = 1; int is_little = (int)*(unsigned char *)&one;
18617 unsigned char *bytes = (unsigned char *)&val;
18618 ret = _PyLong_AsByteArray((PyLongObject *)x,
18619 bytes, sizeof(val),
18620 is_little, !is_unsigned);
18621 if ((0)) goto raise_overflow;
18622#else
18623 PyObject *v;
18624 PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
18625 int bits, remaining_bits, is_negative = 0;
18626 int chunk_size = (sizeof(long) < 8) ? 30 : 62;
18627 if (likely(PyLong_CheckExact(x))) {
18628 v = __Pyx_NewRef(x);
18629 } else {
18630 v = PyNumber_Long(x);
18631 if (unlikely(!v)) return (long) -1;
18632 assert(PyLong_CheckExact(v));
18633 }
18634 {
18635 int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
18636 if (unlikely(result < 0)) {
18637 Py_DECREF(v);
18638 return (long) -1;
18639 }
18640 is_negative = result == 1;
18641 }
18642 if (is_unsigned && unlikely(is_negative)) {
18643 Py_DECREF(v);
18644 PyErr_SetString(PyExc_OverflowError,
18645 "can't convert negative value to long");
18646 return (long) -1;
18647 } else if (is_negative) {
18648 stepval = PyNumber_Invert(v);
18649 Py_DECREF(v);
18650 if (unlikely(!stepval))
18651 return (long) -1;
18652 } else {
18653 stepval = v;
18654 }
18655 v = NULL;
18656 val = (long) 0;
18657 mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
18658 shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
18659 for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) {
18660 PyObject *tmp, *digit;
18661 long idigit;
18662 digit = PyNumber_And(stepval, mask);
18663 if (unlikely(!digit)) goto done;
18664 idigit = PyLong_AsLong(digit);
18665 Py_DECREF(digit);
18666 if (unlikely(idigit < 0)) goto done;
18667 val |= ((long) idigit) << bits;
18668 tmp = PyNumber_Rshift(stepval, shift);
18669 if (unlikely(!tmp)) goto done;
18670 Py_DECREF(stepval); stepval = tmp;
18671 }
18672 Py_DECREF(shift); shift = NULL;
18673 Py_DECREF(mask); mask = NULL;
18674 {
18675 long idigit = PyLong_AsLong(stepval);
18676 if (unlikely(idigit < 0)) goto done;
18677 remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1);
18678 if (unlikely(idigit >= (1L << remaining_bits)))
18679 goto raise_overflow;
18680 val |= ((long) idigit) << bits;
18681 }
18682 if (!is_unsigned) {
18683 if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1))))
18684 goto raise_overflow;
18685 if (is_negative)
18686 val = ~val;
18687 }
18688 ret = 0;
18689done:
18690 Py_XDECREF(shift);
18691 Py_XDECREF(mask);
18692 Py_XDECREF(stepval);
18693#endif
18694 if (unlikely(ret))
18695 return (long) -1;
18696 return val;
18697raise_overflow:
18698 return __Pyx_raise_overflow___Pyx_PyLong_As_long();
18699}
18700static CYTHON_INLINE long __Pyx_PyLong___Pyx_PyLong_As_long(PyObject *x) {
18701#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
18702#pragma GCC diagnostic push
18703#pragma GCC diagnostic ignored "-Wconversion"
18704#endif
18705 const long neg_one = (long) -1, const_zero = (long) 0;
18706#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
18707#pragma GCC diagnostic pop
18708#endif
18709 const int is_unsigned = neg_one > const_zero;
18710 if (is_unsigned) {
18711 #if CYTHON_USE_PYLONG_INTERNALS
18712 if (unlikely(__Pyx_PyLong_IsNeg(x))) {
18713 goto raise_neg_overflow;
18714 } else if (__Pyx_PyLong_IsCompact(x)) {
18715 __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
18716 } else
18717 #endif
18718 {
18719 return __Pyx_PyULong___Pyx_PyLong_As_long(x);
18720 }
18721 } else {
18722 #if CYTHON_USE_PYLONG_INTERNALS
18723 if (__Pyx_PyLong_IsCompact(x)) {
18724 __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
18725 } else
18726 #endif
18727 {
18728 return __Pyx_PySLong___Pyx_PyLong_As_long(x);
18729 }
18730 }
18731#if CYTHON_USE_PYLONG_INTERNALS
18732raise_neg_overflow:
18733 return __Pyx_raise_neg_overflow___Pyx_PyLong_As_long();
18734raise_overflow:
18735 return __Pyx_raise_overflow___Pyx_PyLong_As_long();
18736#endif
18737}
18738static long __Pyx_NonPyLong___Pyx_PyLong_As_long(PyObject *x) {
18739 long val;
18740 PyObject *tmp = __Pyx_PyNumber_Long(x);
18741 if (!tmp) return (long) -1;
18742 val = __Pyx_PyLong_As_long(tmp);
18743 Py_DECREF(tmp);
18744 return val;
18745}
18746static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *x) {
18747 if (likely(PyLong_Check(x))) {
18748 return __Pyx_PyLong___Pyx_PyLong_As_long(x);
18749 } else {
18750 return __Pyx_NonPyLong___Pyx_PyLong_As_long(x);
18751 }
18752}
18753
18754/* GetRuntimeVersion */
18755#if __PYX_LIMITED_VERSION_HEX < 0x030b0000
18756void __Pyx_init_runtime_version(void) {
18757 if (__Pyx_cached_runtime_version == 0) {
18758 const char* rt_version = Py_GetVersion();
18759 unsigned long version = 0;
18760 unsigned long factor = 0x01000000UL;
18761 unsigned int digit = 0;
18762 int i = 0;
18763 while (factor) {
18764 while ('0' <= rt_version[i] && rt_version[i] <= '9') {
18765 digit = digit * 10 + (unsigned int) (rt_version[i] - '0');
18766 ++i;
18767 }
18768 version += factor * digit;
18769 if (rt_version[i] != '.')
18770 break;
18771 digit = 0;
18772 factor >>= 8;
18773 ++i;
18774 }
18775 __Pyx_cached_runtime_version = version;
18776 }
18777}
18778#endif
18779static unsigned long __Pyx_get_runtime_version(void) {
18780#if __PYX_LIMITED_VERSION_HEX >= 0x030b0000
18781 return Py_Version & ~0xFFUL;
18782#else
18783 return __Pyx_cached_runtime_version;
18784#endif
18785}
18786
18787/* CheckBinaryVersion */
18788static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) {
18789 const unsigned long MAJOR_MINOR = 0xFFFF0000UL;
18790 if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR))
18791 return 0;
18792 if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR)))
18793 return 1;
18794 {
18795 char message[200];
18796 PyOS_snprintf(message, sizeof(message),
18797 "compile time Python version %d.%d "
18798 "of module '%.100s' "
18799 "%s "
18800 "runtime version %d.%d",
18801 (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF),
18802 __Pyx_MODULE_NAME,
18803 (allow_newer) ? "was newer than" : "does not match",
18804 (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF)
18805 );
18806 return PyErr_WarnEx(NULL, message, 1);
18807 }
18808}
18809
18810/* NewCodeObj */
18811#if CYTHON_COMPILING_IN_LIMITED_API
18812 static PyObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f,
18813 PyObject *code, PyObject *c, PyObject* n, PyObject *v,
18814 PyObject *fv, PyObject *cell, PyObject* fn,
18815 PyObject *name, int fline, PyObject *lnos) {
18816 PyObject *exception_table = NULL;
18817 PyObject *types_module=NULL, *code_type=NULL, *result=NULL;
18818 #if __PYX_LIMITED_VERSION_HEX < 0x030b0000
18819 PyObject *version_info;
18820 PyObject *py_minor_version = NULL;
18821 #endif
18822 long minor_version = 0;
18823 #if __PYX_LIMITED_VERSION_HEX >= 0x030b0000
18824 minor_version = 11;
18825 #else
18826 if (!(version_info = PySys_GetObject("version_info"))) goto end;
18827 if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end;
18828 minor_version = PyLong_AsLong(py_minor_version);
18829 Py_DECREF(py_minor_version);
18830 if (minor_version == -1 && PyErr_Occurred()) goto end;
18831 #endif
18832 if (!(types_module = PyImport_ImportModule("types"))) goto end;
18833 if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end;
18834 if (minor_version <= 10) {
18835 result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOOO", a,p, k, l, s, f, code,
18836 c, n, v, fn, name, fline, lnos, fv, cell);
18837 } else {
18838 if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end;
18839 result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOOOO", a,p, k, l, s, f, code,
18840 c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell);
18841 }
18842 end:
18843 Py_XDECREF(code_type);
18844 Py_XDECREF(exception_table);
18845 Py_XDECREF(types_module);
18846 if (!result) {
18847 PyObject *exc_type, *exc_value, *exc_tb;
18848 PyErr_Fetch(&exc_type, &exc_value, &exc_tb);
18849 if (PyErr_WarnFormat(
18850 PyExc_RuntimeWarning, 1,
18851 "Code object creation failed in Cython module: %S\nTry recompiling with a more recent version of Cython.",
18852 exc_value ? exc_value : exc_type) == 0) {
18853 result = Py_None;
18854 Py_INCREF(result);
18855 }
18856 Py_DECREF(exc_type);
18857 Py_XDECREF(exc_value);
18858 Py_XDECREF(exc_tb);
18859 }
18860 return result;
18861 }
18862#elif PY_VERSION_HEX >= 0x030B0000
18863 static PyCodeObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f,
18864 PyObject *code, PyObject *c, PyObject* n, PyObject *v,
18865 PyObject *fv, PyObject *cell, PyObject* fn,
18866 PyObject *name, int fline, PyObject *lnos) {
18867 PyCodeObject *result;
18868 result =
18869 #if PY_VERSION_HEX >= 0x030C0000
18870 PyUnstable_Code_NewWithPosOnlyArgs
18871 #else
18872 PyCode_NewWithPosOnlyArgs
18873 #endif
18874 (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, __pyx_mstate_global->__pyx_empty_bytes);
18875 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030c00A1
18876 if (likely(result))
18877 result->_co_firsttraceable = 0;
18878 #endif
18879 return result;
18880 }
18881#elif !CYTHON_COMPILING_IN_PYPY
18882 #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
18883 PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
18884#else
18885 #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
18886 PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
18887#endif
18888static PyObject* __Pyx_PyCode_New(
18889 const __Pyx_PyCode_New_function_description descr,
18890 PyObject * const *varnames,
18891 PyObject *filename,
18892 PyObject *funcname,
18893 PyObject *line_table,
18894 PyObject *tuple_dedup_map
18895) {
18896 PyObject *code_obj = NULL, *varnames_tuple_dedup = NULL, *code_bytes = NULL;
18897 Py_ssize_t var_count = (Py_ssize_t) descr.nlocals;
18898 PyObject *varnames_tuple = PyTuple_New(var_count);
18899 if (unlikely(!varnames_tuple)) return NULL;
18900 for (Py_ssize_t i=0; i < var_count; i++) {
18901 Py_INCREF(varnames[i]);
18902 if (__Pyx_PyTuple_SET_ITEM(varnames_tuple, i, varnames[i]) != (0)) goto done;
18903 }
18904 #if CYTHON_COMPILING_IN_LIMITED_API
18905 varnames_tuple_dedup = PyDict_GetItem(tuple_dedup_map, varnames_tuple);
18906 if (!varnames_tuple_dedup) {
18907 if (unlikely(PyDict_SetItem(tuple_dedup_map, varnames_tuple, varnames_tuple) < 0)) goto done;
18908 varnames_tuple_dedup = varnames_tuple;
18909 }
18910 #else
18911 varnames_tuple_dedup = PyDict_SetDefault(tuple_dedup_map, varnames_tuple, varnames_tuple);
18912 if (unlikely(!varnames_tuple_dedup)) goto done;
18913 #endif
18914 #if CYTHON_AVOID_BORROWED_REFS
18915 Py_INCREF(varnames_tuple_dedup);
18916 #endif
18917 if (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table != NULL && !CYTHON_COMPILING_IN_GRAAL) {
18918 Py_ssize_t line_table_length = __Pyx_PyBytes_GET_SIZE(line_table);
18919 #if !CYTHON_ASSUME_SAFE_SIZE
18920 if (unlikely(line_table_length == -1)) goto done;
18921 #endif
18922 Py_ssize_t code_len = (line_table_length * 2 + 4) & ~3LL;
18923 code_bytes = PyBytes_FromStringAndSize(NULL, code_len);
18924 if (unlikely(!code_bytes)) goto done;
18925 char* c_code_bytes = PyBytes_AsString(code_bytes);
18926 if (unlikely(!c_code_bytes)) goto done;
18927 memset(c_code_bytes, 0, (size_t) code_len);
18928 }
18929 code_obj = (PyObject*) __Pyx__PyCode_New(
18930 (int) descr.argcount,
18931 (int) descr.num_posonly_args,
18932 (int) descr.num_kwonly_args,
18933 (int) descr.nlocals,
18934 0,
18935 (int) descr.flags,
18936 code_bytes ? code_bytes : __pyx_mstate_global->__pyx_empty_bytes,
18937 __pyx_mstate_global->__pyx_empty_tuple,
18938 __pyx_mstate_global->__pyx_empty_tuple,
18939 varnames_tuple_dedup,
18940 __pyx_mstate_global->__pyx_empty_tuple,
18941 __pyx_mstate_global->__pyx_empty_tuple,
18942 filename,
18943 funcname,
18944 (int) descr.first_line,
18945 (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table) ? line_table : __pyx_mstate_global->__pyx_empty_bytes
18946 );
18947done:
18948 Py_XDECREF(code_bytes);
18949 #if CYTHON_AVOID_BORROWED_REFS
18950 Py_XDECREF(varnames_tuple_dedup);
18951 #endif
18952 Py_DECREF(varnames_tuple);
18953 return code_obj;
18954}
18955
18956/* DecompressString */
18957CYTHON_UNUSED
18958static CYTHON_SMALL_CODE PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo) {
18959#ifdef __Pyx_DecompressString_UNUSED
18960 CYTHON_UNUSED_VAR(s);
18961 CYTHON_UNUSED_VAR(length);
18962 CYTHON_UNUSED_VAR(algo);
18963 return NULL;
18964#else
18965 PyObject *module = NULL, *decompress, *compressed_bytes, *decompressed;
18966 const char* module_name = algo == 3 ? "compression.zstd" : algo == 2 ? "bz2" : "zlib";
18967 PyObject *methodname = PyUnicode_FromString("decompress");
18968 if (unlikely(!methodname)) return NULL;
18969 #if __PYX_LIMITED_VERSION_HEX >= 0x030e0000
18970 if (algo == 3) {
18971 PyObject *fromlist = Py_BuildValue("[O]", methodname);
18972 if (unlikely(!fromlist)) goto bad;
18973 module = PyImport_ImportModuleLevel("compression.zstd", NULL, NULL, fromlist, 0);
18974 Py_DECREF(fromlist);
18975 } else
18976 #endif
18977 module = PyImport_ImportModule(module_name);
18978 if (unlikely(!module)) goto import_failed;
18979 decompress = PyObject_GetAttr(module, methodname);
18980 if (unlikely(!decompress)) goto import_failed;
18981 {
18982 #ifdef __cplusplus
18983 char *memview_bytes = const_cast<char*>(s);
18984 #else
18985 #if defined(__clang__)
18986 #pragma clang diagnostic push
18987 #pragma clang diagnostic ignored "-Wcast-qual"
18988 #elif !defined(__INTEL_COMPILER) && defined(__GNUC__)
18989 #pragma GCC diagnostic push
18990 #pragma GCC diagnostic ignored "-Wcast-qual"
18991 #endif
18992 char *memview_bytes = (char*) s;
18993 #if defined(__clang__)
18994 #pragma clang diagnostic pop
18995 #elif !defined(__INTEL_COMPILER) && defined(__GNUC__)
18996 #pragma GCC diagnostic pop
18997 #endif
18998 #endif
18999 #if CYTHON_COMPILING_IN_LIMITED_API && !defined(PyBUF_READ)
19000 int memview_flags = 0x100;
19001 #else
19002 int memview_flags = PyBUF_READ;
19003 #endif
19004 compressed_bytes = PyMemoryView_FromMemory(memview_bytes, length, memview_flags);
19005 }
19006 if (unlikely(!compressed_bytes)) {
19007 Py_DECREF(decompress);
19008 goto bad;
19009 }
19010 decompressed = PyObject_CallFunctionObjArgs(decompress, compressed_bytes, NULL);
19011 Py_DECREF(compressed_bytes);
19012 Py_DECREF(decompress);
19013 Py_DECREF(module);
19014 Py_DECREF(methodname);
19015 return decompressed;
19016import_failed:
19017 PyErr_Format(PyExc_ImportError,
19018 "Failed to import '%.20s.decompress' - cannot initialise module strings. "
19019 "String compression was configured with the C macro 'CYTHON_COMPRESS_STRINGS=%d'.",
19020 module_name, algo);
19021bad:
19022 Py_XDECREF(module);
19023 Py_DECREF(methodname);
19024 return NULL;
19025#endif
19026}
19027
19028/* DecompressString_LZSS */
19029#ifndef __Pyx_DecompressString_LZSS_UNUSED
19030CYTHON_UNUSED
19031static CYTHON_SMALL_CODE size_t __pyx_lzss_decompress(const uint8_t* src, uint8_t* dst, size_t dst_len) {
19032 size_t pos = 0, out_pos = 0;
19033 while (1) {
19034 uint32_t flags = src[pos++] | 0xFF00;
19035 while (flags & 0x100) {
19036 if (flags & 1) {
19037 dst[out_pos++] = src[pos++];
19038 } else {
19039 uint32_t lo = src[pos++], hi = src[pos++];
19040 uint32_t end_offset_of_last_occurrence, match_length;
19041 if (!(lo & 0x80)) {
19042 end_offset_of_last_occurrence = lo;
19043 match_length = hi;
19044 } else if (!(hi & 0x80)) {
19045 end_offset_of_last_occurrence = 0x80 + (((hi << 2) & 0x180) | (lo & 0x7F));
19046 match_length = hi & 0x1F;
19047 } else {
19048 end_offset_of_last_occurrence = 0x80 + ((hi & 0x7F) << 7 | (lo & 0x7F));
19049 match_length = src[pos++];
19050 }
19051 match_length += 3;
19052 size_t ref_pos = out_pos - end_offset_of_last_occurrence - match_length;
19053 memcpy(dst + out_pos, dst + ref_pos, match_length);
19054 out_pos += match_length;
19055 }
19056 if (out_pos >= dst_len) return pos;
19057 flags >>= 1;
19058 }
19059 }
19060}
19061#endif
19062static CYTHON_SMALL_CODE PyObject *__Pyx_DecompressString_LZSS(const char *s, size_t compressed_length, size_t uncompressed_length) {
19063#ifdef __Pyx_DecompressString_LZSS_UNUSED
19064 CYTHON_UNUSED_VAR(s);
19065 CYTHON_UNUSED_VAR(compressed_length);
19066 CYTHON_UNUSED_VAR(uncompressed_length);
19067 return NULL;
19068#else
19069 PyObject *result;
19070 unsigned char *result_data;
19071 size_t src_length;
19072 result = PyBytes_FromStringAndSize(NULL, (Py_ssize_t) uncompressed_length);
19073 if (unlikely(!result)) return NULL;
19074 result_data = __Pyx_PyBytes_AsWritableUString(result);
19075 if (unlikely(!result_data)) goto bad;
19076 src_length = __pyx_lzss_decompress((const uint8_t*) s, result_data, uncompressed_length);
19077 if (unlikely(src_length != compressed_length)) goto decompression_failed;
19078 return result;
19079decompression_failed:
19080 PyErr_SetString(PyExc_RuntimeError, "LZSS string data decompression failed");
19081bad:
19082 Py_DECREF(result);
19083 return NULL;
19084#endif
19085}
19086
19087#include <string.h>
19088static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) {
19089 size_t len = strlen(s);
19090 if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) {
19091 PyErr_SetString(PyExc_OverflowError, "byte string is too long");
19092 return -1;
19093 }
19094 return (Py_ssize_t) len;
19095}
19096static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
19097 Py_ssize_t len = __Pyx_ssize_strlen(c_str);
19098 if (unlikely(len < 0)) return NULL;
19099 return __Pyx_PyUnicode_FromStringAndSize(c_str, len);
19100}
19101static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) {
19102 Py_ssize_t len = __Pyx_ssize_strlen(c_str);
19103 if (unlikely(len < 0)) return NULL;
19104 return PyByteArray_FromStringAndSize(c_str, len);
19105}
19106static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
19107 Py_ssize_t ignore;
19108 return __Pyx_PyObject_AsStringAndSize(o, &ignore);
19109}
19110#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8
19111static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
19112 if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
19113#if CYTHON_COMPILING_IN_LIMITED_API
19114 {
19115 const char* result;
19116 Py_ssize_t unicode_length;
19117 CYTHON_MAYBE_UNUSED_VAR(unicode_length); // only for __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
19118 #if __PYX_LIMITED_VERSION_HEX < 0x030A0000
19119 if (unlikely(PyArg_Parse(o, "s#", &result, length) < 0)) return NULL;
19120 #else
19121 result = PyUnicode_AsUTF8AndSize(o, length);
19122 #endif
19123 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
19124 unicode_length = PyUnicode_GetLength(o);
19125 if (unlikely(unicode_length < 0)) return NULL;
19126 if (unlikely(unicode_length != *length)) {
19127 PyUnicode_AsASCIIString(o);
19128 return NULL;
19129 }
19130 #endif
19131 return result;
19132 }
19133#else
19134#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
19135 if (likely(PyUnicode_IS_ASCII(o))) {
19136 *length = PyUnicode_GET_LENGTH(o);
19137 return PyUnicode_AsUTF8(o);
19138 } else {
19139 PyUnicode_AsASCIIString(o);
19140 return NULL;
19141 }
19142#else
19143 return PyUnicode_AsUTF8AndSize(o, length);
19144#endif
19145#endif
19146}
19147#endif
19148static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
19149#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8
19150 if (PyUnicode_Check(o)) {
19151 return __Pyx_PyUnicode_AsStringAndSize(o, length);
19152 } else
19153#endif
19154 if (PyByteArray_Check(o)) {
19155#if (CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) || (CYTHON_COMPILING_IN_PYPY && (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)))
19156 *length = PyByteArray_GET_SIZE(o);
19157 return PyByteArray_AS_STRING(o);
19158#else
19159 *length = PyByteArray_Size(o);
19160 if (*length == -1) return NULL;
19161 return PyByteArray_AsString(o);
19162#endif
19163 } else
19164 {
19165 char* result;
19166 int r = PyBytes_AsStringAndSize(o, &result, length);
19167 if (unlikely(r < 0)) {
19168 return NULL;
19169 } else {
19170 return result;
19171 }
19172 }
19173}
19174static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
19175 int is_true = x == Py_True;
19176 if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
19177 else return PyObject_IsTrue(x);
19178}
19179static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
19180 int retval;
19181 if (unlikely(!x)) return -1;
19182 retval = __Pyx_PyObject_IsTrue(x);
19183 Py_DECREF(x);
19184 return retval;
19185}
19186static PyObject* __Pyx_PyNumber_LongWrongResultType(PyObject* result) {
19187 __Pyx_TypeName result_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(result));
19188 #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000
19189 if (unlikely(!result_type_name)) goto bad;
19190 #endif
19191 if (PyLong_Check(result)) {
19192 if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
19193 "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). "
19194 "The ability to return an instance of a strict subclass of int is deprecated, "
19195 "and may be removed in a future version of Python.",
19196 result_type_name)) {
19197 __Pyx_DECREF_TypeName(result_type_name);
19198 goto bad;
19199 }
19200 __Pyx_DECREF_TypeName(result_type_name);
19201 return result;
19202 }
19203 PyErr_Format(PyExc_TypeError,
19204 "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ")",
19205 result_type_name);
19206 __Pyx_DECREF_TypeName(result_type_name);
19207bad:
19208 Py_DECREF(result);
19209 return NULL;
19210}
19211static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x) {
19212#if CYTHON_USE_TYPE_SLOTS
19213 PyNumberMethods *m;
19214#endif
19215 PyObject *res = NULL;
19216 if (likely(PyLong_Check(x)))
19217 return __Pyx_NewRef(x);
19218#if CYTHON_USE_TYPE_SLOTS
19219 m = Py_TYPE(x)->tp_as_number;
19220 if (likely(m && m->nb_int)) {
19221 res = m->nb_int(x);
19222 }
19223#else
19224 if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
19225 res = PyNumber_Long(x);
19226 }
19227#endif
19228 if (likely(res)) {
19229 if (unlikely(!PyLong_CheckExact(res))) {
19230 return __Pyx_PyNumber_LongWrongResultType(res);
19231 }
19232 }
19233 else if (!PyErr_Occurred()) {
19234 PyErr_SetString(PyExc_TypeError,
19235 "an integer is required");
19236 }
19237 return res;
19238}
19239static CYTHON_INLINE Py_ssize_t __Pyx_PyLong_AsSsize_t(PyObject* b) {
19240 #if CYTHON_USE_PYLONG_INTERNALS
19241 Py_ssize_t ival;
19242 const Py_ssize_t size = __Pyx_PyLong_DigitCount(b);
19243 const int is_neg = __Pyx_PyLong_IsNeg(b);
19244 const digit* digits = __Pyx_PyLong_Digits(b);
19245 if (size == 0) return 0;
19246 #if SIZEOF_SIZE_T * 8 > 1 * PyLong_SHIFT
19247 if (size == 1) {
19248 ival = (Py_ssize_t) (((size_t)digits[0]));
19249 } else
19250 #endif
19251 #if SIZEOF_SIZE_T * 8 > 2 * PyLong_SHIFT
19252 if (size == 2) {
19253 ival = (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
19254 } else
19255 #endif
19256 #if SIZEOF_SIZE_T * 8 > 3 * PyLong_SHIFT
19257 if (size == 3) {
19258 ival = (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
19259 } else
19260 #endif
19261 #if SIZEOF_SIZE_T * 8 > 4 * PyLong_SHIFT
19262 if (size == 4) {
19263 ival = (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
19264 } else
19265 #endif
19266 return PyLong_AsSsize_t(b);
19267 return is_neg ? -ival : ival;
19268 #else
19269 return PyLong_AsSsize_t(b);
19270 #endif
19271}
19272static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
19273 if (likely(PyLong_Check(b))) {
19274 return __Pyx_PyLong_AsSsize_t(b);
19275 } else {
19276 Py_ssize_t ival;
19277 PyObject *x = PyNumber_Index(b);
19278 if (unlikely(!x)) return -1;
19279 ival = __Pyx_PyLong_AsSsize_t(x);
19280 Py_DECREF(x);
19281 return ival;
19282 }
19283}
19284static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
19285 if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) {
19286 return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
19287 } else {
19288 Py_ssize_t ival;
19289 PyObject *x;
19290 x = PyNumber_Index(o);
19291 if (!x) return -1;
19292 ival = PyLong_AsLong(x);
19293 Py_DECREF(x);
19294 return ival;
19295 }
19296}
19297static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b) {
19298 CYTHON_UNUSED_VAR(b);
19299 return __Pyx_NewRef(Py_None);
19300}
19301static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
19302 return __Pyx_NewRef(b ? Py_True: Py_False);
19303}
19304static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t ival) {
19305 return PyLong_FromSize_t(ival);
19306}
19307
19308
19309/* MultiPhaseInitModuleState */
19310#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE
19311#ifndef CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
19312#if (CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000)
19313 #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 1
19314#else
19315 #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 0
19316#endif
19317#endif
19318#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE && !CYTHON_ATOMICS
19319#error "Module state with PEP489 requires atomics. Currently that's one of\
19320 C11, C++11, gcc atomic intrinsics or MSVC atomic intrinsics"
19321#endif
19322#if !CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
19323#define __Pyx_ModuleStateLookup_Lock()
19324#define __Pyx_ModuleStateLookup_Unlock()
19325#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000
19326static PyMutex __Pyx_ModuleStateLookup_mutex = {0};
19327#define __Pyx_ModuleStateLookup_Lock() PyMutex_Lock(&__Pyx_ModuleStateLookup_mutex)
19328#define __Pyx_ModuleStateLookup_Unlock() PyMutex_Unlock(&__Pyx_ModuleStateLookup_mutex)
19329#elif defined(__cplusplus) && __cplusplus >= 201103L
19330#include <mutex>
19331static std::mutex __Pyx_ModuleStateLookup_mutex;
19332#define __Pyx_ModuleStateLookup_Lock() __Pyx_ModuleStateLookup_mutex.lock()
19333#define __Pyx_ModuleStateLookup_Unlock() __Pyx_ModuleStateLookup_mutex.unlock()
19334#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201112L) && !defined(__STDC_NO_THREADS__)
19335#include <threads.h>
19336static mtx_t __Pyx_ModuleStateLookup_mutex;
19337static once_flag __Pyx_ModuleStateLookup_mutex_once_flag = ONCE_FLAG_INIT;
19338static void __Pyx_ModuleStateLookup_initialize_mutex(void) {
19339 mtx_init(&__Pyx_ModuleStateLookup_mutex, mtx_plain);
19340}
19341#define __Pyx_ModuleStateLookup_Lock()\
19342 call_once(&__Pyx_ModuleStateLookup_mutex_once_flag, __Pyx_ModuleStateLookup_initialize_mutex);\
19343 mtx_lock(&__Pyx_ModuleStateLookup_mutex)
19344#define __Pyx_ModuleStateLookup_Unlock() mtx_unlock(&__Pyx_ModuleStateLookup_mutex)
19345#elif defined(HAVE_PTHREAD_H)
19346#include <pthread.h>
19347static pthread_mutex_t __Pyx_ModuleStateLookup_mutex = PTHREAD_MUTEX_INITIALIZER;
19348#define __Pyx_ModuleStateLookup_Lock() pthread_mutex_lock(&__Pyx_ModuleStateLookup_mutex)
19349#define __Pyx_ModuleStateLookup_Unlock() pthread_mutex_unlock(&__Pyx_ModuleStateLookup_mutex)
19350#elif defined(_WIN32)
19351#include <Windows.h> // synchapi.h on its own doesn't work
19352static SRWLOCK __Pyx_ModuleStateLookup_mutex = SRWLOCK_INIT;
19353#define __Pyx_ModuleStateLookup_Lock() AcquireSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex)
19354#define __Pyx_ModuleStateLookup_Unlock() ReleaseSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex)
19355#else
19356#error "No suitable lock available for CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE.\
19357 Requires C standard >= C11, or C++ standard >= C++11,\
19358 or pthreads, or the Windows 32 API, or Python >= 3.13."
19359#endif
19360typedef struct {
19361 int64_t id;
19362 PyObject *module;
19363} __Pyx_InterpreterIdAndModule;
19364typedef struct {
19365 char interpreter_id_as_index;
19366 Py_ssize_t count;
19367 Py_ssize_t allocated;
19368 __Pyx_InterpreterIdAndModule table[1];
19369} __Pyx_ModuleStateLookupData;
19370#define __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE 32
19371#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
19372static __pyx_atomic_int_type __Pyx_ModuleStateLookup_read_counter = 0;
19373#endif
19374#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
19375static __pyx_atomic_ptr_type __Pyx_ModuleStateLookup_data = 0;
19376#else
19377static __Pyx_ModuleStateLookupData* __Pyx_ModuleStateLookup_data = NULL;
19378#endif
19379static __Pyx_InterpreterIdAndModule* __Pyx_State_FindModuleStateLookupTableLowerBound(
19380 __Pyx_InterpreterIdAndModule* table,
19381 Py_ssize_t count,
19382 int64_t interpreterId) {
19383 __Pyx_InterpreterIdAndModule* begin = table;
19384 __Pyx_InterpreterIdAndModule* end = begin + count;
19385 if (begin->id == interpreterId) {
19386 return begin;
19387 }
19388 while ((end - begin) > __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) {
19389 __Pyx_InterpreterIdAndModule* halfway = begin + (end - begin)/2;
19390 if (halfway->id == interpreterId) {
19391 return halfway;
19392 }
19393 if (halfway->id < interpreterId) {
19394 begin = halfway;
19395 } else {
19396 end = halfway;
19397 }
19398 }
19399 for (; begin < end; ++begin) {
19400 if (begin->id >= interpreterId) return begin;
19401 }
19402 return begin;
19403}
19404static PyObject *__Pyx_State_FindModule(CYTHON_UNUSED void* dummy) {
19405 int64_t interpreter_id = PyInterpreterState_GetID(PyInterpreterState_Get());
19406 if (interpreter_id == -1) return NULL;
19407#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
19408 __Pyx_ModuleStateLookupData* data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data);
19409 {
19410 __pyx_atomic_incr_acq_rel(&__Pyx_ModuleStateLookup_read_counter);
19411 if (likely(data)) {
19412 __Pyx_ModuleStateLookupData* new_data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_acquire(&__Pyx_ModuleStateLookup_data);
19413 if (likely(data == new_data)) {
19414 goto read_finished;
19415 }
19416 }
19417 __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter);
19418 __Pyx_ModuleStateLookup_Lock();
19419 __pyx_atomic_incr_relaxed(&__Pyx_ModuleStateLookup_read_counter);
19420 data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data);
19421 __Pyx_ModuleStateLookup_Unlock();
19422 }
19423 read_finished:;
19424#else
19425 __Pyx_ModuleStateLookupData* data = __Pyx_ModuleStateLookup_data;
19426#endif
19427 __Pyx_InterpreterIdAndModule* found = NULL;
19428 if (unlikely(!data)) goto end;
19429 if (data->interpreter_id_as_index) {
19430 if (interpreter_id < data->count) {
19431 found = data->table+interpreter_id;
19432 }
19433 } else {
19434 found = __Pyx_State_FindModuleStateLookupTableLowerBound(
19435 data->table, data->count, interpreter_id);
19436 }
19437 end:
19438 {
19439 PyObject *result=NULL;
19440 if (found && found->id == interpreter_id) {
19441 result = found->module;
19442 }
19443#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
19444 __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter);
19445#endif
19446 return result;
19447 }
19448}
19449#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
19450static void __Pyx_ModuleStateLookup_wait_until_no_readers(void) {
19451 while (__pyx_atomic_load(&__Pyx_ModuleStateLookup_read_counter) != 0);
19452}
19453#else
19454#define __Pyx_ModuleStateLookup_wait_until_no_readers()
19455#endif
19456static int __Pyx_State_AddModuleInterpIdAsIndex(__Pyx_ModuleStateLookupData **old_data, PyObject* module, int64_t interpreter_id) {
19457 Py_ssize_t to_allocate = (*old_data)->allocated;
19458 while (to_allocate <= interpreter_id) {
19459 if (to_allocate == 0) to_allocate = 1;
19460 else to_allocate *= 2;
19461 }
19462 __Pyx_ModuleStateLookupData *new_data = *old_data;
19463 if (to_allocate != (*old_data)->allocated) {
19464 new_data = (__Pyx_ModuleStateLookupData *)realloc(
19465 *old_data,
19466 sizeof(__Pyx_ModuleStateLookupData)+(to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule));
19467 if (!new_data) {
19468 PyErr_NoMemory();
19469 return -1;
19470 }
19471 for (Py_ssize_t i = new_data->allocated; i < to_allocate; ++i) {
19472 new_data->table[i].id = i;
19473 new_data->table[i].module = NULL;
19474 }
19475 new_data->allocated = to_allocate;
19476 }
19477 new_data->table[interpreter_id].module = module;
19478 if (new_data->count < interpreter_id+1) {
19479 new_data->count = interpreter_id+1;
19480 }
19481 *old_data = new_data;
19482 return 0;
19483}
19484static void __Pyx_State_ConvertFromInterpIdAsIndex(__Pyx_ModuleStateLookupData *data) {
19485 __Pyx_InterpreterIdAndModule *read = data->table;
19486 __Pyx_InterpreterIdAndModule *write = data->table;
19487 __Pyx_InterpreterIdAndModule *end = read + data->count;
19488 for (; read<end; ++read) {
19489 if (read->module) {
19490 write->id = read->id;
19491 write->module = read->module;
19492 ++write;
19493 }
19494 }
19495 data->count = write - data->table;
19496 for (; write<end; ++write) {
19497 write->id = 0;
19498 write->module = NULL;
19499 }
19500 data->interpreter_id_as_index = 0;
19501}
19502static int __Pyx_State_AddModule(PyObject* module, CYTHON_UNUSED void* dummy) {
19503 int64_t interpreter_id = PyInterpreterState_GetID(PyInterpreterState_Get());
19504 if (interpreter_id == -1) return -1;
19505 int result = 0;
19506 __Pyx_ModuleStateLookup_Lock();
19507#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
19508 __Pyx_ModuleStateLookupData *old_data = (__Pyx_ModuleStateLookupData *)
19509 __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0);
19510#else
19511 __Pyx_ModuleStateLookupData *old_data = __Pyx_ModuleStateLookup_data;
19512#endif
19513 __Pyx_ModuleStateLookupData *new_data = old_data;
19514 if (!new_data) {
19515 new_data = (__Pyx_ModuleStateLookupData *)calloc(1, sizeof(__Pyx_ModuleStateLookupData));
19516 if (!new_data) {
19517 result = -1;
19518 PyErr_NoMemory();
19519 goto end;
19520 }
19521 new_data->allocated = 1;
19522 new_data->interpreter_id_as_index = 1;
19523 }
19524 __Pyx_ModuleStateLookup_wait_until_no_readers();
19525 if (new_data->interpreter_id_as_index) {
19526 if (interpreter_id < __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) {
19527 result = __Pyx_State_AddModuleInterpIdAsIndex(&new_data, module, interpreter_id);
19528 goto end;
19529 }
19530 __Pyx_State_ConvertFromInterpIdAsIndex(new_data);
19531 }
19532 {
19533 Py_ssize_t insert_at = 0;
19534 {
19535 __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound(
19536 new_data->table, new_data->count, interpreter_id);
19537 assert(lower_bound);
19538 insert_at = lower_bound - new_data->table;
19539 if (unlikely(insert_at < new_data->count && lower_bound->id == interpreter_id)) {
19540 lower_bound->module = module;
19541 goto end; // already in table, nothing more to do
19542 }
19543 }
19544 if (new_data->count+1 >= new_data->allocated) {
19545 Py_ssize_t to_allocate = (new_data->count+1)*2;
19546 new_data =
19547 (__Pyx_ModuleStateLookupData*)realloc(
19548 new_data,
19549 sizeof(__Pyx_ModuleStateLookupData) +
19550 (to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule));
19551 if (!new_data) {
19552 result = -1;
19553 new_data = old_data;
19554 PyErr_NoMemory();
19555 goto end;
19556 }
19557 new_data->allocated = to_allocate;
19558 }
19559 ++new_data->count;
19560 int64_t last_id = interpreter_id;
19561 PyObject *last_module = module;
19562 for (Py_ssize_t i=insert_at; i<new_data->count; ++i) {
19563 int64_t current_id = new_data->table[i].id;
19564 new_data->table[i].id = last_id;
19565 last_id = current_id;
19566 PyObject *current_module = new_data->table[i].module;
19567 new_data->table[i].module = last_module;
19568 last_module = current_module;
19569 }
19570 }
19571 end:
19572#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
19573 __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, new_data);
19574#else
19575 __Pyx_ModuleStateLookup_data = new_data;
19576#endif
19577 __Pyx_ModuleStateLookup_Unlock();
19578 return result;
19579}
19580static int __Pyx_State_RemoveModule(CYTHON_UNUSED void* dummy) {
19581 int64_t interpreter_id = PyInterpreterState_GetID(PyInterpreterState_Get());
19582 if (interpreter_id == -1) return -1;
19583 __Pyx_ModuleStateLookup_Lock();
19584#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
19585 __Pyx_ModuleStateLookupData *data = (__Pyx_ModuleStateLookupData *)
19586 __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0);
19587#else
19588 __Pyx_ModuleStateLookupData *data = __Pyx_ModuleStateLookup_data;
19589#endif
19590 if (data->interpreter_id_as_index) {
19591 if (interpreter_id < data->count) {
19592 data->table[interpreter_id].module = NULL;
19593 }
19594 goto done;
19595 }
19596 {
19597 __Pyx_ModuleStateLookup_wait_until_no_readers();
19598 __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound(
19599 data->table, data->count, interpreter_id);
19600 if (!lower_bound) goto done;
19601 if (lower_bound->id != interpreter_id) goto done;
19602 __Pyx_InterpreterIdAndModule *end = data->table+data->count;
19603 for (;lower_bound<end-1; ++lower_bound) {
19604 lower_bound->id = (lower_bound+1)->id;
19605 lower_bound->module = (lower_bound+1)->module;
19606 }
19607 }
19608 --data->count;
19609 if (data->count == 0) {
19610 free(data);
19611 data = NULL;
19612 }
19613 done:
19614#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
19615 __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, data);
19616#else
19617 __Pyx_ModuleStateLookup_data = data;
19618#endif
19619 __Pyx_ModuleStateLookup_Unlock();
19620 return 0;
19621}
19622#endif
19623
19624/* #### Code section: utility_code_pragmas_end ### */
19625#ifdef _MSC_VER
19626#pragma warning( pop )
19627#endif
19628
19629
19630
19631/* #### Code section: end ### */
19632#endif /* Py_PYTHON_H */
Int n
Definition Headers.h:28
Double q
Definition Headers.h:81
Double T
Definition Headers.h:87
Double r
Definition Headers.h:83
Double U
Definition Headers.h:88
Double f
Definition Headers.h:64
Double s
Definition Headers.h:84
Double * z
Definition Headers.h:49
Double v
Definition Headers.h:95
#define c(i)
Definition jf.h:21
Richards free-function PSK closures (moved here from proteus/richards/psk_models.h).
void generateSplineTables(int nknots, int startIndex, int calcFlag, const double *domain, const double *rwork_psk, const int *iwork_psk, const double *rwork_psk_tol, double *splineTable)
int twophaseDarcy_fc_sd_het_matType(int nSimplex, int nPointsPerSimplex, int nSpace, int nParams, const int *rowptr, const int *colind, const int *materialTypes, double muw, double mun, const double *omega, const double *Kbar, double b, const double *rwork_psk, const int *iwork_psk, const double *rwork_psk_tol, const double *rwork_density_w, const double *rwork_density_n, const double *g, const double *x, const double *sw, const double *psiw, double *mw, double *dmw_dsw, double *dmw_dpsiw, double *mn, double *dmn_dsw, double *dmn_dpsiw, double *psin, double *dpsin_dsw, double *dpsin_dpsiw, double *phi_psiw, double *dphi_psiw_dpsiw, double *phi_psin, double *dphi_psin_dpsiw, double *dphi_psin_dsw, double *aw, double *daw_dsw, double *daw_dpsiw, double *an, double *dan_dsw, double *dan_dpsiw)
int twophaseDarcy_vol_frac(int nSimplex, int nPointsPerSimplex, const int *materialTypes, const double *omega, const double *sw, double *vol_frac_w, double *vol_frac_n)
int twophaseDarcy_fc_sd_het_matType_nonPotentialForm(int compressibilityFlag, int nSimplex, int nPointsPerSimplex, int nSpace, int nParams, const int *rowptr, const int *colind, const int *materialTypes, double muw, double mun, const double *omega, const double *Kbar, double b, const double *rwork_psk, const int *iwork_psk, const double *rwork_psk_tol, const double *rwork_density_w, const double *rwork_density_n, const double *g, const double *x, const double *sw, const double *psiw, double *mw, double *dmw_dsw, double *dmw_dpsiw, double *mn, double *dmn_dsw, double *dmn_dpsiw, double *psin, double *dpsin_dsw, double *dpsin_dpsiw, double *phi_psiw, double *dphi_psiw_dpsiw, double *phi_psin, double *dphi_psin_dpsiw, double *dphi_psin_dsw, double *fw, double *dfw_dsw, double *dfw_dpsiw, double *fn, double *dfn_dsw, double *dfn_dpsiw, double *aw, double *daw_dsw, double *daw_dpsiw, double *an, double *dan_dsw, double *dan_dpsiw)
int twophaseDarcy_fc_pp_sd_het_matType(int nSimplex, int nPointsPerSimplex, int nSpace, int nParams, const int *rowptr, const int *colind, const int *materialTypes, double muw, double mun, const double *omega, const double *Kbar, double b, const double *rwork_psk, const int *iwork_psk, const double *rwork_psk_tol, const double *rwork_density_w, const double *rwork_density_n, const double *g, const double *x, const double *psiw, const double *psic, double *sw, double *mw, double *dmw_dpsiw, double *dmw_dpsic, double *mn, double *dmn_dpsiw, double *dmn_dpsic, double *phi_psiw, double *dphi_psiw_dpsiw, double *phi_psin, double *dphi_psin_dpsiw, double *dphi_psin_dpsic, double *aw, double *daw_dpsiw, double *daw_dpsic, double *an, double *dan_dpsiw, double *dan_dpsic)