/* Generated by Cython 0.29 */

/* BEGIN: Cython Metadata
{
    "distutils": {
        "define_macros": [
            [
                "SWIG", 
                null
            ]
        ], 
        "depends": [], 
        "language": "c++", 
        "name": "PDSim.scroll.common_scroll_geo", 
        "sources": [
            "PDSim/scroll/common_scroll_geo.pyx", 
            "PDSim/scroll/common_scroll_geo.pxd"
        ]
    }, 
    "module_name": "PDSim.scroll.common_scroll_geo"
}
END: Cython Metadata */

#define PY_SSIZE_T_CLEAN
#include "Python.h"
#ifndef Py_PYTHON_H
    #error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
    #error Cython requires Python 2.6+ or Python 3.3+.
#else
#define CYTHON_ABI "0_29"
#define CYTHON_HEX_VERSION 0x001D00F0
#define CYTHON_FUTURE_DIVISION 1
#include <stddef.h>
#ifndef offsetof
  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif
#if !defined(WIN32) && !defined(MS_WINDOWS)
  #ifndef __stdcall
    #define __stdcall
  #endif
  #ifndef __cdecl
    #define __cdecl
  #endif
  #ifndef __fastcall
    #define __fastcall
  #endif
#endif
#ifndef DL_IMPORT
  #define DL_IMPORT(t) t
#endif
#ifndef DL_EXPORT
  #define DL_EXPORT(t) t
#endif
#define __PYX_COMMA ,
#ifndef HAVE_LONG_LONG
  #if PY_VERSION_HEX >= 0x02070000
    #define HAVE_LONG_LONG
  #endif
#endif
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#ifndef Py_HUGE_VAL
  #define Py_HUGE_VAL HUGE_VAL
#endif
#ifdef PYPY_VERSION
  #define CYTHON_COMPILING_IN_PYPY 1
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #if PY_VERSION_HEX < 0x03050000
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #undef CYTHON_AVOID_BORROWED_REFS
  #define CYTHON_AVOID_BORROWED_REFS 1
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 0
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
#elif defined(PYSTON_VERSION)
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 1
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #undef CYTHON_USE_ASYNC_SLOTS
  #define CYTHON_USE_ASYNC_SLOTS 0
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 0
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
#else
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 1
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #if PY_VERSION_HEX < 0x02070000
    #undef CYTHON_USE_PYTYPE_LOOKUP
    #define CYTHON_USE_PYTYPE_LOOKUP 0
  #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
    #define CYTHON_USE_PYTYPE_LOOKUP 1
  #endif
  #if PY_MAJOR_VERSION < 3
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #if PY_VERSION_HEX < 0x02070000
    #undef CYTHON_USE_PYLONG_INTERNALS
    #define CYTHON_USE_PYLONG_INTERNALS 0
  #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
    #define CYTHON_USE_PYLONG_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_PYLIST_INTERNALS
    #define CYTHON_USE_PYLIST_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #if PY_VERSION_HEX < 0x030300F0
    #undef CYTHON_USE_UNICODE_WRITER
    #define CYTHON_USE_UNICODE_WRITER 0
  #elif !defined(CYTHON_USE_UNICODE_WRITER)
    #define CYTHON_USE_UNICODE_WRITER 1
  #endif
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #ifndef CYTHON_FAST_THREAD_STATE
    #define CYTHON_FAST_THREAD_STATE 1
  #endif
  #ifndef CYTHON_FAST_PYCALL
    #define CYTHON_FAST_PYCALL 1
  #endif
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
  #endif
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
  #endif
  #ifndef CYTHON_USE_DICT_VERSIONS
    #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
  #endif
  #ifndef CYTHON_USE_EXC_INFO_STACK
    #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
  #endif
#endif
#if !defined(CYTHON_FAST_PYCCALL)
#define CYTHON_FAST_PYCCALL  (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
#endif
#if CYTHON_USE_PYLONG_INTERNALS
  #include "longintrepr.h"
  #undef SHIFT
  #undef BASE
  #undef MASK
#endif
#ifndef __has_attribute
  #define __has_attribute(x) 0
#endif
#ifndef __has_cpp_attribute
  #define __has_cpp_attribute(x) 0
#endif
#ifndef CYTHON_RESTRICT
  #if defined(__GNUC__)
    #define CYTHON_RESTRICT __restrict__
  #elif defined(_MSC_VER) && _MSC_VER >= 1400
    #define CYTHON_RESTRICT __restrict
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_RESTRICT restrict
  #else
    #define CYTHON_RESTRICT
  #endif
#endif
#ifndef CYTHON_UNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define CYTHON_UNUSED __attribute__ ((__unused__))
#   else
#     define CYTHON_UNUSED
#   endif
# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
#   define CYTHON_UNUSED __attribute__ ((__unused__))
# else
#   define CYTHON_UNUSED
# endif
#endif
#ifndef CYTHON_MAYBE_UNUSED_VAR
#  if defined(__cplusplus)
     template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
#  else
#    define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
#  endif
#endif
#ifndef CYTHON_NCP_UNUSED
# if CYTHON_COMPILING_IN_CPYTHON
#  define CYTHON_NCP_UNUSED
# else
#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
# endif
#endif
#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
#ifdef _MSC_VER
    #ifndef _MSC_STDINT_H_
        #if _MSC_VER < 1300
           typedef unsigned char     uint8_t;
           typedef unsigned int      uint32_t;
        #else
           typedef unsigned __int8   uint8_t;
           typedef unsigned __int32  uint32_t;
        #endif
    #endif
#else
   #include <stdint.h>
#endif
#ifndef CYTHON_FALLTHROUGH
  #if defined(__cplusplus) && __cplusplus >= 201103L
    #if __has_cpp_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH [[fallthrough]]
    #elif __has_cpp_attribute(clang::fallthrough)
      #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
    #elif __has_cpp_attribute(gnu::fallthrough)
      #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
    #endif
  #endif
  #ifndef CYTHON_FALLTHROUGH
    #if __has_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
    #else
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
  #if defined(__clang__ ) && defined(__apple_build_version__)
    #if __apple_build_version__ < 7000000
      #undef  CYTHON_FALLTHROUGH
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
#endif

#ifndef __cplusplus
  #error "Cython files generated with the C++ option must be compiled with a C++ compiler."
#endif
#ifndef CYTHON_INLINE
  #if defined(__clang__)
    #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
  #else
    #define CYTHON_INLINE inline
  #endif
#endif
template<typename T>
void __Pyx_call_destructor(T& x) {
    x.~T();
}
template<typename T>
class __Pyx_FakeReference {
  public:
    __Pyx_FakeReference() : ptr(NULL) { }
    __Pyx_FakeReference(const T& ref) : ptr(const_cast<T*>(&ref)) { }
    T *operator->() { return ptr; }
    T *operator&() { return ptr; }
    operator T&() { return *ptr; }
    template<typename U> bool operator ==(U other) { return *ptr == other; }
    template<typename U> bool operator !=(U other) { return *ptr != other; }
  private:
    T *ptr;
};

#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
  #define Py_OptimizeFlag 0
#endif
#define __PYX_BUILD_PY_SSIZE_T "n"
#define CYTHON_FORMAT_SSIZE_T "z"
#if PY_MAJOR_VERSION < 3
  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  #define __Pyx_DefaultClassType PyClass_Type
#else
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  #define __Pyx_DefaultClassType PyType_Type
#endif
#ifndef Py_TPFLAGS_CHECKTYPES
  #define Py_TPFLAGS_CHECKTYPES 0
#endif
#ifndef Py_TPFLAGS_HAVE_INDEX
  #define Py_TPFLAGS_HAVE_INDEX 0
#endif
#ifndef Py_TPFLAGS_HAVE_NEWBUFFER
  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
#ifndef Py_TPFLAGS_HAVE_FINALIZE
  #define Py_TPFLAGS_HAVE_FINALIZE 0
#endif
#ifndef METH_STACKLESS
  #define METH_STACKLESS 0
#endif
#if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
  #ifndef METH_FASTCALL
     #define METH_FASTCALL 0x80
  #endif
  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
                                                          Py_ssize_t nargs, PyObject *kwnames);
#else
  #define __Pyx_PyCFunctionFast _PyCFunctionFast
  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
#endif
#if CYTHON_FAST_PYCCALL
#define __Pyx_PyFastCFunction_Check(func)\
    ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
#else
#define __Pyx_PyFastCFunction_Check(func) 0
#endif
#if CYTHON_USE_DICT_VERSIONS
#define __PYX_GET_DICT_VERSION(dict)  (((PyDictObject*)(dict))->ma_version_tag)
#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
    (version_var) = __PYX_GET_DICT_VERSION(dict);\
    (cache_var) = (value);
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
        static PY_UINT64_T __pyx_dict_version = 0;\
        static PyObject *__pyx_dict_cached_value = NULL;\
        if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
            (VAR) = __pyx_dict_cached_value;\
        } else {\
            (VAR) = __pyx_dict_cached_value = (LOOKUP);\
            __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
        }\
    }
#else
#define __PYX_GET_DICT_VERSION(dict)  (0)
#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP)  (VAR) = (LOOKUP);
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
  #define PyObject_Malloc(s)   PyMem_Malloc(s)
  #define PyObject_Free(p)     PyMem_Free(p)
  #define PyObject_Realloc(p)  PyMem_Realloc(p)
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1
  #define PyMem_RawMalloc(n)           PyMem_Malloc(n)
  #define PyMem_RawRealloc(p, n)       PyMem_Realloc(p, n)
  #define PyMem_RawFree(p)             PyMem_Free(p)
#endif
#if CYTHON_COMPILING_IN_PYSTON
  #define __Pyx_PyCode_HasFreeVars(co)  PyCode_HasFreeVars(co)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
#else
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
#endif
#if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#elif PY_VERSION_HEX >= 0x03060000
  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
#elif PY_VERSION_HEX >= 0x03000000
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#else
  #define __Pyx_PyThreadState_Current _PyThreadState_Current
#endif
#if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
#include "pythread.h"
#define Py_tss_NEEDS_INIT 0
typedef int Py_tss_t;
static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
  *key = PyThread_create_key();
  return 0; // PyThread_create_key reports success always
}
static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
  Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
  *key = Py_tss_NEEDS_INIT;
  return key;
}
static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
  PyObject_Free(key);
}
static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
  return *key != Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
  PyThread_delete_key(*key);
  *key = Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
  return PyThread_set_key_value(*key, value);
}
static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
  return PyThread_get_key_value(*key);
}
#endif // TSS (Thread Specific Storage) API
#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
#define __Pyx_PyDict_NewPresized(n)  ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
#else
#define __Pyx_PyDict_NewPresized(n)  PyDict_New()
#endif
#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
#else
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
#define __Pyx_PyDict_GetItemStr(dict, name)  _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
#else
#define __Pyx_PyDict_GetItemStr(dict, name)  PyDict_GetItem(dict, name)
#endif
#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
  #define CYTHON_PEP393_ENABLED 1
  #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\
                                              0 : _PyUnicode_Ready((PyObject *)(op)))
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   PyUnicode_MAX_CHAR_VALUE(u)
  #define __Pyx_PyUnicode_KIND(u)         PyUnicode_KIND(u)
  #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
  #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  PyUnicode_WRITE(k, d, i, ch)
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
#else
  #define CYTHON_PEP393_ENABLED 0
  #define PyUnicode_1BYTE_KIND  1
  #define PyUnicode_2BYTE_KIND  2
  #define PyUnicode_4BYTE_KIND  4
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
  #define __Pyx_PyUnicode_KIND(u)         (sizeof(Py_UNICODE))
  #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_SIZE(u))
#endif
#if CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
#else
  #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
      PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
  #define PyUnicode_Contains(u, s)  PySequence_Contains(u, s)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
  #define PyByteArray_Check(obj)  PyObject_TypeCheck(obj, &PyByteArray_Type)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
  #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
#endif
#define __Pyx_PyString_FormatSafe(a, b)   ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
#else
  #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
#endif
#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
  #define PyObject_ASCII(o)            PyObject_Repr(o)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBaseString_Type            PyUnicode_Type
  #define PyStringObject               PyUnicodeObject
  #define PyString_Type                PyUnicode_Type
  #define PyString_Check               PyUnicode_Check
  #define PyString_CheckExact          PyUnicode_CheckExact
  #define PyObject_Unicode             PyObject_Str
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
#else
  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
#endif
#ifndef PySet_CheckExact
  #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
#endif
#if CYTHON_ASSUME_SAFE_MACROS
  #define __Pyx_PySequence_SIZE(seq)  Py_SIZE(seq)
#else
  #define __Pyx_PySequence_SIZE(seq)  PySequence_Size(seq)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyIntObject                  PyLongObject
  #define PyInt_Type                   PyLong_Type
  #define PyInt_Check(op)              PyLong_Check(op)
  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
  #define PyInt_FromString             PyLong_FromString
  #define PyInt_FromUnicode            PyLong_FromUnicode
  #define PyInt_FromLong               PyLong_FromLong
  #define PyInt_FromSize_t             PyLong_FromSize_t
  #define PyInt_FromSsize_t            PyLong_FromSsize_t
  #define PyInt_AsLong                 PyLong_AsLong
  #define PyInt_AS_LONG                PyLong_AS_LONG
  #define PyInt_AsSsize_t              PyLong_AsSsize_t
  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
  #define PyNumber_Int                 PyNumber_Long
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBoolObject                 PyLongObject
#endif
#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
  #ifndef PyUnicode_InternFromString
    #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
  #endif
#endif
#if PY_VERSION_HEX < 0x030200A4
  typedef long Py_hash_t;
  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
  #define __Pyx_PyInt_AsHash_t   PyInt_AsLong
#else
  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
  #define __Pyx_PyInt_AsHash_t   PyInt_AsSsize_t
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func))
#else
  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
#endif
#if CYTHON_USE_ASYNC_SLOTS
  #if PY_VERSION_HEX >= 0x030500B1
    #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
    #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
  #else
    #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
  #endif
#else
  #define __Pyx_PyType_AsAsync(obj) NULL
#endif
#ifndef __Pyx_PyAsyncMethodsStruct
    typedef struct {
        unaryfunc am_await;
        unaryfunc am_aiter;
        unaryfunc am_anext;
    } __Pyx_PyAsyncMethodsStruct;
#endif

#if defined(WIN32) || defined(MS_WINDOWS)
  #define _USE_MATH_DEFINES
#endif
#include <math.h>
#ifdef NAN
#define __PYX_NAN() ((float) NAN)
#else
static CYTHON_INLINE float __PYX_NAN() {
  float value;
  memset(&value, 0xFF, sizeof(value));
  return value;
}
#endif
#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
#define __Pyx_truncl trunc
#else
#define __Pyx_truncl truncl
#endif


#define __PYX_ERR(f_index, lineno, Ln_error) \
{ \
  __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \
}

#ifndef __PYX_EXTERN_C
  #ifdef __cplusplus
    #define __PYX_EXTERN_C extern "C"
  #else
    #define __PYX_EXTERN_C extern
  #endif
#endif

#define __PYX_HAVE__PDSim__scroll__common_scroll_geo
#define __PYX_HAVE_API__PDSim__scroll__common_scroll_geo
/* Early includes */
#include <string.h>
#include <stdio.h>
#include "numpy/arrayobject.h"
#include "numpy/ufuncobject.h"
#include <math.h>
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
#define CYTHON_WITHOUT_ASSERTIONS
#endif

typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
                const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;

#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
#define __PYX_DEFAULT_STRING_ENCODING ""
#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#define __Pyx_uchar_cast(c) ((unsigned char)c)
#define __Pyx_long_cast(x) ((long)x)
#define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (\
    (sizeof(type) < sizeof(Py_ssize_t))  ||\
    (sizeof(type) > sizeof(Py_ssize_t) &&\
          likely(v < (type)PY_SSIZE_T_MAX ||\
                 v == (type)PY_SSIZE_T_MAX)  &&\
          (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
                                v == (type)PY_SSIZE_T_MIN)))  ||\
    (sizeof(type) == sizeof(Py_ssize_t) &&\
          (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
                               v == (type)PY_SSIZE_T_MAX)))  )
static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
    return (size_t) i < (size_t) limit;
}
#if defined (__cplusplus) && __cplusplus >= 201103L
    #include <cstdlib>
    #define __Pyx_sst_abs(value) std::abs(value)
#elif SIZEOF_INT >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) abs(value)
#elif SIZEOF_LONG >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) labs(value)
#elif defined (_MSC_VER)
    #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define __Pyx_sst_abs(value) llabs(value)
#elif defined (__GNUC__)
    #define __Pyx_sst_abs(value) __builtin_llabs(value)
#else
    #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
#define __Pyx_PyBytes_FromString        PyBytes_FromString
#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
#if PY_MAJOR_VERSION < 3
    #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#else
    #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
#endif
#define __Pyx_PyBytes_AsWritableString(s)     ((char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsWritableSString(s)    ((signed char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsWritableUString(s)    ((unsigned char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsString(s)     ((const char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsSString(s)    ((const signed char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsUString(s)    ((const unsigned char*) PyBytes_AS_STRING(s))
#define __Pyx_PyObject_AsWritableString(s)    ((char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableSString(s)    ((signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableUString(s)    ((unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsSString(s)    ((const signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsUString(s)    ((const unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_FromCString(s)  __Pyx_PyObject_FromString((const char*)s)
#define __Pyx_PyBytes_FromCString(s)   __Pyx_PyBytes_FromString((const char*)s)
#define __Pyx_PyByteArray_FromCString(s)   __Pyx_PyByteArray_FromString((const char*)s)
#define __Pyx_PyStr_FromCString(s)     __Pyx_PyStr_FromString((const char*)s)
#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
    const Py_UNICODE *u_end = u;
    while (*u_end++) ;
    return (size_t)(u_end - u - 1);
}
#define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
#define __Pyx_PySequence_Tuple(obj)\
    (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
#if CYTHON_ASSUME_SAFE_MACROS
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
#else
#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
#endif
#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
#else
#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
#endif
#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
static int __Pyx_sys_getdefaultencoding_not_ascii;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    PyObject* ascii_chars_u = NULL;
    PyObject* ascii_chars_b = NULL;
    const char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    if (strcmp(default_encoding_c, "ascii") == 0) {
        __Pyx_sys_getdefaultencoding_not_ascii = 0;
    } else {
        char ascii_chars[128];
        int c;
        for (c = 0; c < 128; c++) {
            ascii_chars[c] = c;
        }
        __Pyx_sys_getdefaultencoding_not_ascii = 1;
        ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
        if (!ascii_chars_u) goto bad;
        ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
        if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
            PyErr_Format(
                PyExc_ValueError,
                "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
                default_encoding_c);
            goto bad;
        }
        Py_DECREF(ascii_chars_u);
        Py_DECREF(ascii_chars_b);
    }
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    Py_XDECREF(ascii_chars_u);
    Py_XDECREF(ascii_chars_b);
    return -1;
}
#endif
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
#else
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
static char* __PYX_DEFAULT_STRING_ENCODING;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
    if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
    strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    return -1;
}
#endif
#endif


/* Test for GCC > 2.95 */
#if defined(__GNUC__)     && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
  #define likely(x)   __builtin_expect(!!(x), 1)
  #define unlikely(x) __builtin_expect(!!(x), 0)
#else /* !__GNUC__ or GCC < 2.95 */
  #define likely(x)   (x)
  #define unlikely(x) (x)
#endif /* __GNUC__ */
static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }

static PyObject *__pyx_m = NULL;
static PyObject *__pyx_d;
static PyObject *__pyx_b;
static PyObject *__pyx_cython_runtime = NULL;
static PyObject *__pyx_empty_tuple;
static PyObject *__pyx_empty_bytes;
static PyObject *__pyx_empty_unicode;
static int __pyx_lineno;
static int __pyx_clineno = 0;
static const char * __pyx_cfilenm= __FILE__;
static const char *__pyx_filename;

/* Header.proto */
#if !defined(CYTHON_CCOMPLEX)
  #if defined(__cplusplus)
    #define CYTHON_CCOMPLEX 1
  #elif defined(_Complex_I)
    #define CYTHON_CCOMPLEX 1
  #else
    #define CYTHON_CCOMPLEX 0
  #endif
#endif
#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    #include <complex>
  #else
    #include <complex.h>
  #endif
#endif
#if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
  #undef _Complex_I
  #define _Complex_I 1.0fj
#endif


static const char *__pyx_f[] = {
  "PDSim/scroll/common_scroll_geo.pyx",
  "PDSim/scroll/common_scroll_geo.pxd",
  "stringsource",
  "__init__.pxd",
  "type.pxd",
};
/* BufferFormatStructs.proto */
#define IS_UNSIGNED(type) (((type) -1) > 0)
struct __Pyx_StructField_;
#define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0)
typedef struct {
  const char* name;
  struct __Pyx_StructField_* fields;
  size_t size;
  size_t arraysize[8];
  int ndim;
  char typegroup;
  char is_unsigned;
  int flags;
} __Pyx_TypeInfo;
typedef struct __Pyx_StructField_ {
  __Pyx_TypeInfo* type;
  const char* name;
  size_t offset;
} __Pyx_StructField;
typedef struct {
  __Pyx_StructField* field;
  size_t parent_offset;
} __Pyx_BufFmt_StackElem;
typedef struct {
  __Pyx_StructField root;
  __Pyx_BufFmt_StackElem* head;
  size_t fmt_offset;
  size_t new_count, enc_count;
  size_t struct_alignment;
  int is_complex;
  char enc_type;
  char new_packmode;
  char enc_packmode;
  char is_valid_array;
} __Pyx_BufFmt_Context;


/* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":776
 * # in Cython to enable them only on the right systems.
 * 
 * ctypedef npy_int8       int8_t             # <<<<<<<<<<<<<<
 * ctypedef npy_int16      int16_t
 * ctypedef npy_int32      int32_t
 */
typedef npy_int8 __pyx_t_5numpy_int8_t;

/* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":777
 * 
 * ctypedef npy_int8       int8_t
 * ctypedef npy_int16      int16_t             # <<<<<<<<<<<<<<
 * ctypedef npy_int32      int32_t
 * ctypedef npy_int64      int64_t
 */
typedef npy_int16 __pyx_t_5numpy_int16_t;

/* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":778
 * ctypedef npy_int8       int8_t
 * ctypedef npy_int16      int16_t
 * ctypedef npy_int32      int32_t             # <<<<<<<<<<<<<<
 * ctypedef npy_int64      int64_t
 * #ctypedef npy_int96      int96_t
 */
typedef npy_int32 __pyx_t_5numpy_int32_t;

/* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":779
 * ctypedef npy_int16      int16_t
 * ctypedef npy_int32      int32_t
 * ctypedef npy_int64      int64_t             # <<<<<<<<<<<<<<
 * #ctypedef npy_int96      int96_t
 * #ctypedef npy_int128     int128_t
 */
typedef npy_int64 __pyx_t_5numpy_int64_t;

/* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":783
 * #ctypedef npy_int128     int128_t
 * 
 * ctypedef npy_uint8      uint8_t             # <<<<<<<<<<<<<<
 * ctypedef npy_uint16     uint16_t
 * ctypedef npy_uint32     uint32_t
 */
typedef npy_uint8 __pyx_t_5numpy_uint8_t;

/* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":784
 * 
 * ctypedef npy_uint8      uint8_t
 * ctypedef npy_uint16     uint16_t             # <<<<<<<<<<<<<<
 * ctypedef npy_uint32     uint32_t
 * ctypedef npy_uint64     uint64_t
 */
typedef npy_uint16 __pyx_t_5numpy_uint16_t;

/* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":785
 * ctypedef npy_uint8      uint8_t
 * ctypedef npy_uint16     uint16_t
 * ctypedef npy_uint32     uint32_t             # <<<<<<<<<<<<<<
 * ctypedef npy_uint64     uint64_t
 * #ctypedef npy_uint96     uint96_t
 */
typedef npy_uint32 __pyx_t_5numpy_uint32_t;

/* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":786
 * ctypedef npy_uint16     uint16_t
 * ctypedef npy_uint32     uint32_t
 * ctypedef npy_uint64     uint64_t             # <<<<<<<<<<<<<<
 * #ctypedef npy_uint96     uint96_t
 * #ctypedef npy_uint128    uint128_t
 */
typedef npy_uint64 __pyx_t_5numpy_uint64_t;

/* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":790
 * #ctypedef npy_uint128    uint128_t
 * 
 * ctypedef npy_float32    float32_t             # <<<<<<<<<<<<<<
 * ctypedef npy_float64    float64_t
 * #ctypedef npy_float80    float80_t
 */
typedef npy_float32 __pyx_t_5numpy_float32_t;

/* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":791
 * 
 * ctypedef npy_float32    float32_t
 * ctypedef npy_float64    float64_t             # <<<<<<<<<<<<<<
 * #ctypedef npy_float80    float80_t
 * #ctypedef npy_float128   float128_t
 */
typedef npy_float64 __pyx_t_5numpy_float64_t;

/* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":800
 * # The int types are mapped a bit surprising --
 * # numpy.int corresponds to 'l' and numpy.long to 'q'
 * ctypedef npy_long       int_t             # <<<<<<<<<<<<<<
 * ctypedef npy_longlong   long_t
 * ctypedef npy_longlong   longlong_t
 */
typedef npy_long __pyx_t_5numpy_int_t;

/* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":801
 * # numpy.int corresponds to 'l' and numpy.long to 'q'
 * ctypedef npy_long       int_t
 * ctypedef npy_longlong   long_t             # <<<<<<<<<<<<<<
 * ctypedef npy_longlong   longlong_t
 * 
 */
typedef npy_longlong __pyx_t_5numpy_long_t;

/* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":802
 * ctypedef npy_long       int_t
 * ctypedef npy_longlong   long_t
 * ctypedef npy_longlong   longlong_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_ulong      uint_t
 */
typedef npy_longlong __pyx_t_5numpy_longlong_t;

/* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":804
 * ctypedef npy_longlong   longlong_t
 * 
 * ctypedef npy_ulong      uint_t             # <<<<<<<<<<<<<<
 * ctypedef npy_ulonglong  ulong_t
 * ctypedef npy_ulonglong  ulonglong_t
 */
typedef npy_ulong __pyx_t_5numpy_uint_t;

/* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":805
 * 
 * ctypedef npy_ulong      uint_t
 * ctypedef npy_ulonglong  ulong_t             # <<<<<<<<<<<<<<
 * ctypedef npy_ulonglong  ulonglong_t
 * 
 */
typedef npy_ulonglong __pyx_t_5numpy_ulong_t;

/* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":806
 * ctypedef npy_ulong      uint_t
 * ctypedef npy_ulonglong  ulong_t
 * ctypedef npy_ulonglong  ulonglong_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_intp       intp_t
 */
typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;

/* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":808
 * ctypedef npy_ulonglong  ulonglong_t
 * 
 * ctypedef npy_intp       intp_t             # <<<<<<<<<<<<<<
 * ctypedef npy_uintp      uintp_t
 * 
 */
typedef npy_intp __pyx_t_5numpy_intp_t;

/* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":809
 * 
 * ctypedef npy_intp       intp_t
 * ctypedef npy_uintp      uintp_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_double     float_t
 */
typedef npy_uintp __pyx_t_5numpy_uintp_t;

/* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":811
 * ctypedef npy_uintp      uintp_t
 * 
 * ctypedef npy_double     float_t             # <<<<<<<<<<<<<<
 * ctypedef npy_double     double_t
 * ctypedef npy_longdouble longdouble_t
 */
typedef npy_double __pyx_t_5numpy_float_t;

/* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":812
 * 
 * ctypedef npy_double     float_t
 * ctypedef npy_double     double_t             # <<<<<<<<<<<<<<
 * ctypedef npy_longdouble longdouble_t
 * 
 */
typedef npy_double __pyx_t_5numpy_double_t;

/* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":813
 * ctypedef npy_double     float_t
 * ctypedef npy_double     double_t
 * ctypedef npy_longdouble longdouble_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_cfloat      cfloat_t
 */
typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
/* Declarations.proto */
#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    typedef ::std::complex< float > __pyx_t_float_complex;
  #else
    typedef float _Complex __pyx_t_float_complex;
  #endif
#else
    typedef struct { float real, imag; } __pyx_t_float_complex;
#endif
static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);

/* Declarations.proto */
#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    typedef ::std::complex< double > __pyx_t_double_complex;
  #else
    typedef double _Complex __pyx_t_double_complex;
  #endif
#else
    typedef struct { double real, imag; } __pyx_t_double_complex;
#endif
static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);


/*--- Type declarations ---*/
struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_VdVstruct;
struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass;
struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute;
struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes;
struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals;

/* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":815
 * ctypedef npy_longdouble longdouble_t
 * 
 * ctypedef npy_cfloat      cfloat_t             # <<<<<<<<<<<<<<
 * ctypedef npy_cdouble     cdouble_t
 * ctypedef npy_clongdouble clongdouble_t
 */
typedef npy_cfloat __pyx_t_5numpy_cfloat_t;

/* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":816
 * 
 * ctypedef npy_cfloat      cfloat_t
 * ctypedef npy_cdouble     cdouble_t             # <<<<<<<<<<<<<<
 * ctypedef npy_clongdouble clongdouble_t
 * 
 */
typedef npy_cdouble __pyx_t_5numpy_cdouble_t;

/* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":817
 * ctypedef npy_cfloat      cfloat_t
 * ctypedef npy_cdouble     cdouble_t
 * ctypedef npy_clongdouble clongdouble_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_cdouble     complex_t
 */
typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;

/* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":819
 * ctypedef npy_clongdouble clongdouble_t
 * 
 * ctypedef npy_cdouble     complex_t             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew1(a):
 */
typedef npy_cdouble __pyx_t_5numpy_complex_t;
struct __pyx_opt_args_5PDSim_6scroll_17common_scroll_geo_coords_norm;
struct __pyx_opt_args_5PDSim_6scroll_17common_scroll_geo_coords_inv;
struct __pyx_opt_args_5PDSim_6scroll_17common_scroll_geo__coords_inv_np;
struct __pyx_opt_args_5PDSim_6scroll_17common_scroll_geo__coords_inv_d;

/* "PDSim/scroll/common_scroll_geo.pxd":45
 *     """ The initial angle on the outer involute of the wrap that forms the inner wall of the CV"""
 * 
 * cdef enum involute_index:             # <<<<<<<<<<<<<<
 *     INVOLUTE_FI
 *     INVOLUTE_FO
 */
enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index {
  __pyx_e_5PDSim_6scroll_17common_scroll_geo_INVOLUTE_FI,
  __pyx_e_5PDSim_6scroll_17common_scroll_geo_INVOLUTE_FO,
  __pyx_e_5PDSim_6scroll_17common_scroll_geo_INVOLUTE_OI,
  __pyx_e_5PDSim_6scroll_17common_scroll_geo_INVOLUTE_OO
};

/* "PDSim/scroll/common_scroll_geo.pxd":84
 *     """ Boolean for existence of the line #2 """
 * 
 * cdef enum sides:             # <<<<<<<<<<<<<<
 *     UP
 *     DOWN
 */
enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_sides {
  __pyx_e_5PDSim_6scroll_17common_scroll_geo_UP,
  __pyx_e_5PDSim_6scroll_17common_scroll_geo_DOWN,
  __pyx_e_5PDSim_6scroll_17common_scroll_geo_MID
};

/* "PDSim/scroll/common_scroll_geo.pxd":89
 *     MID
 * 
 * cdef enum compressor_CV_indices:             # <<<<<<<<<<<<<<
 *     keyIsa, keyIs1, keyIs2, keyId1, keyId2,
 *     keyIdd, keyIddd
 */
enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_compressor_CV_indices {
  __pyx_e_5PDSim_6scroll_17common_scroll_geo_keyIsa,
  __pyx_e_5PDSim_6scroll_17common_scroll_geo_keyIs1,
  __pyx_e_5PDSim_6scroll_17common_scroll_geo_keyIs2,
  __pyx_e_5PDSim_6scroll_17common_scroll_geo_keyId1,
  __pyx_e_5PDSim_6scroll_17common_scroll_geo_keyId2,
  __pyx_e_5PDSim_6scroll_17common_scroll_geo_keyIdd,
  __pyx_e_5PDSim_6scroll_17common_scroll_geo_keyIddd,
  __pyx_e_5PDSim_6scroll_17common_scroll_geo_keyIc1_1 = 0x3E9,
  __pyx_e_5PDSim_6scroll_17common_scroll_geo_keyIc2_1 = 0x7D1,
  __pyx_e_5PDSim_6scroll_17common_scroll_geo_keyIc1_2 = 0x3EA,
  __pyx_e_5PDSim_6scroll_17common_scroll_geo_keyIc2_2 = 0x7D2,
  __pyx_e_5PDSim_6scroll_17common_scroll_geo_keyIc1_3 = 0x3EB,
  __pyx_e_5PDSim_6scroll_17common_scroll_geo_keyIc2_3 = 0x7D3,
  __pyx_e_5PDSim_6scroll_17common_scroll_geo_keyIc1_4 = 0x3EC,
  __pyx_e_5PDSim_6scroll_17common_scroll_geo_keyIc2_4 = 0x7D4,
  __pyx_e_5PDSim_6scroll_17common_scroll_geo_keyIc1_5 = 0x3ED,
  __pyx_e_5PDSim_6scroll_17common_scroll_geo_keyIc2_5 = 0x7D5,
  __pyx_e_5PDSim_6scroll_17common_scroll_geo_keyIc1_6 = 0x3EE,
  __pyx_e_5PDSim_6scroll_17common_scroll_geo_keyIc2_6 = 0x7D6,
  __pyx_e_5PDSim_6scroll_17common_scroll_geo_keyIc1_7 = 0x3EF,
  __pyx_e_5PDSim_6scroll_17common_scroll_geo_keyIc2_7 = 0x7D7,
  __pyx_e_5PDSim_6scroll_17common_scroll_geo_keyIc1_8 = 0x3F0,
  __pyx_e_5PDSim_6scroll_17common_scroll_geo_keyIc2_8 = 0x7D8,
  __pyx_e_5PDSim_6scroll_17common_scroll_geo_keyIc1_9 = 0x3F1,
  __pyx_e_5PDSim_6scroll_17common_scroll_geo_keyIc2_9 = 0x7D9,
  __pyx_e_5PDSim_6scroll_17common_scroll_geo_keyIc1_10 = 0x3F2,
  __pyx_e_5PDSim_6scroll_17common_scroll_geo_keyIc2_10 = 0x7DA
};

/* "PDSim/scroll/common_scroll_geo.pxd":129
 *     np.ndarray
 * 
 * cpdef tuple coords_norm(phi_vec, geoVals geo, double theta, flag = *)             # <<<<<<<<<<<<<<
 * cpdef tuple coords_inv(phi_vec, geoVals geo, double theta, flag = *)
 * cpdef tuple _coords_inv_np(np.ndarray[np.float_t] phi, geoVals geo, double theta, flag = *)
 */
struct __pyx_opt_args_5PDSim_6scroll_17common_scroll_geo_coords_norm {
  int __pyx_n;
  PyObject *flag;
};

/* "PDSim/scroll/common_scroll_geo.pxd":130
 * 
 * cpdef tuple coords_norm(phi_vec, geoVals geo, double theta, flag = *)
 * cpdef tuple coords_inv(phi_vec, geoVals geo, double theta, flag = *)             # <<<<<<<<<<<<<<
 * cpdef tuple _coords_inv_np(np.ndarray[np.float_t] phi, geoVals geo, double theta, flag = *)
 * cpdef tuple _coords_inv_d(double phi, geoVals geo, double theta, flag = *)
 */
struct __pyx_opt_args_5PDSim_6scroll_17common_scroll_geo_coords_inv {
  int __pyx_n;
  PyObject *flag;
};

/* "PDSim/scroll/common_scroll_geo.pxd":131
 * cpdef tuple coords_norm(phi_vec, geoVals geo, double theta, flag = *)
 * cpdef tuple coords_inv(phi_vec, geoVals geo, double theta, flag = *)
 * cpdef tuple _coords_inv_np(np.ndarray[np.float_t] phi, geoVals geo, double theta, flag = *)             # <<<<<<<<<<<<<<
 * cpdef tuple _coords_inv_d(double phi, geoVals geo, double theta, flag = *)
 * 
 */
struct __pyx_opt_args_5PDSim_6scroll_17common_scroll_geo__coords_inv_np {
  int __pyx_n;
  PyObject *flag;
};

/* "PDSim/scroll/common_scroll_geo.pxd":132
 * cpdef tuple coords_inv(phi_vec, geoVals geo, double theta, flag = *)
 * cpdef tuple _coords_inv_np(np.ndarray[np.float_t] phi, geoVals geo, double theta, flag = *)
 * cpdef tuple _coords_inv_d(double phi, geoVals geo, double theta, flag = *)             # <<<<<<<<<<<<<<
 * 
 * cdef _coords_inv_d_int(double phi, geoVals geo, double theta, int flag, double *x, double *y)
 */
struct __pyx_opt_args_5PDSim_6scroll_17common_scroll_geo__coords_inv_d {
  int __pyx_n;
  PyObject *flag;
};

/* "PDSim/scroll/common_scroll_geo.pxd":10
 * from libc.math cimport sqrt,sin,cos,tan,atan2,acos,floor,M_PI as pi,pow
 * 
 * cdef class VdVstruct:             # <<<<<<<<<<<<<<
 *     """
 *     A struct with values for volume and derivative of volume w.r.t. crank angle
 */
struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_VdVstruct {
  PyObject_HEAD
  double V;
  double dV;
};


/* "PDSim/scroll/common_scroll_geo.pxd":21
 *     """ Derivative of volume with respect to crank angle [m^3/radian] """
 * 
 * cdef class HTAnglesClass:             # <<<<<<<<<<<<<<
 *     """
 *     A struct with angles associated with the calculations needed for the assesment
 */
struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass {
  PyObject_HEAD
  double phi_1_i;
  double phi_2_i;
  double phi_1_o;
  double phi_2_o;
  double phi_i0;
  double phi_o0;
};


/* "PDSim/scroll/common_scroll_geo.pxd":51
 *     INVOLUTE_OO
 * 
 * cdef class CVInvolute:             # <<<<<<<<<<<<<<
 *     """
 *     A simple struct to contain the involute angles
 */
struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute {
  PyObject_HEAD
  double phi_max;
  double phi_min;
  double phi_0;
  double dphi_max_dtheta;
  double dphi_min_dtheta;
  enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index involute;
};


/* "PDSim/scroll/common_scroll_geo.pxd":74
 *     """ The involute_index of this involute """
 * 
 * cdef class CVInvolutes:             # <<<<<<<<<<<<<<
 *     cdef public CVInvolute Inner
 *     """ The values for the inner involute of this chamber """
 */
struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes {
  PyObject_HEAD
  struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *Inner;
  struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *Outer;
  int has_line_1;
  int has_line_2;
};


/* "PDSim/scroll/common_scroll_geo.pxd":104
 * 
 * #Take over the geo class with strict typing
 * cdef class geoVals:             # <<<<<<<<<<<<<<
 *     cdef public double h,ro,rb,t
 *     cdef public double phi_fi0,phi_fis,phi_fie,phi_fo0,phi_fos,phi_foe, phi_oi0,phi_ois,phi_oie, phi_oo0,phi_oos,phi_ooe
 */
struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals {
  PyObject_HEAD
  struct __pyx_vtabstruct_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_vtab;
  double h;
  double ro;
  double rb;
  double t;
  double phi_fi0;
  double phi_fis;
  double phi_fie;
  double phi_fo0;
  double phi_fos;
  double phi_foe;
  double phi_oi0;
  double phi_ois;
  double phi_oie;
  double phi_oo0;
  double phi_oos;
  double phi_ooe;
  double xa_arc1;
  double ya_arc1;
  double ra_arc1;
  double t1_arc1;
  double t2_arc1;
  double xa_arc2;
  double ya_arc2;
  double ra_arc2;
  double t1_arc2;
  double t2_arc2;
  double b_line;
  double t1_line;
  double t2_line;
  double m_line;
  double x0_wall;
  double y0_wall;
  double r_wall;
  double delta_radial;
  double delta_flank;
  double phi_ie_offset;
  double delta_suction_offset;
  double cx_scroll;
  double cy_scroll;
  double V_scroll;
  double Vremove;
  PyArrayObject *xvec_disc_port;
  PyArrayObject *yvec_disc_port;
};



/* "PDSim/scroll/common_scroll_geo.pyx":558
 *     return geo
 * 
 * cdef class geoVals:             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self):
 */

struct __pyx_vtabstruct_5PDSim_6scroll_17common_scroll_geo_geoVals {
  int (*is_symmetric)(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *, int __pyx_skip_dispatch);
  double (*val_if_symmetric)(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *, double, int __pyx_skip_dispatch);
  PyObject *(*copy_inplace)(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_vtabptr_5PDSim_6scroll_17common_scroll_geo_geoVals;

/* --- Runtime support code (head) --- */
/* Refnanny.proto */
#ifndef CYTHON_REFNANNY
  #define CYTHON_REFNANNY 0
#endif
#if CYTHON_REFNANNY
  typedef struct {
    void (*INCREF)(void*, PyObject*, int);
    void (*DECREF)(void*, PyObject*, int);
    void (*GOTREF)(void*, PyObject*, int);
    void (*GIVEREF)(void*, PyObject*, int);
    void* (*SetupContext)(const char*, int, const char*);
    void (*FinishContext)(void**);
  } __Pyx_RefNannyAPIStruct;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
#ifdef WITH_THREAD
  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
          if (acquire_gil) {\
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
              PyGILState_Release(__pyx_gilstate_save);\
          } else {\
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
          }
#else
  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
          __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
#endif
  #define __Pyx_RefNannyFinishContext()\
          __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
  #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_XINCREF(r)  do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
  #define __Pyx_XDECREF(r)  do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
  #define __Pyx_XGOTREF(r)  do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
#else
  #define __Pyx_RefNannyDeclarations
  #define __Pyx_RefNannySetupContext(name, acquire_gil)
  #define __Pyx_RefNannyFinishContext()
  #define __Pyx_INCREF(r) Py_INCREF(r)
  #define __Pyx_DECREF(r) Py_DECREF(r)
  #define __Pyx_GOTREF(r)
  #define __Pyx_GIVEREF(r)
  #define __Pyx_XINCREF(r) Py_XINCREF(r)
  #define __Pyx_XDECREF(r) Py_XDECREF(r)
  #define __Pyx_XGOTREF(r)
  #define __Pyx_XGIVEREF(r)
#endif
#define __Pyx_XDECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; __Pyx_XDECREF(tmp);\
    } while (0)
#define __Pyx_DECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; __Pyx_DECREF(tmp);\
    } while (0)
#define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
#define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)

/* PyObjectGetAttrStr.proto */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
#endif

/* GetBuiltinName.proto */
static PyObject *__Pyx_GetBuiltinName(PyObject *name);

/* RaiseArgTupleInvalid.proto */
static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
    Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);

/* RaiseDoubleKeywords.proto */
static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);

/* ParseKeywords.proto */
static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
    PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
    const char* function_name);

/* PyThreadStateGet.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyThreadState_declare  PyThreadState *__pyx_tstate;
#define __Pyx_PyThreadState_assign  __pyx_tstate = __Pyx_PyThreadState_Current;
#define __Pyx_PyErr_Occurred()  __pyx_tstate->curexc_type
#else
#define __Pyx_PyThreadState_declare
#define __Pyx_PyThreadState_assign
#define __Pyx_PyErr_Occurred()  PyErr_Occurred()
#endif

/* PyErrFetchRestore.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
#define __Pyx_ErrRestoreWithState(type, value, tb)  __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb)    __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrRestore(type, value, tb)  __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
#define __Pyx_ErrFetch(type, value, tb)    __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
#else
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#endif
#else
#define __Pyx_PyErr_Clear() PyErr_Clear()
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#define __Pyx_ErrRestoreWithState(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb)  PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestoreInState(tstate, type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchInState(tstate, type, value, tb)  PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestore(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetch(type, value, tb)  PyErr_Fetch(type, value, tb)
#endif

/* Profile.proto */
#ifndef CYTHON_PROFILE
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
  #define CYTHON_PROFILE 0
#else
  #define CYTHON_PROFILE 1
#endif
#endif
#ifndef CYTHON_TRACE_NOGIL
  #define CYTHON_TRACE_NOGIL 0
#else
  #if CYTHON_TRACE_NOGIL && !defined(CYTHON_TRACE)
    #define CYTHON_TRACE 1
  #endif
#endif
#ifndef CYTHON_TRACE
  #define CYTHON_TRACE 0
#endif
#if CYTHON_TRACE
  #undef CYTHON_PROFILE_REUSE_FRAME
#endif
#ifndef CYTHON_PROFILE_REUSE_FRAME
  #define CYTHON_PROFILE_REUSE_FRAME 0
#endif
#if CYTHON_PROFILE || CYTHON_TRACE
  #include "compile.h"
  #include "frameobject.h"
  #include "traceback.h"
  #if CYTHON_PROFILE_REUSE_FRAME
    #define CYTHON_FRAME_MODIFIER static
    #define CYTHON_FRAME_DEL(frame)
  #else
    #define CYTHON_FRAME_MODIFIER
    #define CYTHON_FRAME_DEL(frame) Py_CLEAR(frame)
  #endif
  #define __Pyx_TraceDeclarations\
  static PyCodeObject *__pyx_frame_code = NULL;\
  CYTHON_FRAME_MODIFIER PyFrameObject *__pyx_frame = NULL;\
  int __Pyx_use_tracing = 0;
  #define __Pyx_TraceFrameInit(codeobj)\
  if (codeobj) __pyx_frame_code = (PyCodeObject*) codeobj;
  #ifdef WITH_THREAD
  #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error)\
  if (nogil) {\
      if (CYTHON_TRACE_NOGIL) {\
          PyThreadState *tstate;\
          PyGILState_STATE state = PyGILState_Ensure();\
          tstate = __Pyx_PyThreadState_Current;\
          if (unlikely(tstate->use_tracing) && !tstate->tracing &&\
                  (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) {\
              __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\
          }\
          PyGILState_Release(state);\
          if (unlikely(__Pyx_use_tracing < 0)) goto_error;\
      }\
  } else {\
      PyThreadState* tstate = PyThreadState_GET();\
      if (unlikely(tstate->use_tracing) && !tstate->tracing &&\
              (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) {\
          __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\
          if (unlikely(__Pyx_use_tracing < 0)) goto_error;\
      }\
  }
  #else
  #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error)\
  {   PyThreadState* tstate = PyThreadState_GET();\
      if (unlikely(tstate->use_tracing) && !tstate->tracing &&\
              (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) {\
          __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\
          if (unlikely(__Pyx_use_tracing < 0)) goto_error;\
      }\
  }
  #endif
  #define __Pyx_TraceException()\
  if (likely(!__Pyx_use_tracing)); else {\
      PyThreadState* tstate = __Pyx_PyThreadState_Current;\
      if (tstate->use_tracing &&\
              (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) {\
          tstate->tracing++;\
          tstate->use_tracing = 0;\
          PyObject *exc_info = __Pyx_GetExceptionTuple(tstate);\
          if (exc_info) {\
              if (CYTHON_TRACE && tstate->c_tracefunc)\
                  tstate->c_tracefunc(\
                      tstate->c_traceobj, __pyx_frame, PyTrace_EXCEPTION, exc_info);\
              tstate->c_profilefunc(\
                  tstate->c_profileobj, __pyx_frame, PyTrace_EXCEPTION, exc_info);\
              Py_DECREF(exc_info);\
          }\
          tstate->use_tracing = 1;\
          tstate->tracing--;\
      }\
  }
  static void __Pyx_call_return_trace_func(PyThreadState *tstate, PyFrameObject *frame, PyObject *result) {
      PyObject *type, *value, *traceback;
      __Pyx_ErrFetchInState(tstate, &type, &value, &traceback);
      tstate->tracing++;
      tstate->use_tracing = 0;
      if (CYTHON_TRACE && tstate->c_tracefunc)
          tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_RETURN, result);
      if (tstate->c_profilefunc)
          tstate->c_profilefunc(tstate->c_profileobj, frame, PyTrace_RETURN, result);
      CYTHON_FRAME_DEL(frame);
      tstate->use_tracing = 1;
      tstate->tracing--;
      __Pyx_ErrRestoreInState(tstate, type, value, traceback);
  }
  #ifdef WITH_THREAD
  #define __Pyx_TraceReturn(result, nogil)\
  if (likely(!__Pyx_use_tracing)); else {\
      if (nogil) {\
          if (CYTHON_TRACE_NOGIL) {\
              PyThreadState *tstate;\
              PyGILState_STATE state = PyGILState_Ensure();\
              tstate = __Pyx_PyThreadState_Current;\
              if (tstate->use_tracing) {\
                  __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\
              }\
              PyGILState_Release(state);\
          }\
      } else {\
          PyThreadState* tstate = __Pyx_PyThreadState_Current;\
          if (tstate->use_tracing) {\
              __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\
          }\
      }\
  }
  #else
  #define __Pyx_TraceReturn(result, nogil)\
  if (likely(!__Pyx_use_tracing)); else {\
      PyThreadState* tstate = __Pyx_PyThreadState_Current;\
      if (tstate->use_tracing) {\
          __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\
      }\
  }
  #endif
  static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno);
  static int __Pyx_TraceSetupAndCall(PyCodeObject** code, PyFrameObject** frame, PyThreadState* tstate, const char *funcname, const char *srcfile, int firstlineno);
#else
  #define __Pyx_TraceDeclarations
  #define __Pyx_TraceFrameInit(codeobj)
  #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error)   if ((1)); else goto_error;
  #define __Pyx_TraceException()
  #define __Pyx_TraceReturn(result, nogil)
#endif
#if CYTHON_TRACE
  static int __Pyx_call_line_trace_func(PyThreadState *tstate, PyFrameObject *frame, int lineno) {
      int ret;
      PyObject *type, *value, *traceback;
      __Pyx_ErrFetchInState(tstate, &type, &value, &traceback);
      __Pyx_PyFrame_SetLineNumber(frame, lineno);
      tstate->tracing++;
      tstate->use_tracing = 0;
      ret = tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_LINE, NULL);
      tstate->use_tracing = 1;
      tstate->tracing--;
      if (likely(!ret)) {
          __Pyx_ErrRestoreInState(tstate, type, value, traceback);
      } else {
          Py_XDECREF(type);
          Py_XDECREF(value);
          Py_XDECREF(traceback);
      }
      return ret;
  }
  #ifdef WITH_THREAD
  #define __Pyx_TraceLine(lineno, nogil, goto_error)\
  if (likely(!__Pyx_use_tracing)); else {\
      if (nogil) {\
          if (CYTHON_TRACE_NOGIL) {\
              int ret = 0;\
              PyThreadState *tstate;\
              PyGILState_STATE state = PyGILState_Ensure();\
              tstate = __Pyx_PyThreadState_Current;\
              if (unlikely(tstate->use_tracing && tstate->c_tracefunc && __pyx_frame->f_trace)) {\
                  ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\
              }\
              PyGILState_Release(state);\
              if (unlikely(ret)) goto_error;\
          }\
      } else {\
          PyThreadState* tstate = __Pyx_PyThreadState_Current;\
          if (unlikely(tstate->use_tracing && tstate->c_tracefunc && __pyx_frame->f_trace)) {\
              int ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\
              if (unlikely(ret)) goto_error;\
          }\
      }\
  }
  #else
  #define __Pyx_TraceLine(lineno, nogil, goto_error)\
  if (likely(!__Pyx_use_tracing)); else {\
      PyThreadState* tstate = __Pyx_PyThreadState_Current;\
      if (unlikely(tstate->use_tracing && tstate->c_tracefunc && __pyx_frame->f_trace)) {\
          int ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\
          if (unlikely(ret)) goto_error;\
      }\
  }
  #endif
#else
  #define __Pyx_TraceLine(lineno, nogil, goto_error)   if ((1)); else goto_error;
#endif

/* GetItemInt.proto */
#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
    (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
               __Pyx_GetItemInt_Generic(o, to_py_func(i))))
#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
    (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck);
#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
    (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck);
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
                                                     int is_list, int wraparound, int boundscheck);

/* PyDictContains.proto */
static CYTHON_INLINE int __Pyx_PyDict_ContainsTF(PyObject* item, PyObject* dict, int eq) {
    int result = PyDict_Contains(dict, item);
    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}

/* DictGetItem.proto */
#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key);
#define __Pyx_PyObject_Dict_GetItem(obj, name)\
    (likely(PyDict_CheckExact(obj)) ?\
     __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name))
#else
#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
#define __Pyx_PyObject_Dict_GetItem(obj, name)  PyObject_GetItem(obj, name)
#endif

/* PyCFunctionFastCall.proto */
#if CYTHON_FAST_PYCCALL
static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
#else
#define __Pyx_PyCFunction_FastCall(func, args, nargs)  (assert(0), NULL)
#endif

/* PyFunctionFastCall.proto */
#if CYTHON_FAST_PYCALL
#define __Pyx_PyFunction_FastCall(func, args, nargs)\
    __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
#if 1 || PY_VERSION_HEX < 0x030600B1
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs);
#else
#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
#endif
#define __Pyx_BUILD_ASSERT_EXPR(cond)\
    (sizeof(char [1 - 2*!(cond)]) - 1)
#ifndef Py_MEMBER_SIZE
#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
#endif
  static size_t __pyx_pyframe_localsplus_offset = 0;
  #include "frameobject.h"
  #define __Pxy_PyFrame_Initialize_Offsets()\
    ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
     (void)(__pyx_pyframe_localsplus_offset = PyFrame_Type.tp_basicsize - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
  #define __Pyx_PyFrame_GetLocalsplus(frame)\
    (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
#endif

/* PyObjectCall.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
#else
#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
#endif

/* PyObjectCallMethO.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
#endif

/* PyObjectCallOneArg.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);

/* RaiseException.proto */
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);

/* SetItemInt.proto */
#define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\
    (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\
               __Pyx_SetItemInt_Generic(o, to_py_func(i), v)))
static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
                                               int is_list, int wraparound, int boundscheck);

/* IterFinish.proto */
static CYTHON_INLINE int __Pyx_IterFinish(void);

/* PyObjectCallNoArg.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
#else
#define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
#endif

/* PyObjectGetMethod.proto */
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);

/* PyObjectCallMethod0.proto */
static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name);

/* RaiseNeedMoreValuesToUnpack.proto */
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);

/* RaiseTooManyValuesToUnpack.proto */
static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);

/* UnpackItemEndCheck.proto */
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);

/* RaiseNoneIterError.proto */
static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);

/* UnpackTupleError.proto */
static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index);

/* UnpackTuple2.proto */
#define __Pyx_unpack_tuple2(tuple, value1, value2, is_tuple, has_known_size, decref_tuple)\
    (likely(is_tuple || PyTuple_Check(tuple)) ?\
        (likely(has_known_size || PyTuple_GET_SIZE(tuple) == 2) ?\
            __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple) :\
            (__Pyx_UnpackTupleError(tuple, 2), -1)) :\
        __Pyx_unpack_tuple2_generic(tuple, value1, value2, has_known_size, decref_tuple))
static CYTHON_INLINE int __Pyx_unpack_tuple2_exact(
    PyObject* tuple, PyObject** value1, PyObject** value2, int decref_tuple);
static int __Pyx_unpack_tuple2_generic(
    PyObject* tuple, PyObject** value1, PyObject** value2, int has_known_size, int decref_tuple);

/* dict_iter.proto */
static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name,
                                                   Py_ssize_t* p_orig_length, int* p_is_dict);
static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos,
                                              PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict);

/* PyObjectCall2Args.proto */
static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);

/* ListAppend.proto */
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
    PyListObject* L = (PyListObject*) list;
    Py_ssize_t len = Py_SIZE(list);
    if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
        Py_INCREF(x);
        PyList_SET_ITEM(list, len, x);
        Py_SIZE(list) = len+1;
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
#endif

/* WriteUnraisableException.proto */
static void __Pyx_WriteUnraisable(const char *name, int clineno,
                                  int lineno, const char *filename,
                                  int full_traceback, int nogil);

/* ExtTypeTest.proto */
static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);

/* ArgTypeTest.proto */
#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
    ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
        __Pyx__ArgTypeTest(obj, type, name, exact))
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);

/* PyErrExceptionMatches.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
#else
#define __Pyx_PyErr_ExceptionMatches(err)  PyErr_ExceptionMatches(err)
#endif

/* GetAttr.proto */
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);

/* GetAttr3.proto */
static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);

/* GetModuleGlobalName.proto */
#if CYTHON_USE_DICT_VERSIONS
#define __Pyx_GetModuleGlobalName(var, name)  {\
    static PY_UINT64_T __pyx_dict_version = 0;\
    static PyObject *__pyx_dict_cached_value = NULL;\
    (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
        (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
        __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
}
#define __Pyx_GetModuleGlobalNameUncached(var, name)  {\
    PY_UINT64_T __pyx_dict_version;\
    PyObject *__pyx_dict_cached_value;\
    (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
}
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
#else
#define __Pyx_GetModuleGlobalName(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
#define __Pyx_GetModuleGlobalNameUncached(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
#endif

/* KeywordStringCheck.proto */
static int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed);

/* GetTopmostException.proto */
#if CYTHON_USE_EXC_INFO_STACK
static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
#endif

/* SaveResetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ExceptionSave(type, value, tb)  __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#define __Pyx_ExceptionReset(type, value, tb)  __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
#else
#define __Pyx_ExceptionSave(type, value, tb)   PyErr_GetExcInfo(type, value, tb)
#define __Pyx_ExceptionReset(type, value, tb)  PyErr_SetExcInfo(type, value, tb)
#endif

/* GetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_GetException(type, value, tb)  __Pyx__GetException(__pyx_tstate, type, value, tb)
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
#endif

/* IncludeStringH.proto */
#include <string.h>

/* BytesEquals.proto */
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);

/* ObjectGetItem.proto */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key);
#else
#define __Pyx_PyObject_GetItem(obj, key)  PyObject_GetItem(obj, key)
#endif

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
#else
#define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace)\
    (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
#endif

/* PyFloatBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyFloat_TrueDivideObjC(PyObject *op1, PyObject *op2, double floatval, int inplace);
#else
#define __Pyx_PyFloat_TrueDivideObjC(op1, op2, floatval, inplace)\
    (inplace ? PyNumber_InPlaceTrueDivide(op1, op2) : PyNumber_TrueDivide(op1, op2))
#endif

/* IsLittleEndian.proto */
static CYTHON_INLINE int __Pyx_Is_Little_Endian(void);

/* BufferFormatCheck.proto */
static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts);
static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
                              __Pyx_BufFmt_StackElem* stack,
                              __Pyx_TypeInfo* type);

/* BufferGetAndValidate.proto */
#define __Pyx_GetBufferAndValidate(buf, obj, dtype, flags, nd, cast, stack)\
    ((obj == Py_None || obj == NULL) ?\
    (__Pyx_ZeroBuffer(buf), 0) :\
    __Pyx__GetBufferAndValidate(buf, obj, dtype, flags, nd, cast, stack))
static int  __Pyx__GetBufferAndValidate(Py_buffer* buf, PyObject* obj,
    __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack);
static void __Pyx_ZeroBuffer(Py_buffer* buf);
static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info);
static Py_ssize_t __Pyx_minusones[] = { -1, -1, -1, -1, -1, -1, -1, -1 };
static Py_ssize_t __Pyx_zeros[] = { 0, 0, 0, 0, 0, 0, 0, 0 };

/* UnicodeEquals.proto */
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);

/* StrEquals.proto */
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
#else
#define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
#endif

/* Import.proto */
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);

/* ImportFrom.proto */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);

/* HasAttr.proto */
static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);

/* PyObject_GenericGetAttrNoDict.proto */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
#endif

/* PyObject_GenericGetAttr.proto */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
#endif

/* SetupReduce.proto */
static int __Pyx_setup_reduce(PyObject* type_obj);

/* SetVTable.proto */
static int __Pyx_SetVtable(PyObject *dict, void *vtable);

/* TypeImport.proto */
#ifndef __PYX_HAVE_RT_ImportType_proto
#define __PYX_HAVE_RT_ImportType_proto
enum __Pyx_ImportType_CheckSize {
   __Pyx_ImportType_CheckSize_Error = 0,
   __Pyx_ImportType_CheckSize_Warn = 1,
   __Pyx_ImportType_CheckSize_Ignore = 2
};
static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size);
#endif

/* FetchCommonType.proto */
static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);

/* CythonFunction.proto */
#define __Pyx_CyFunction_USED 1
#define __Pyx_CYFUNCTION_STATICMETHOD  0x01
#define __Pyx_CYFUNCTION_CLASSMETHOD   0x02
#define __Pyx_CYFUNCTION_CCLASS        0x04
#define __Pyx_CyFunction_GetClosure(f)\
    (((__pyx_CyFunctionObject *) (f))->func_closure)
#define __Pyx_CyFunction_GetClassObj(f)\
    (((__pyx_CyFunctionObject *) (f))->func_classobj)
#define __Pyx_CyFunction_Defaults(type, f)\
    ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
    ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
typedef struct {
    PyCFunctionObject func;
#if PY_VERSION_HEX < 0x030500A0
    PyObject *func_weakreflist;
#endif
    PyObject *func_dict;
    PyObject *func_name;
    PyObject *func_qualname;
    PyObject *func_doc;
    PyObject *func_globals;
    PyObject *func_code;
    PyObject *func_closure;
    PyObject *func_classobj;
    void *defaults;
    int defaults_pyobjects;
    int flags;
    PyObject *defaults_tuple;
    PyObject *defaults_kwdict;
    PyObject *(*defaults_getter)(PyObject *);
    PyObject *func_annotations;
} __pyx_CyFunctionObject;
static PyTypeObject *__pyx_CyFunctionType = 0;
#define __Pyx_CyFunction_Check(obj)  (__Pyx_TypeCheck(obj, __pyx_CyFunctionType))
#define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, globals, code)\
    __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code)
static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml,
                                      int flags, PyObject* qualname,
                                      PyObject *self,
                                      PyObject *module, PyObject *globals,
                                      PyObject* code);
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
                                                         size_t size,
                                                         int pyobjects);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
                                                            PyObject *tuple);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
                                                             PyObject *dict);
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
                                                              PyObject *dict);
static int __pyx_CyFunction_init(void);

/* FusedFunction.proto */
typedef struct {
    __pyx_CyFunctionObject func;
    PyObject *__signatures__;
    PyObject *type;
    PyObject *self;
} __pyx_FusedFunctionObject;
#define __pyx_FusedFunction_NewEx(ml, flags, qualname, self, module, globals, code)\
        __pyx_FusedFunction_New(__pyx_FusedFunctionType, ml, flags, qualname, self, module, globals, code)
static PyObject *__pyx_FusedFunction_New(PyTypeObject *type,
                                         PyMethodDef *ml, int flags,
                                         PyObject *qualname, PyObject *self,
                                         PyObject *module, PyObject *globals,
                                         PyObject *code);
static int __pyx_FusedFunction_clear(__pyx_FusedFunctionObject *self);
static PyTypeObject *__pyx_FusedFunctionType = NULL;
static int __pyx_FusedFunction_init(void);
#define __Pyx_FusedFunction_USED

/* CLineInTraceback.proto */
#ifdef CYTHON_CLINE_IN_TRACEBACK
#define __Pyx_CLineForTraceback(tstate, c_line)  (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
#else
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
#endif

/* CodeObjectCache.proto */
typedef struct {
    PyCodeObject* code_object;
    int code_line;
} __Pyx_CodeObjectCacheEntry;
struct __Pyx_CodeObjectCache {
    int count;
    int max_count;
    __Pyx_CodeObjectCacheEntry* entries;
};
static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
static PyCodeObject *__pyx_find_code_object(int code_line);
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);

/* AddTraceback.proto */
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum____pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index(enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index value);

/* BufferStructDeclare.proto */
typedef struct {
  Py_ssize_t shape, strides, suboffsets;
} __Pyx_Buf_DimInfo;
typedef struct {
  size_t refcount;
  Py_buffer pybuffer;
} __Pyx_Buffer;
typedef struct {
  __Pyx_Buffer *rcbuffer;
  char *data;
  __Pyx_Buf_DimInfo diminfo[8];
} __Pyx_LocalBuf_ND;

#if PY_MAJOR_VERSION < 3
    static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags);
    static void __Pyx_ReleaseBuffer(Py_buffer *view);
#else
    #define __Pyx_GetBuffer PyObject_GetBuffer
    #define __Pyx_ReleaseBuffer PyBuffer_Release
#endif


/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);

/* Print.proto */
static int __Pyx_Print(PyObject*, PyObject *, int);
#if CYTHON_COMPILING_IN_PYPY || PY_MAJOR_VERSION >= 3
static PyObject* __pyx_print = 0;
static PyObject* __pyx_print_kwargs = 0;
#endif

/* RealImag.proto */
#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    #define __Pyx_CREAL(z) ((z).real())
    #define __Pyx_CIMAG(z) ((z).imag())
  #else
    #define __Pyx_CREAL(z) (__real__(z))
    #define __Pyx_CIMAG(z) (__imag__(z))
  #endif
#else
    #define __Pyx_CREAL(z) ((z).real)
    #define __Pyx_CIMAG(z) ((z).imag)
#endif
#if defined(__cplusplus) && CYTHON_CCOMPLEX\
        && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103)
    #define __Pyx_SET_CREAL(z,x) ((z).real(x))
    #define __Pyx_SET_CIMAG(z,y) ((z).imag(y))
#else
    #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
    #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
#endif

/* Arithmetic.proto */
#if CYTHON_CCOMPLEX
    #define __Pyx_c_eq_float(a, b)   ((a)==(b))
    #define __Pyx_c_sum_float(a, b)  ((a)+(b))
    #define __Pyx_c_diff_float(a, b) ((a)-(b))
    #define __Pyx_c_prod_float(a, b) ((a)*(b))
    #define __Pyx_c_quot_float(a, b) ((a)/(b))
    #define __Pyx_c_neg_float(a)     (-(a))
  #ifdef __cplusplus
    #define __Pyx_c_is_zero_float(z) ((z)==(float)0)
    #define __Pyx_c_conj_float(z)    (::std::conj(z))
    #if 1
        #define __Pyx_c_abs_float(z)     (::std::abs(z))
        #define __Pyx_c_pow_float(a, b)  (::std::pow(a, b))
    #endif
  #else
    #define __Pyx_c_is_zero_float(z) ((z)==0)
    #define __Pyx_c_conj_float(z)    (conjf(z))
    #if 1
        #define __Pyx_c_abs_float(z)     (cabsf(z))
        #define __Pyx_c_pow_float(a, b)  (cpowf(a, b))
    #endif
 #endif
#else
    static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex);
    static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex);
    #if 1
        static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex);
        static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex);
    #endif
#endif

/* Arithmetic.proto */
#if CYTHON_CCOMPLEX
    #define __Pyx_c_eq_double(a, b)   ((a)==(b))
    #define __Pyx_c_sum_double(a, b)  ((a)+(b))
    #define __Pyx_c_diff_double(a, b) ((a)-(b))
    #define __Pyx_c_prod_double(a, b) ((a)*(b))
    #define __Pyx_c_quot_double(a, b) ((a)/(b))
    #define __Pyx_c_neg_double(a)     (-(a))
  #ifdef __cplusplus
    #define __Pyx_c_is_zero_double(z) ((z)==(double)0)
    #define __Pyx_c_conj_double(z)    (::std::conj(z))
    #if 1
        #define __Pyx_c_abs_double(z)     (::std::abs(z))
        #define __Pyx_c_pow_double(a, b)  (::std::pow(a, b))
    #endif
  #else
    #define __Pyx_c_is_zero_double(z) ((z)==0)
    #define __Pyx_c_conj_double(z)    (conj(z))
    #if 1
        #define __Pyx_c_abs_double(z)     (cabs(z))
        #define __Pyx_c_pow_double(a, b)  (cpow(a, b))
    #endif
 #endif
#else
    static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex);
    static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex);
    #if 1
        static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex);
        static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex);
    #endif
#endif

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value);

/* CIntFromPy.proto */
static CYTHON_INLINE enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index __Pyx_PyInt_As_enum____pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);

/* PrintOne.proto */
static int __Pyx_PrintOne(PyObject* stream, PyObject *o);

/* ImportNumPyArray.proto */
static PyObject *__pyx_numpy_ndarray = NULL;
static PyObject* __Pyx_ImportNumPyArrayTypeIfAvailable(void);

/* FastTypeChecks.proto */
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
#else
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
#endif
#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)

/* CheckBinaryVersion.proto */
static int __Pyx_check_binary_version(void);

/* FunctionExport.proto */
static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig);

/* InitStrings.proto */
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);

static double __pyx_f_5PDSim_6scroll_17common_scroll_geo_7geoVals_val_if_symmetric(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, double __pyx_v_val, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5PDSim_6scroll_17common_scroll_geo_7geoVals_copy_inplace(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_target, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_5PDSim_6scroll_17common_scroll_geo_7geoVals_is_symmetric(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/

/* Module declarations from 'cpython.buffer' */

/* Module declarations from 'libc.string' */

/* Module declarations from 'libc.stdio' */

/* Module declarations from '__builtin__' */

/* Module declarations from 'cpython.type' */
static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;

/* Module declarations from 'cpython' */

/* Module declarations from 'cpython.object' */

/* Module declarations from 'cpython.ref' */

/* Module declarations from 'cpython.mem' */

/* Module declarations from 'numpy' */

/* Module declarations from 'numpy' */
static PyTypeObject *__pyx_ptype_5numpy_dtype = 0;
static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0;
static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0;
static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0;
static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0;
static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/

/* Module declarations from 'cython' */

/* Module declarations from 'libc.math' */

/* Module declarations from 'PDSim.scroll.common_scroll_geo' */
static PyTypeObject *__pyx_ptype_5PDSim_6scroll_17common_scroll_geo_VdVstruct = 0;
static PyTypeObject *__pyx_ptype_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass = 0;
static PyTypeObject *__pyx_ptype_5PDSim_6scroll_17common_scroll_geo_CVInvolute = 0;
static PyTypeObject *__pyx_ptype_5PDSim_6scroll_17common_scroll_geo_CVInvolutes = 0;
static PyTypeObject *__pyx_ptype_5PDSim_6scroll_17common_scroll_geo_geoVals = 0;
static PyObject *__pyx_f_5PDSim_6scroll_17common_scroll_geo_involute_index_to_key(int, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_5PDSim_6scroll_17common_scroll_geo_scroll_wrap(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_5PDSim_6scroll_17common_scroll_geo_coords_norm(PyObject *, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *, double, int __pyx_skip_dispatch, struct __pyx_opt_args_5PDSim_6scroll_17common_scroll_geo_coords_norm *__pyx_optional_args); /*proto*/
static PyObject *__pyx_f_5PDSim_6scroll_17common_scroll_geo_coords_inv(PyObject *, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *, double, int __pyx_skip_dispatch, struct __pyx_opt_args_5PDSim_6scroll_17common_scroll_geo_coords_inv *__pyx_optional_args); /*proto*/
static PyObject *__pyx_f_5PDSim_6scroll_17common_scroll_geo__coords_inv_np(PyArrayObject *, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *, double, int __pyx_skip_dispatch, struct __pyx_opt_args_5PDSim_6scroll_17common_scroll_geo__coords_inv_np *__pyx_optional_args); /*proto*/
static PyObject *__pyx_f_5PDSim_6scroll_17common_scroll_geo__coords_inv_d(double, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *, double, int __pyx_skip_dispatch, struct __pyx_opt_args_5PDSim_6scroll_17common_scroll_geo__coords_inv_d *__pyx_optional_args); /*proto*/
static PyObject *__pyx_f_5PDSim_6scroll_17common_scroll_geo__coords_inv_d_int(double, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *, double, int, double *, double *); /*proto*/
static PyObject *__pyx_f_5PDSim_6scroll_17common_scroll_geo_coords_inv_dtheta(double, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *, double, int, double *, double *); /*proto*/
static PyObject *__pyx_f_5PDSim_6scroll_17common_scroll_geo__dcoords_inv_dphi_int(double, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *, double, int, double *, double *); /*proto*/
static long __pyx_f_5PDSim_6scroll_17common_scroll_geo_get_compressor_CV_index(PyObject *, int __pyx_skip_dispatch); /*proto*/
static long __pyx_f_5PDSim_6scroll_17common_scroll_geo_get_compression_chamber_index(long, long, int __pyx_skip_dispatch); /*proto*/
static CYTHON_INLINE double __pyx_f_5PDSim_6scroll_17common_scroll_geo_min2(double, double, int __pyx_skip_dispatch); /*proto*/
static CYTHON_INLINE double __pyx_f_5PDSim_6scroll_17common_scroll_geo_max2(double, double, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_5PDSim_6scroll_17common_scroll_geo_Gr(double, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *, double, int, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_5PDSim_6scroll_17common_scroll_geo_dGr_dphi(double, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *, double, int, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_5PDSim_6scroll_17common_scroll_geo_dGr_dtheta(double, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *, double, int, int __pyx_skip_dispatch); /*proto*/
static struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_VdVstruct *__pyx_f_5PDSim_6scroll_17common_scroll_geo_VdV(double, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_5PDSim_6scroll_17common_scroll_geo_forces(double, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *, double, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_5PDSim_6scroll_17common_scroll_geo_fxA(double, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *, double, enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_5PDSim_6scroll_17common_scroll_geo_fyA(double, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *, double, enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_5PDSim_6scroll_17common_scroll_geo_fFx_p(double, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *, double, enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_5PDSim_6scroll_17common_scroll_geo_fFy_p(double, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *, double, enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_5PDSim_6scroll_17common_scroll_geo_fMO_p(double, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *, double, enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_5PDSim_6scroll_17common_scroll_geo_involute_heat_transfer(double, double, double, double, double, double, double, double, double, double, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_5PDSim_6scroll_17common_scroll_geo_sortAnglesCCW(double, double, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_5PDSim_6scroll_17common_scroll_geo_sortAnglesCW(double, double, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_5PDSim_6scroll_17common_scroll_geo_x_antideriv(double, double); /*proto*/
static double __pyx_f_5PDSim_6scroll_17common_scroll_geo_y_antideriv(double, double); /*proto*/
static double __pyx_fuse_0__pyx_f_5PDSim_6scroll_17common_scroll_geo_plus_one(double, int __pyx_skip_dispatch); /*proto*/
static PyArrayObject *__pyx_fuse_1__pyx_f_5PDSim_6scroll_17common_scroll_geo_plus_one(PyArrayObject *, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_5PDSim_6scroll_17common_scroll_geo___pyx_unpickle_VdVstruct__set_state(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_VdVstruct *, PyObject *); /*proto*/
static PyObject *__pyx_f_5PDSim_6scroll_17common_scroll_geo___pyx_unpickle_HTAnglesClass__set_state(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass *, PyObject *); /*proto*/
static PyObject *__pyx_f_5PDSim_6scroll_17common_scroll_geo___pyx_unpickle_CVInvolute__set_state(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *, PyObject *); /*proto*/
static PyObject *__pyx_f_5PDSim_6scroll_17common_scroll_geo___pyx_unpickle_CVInvolutes__set_state(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *, PyObject *); /*proto*/
static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_float_t = { "float_t", NULL, sizeof(__pyx_t_5numpy_float_t), { 0 }, 0, 'R', 0, 0 };
#define __Pyx_MODULE_NAME "PDSim.scroll.common_scroll_geo"
extern int __pyx_module_is_main_PDSim__scroll__common_scroll_geo;
int __pyx_module_is_main_PDSim__scroll__common_scroll_geo = 0;

/* Implementation of 'PDSim.scroll.common_scroll_geo' */
static PyObject *__pyx_builtin_TypeError;
static PyObject *__pyx_builtin___import__;
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_ValueError;
static PyObject *__pyx_builtin_AttributeError;
static PyObject *__pyx_builtin_id;
static PyObject *__pyx_builtin_xrange;
static PyObject *__pyx_builtin_RuntimeError;
static PyObject *__pyx_builtin_ImportError;
static const char __pyx_k_[] = "";
static const char __pyx_k_A[] = "A";
static const char __pyx_k_N[] = "N";
static const char __pyx_k_V[] = "V";
static const char __pyx_k_a[] = "a";
static const char __pyx_k_b[] = "b";
static const char __pyx_k_d[] = "d";
static const char __pyx_k_h[] = "h";
static const char __pyx_k_i[] = "i";
static const char __pyx_k_j[] = "j";
static const char __pyx_k_r[] = "r_";
static const char __pyx_k_t[] = "t";
static const char __pyx_k_x[] = "x";
static const char __pyx_k_y[] = "y";
static const char __pyx_k__2[] = "()";
static const char __pyx_k__3[] = "|";
static const char __pyx_k__7[] = " : ";
static const char __pyx_k__8[] = "\n";
static const char __pyx_k_cx[] = "cx";
static const char __pyx_k_cy[] = "cy";
static const char __pyx_k_d1[] = "d1";
static const char __pyx_k_d2[] = "d2";
static const char __pyx_k_dV[] = "dV";
static const char __pyx_k_dd[] = "dd";
static const char __pyx_k_fi[] = "fi";
static const char __pyx_k_fo[] = "fo";
static const char __pyx_k_hc[] = "hc";
static const char __pyx_k_hs[] = "hs";
static const char __pyx_k_id[] = "id";
static const char __pyx_k_np[] = "np";
static const char __pyx_k_oi[] = "oi";
static const char __pyx_k_oo[] = "oo";
static const char __pyx_k_rb[] = "rb";
static const char __pyx_k_ro[] = "ro";
static const char __pyx_k_s1[] = "s1";
static const char __pyx_k_s2[] = "s2";
static const char __pyx_k_sa[] = "sa";
static const char __pyx_k_t1[] = "t1";
static const char __pyx_k_t2[] = "t2";
static const char __pyx_k_xi[] = "xi";
static const char __pyx_k_yi[] = "yi";
static const char __pyx_k__17[] = ": ";
static const char __pyx_k_atr[] = "atr";
static const char __pyx_k_cos[] = "cos";
static const char __pyx_k_ddd[] = "ddd";
static const char __pyx_k_end[] = "end";
static const char __pyx_k_geo[] = "geo";
static const char __pyx_k_inv[] = "inv";
static const char __pyx_k_new[] = "__new__";
static const char __pyx_k_phi[] = "phi";
static const char __pyx_k_sin[] = "sin";
static const char __pyx_k_T_CV[] = "T_CV";
static const char __pyx_k_area[] = "area";
static const char __pyx_k_args[] = "args";
static const char __pyx_k_c1_1[] = "c1.1";
static const char __pyx_k_c1_2[] = "c1.2";
static const char __pyx_k_c1_3[] = "c1.3";
static const char __pyx_k_c1_4[] = "c1.4";
static const char __pyx_k_c1_5[] = "c1.5";
static const char __pyx_k_c1_6[] = "c1.6";
static const char __pyx_k_c1_7[] = "c1.7";
static const char __pyx_k_c1_8[] = "c1.8";
static const char __pyx_k_c1_9[] = "c1.9";
static const char __pyx_k_c2_1[] = "c2.1";
static const char __pyx_k_c2_2[] = "c2.2";
static const char __pyx_k_c2_3[] = "c2.3";
static const char __pyx_k_c2_4[] = "c2.4";
static const char __pyx_k_c2_5[] = "c2.5";
static const char __pyx_k_c2_6[] = "c2.6";
static const char __pyx_k_c2_7[] = "c2.7";
static const char __pyx_k_c2_8[] = "c2.8";
static const char __pyx_k_c2_9[] = "c2.9";
static const char __pyx_k_dict[] = "__dict__";
static const char __pyx_k_file[] = "file";
static const char __pyx_k_flag[] = "flag";
static const char __pyx_k_fx_p[] = "fx_p";
static const char __pyx_k_fy_p[] = "fy_p";
static const char __pyx_k_fz_p[] = "fz_p";
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_name[] = "__name__";
static const char __pyx_k_path[] = "path";
static const char __pyx_k_phi0[] = "phi0";
static const char __pyx_k_phi1[] = "phi1";
static const char __pyx_k_phi2[] = "phi2";
static const char __pyx_k_phim[] = "phim";
static const char __pyx_k_size[] = "size";
static const char __pyx_k_sumx[] = "sumx";
static const char __pyx_k_sumy[] = "sumy";
static const char __pyx_k_test[] = "__test__";
static const char __pyx_k_utf8[] = "utf8";
static const char __pyx_k_M_O_p[] = "M_O_p";
static const char __pyx_k_alpha[] = "alpha";
static const char __pyx_k_array[] = "array";
static const char __pyx_k_c1_10[] = "c1.10";
static const char __pyx_k_c2_10[] = "c2.10";
static const char __pyx_k_numpy[] = "numpy";
static const char __pyx_k_print[] = "print";
static const char __pyx_k_range[] = "range";
static const char __pyx_k_split[] = "split";
static const char __pyx_k_strip[] = "strip";
static const char __pyx_k_theta[] = "theta";
static const char __pyx_k_zeros[] = "zeros";
static const char __pyx_k_b_line[] = "b_line";
static const char __pyx_k_double[] = "double";
static const char __pyx_k_encode[] = "encode";
static const char __pyx_k_format[] = "format";
static const char __pyx_k_import[] = "__import__";
static const char __pyx_k_kwargs[] = "kwargs";
static const char __pyx_k_m_line[] = "m_line";
static const char __pyx_k_phi_i0[] = "phi_i0";
static const char __pyx_k_phi_o0[] = "phi_o0";
static const char __pyx_k_pickle[] = "pickle";
static const char __pyx_k_r_wall[] = "r_wall";
static const char __pyx_k_reduce[] = "__reduce__";
static const char __pyx_k_update[] = "update";
static const char __pyx_k_xrange[] = "xrange";
static const char __pyx_k_Vremove[] = "Vremove";
static const char __pyx_k_dT_dphi[] = "dT_dphi";
static const char __pyx_k_geoVals[] = "geoVals";
static const char __pyx_k_ndarray[] = "ndarray";
static const char __pyx_k_phi_1_i[] = "phi_1_i";
static const char __pyx_k_phi_1_o[] = "phi_1_o";
static const char __pyx_k_phi_2_i[] = "phi_2_i";
static const char __pyx_k_phi_2_o[] = "phi_2_o";
static const char __pyx_k_phi_fi0[] = "phi_fi0";
static const char __pyx_k_phi_fie[] = "phi_fie";
static const char __pyx_k_phi_fis[] = "phi_fis";
static const char __pyx_k_phi_fo0[] = "phi_fo0";
static const char __pyx_k_phi_foe[] = "phi_foe";
static const char __pyx_k_phi_fos[] = "phi_fos";
static const char __pyx_k_phi_oi0[] = "phi_oi0";
static const char __pyx_k_phi_oie[] = "phi_oie";
static const char __pyx_k_phi_ois[] = "phi_ois";
static const char __pyx_k_phi_oo0[] = "phi_oo0";
static const char __pyx_k_phi_ooe[] = "phi_ooe";
static const char __pyx_k_phi_oos[] = "phi_oos";
static const char __pyx_k_phi_vec[] = "phi_vec";
static const char __pyx_k_ra_arc1[] = "ra_arc1";
static const char __pyx_k_ra_arc2[] = "ra_arc2";
static const char __pyx_k_t1_arc1[] = "t1_arc1";
static const char __pyx_k_t1_arc2[] = "t1_arc2";
static const char __pyx_k_t1_line[] = "t1_line";
static const char __pyx_k_t2_arc1[] = "t2_arc1";
static const char __pyx_k_t2_arc2[] = "t2_arc2";
static const char __pyx_k_t2_line[] = "t2_line";
static const char __pyx_k_x0_wall[] = "x0_wall";
static const char __pyx_k_xa_arc1[] = "xa_arc1";
static const char __pyx_k_xa_arc2[] = "xa_arc2";
static const char __pyx_k_y0_wall[] = "y0_wall";
static const char __pyx_k_ya_arc1[] = "ya_arc1";
static const char __pyx_k_ya_arc2[] = "ya_arc2";
static const char __pyx_k_T_scroll[] = "T_scroll";
static const char __pyx_k_V_scroll[] = "V_scroll";
static const char __pyx_k_defaults[] = "defaults";
static const char __pyx_k_getstate[] = "__getstate__";
static const char __pyx_k_plus_one[] = "plus_one";
static const char __pyx_k_polyarea[] = "polyarea";
static const char __pyx_k_pyx_type[] = "__pyx_type";
static const char __pyx_k_setstate[] = "__setstate__";
static const char __pyx_k_TypeError[] = "TypeError";
static const char __pyx_k_VdVstruct[] = "VdVstruct";
static const char __pyx_k_cx_scroll[] = "cx_scroll";
static const char __pyx_k_cy_scroll[] = "cy_scroll";
static const char __pyx_k_pyx_state[] = "__pyx_state";
static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
static const char __pyx_k_CVInvolute[] = "CVInvolute";
static const char __pyx_k_ValueError[] = "ValueError";
static const char __pyx_k_pyx_result[] = "__pyx_result";
static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
static const char __pyx_k_signatures[] = "signatures";
static const char __pyx_k_CVInvolutes[] = "CVInvolutes";
static const char __pyx_k_ImportError[] = "ImportError";
static const char __pyx_k_PickleError[] = "PickleError";
static const char __pyx_k_delta_flank[] = "delta_flank";
static const char __pyx_k_RuntimeError[] = "RuntimeError";
static const char __pyx_k_copy_inplace[] = "copy_inplace";
static const char __pyx_k_delta_radial[] = "delta_radial";
static const char __pyx_k_is_symmetric[] = "is_symmetric";
static const char __pyx_k_polycentroid[] = "polycentroid";
static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
static const char __pyx_k_stringsource[] = "stringsource";
static const char __pyx_k_HTAnglesClass[] = "HTAnglesClass";
static const char __pyx_k_phi_ie_offset[] = "phi_ie_offset";
static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
static const char __pyx_k_AttributeError[] = "AttributeError";
static const char __pyx_k_flag_not_valid[] = "flag not valid";
static const char __pyx_k_geoValsvarlist[] = "geoValsvarlist";
static const char __pyx_k_has_line_1_i_g[] = "has_line_1 = {i:g}\n";
static const char __pyx_k_has_line_2_i_g[] = "has_line_2 = {i:g}";
static const char __pyx_k_Inner_phi_0_i_g[] = "Inner.phi_0 = {i:g}\n";
static const char __pyx_k_Outer_phi_0_i_g[] = "Outer.phi_0 = {i:g}\n";
static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
static const char __pyx_k_rebuild_geoVals[] = "rebuild_geoVals";
static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
static const char __pyx_k_val_if_symmetric[] = "val_if_symmetric";
static const char __pyx_k_Inner_phi_max_i_g[] = "Inner.phi_max = {i:g}\n";
static const char __pyx_k_Inner_phi_min_i_g[] = "Inner.phi_min = {i:g}\n";
static const char __pyx_k_Outer_phi_max_i_g[] = "Outer.phi_max = {i:g}\n";
static const char __pyx_k_Outer_phi_min_i_g[] = "Outer.phi_min = {i:g}\n";
static const char __pyx_k_Inner_involute_i_s[] = "Inner.involute = {i:s}\n";
static const char __pyx_k_Outer_involute_i_s[] = "Outer.involute = {i:s}\n";
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
static const char __pyx_k_pyx_fuse_0plus_one[] = "__pyx_fuse_0plus_one";
static const char __pyx_k_pyx_fuse_1plus_one[] = "__pyx_fuse_1plus_one";
static const char __pyx_k_Involute_is_invalid[] = "Involute is invalid";
static const char __pyx_k_geoVals_instance_at[] = "geoVals instance at ";
static const char __pyx_k_delta_suction_offset[] = "delta_suction_offset";
static const char __pyx_k_pyx_unpickle_VdVstruct[] = "__pyx_unpickle_VdVstruct";
static const char __pyx_k_pyx_unpickle_CVInvolute[] = "__pyx_unpickle_CVInvolute";
static const char __pyx_k_pyx_unpickle_CVInvolutes[] = "__pyx_unpickle_CVInvolutes";
static const char __pyx_k_Uh_oh_error_in_coords_norm[] = "Uh oh... error in coords_norm";
static const char __pyx_k_pyx_unpickle_HTAnglesClass[] = "__pyx_unpickle_HTAnglesClass";
static const char __pyx_k_No_matching_signature_found[] = "No matching signature found";
static const char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous";
static const char __pyx_k_PDSim_scroll_common_scroll_geo[] = "PDSim.scroll.common_scroll_geo";
static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import";
static const char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)";
static const char __pyx_k_Expected_at_least_d_argument_s_g[] = "Expected at least %d argument%s, got %d";
static const char __pyx_k_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd";
static const char __pyx_k_Function_call_with_ambiguous_arg[] = "Function call with ambiguous argument types";
static const char __pyx_k_Incompatible_checksums_s_vs_0x78[] = "Incompatible checksums (%s vs 0x78aa620 = (dphi_max_dtheta, dphi_min_dtheta, involute, phi_0, phi_max, phi_min))";
static const char __pyx_k_Incompatible_checksums_s_vs_0x7a[] = "Incompatible checksums (%s vs 0x7af38ca = (V, dV))";
static const char __pyx_k_Incompatible_checksums_s_vs_0xbb[] = "Incompatible checksums (%s vs 0xbb57980 = (Inner, Outer, has_line_1, has_line_2))";
static const char __pyx_k_Incompatible_checksums_s_vs_0xbd[] = "Incompatible checksums (%s vs 0xbd74d76 = (phi_1_i, phi_1_o, phi_2_i, phi_2_o, phi_i0, phi_o0))";
static const char __pyx_k_Non_native_byte_order_not_suppor[] = "Non-native byte order not supported";
static const char __pyx_k_PDSim_scroll_common_scroll_geo_p[] = "PDSim/scroll/common_scroll_geo.pyx";
static const char __pyx_k_Symmetric_angle_requested_phi_ie[] = "Symmetric angle requested (phi_ie, phi_is, phi_i0, etc.) but the geometry is not symmetric";
static const char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran contiguous";
static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import";
static const char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short.";
static PyObject *__pyx_kp_s_;
static PyObject *__pyx_n_s_A;
static PyObject *__pyx_n_s_AttributeError;
static PyObject *__pyx_n_s_CVInvolute;
static PyObject *__pyx_n_s_CVInvolutes;
static PyObject *__pyx_kp_s_Expected_at_least_d_argument_s_g;
static PyObject *__pyx_kp_u_Format_string_allocated_too_shor;
static PyObject *__pyx_kp_u_Format_string_allocated_too_shor_2;
static PyObject *__pyx_kp_s_Function_call_with_ambiguous_arg;
static PyObject *__pyx_n_s_HTAnglesClass;
static PyObject *__pyx_n_s_ImportError;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x78;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x7a;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xbb;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xbd;
static PyObject *__pyx_kp_s_Inner_involute_i_s;
static PyObject *__pyx_kp_s_Inner_phi_0_i_g;
static PyObject *__pyx_kp_s_Inner_phi_max_i_g;
static PyObject *__pyx_kp_s_Inner_phi_min_i_g;
static PyObject *__pyx_kp_s_Involute_is_invalid;
static PyObject *__pyx_n_s_M_O_p;
static PyObject *__pyx_n_s_N;
static PyObject *__pyx_kp_s_No_matching_signature_found;
static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor;
static PyObject *__pyx_kp_s_Outer_involute_i_s;
static PyObject *__pyx_kp_s_Outer_phi_0_i_g;
static PyObject *__pyx_kp_s_Outer_phi_max_i_g;
static PyObject *__pyx_kp_s_Outer_phi_min_i_g;
static PyObject *__pyx_n_s_PDSim_scroll_common_scroll_geo;
static PyObject *__pyx_kp_s_PDSim_scroll_common_scroll_geo_p;
static PyObject *__pyx_n_s_PickleError;
static PyObject *__pyx_n_s_RuntimeError;
static PyObject *__pyx_kp_s_Symmetric_angle_requested_phi_ie;
static PyObject *__pyx_n_s_T_CV;
static PyObject *__pyx_n_s_T_scroll;
static PyObject *__pyx_n_s_TypeError;
static PyObject *__pyx_kp_s_Uh_oh_error_in_coords_norm;
static PyObject *__pyx_n_s_V;
static PyObject *__pyx_n_s_V_scroll;
static PyObject *__pyx_n_s_ValueError;
static PyObject *__pyx_n_s_VdVstruct;
static PyObject *__pyx_n_s_Vremove;
static PyObject *__pyx_kp_s__17;
static PyObject *__pyx_kp_s__2;
static PyObject *__pyx_kp_s__3;
static PyObject *__pyx_kp_s__7;
static PyObject *__pyx_kp_s__8;
static PyObject *__pyx_n_s_a;
static PyObject *__pyx_n_s_alpha;
static PyObject *__pyx_n_s_area;
static PyObject *__pyx_n_s_args;
static PyObject *__pyx_n_s_array;
static PyObject *__pyx_n_s_atr;
static PyObject *__pyx_n_s_b;
static PyObject *__pyx_n_s_b_line;
static PyObject *__pyx_kp_b_c1_1;
static PyObject *__pyx_kp_b_c1_10;
static PyObject *__pyx_kp_b_c1_2;
static PyObject *__pyx_kp_b_c1_3;
static PyObject *__pyx_kp_b_c1_4;
static PyObject *__pyx_kp_b_c1_5;
static PyObject *__pyx_kp_b_c1_6;
static PyObject *__pyx_kp_b_c1_7;
static PyObject *__pyx_kp_b_c1_8;
static PyObject *__pyx_kp_b_c1_9;
static PyObject *__pyx_kp_b_c2_1;
static PyObject *__pyx_kp_b_c2_10;
static PyObject *__pyx_kp_b_c2_2;
static PyObject *__pyx_kp_b_c2_3;
static PyObject *__pyx_kp_b_c2_4;
static PyObject *__pyx_kp_b_c2_5;
static PyObject *__pyx_kp_b_c2_6;
static PyObject *__pyx_kp_b_c2_7;
static PyObject *__pyx_kp_b_c2_8;
static PyObject *__pyx_kp_b_c2_9;
static PyObject *__pyx_n_s_cline_in_traceback;
static PyObject *__pyx_n_s_copy_inplace;
static PyObject *__pyx_n_s_cos;
static PyObject *__pyx_n_s_cx;
static PyObject *__pyx_n_s_cx_scroll;
static PyObject *__pyx_n_s_cy;
static PyObject *__pyx_n_s_cy_scroll;
static PyObject *__pyx_n_s_d;
static PyObject *__pyx_n_b_d1;
static PyObject *__pyx_n_b_d2;
static PyObject *__pyx_n_s_dT_dphi;
static PyObject *__pyx_n_s_dV;
static PyObject *__pyx_n_b_dd;
static PyObject *__pyx_n_b_ddd;
static PyObject *__pyx_n_s_defaults;
static PyObject *__pyx_n_s_delta_flank;
static PyObject *__pyx_n_s_delta_radial;
static PyObject *__pyx_n_s_delta_suction_offset;
static PyObject *__pyx_n_s_dict;
static PyObject *__pyx_n_s_double;
static PyObject *__pyx_n_s_encode;
static PyObject *__pyx_n_s_end;
static PyObject *__pyx_n_s_fi;
static PyObject *__pyx_n_s_file;
static PyObject *__pyx_n_s_flag;
static PyObject *__pyx_kp_s_flag_not_valid;
static PyObject *__pyx_n_s_fo;
static PyObject *__pyx_n_s_format;
static PyObject *__pyx_n_s_fx_p;
static PyObject *__pyx_n_s_fy_p;
static PyObject *__pyx_n_s_fz_p;
static PyObject *__pyx_n_s_geo;
static PyObject *__pyx_n_s_geoVals;
static PyObject *__pyx_kp_s_geoVals_instance_at;
static PyObject *__pyx_n_s_geoValsvarlist;
static PyObject *__pyx_n_s_getstate;
static PyObject *__pyx_n_s_h;
static PyObject *__pyx_kp_s_has_line_1_i_g;
static PyObject *__pyx_kp_s_has_line_2_i_g;
static PyObject *__pyx_n_s_hc;
static PyObject *__pyx_n_s_hs;
static PyObject *__pyx_n_s_i;
static PyObject *__pyx_n_s_id;
static PyObject *__pyx_n_s_import;
static PyObject *__pyx_n_s_inv;
static PyObject *__pyx_n_s_is_symmetric;
static PyObject *__pyx_n_s_j;
static PyObject *__pyx_n_s_kwargs;
static PyObject *__pyx_n_s_m_line;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_n_s_name;
static PyObject *__pyx_n_s_ndarray;
static PyObject *__pyx_kp_u_ndarray_is_not_C_contiguous;
static PyObject *__pyx_kp_u_ndarray_is_not_Fortran_contiguou;
static PyObject *__pyx_n_s_new;
static PyObject *__pyx_n_s_np;
static PyObject *__pyx_n_s_numpy;
static PyObject *__pyx_n_u_numpy;
static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to;
static PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor;
static PyObject *__pyx_n_s_oi;
static PyObject *__pyx_n_s_oo;
static PyObject *__pyx_n_s_path;
static PyObject *__pyx_n_s_phi;
static PyObject *__pyx_n_s_phi0;
static PyObject *__pyx_n_s_phi1;
static PyObject *__pyx_n_s_phi2;
static PyObject *__pyx_n_s_phi_1_i;
static PyObject *__pyx_n_s_phi_1_o;
static PyObject *__pyx_n_s_phi_2_i;
static PyObject *__pyx_n_s_phi_2_o;
static PyObject *__pyx_n_s_phi_fi0;
static PyObject *__pyx_n_s_phi_fie;
static PyObject *__pyx_n_s_phi_fis;
static PyObject *__pyx_n_s_phi_fo0;
static PyObject *__pyx_n_s_phi_foe;
static PyObject *__pyx_n_s_phi_fos;
static PyObject *__pyx_n_s_phi_i0;
static PyObject *__pyx_n_s_phi_ie_offset;
static PyObject *__pyx_n_s_phi_o0;
static PyObject *__pyx_n_s_phi_oi0;
static PyObject *__pyx_n_s_phi_oie;
static PyObject *__pyx_n_s_phi_ois;
static PyObject *__pyx_n_s_phi_oo0;
static PyObject *__pyx_n_s_phi_ooe;
static PyObject *__pyx_n_s_phi_oos;
static PyObject *__pyx_n_s_phi_vec;
static PyObject *__pyx_n_s_phim;
static PyObject *__pyx_n_s_pickle;
static PyObject *__pyx_n_s_plus_one;
static PyObject *__pyx_n_s_polyarea;
static PyObject *__pyx_n_s_polycentroid;
static PyObject *__pyx_n_s_print;
static PyObject *__pyx_n_s_pyx_PickleError;
static PyObject *__pyx_n_s_pyx_checksum;
static PyObject *__pyx_n_s_pyx_fuse_0plus_one;
static PyObject *__pyx_n_s_pyx_fuse_1plus_one;
static PyObject *__pyx_n_s_pyx_result;
static PyObject *__pyx_n_s_pyx_state;
static PyObject *__pyx_n_s_pyx_type;
static PyObject *__pyx_n_s_pyx_unpickle_CVInvolute;
static PyObject *__pyx_n_s_pyx_unpickle_CVInvolutes;
static PyObject *__pyx_n_s_pyx_unpickle_HTAnglesClass;
static PyObject *__pyx_n_s_pyx_unpickle_VdVstruct;
static PyObject *__pyx_n_s_pyx_vtable;
static PyObject *__pyx_n_s_r;
static PyObject *__pyx_n_s_r_wall;
static PyObject *__pyx_n_s_ra_arc1;
static PyObject *__pyx_n_s_ra_arc2;
static PyObject *__pyx_n_s_range;
static PyObject *__pyx_n_s_rb;
static PyObject *__pyx_n_s_rebuild_geoVals;
static PyObject *__pyx_n_s_reduce;
static PyObject *__pyx_n_s_reduce_cython;
static PyObject *__pyx_n_s_reduce_ex;
static PyObject *__pyx_n_s_ro;
static PyObject *__pyx_n_b_s1;
static PyObject *__pyx_n_b_s2;
static PyObject *__pyx_n_b_sa;
static PyObject *__pyx_n_s_setstate;
static PyObject *__pyx_n_s_setstate_cython;
static PyObject *__pyx_n_s_signatures;
static PyObject *__pyx_n_s_sin;
static PyObject *__pyx_n_s_size;
static PyObject *__pyx_n_s_split;
static PyObject *__pyx_kp_s_stringsource;
static PyObject *__pyx_n_s_strip;
static PyObject *__pyx_n_s_sumx;
static PyObject *__pyx_n_s_sumy;
static PyObject *__pyx_n_s_t;
static PyObject *__pyx_n_s_t1;
static PyObject *__pyx_n_s_t1_arc1;
static PyObject *__pyx_n_s_t1_arc2;
static PyObject *__pyx_n_s_t1_line;
static PyObject *__pyx_n_s_t2;
static PyObject *__pyx_n_s_t2_arc1;
static PyObject *__pyx_n_s_t2_arc2;
static PyObject *__pyx_n_s_t2_line;
static PyObject *__pyx_n_s_test;
static PyObject *__pyx_n_s_theta;
static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd;
static PyObject *__pyx_n_s_update;
static PyObject *__pyx_n_s_utf8;
static PyObject *__pyx_n_s_val_if_symmetric;
static PyObject *__pyx_n_s_x;
static PyObject *__pyx_n_s_x0_wall;
static PyObject *__pyx_n_s_xa_arc1;
static PyObject *__pyx_n_s_xa_arc2;
static PyObject *__pyx_n_s_xi;
static PyObject *__pyx_n_s_xrange;
static PyObject *__pyx_n_s_y;
static PyObject *__pyx_n_s_y0_wall;
static PyObject *__pyx_n_s_ya_arc1;
static PyObject *__pyx_n_s_ya_arc2;
static PyObject *__pyx_n_s_yi;
static PyObject *__pyx_n_s_zeros;
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_4plus_one(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_signatures, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, CYTHON_UNUSED PyObject *__pyx_v_defaults); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_54__pyx_fuse_0plus_one(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_56__pyx_fuse_1plus_one(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_9VdVstruct___init__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_VdVstruct *__pyx_v_self, PyObject *__pyx_v_V, PyObject *__pyx_v_dV); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_9VdVstruct_2__repr__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_VdVstruct *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_9VdVstruct_1V___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_VdVstruct *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_9VdVstruct_1V_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_VdVstruct *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_9VdVstruct_2dV___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_VdVstruct *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_9VdVstruct_2dV_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_VdVstruct *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_9VdVstruct_4__reduce_cython__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_VdVstruct *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_9VdVstruct_6__setstate_cython__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_VdVstruct *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass___repr__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_7phi_1_i___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_7phi_1_i_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_7phi_2_i___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_7phi_2_i_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_7phi_1_o___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_7phi_1_o_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_7phi_2_o___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_7phi_2_o_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_6phi_i0___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_6phi_i0_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_6phi_o0___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_6phi_o0_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_2__reduce_cython__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_4__setstate_cython__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_10CVInvolute___init__(CYTHON_UNUSED struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_7phi_max___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_7phi_max_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_7phi_min___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_7phi_min_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_5phi_0___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_5phi_0_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_15dphi_max_dtheta___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_15dphi_max_dtheta_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_15dphi_min_dtheta___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_15dphi_min_dtheta_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_8involute___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_8involute_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_2__reduce_cython__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_4__setstate_cython__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes___init__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_2__repr__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_5Inner___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_5Inner_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_5Inner_4__del__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_5Outer___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_5Outer_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_5Outer_4__del__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_10has_line_1___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_10has_line_1_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_10has_line_2___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_10has_line_2_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_4__reduce_cython__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_6__setstate_cython__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_6VdV(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_theta, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *__pyx_v_inv); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_8forces(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_theta, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *__pyx_v_inv, double __pyx_v_A); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_10fxA(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_phi, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo, double __pyx_v_theta, enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index __pyx_v_inv); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_12fyA(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_phi, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo, double __pyx_v_theta, enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index __pyx_v_inv); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_14fFx_p(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_phi, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo, double __pyx_v_theta, enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index __pyx_v_inv); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_16fFy_p(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_phi, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo, double __pyx_v_theta, enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index __pyx_v_inv); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_18fMO_p(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_phi, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo, double __pyx_v_theta, enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index __pyx_v_inv); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_20involute_index_to_key(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_index); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_22Gr(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_phi, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo, double __pyx_v_theta, int __pyx_v_inv); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_24dGr_dphi(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_phi, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo, double __pyx_v_theta, int __pyx_v_inv); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_26dGr_dtheta(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_phi, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo, double __pyx_v_theta, int __pyx_v_inv); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_28sortAnglesCCW(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_t1, double __pyx_v_t2); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_30sortAnglesCW(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_t1, double __pyx_v_t2); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_32get_compressor_CV_index(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v__key); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_34get_compression_chamber_index(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_path, long __pyx_v_alpha); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_36rebuild_geoVals(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_d); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals___init__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_2__reduce__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_4__repr__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_6val_if_symmetric(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, double __pyx_v_val); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_8copy_inplace(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_target); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_6phi_ie___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_6phi_is___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_6phi_i0___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_6phi_oe___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_6phi_os___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_6phi_o0___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_10is_symmetric(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_1h___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_1h_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_2ro___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_2ro_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_2rb___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_2rb_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_1t___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_1t_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fi0___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fi0_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fis___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fis_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fie___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fie_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fo0___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fo0_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fos___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fos_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_foe___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_foe_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_oi0___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_oi0_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_ois___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_ois_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_oie___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_oie_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_oo0___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_oo0_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_oos___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_oos_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_ooe___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_ooe_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7xa_arc1___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7xa_arc1_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7ya_arc1___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7ya_arc1_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7ra_arc1___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7ra_arc1_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t1_arc1___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t1_arc1_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t2_arc1___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t2_arc1_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7xa_arc2___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7xa_arc2_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7ya_arc2___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7ya_arc2_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7ra_arc2___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7ra_arc2_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t1_arc2___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t1_arc2_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t2_arc2___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t2_arc2_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_6b_line___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_6b_line_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t1_line___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t1_line_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t2_line___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t2_line_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_6m_line___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_6m_line_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7x0_wall___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7x0_wall_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7y0_wall___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7y0_wall_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_6r_wall___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_6r_wall_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_12delta_radial___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_12delta_radial_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_11delta_flank___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_11delta_flank_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_13phi_ie_offset___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_13phi_ie_offset_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_20delta_suction_offset___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_20delta_suction_offset_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_9cx_scroll___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_9cx_scroll_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_9cy_scroll___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_9cy_scroll_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_8V_scroll___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_8V_scroll_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7Vremove___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7Vremove_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_14xvec_disc_port___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_14xvec_disc_port_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_14xvec_disc_port_4__del__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_14yvec_disc_port___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_14yvec_disc_port_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_14yvec_disc_port_4__del__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_38polyarea(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x, PyObject *__pyx_v_y); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_40polycentroid(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_xi, PyObject *__pyx_v_yi); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_42_coords_inv_np(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_phi, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo, double __pyx_v_theta, PyObject *__pyx_v_flag); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_44_coords_inv_d(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_phi, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo, double __pyx_v_theta, PyObject *__pyx_v_flag); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_46coords_inv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_phi, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo, double __pyx_v_theta, PyObject *__pyx_v_flag); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_48coords_norm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_phi_vec, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo, double __pyx_v_theta, PyObject *__pyx_v_flag); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_50scroll_wrap(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_52involute_heat_transfer(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_hc, double __pyx_v_hs, double __pyx_v_rb, double __pyx_v_phi1, double __pyx_v_phi2, double __pyx_v_phi0, double __pyx_v_T_scroll, double __pyx_v_T_CV, double __pyx_v_dT_dphi, double __pyx_v_phim); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_60__pyx_unpickle_VdVstruct(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_62__pyx_unpickle_HTAnglesClass(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_64__pyx_unpickle_CVInvolute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_66__pyx_unpickle_CVInvolutes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_min2(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_a, double __pyx_v_b); /* proto */
static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_2max2(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_a, double __pyx_v_b); /* proto */
static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */
static PyObject *__pyx_tp_new_5PDSim_6scroll_17common_scroll_geo_VdVstruct(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5PDSim_6scroll_17common_scroll_geo_CVInvolute(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5PDSim_6scroll_17common_scroll_geo_CVInvolutes(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5PDSim_6scroll_17common_scroll_geo_geoVals(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_float_0_0;
static PyObject *__pyx_float_1_0;
static PyObject *__pyx_float_2_0;
static PyObject *__pyx_int_1;
static PyObject *__pyx_int_6;
static PyObject *__pyx_int_126527008;
static PyObject *__pyx_int_128923850;
static PyObject *__pyx_int_196442496;
static PyObject *__pyx_int_198659446;
static PyObject *__pyx_tuple__4;
static PyObject *__pyx_tuple__5;
static PyObject *__pyx_tuple__6;
static PyObject *__pyx_tuple__9;
static PyObject *__pyx_tuple__10;
static PyObject *__pyx_tuple__11;
static PyObject *__pyx_tuple__12;
static PyObject *__pyx_tuple__13;
static PyObject *__pyx_tuple__14;
static PyObject *__pyx_tuple__15;
static PyObject *__pyx_tuple__18;
static PyObject *__pyx_tuple__25;
static PyObject *__pyx_tuple__26;
static PyObject *__pyx_tuple__27;
static PyObject *__pyx_tuple__28;
static PyObject *__pyx_tuple__29;
static PyObject *__pyx_tuple__30;
static PyObject *__pyx_tuple__31;
static PyObject *__pyx_tuple__32;
static PyObject *__pyx_tuple__34;
static PyObject *__pyx_tuple__35;
static PyObject *__pyx_tuple__36;
static PyObject *__pyx_tuple__37;
static PyObject *__pyx_tuple__38;
static PyObject *__pyx_tuple__39;
static PyObject *__pyx_tuple__40;
static PyObject *__pyx_codeobj__16;
static PyObject *__pyx_codeobj__19;
static PyObject *__pyx_codeobj__20;
static PyObject *__pyx_codeobj__21;
static PyObject *__pyx_codeobj__22;
static PyObject *__pyx_codeobj__23;
static PyObject *__pyx_codeobj__24;
static PyObject *__pyx_codeobj__33;
/* Late includes */

/* "PDSim/scroll/common_scroll_geo.pyx":6
 * import numpy as np
 * 
 * cpdef double_or_numpy plus_one(double_or_numpy x):             # <<<<<<<<<<<<<<
 *     return x + 1.0
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_5plus_one(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5PDSim_6scroll_17common_scroll_geo_4plus_one[] = "plus_one(signatures, args, kwargs, defaults)";
static PyMethodDef __pyx_mdef_5PDSim_6scroll_17common_scroll_geo_5plus_one = {"plus_one", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5PDSim_6scroll_17common_scroll_geo_5plus_one, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5PDSim_6scroll_17common_scroll_geo_4plus_one};
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_5plus_one(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_signatures = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  CYTHON_UNUSED PyObject *__pyx_v_defaults = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_fused_cpdef (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_signatures,&__pyx_n_s_args,&__pyx_n_s_kwargs,&__pyx_n_s_defaults,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_signatures)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_args)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 1, 4, 4, 1); __PYX_ERR(0, 6, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kwargs)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 1, 4, 4, 2); __PYX_ERR(0, 6, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_defaults)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 1, 4, 4, 3); __PYX_ERR(0, 6, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_fused_cpdef") < 0)) __PYX_ERR(0, 6, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_signatures = values[0];
    __pyx_v_args = values[1];
    __pyx_v_kwargs = values[2];
    __pyx_v_defaults = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.__pyx_fused_cpdef", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_4plus_one(__pyx_self, __pyx_v_signatures, __pyx_v_args, __pyx_v_kwargs, __pyx_v_defaults);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_4plus_one(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_signatures, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, CYTHON_UNUSED PyObject *__pyx_v_defaults) {
  PyObject *__pyx_v_dest_sig = NULL;
  Py_ssize_t __pyx_v_i;
  CYTHON_UNUSED PyTypeObject *__pyx_v_ndarray = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_v_itemsize;
  PyObject *__pyx_v_arg = NULL;
  PyObject *__pyx_v_candidates = NULL;
  PyObject *__pyx_v_sig = NULL;
  int __pyx_v_match_found;
  PyObject *__pyx_v_src_sig = NULL;
  PyObject *__pyx_v_dst_type = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  int __pyx_t_16;
  __Pyx_RefNannySetupContext("plus_one", 0);
  __Pyx_TraceCall("plus_one", __pyx_f[0], 6, 0, __PYX_ERR(0, 6, __pyx_L1_error));
  __Pyx_INCREF(__pyx_v_kwargs);
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  PyList_SET_ITEM(__pyx_t_1, 0, Py_None);
  __pyx_v_dest_sig = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_v_kwargs != Py_None);
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 6, __pyx_L1_error)
  __pyx_t_3 = ((!__pyx_t_4) != 0);
  __pyx_t_2 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {
    __Pyx_INCREF(Py_None);
    __Pyx_DECREF_SET(__pyx_v_kwargs, Py_None);
  }
  __pyx_t_1 = ((PyObject *)__Pyx_ImportNumPyArrayTypeIfAvailable()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_ndarray = ((PyTypeObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_v_itemsize = -1L;
  if (unlikely(__pyx_v_args == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 6, __pyx_L1_error)
  }
  __pyx_t_5 = PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 6, __pyx_L1_error)
  __pyx_t_2 = ((0 < __pyx_t_5) != 0);
  if (__pyx_t_2) {
    if (unlikely(__pyx_v_args == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 6, __pyx_L1_error)
    }
    __pyx_t_1 = __Pyx_GetItemInt_Tuple(((PyObject*)__pyx_v_args), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_arg = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L6;
  }
  __pyx_t_3 = (__pyx_v_kwargs != Py_None);
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L7_bool_binop_done;
  }
  if (unlikely(__pyx_v_kwargs == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 6, __pyx_L1_error)
  }
  __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_x, ((PyObject*)__pyx_v_kwargs), Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 6, __pyx_L1_error)
  __pyx_t_3 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_3;
  __pyx_L7_bool_binop_done:;
  if (__pyx_t_2) {
    if (unlikely(__pyx_v_kwargs == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 6, __pyx_L1_error)
    }
    __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_kwargs), __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_arg = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L6;
  }
  /*else*/ {
    if (unlikely(__pyx_v_args == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
      __PYX_ERR(0, 6, __pyx_L1_error)
    }
    __pyx_t_5 = PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 6, __pyx_L1_error)
    __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_int_1);
    __Pyx_GIVEREF(__pyx_int_1);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_1);
    __Pyx_INCREF(__pyx_kp_s_);
    __Pyx_GIVEREF(__pyx_kp_s_);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_kp_s_);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Expected_at_least_d_argument_s_g, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_6, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __PYX_ERR(0, 6, __pyx_L1_error)
  }
  __pyx_L6:;
  while (1) {
    __pyx_t_2 = PyFloat_Check(__pyx_v_arg); 
    __pyx_t_3 = (__pyx_t_2 != 0);
    if (__pyx_t_3) {
      if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) __PYX_ERR(0, 6, __pyx_L1_error)
      goto __pyx_L10_break;
    }
    __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_kp_s_);
    __Pyx_GIVEREF(__pyx_kp_s_);
    PyList_SET_ITEM(__pyx_t_6, 0, __pyx_kp_s_);
    __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_u_numpy);
    __Pyx_GIVEREF(__pyx_n_u_numpy);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_u_numpy);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 1, Py_None);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_6);
    __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin___import__, __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_ndarray); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_3 = PyObject_IsInstance(__pyx_v_arg, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 6, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = (__pyx_t_3 != 0);
    if (__pyx_t_2) {
      if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_ndarray, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) __PYX_ERR(0, 6, __pyx_L1_error)
      goto __pyx_L10_break;
    }
    if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, Py_None, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) __PYX_ERR(0, 6, __pyx_L1_error)
    goto __pyx_L10_break;
  }
  __pyx_L10_break:;
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_candidates = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_5 = 0;
  if (unlikely(__pyx_v_signatures == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 6, __pyx_L1_error)
  }
  __pyx_t_6 = __Pyx_dict_iterator(((PyObject*)__pyx_v_signatures), 1, ((PyObject *)NULL), (&__pyx_t_7), (&__pyx_t_8)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_1);
  __pyx_t_1 = __pyx_t_6;
  __pyx_t_6 = 0;
  while (1) {
    __pyx_t_9 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_7, &__pyx_t_5, &__pyx_t_6, NULL, NULL, __pyx_t_8);
    if (unlikely(__pyx_t_9 == 0)) break;
    if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_XDECREF_SET(__pyx_v_sig, __pyx_t_6);
    __pyx_t_6 = 0;
    __pyx_v_match_found = 0;
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_strip); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_12 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
      __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11);
      if (likely(__pyx_t_12)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
        __Pyx_INCREF(__pyx_t_12);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_11, function);
      }
    }
    __pyx_t_10 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_12, __pyx_kp_s__2) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_kp_s__2);
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_split); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11);
      if (likely(__pyx_t_10)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_11, function);
      }
    }
    __pyx_t_6 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_10, __pyx_kp_s__3) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_kp_s__3);
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF_SET(__pyx_v_src_sig, __pyx_t_6);
    __pyx_t_6 = 0;
    __pyx_t_13 = PyList_GET_SIZE(__pyx_v_dest_sig); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 6, __pyx_L1_error)
    __pyx_t_14 = __pyx_t_13;
    for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) {
      __pyx_v_i = __pyx_t_15;
      __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_dest_sig, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_XDECREF_SET(__pyx_v_dst_type, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_2 = (__pyx_v_dst_type != Py_None);
      __pyx_t_3 = (__pyx_t_2 != 0);
      if (__pyx_t_3) {
        __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_src_sig, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_11 = PyObject_RichCompare(__pyx_t_6, __pyx_v_dst_type, Py_EQ); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 6, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 6, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (__pyx_t_3) {
          __pyx_v_match_found = 1;
          goto __pyx_L18;
        }
        /*else*/ {
          __pyx_v_match_found = 0;
          goto __pyx_L16_break;
        }
        __pyx_L18:;
      }
    }
    __pyx_L16_break:;
    __pyx_t_3 = (__pyx_v_match_found != 0);
    if (__pyx_t_3) {
      __pyx_t_16 = __Pyx_PyList_Append(__pyx_v_candidates, __pyx_v_sig); if (unlikely(__pyx_t_16 == ((int)-1))) __PYX_ERR(0, 6, __pyx_L1_error)
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (PyList_GET_SIZE(__pyx_v_candidates) != 0);
  __pyx_t_2 = ((!__pyx_t_3) != 0);
  if (__pyx_t_2) {
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 6, __pyx_L1_error)
  }
  __pyx_t_7 = PyList_GET_SIZE(__pyx_v_candidates); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 6, __pyx_L1_error)
  __pyx_t_2 = ((__pyx_t_7 > 1) != 0);
  if (__pyx_t_2) {
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 6, __pyx_L1_error)
  }
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    if (unlikely(__pyx_v_signatures == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 6, __pyx_L1_error)
    }
    __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_candidates, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_11 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_signatures), __pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = __pyx_t_11;
    __pyx_t_11 = 0;
    goto __pyx_L0;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.__pyx_fused_cpdef", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_dest_sig);
  __Pyx_XDECREF(__pyx_v_ndarray);
  __Pyx_XDECREF(__pyx_v_arg);
  __Pyx_XDECREF(__pyx_v_candidates);
  __Pyx_XDECREF(__pyx_v_sig);
  __Pyx_XDECREF(__pyx_v_src_sig);
  __Pyx_XDECREF(__pyx_v_dst_type);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_55__pyx_fuse_0plus_one(PyObject *__pyx_self, PyObject *__pyx_arg_x); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_5plus_one(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static double __pyx_fuse_0__pyx_f_5PDSim_6scroll_17common_scroll_geo_plus_one(double __pyx_v_x, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_fuse_0plus_one", 0);
  __Pyx_TraceCall("__pyx_fuse_0plus_one", __pyx_f[0], 6, 0, __PYX_ERR(0, 6, __pyx_L1_error));

  /* "PDSim/scroll/common_scroll_geo.pyx":7
 * 
 * cpdef double_or_numpy plus_one(double_or_numpy x):
 *     return x + 1.0             # <<<<<<<<<<<<<<
 * 
 * cdef class VdVstruct:
 */
  __pyx_r = (__pyx_v_x + 1.0);
  goto __pyx_L0;

  /* "PDSim/scroll/common_scroll_geo.pyx":6
 * import numpy as np
 * 
 * cpdef double_or_numpy plus_one(double_or_numpy x):             # <<<<<<<<<<<<<<
 *     return x + 1.0
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("PDSim.scroll.common_scroll_geo.plus_one", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_55__pyx_fuse_0plus_one(PyObject *__pyx_self, PyObject *__pyx_arg_x); /*proto*/
static PyMethodDef __pyx_fuse_0__pyx_mdef_5PDSim_6scroll_17common_scroll_geo_55__pyx_fuse_0plus_one = {"__pyx_fuse_0plus_one", (PyCFunction)__pyx_pw_5PDSim_6scroll_17common_scroll_geo_55__pyx_fuse_0plus_one, METH_O, __pyx_doc_5PDSim_6scroll_17common_scroll_geo_4plus_one};
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_55__pyx_fuse_0plus_one(PyObject *__pyx_self, PyObject *__pyx_arg_x) {
  double __pyx_v_x;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_fuse_0plus_one (wrapper)", 0);
  assert(__pyx_arg_x); {
    __pyx_v_x = __pyx_PyFloat_AsDouble(__pyx_arg_x); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 6, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.__pyx_fuse_0plus_one", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_54__pyx_fuse_0plus_one(__pyx_self, ((double)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_54__pyx_fuse_0plus_one(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__pyx_fuse_0plus_one", 0);
  __Pyx_TraceCall("__pyx_fuse_0plus_one (wrapper)", __pyx_f[0], 6, 0, __PYX_ERR(0, 6, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_fuse_0__pyx_f_5PDSim_6scroll_17common_scroll_geo_plus_one(__pyx_v_x, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.__pyx_fuse_0plus_one", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_57__pyx_fuse_1plus_one(PyObject *__pyx_self, PyObject *__pyx_v_x); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_5plus_one(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyArrayObject *__pyx_fuse_1__pyx_f_5PDSim_6scroll_17common_scroll_geo_plus_one(PyArrayObject *__pyx_v_x, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyArrayObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__pyx_fuse_1plus_one", 0);
  __Pyx_TraceCall("__pyx_fuse_1plus_one", __pyx_f[0], 6, 0, __PYX_ERR(0, 6, __pyx_L1_error));

  /* "PDSim/scroll/common_scroll_geo.pyx":7
 * 
 * cpdef double_or_numpy plus_one(double_or_numpy x):
 *     return x + 1.0             # <<<<<<<<<<<<<<
 * 
 * cdef class VdVstruct:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = PyNumber_Add(((PyObject *)__pyx_v_x), __pyx_float_1_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 7, __pyx_L1_error)
  __pyx_r = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "PDSim/scroll/common_scroll_geo.pyx":6
 * import numpy as np
 * 
 * cpdef double_or_numpy plus_one(double_or_numpy x):             # <<<<<<<<<<<<<<
 *     return x + 1.0
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.plus_one", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_57__pyx_fuse_1plus_one(PyObject *__pyx_self, PyObject *__pyx_v_x); /*proto*/
static PyMethodDef __pyx_fuse_1__pyx_mdef_5PDSim_6scroll_17common_scroll_geo_57__pyx_fuse_1plus_one = {"__pyx_fuse_1plus_one", (PyCFunction)__pyx_pw_5PDSim_6scroll_17common_scroll_geo_57__pyx_fuse_1plus_one, METH_O, __pyx_doc_5PDSim_6scroll_17common_scroll_geo_4plus_one};
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_57__pyx_fuse_1plus_one(PyObject *__pyx_self, PyObject *__pyx_v_x) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_fuse_1plus_one (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1, "x", 0))) __PYX_ERR(0, 6, __pyx_L1_error)
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_56__pyx_fuse_1plus_one(__pyx_self, ((PyArrayObject *)__pyx_v_x));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_56__pyx_fuse_1plus_one(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__pyx_fuse_1plus_one", 0);
  __Pyx_TraceCall("__pyx_fuse_1plus_one (wrapper)", __pyx_f[0], 6, 0, __PYX_ERR(0, 6, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_fuse_1__pyx_f_5PDSim_6scroll_17common_scroll_geo_plus_one(__pyx_v_x, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.__pyx_fuse_1plus_one", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pyx":10
 * 
 * cdef class VdVstruct:
 *     def __init__(self, V, dV):             # <<<<<<<<<<<<<<
 *         self.V = V
 *         self.dV = dV
 */

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_9VdVstruct_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_9VdVstruct_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_V = 0;
  PyObject *__pyx_v_dV = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_V,&__pyx_n_s_dV,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_V)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dV)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 10, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 10, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_V = values[0];
    __pyx_v_dV = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 10, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.VdVstruct.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_9VdVstruct___init__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_VdVstruct *)__pyx_v_self), __pyx_v_V, __pyx_v_dV);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_9VdVstruct___init__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_VdVstruct *__pyx_v_self, PyObject *__pyx_v_V, PyObject *__pyx_v_dV) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 10, 0, __PYX_ERR(0, 10, __pyx_L1_error));

  /* "PDSim/scroll/common_scroll_geo.pyx":11
 * cdef class VdVstruct:
 *     def __init__(self, V, dV):
 *         self.V = V             # <<<<<<<<<<<<<<
 *         self.dV = dV
 * 
 */
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_V); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 11, __pyx_L1_error)
  __pyx_v_self->V = __pyx_t_1;

  /* "PDSim/scroll/common_scroll_geo.pyx":12
 *     def __init__(self, V, dV):
 *         self.V = V
 *         self.dV = dV             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_dV); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 12, __pyx_L1_error)
  __pyx_v_self->dV = __pyx_t_1;

  /* "PDSim/scroll/common_scroll_geo.pyx":10
 * 
 * cdef class VdVstruct:
 *     def __init__(self, V, dV):             # <<<<<<<<<<<<<<
 *         self.V = V
 *         self.dV = dV
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.VdVstruct.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pyx":14
 *         self.dV = dV
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return str(list([self.V,self.dV]))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_9VdVstruct_3__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_9VdVstruct_3__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_9VdVstruct_2__repr__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_VdVstruct *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_9VdVstruct_2__repr__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_VdVstruct *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 14, 0, __PYX_ERR(0, 14, __pyx_L1_error));

  /* "PDSim/scroll/common_scroll_geo.pyx":15
 * 
 *     def __repr__(self):
 *         return str(list([self.V,self.dV]))             # <<<<<<<<<<<<<<
 * 
 * cdef class HTAnglesClass:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->V); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->dV); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = PySequence_List(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "PDSim/scroll/common_scroll_geo.pyx":14
 *         self.dV = dV
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return str(list([self.V,self.dV]))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.VdVstruct.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pxd":15
 *     """
 * 
 *     cdef public double V             # <<<<<<<<<<<<<<
 *     """ Volume [m^3] """
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_9VdVstruct_1V_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_9VdVstruct_1V_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_9VdVstruct_1V___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_VdVstruct *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_9VdVstruct_1V___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_VdVstruct *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 15, 0, __PYX_ERR(1, 15, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->V); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.VdVstruct.V.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_9VdVstruct_1V_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_9VdVstruct_1V_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_9VdVstruct_1V_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_VdVstruct *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_9VdVstruct_1V_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_VdVstruct *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 15, 0, __PYX_ERR(1, 15, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 15, __pyx_L1_error)
  __pyx_v_self->V = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.VdVstruct.V.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pxd":18
 *     """ Volume [m^3] """
 * 
 *     cdef public double dV             # <<<<<<<<<<<<<<
 *     """ Derivative of volume with respect to crank angle [m^3/radian] """
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_9VdVstruct_2dV_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_9VdVstruct_2dV_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_9VdVstruct_2dV___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_VdVstruct *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_9VdVstruct_2dV___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_VdVstruct *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 18, 0, __PYX_ERR(1, 18, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->dV); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.VdVstruct.dV.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_9VdVstruct_2dV_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_9VdVstruct_2dV_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_9VdVstruct_2dV_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_VdVstruct *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_9VdVstruct_2dV_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_VdVstruct *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 18, 0, __PYX_ERR(1, 18, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 18, __pyx_L1_error)
  __pyx_v_self->dV = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.VdVstruct.dV.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef bint use_setstate
 *     state = (self.V, self.dV)
 */

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_9VdVstruct_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5PDSim_6scroll_17common_scroll_geo_9VdVstruct_4__reduce_cython__[] = "VdVstruct.__reduce_cython__(self)";
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_9VdVstruct_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_9VdVstruct_4__reduce_cython__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_VdVstruct *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_9VdVstruct_4__reduce_cython__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_VdVstruct *__pyx_v_self) {
  int __pyx_v_use_setstate;
  PyObject *__pyx_v_state = NULL;
  PyObject *__pyx_v__dict = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error));

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     cdef bint use_setstate
 *     state = (self.V, self.dV)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->V); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->dV); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_v_state = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "(tree fragment)":4
 *     cdef bint use_setstate
 *     state = (self.V, self.dV)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v__dict = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "(tree fragment)":5
 *     state = (self.V, self.dV)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_4 = (__pyx_v__dict != Py_None);
  __pyx_t_5 = (__pyx_t_4 != 0);
  if (__pyx_t_5) {

    /* "(tree fragment)":6
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__dict);
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "(tree fragment)":7
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = False
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":5
 *     state = (self.V, self.dV)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":9
 *         use_setstate = True
 *     else:
 *         use_setstate = False             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_VdVstruct, (type(self), 0x7af38ca, None), state
 */
  /*else*/ {
    __pyx_v_use_setstate = 0;
  }
  __pyx_L3:;

  /* "(tree fragment)":10
 *     else:
 *         use_setstate = False
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_VdVstruct, (type(self), 0x7af38ca, None), state
 *     else:
 */
  __pyx_t_5 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_5) {

    /* "(tree fragment)":11
 *         use_setstate = False
 *     if use_setstate:
 *         return __pyx_unpickle_VdVstruct, (type(self), 0x7af38ca, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_VdVstruct, (type(self), 0x7af38ca, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle_VdVstruct); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_128923850);
    __Pyx_GIVEREF(__pyx_int_128923850);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_128923850);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_2 = 0;
    __pyx_t_3 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":10
 *     else:
 *         use_setstate = False
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_VdVstruct, (type(self), 0x7af38ca, None), state
 *     else:
 */
  }

  /* "(tree fragment)":13
 *         return __pyx_unpickle_VdVstruct, (type(self), 0x7af38ca, None), state
 *     else:
 *         return __pyx_unpickle_VdVstruct, (type(self), 0x7af38ca, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_VdVstruct__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_VdVstruct); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_128923850);
    __Pyx_GIVEREF(__pyx_int_128923850);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_128923850);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state);
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
    __pyx_t_1 = 0;
    __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef bint use_setstate
 *     state = (self.V, self.dV)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.VdVstruct.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":14
 *     else:
 *         return __pyx_unpickle_VdVstruct, (type(self), 0x7af38ca, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_VdVstruct__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_9VdVstruct_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5PDSim_6scroll_17common_scroll_geo_9VdVstruct_6__setstate_cython__[] = "VdVstruct.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_9VdVstruct_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_9VdVstruct_6__setstate_cython__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_VdVstruct *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_9VdVstruct_6__setstate_cython__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_VdVstruct *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[2], 14, 0, __PYX_ERR(2, 14, __pyx_L1_error));

  /* "(tree fragment)":15
 *         return __pyx_unpickle_VdVstruct, (type(self), 0x7af38ca, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_VdVstruct__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 15, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_5PDSim_6scroll_17common_scroll_geo___pyx_unpickle_VdVstruct__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":14
 *     else:
 *         return __pyx_unpickle_VdVstruct, (type(self), 0x7af38ca, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_VdVstruct__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.VdVstruct.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pyx":18
 * 
 * cdef class HTAnglesClass:
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         s = ''
 *         for k in ['phi_1_i','phi_2_i','phi_1_o','phi_2_o','phi_i0','phi_o0']:
 */

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_1__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_1__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass___repr__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass___repr__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass *__pyx_v_self) {
  PyObject *__pyx_v_s = NULL;
  PyObject *__pyx_v_k = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 18, 0, __PYX_ERR(0, 18, __pyx_L1_error));

  /* "PDSim/scroll/common_scroll_geo.pyx":19
 * cdef class HTAnglesClass:
 *     def __repr__(self):
 *         s = ''             # <<<<<<<<<<<<<<
 *         for k in ['phi_1_i','phi_2_i','phi_1_o','phi_2_o','phi_i0','phi_o0']:
 *             s += k + ' : ' + str(getattr(self,k)) + '\n'
 */
  __Pyx_INCREF(__pyx_kp_s_);
  __pyx_v_s = __pyx_kp_s_;

  /* "PDSim/scroll/common_scroll_geo.pyx":20
 *     def __repr__(self):
 *         s = ''
 *         for k in ['phi_1_i','phi_2_i','phi_1_o','phi_2_o','phi_i0','phi_o0']:             # <<<<<<<<<<<<<<
 *             s += k + ' : ' + str(getattr(self,k)) + '\n'
 *         return s
 */
  __pyx_t_1 = __pyx_tuple__6; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
  for (;;) {
    if (__pyx_t_2 >= 6) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 20, __pyx_L1_error)
    #else
    __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "PDSim/scroll/common_scroll_geo.pyx":21
 *         s = ''
 *         for k in ['phi_1_i','phi_2_i','phi_1_o','phi_2_o','phi_i0','phi_o0']:
 *             s += k + ' : ' + str(getattr(self,k)) + '\n'             # <<<<<<<<<<<<<<
 *         return s
 * 
 */
    __pyx_t_3 = PyNumber_Add(__pyx_v_k, __pyx_kp_s__7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_k); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 21, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyNumber_Add(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 21, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_kp_s__8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_s, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 21, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF_SET(__pyx_v_s, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "PDSim/scroll/common_scroll_geo.pyx":20
 *     def __repr__(self):
 *         s = ''
 *         for k in ['phi_1_i','phi_2_i','phi_1_o','phi_2_o','phi_i0','phi_o0']:             # <<<<<<<<<<<<<<
 *             s += k + ' : ' + str(getattr(self,k)) + '\n'
 *         return s
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "PDSim/scroll/common_scroll_geo.pyx":22
 *         for k in ['phi_1_i','phi_2_i','phi_1_o','phi_2_o','phi_i0','phi_o0']:
 *             s += k + ' : ' + str(getattr(self,k)) + '\n'
 *         return s             # <<<<<<<<<<<<<<
 * 
 * cdef class CVInvolute:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_s);
  __pyx_r = __pyx_v_s;
  goto __pyx_L0;

  /* "PDSim/scroll/common_scroll_geo.pyx":18
 * 
 * cdef class HTAnglesClass:
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         s = ''
 *         for k in ['phi_1_i','phi_2_i','phi_1_o','phi_2_o','phi_i0','phi_o0']:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.HTAnglesClass.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XDECREF(__pyx_v_k);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pxd":27
 *     """
 * 
 *     cdef public double phi_1_i             # <<<<<<<<<<<<<<
 *     """ Maximum involute angle on the inner involute of the wrap that forms the outer wall of the CV"""
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_7phi_1_i_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_7phi_1_i_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_7phi_1_i___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_7phi_1_i___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 27, 0, __PYX_ERR(1, 27, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->phi_1_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 27, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.HTAnglesClass.phi_1_i.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_7phi_1_i_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_7phi_1_i_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_7phi_1_i_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_7phi_1_i_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 27, 0, __PYX_ERR(1, 27, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 27, __pyx_L1_error)
  __pyx_v_self->phi_1_i = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.HTAnglesClass.phi_1_i.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pxd":30
 *     """ Maximum involute angle on the inner involute of the wrap that forms the outer wall of the CV"""
 * 
 *     cdef public double phi_2_i             # <<<<<<<<<<<<<<
 *     """ Minimum involute angle on the inner involute of the wrap that forms the outer wall of the CV"""
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_7phi_2_i_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_7phi_2_i_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_7phi_2_i___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_7phi_2_i___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 30, 0, __PYX_ERR(1, 30, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->phi_2_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 30, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.HTAnglesClass.phi_2_i.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_7phi_2_i_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_7phi_2_i_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_7phi_2_i_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_7phi_2_i_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 30, 0, __PYX_ERR(1, 30, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 30, __pyx_L1_error)
  __pyx_v_self->phi_2_i = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.HTAnglesClass.phi_2_i.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pxd":33
 *     """ Minimum involute angle on the inner involute of the wrap that forms the outer wall of the CV"""
 * 
 *     cdef public double phi_1_o             # <<<<<<<<<<<<<<
 *     """ Maximum involute angle on the outer involute of the wrap that forms the inner wall of the CV"""
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_7phi_1_o_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_7phi_1_o_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_7phi_1_o___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_7phi_1_o___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 33, 0, __PYX_ERR(1, 33, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->phi_1_o); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 33, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.HTAnglesClass.phi_1_o.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_7phi_1_o_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_7phi_1_o_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_7phi_1_o_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_7phi_1_o_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 33, 0, __PYX_ERR(1, 33, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 33, __pyx_L1_error)
  __pyx_v_self->phi_1_o = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.HTAnglesClass.phi_1_o.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pxd":36
 *     """ Maximum involute angle on the outer involute of the wrap that forms the inner wall of the CV"""
 * 
 *     cdef public double phi_2_o             # <<<<<<<<<<<<<<
 *     """ Minimum involute angle on the outer involute of the wrap that forms the inner wall of the CV"""
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_7phi_2_o_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_7phi_2_o_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_7phi_2_o___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_7phi_2_o___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 36, 0, __PYX_ERR(1, 36, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->phi_2_o); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.HTAnglesClass.phi_2_o.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_7phi_2_o_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_7phi_2_o_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_7phi_2_o_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_7phi_2_o_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 36, 0, __PYX_ERR(1, 36, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 36, __pyx_L1_error)
  __pyx_v_self->phi_2_o = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.HTAnglesClass.phi_2_o.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pxd":39
 *     """ Minimum involute angle on the outer involute of the wrap that forms the inner wall of the CV"""
 * 
 *     cdef public double phi_i0             # <<<<<<<<<<<<<<
 *     """ The initial angle on the inner involute of the wrap that forms the outer wall of the CV"""
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_6phi_i0_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_6phi_i0_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_6phi_i0___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_6phi_i0___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 39, 0, __PYX_ERR(1, 39, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->phi_i0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.HTAnglesClass.phi_i0.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_6phi_i0_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_6phi_i0_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_6phi_i0_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_6phi_i0_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 39, 0, __PYX_ERR(1, 39, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 39, __pyx_L1_error)
  __pyx_v_self->phi_i0 = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.HTAnglesClass.phi_i0.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pxd":42
 *     """ The initial angle on the inner involute of the wrap that forms the outer wall of the CV"""
 * 
 *     cdef public double phi_o0             # <<<<<<<<<<<<<<
 *     """ The initial angle on the outer involute of the wrap that forms the inner wall of the CV"""
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_6phi_o0_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_6phi_o0_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_6phi_o0___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_6phi_o0___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 42, 0, __PYX_ERR(1, 42, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->phi_o0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 42, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.HTAnglesClass.phi_o0.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_6phi_o0_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_6phi_o0_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_6phi_o0_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_6phi_o0_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 42, 0, __PYX_ERR(1, 42, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 42, __pyx_L1_error)
  __pyx_v_self->phi_o0 = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.HTAnglesClass.phi_o0.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef bint use_setstate
 *     state = (self.phi_1_i, self.phi_1_o, self.phi_2_i, self.phi_2_o, self.phi_i0, self.phi_o0)
 */

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_2__reduce_cython__[] = "HTAnglesClass.__reduce_cython__(self)";
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_2__reduce_cython__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_2__reduce_cython__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass *__pyx_v_self) {
  int __pyx_v_use_setstate;
  PyObject *__pyx_v_state = NULL;
  PyObject *__pyx_v__dict = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error));

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     cdef bint use_setstate
 *     state = (self.phi_1_i, self.phi_1_o, self.phi_2_i, self.phi_2_o, self.phi_i0, self.phi_o0)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->phi_1_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->phi_1_o); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->phi_2_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_self->phi_2_o); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyFloat_FromDouble(__pyx_v_self->phi_i0); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyFloat_FromDouble(__pyx_v_self->phi_o0); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = PyTuple_New(6); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_7, 4, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_7, 5, __pyx_t_6);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_6 = 0;
  __pyx_v_state = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "(tree fragment)":4
 *     cdef bint use_setstate
 *     state = (self.phi_1_i, self.phi_1_o, self.phi_2_i, self.phi_2_o, self.phi_i0, self.phi_o0)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_7 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_v__dict = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "(tree fragment)":5
 *     state = (self.phi_1_i, self.phi_1_o, self.phi_2_i, self.phi_2_o, self.phi_i0, self.phi_o0)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_8 = (__pyx_v__dict != Py_None);
  __pyx_t_9 = (__pyx_t_8 != 0);
  if (__pyx_t_9) {

    /* "(tree fragment)":6
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v__dict);
    __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "(tree fragment)":7
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = False
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":5
 *     state = (self.phi_1_i, self.phi_1_o, self.phi_2_i, self.phi_2_o, self.phi_i0, self.phi_o0)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":9
 *         use_setstate = True
 *     else:
 *         use_setstate = False             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_HTAnglesClass, (type(self), 0xbd74d76, None), state
 */
  /*else*/ {
    __pyx_v_use_setstate = 0;
  }
  __pyx_L3:;

  /* "(tree fragment)":10
 *     else:
 *         use_setstate = False
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_HTAnglesClass, (type(self), 0xbd74d76, None), state
 *     else:
 */
  __pyx_t_9 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_9) {

    /* "(tree fragment)":11
 *         use_setstate = False
 *     if use_setstate:
 *         return __pyx_unpickle_HTAnglesClass, (type(self), 0xbd74d76, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_HTAnglesClass, (type(self), 0xbd74d76, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_HTAnglesClass); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_198659446);
    __Pyx_GIVEREF(__pyx_int_198659446);
    PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_int_198659446);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_7, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_7);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_6 = 0;
    __pyx_t_7 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":10
 *     else:
 *         use_setstate = False
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_HTAnglesClass, (type(self), 0xbd74d76, None), state
 *     else:
 */
  }

  /* "(tree fragment)":13
 *         return __pyx_unpickle_HTAnglesClass, (type(self), 0xbd74d76, None), state
 *     else:
 *         return __pyx_unpickle_HTAnglesClass, (type(self), 0xbd74d76, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_HTAnglesClass__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_HTAnglesClass); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_198659446);
    __Pyx_GIVEREF(__pyx_int_198659446);
    PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_int_198659446);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_state);
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_7);
    __pyx_t_5 = 0;
    __pyx_t_7 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef bint use_setstate
 *     state = (self.phi_1_i, self.phi_1_o, self.phi_2_i, self.phi_2_o, self.phi_i0, self.phi_o0)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.HTAnglesClass.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":14
 *     else:
 *         return __pyx_unpickle_HTAnglesClass, (type(self), 0xbd74d76, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_HTAnglesClass__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_4__setstate_cython__[] = "HTAnglesClass.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_4__setstate_cython__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_4__setstate_cython__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[2], 14, 0, __PYX_ERR(2, 14, __pyx_L1_error));

  /* "(tree fragment)":15
 *         return __pyx_unpickle_HTAnglesClass, (type(self), 0xbd74d76, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_HTAnglesClass__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 15, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_5PDSim_6scroll_17common_scroll_geo___pyx_unpickle_HTAnglesClass__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":14
 *     else:
 *         return __pyx_unpickle_HTAnglesClass, (type(self), 0xbd74d76, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_HTAnglesClass__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.HTAnglesClass.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pyx":25
 * 
 * cdef class CVInvolute:
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_10CVInvolute___init__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_10CVInvolute___init__(CYTHON_UNUSED struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *__pyx_v_self) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 25, 0, __PYX_ERR(0, 25, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.CVInvolute.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pxd":56
 *     """
 * 
 *     cdef public double phi_max             # <<<<<<<<<<<<<<
 *     """ The maximum involute angle along this involute """
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_7phi_max_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_7phi_max_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_7phi_max___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_7phi_max___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 56, 0, __PYX_ERR(1, 56, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->phi_max); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 56, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.CVInvolute.phi_max.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_7phi_max_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_7phi_max_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_7phi_max_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_7phi_max_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 56, 0, __PYX_ERR(1, 56, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 56, __pyx_L1_error)
  __pyx_v_self->phi_max = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.CVInvolute.phi_max.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pxd":59
 *     """ The maximum involute angle along this involute """
 * 
 *     cdef public double phi_min             # <<<<<<<<<<<<<<
 *     """ The minimum involute angle along this involute """
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_7phi_min_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_7phi_min_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_7phi_min___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_7phi_min___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 59, 0, __PYX_ERR(1, 59, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->phi_min); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.CVInvolute.phi_min.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_7phi_min_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_7phi_min_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_7phi_min_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_7phi_min_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 59, 0, __PYX_ERR(1, 59, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 59, __pyx_L1_error)
  __pyx_v_self->phi_min = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.CVInvolute.phi_min.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pxd":62
 *     """ The minimum involute angle along this involute """
 * 
 *     cdef public double phi_0             # <<<<<<<<<<<<<<
 *     """ The initial involute angle along this involute """
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_5phi_0_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_5phi_0_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_5phi_0___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_5phi_0___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 62, 0, __PYX_ERR(1, 62, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->phi_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 62, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.CVInvolute.phi_0.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_5phi_0_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_5phi_0_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_5phi_0_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_5phi_0_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 62, 0, __PYX_ERR(1, 62, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 62, __pyx_L1_error)
  __pyx_v_self->phi_0 = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.CVInvolute.phi_0.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pxd":65
 *     """ The initial involute angle along this involute """
 * 
 *     cdef public double dphi_max_dtheta             # <<<<<<<<<<<<<<
 *     """ The derivative of phi_max w.r.t. crank angle """
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_15dphi_max_dtheta_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_15dphi_max_dtheta_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_15dphi_max_dtheta___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_15dphi_max_dtheta___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 65, 0, __PYX_ERR(1, 65, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->dphi_max_dtheta); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.CVInvolute.dphi_max_dtheta.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_15dphi_max_dtheta_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_15dphi_max_dtheta_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_15dphi_max_dtheta_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_15dphi_max_dtheta_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 65, 0, __PYX_ERR(1, 65, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 65, __pyx_L1_error)
  __pyx_v_self->dphi_max_dtheta = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.CVInvolute.dphi_max_dtheta.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pxd":68
 *     """ The derivative of phi_max w.r.t. crank angle """
 * 
 *     cdef public double dphi_min_dtheta             # <<<<<<<<<<<<<<
 *     """ The derivative of phi_min w.r.t. crank angle """
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_15dphi_min_dtheta_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_15dphi_min_dtheta_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_15dphi_min_dtheta___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_15dphi_min_dtheta___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 68, 0, __PYX_ERR(1, 68, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->dphi_min_dtheta); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 68, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.CVInvolute.dphi_min_dtheta.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_15dphi_min_dtheta_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_15dphi_min_dtheta_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_15dphi_min_dtheta_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_15dphi_min_dtheta_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 68, 0, __PYX_ERR(1, 68, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 68, __pyx_L1_error)
  __pyx_v_self->dphi_min_dtheta = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.CVInvolute.dphi_min_dtheta.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pxd":71
 *     """ The derivative of phi_min w.r.t. crank angle """
 * 
 *     cdef public involute_index involute             # <<<<<<<<<<<<<<
 *     """ The involute_index of this involute """
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_8involute_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_8involute_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_8involute___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_8involute___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 71, 0, __PYX_ERR(1, 71, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_enum____pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index(__pyx_v_self->involute); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 71, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.CVInvolute.involute.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_8involute_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_8involute_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_8involute_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_8involute_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 71, 0, __PYX_ERR(1, 71, __pyx_L1_error));
  __pyx_t_1 = ((enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index)__Pyx_PyInt_As_enum____pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index(__pyx_v_value)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 71, __pyx_L1_error)
  __pyx_v_self->involute = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.CVInvolute.involute.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef bint use_setstate
 *     state = (self.dphi_max_dtheta, self.dphi_min_dtheta, self.involute, self.phi_0, self.phi_max, self.phi_min)
 */

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_2__reduce_cython__[] = "CVInvolute.__reduce_cython__(self)";
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_2__reduce_cython__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_2__reduce_cython__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *__pyx_v_self) {
  int __pyx_v_use_setstate;
  PyObject *__pyx_v_state = NULL;
  PyObject *__pyx_v__dict = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error));

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     cdef bint use_setstate
 *     state = (self.dphi_max_dtheta, self.dphi_min_dtheta, self.involute, self.phi_0, self.phi_max, self.phi_min)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->dphi_max_dtheta); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->dphi_min_dtheta); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_enum____pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index(__pyx_v_self->involute); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_self->phi_0); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyFloat_FromDouble(__pyx_v_self->phi_max); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyFloat_FromDouble(__pyx_v_self->phi_min); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = PyTuple_New(6); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_7, 4, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_7, 5, __pyx_t_6);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_6 = 0;
  __pyx_v_state = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "(tree fragment)":4
 *     cdef bint use_setstate
 *     state = (self.dphi_max_dtheta, self.dphi_min_dtheta, self.involute, self.phi_0, self.phi_max, self.phi_min)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_7 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_v__dict = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "(tree fragment)":5
 *     state = (self.dphi_max_dtheta, self.dphi_min_dtheta, self.involute, self.phi_0, self.phi_max, self.phi_min)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_8 = (__pyx_v__dict != Py_None);
  __pyx_t_9 = (__pyx_t_8 != 0);
  if (__pyx_t_9) {

    /* "(tree fragment)":6
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v__dict);
    __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "(tree fragment)":7
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = False
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":5
 *     state = (self.dphi_max_dtheta, self.dphi_min_dtheta, self.involute, self.phi_0, self.phi_max, self.phi_min)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":9
 *         use_setstate = True
 *     else:
 *         use_setstate = False             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_CVInvolute, (type(self), 0x78aa620, None), state
 */
  /*else*/ {
    __pyx_v_use_setstate = 0;
  }
  __pyx_L3:;

  /* "(tree fragment)":10
 *     else:
 *         use_setstate = False
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_CVInvolute, (type(self), 0x78aa620, None), state
 *     else:
 */
  __pyx_t_9 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_9) {

    /* "(tree fragment)":11
 *         use_setstate = False
 *     if use_setstate:
 *         return __pyx_unpickle_CVInvolute, (type(self), 0x78aa620, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_CVInvolute, (type(self), 0x78aa620, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_CVInvolute); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_126527008);
    __Pyx_GIVEREF(__pyx_int_126527008);
    PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_int_126527008);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_7, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_7);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_6 = 0;
    __pyx_t_7 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":10
 *     else:
 *         use_setstate = False
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_CVInvolute, (type(self), 0x78aa620, None), state
 *     else:
 */
  }

  /* "(tree fragment)":13
 *         return __pyx_unpickle_CVInvolute, (type(self), 0x78aa620, None), state
 *     else:
 *         return __pyx_unpickle_CVInvolute, (type(self), 0x78aa620, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_CVInvolute__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_CVInvolute); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_126527008);
    __Pyx_GIVEREF(__pyx_int_126527008);
    PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_int_126527008);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_state);
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_7);
    __pyx_t_5 = 0;
    __pyx_t_7 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef bint use_setstate
 *     state = (self.dphi_max_dtheta, self.dphi_min_dtheta, self.involute, self.phi_0, self.phi_max, self.phi_min)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.CVInvolute.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":14
 *     else:
 *         return __pyx_unpickle_CVInvolute, (type(self), 0x78aa620, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_CVInvolute__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_4__setstate_cython__[] = "CVInvolute.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_4__setstate_cython__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_4__setstate_cython__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[2], 14, 0, __PYX_ERR(2, 14, __pyx_L1_error));

  /* "(tree fragment)":15
 *         return __pyx_unpickle_CVInvolute, (type(self), 0x78aa620, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_CVInvolute__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 15, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_5PDSim_6scroll_17common_scroll_geo___pyx_unpickle_CVInvolute__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":14
 *     else:
 *         return __pyx_unpickle_CVInvolute, (type(self), 0x78aa620, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_CVInvolute__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.CVInvolute.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pyx":29
 * 
 * cdef class CVInvolutes:
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self.Inner = CVInvolute.__new__(CVInvolute)
 *         self.Outer = CVInvolute.__new__(CVInvolute)
 */

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes___init__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes___init__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *__pyx_v_self) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 29, 0, __PYX_ERR(0, 29, __pyx_L1_error));

  /* "PDSim/scroll/common_scroll_geo.pyx":30
 * cdef class CVInvolutes:
 *     def __init__(self):
 *         self.Inner = CVInvolute.__new__(CVInvolute)             # <<<<<<<<<<<<<<
 *         self.Outer = CVInvolute.__new__(CVInvolute)
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_tp_new_5PDSim_6scroll_17common_scroll_geo_CVInvolute(((PyTypeObject *)__pyx_ptype_5PDSim_6scroll_17common_scroll_geo_CVInvolute), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error)
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
  __Pyx_GOTREF(__pyx_v_self->Inner);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->Inner));
  __pyx_v_self->Inner = ((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "PDSim/scroll/common_scroll_geo.pyx":31
 *     def __init__(self):
 *         self.Inner = CVInvolute.__new__(CVInvolute)
 *         self.Outer = CVInvolute.__new__(CVInvolute)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __pyx_t_1 = ((PyObject *)__pyx_tp_new_5PDSim_6scroll_17common_scroll_geo_CVInvolute(((PyTypeObject *)__pyx_ptype_5PDSim_6scroll_17common_scroll_geo_CVInvolute), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
  __Pyx_GOTREF(__pyx_v_self->Outer);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->Outer));
  __pyx_v_self->Outer = ((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "PDSim/scroll/common_scroll_geo.pyx":29
 * 
 * cdef class CVInvolutes:
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self.Inner = CVInvolute.__new__(CVInvolute)
 *         self.Outer = CVInvolute.__new__(CVInvolute)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.CVInvolutes.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pyx":33
 *         self.Outer = CVInvolute.__new__(CVInvolute)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         s = ''
 *         s += "Outer.involute = {i:s}\n".format(i=involute_index_to_key(self.Outer.involute))
 */

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_3__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_3__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_2__repr__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_2__repr__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *__pyx_v_self) {
  PyObject *__pyx_v_s = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 33, 0, __PYX_ERR(0, 33, __pyx_L1_error));

  /* "PDSim/scroll/common_scroll_geo.pyx":34
 * 
 *     def __repr__(self):
 *         s = ''             # <<<<<<<<<<<<<<
 *         s += "Outer.involute = {i:s}\n".format(i=involute_index_to_key(self.Outer.involute))
 *         s += "Outer.phi_0 = {i:g}\n".format(i=self.Outer.phi_0)
 */
  __Pyx_INCREF(__pyx_kp_s_);
  __pyx_v_s = __pyx_kp_s_;

  /* "PDSim/scroll/common_scroll_geo.pyx":35
 *     def __repr__(self):
 *         s = ''
 *         s += "Outer.involute = {i:s}\n".format(i=involute_index_to_key(self.Outer.involute))             # <<<<<<<<<<<<<<
 *         s += "Outer.phi_0 = {i:g}\n".format(i=self.Outer.phi_0)
 *         s += "Outer.phi_max = {i:g}\n".format(i=self.Outer.phi_max)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Outer_involute_i_s, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_f_5PDSim_6scroll_17common_scroll_geo_involute_index_to_key(__pyx_v_self->Outer->involute, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_i, __pyx_t_3) < 0) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_s, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF_SET(__pyx_v_s, __pyx_t_2);
  __pyx_t_2 = 0;

  /* "PDSim/scroll/common_scroll_geo.pyx":36
 *         s = ''
 *         s += "Outer.involute = {i:s}\n".format(i=involute_index_to_key(self.Outer.involute))
 *         s += "Outer.phi_0 = {i:g}\n".format(i=self.Outer.phi_0)             # <<<<<<<<<<<<<<
 *         s += "Outer.phi_max = {i:g}\n".format(i=self.Outer.phi_max)
 *         s += "Outer.phi_min = {i:g}\n".format(i=self.Outer.phi_min)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Outer_phi_0_i_g, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->Outer->phi_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_i, __pyx_t_1) < 0) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_s, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF_SET(__pyx_v_s, __pyx_t_3);
  __pyx_t_3 = 0;

  /* "PDSim/scroll/common_scroll_geo.pyx":37
 *         s += "Outer.involute = {i:s}\n".format(i=involute_index_to_key(self.Outer.involute))
 *         s += "Outer.phi_0 = {i:g}\n".format(i=self.Outer.phi_0)
 *         s += "Outer.phi_max = {i:g}\n".format(i=self.Outer.phi_max)             # <<<<<<<<<<<<<<
 *         s += "Outer.phi_min = {i:g}\n".format(i=self.Outer.phi_min)
 *         s += "Inner.involute = {i:s}\n".format(i=involute_index_to_key(self.Inner.involute))
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Outer_phi_max_i_g, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->Outer->phi_max); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_i, __pyx_t_2) < 0) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF_SET(__pyx_v_s, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "PDSim/scroll/common_scroll_geo.pyx":38
 *         s += "Outer.phi_0 = {i:g}\n".format(i=self.Outer.phi_0)
 *         s += "Outer.phi_max = {i:g}\n".format(i=self.Outer.phi_max)
 *         s += "Outer.phi_min = {i:g}\n".format(i=self.Outer.phi_min)             # <<<<<<<<<<<<<<
 *         s += "Inner.involute = {i:s}\n".format(i=involute_index_to_key(self.Inner.involute))
 *         s += "Inner.phi_0 = {i:g}\n".format(i=self.Inner.phi_0)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Outer_phi_min_i_g, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->Outer->phi_min); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_i, __pyx_t_3) < 0) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_s, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF_SET(__pyx_v_s, __pyx_t_2);
  __pyx_t_2 = 0;

  /* "PDSim/scroll/common_scroll_geo.pyx":39
 *         s += "Outer.phi_max = {i:g}\n".format(i=self.Outer.phi_max)
 *         s += "Outer.phi_min = {i:g}\n".format(i=self.Outer.phi_min)
 *         s += "Inner.involute = {i:s}\n".format(i=involute_index_to_key(self.Inner.involute))             # <<<<<<<<<<<<<<
 *         s += "Inner.phi_0 = {i:g}\n".format(i=self.Inner.phi_0)
 *         s += "Inner.phi_max = {i:g}\n".format(i=self.Inner.phi_max)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Inner_involute_i_s, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __pyx_f_5PDSim_6scroll_17common_scroll_geo_involute_index_to_key(__pyx_v_self->Inner->involute, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_i, __pyx_t_1) < 0) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_s, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF_SET(__pyx_v_s, __pyx_t_3);
  __pyx_t_3 = 0;

  /* "PDSim/scroll/common_scroll_geo.pyx":40
 *         s += "Outer.phi_min = {i:g}\n".format(i=self.Outer.phi_min)
 *         s += "Inner.involute = {i:s}\n".format(i=involute_index_to_key(self.Inner.involute))
 *         s += "Inner.phi_0 = {i:g}\n".format(i=self.Inner.phi_0)             # <<<<<<<<<<<<<<
 *         s += "Inner.phi_max = {i:g}\n".format(i=self.Inner.phi_max)
 *         s += "Inner.phi_min = {i:g}\n".format(i=self.Inner.phi_min)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Inner_phi_0_i_g, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->Inner->phi_0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_i, __pyx_t_2) < 0) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF_SET(__pyx_v_s, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "PDSim/scroll/common_scroll_geo.pyx":41
 *         s += "Inner.involute = {i:s}\n".format(i=involute_index_to_key(self.Inner.involute))
 *         s += "Inner.phi_0 = {i:g}\n".format(i=self.Inner.phi_0)
 *         s += "Inner.phi_max = {i:g}\n".format(i=self.Inner.phi_max)             # <<<<<<<<<<<<<<
 *         s += "Inner.phi_min = {i:g}\n".format(i=self.Inner.phi_min)
 *         s += "has_line_1 = {i:g}\n".format(i=self.has_line_1)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Inner_phi_max_i_g, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->Inner->phi_max); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_i, __pyx_t_3) < 0) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_s, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF_SET(__pyx_v_s, __pyx_t_2);
  __pyx_t_2 = 0;

  /* "PDSim/scroll/common_scroll_geo.pyx":42
 *         s += "Inner.phi_0 = {i:g}\n".format(i=self.Inner.phi_0)
 *         s += "Inner.phi_max = {i:g}\n".format(i=self.Inner.phi_max)
 *         s += "Inner.phi_min = {i:g}\n".format(i=self.Inner.phi_min)             # <<<<<<<<<<<<<<
 *         s += "has_line_1 = {i:g}\n".format(i=self.has_line_1)
 *         s += "has_line_2 = {i:g}".format(i=self.has_line_2)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Inner_phi_min_i_g, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 42, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 42, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->Inner->phi_min); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 42, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_i, __pyx_t_1) < 0) __PYX_ERR(0, 42, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 42, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_s, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 42, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF_SET(__pyx_v_s, __pyx_t_3);
  __pyx_t_3 = 0;

  /* "PDSim/scroll/common_scroll_geo.pyx":43
 *         s += "Inner.phi_max = {i:g}\n".format(i=self.Inner.phi_max)
 *         s += "Inner.phi_min = {i:g}\n".format(i=self.Inner.phi_min)
 *         s += "has_line_1 = {i:g}\n".format(i=self.has_line_1)             # <<<<<<<<<<<<<<
 *         s += "has_line_2 = {i:g}".format(i=self.has_line_2)
 *         return s
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_has_line_1_i_g, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 43, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->has_line_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_i, __pyx_t_2) < 0) __PYX_ERR(0, 43, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF_SET(__pyx_v_s, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "PDSim/scroll/common_scroll_geo.pyx":44
 *         s += "Inner.phi_min = {i:g}\n".format(i=self.Inner.phi_min)
 *         s += "has_line_1 = {i:g}\n".format(i=self.has_line_1)
 *         s += "has_line_2 = {i:g}".format(i=self.has_line_2)             # <<<<<<<<<<<<<<
 *         return s
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_has_line_2_i_g, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_self->has_line_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_i, __pyx_t_3) < 0) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_s, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF_SET(__pyx_v_s, __pyx_t_2);
  __pyx_t_2 = 0;

  /* "PDSim/scroll/common_scroll_geo.pyx":45
 *         s += "has_line_1 = {i:g}\n".format(i=self.has_line_1)
 *         s += "has_line_2 = {i:g}".format(i=self.has_line_2)
 *         return s             # <<<<<<<<<<<<<<
 * 
 * cpdef VdVstruct VdV(double theta, geoVals geo, CVInvolutes inv):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_s);
  __pyx_r = __pyx_v_s;
  goto __pyx_L0;

  /* "PDSim/scroll/common_scroll_geo.pyx":33
 *         self.Outer = CVInvolute.__new__(CVInvolute)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         s = ''
 *         s += "Outer.involute = {i:s}\n".format(i=involute_index_to_key(self.Outer.involute))
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.CVInvolutes.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pxd":75
 * 
 * cdef class CVInvolutes:
 *     cdef public CVInvolute Inner             # <<<<<<<<<<<<<<
 *     """ The values for the inner involute of this chamber """
 *     cdef public CVInvolute Outer
 */

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_5Inner_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_5Inner_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_5Inner___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_5Inner___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 75, 0, __PYX_ERR(1, 75, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->Inner));
  __pyx_r = ((PyObject *)__pyx_v_self->Inner);
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.CVInvolutes.Inner.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_5Inner_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_5Inner_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_5Inner_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_5Inner_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 75, 0, __PYX_ERR(1, 75, __pyx_L1_error));
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5PDSim_6scroll_17common_scroll_geo_CVInvolute))))) __PYX_ERR(1, 75, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->Inner);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->Inner));
  __pyx_v_self->Inner = ((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.CVInvolutes.Inner.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_5Inner_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_5Inner_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_5Inner_4__del__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_5Inner_4__del__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *__pyx_v_self) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_TraceCall("__del__", __pyx_f[1], 75, 0, __PYX_ERR(1, 75, __pyx_L1_error));
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->Inner);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->Inner));
  __pyx_v_self->Inner = ((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *)Py_None);

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.CVInvolutes.Inner.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pxd":77
 *     cdef public CVInvolute Inner
 *     """ The values for the inner involute of this chamber """
 *     cdef public CVInvolute Outer             # <<<<<<<<<<<<<<
 *     """ The values for the outer involute of this chamber """
 *     cdef public bint has_line_1
 */

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_5Outer_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_5Outer_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_5Outer___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_5Outer___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 77, 0, __PYX_ERR(1, 77, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->Outer));
  __pyx_r = ((PyObject *)__pyx_v_self->Outer);
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.CVInvolutes.Outer.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_5Outer_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_5Outer_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_5Outer_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_5Outer_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 77, 0, __PYX_ERR(1, 77, __pyx_L1_error));
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5PDSim_6scroll_17common_scroll_geo_CVInvolute))))) __PYX_ERR(1, 77, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->Outer);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->Outer));
  __pyx_v_self->Outer = ((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.CVInvolutes.Outer.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_5Outer_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_5Outer_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_5Outer_4__del__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_5Outer_4__del__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *__pyx_v_self) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_TraceCall("__del__", __pyx_f[1], 77, 0, __PYX_ERR(1, 77, __pyx_L1_error));
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->Outer);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->Outer));
  __pyx_v_self->Outer = ((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *)Py_None);

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.CVInvolutes.Outer.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pxd":79
 *     cdef public CVInvolute Outer
 *     """ The values for the outer involute of this chamber """
 *     cdef public bint has_line_1             # <<<<<<<<<<<<<<
 *     """ Boolean for existence of the line #1 """
 *     cdef public bint has_line_2
 */

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_10has_line_1_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_10has_line_1_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_10has_line_1___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_10has_line_1___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 79, 0, __PYX_ERR(1, 79, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->has_line_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 79, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.CVInvolutes.has_line_1.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_10has_line_1_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_10has_line_1_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_10has_line_1_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_10has_line_1_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 79, 0, __PYX_ERR(1, 79, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 79, __pyx_L1_error)
  __pyx_v_self->has_line_1 = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.CVInvolutes.has_line_1.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pxd":81
 *     cdef public bint has_line_1
 *     """ Boolean for existence of the line #1 """
 *     cdef public bint has_line_2             # <<<<<<<<<<<<<<
 *     """ Boolean for existence of the line #2 """
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_10has_line_2_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_10has_line_2_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_10has_line_2___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_10has_line_2___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 81, 0, __PYX_ERR(1, 81, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->has_line_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 81, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.CVInvolutes.has_line_2.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_10has_line_2_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_10has_line_2_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_10has_line_2_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_10has_line_2_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 81, 0, __PYX_ERR(1, 81, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 81, __pyx_L1_error)
  __pyx_v_self->has_line_2 = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.CVInvolutes.has_line_2.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef bint use_setstate
 *     state = (self.Inner, self.Outer, self.has_line_1, self.has_line_2)
 */

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_4__reduce_cython__[] = "CVInvolutes.__reduce_cython__(self)";
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_4__reduce_cython__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_4__reduce_cython__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *__pyx_v_self) {
  int __pyx_v_use_setstate;
  PyObject *__pyx_v_state = NULL;
  PyObject *__pyx_v__dict = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error));

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     cdef bint use_setstate
 *     state = (self.Inner, self.Outer, self.has_line_1, self.has_line_2)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->has_line_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->has_line_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->Inner));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->Inner));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self->Inner));
  __Pyx_INCREF(((PyObject *)__pyx_v_self->Outer));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->Outer));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_self->Outer));
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "(tree fragment)":4
 *     cdef bint use_setstate
 *     state = (self.Inner, self.Outer, self.has_line_1, self.has_line_2)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v__dict = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "(tree fragment)":5
 *     state = (self.Inner, self.Outer, self.has_line_1, self.has_line_2)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_4 = (__pyx_v__dict != Py_None);
  __pyx_t_5 = (__pyx_t_4 != 0);
  if (__pyx_t_5) {

    /* "(tree fragment)":6
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__dict);
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "(tree fragment)":7
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self.Inner is not None or self.Outer is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":5
 *     state = (self.Inner, self.Outer, self.has_line_1, self.has_line_2)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":9
 *         use_setstate = True
 *     else:
 *         use_setstate = self.Inner is not None or self.Outer is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_CVInvolutes, (type(self), 0xbb57980, None), state
 */
  /*else*/ {
    __pyx_t_4 = (((PyObject *)__pyx_v_self->Inner) != Py_None);
    __pyx_t_6 = (__pyx_t_4 != 0);
    if (!__pyx_t_6) {
    } else {
      __pyx_t_5 = __pyx_t_6;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_6 = (((PyObject *)__pyx_v_self->Outer) != Py_None);
    __pyx_t_4 = (__pyx_t_6 != 0);
    __pyx_t_5 = __pyx_t_4;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_5;
  }
  __pyx_L3:;

  /* "(tree fragment)":10
 *     else:
 *         use_setstate = self.Inner is not None or self.Outer is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_CVInvolutes, (type(self), 0xbb57980, None), state
 *     else:
 */
  __pyx_t_5 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_5) {

    /* "(tree fragment)":11
 *         use_setstate = self.Inner is not None or self.Outer is not None
 *     if use_setstate:
 *         return __pyx_unpickle_CVInvolutes, (type(self), 0xbb57980, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_CVInvolutes, (type(self), 0xbb57980, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle_CVInvolutes); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_196442496);
    __Pyx_GIVEREF(__pyx_int_196442496);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_196442496);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_2 = 0;
    __pyx_t_3 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":10
 *     else:
 *         use_setstate = self.Inner is not None or self.Outer is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_CVInvolutes, (type(self), 0xbb57980, None), state
 *     else:
 */
  }

  /* "(tree fragment)":13
 *         return __pyx_unpickle_CVInvolutes, (type(self), 0xbb57980, None), state
 *     else:
 *         return __pyx_unpickle_CVInvolutes, (type(self), 0xbb57980, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_CVInvolutes__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_CVInvolutes); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_196442496);
    __Pyx_GIVEREF(__pyx_int_196442496);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_196442496);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state);
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
    __pyx_t_1 = 0;
    __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef bint use_setstate
 *     state = (self.Inner, self.Outer, self.has_line_1, self.has_line_2)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.CVInvolutes.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":14
 *     else:
 *         return __pyx_unpickle_CVInvolutes, (type(self), 0xbb57980, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_CVInvolutes__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_6__setstate_cython__[] = "CVInvolutes.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_6__setstate_cython__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_6__setstate_cython__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[2], 14, 0, __PYX_ERR(2, 14, __pyx_L1_error));

  /* "(tree fragment)":15
 *         return __pyx_unpickle_CVInvolutes, (type(self), 0xbb57980, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_CVInvolutes__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 15, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_5PDSim_6scroll_17common_scroll_geo___pyx_unpickle_CVInvolutes__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":14
 *     else:
 *         return __pyx_unpickle_CVInvolutes, (type(self), 0xbb57980, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_CVInvolutes__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.CVInvolutes.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pyx":47
 *         return s
 * 
 * cpdef VdVstruct VdV(double theta, geoVals geo, CVInvolutes inv):             # <<<<<<<<<<<<<<
 *     """
 *     Evaluate V and dV/dtheta in a generalized manner for a chamber
 */

static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7VdV(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_VdVstruct *__pyx_f_5PDSim_6scroll_17common_scroll_geo_VdV(double __pyx_v_theta, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *__pyx_v_inv, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_v_A_i;
  double __pyx_v_A_o;
  double __pyx_v_A_line_1;
  double __pyx_v_A_line_2;
  double __pyx_v_x_1;
  double __pyx_v_x_2;
  double __pyx_v_y_1;
  double __pyx_v_y_2;
  double __pyx_v_dx_1_dphi;
  double __pyx_v_dy_1_dphi;
  double __pyx_v_dx_2_dphi;
  double __pyx_v_dy_2_dphi;
  double __pyx_v_dA_line_1_dtheta;
  double __pyx_v_dA_line_2_dtheta;
  double __pyx_v_dx_1_dtheta;
  double __pyx_v_dy_1_dtheta;
  double __pyx_v_dx_2_dtheta;
  double __pyx_v_dy_2_dtheta;
  double __pyx_v_V;
  double __pyx_v_dA_i_dtheta;
  double __pyx_v_dA_o_dtheta;
  double __pyx_v_dV;
  struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_VdVstruct *__pyx_v_VdV = 0;
  struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_VdVstruct *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("VdV", 0);
  __Pyx_TraceCall("VdV", __pyx_f[0], 47, 0, __PYX_ERR(0, 47, __pyx_L1_error));

  /* "PDSim/scroll/common_scroll_geo.pyx":51
 *     Evaluate V and dV/dtheta in a generalized manner for a chamber
 *     """
 *     cdef double A_i, A_o, A_line_1 = 0, A_line_2 = 0, x_1, x_2, y_1, y_2, dx_1_dphi=0, dy_1_dphi=0, dx_2_dphi=0, dy_2_dphi=0             # <<<<<<<<<<<<<<
 *     cdef double dA_line_1_dtheta = 0, dA_line_2_dtheta = 0, dx_1_dtheta, dy_1_dtheta, dx_2_dtheta, dy_2_dtheta
 * 
 */
  __pyx_v_A_line_1 = 0.0;
  __pyx_v_A_line_2 = 0.0;
  __pyx_v_dx_1_dphi = 0.0;
  __pyx_v_dy_1_dphi = 0.0;
  __pyx_v_dx_2_dphi = 0.0;
  __pyx_v_dy_2_dphi = 0.0;

  /* "PDSim/scroll/common_scroll_geo.pyx":52
 *     """
 *     cdef double A_i, A_o, A_line_1 = 0, A_line_2 = 0, x_1, x_2, y_1, y_2, dx_1_dphi=0, dy_1_dphi=0, dx_2_dphi=0, dy_2_dphi=0
 *     cdef double dA_line_1_dtheta = 0, dA_line_2_dtheta = 0, dx_1_dtheta, dy_1_dtheta, dx_2_dtheta, dy_2_dtheta             # <<<<<<<<<<<<<<
 * 
 *     ## ------------------------ VOLUME -------------------------------
 */
  __pyx_v_dA_line_1_dtheta = 0.0;
  __pyx_v_dA_line_2_dtheta = 0.0;

  /* "PDSim/scroll/common_scroll_geo.pyx":56
 *     ## ------------------------ VOLUME -------------------------------
 * 
 *     A_i = 0.5*(Gr(inv.Outer.phi_max, geo, theta, inv.Outer.involute) - Gr(inv.Outer.phi_min, geo, theta, inv.Outer.involute))             # <<<<<<<<<<<<<<
 *     if inv.has_line_1:
 *         _coords_inv_d_int(inv.Outer.phi_max, geo, theta, inv.Outer.involute, &x_1, &y_1)
 */
  __pyx_v_A_i = (0.5 * (__pyx_f_5PDSim_6scroll_17common_scroll_geo_Gr(__pyx_v_inv->Outer->phi_max, __pyx_v_geo, __pyx_v_theta, __pyx_v_inv->Outer->involute, 0) - __pyx_f_5PDSim_6scroll_17common_scroll_geo_Gr(__pyx_v_inv->Outer->phi_min, __pyx_v_geo, __pyx_v_theta, __pyx_v_inv->Outer->involute, 0)));

  /* "PDSim/scroll/common_scroll_geo.pyx":57
 * 
 *     A_i = 0.5*(Gr(inv.Outer.phi_max, geo, theta, inv.Outer.involute) - Gr(inv.Outer.phi_min, geo, theta, inv.Outer.involute))
 *     if inv.has_line_1:             # <<<<<<<<<<<<<<
 *         _coords_inv_d_int(inv.Outer.phi_max, geo, theta, inv.Outer.involute, &x_1, &y_1)
 *         _coords_inv_d_int(inv.Inner.phi_max, geo, theta, inv.Inner.involute, &x_2, &y_2)
 */
  __pyx_t_1 = (__pyx_v_inv->has_line_1 != 0);
  if (__pyx_t_1) {

    /* "PDSim/scroll/common_scroll_geo.pyx":58
 *     A_i = 0.5*(Gr(inv.Outer.phi_max, geo, theta, inv.Outer.involute) - Gr(inv.Outer.phi_min, geo, theta, inv.Outer.involute))
 *     if inv.has_line_1:
 *         _coords_inv_d_int(inv.Outer.phi_max, geo, theta, inv.Outer.involute, &x_1, &y_1)             # <<<<<<<<<<<<<<
 *         _coords_inv_d_int(inv.Inner.phi_max, geo, theta, inv.Inner.involute, &x_2, &y_2)
 *         A_line_1 = 0.5*(x_1*y_2 - x_2*y_1)
 */
    __pyx_t_2 = __pyx_f_5PDSim_6scroll_17common_scroll_geo__coords_inv_d_int(__pyx_v_inv->Outer->phi_max, __pyx_v_geo, __pyx_v_theta, __pyx_v_inv->Outer->involute, (&__pyx_v_x_1), (&__pyx_v_y_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 58, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "PDSim/scroll/common_scroll_geo.pyx":59
 *     if inv.has_line_1:
 *         _coords_inv_d_int(inv.Outer.phi_max, geo, theta, inv.Outer.involute, &x_1, &y_1)
 *         _coords_inv_d_int(inv.Inner.phi_max, geo, theta, inv.Inner.involute, &x_2, &y_2)             # <<<<<<<<<<<<<<
 *         A_line_1 = 0.5*(x_1*y_2 - x_2*y_1)
 *     A_o = 0.5*(Gr(inv.Inner.phi_min, geo, theta, inv.Inner.involute) - Gr(inv.Inner.phi_max, geo, theta, inv.Inner.involute))
 */
    __pyx_t_2 = __pyx_f_5PDSim_6scroll_17common_scroll_geo__coords_inv_d_int(__pyx_v_inv->Inner->phi_max, __pyx_v_geo, __pyx_v_theta, __pyx_v_inv->Inner->involute, (&__pyx_v_x_2), (&__pyx_v_y_2)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 59, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "PDSim/scroll/common_scroll_geo.pyx":60
 *         _coords_inv_d_int(inv.Outer.phi_max, geo, theta, inv.Outer.involute, &x_1, &y_1)
 *         _coords_inv_d_int(inv.Inner.phi_max, geo, theta, inv.Inner.involute, &x_2, &y_2)
 *         A_line_1 = 0.5*(x_1*y_2 - x_2*y_1)             # <<<<<<<<<<<<<<
 *     A_o = 0.5*(Gr(inv.Inner.phi_min, geo, theta, inv.Inner.involute) - Gr(inv.Inner.phi_max, geo, theta, inv.Inner.involute))
 *     if inv.has_line_2:
 */
    __pyx_v_A_line_1 = (0.5 * ((__pyx_v_x_1 * __pyx_v_y_2) - (__pyx_v_x_2 * __pyx_v_y_1)));

    /* "PDSim/scroll/common_scroll_geo.pyx":57
 * 
 *     A_i = 0.5*(Gr(inv.Outer.phi_max, geo, theta, inv.Outer.involute) - Gr(inv.Outer.phi_min, geo, theta, inv.Outer.involute))
 *     if inv.has_line_1:             # <<<<<<<<<<<<<<
 *         _coords_inv_d_int(inv.Outer.phi_max, geo, theta, inv.Outer.involute, &x_1, &y_1)
 *         _coords_inv_d_int(inv.Inner.phi_max, geo, theta, inv.Inner.involute, &x_2, &y_2)
 */
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":61
 *         _coords_inv_d_int(inv.Inner.phi_max, geo, theta, inv.Inner.involute, &x_2, &y_2)
 *         A_line_1 = 0.5*(x_1*y_2 - x_2*y_1)
 *     A_o = 0.5*(Gr(inv.Inner.phi_min, geo, theta, inv.Inner.involute) - Gr(inv.Inner.phi_max, geo, theta, inv.Inner.involute))             # <<<<<<<<<<<<<<
 *     if inv.has_line_2:
 *         _coords_inv_d_int(inv.Inner.phi_min, geo, theta, inv.Inner.involute, &x_1, &y_1)
 */
  __pyx_v_A_o = (0.5 * (__pyx_f_5PDSim_6scroll_17common_scroll_geo_Gr(__pyx_v_inv->Inner->phi_min, __pyx_v_geo, __pyx_v_theta, __pyx_v_inv->Inner->involute, 0) - __pyx_f_5PDSim_6scroll_17common_scroll_geo_Gr(__pyx_v_inv->Inner->phi_max, __pyx_v_geo, __pyx_v_theta, __pyx_v_inv->Inner->involute, 0)));

  /* "PDSim/scroll/common_scroll_geo.pyx":62
 *         A_line_1 = 0.5*(x_1*y_2 - x_2*y_1)
 *     A_o = 0.5*(Gr(inv.Inner.phi_min, geo, theta, inv.Inner.involute) - Gr(inv.Inner.phi_max, geo, theta, inv.Inner.involute))
 *     if inv.has_line_2:             # <<<<<<<<<<<<<<
 *         _coords_inv_d_int(inv.Inner.phi_min, geo, theta, inv.Inner.involute, &x_1, &y_1)
 *         _coords_inv_d_int(inv.Outer.phi_min, geo, theta, inv.Outer.involute, &x_2, &y_2)
 */
  __pyx_t_1 = (__pyx_v_inv->has_line_2 != 0);
  if (__pyx_t_1) {

    /* "PDSim/scroll/common_scroll_geo.pyx":63
 *     A_o = 0.5*(Gr(inv.Inner.phi_min, geo, theta, inv.Inner.involute) - Gr(inv.Inner.phi_max, geo, theta, inv.Inner.involute))
 *     if inv.has_line_2:
 *         _coords_inv_d_int(inv.Inner.phi_min, geo, theta, inv.Inner.involute, &x_1, &y_1)             # <<<<<<<<<<<<<<
 *         _coords_inv_d_int(inv.Outer.phi_min, geo, theta, inv.Outer.involute, &x_2, &y_2)
 *         A_line_2 = 0.5*(x_1*y_2 - x_2*y_1)
 */
    __pyx_t_2 = __pyx_f_5PDSim_6scroll_17common_scroll_geo__coords_inv_d_int(__pyx_v_inv->Inner->phi_min, __pyx_v_geo, __pyx_v_theta, __pyx_v_inv->Inner->involute, (&__pyx_v_x_1), (&__pyx_v_y_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 63, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "PDSim/scroll/common_scroll_geo.pyx":64
 *     if inv.has_line_2:
 *         _coords_inv_d_int(inv.Inner.phi_min, geo, theta, inv.Inner.involute, &x_1, &y_1)
 *         _coords_inv_d_int(inv.Outer.phi_min, geo, theta, inv.Outer.involute, &x_2, &y_2)             # <<<<<<<<<<<<<<
 *         A_line_2 = 0.5*(x_1*y_2 - x_2*y_1)
 * 
 */
    __pyx_t_2 = __pyx_f_5PDSim_6scroll_17common_scroll_geo__coords_inv_d_int(__pyx_v_inv->Outer->phi_min, __pyx_v_geo, __pyx_v_theta, __pyx_v_inv->Outer->involute, (&__pyx_v_x_2), (&__pyx_v_y_2)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 64, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "PDSim/scroll/common_scroll_geo.pyx":65
 *         _coords_inv_d_int(inv.Inner.phi_min, geo, theta, inv.Inner.involute, &x_1, &y_1)
 *         _coords_inv_d_int(inv.Outer.phi_min, geo, theta, inv.Outer.involute, &x_2, &y_2)
 *         A_line_2 = 0.5*(x_1*y_2 - x_2*y_1)             # <<<<<<<<<<<<<<
 * 
 *     V = geo.h*(A_i + A_line_1 + A_o + A_line_2)
 */
    __pyx_v_A_line_2 = (0.5 * ((__pyx_v_x_1 * __pyx_v_y_2) - (__pyx_v_x_2 * __pyx_v_y_1)));

    /* "PDSim/scroll/common_scroll_geo.pyx":62
 *         A_line_1 = 0.5*(x_1*y_2 - x_2*y_1)
 *     A_o = 0.5*(Gr(inv.Inner.phi_min, geo, theta, inv.Inner.involute) - Gr(inv.Inner.phi_max, geo, theta, inv.Inner.involute))
 *     if inv.has_line_2:             # <<<<<<<<<<<<<<
 *         _coords_inv_d_int(inv.Inner.phi_min, geo, theta, inv.Inner.involute, &x_1, &y_1)
 *         _coords_inv_d_int(inv.Outer.phi_min, geo, theta, inv.Outer.involute, &x_2, &y_2)
 */
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":67
 *         A_line_2 = 0.5*(x_1*y_2 - x_2*y_1)
 * 
 *     V = geo.h*(A_i + A_line_1 + A_o + A_line_2)             # <<<<<<<<<<<<<<
 * 
 *     ## ------------------------ DERIVATIVE -------------------------------
 */
  __pyx_v_V = (__pyx_v_geo->h * (((__pyx_v_A_i + __pyx_v_A_line_1) + __pyx_v_A_o) + __pyx_v_A_line_2));

  /* "PDSim/scroll/common_scroll_geo.pyx":71
 *     ## ------------------------ DERIVATIVE -------------------------------
 * 
 *     dA_i_dtheta = 0.5*(dGr_dphi(inv.Outer.phi_max, geo, theta, inv.Outer.involute)*inv.Outer.dphi_max_dtheta             # <<<<<<<<<<<<<<
 *                       +dGr_dtheta(inv.Outer.phi_max, geo, theta, inv.Outer.involute)
 *                       -dGr_dphi(inv.Outer.phi_min, geo, theta, inv.Outer.involute)*inv.Outer.dphi_min_dtheta
 */
  __pyx_v_dA_i_dtheta = (0.5 * ((((__pyx_f_5PDSim_6scroll_17common_scroll_geo_dGr_dphi(__pyx_v_inv->Outer->phi_max, __pyx_v_geo, __pyx_v_theta, __pyx_v_inv->Outer->involute, 0) * __pyx_v_inv->Outer->dphi_max_dtheta) + __pyx_f_5PDSim_6scroll_17common_scroll_geo_dGr_dtheta(__pyx_v_inv->Outer->phi_max, __pyx_v_geo, __pyx_v_theta, __pyx_v_inv->Outer->involute, 0)) - (__pyx_f_5PDSim_6scroll_17common_scroll_geo_dGr_dphi(__pyx_v_inv->Outer->phi_min, __pyx_v_geo, __pyx_v_theta, __pyx_v_inv->Outer->involute, 0) * __pyx_v_inv->Outer->dphi_min_dtheta)) - __pyx_f_5PDSim_6scroll_17common_scroll_geo_dGr_dtheta(__pyx_v_inv->Outer->phi_min, __pyx_v_geo, __pyx_v_theta, __pyx_v_inv->Outer->involute, 0)));

  /* "PDSim/scroll/common_scroll_geo.pyx":77
 *                       )
 * 
 *     if inv.has_line_1:             # <<<<<<<<<<<<<<
 *         coords_inv_dtheta(inv.Outer.phi_max, geo, theta, inv.Outer.involute, &dx_1_dtheta, &dy_1_dtheta)
 *         coords_inv_dtheta(inv.Inner.phi_max, geo, theta, inv.Inner.involute, &dx_2_dtheta, &dy_2_dtheta)
 */
  __pyx_t_1 = (__pyx_v_inv->has_line_1 != 0);
  if (__pyx_t_1) {

    /* "PDSim/scroll/common_scroll_geo.pyx":78
 * 
 *     if inv.has_line_1:
 *         coords_inv_dtheta(inv.Outer.phi_max, geo, theta, inv.Outer.involute, &dx_1_dtheta, &dy_1_dtheta)             # <<<<<<<<<<<<<<
 *         coords_inv_dtheta(inv.Inner.phi_max, geo, theta, inv.Inner.involute, &dx_2_dtheta, &dy_2_dtheta)
 *         _dcoords_inv_dphi_int(inv.Outer.phi_max, geo, theta, inv.Outer.involute, &dx_1_dphi, &dy_1_dphi)
 */
    __pyx_t_2 = __pyx_f_5PDSim_6scroll_17common_scroll_geo_coords_inv_dtheta(__pyx_v_inv->Outer->phi_max, __pyx_v_geo, __pyx_v_theta, __pyx_v_inv->Outer->involute, (&__pyx_v_dx_1_dtheta), (&__pyx_v_dy_1_dtheta)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 78, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "PDSim/scroll/common_scroll_geo.pyx":79
 *     if inv.has_line_1:
 *         coords_inv_dtheta(inv.Outer.phi_max, geo, theta, inv.Outer.involute, &dx_1_dtheta, &dy_1_dtheta)
 *         coords_inv_dtheta(inv.Inner.phi_max, geo, theta, inv.Inner.involute, &dx_2_dtheta, &dy_2_dtheta)             # <<<<<<<<<<<<<<
 *         _dcoords_inv_dphi_int(inv.Outer.phi_max, geo, theta, inv.Outer.involute, &dx_1_dphi, &dy_1_dphi)
 *         dx_1_dtheta += dx_1_dphi*inv.Outer.dphi_max_dtheta
 */
    __pyx_t_2 = __pyx_f_5PDSim_6scroll_17common_scroll_geo_coords_inv_dtheta(__pyx_v_inv->Inner->phi_max, __pyx_v_geo, __pyx_v_theta, __pyx_v_inv->Inner->involute, (&__pyx_v_dx_2_dtheta), (&__pyx_v_dy_2_dtheta)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 79, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "PDSim/scroll/common_scroll_geo.pyx":80
 *         coords_inv_dtheta(inv.Outer.phi_max, geo, theta, inv.Outer.involute, &dx_1_dtheta, &dy_1_dtheta)
 *         coords_inv_dtheta(inv.Inner.phi_max, geo, theta, inv.Inner.involute, &dx_2_dtheta, &dy_2_dtheta)
 *         _dcoords_inv_dphi_int(inv.Outer.phi_max, geo, theta, inv.Outer.involute, &dx_1_dphi, &dy_1_dphi)             # <<<<<<<<<<<<<<
 *         dx_1_dtheta += dx_1_dphi*inv.Outer.dphi_max_dtheta
 *         dy_1_dtheta += dy_1_dphi*inv.Outer.dphi_max_dtheta
 */
    __pyx_t_2 = __pyx_f_5PDSim_6scroll_17common_scroll_geo__dcoords_inv_dphi_int(__pyx_v_inv->Outer->phi_max, __pyx_v_geo, __pyx_v_theta, __pyx_v_inv->Outer->involute, (&__pyx_v_dx_1_dphi), (&__pyx_v_dy_1_dphi)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "PDSim/scroll/common_scroll_geo.pyx":81
 *         coords_inv_dtheta(inv.Inner.phi_max, geo, theta, inv.Inner.involute, &dx_2_dtheta, &dy_2_dtheta)
 *         _dcoords_inv_dphi_int(inv.Outer.phi_max, geo, theta, inv.Outer.involute, &dx_1_dphi, &dy_1_dphi)
 *         dx_1_dtheta += dx_1_dphi*inv.Outer.dphi_max_dtheta             # <<<<<<<<<<<<<<
 *         dy_1_dtheta += dy_1_dphi*inv.Outer.dphi_max_dtheta
 *         _dcoords_inv_dphi_int(inv.Inner.phi_max, geo, theta, inv.Inner.involute, &dx_2_dphi, &dy_2_dphi)
 */
    __pyx_v_dx_1_dtheta = (__pyx_v_dx_1_dtheta + (__pyx_v_dx_1_dphi * __pyx_v_inv->Outer->dphi_max_dtheta));

    /* "PDSim/scroll/common_scroll_geo.pyx":82
 *         _dcoords_inv_dphi_int(inv.Outer.phi_max, geo, theta, inv.Outer.involute, &dx_1_dphi, &dy_1_dphi)
 *         dx_1_dtheta += dx_1_dphi*inv.Outer.dphi_max_dtheta
 *         dy_1_dtheta += dy_1_dphi*inv.Outer.dphi_max_dtheta             # <<<<<<<<<<<<<<
 *         _dcoords_inv_dphi_int(inv.Inner.phi_max, geo, theta, inv.Inner.involute, &dx_2_dphi, &dy_2_dphi)
 *         dx_2_dtheta += dx_2_dphi*inv.Inner.dphi_max_dtheta
 */
    __pyx_v_dy_1_dtheta = (__pyx_v_dy_1_dtheta + (__pyx_v_dy_1_dphi * __pyx_v_inv->Outer->dphi_max_dtheta));

    /* "PDSim/scroll/common_scroll_geo.pyx":83
 *         dx_1_dtheta += dx_1_dphi*inv.Outer.dphi_max_dtheta
 *         dy_1_dtheta += dy_1_dphi*inv.Outer.dphi_max_dtheta
 *         _dcoords_inv_dphi_int(inv.Inner.phi_max, geo, theta, inv.Inner.involute, &dx_2_dphi, &dy_2_dphi)             # <<<<<<<<<<<<<<
 *         dx_2_dtheta += dx_2_dphi*inv.Inner.dphi_max_dtheta
 *         dy_2_dtheta += dy_2_dphi*inv.Inner.dphi_max_dtheta
 */
    __pyx_t_2 = __pyx_f_5PDSim_6scroll_17common_scroll_geo__dcoords_inv_dphi_int(__pyx_v_inv->Inner->phi_max, __pyx_v_geo, __pyx_v_theta, __pyx_v_inv->Inner->involute, (&__pyx_v_dx_2_dphi), (&__pyx_v_dy_2_dphi)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 83, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "PDSim/scroll/common_scroll_geo.pyx":84
 *         dy_1_dtheta += dy_1_dphi*inv.Outer.dphi_max_dtheta
 *         _dcoords_inv_dphi_int(inv.Inner.phi_max, geo, theta, inv.Inner.involute, &dx_2_dphi, &dy_2_dphi)
 *         dx_2_dtheta += dx_2_dphi*inv.Inner.dphi_max_dtheta             # <<<<<<<<<<<<<<
 *         dy_2_dtheta += dy_2_dphi*inv.Inner.dphi_max_dtheta
 *         dA_line_1_dtheta = 0.5*(x_1*dy_2_dtheta + y_2*dx_1_dtheta - x_2*dy_1_dtheta - y_1*dx_2_dtheta)
 */
    __pyx_v_dx_2_dtheta = (__pyx_v_dx_2_dtheta + (__pyx_v_dx_2_dphi * __pyx_v_inv->Inner->dphi_max_dtheta));

    /* "PDSim/scroll/common_scroll_geo.pyx":85
 *         _dcoords_inv_dphi_int(inv.Inner.phi_max, geo, theta, inv.Inner.involute, &dx_2_dphi, &dy_2_dphi)
 *         dx_2_dtheta += dx_2_dphi*inv.Inner.dphi_max_dtheta
 *         dy_2_dtheta += dy_2_dphi*inv.Inner.dphi_max_dtheta             # <<<<<<<<<<<<<<
 *         dA_line_1_dtheta = 0.5*(x_1*dy_2_dtheta + y_2*dx_1_dtheta - x_2*dy_1_dtheta - y_1*dx_2_dtheta)
 * 
 */
    __pyx_v_dy_2_dtheta = (__pyx_v_dy_2_dtheta + (__pyx_v_dy_2_dphi * __pyx_v_inv->Inner->dphi_max_dtheta));

    /* "PDSim/scroll/common_scroll_geo.pyx":86
 *         dx_2_dtheta += dx_2_dphi*inv.Inner.dphi_max_dtheta
 *         dy_2_dtheta += dy_2_dphi*inv.Inner.dphi_max_dtheta
 *         dA_line_1_dtheta = 0.5*(x_1*dy_2_dtheta + y_2*dx_1_dtheta - x_2*dy_1_dtheta - y_1*dx_2_dtheta)             # <<<<<<<<<<<<<<
 * 
 *     dA_o_dtheta = 0.5*(dGr_dphi(inv.Inner.phi_min, geo, theta, inv.Inner.involute)*inv.Inner.dphi_min_dtheta
 */
    __pyx_v_dA_line_1_dtheta = (0.5 * ((((__pyx_v_x_1 * __pyx_v_dy_2_dtheta) + (__pyx_v_y_2 * __pyx_v_dx_1_dtheta)) - (__pyx_v_x_2 * __pyx_v_dy_1_dtheta)) - (__pyx_v_y_1 * __pyx_v_dx_2_dtheta)));

    /* "PDSim/scroll/common_scroll_geo.pyx":77
 *                       )
 * 
 *     if inv.has_line_1:             # <<<<<<<<<<<<<<
 *         coords_inv_dtheta(inv.Outer.phi_max, geo, theta, inv.Outer.involute, &dx_1_dtheta, &dy_1_dtheta)
 *         coords_inv_dtheta(inv.Inner.phi_max, geo, theta, inv.Inner.involute, &dx_2_dtheta, &dy_2_dtheta)
 */
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":88
 *         dA_line_1_dtheta = 0.5*(x_1*dy_2_dtheta + y_2*dx_1_dtheta - x_2*dy_1_dtheta - y_1*dx_2_dtheta)
 * 
 *     dA_o_dtheta = 0.5*(dGr_dphi(inv.Inner.phi_min, geo, theta, inv.Inner.involute)*inv.Inner.dphi_min_dtheta             # <<<<<<<<<<<<<<
 *                        +dGr_dtheta(inv.Inner.phi_min, geo, theta, inv.Inner.involute)
 *                        -dGr_dphi(inv.Inner.phi_max, geo, theta, inv.Inner.involute)*inv.Inner.dphi_max_dtheta
 */
  __pyx_v_dA_o_dtheta = (0.5 * ((((__pyx_f_5PDSim_6scroll_17common_scroll_geo_dGr_dphi(__pyx_v_inv->Inner->phi_min, __pyx_v_geo, __pyx_v_theta, __pyx_v_inv->Inner->involute, 0) * __pyx_v_inv->Inner->dphi_min_dtheta) + __pyx_f_5PDSim_6scroll_17common_scroll_geo_dGr_dtheta(__pyx_v_inv->Inner->phi_min, __pyx_v_geo, __pyx_v_theta, __pyx_v_inv->Inner->involute, 0)) - (__pyx_f_5PDSim_6scroll_17common_scroll_geo_dGr_dphi(__pyx_v_inv->Inner->phi_max, __pyx_v_geo, __pyx_v_theta, __pyx_v_inv->Inner->involute, 0) * __pyx_v_inv->Inner->dphi_max_dtheta)) - __pyx_f_5PDSim_6scroll_17common_scroll_geo_dGr_dtheta(__pyx_v_inv->Inner->phi_max, __pyx_v_geo, __pyx_v_theta, __pyx_v_inv->Inner->involute, 0)));

  /* "PDSim/scroll/common_scroll_geo.pyx":94
 *                        )
 * 
 *     if inv.has_line_2:             # <<<<<<<<<<<<<<
 *         coords_inv_dtheta(inv.Inner.phi_min, geo, theta, inv.Inner.involute, &dx_1_dtheta, &dy_1_dtheta)
 *         coords_inv_dtheta(inv.Outer.phi_min, geo, theta, inv.Outer.involute, &dx_2_dtheta, &dy_2_dtheta)
 */
  __pyx_t_1 = (__pyx_v_inv->has_line_2 != 0);
  if (__pyx_t_1) {

    /* "PDSim/scroll/common_scroll_geo.pyx":95
 * 
 *     if inv.has_line_2:
 *         coords_inv_dtheta(inv.Inner.phi_min, geo, theta, inv.Inner.involute, &dx_1_dtheta, &dy_1_dtheta)             # <<<<<<<<<<<<<<
 *         coords_inv_dtheta(inv.Outer.phi_min, geo, theta, inv.Outer.involute, &dx_2_dtheta, &dy_2_dtheta)
 * 
 */
    __pyx_t_2 = __pyx_f_5PDSim_6scroll_17common_scroll_geo_coords_inv_dtheta(__pyx_v_inv->Inner->phi_min, __pyx_v_geo, __pyx_v_theta, __pyx_v_inv->Inner->involute, (&__pyx_v_dx_1_dtheta), (&__pyx_v_dy_1_dtheta)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 95, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "PDSim/scroll/common_scroll_geo.pyx":96
 *     if inv.has_line_2:
 *         coords_inv_dtheta(inv.Inner.phi_min, geo, theta, inv.Inner.involute, &dx_1_dtheta, &dy_1_dtheta)
 *         coords_inv_dtheta(inv.Outer.phi_min, geo, theta, inv.Outer.involute, &dx_2_dtheta, &dy_2_dtheta)             # <<<<<<<<<<<<<<
 * 
 *         _dcoords_inv_dphi_int(inv.Inner.phi_min, geo, theta, inv.Inner.involute, &dx_1_dphi, &dy_1_dphi)
 */
    __pyx_t_2 = __pyx_f_5PDSim_6scroll_17common_scroll_geo_coords_inv_dtheta(__pyx_v_inv->Outer->phi_min, __pyx_v_geo, __pyx_v_theta, __pyx_v_inv->Outer->involute, (&__pyx_v_dx_2_dtheta), (&__pyx_v_dy_2_dtheta)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 96, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "PDSim/scroll/common_scroll_geo.pyx":98
 *         coords_inv_dtheta(inv.Outer.phi_min, geo, theta, inv.Outer.involute, &dx_2_dtheta, &dy_2_dtheta)
 * 
 *         _dcoords_inv_dphi_int(inv.Inner.phi_min, geo, theta, inv.Inner.involute, &dx_1_dphi, &dy_1_dphi)             # <<<<<<<<<<<<<<
 *         dx_1_dtheta += dx_1_dphi*inv.Inner.dphi_min_dtheta
 *         dy_1_dtheta += dy_1_dphi*inv.Inner.dphi_min_dtheta
 */
    __pyx_t_2 = __pyx_f_5PDSim_6scroll_17common_scroll_geo__dcoords_inv_dphi_int(__pyx_v_inv->Inner->phi_min, __pyx_v_geo, __pyx_v_theta, __pyx_v_inv->Inner->involute, (&__pyx_v_dx_1_dphi), (&__pyx_v_dy_1_dphi)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 98, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "PDSim/scroll/common_scroll_geo.pyx":99
 * 
 *         _dcoords_inv_dphi_int(inv.Inner.phi_min, geo, theta, inv.Inner.involute, &dx_1_dphi, &dy_1_dphi)
 *         dx_1_dtheta += dx_1_dphi*inv.Inner.dphi_min_dtheta             # <<<<<<<<<<<<<<
 *         dy_1_dtheta += dy_1_dphi*inv.Inner.dphi_min_dtheta
 *         _dcoords_inv_dphi_int(inv.Outer.phi_min, geo, theta, inv.Outer.involute, &dx_2_dphi, &dy_2_dphi)
 */
    __pyx_v_dx_1_dtheta = (__pyx_v_dx_1_dtheta + (__pyx_v_dx_1_dphi * __pyx_v_inv->Inner->dphi_min_dtheta));

    /* "PDSim/scroll/common_scroll_geo.pyx":100
 *         _dcoords_inv_dphi_int(inv.Inner.phi_min, geo, theta, inv.Inner.involute, &dx_1_dphi, &dy_1_dphi)
 *         dx_1_dtheta += dx_1_dphi*inv.Inner.dphi_min_dtheta
 *         dy_1_dtheta += dy_1_dphi*inv.Inner.dphi_min_dtheta             # <<<<<<<<<<<<<<
 *         _dcoords_inv_dphi_int(inv.Outer.phi_min, geo, theta, inv.Outer.involute, &dx_2_dphi, &dy_2_dphi)
 *         dx_2_dtheta += dx_2_dphi*inv.Outer.dphi_min_dtheta
 */
    __pyx_v_dy_1_dtheta = (__pyx_v_dy_1_dtheta + (__pyx_v_dy_1_dphi * __pyx_v_inv->Inner->dphi_min_dtheta));

    /* "PDSim/scroll/common_scroll_geo.pyx":101
 *         dx_1_dtheta += dx_1_dphi*inv.Inner.dphi_min_dtheta
 *         dy_1_dtheta += dy_1_dphi*inv.Inner.dphi_min_dtheta
 *         _dcoords_inv_dphi_int(inv.Outer.phi_min, geo, theta, inv.Outer.involute, &dx_2_dphi, &dy_2_dphi)             # <<<<<<<<<<<<<<
 *         dx_2_dtheta += dx_2_dphi*inv.Outer.dphi_min_dtheta
 *         dy_2_dtheta += dy_2_dphi*inv.Outer.dphi_min_dtheta
 */
    __pyx_t_2 = __pyx_f_5PDSim_6scroll_17common_scroll_geo__dcoords_inv_dphi_int(__pyx_v_inv->Outer->phi_min, __pyx_v_geo, __pyx_v_theta, __pyx_v_inv->Outer->involute, (&__pyx_v_dx_2_dphi), (&__pyx_v_dy_2_dphi)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 101, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "PDSim/scroll/common_scroll_geo.pyx":102
 *         dy_1_dtheta += dy_1_dphi*inv.Inner.dphi_min_dtheta
 *         _dcoords_inv_dphi_int(inv.Outer.phi_min, geo, theta, inv.Outer.involute, &dx_2_dphi, &dy_2_dphi)
 *         dx_2_dtheta += dx_2_dphi*inv.Outer.dphi_min_dtheta             # <<<<<<<<<<<<<<
 *         dy_2_dtheta += dy_2_dphi*inv.Outer.dphi_min_dtheta
 * 
 */
    __pyx_v_dx_2_dtheta = (__pyx_v_dx_2_dtheta + (__pyx_v_dx_2_dphi * __pyx_v_inv->Outer->dphi_min_dtheta));

    /* "PDSim/scroll/common_scroll_geo.pyx":103
 *         _dcoords_inv_dphi_int(inv.Outer.phi_min, geo, theta, inv.Outer.involute, &dx_2_dphi, &dy_2_dphi)
 *         dx_2_dtheta += dx_2_dphi*inv.Outer.dphi_min_dtheta
 *         dy_2_dtheta += dy_2_dphi*inv.Outer.dphi_min_dtheta             # <<<<<<<<<<<<<<
 * 
 *         dA_line_2_dtheta = 0.5*(x_1*dy_2_dtheta + y_2*dx_1_dtheta - x_2*dy_1_dtheta - y_1*dx_2_dtheta)
 */
    __pyx_v_dy_2_dtheta = (__pyx_v_dy_2_dtheta + (__pyx_v_dy_2_dphi * __pyx_v_inv->Outer->dphi_min_dtheta));

    /* "PDSim/scroll/common_scroll_geo.pyx":105
 *         dy_2_dtheta += dy_2_dphi*inv.Outer.dphi_min_dtheta
 * 
 *         dA_line_2_dtheta = 0.5*(x_1*dy_2_dtheta + y_2*dx_1_dtheta - x_2*dy_1_dtheta - y_1*dx_2_dtheta)             # <<<<<<<<<<<<<<
 * 
 *     dV = geo.h*(dA_i_dtheta + dA_line_1_dtheta + dA_o_dtheta + dA_line_2_dtheta)
 */
    __pyx_v_dA_line_2_dtheta = (0.5 * ((((__pyx_v_x_1 * __pyx_v_dy_2_dtheta) + (__pyx_v_y_2 * __pyx_v_dx_1_dtheta)) - (__pyx_v_x_2 * __pyx_v_dy_1_dtheta)) - (__pyx_v_y_1 * __pyx_v_dx_2_dtheta)));

    /* "PDSim/scroll/common_scroll_geo.pyx":94
 *                        )
 * 
 *     if inv.has_line_2:             # <<<<<<<<<<<<<<
 *         coords_inv_dtheta(inv.Inner.phi_min, geo, theta, inv.Inner.involute, &dx_1_dtheta, &dy_1_dtheta)
 *         coords_inv_dtheta(inv.Outer.phi_min, geo, theta, inv.Outer.involute, &dx_2_dtheta, &dy_2_dtheta)
 */
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":107
 *         dA_line_2_dtheta = 0.5*(x_1*dy_2_dtheta + y_2*dx_1_dtheta - x_2*dy_1_dtheta - y_1*dx_2_dtheta)
 * 
 *     dV = geo.h*(dA_i_dtheta + dA_line_1_dtheta + dA_o_dtheta + dA_line_2_dtheta)             # <<<<<<<<<<<<<<
 * 
 *     cdef VdVstruct VdV = VdVstruct.__new__(VdVstruct)
 */
  __pyx_v_dV = (__pyx_v_geo->h * (((__pyx_v_dA_i_dtheta + __pyx_v_dA_line_1_dtheta) + __pyx_v_dA_o_dtheta) + __pyx_v_dA_line_2_dtheta));

  /* "PDSim/scroll/common_scroll_geo.pyx":109
 *     dV = geo.h*(dA_i_dtheta + dA_line_1_dtheta + dA_o_dtheta + dA_line_2_dtheta)
 * 
 *     cdef VdVstruct VdV = VdVstruct.__new__(VdVstruct)             # <<<<<<<<<<<<<<
 *     VdV.V = V
 *     VdV.dV = dV
 */
  __pyx_t_2 = ((PyObject *)__pyx_tp_new_5PDSim_6scroll_17common_scroll_geo_VdVstruct(((PyTypeObject *)__pyx_ptype_5PDSim_6scroll_17common_scroll_geo_VdVstruct), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 109, __pyx_L1_error)
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_v_VdV = ((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_VdVstruct *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "PDSim/scroll/common_scroll_geo.pyx":110
 * 
 *     cdef VdVstruct VdV = VdVstruct.__new__(VdVstruct)
 *     VdV.V = V             # <<<<<<<<<<<<<<
 *     VdV.dV = dV
 *     return VdV
 */
  __pyx_v_VdV->V = __pyx_v_V;

  /* "PDSim/scroll/common_scroll_geo.pyx":111
 *     cdef VdVstruct VdV = VdVstruct.__new__(VdVstruct)
 *     VdV.V = V
 *     VdV.dV = dV             # <<<<<<<<<<<<<<
 *     return VdV
 * 
 */
  __pyx_v_VdV->dV = __pyx_v_dV;

  /* "PDSim/scroll/common_scroll_geo.pyx":112
 *     VdV.V = V
 *     VdV.dV = dV
 *     return VdV             # <<<<<<<<<<<<<<
 * 
 * cpdef dict forces(double theta, geoVals geo, CVInvolutes inv, double A):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_VdV));
  __pyx_r = __pyx_v_VdV;
  goto __pyx_L0;

  /* "PDSim/scroll/common_scroll_geo.pyx":47
 *         return s
 * 
 * cpdef VdVstruct VdV(double theta, geoVals geo, CVInvolutes inv):             # <<<<<<<<<<<<<<
 *     """
 *     Evaluate V and dV/dtheta in a generalized manner for a chamber
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.VdV", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_VdV);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7VdV(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5PDSim_6scroll_17common_scroll_geo_6VdV[] = "VdV(double theta, geoVals geo, CVInvolutes inv) -> VdVstruct\n\n    Evaluate V and dV/dtheta in a generalized manner for a chamber\n    ";
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7VdV(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_theta;
  struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo = 0;
  struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *__pyx_v_inv = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("VdV (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_theta,&__pyx_n_s_geo,&__pyx_n_s_inv,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_theta)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_geo)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("VdV", 1, 3, 3, 1); __PYX_ERR(0, 47, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inv)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("VdV", 1, 3, 3, 2); __PYX_ERR(0, 47, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "VdV") < 0)) __PYX_ERR(0, 47, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_theta = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_theta == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 47, __pyx_L3_error)
    __pyx_v_geo = ((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)values[1]);
    __pyx_v_inv = ((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *)values[2]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("VdV", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 47, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.VdV", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_geo), __pyx_ptype_5PDSim_6scroll_17common_scroll_geo_geoVals, 1, "geo", 0))) __PYX_ERR(0, 47, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_inv), __pyx_ptype_5PDSim_6scroll_17common_scroll_geo_CVInvolutes, 1, "inv", 0))) __PYX_ERR(0, 47, __pyx_L1_error)
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_6VdV(__pyx_self, __pyx_v_theta, __pyx_v_geo, __pyx_v_inv);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_6VdV(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_theta, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *__pyx_v_inv) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("VdV", 0);
  __Pyx_TraceCall("VdV (wrapper)", __pyx_f[0], 47, 0, __PYX_ERR(0, 47, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_5PDSim_6scroll_17common_scroll_geo_VdV(__pyx_v_theta, __pyx_v_geo, __pyx_v_inv, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.VdV", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pyx":114
 *     return VdV
 * 
 * cpdef dict forces(double theta, geoVals geo, CVInvolutes inv, double A):             # <<<<<<<<<<<<<<
 *     """
 *     Evaluate the force terms for a control volume
 */

static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_9forces(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_5PDSim_6scroll_17common_scroll_geo_forces(double __pyx_v_theta, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *__pyx_v_inv, double __pyx_v_A, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_v_xA_line_1;
  double __pyx_v_xA_line_2;
  double __pyx_v_yA_line_1;
  double __pyx_v_yA_line_2;
  double __pyx_v_x_1;
  double __pyx_v_x_2;
  double __pyx_v_y_1;
  double __pyx_v_y_2;
  struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *__pyx_v_orbiting_scroll_involute = 0;
  double __pyx_v_xA_outer;
  double __pyx_v_yA_outer;
  double __pyx_v_xA_inner;
  double __pyx_v_yA_inner;
  double __pyx_v_cx;
  double __pyx_v_cy;
  double __pyx_v_fx_p;
  double __pyx_v_fy_p;
  double __pyx_v_M_O_p;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  double __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("forces", 0);
  __Pyx_TraceCall("forces", __pyx_f[0], 114, 0, __PYX_ERR(0, 114, __pyx_L1_error));

  /* "PDSim/scroll/common_scroll_geo.pyx":118
 *     Evaluate the force terms for a control volume
 *     """
 *     cdef double xA_line_1 = 0, xA_line_2 = 0, yA_line_1 = 0, yA_line_2 = 0,             # <<<<<<<<<<<<<<
 *     cdef double x_1 = 0, x_2 = 0, y_1 = 0, y_2 = 0
 *     cdef CVInvolute orbiting_scroll_involute
 */
  __pyx_v_xA_line_1 = 0.0;
  __pyx_v_xA_line_2 = 0.0;
  __pyx_v_yA_line_1 = 0.0;
  __pyx_v_yA_line_2 = 0.0;

  /* "PDSim/scroll/common_scroll_geo.pyx":119
 *     """
 *     cdef double xA_line_1 = 0, xA_line_2 = 0, yA_line_1 = 0, yA_line_2 = 0,
 *     cdef double x_1 = 0, x_2 = 0, y_1 = 0, y_2 = 0             # <<<<<<<<<<<<<<
 *     cdef CVInvolute orbiting_scroll_involute
 * 
 */
  __pyx_v_x_1 = 0.0;
  __pyx_v_x_2 = 0.0;
  __pyx_v_y_1 = 0.0;
  __pyx_v_y_2 = 0.0;

  /* "PDSim/scroll/common_scroll_geo.pyx":124
 *     ## ------------------------ FORCE CENTROID -------------------------------
 * 
 *     xA_outer = fxA(inv.Outer.phi_max, geo, theta, inv.Outer.involute) - fxA(inv.Outer.phi_min, geo, theta, inv.Outer.involute)             # <<<<<<<<<<<<<<
 *     yA_outer = fyA(inv.Outer.phi_max, geo, theta, inv.Outer.involute) - fyA(inv.Outer.phi_min, geo, theta, inv.Outer.involute)
 *     if inv.has_line_1:
 */
  __pyx_v_xA_outer = (__pyx_f_5PDSim_6scroll_17common_scroll_geo_fxA(__pyx_v_inv->Outer->phi_max, __pyx_v_geo, __pyx_v_theta, __pyx_v_inv->Outer->involute, 0) - __pyx_f_5PDSim_6scroll_17common_scroll_geo_fxA(__pyx_v_inv->Outer->phi_min, __pyx_v_geo, __pyx_v_theta, __pyx_v_inv->Outer->involute, 0));

  /* "PDSim/scroll/common_scroll_geo.pyx":125
 * 
 *     xA_outer = fxA(inv.Outer.phi_max, geo, theta, inv.Outer.involute) - fxA(inv.Outer.phi_min, geo, theta, inv.Outer.involute)
 *     yA_outer = fyA(inv.Outer.phi_max, geo, theta, inv.Outer.involute) - fyA(inv.Outer.phi_min, geo, theta, inv.Outer.involute)             # <<<<<<<<<<<<<<
 *     if inv.has_line_1:
 *         _coords_inv_d_int(inv.Outer.phi_max, geo, theta, inv.Outer.involute, &x_1, &y_1)
 */
  __pyx_v_yA_outer = (__pyx_f_5PDSim_6scroll_17common_scroll_geo_fyA(__pyx_v_inv->Outer->phi_max, __pyx_v_geo, __pyx_v_theta, __pyx_v_inv->Outer->involute, 0) - __pyx_f_5PDSim_6scroll_17common_scroll_geo_fyA(__pyx_v_inv->Outer->phi_min, __pyx_v_geo, __pyx_v_theta, __pyx_v_inv->Outer->involute, 0));

  /* "PDSim/scroll/common_scroll_geo.pyx":126
 *     xA_outer = fxA(inv.Outer.phi_max, geo, theta, inv.Outer.involute) - fxA(inv.Outer.phi_min, geo, theta, inv.Outer.involute)
 *     yA_outer = fyA(inv.Outer.phi_max, geo, theta, inv.Outer.involute) - fyA(inv.Outer.phi_min, geo, theta, inv.Outer.involute)
 *     if inv.has_line_1:             # <<<<<<<<<<<<<<
 *         _coords_inv_d_int(inv.Outer.phi_max, geo, theta, inv.Outer.involute, &x_1, &y_1)
 *         _coords_inv_d_int(inv.Inner.phi_max, geo, theta, inv.Inner.involute, &x_2, &y_2)
 */
  __pyx_t_1 = (__pyx_v_inv->has_line_1 != 0);
  if (__pyx_t_1) {

    /* "PDSim/scroll/common_scroll_geo.pyx":127
 *     yA_outer = fyA(inv.Outer.phi_max, geo, theta, inv.Outer.involute) - fyA(inv.Outer.phi_min, geo, theta, inv.Outer.involute)
 *     if inv.has_line_1:
 *         _coords_inv_d_int(inv.Outer.phi_max, geo, theta, inv.Outer.involute, &x_1, &y_1)             # <<<<<<<<<<<<<<
 *         _coords_inv_d_int(inv.Inner.phi_max, geo, theta, inv.Inner.involute, &x_2, &y_2)
 *         xA_line_1 = -(y_1 - y_2)*(x_1**2 + x_1*x_2 + x_2**2)/6
 */
    __pyx_t_2 = __pyx_f_5PDSim_6scroll_17common_scroll_geo__coords_inv_d_int(__pyx_v_inv->Outer->phi_max, __pyx_v_geo, __pyx_v_theta, __pyx_v_inv->Outer->involute, (&__pyx_v_x_1), (&__pyx_v_y_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 127, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "PDSim/scroll/common_scroll_geo.pyx":128
 *     if inv.has_line_1:
 *         _coords_inv_d_int(inv.Outer.phi_max, geo, theta, inv.Outer.involute, &x_1, &y_1)
 *         _coords_inv_d_int(inv.Inner.phi_max, geo, theta, inv.Inner.involute, &x_2, &y_2)             # <<<<<<<<<<<<<<
 *         xA_line_1 = -(y_1 - y_2)*(x_1**2 + x_1*x_2 + x_2**2)/6
 *         yA_line_1 = -(y_1 - y_2)*(2*x_1*y_1 + x_1*y_2 + x_2*y_1 + 2*x_2*y_2)/6
 */
    __pyx_t_2 = __pyx_f_5PDSim_6scroll_17common_scroll_geo__coords_inv_d_int(__pyx_v_inv->Inner->phi_max, __pyx_v_geo, __pyx_v_theta, __pyx_v_inv->Inner->involute, (&__pyx_v_x_2), (&__pyx_v_y_2)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 128, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "PDSim/scroll/common_scroll_geo.pyx":129
 *         _coords_inv_d_int(inv.Outer.phi_max, geo, theta, inv.Outer.involute, &x_1, &y_1)
 *         _coords_inv_d_int(inv.Inner.phi_max, geo, theta, inv.Inner.involute, &x_2, &y_2)
 *         xA_line_1 = -(y_1 - y_2)*(x_1**2 + x_1*x_2 + x_2**2)/6             # <<<<<<<<<<<<<<
 *         yA_line_1 = -(y_1 - y_2)*(2*x_1*y_1 + x_1*y_2 + x_2*y_1 + 2*x_2*y_2)/6
 *     xA_inner = fxA(inv.Inner.phi_min, geo, theta, inv.Inner.involute) - fxA(inv.Inner.phi_max, geo, theta, inv.Inner.involute)
 */
    __pyx_v_xA_line_1 = (((-(__pyx_v_y_1 - __pyx_v_y_2)) * ((pow(__pyx_v_x_1, 2.0) + (__pyx_v_x_1 * __pyx_v_x_2)) + pow(__pyx_v_x_2, 2.0))) / 6.0);

    /* "PDSim/scroll/common_scroll_geo.pyx":130
 *         _coords_inv_d_int(inv.Inner.phi_max, geo, theta, inv.Inner.involute, &x_2, &y_2)
 *         xA_line_1 = -(y_1 - y_2)*(x_1**2 + x_1*x_2 + x_2**2)/6
 *         yA_line_1 = -(y_1 - y_2)*(2*x_1*y_1 + x_1*y_2 + x_2*y_1 + 2*x_2*y_2)/6             # <<<<<<<<<<<<<<
 *     xA_inner = fxA(inv.Inner.phi_min, geo, theta, inv.Inner.involute) - fxA(inv.Inner.phi_max, geo, theta, inv.Inner.involute)
 *     yA_inner = fyA(inv.Inner.phi_min, geo, theta, inv.Inner.involute) - fyA(inv.Inner.phi_max, geo, theta, inv.Inner.involute)
 */
    __pyx_v_yA_line_1 = (((-(__pyx_v_y_1 - __pyx_v_y_2)) * (((((2.0 * __pyx_v_x_1) * __pyx_v_y_1) + (__pyx_v_x_1 * __pyx_v_y_2)) + (__pyx_v_x_2 * __pyx_v_y_1)) + ((2.0 * __pyx_v_x_2) * __pyx_v_y_2))) / 6.0);

    /* "PDSim/scroll/common_scroll_geo.pyx":126
 *     xA_outer = fxA(inv.Outer.phi_max, geo, theta, inv.Outer.involute) - fxA(inv.Outer.phi_min, geo, theta, inv.Outer.involute)
 *     yA_outer = fyA(inv.Outer.phi_max, geo, theta, inv.Outer.involute) - fyA(inv.Outer.phi_min, geo, theta, inv.Outer.involute)
 *     if inv.has_line_1:             # <<<<<<<<<<<<<<
 *         _coords_inv_d_int(inv.Outer.phi_max, geo, theta, inv.Outer.involute, &x_1, &y_1)
 *         _coords_inv_d_int(inv.Inner.phi_max, geo, theta, inv.Inner.involute, &x_2, &y_2)
 */
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":131
 *         xA_line_1 = -(y_1 - y_2)*(x_1**2 + x_1*x_2 + x_2**2)/6
 *         yA_line_1 = -(y_1 - y_2)*(2*x_1*y_1 + x_1*y_2 + x_2*y_1 + 2*x_2*y_2)/6
 *     xA_inner = fxA(inv.Inner.phi_min, geo, theta, inv.Inner.involute) - fxA(inv.Inner.phi_max, geo, theta, inv.Inner.involute)             # <<<<<<<<<<<<<<
 *     yA_inner = fyA(inv.Inner.phi_min, geo, theta, inv.Inner.involute) - fyA(inv.Inner.phi_max, geo, theta, inv.Inner.involute)
 *     if inv.has_line_2:
 */
  __pyx_v_xA_inner = (__pyx_f_5PDSim_6scroll_17common_scroll_geo_fxA(__pyx_v_inv->Inner->phi_min, __pyx_v_geo, __pyx_v_theta, __pyx_v_inv->Inner->involute, 0) - __pyx_f_5PDSim_6scroll_17common_scroll_geo_fxA(__pyx_v_inv->Inner->phi_max, __pyx_v_geo, __pyx_v_theta, __pyx_v_inv->Inner->involute, 0));

  /* "PDSim/scroll/common_scroll_geo.pyx":132
 *         yA_line_1 = -(y_1 - y_2)*(2*x_1*y_1 + x_1*y_2 + x_2*y_1 + 2*x_2*y_2)/6
 *     xA_inner = fxA(inv.Inner.phi_min, geo, theta, inv.Inner.involute) - fxA(inv.Inner.phi_max, geo, theta, inv.Inner.involute)
 *     yA_inner = fyA(inv.Inner.phi_min, geo, theta, inv.Inner.involute) - fyA(inv.Inner.phi_max, geo, theta, inv.Inner.involute)             # <<<<<<<<<<<<<<
 *     if inv.has_line_2:
 *         _coords_inv_d_int(inv.Inner.phi_min, geo, theta, inv.Inner.involute, &x_1, &y_1)
 */
  __pyx_v_yA_inner = (__pyx_f_5PDSim_6scroll_17common_scroll_geo_fyA(__pyx_v_inv->Inner->phi_min, __pyx_v_geo, __pyx_v_theta, __pyx_v_inv->Inner->involute, 0) - __pyx_f_5PDSim_6scroll_17common_scroll_geo_fyA(__pyx_v_inv->Inner->phi_max, __pyx_v_geo, __pyx_v_theta, __pyx_v_inv->Inner->involute, 0));

  /* "PDSim/scroll/common_scroll_geo.pyx":133
 *     xA_inner = fxA(inv.Inner.phi_min, geo, theta, inv.Inner.involute) - fxA(inv.Inner.phi_max, geo, theta, inv.Inner.involute)
 *     yA_inner = fyA(inv.Inner.phi_min, geo, theta, inv.Inner.involute) - fyA(inv.Inner.phi_max, geo, theta, inv.Inner.involute)
 *     if inv.has_line_2:             # <<<<<<<<<<<<<<
 *         _coords_inv_d_int(inv.Inner.phi_min, geo, theta, inv.Inner.involute, &x_1, &y_1)
 *         _coords_inv_d_int(inv.Outer.phi_min, geo, theta, inv.Outer.involute, &x_2, &y_2)
 */
  __pyx_t_1 = (__pyx_v_inv->has_line_2 != 0);
  if (__pyx_t_1) {

    /* "PDSim/scroll/common_scroll_geo.pyx":134
 *     yA_inner = fyA(inv.Inner.phi_min, geo, theta, inv.Inner.involute) - fyA(inv.Inner.phi_max, geo, theta, inv.Inner.involute)
 *     if inv.has_line_2:
 *         _coords_inv_d_int(inv.Inner.phi_min, geo, theta, inv.Inner.involute, &x_1, &y_1)             # <<<<<<<<<<<<<<
 *         _coords_inv_d_int(inv.Outer.phi_min, geo, theta, inv.Outer.involute, &x_2, &y_2)
 *         xA_line_2 = -(y_1 - y_2)*(x_1**2 + x_1*x_2 + x_2**2)/6
 */
    __pyx_t_2 = __pyx_f_5PDSim_6scroll_17common_scroll_geo__coords_inv_d_int(__pyx_v_inv->Inner->phi_min, __pyx_v_geo, __pyx_v_theta, __pyx_v_inv->Inner->involute, (&__pyx_v_x_1), (&__pyx_v_y_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 134, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "PDSim/scroll/common_scroll_geo.pyx":135
 *     if inv.has_line_2:
 *         _coords_inv_d_int(inv.Inner.phi_min, geo, theta, inv.Inner.involute, &x_1, &y_1)
 *         _coords_inv_d_int(inv.Outer.phi_min, geo, theta, inv.Outer.involute, &x_2, &y_2)             # <<<<<<<<<<<<<<
 *         xA_line_2 = -(y_1 - y_2)*(x_1**2 + x_1*x_2 + x_2**2)/6
 *         yA_line_2 = -(y_1 - y_2)*(2*x_1*y_1 + x_1*y_2 + x_2*y_1 + 2*x_2*y_2)/6
 */
    __pyx_t_2 = __pyx_f_5PDSim_6scroll_17common_scroll_geo__coords_inv_d_int(__pyx_v_inv->Outer->phi_min, __pyx_v_geo, __pyx_v_theta, __pyx_v_inv->Outer->involute, (&__pyx_v_x_2), (&__pyx_v_y_2)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 135, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "PDSim/scroll/common_scroll_geo.pyx":136
 *         _coords_inv_d_int(inv.Inner.phi_min, geo, theta, inv.Inner.involute, &x_1, &y_1)
 *         _coords_inv_d_int(inv.Outer.phi_min, geo, theta, inv.Outer.involute, &x_2, &y_2)
 *         xA_line_2 = -(y_1 - y_2)*(x_1**2 + x_1*x_2 + x_2**2)/6             # <<<<<<<<<<<<<<
 *         yA_line_2 = -(y_1 - y_2)*(2*x_1*y_1 + x_1*y_2 + x_2*y_1 + 2*x_2*y_2)/6
 * 
 */
    __pyx_v_xA_line_2 = (((-(__pyx_v_y_1 - __pyx_v_y_2)) * ((pow(__pyx_v_x_1, 2.0) + (__pyx_v_x_1 * __pyx_v_x_2)) + pow(__pyx_v_x_2, 2.0))) / 6.0);

    /* "PDSim/scroll/common_scroll_geo.pyx":137
 *         _coords_inv_d_int(inv.Outer.phi_min, geo, theta, inv.Outer.involute, &x_2, &y_2)
 *         xA_line_2 = -(y_1 - y_2)*(x_1**2 + x_1*x_2 + x_2**2)/6
 *         yA_line_2 = -(y_1 - y_2)*(2*x_1*y_1 + x_1*y_2 + x_2*y_1 + 2*x_2*y_2)/6             # <<<<<<<<<<<<<<
 * 
 *     cx = (xA_inner + xA_line_1 + xA_outer + xA_line_2)/A
 */
    __pyx_v_yA_line_2 = (((-(__pyx_v_y_1 - __pyx_v_y_2)) * (((((2.0 * __pyx_v_x_1) * __pyx_v_y_1) + (__pyx_v_x_1 * __pyx_v_y_2)) + (__pyx_v_x_2 * __pyx_v_y_1)) + ((2.0 * __pyx_v_x_2) * __pyx_v_y_2))) / 6.0);

    /* "PDSim/scroll/common_scroll_geo.pyx":133
 *     xA_inner = fxA(inv.Inner.phi_min, geo, theta, inv.Inner.involute) - fxA(inv.Inner.phi_max, geo, theta, inv.Inner.involute)
 *     yA_inner = fyA(inv.Inner.phi_min, geo, theta, inv.Inner.involute) - fyA(inv.Inner.phi_max, geo, theta, inv.Inner.involute)
 *     if inv.has_line_2:             # <<<<<<<<<<<<<<
 *         _coords_inv_d_int(inv.Inner.phi_min, geo, theta, inv.Inner.involute, &x_1, &y_1)
 *         _coords_inv_d_int(inv.Outer.phi_min, geo, theta, inv.Outer.involute, &x_2, &y_2)
 */
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":139
 *         yA_line_2 = -(y_1 - y_2)*(2*x_1*y_1 + x_1*y_2 + x_2*y_1 + 2*x_2*y_2)/6
 * 
 *     cx = (xA_inner + xA_line_1 + xA_outer + xA_line_2)/A             # <<<<<<<<<<<<<<
 *     cy = (yA_inner + yA_line_1 + yA_outer + yA_line_2)/A
 * 
 */
  __pyx_t_3 = (((__pyx_v_xA_inner + __pyx_v_xA_line_1) + __pyx_v_xA_outer) + __pyx_v_xA_line_2);
  if (unlikely(__pyx_v_A == 0)) {
    PyErr_SetString(PyExc_ZeroDivisionError, "float division");
    __PYX_ERR(0, 139, __pyx_L1_error)
  }
  __pyx_v_cx = (__pyx_t_3 / __pyx_v_A);

  /* "PDSim/scroll/common_scroll_geo.pyx":140
 * 
 *     cx = (xA_inner + xA_line_1 + xA_outer + xA_line_2)/A
 *     cy = (yA_inner + yA_line_1 + yA_outer + yA_line_2)/A             # <<<<<<<<<<<<<<
 * 
 *     # The forces we want here are the forces on the orbiting scroll, only one of the
 */
  __pyx_t_3 = (((__pyx_v_yA_inner + __pyx_v_yA_line_1) + __pyx_v_yA_outer) + __pyx_v_yA_line_2);
  if (unlikely(__pyx_v_A == 0)) {
    PyErr_SetString(PyExc_ZeroDivisionError, "float division");
    __PYX_ERR(0, 140, __pyx_L1_error)
  }
  __pyx_v_cy = (__pyx_t_3 / __pyx_v_A);

  /* "PDSim/scroll/common_scroll_geo.pyx":151
 *     # that inv.Inner.involute MUST be INVOLUTE_OO. In either case, the normal vector pointing TOWARDS
 *     # the scroll wrap is pointing in the correct direction
 *     if inv.Outer.involute == INVOLUTE_OI:             # <<<<<<<<<<<<<<
 *         orbiting_scroll_involute = inv.Outer
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_inv->Outer->involute == __pyx_e_5PDSim_6scroll_17common_scroll_geo_INVOLUTE_OI) != 0);
  if (__pyx_t_1) {

    /* "PDSim/scroll/common_scroll_geo.pyx":152
 *     # the scroll wrap is pointing in the correct direction
 *     if inv.Outer.involute == INVOLUTE_OI:
 *         orbiting_scroll_involute = inv.Outer             # <<<<<<<<<<<<<<
 *     else:
 *         orbiting_scroll_involute = inv.Inner
 */
    __pyx_t_2 = ((PyObject *)__pyx_v_inv->Outer);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v_orbiting_scroll_involute = ((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "PDSim/scroll/common_scroll_geo.pyx":151
 *     # that inv.Inner.involute MUST be INVOLUTE_OO. In either case, the normal vector pointing TOWARDS
 *     # the scroll wrap is pointing in the correct direction
 *     if inv.Outer.involute == INVOLUTE_OI:             # <<<<<<<<<<<<<<
 *         orbiting_scroll_involute = inv.Outer
 *     else:
 */
    goto __pyx_L5;
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":154
 *         orbiting_scroll_involute = inv.Outer
 *     else:
 *         orbiting_scroll_involute = inv.Inner             # <<<<<<<<<<<<<<
 * 
 *     # Calculate the force terms divided by the pressure acting on the orbiting scroll
 */
  /*else*/ {
    __pyx_t_2 = ((PyObject *)__pyx_v_inv->Inner);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v_orbiting_scroll_involute = ((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *)__pyx_t_2);
    __pyx_t_2 = 0;
  }
  __pyx_L5:;

  /* "PDSim/scroll/common_scroll_geo.pyx":157
 * 
 *     # Calculate the force terms divided by the pressure acting on the orbiting scroll
 *     fx_p = (fFx_p(orbiting_scroll_involute.phi_max, geo, theta, orbiting_scroll_involute.involute) - fFx_p(orbiting_scroll_involute.phi_min, geo, theta, orbiting_scroll_involute.involute))             # <<<<<<<<<<<<<<
 *     fy_p = (fFy_p(orbiting_scroll_involute.phi_max, geo, theta, orbiting_scroll_involute.involute) - fFy_p(orbiting_scroll_involute.phi_min, geo, theta, orbiting_scroll_involute.involute))
 *     M_O_p = (fMO_p(orbiting_scroll_involute.phi_max, geo, theta, orbiting_scroll_involute.involute) - fMO_p(orbiting_scroll_involute.phi_min, geo, theta, orbiting_scroll_involute.involute))
 */
  __pyx_v_fx_p = (__pyx_f_5PDSim_6scroll_17common_scroll_geo_fFx_p(__pyx_v_orbiting_scroll_involute->phi_max, __pyx_v_geo, __pyx_v_theta, __pyx_v_orbiting_scroll_involute->involute, 0) - __pyx_f_5PDSim_6scroll_17common_scroll_geo_fFx_p(__pyx_v_orbiting_scroll_involute->phi_min, __pyx_v_geo, __pyx_v_theta, __pyx_v_orbiting_scroll_involute->involute, 0));

  /* "PDSim/scroll/common_scroll_geo.pyx":158
 *     # Calculate the force terms divided by the pressure acting on the orbiting scroll
 *     fx_p = (fFx_p(orbiting_scroll_involute.phi_max, geo, theta, orbiting_scroll_involute.involute) - fFx_p(orbiting_scroll_involute.phi_min, geo, theta, orbiting_scroll_involute.involute))
 *     fy_p = (fFy_p(orbiting_scroll_involute.phi_max, geo, theta, orbiting_scroll_involute.involute) - fFy_p(orbiting_scroll_involute.phi_min, geo, theta, orbiting_scroll_involute.involute))             # <<<<<<<<<<<<<<
 *     M_O_p = (fMO_p(orbiting_scroll_involute.phi_max, geo, theta, orbiting_scroll_involute.involute) - fMO_p(orbiting_scroll_involute.phi_min, geo, theta, orbiting_scroll_involute.involute))
 * 
 */
  __pyx_v_fy_p = (__pyx_f_5PDSim_6scroll_17common_scroll_geo_fFy_p(__pyx_v_orbiting_scroll_involute->phi_max, __pyx_v_geo, __pyx_v_theta, __pyx_v_orbiting_scroll_involute->involute, 0) - __pyx_f_5PDSim_6scroll_17common_scroll_geo_fFy_p(__pyx_v_orbiting_scroll_involute->phi_min, __pyx_v_geo, __pyx_v_theta, __pyx_v_orbiting_scroll_involute->involute, 0));

  /* "PDSim/scroll/common_scroll_geo.pyx":159
 *     fx_p = (fFx_p(orbiting_scroll_involute.phi_max, geo, theta, orbiting_scroll_involute.involute) - fFx_p(orbiting_scroll_involute.phi_min, geo, theta, orbiting_scroll_involute.involute))
 *     fy_p = (fFy_p(orbiting_scroll_involute.phi_max, geo, theta, orbiting_scroll_involute.involute) - fFy_p(orbiting_scroll_involute.phi_min, geo, theta, orbiting_scroll_involute.involute))
 *     M_O_p = (fMO_p(orbiting_scroll_involute.phi_max, geo, theta, orbiting_scroll_involute.involute) - fMO_p(orbiting_scroll_involute.phi_min, geo, theta, orbiting_scroll_involute.involute))             # <<<<<<<<<<<<<<
 * 
 *     return dict(cx = cx,
 */
  __pyx_v_M_O_p = (__pyx_f_5PDSim_6scroll_17common_scroll_geo_fMO_p(__pyx_v_orbiting_scroll_involute->phi_max, __pyx_v_geo, __pyx_v_theta, __pyx_v_orbiting_scroll_involute->involute, 0) - __pyx_f_5PDSim_6scroll_17common_scroll_geo_fMO_p(__pyx_v_orbiting_scroll_involute->phi_min, __pyx_v_geo, __pyx_v_theta, __pyx_v_orbiting_scroll_involute->involute, 0));

  /* "PDSim/scroll/common_scroll_geo.pyx":161
 *     M_O_p = (fMO_p(orbiting_scroll_involute.phi_max, geo, theta, orbiting_scroll_involute.involute) - fMO_p(orbiting_scroll_involute.phi_min, geo, theta, orbiting_scroll_involute.involute))
 * 
 *     return dict(cx = cx,             # <<<<<<<<<<<<<<
 *                 cy = cy,
 *                 fz_p = A,
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_cx); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_cx, __pyx_t_4) < 0) __PYX_ERR(0, 161, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "PDSim/scroll/common_scroll_geo.pyx":162
 * 
 *     return dict(cx = cx,
 *                 cy = cy,             # <<<<<<<<<<<<<<
 *                 fz_p = A,
 *                 fx_p = fx_p,
 */
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_cy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_cy, __pyx_t_4) < 0) __PYX_ERR(0, 161, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "PDSim/scroll/common_scroll_geo.pyx":163
 *     return dict(cx = cx,
 *                 cy = cy,
 *                 fz_p = A,             # <<<<<<<<<<<<<<
 *                 fx_p = fx_p,
 *                 fy_p = fy_p,
 */
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_A); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_fz_p, __pyx_t_4) < 0) __PYX_ERR(0, 161, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "PDSim/scroll/common_scroll_geo.pyx":164
 *                 cy = cy,
 *                 fz_p = A,
 *                 fx_p = fx_p,             # <<<<<<<<<<<<<<
 *                 fy_p = fy_p,
 *                 M_O_p = M_O_p
 */
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_fx_p); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_fx_p, __pyx_t_4) < 0) __PYX_ERR(0, 161, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "PDSim/scroll/common_scroll_geo.pyx":165
 *                 fz_p = A,
 *                 fx_p = fx_p,
 *                 fy_p = fy_p,             # <<<<<<<<<<<<<<
 *                 M_O_p = M_O_p
 *                 )
 */
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_fy_p); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_fy_p, __pyx_t_4) < 0) __PYX_ERR(0, 161, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "PDSim/scroll/common_scroll_geo.pyx":166
 *                 fx_p = fx_p,
 *                 fy_p = fy_p,
 *                 M_O_p = M_O_p             # <<<<<<<<<<<<<<
 *                 )
 * 
 */
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_M_O_p); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_M_O_p, __pyx_t_4) < 0) __PYX_ERR(0, 161, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "PDSim/scroll/common_scroll_geo.pyx":114
 *     return VdV
 * 
 * cpdef dict forces(double theta, geoVals geo, CVInvolutes inv, double A):             # <<<<<<<<<<<<<<
 *     """
 *     Evaluate the force terms for a control volume
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.forces", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_orbiting_scroll_involute);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_9forces(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5PDSim_6scroll_17common_scroll_geo_8forces[] = "forces(double theta, geoVals geo, CVInvolutes inv, double A) -> dict\n\n    Evaluate the force terms for a control volume\n    ";
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_9forces(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_theta;
  struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo = 0;
  struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *__pyx_v_inv = 0;
  double __pyx_v_A;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("forces (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_theta,&__pyx_n_s_geo,&__pyx_n_s_inv,&__pyx_n_s_A,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_theta)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_geo)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("forces", 1, 4, 4, 1); __PYX_ERR(0, 114, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inv)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("forces", 1, 4, 4, 2); __PYX_ERR(0, 114, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_A)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("forces", 1, 4, 4, 3); __PYX_ERR(0, 114, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "forces") < 0)) __PYX_ERR(0, 114, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_theta = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_theta == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 114, __pyx_L3_error)
    __pyx_v_geo = ((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)values[1]);
    __pyx_v_inv = ((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *)values[2]);
    __pyx_v_A = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_A == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 114, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("forces", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 114, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.forces", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_geo), __pyx_ptype_5PDSim_6scroll_17common_scroll_geo_geoVals, 1, "geo", 0))) __PYX_ERR(0, 114, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_inv), __pyx_ptype_5PDSim_6scroll_17common_scroll_geo_CVInvolutes, 1, "inv", 0))) __PYX_ERR(0, 114, __pyx_L1_error)
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_8forces(__pyx_self, __pyx_v_theta, __pyx_v_geo, __pyx_v_inv, __pyx_v_A);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_8forces(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_theta, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *__pyx_v_inv, double __pyx_v_A) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("forces", 0);
  __Pyx_TraceCall("forces (wrapper)", __pyx_f[0], 114, 0, __PYX_ERR(0, 114, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5PDSim_6scroll_17common_scroll_geo_forces(__pyx_v_theta, __pyx_v_geo, __pyx_v_inv, __pyx_v_A, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.forces", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pyx":169
 *                 )
 * 
 * cpdef double fxA(double phi, geoVals geo, double theta, involute_index inv):             # <<<<<<<<<<<<<<
 *     """
 *     The anti-derivative for the x-coordinate of the centroid
 */

static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_11fxA(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static double __pyx_f_5PDSim_6scroll_17common_scroll_geo_fxA(double __pyx_v_phi, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo, double __pyx_v_theta, enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index __pyx_v_inv, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_v_Theta;
  double __pyx_v_r_b;
  double __pyx_v_r_o;
  double __pyx_v_phi_0;
  double __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("fxA", 0);
  __Pyx_TraceCall("fxA", __pyx_f[0], 169, 0, __PYX_ERR(0, 169, __pyx_L1_error));

  /* "PDSim/scroll/common_scroll_geo.pyx":185
 *     """
 * 
 *     cdef double Theta = geo.phi_fie - theta - pi/2, r_b = geo.rb, r_o = geo.ro             # <<<<<<<<<<<<<<
 * 
 *     if inv == INVOLUTE_FO or inv == INVOLUTE_FI:
 */
  __pyx_v_Theta = ((__pyx_v_geo->phi_fie - __pyx_v_theta) - (((double)M_PI) / 2.0));
  __pyx_t_1 = __pyx_v_geo->rb;
  __pyx_v_r_b = __pyx_t_1;
  __pyx_t_1 = __pyx_v_geo->ro;
  __pyx_v_r_o = __pyx_t_1;

  /* "PDSim/scroll/common_scroll_geo.pyx":187
 *     cdef double Theta = geo.phi_fie - theta - pi/2, r_b = geo.rb, r_o = geo.ro
 * 
 *     if inv == INVOLUTE_FO or inv == INVOLUTE_FI:             # <<<<<<<<<<<<<<
 *         if inv == INVOLUTE_FO:
 *             phi_0 = geo.phi_fo0
 */
  switch (__pyx_v_inv) {
    case __pyx_e_5PDSim_6scroll_17common_scroll_geo_INVOLUTE_FO:
    case __pyx_e_5PDSim_6scroll_17common_scroll_geo_INVOLUTE_FI:

    /* "PDSim/scroll/common_scroll_geo.pyx":188
 * 
 *     if inv == INVOLUTE_FO or inv == INVOLUTE_FI:
 *         if inv == INVOLUTE_FO:             # <<<<<<<<<<<<<<
 *             phi_0 = geo.phi_fo0
 *         else:
 */
    __pyx_t_2 = ((__pyx_v_inv == __pyx_e_5PDSim_6scroll_17common_scroll_geo_INVOLUTE_FO) != 0);
    if (__pyx_t_2) {

      /* "PDSim/scroll/common_scroll_geo.pyx":189
 *     if inv == INVOLUTE_FO or inv == INVOLUTE_FI:
 *         if inv == INVOLUTE_FO:
 *             phi_0 = geo.phi_fo0             # <<<<<<<<<<<<<<
 *         else:
 *             phi_0 = geo.phi_fi0
 */
      __pyx_t_1 = __pyx_v_geo->phi_fo0;
      __pyx_v_phi_0 = __pyx_t_1;

      /* "PDSim/scroll/common_scroll_geo.pyx":188
 * 
 *     if inv == INVOLUTE_FO or inv == INVOLUTE_FI:
 *         if inv == INVOLUTE_FO:             # <<<<<<<<<<<<<<
 *             phi_0 = geo.phi_fo0
 *         else:
 */
      goto __pyx_L3;
    }

    /* "PDSim/scroll/common_scroll_geo.pyx":191
 *             phi_0 = geo.phi_fo0
 *         else:
 *             phi_0 = geo.phi_fi0             # <<<<<<<<<<<<<<
 *         # return r_b**3*(-3*(phi - phi_0)*((phi - phi_0)**2 - 6)*cos(phi) + (phi - phi_0)*((phi - phi_0)**2 - 3)*cos(phi)**3 + 3*(2*(phi - phi_0)**2 - 5)*sin(phi) + (3*(phi - phi_0)**2 - 1)*sin(phi)**3)/6
 *         return r_b**3*((-3*phi + 3*phi_0)*((phi - phi_0)**2 - 6)*cos(phi) + (phi - phi_0)*((phi - phi_0)**2 - 3)*cos(phi)**3 + (3*(phi - phi_0)**2 - 1)*sin(phi)**3 + (6*(phi - phi_0)**2 - 15)*sin(phi))/6
 */
    /*else*/ {
      __pyx_t_1 = __pyx_v_geo->phi_fi0;
      __pyx_v_phi_0 = __pyx_t_1;
    }
    __pyx_L3:;

    /* "PDSim/scroll/common_scroll_geo.pyx":193
 *             phi_0 = geo.phi_fi0
 *         # return r_b**3*(-3*(phi - phi_0)*((phi - phi_0)**2 - 6)*cos(phi) + (phi - phi_0)*((phi - phi_0)**2 - 3)*cos(phi)**3 + 3*(2*(phi - phi_0)**2 - 5)*sin(phi) + (3*(phi - phi_0)**2 - 1)*sin(phi)**3)/6
 *         return r_b**3*((-3*phi + 3*phi_0)*((phi - phi_0)**2 - 6)*cos(phi) + (phi - phi_0)*((phi - phi_0)**2 - 3)*cos(phi)**3 + (3*(phi - phi_0)**2 - 1)*sin(phi)**3 + (6*(phi - phi_0)**2 - 15)*sin(phi))/6             # <<<<<<<<<<<<<<
 *     elif inv == INVOLUTE_OO or inv == INVOLUTE_OI:
 *         if inv == INVOLUTE_OO:
 */
    __pyx_r = ((pow(__pyx_v_r_b, 3.0) * (((((((-3.0 * __pyx_v_phi) + (3.0 * __pyx_v_phi_0)) * (pow((__pyx_v_phi - __pyx_v_phi_0), 2.0) - 6.0)) * cos(__pyx_v_phi)) + (((__pyx_v_phi - __pyx_v_phi_0) * (pow((__pyx_v_phi - __pyx_v_phi_0), 2.0) - 3.0)) * pow(cos(__pyx_v_phi), 3.0))) + (((3.0 * pow((__pyx_v_phi - __pyx_v_phi_0), 2.0)) - 1.0) * pow(sin(__pyx_v_phi), 3.0))) + (((6.0 * pow((__pyx_v_phi - __pyx_v_phi_0), 2.0)) - 15.0) * sin(__pyx_v_phi)))) / 6.0);
    goto __pyx_L0;

    /* "PDSim/scroll/common_scroll_geo.pyx":187
 *     cdef double Theta = geo.phi_fie - theta - pi/2, r_b = geo.rb, r_o = geo.ro
 * 
 *     if inv == INVOLUTE_FO or inv == INVOLUTE_FI:             # <<<<<<<<<<<<<<
 *         if inv == INVOLUTE_FO:
 *             phi_0 = geo.phi_fo0
 */
    break;
    case __pyx_e_5PDSim_6scroll_17common_scroll_geo_INVOLUTE_OO:

    /* "PDSim/scroll/common_scroll_geo.pyx":194
 *         # return r_b**3*(-3*(phi - phi_0)*((phi - phi_0)**2 - 6)*cos(phi) + (phi - phi_0)*((phi - phi_0)**2 - 3)*cos(phi)**3 + 3*(2*(phi - phi_0)**2 - 5)*sin(phi) + (3*(phi - phi_0)**2 - 1)*sin(phi)**3)/6
 *         return r_b**3*((-3*phi + 3*phi_0)*((phi - phi_0)**2 - 6)*cos(phi) + (phi - phi_0)*((phi - phi_0)**2 - 3)*cos(phi)**3 + (3*(phi - phi_0)**2 - 1)*sin(phi)**3 + (6*(phi - phi_0)**2 - 15)*sin(phi))/6
 *     elif inv == INVOLUTE_OO or inv == INVOLUTE_OI:             # <<<<<<<<<<<<<<
 *         if inv == INVOLUTE_OO:
 *             phi_0 = geo.phi_oo0
 */
    case __pyx_e_5PDSim_6scroll_17common_scroll_geo_INVOLUTE_OI:

    /* "PDSim/scroll/common_scroll_geo.pyx":195
 *         return r_b**3*((-3*phi + 3*phi_0)*((phi - phi_0)**2 - 6)*cos(phi) + (phi - phi_0)*((phi - phi_0)**2 - 3)*cos(phi)**3 + (3*(phi - phi_0)**2 - 1)*sin(phi)**3 + (6*(phi - phi_0)**2 - 15)*sin(phi))/6
 *     elif inv == INVOLUTE_OO or inv == INVOLUTE_OI:
 *         if inv == INVOLUTE_OO:             # <<<<<<<<<<<<<<
 *             phi_0 = geo.phi_oo0
 *         else:
 */
    __pyx_t_2 = ((__pyx_v_inv == __pyx_e_5PDSim_6scroll_17common_scroll_geo_INVOLUTE_OO) != 0);
    if (__pyx_t_2) {

      /* "PDSim/scroll/common_scroll_geo.pyx":196
 *     elif inv == INVOLUTE_OO or inv == INVOLUTE_OI:
 *         if inv == INVOLUTE_OO:
 *             phi_0 = geo.phi_oo0             # <<<<<<<<<<<<<<
 *         else:
 *             phi_0 = geo.phi_oi0
 */
      __pyx_t_1 = __pyx_v_geo->phi_oo0;
      __pyx_v_phi_0 = __pyx_t_1;

      /* "PDSim/scroll/common_scroll_geo.pyx":195
 *         return r_b**3*((-3*phi + 3*phi_0)*((phi - phi_0)**2 - 6)*cos(phi) + (phi - phi_0)*((phi - phi_0)**2 - 3)*cos(phi)**3 + (3*(phi - phi_0)**2 - 1)*sin(phi)**3 + (6*(phi - phi_0)**2 - 15)*sin(phi))/6
 *     elif inv == INVOLUTE_OO or inv == INVOLUTE_OI:
 *         if inv == INVOLUTE_OO:             # <<<<<<<<<<<<<<
 *             phi_0 = geo.phi_oo0
 *         else:
 */
      goto __pyx_L4;
    }

    /* "PDSim/scroll/common_scroll_geo.pyx":198
 *             phi_0 = geo.phi_oo0
 *         else:
 *             phi_0 = geo.phi_oi0             # <<<<<<<<<<<<<<
 *         return -r_b*(-phi*r_b*r_o*(phi**2 - 3*phi*phi_0 + 3*phi_0**2 + 3)*cos(Theta)/3
 *                 + r_b**2*(phi - phi_0)*((phi - phi_0)**2 - 3)*cos(phi)**3/3
 */
    /*else*/ {
      __pyx_t_1 = __pyx_v_geo->phi_oi0;
      __pyx_v_phi_0 = __pyx_t_1;
    }
    __pyx_L4:;

    /* "PDSim/scroll/common_scroll_geo.pyx":204
 *                 - (phi - phi_0)*(r_b**2*((phi - phi_0)**2 - 6) + r_o**2*cos(Theta)**2)*cos(phi)
 *                 + (r_b**2*(2*(phi - phi_0)**2 - 5) + r_b*r_o*((phi - phi_0)**2 - 1)*cos(Theta)*cos(phi) + r_o**2*cos(Theta)**2)*sin(phi)
 *                 )/2             # <<<<<<<<<<<<<<
 *     else:
 *         raise ValueError("Involute is invalid")
 */
    __pyx_r = (((-__pyx_v_r_b) * (((((((((((-__pyx_v_phi) * __pyx_v_r_b) * __pyx_v_r_o) * (((pow(__pyx_v_phi, 2.0) - ((3.0 * __pyx_v_phi) * __pyx_v_phi_0)) + (3.0 * pow(__pyx_v_phi_0, 2.0))) + 3.0)) * cos(__pyx_v_Theta)) / 3.0) + ((((pow(__pyx_v_r_b, 2.0) * (__pyx_v_phi - __pyx_v_phi_0)) * (pow((__pyx_v_phi - __pyx_v_phi_0), 2.0) - 3.0)) * pow(cos(__pyx_v_phi), 3.0)) / 3.0)) + (((pow(__pyx_v_r_b, 2.0) * ((3.0 * pow((__pyx_v_phi - __pyx_v_phi_0), 2.0)) - 1.0)) * pow(sin(__pyx_v_phi), 3.0)) / 3.0)) + (((((2.0 * __pyx_v_r_b) * __pyx_v_r_o) * (__pyx_v_phi - __pyx_v_phi_0)) * cos(__pyx_v_Theta)) * pow(cos(__pyx_v_phi), 2.0))) - (((__pyx_v_phi - __pyx_v_phi_0) * ((pow(__pyx_v_r_b, 2.0) * (pow((__pyx_v_phi - __pyx_v_phi_0), 2.0) - 6.0)) + (pow(__pyx_v_r_o, 2.0) * pow(cos(__pyx_v_Theta), 2.0)))) * cos(__pyx_v_phi))) + ((((pow(__pyx_v_r_b, 2.0) * ((2.0 * pow((__pyx_v_phi - __pyx_v_phi_0), 2.0)) - 5.0)) + ((((__pyx_v_r_b * __pyx_v_r_o) * (pow((__pyx_v_phi - __pyx_v_phi_0), 2.0) - 1.0)) * cos(__pyx_v_Theta)) * cos(__pyx_v_phi))) + (pow(__pyx_v_r_o, 2.0) * pow(cos(__pyx_v_Theta), 2.0))) * sin(__pyx_v_phi)))) / 2.0);
    goto __pyx_L0;

    /* "PDSim/scroll/common_scroll_geo.pyx":194
 *         # return r_b**3*(-3*(phi - phi_0)*((phi - phi_0)**2 - 6)*cos(phi) + (phi - phi_0)*((phi - phi_0)**2 - 3)*cos(phi)**3 + 3*(2*(phi - phi_0)**2 - 5)*sin(phi) + (3*(phi - phi_0)**2 - 1)*sin(phi)**3)/6
 *         return r_b**3*((-3*phi + 3*phi_0)*((phi - phi_0)**2 - 6)*cos(phi) + (phi - phi_0)*((phi - phi_0)**2 - 3)*cos(phi)**3 + (3*(phi - phi_0)**2 - 1)*sin(phi)**3 + (6*(phi - phi_0)**2 - 15)*sin(phi))/6
 *     elif inv == INVOLUTE_OO or inv == INVOLUTE_OI:             # <<<<<<<<<<<<<<
 *         if inv == INVOLUTE_OO:
 *             phi_0 = geo.phi_oo0
 */
    break;
    default:

    /* "PDSim/scroll/common_scroll_geo.pyx":206
 *                 )/2
 *     else:
 *         raise ValueError("Involute is invalid")             # <<<<<<<<<<<<<<
 * 
 * cpdef double fyA(double phi, geoVals geo, double theta, involute_index inv):
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 206, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 206, __pyx_L1_error)
    break;
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":169
 *                 )
 * 
 * cpdef double fxA(double phi, geoVals geo, double theta, involute_index inv):             # <<<<<<<<<<<<<<
 *     """
 *     The anti-derivative for the x-coordinate of the centroid
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_WriteUnraisable("PDSim.scroll.common_scroll_geo.fxA", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_11fxA(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5PDSim_6scroll_17common_scroll_geo_10fxA[] = "fxA(double phi, geoVals geo, double theta, involute_index inv) -> double\n\n    The anti-derivative for the x-coordinate of the centroid\n    \n    Parameters\n    ----------\n    phi : float\n        The involute angle\n    geo : geoVals\n        The structure with the geometry obtained from get_geo()\n    theta : float\n        The crank angle, between 0 and 2*pi\n    inv : involute_index\n        The key for the involute to be considered\n    ";
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_11fxA(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_phi;
  struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo = 0;
  double __pyx_v_theta;
  enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index __pyx_v_inv;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fxA (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_phi,&__pyx_n_s_geo,&__pyx_n_s_theta,&__pyx_n_s_inv,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_phi)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_geo)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("fxA", 1, 4, 4, 1); __PYX_ERR(0, 169, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_theta)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("fxA", 1, 4, 4, 2); __PYX_ERR(0, 169, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inv)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("fxA", 1, 4, 4, 3); __PYX_ERR(0, 169, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fxA") < 0)) __PYX_ERR(0, 169, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_phi = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_phi == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 169, __pyx_L3_error)
    __pyx_v_geo = ((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)values[1]);
    __pyx_v_theta = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_theta == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 169, __pyx_L3_error)
    __pyx_v_inv = ((enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index)__Pyx_PyInt_As_enum____pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index(values[3])); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 169, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("fxA", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 169, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.fxA", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_geo), __pyx_ptype_5PDSim_6scroll_17common_scroll_geo_geoVals, 1, "geo", 0))) __PYX_ERR(0, 169, __pyx_L1_error)
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_10fxA(__pyx_self, __pyx_v_phi, __pyx_v_geo, __pyx_v_theta, __pyx_v_inv);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_10fxA(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_phi, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo, double __pyx_v_theta, enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index __pyx_v_inv) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("fxA", 0);
  __Pyx_TraceCall("fxA (wrapper)", __pyx_f[0], 169, 0, __PYX_ERR(0, 169, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_f_5PDSim_6scroll_17common_scroll_geo_fxA(__pyx_v_phi, __pyx_v_geo, __pyx_v_theta, __pyx_v_inv, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.fxA", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pyx":208
 *         raise ValueError("Involute is invalid")
 * 
 * cpdef double fyA(double phi, geoVals geo, double theta, involute_index inv):             # <<<<<<<<<<<<<<
 *     """
 *     The anti-derivative for the y-coordinate of the centroid
 */

static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_13fyA(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static double __pyx_f_5PDSim_6scroll_17common_scroll_geo_fyA(double __pyx_v_phi, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo, double __pyx_v_theta, enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index __pyx_v_inv, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_v_Theta;
  double __pyx_v_r_b;
  double __pyx_v_r_o;
  double __pyx_v_phi_0;
  double __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("fyA", 0);
  __Pyx_TraceCall("fyA", __pyx_f[0], 208, 0, __PYX_ERR(0, 208, __pyx_L1_error));

  /* "PDSim/scroll/common_scroll_geo.pyx":224
 *     """
 * 
 *     cdef double Theta = geo.phi_fie - theta - pi/2, r_b = geo.rb, r_o = geo.ro             # <<<<<<<<<<<<<<
 * 
 *     if inv == INVOLUTE_FI:
 */
  __pyx_v_Theta = ((__pyx_v_geo->phi_fie - __pyx_v_theta) - (((double)M_PI) / 2.0));
  __pyx_t_1 = __pyx_v_geo->rb;
  __pyx_v_r_b = __pyx_t_1;
  __pyx_t_1 = __pyx_v_geo->ro;
  __pyx_v_r_o = __pyx_t_1;

  /* "PDSim/scroll/common_scroll_geo.pyx":226
 *     cdef double Theta = geo.phi_fie - theta - pi/2, r_b = geo.rb, r_o = geo.ro
 * 
 *     if inv == INVOLUTE_FI:             # <<<<<<<<<<<<<<
 *         phi_0 = geo.phi_fi0
 *         return r_b**3*(-(phi - phi_0)*((phi - phi_0)**2 - 3)*sin(phi)**3 + 6*(phi - phi_0)*sin(phi)
 */
  switch (__pyx_v_inv) {
    case __pyx_e_5PDSim_6scroll_17common_scroll_geo_INVOLUTE_FI:

    /* "PDSim/scroll/common_scroll_geo.pyx":227
 * 
 *     if inv == INVOLUTE_FI:
 *         phi_0 = geo.phi_fi0             # <<<<<<<<<<<<<<
 *         return r_b**3*(-(phi - phi_0)*((phi - phi_0)**2 - 3)*sin(phi)**3 + 6*(phi - phi_0)*sin(phi)
 *                        - 3*(2*(phi - phi_0)**2 - 3)*cos(phi) + (3*(phi - phi_0)**2 - 1)*cos(phi)**3)/3
 */
    __pyx_t_1 = __pyx_v_geo->phi_fi0;
    __pyx_v_phi_0 = __pyx_t_1;

    /* "PDSim/scroll/common_scroll_geo.pyx":229
 *         phi_0 = geo.phi_fi0
 *         return r_b**3*(-(phi - phi_0)*((phi - phi_0)**2 - 3)*sin(phi)**3 + 6*(phi - phi_0)*sin(phi)
 *                        - 3*(2*(phi - phi_0)**2 - 3)*cos(phi) + (3*(phi - phi_0)**2 - 1)*cos(phi)**3)/3             # <<<<<<<<<<<<<<
 *     elif inv == INVOLUTE_FO:
 *         phi_0 = geo.phi_fo0
 */
    __pyx_r = ((pow(__pyx_v_r_b, 3.0) * ((((((-(__pyx_v_phi - __pyx_v_phi_0)) * (pow((__pyx_v_phi - __pyx_v_phi_0), 2.0) - 3.0)) * pow(sin(__pyx_v_phi), 3.0)) + ((6.0 * (__pyx_v_phi - __pyx_v_phi_0)) * sin(__pyx_v_phi))) - ((3.0 * ((2.0 * pow((__pyx_v_phi - __pyx_v_phi_0), 2.0)) - 3.0)) * cos(__pyx_v_phi))) + (((3.0 * pow((__pyx_v_phi - __pyx_v_phi_0), 2.0)) - 1.0) * pow(cos(__pyx_v_phi), 3.0)))) / 3.0);
    goto __pyx_L0;

    /* "PDSim/scroll/common_scroll_geo.pyx":226
 *     cdef double Theta = geo.phi_fie - theta - pi/2, r_b = geo.rb, r_o = geo.ro
 * 
 *     if inv == INVOLUTE_FI:             # <<<<<<<<<<<<<<
 *         phi_0 = geo.phi_fi0
 *         return r_b**3*(-(phi - phi_0)*((phi - phi_0)**2 - 3)*sin(phi)**3 + 6*(phi - phi_0)*sin(phi)
 */
    break;
    case __pyx_e_5PDSim_6scroll_17common_scroll_geo_INVOLUTE_FO:

    /* "PDSim/scroll/common_scroll_geo.pyx":231
 *                        - 3*(2*(phi - phi_0)**2 - 3)*cos(phi) + (3*(phi - phi_0)**2 - 1)*cos(phi)**3)/3
 *     elif inv == INVOLUTE_FO:
 *         phi_0 = geo.phi_fo0             # <<<<<<<<<<<<<<
 *         return r_b**3*(-(phi - phi_0)*((phi - phi_0)**2 - 3)*sin(phi)**3 + 6*(phi - phi_0)*sin(phi)
 *                       - 3*(2*(phi - phi_0)**2 - 3)*cos(phi) + (3*(phi - phi_0)**2 - 1)*cos(phi)**3)/3
 */
    __pyx_t_1 = __pyx_v_geo->phi_fo0;
    __pyx_v_phi_0 = __pyx_t_1;

    /* "PDSim/scroll/common_scroll_geo.pyx":233
 *         phi_0 = geo.phi_fo0
 *         return r_b**3*(-(phi - phi_0)*((phi - phi_0)**2 - 3)*sin(phi)**3 + 6*(phi - phi_0)*sin(phi)
 *                       - 3*(2*(phi - phi_0)**2 - 3)*cos(phi) + (3*(phi - phi_0)**2 - 1)*cos(phi)**3)/3             # <<<<<<<<<<<<<<
 *     elif inv == INVOLUTE_OO:
 *         phi_0 = geo.phi_oo0
 */
    __pyx_r = ((pow(__pyx_v_r_b, 3.0) * ((((((-(__pyx_v_phi - __pyx_v_phi_0)) * (pow((__pyx_v_phi - __pyx_v_phi_0), 2.0) - 3.0)) * pow(sin(__pyx_v_phi), 3.0)) + ((6.0 * (__pyx_v_phi - __pyx_v_phi_0)) * sin(__pyx_v_phi))) - ((3.0 * ((2.0 * pow((__pyx_v_phi - __pyx_v_phi_0), 2.0)) - 3.0)) * cos(__pyx_v_phi))) + (((3.0 * pow((__pyx_v_phi - __pyx_v_phi_0), 2.0)) - 1.0) * pow(cos(__pyx_v_phi), 3.0)))) / 3.0);
    goto __pyx_L0;

    /* "PDSim/scroll/common_scroll_geo.pyx":230
 *         return r_b**3*(-(phi - phi_0)*((phi - phi_0)**2 - 3)*sin(phi)**3 + 6*(phi - phi_0)*sin(phi)
 *                        - 3*(2*(phi - phi_0)**2 - 3)*cos(phi) + (3*(phi - phi_0)**2 - 1)*cos(phi)**3)/3
 *     elif inv == INVOLUTE_FO:             # <<<<<<<<<<<<<<
 *         phi_0 = geo.phi_fo0
 *         return r_b**3*(-(phi - phi_0)*((phi - phi_0)**2 - 3)*sin(phi)**3 + 6*(phi - phi_0)*sin(phi)
 */
    break;
    case __pyx_e_5PDSim_6scroll_17common_scroll_geo_INVOLUTE_OO:

    /* "PDSim/scroll/common_scroll_geo.pyx":235
 *                       - 3*(2*(phi - phi_0)**2 - 3)*cos(phi) + (3*(phi - phi_0)**2 - 1)*cos(phi)**3)/3
 *     elif inv == INVOLUTE_OO:
 *         phi_0 = geo.phi_oo0             # <<<<<<<<<<<<<<
 *     elif inv == INVOLUTE_OI:
 *         phi_0 = geo.phi_oi0
 */
    __pyx_t_1 = __pyx_v_geo->phi_oo0;
    __pyx_v_phi_0 = __pyx_t_1;

    /* "PDSim/scroll/common_scroll_geo.pyx":234
 *         return r_b**3*(-(phi - phi_0)*((phi - phi_0)**2 - 3)*sin(phi)**3 + 6*(phi - phi_0)*sin(phi)
 *                       - 3*(2*(phi - phi_0)**2 - 3)*cos(phi) + (3*(phi - phi_0)**2 - 1)*cos(phi)**3)/3
 *     elif inv == INVOLUTE_OO:             # <<<<<<<<<<<<<<
 *         phi_0 = geo.phi_oo0
 *     elif inv == INVOLUTE_OI:
 */
    break;
    case __pyx_e_5PDSim_6scroll_17common_scroll_geo_INVOLUTE_OI:

    /* "PDSim/scroll/common_scroll_geo.pyx":237
 *         phi_0 = geo.phi_oo0
 *     elif inv == INVOLUTE_OI:
 *         phi_0 = geo.phi_oi0             # <<<<<<<<<<<<<<
 *     else:
 *         raise ValueError("Involute is invalid")
 */
    __pyx_t_1 = __pyx_v_geo->phi_oi0;
    __pyx_v_phi_0 = __pyx_t_1;

    /* "PDSim/scroll/common_scroll_geo.pyx":236
 *     elif inv == INVOLUTE_OO:
 *         phi_0 = geo.phi_oo0
 *     elif inv == INVOLUTE_OI:             # <<<<<<<<<<<<<<
 *         phi_0 = geo.phi_oi0
 *     else:
 */
    break;
    default:

    /* "PDSim/scroll/common_scroll_geo.pyx":239
 *         phi_0 = geo.phi_oi0
 *     else:
 *         raise ValueError("Involute is invalid")             # <<<<<<<<<<<<<<
 * 
 *     return -r_b*(-r_b**2*(phi - phi_0)*((phi - phi_0)**2 - 3)*sin(phi)**3/3 - r_b**2*(2*(phi - phi_0)**2 - 3)*cos(phi)
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 239, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 239, __pyx_L1_error)
    break;
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":241
 *         raise ValueError("Involute is invalid")
 * 
 *     return -r_b*(-r_b**2*(phi - phi_0)*((phi - phi_0)**2 - 3)*sin(phi)**3/3 - r_b**2*(2*(phi - phi_0)**2 - 3)*cos(phi)             # <<<<<<<<<<<<<<
 *     + r_b**2*(3*(phi - phi_0)**2 - 1)*cos(phi)**3/3 - r_b*r_o*(phi - phi_0 - 1)*(phi - phi_0 + 1)*cos(Theta)/2
 *     + r_b*(4*r_b*(phi - phi_0) + 2*r_o*(phi - phi_0)*cos(Theta + phi) + r_o*((phi - phi_0)**2 - 1)*sin(Theta + phi))*sin(phi)/2
 */
  __pyx_r = ((-__pyx_v_r_b) * ((((((((((-pow(__pyx_v_r_b, 2.0)) * (__pyx_v_phi - __pyx_v_phi_0)) * (pow((__pyx_v_phi - __pyx_v_phi_0), 2.0) - 3.0)) * pow(sin(__pyx_v_phi), 3.0)) / 3.0) - ((pow(__pyx_v_r_b, 2.0) * ((2.0 * pow((__pyx_v_phi - __pyx_v_phi_0), 2.0)) - 3.0)) * cos(__pyx_v_phi))) + (((pow(__pyx_v_r_b, 2.0) * ((3.0 * pow((__pyx_v_phi - __pyx_v_phi_0), 2.0)) - 1.0)) * pow(cos(__pyx_v_phi), 3.0)) / 3.0)) - (((((__pyx_v_r_b * __pyx_v_r_o) * ((__pyx_v_phi - __pyx_v_phi_0) - 1.0)) * ((__pyx_v_phi - __pyx_v_phi_0) + 1.0)) * cos(__pyx_v_Theta)) / 2.0)) + (((__pyx_v_r_b * ((((4.0 * __pyx_v_r_b) * (__pyx_v_phi - __pyx_v_phi_0)) + (((2.0 * __pyx_v_r_o) * (__pyx_v_phi - __pyx_v_phi_0)) * cos((__pyx_v_Theta + __pyx_v_phi)))) + ((__pyx_v_r_o * (pow((__pyx_v_phi - __pyx_v_phi_0), 2.0) - 1.0)) * sin((__pyx_v_Theta + __pyx_v_phi))))) * sin(__pyx_v_phi)) / 2.0)) - (((__pyx_v_r_o * (((__pyx_v_r_b * ((((pow(__pyx_v_phi, 3.0) - ((3.0 * pow(__pyx_v_phi, 2.0)) * __pyx_v_phi_0)) + ((3.0 * __pyx_v_phi) * pow(__pyx_v_phi_0, 2.0))) - (3.0 * __pyx_v_phi)) + (6.0 * __pyx_v_phi_0))) + ((((6.0 * __pyx_v_r_o) * (__pyx_v_phi - __pyx_v_phi_0)) * cos(__pyx_v_Theta)) * cos(__pyx_v_phi))) - (((6.0 * __pyx_v_r_o) * sin(__pyx_v_phi)) * cos(__pyx_v_Theta)))) * sin(__pyx_v_Theta)) / 6.0)));
  goto __pyx_L0;

  /* "PDSim/scroll/common_scroll_geo.pyx":208
 *         raise ValueError("Involute is invalid")
 * 
 * cpdef double fyA(double phi, geoVals geo, double theta, involute_index inv):             # <<<<<<<<<<<<<<
 *     """
 *     The anti-derivative for the y-coordinate of the centroid
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_WriteUnraisable("PDSim.scroll.common_scroll_geo.fyA", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_13fyA(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5PDSim_6scroll_17common_scroll_geo_12fyA[] = "fyA(double phi, geoVals geo, double theta, involute_index inv) -> double\n\n    The anti-derivative for the y-coordinate of the centroid\n    \n    Parameters\n    ----------\n    phi : float\n        The involute angle\n    geo : geoVals\n        The structure with the geometry obtained from get_geo()\n    theta : float\n        The crank angle, between 0 and 2*pi\n    inv : involute_index\n        The key for the involute to be considered\n    ";
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_13fyA(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_phi;
  struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo = 0;
  double __pyx_v_theta;
  enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index __pyx_v_inv;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fyA (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_phi,&__pyx_n_s_geo,&__pyx_n_s_theta,&__pyx_n_s_inv,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_phi)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_geo)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("fyA", 1, 4, 4, 1); __PYX_ERR(0, 208, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_theta)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("fyA", 1, 4, 4, 2); __PYX_ERR(0, 208, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inv)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("fyA", 1, 4, 4, 3); __PYX_ERR(0, 208, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fyA") < 0)) __PYX_ERR(0, 208, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_phi = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_phi == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 208, __pyx_L3_error)
    __pyx_v_geo = ((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)values[1]);
    __pyx_v_theta = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_theta == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 208, __pyx_L3_error)
    __pyx_v_inv = ((enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index)__Pyx_PyInt_As_enum____pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index(values[3])); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 208, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("fyA", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 208, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.fyA", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_geo), __pyx_ptype_5PDSim_6scroll_17common_scroll_geo_geoVals, 1, "geo", 0))) __PYX_ERR(0, 208, __pyx_L1_error)
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_12fyA(__pyx_self, __pyx_v_phi, __pyx_v_geo, __pyx_v_theta, __pyx_v_inv);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_12fyA(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_phi, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo, double __pyx_v_theta, enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index __pyx_v_inv) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("fyA", 0);
  __Pyx_TraceCall("fyA (wrapper)", __pyx_f[0], 208, 0, __PYX_ERR(0, 208, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_f_5PDSim_6scroll_17common_scroll_geo_fyA(__pyx_v_phi, __pyx_v_geo, __pyx_v_theta, __pyx_v_inv, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.fyA", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pyx":246
 *     - r_o*(r_b*(phi**3 - 3*phi**2*phi_0 + 3*phi*phi_0**2 - 3*phi + 6*phi_0) + 6*r_o*(phi - phi_0)*cos(Theta)*cos(phi) - 6*r_o*sin(phi)*cos(Theta))*sin(Theta)/6)
 * 
 * cpdef double fFx_p(double phi, geoVals geo, double theta, involute_index inv):             # <<<<<<<<<<<<<<
 *     """
 *     The anti-derivative of the x-coordinate force term (Table 2)
 */

static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_15fFx_p(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static double __pyx_f_5PDSim_6scroll_17common_scroll_geo_fFx_p(double __pyx_v_phi, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo, CYTHON_UNUSED double __pyx_v_theta, enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index __pyx_v_inv, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("fFx_p", 0);
  __Pyx_TraceCall("fFx_p", __pyx_f[0], 246, 0, __PYX_ERR(0, 246, __pyx_L1_error));

  /* "PDSim/scroll/common_scroll_geo.pyx":261
 *         The key for the involute to be considered
 *     """
 *     if inv == INVOLUTE_FI:             # <<<<<<<<<<<<<<
 *         return geo.h*geo.rb*((geo.phi_fi0-phi)*cos(phi)+sin(phi))
 *     elif inv == INVOLUTE_OO:
 */
  switch (__pyx_v_inv) {
    case __pyx_e_5PDSim_6scroll_17common_scroll_geo_INVOLUTE_FI:

    /* "PDSim/scroll/common_scroll_geo.pyx":262
 *     """
 *     if inv == INVOLUTE_FI:
 *         return geo.h*geo.rb*((geo.phi_fi0-phi)*cos(phi)+sin(phi))             # <<<<<<<<<<<<<<
 *     elif inv == INVOLUTE_OO:
 *         return geo.h*geo.rb*((geo.phi_oo0-phi)*cos(phi)+sin(phi))
 */
    __pyx_r = ((__pyx_v_geo->h * __pyx_v_geo->rb) * (((__pyx_v_geo->phi_fi0 - __pyx_v_phi) * cos(__pyx_v_phi)) + sin(__pyx_v_phi)));
    goto __pyx_L0;

    /* "PDSim/scroll/common_scroll_geo.pyx":261
 *         The key for the involute to be considered
 *     """
 *     if inv == INVOLUTE_FI:             # <<<<<<<<<<<<<<
 *         return geo.h*geo.rb*((geo.phi_fi0-phi)*cos(phi)+sin(phi))
 *     elif inv == INVOLUTE_OO:
 */
    break;
    case __pyx_e_5PDSim_6scroll_17common_scroll_geo_INVOLUTE_OO:

    /* "PDSim/scroll/common_scroll_geo.pyx":264
 *         return geo.h*geo.rb*((geo.phi_fi0-phi)*cos(phi)+sin(phi))
 *     elif inv == INVOLUTE_OO:
 *         return geo.h*geo.rb*((geo.phi_oo0-phi)*cos(phi)+sin(phi))             # <<<<<<<<<<<<<<
 *     elif inv == INVOLUTE_FO:
 *         return geo.h*geo.rb*((phi-geo.phi_fo0)*cos(phi)-sin(phi))
 */
    __pyx_r = ((__pyx_v_geo->h * __pyx_v_geo->rb) * (((__pyx_v_geo->phi_oo0 - __pyx_v_phi) * cos(__pyx_v_phi)) + sin(__pyx_v_phi)));
    goto __pyx_L0;

    /* "PDSim/scroll/common_scroll_geo.pyx":263
 *     if inv == INVOLUTE_FI:
 *         return geo.h*geo.rb*((geo.phi_fi0-phi)*cos(phi)+sin(phi))
 *     elif inv == INVOLUTE_OO:             # <<<<<<<<<<<<<<
 *         return geo.h*geo.rb*((geo.phi_oo0-phi)*cos(phi)+sin(phi))
 *     elif inv == INVOLUTE_FO:
 */
    break;
    case __pyx_e_5PDSim_6scroll_17common_scroll_geo_INVOLUTE_FO:

    /* "PDSim/scroll/common_scroll_geo.pyx":266
 *         return geo.h*geo.rb*((geo.phi_oo0-phi)*cos(phi)+sin(phi))
 *     elif inv == INVOLUTE_FO:
 *         return geo.h*geo.rb*((phi-geo.phi_fo0)*cos(phi)-sin(phi))             # <<<<<<<<<<<<<<
 *     elif inv == INVOLUTE_OI:
 *         return geo.h*geo.rb*((phi-geo.phi_oi0)*cos(phi)-sin(phi))
 */
    __pyx_r = ((__pyx_v_geo->h * __pyx_v_geo->rb) * (((__pyx_v_phi - __pyx_v_geo->phi_fo0) * cos(__pyx_v_phi)) - sin(__pyx_v_phi)));
    goto __pyx_L0;

    /* "PDSim/scroll/common_scroll_geo.pyx":265
 *     elif inv == INVOLUTE_OO:
 *         return geo.h*geo.rb*((geo.phi_oo0-phi)*cos(phi)+sin(phi))
 *     elif inv == INVOLUTE_FO:             # <<<<<<<<<<<<<<
 *         return geo.h*geo.rb*((phi-geo.phi_fo0)*cos(phi)-sin(phi))
 *     elif inv == INVOLUTE_OI:
 */
    break;
    case __pyx_e_5PDSim_6scroll_17common_scroll_geo_INVOLUTE_OI:

    /* "PDSim/scroll/common_scroll_geo.pyx":268
 *         return geo.h*geo.rb*((phi-geo.phi_fo0)*cos(phi)-sin(phi))
 *     elif inv == INVOLUTE_OI:
 *         return geo.h*geo.rb*((phi-geo.phi_oi0)*cos(phi)-sin(phi))             # <<<<<<<<<<<<<<
 *     else:
 *         raise ValueError("Involute is invalid")
 */
    __pyx_r = ((__pyx_v_geo->h * __pyx_v_geo->rb) * (((__pyx_v_phi - __pyx_v_geo->phi_oi0) * cos(__pyx_v_phi)) - sin(__pyx_v_phi)));
    goto __pyx_L0;

    /* "PDSim/scroll/common_scroll_geo.pyx":267
 *     elif inv == INVOLUTE_FO:
 *         return geo.h*geo.rb*((phi-geo.phi_fo0)*cos(phi)-sin(phi))
 *     elif inv == INVOLUTE_OI:             # <<<<<<<<<<<<<<
 *         return geo.h*geo.rb*((phi-geo.phi_oi0)*cos(phi)-sin(phi))
 *     else:
 */
    break;
    default:

    /* "PDSim/scroll/common_scroll_geo.pyx":270
 *         return geo.h*geo.rb*((phi-geo.phi_oi0)*cos(phi)-sin(phi))
 *     else:
 *         raise ValueError("Involute is invalid")             # <<<<<<<<<<<<<<
 * 
 * cpdef double fFy_p(double phi, geoVals geo, double theta, involute_index inv):
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 270, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 270, __pyx_L1_error)
    break;
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":246
 *     - r_o*(r_b*(phi**3 - 3*phi**2*phi_0 + 3*phi*phi_0**2 - 3*phi + 6*phi_0) + 6*r_o*(phi - phi_0)*cos(Theta)*cos(phi) - 6*r_o*sin(phi)*cos(Theta))*sin(Theta)/6)
 * 
 * cpdef double fFx_p(double phi, geoVals geo, double theta, involute_index inv):             # <<<<<<<<<<<<<<
 *     """
 *     The anti-derivative of the x-coordinate force term (Table 2)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_WriteUnraisable("PDSim.scroll.common_scroll_geo.fFx_p", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_15fFx_p(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5PDSim_6scroll_17common_scroll_geo_14fFx_p[] = "fFx_p(double phi, geoVals geo, double theta, involute_index inv) -> double\n\n    The anti-derivative of the x-coordinate force term (Table 2)\n    \n    Parameters\n    ----------\n    phi : float\n        The involute angle\n    geo : geoVals\n        The structure with the geometry obtained from get_geo()\n    theta : float\n        The crank angle, between 0 and 2*pi\n    inv : involute_index\n        The key for the involute to be considered\n    ";
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_15fFx_p(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_phi;
  struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo = 0;
  double __pyx_v_theta;
  enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index __pyx_v_inv;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fFx_p (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_phi,&__pyx_n_s_geo,&__pyx_n_s_theta,&__pyx_n_s_inv,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_phi)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_geo)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("fFx_p", 1, 4, 4, 1); __PYX_ERR(0, 246, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_theta)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("fFx_p", 1, 4, 4, 2); __PYX_ERR(0, 246, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inv)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("fFx_p", 1, 4, 4, 3); __PYX_ERR(0, 246, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fFx_p") < 0)) __PYX_ERR(0, 246, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_phi = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_phi == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 246, __pyx_L3_error)
    __pyx_v_geo = ((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)values[1]);
    __pyx_v_theta = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_theta == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 246, __pyx_L3_error)
    __pyx_v_inv = ((enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index)__Pyx_PyInt_As_enum____pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index(values[3])); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 246, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("fFx_p", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 246, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.fFx_p", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_geo), __pyx_ptype_5PDSim_6scroll_17common_scroll_geo_geoVals, 1, "geo", 0))) __PYX_ERR(0, 246, __pyx_L1_error)
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_14fFx_p(__pyx_self, __pyx_v_phi, __pyx_v_geo, __pyx_v_theta, __pyx_v_inv);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_14fFx_p(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_phi, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo, double __pyx_v_theta, enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index __pyx_v_inv) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("fFx_p", 0);
  __Pyx_TraceCall("fFx_p (wrapper)", __pyx_f[0], 246, 0, __PYX_ERR(0, 246, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_f_5PDSim_6scroll_17common_scroll_geo_fFx_p(__pyx_v_phi, __pyx_v_geo, __pyx_v_theta, __pyx_v_inv, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.fFx_p", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pyx":272
 *         raise ValueError("Involute is invalid")
 * 
 * cpdef double fFy_p(double phi, geoVals geo, double theta, involute_index inv):             # <<<<<<<<<<<<<<
 *     """
 *     The anti-derivative of the y-coordinate force term (Table 2)
 */

static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_17fFy_p(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static double __pyx_f_5PDSim_6scroll_17common_scroll_geo_fFy_p(double __pyx_v_phi, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo, CYTHON_UNUSED double __pyx_v_theta, enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index __pyx_v_inv, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("fFy_p", 0);
  __Pyx_TraceCall("fFy_p", __pyx_f[0], 272, 0, __PYX_ERR(0, 272, __pyx_L1_error));

  /* "PDSim/scroll/common_scroll_geo.pyx":287
 *         The key for the involute to be considered
 *     """
 *     if inv == INVOLUTE_FI:             # <<<<<<<<<<<<<<
 *         return geo.h*geo.rb*((geo.phi_fi0-phi)*sin(phi)-cos(phi))
 *     elif inv == INVOLUTE_OO:
 */
  switch (__pyx_v_inv) {
    case __pyx_e_5PDSim_6scroll_17common_scroll_geo_INVOLUTE_FI:

    /* "PDSim/scroll/common_scroll_geo.pyx":288
 *     """
 *     if inv == INVOLUTE_FI:
 *         return geo.h*geo.rb*((geo.phi_fi0-phi)*sin(phi)-cos(phi))             # <<<<<<<<<<<<<<
 *     elif inv == INVOLUTE_OO:
 *         return geo.h*geo.rb*((geo.phi_oo0-phi)*sin(phi)-cos(phi))
 */
    __pyx_r = ((__pyx_v_geo->h * __pyx_v_geo->rb) * (((__pyx_v_geo->phi_fi0 - __pyx_v_phi) * sin(__pyx_v_phi)) - cos(__pyx_v_phi)));
    goto __pyx_L0;

    /* "PDSim/scroll/common_scroll_geo.pyx":287
 *         The key for the involute to be considered
 *     """
 *     if inv == INVOLUTE_FI:             # <<<<<<<<<<<<<<
 *         return geo.h*geo.rb*((geo.phi_fi0-phi)*sin(phi)-cos(phi))
 *     elif inv == INVOLUTE_OO:
 */
    break;
    case __pyx_e_5PDSim_6scroll_17common_scroll_geo_INVOLUTE_OO:

    /* "PDSim/scroll/common_scroll_geo.pyx":290
 *         return geo.h*geo.rb*((geo.phi_fi0-phi)*sin(phi)-cos(phi))
 *     elif inv == INVOLUTE_OO:
 *         return geo.h*geo.rb*((geo.phi_oo0-phi)*sin(phi)-cos(phi))             # <<<<<<<<<<<<<<
 *     elif inv == INVOLUTE_FO:
 *         return geo.h*geo.rb*((phi-geo.phi_fo0)*sin(phi)+cos(phi))
 */
    __pyx_r = ((__pyx_v_geo->h * __pyx_v_geo->rb) * (((__pyx_v_geo->phi_oo0 - __pyx_v_phi) * sin(__pyx_v_phi)) - cos(__pyx_v_phi)));
    goto __pyx_L0;

    /* "PDSim/scroll/common_scroll_geo.pyx":289
 *     if inv == INVOLUTE_FI:
 *         return geo.h*geo.rb*((geo.phi_fi0-phi)*sin(phi)-cos(phi))
 *     elif inv == INVOLUTE_OO:             # <<<<<<<<<<<<<<
 *         return geo.h*geo.rb*((geo.phi_oo0-phi)*sin(phi)-cos(phi))
 *     elif inv == INVOLUTE_FO:
 */
    break;
    case __pyx_e_5PDSim_6scroll_17common_scroll_geo_INVOLUTE_FO:

    /* "PDSim/scroll/common_scroll_geo.pyx":292
 *         return geo.h*geo.rb*((geo.phi_oo0-phi)*sin(phi)-cos(phi))
 *     elif inv == INVOLUTE_FO:
 *         return geo.h*geo.rb*((phi-geo.phi_fo0)*sin(phi)+cos(phi))             # <<<<<<<<<<<<<<
 *     elif inv == INVOLUTE_OI:
 *         return geo.h*geo.rb*((phi-geo.phi_oi0)*sin(phi)+cos(phi))
 */
    __pyx_r = ((__pyx_v_geo->h * __pyx_v_geo->rb) * (((__pyx_v_phi - __pyx_v_geo->phi_fo0) * sin(__pyx_v_phi)) + cos(__pyx_v_phi)));
    goto __pyx_L0;

    /* "PDSim/scroll/common_scroll_geo.pyx":291
 *     elif inv == INVOLUTE_OO:
 *         return geo.h*geo.rb*((geo.phi_oo0-phi)*sin(phi)-cos(phi))
 *     elif inv == INVOLUTE_FO:             # <<<<<<<<<<<<<<
 *         return geo.h*geo.rb*((phi-geo.phi_fo0)*sin(phi)+cos(phi))
 *     elif inv == INVOLUTE_OI:
 */
    break;
    case __pyx_e_5PDSim_6scroll_17common_scroll_geo_INVOLUTE_OI:

    /* "PDSim/scroll/common_scroll_geo.pyx":294
 *         return geo.h*geo.rb*((phi-geo.phi_fo0)*sin(phi)+cos(phi))
 *     elif inv == INVOLUTE_OI:
 *         return geo.h*geo.rb*((phi-geo.phi_oi0)*sin(phi)+cos(phi))             # <<<<<<<<<<<<<<
 *     else:
 *         raise ValueError("Involute is invalid")
 */
    __pyx_r = ((__pyx_v_geo->h * __pyx_v_geo->rb) * (((__pyx_v_phi - __pyx_v_geo->phi_oi0) * sin(__pyx_v_phi)) + cos(__pyx_v_phi)));
    goto __pyx_L0;

    /* "PDSim/scroll/common_scroll_geo.pyx":293
 *     elif inv == INVOLUTE_FO:
 *         return geo.h*geo.rb*((phi-geo.phi_fo0)*sin(phi)+cos(phi))
 *     elif inv == INVOLUTE_OI:             # <<<<<<<<<<<<<<
 *         return geo.h*geo.rb*((phi-geo.phi_oi0)*sin(phi)+cos(phi))
 *     else:
 */
    break;
    default:

    /* "PDSim/scroll/common_scroll_geo.pyx":296
 *         return geo.h*geo.rb*((phi-geo.phi_oi0)*sin(phi)+cos(phi))
 *     else:
 *         raise ValueError("Involute is invalid")             # <<<<<<<<<<<<<<
 * 
 * cpdef double fMO_p(double phi, geoVals geo, double theta, involute_index inv):
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 296, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 296, __pyx_L1_error)
    break;
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":272
 *         raise ValueError("Involute is invalid")
 * 
 * cpdef double fFy_p(double phi, geoVals geo, double theta, involute_index inv):             # <<<<<<<<<<<<<<
 *     """
 *     The anti-derivative of the y-coordinate force term (Table 2)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_WriteUnraisable("PDSim.scroll.common_scroll_geo.fFy_p", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_17fFy_p(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5PDSim_6scroll_17common_scroll_geo_16fFy_p[] = "fFy_p(double phi, geoVals geo, double theta, involute_index inv) -> double\n\n    The anti-derivative of the y-coordinate force term (Table 2)\n    \n    Parameters\n    ----------\n    phi : float\n        The involute angle\n    geo : geoVals\n        The structure with the geometry obtained from get_geo()\n    theta : float\n        The crank angle, between 0 and 2*pi\n    inv : involute_index\n        The key for the involute to be considered\n    ";
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_17fFy_p(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_phi;
  struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo = 0;
  double __pyx_v_theta;
  enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index __pyx_v_inv;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fFy_p (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_phi,&__pyx_n_s_geo,&__pyx_n_s_theta,&__pyx_n_s_inv,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_phi)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_geo)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("fFy_p", 1, 4, 4, 1); __PYX_ERR(0, 272, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_theta)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("fFy_p", 1, 4, 4, 2); __PYX_ERR(0, 272, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inv)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("fFy_p", 1, 4, 4, 3); __PYX_ERR(0, 272, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fFy_p") < 0)) __PYX_ERR(0, 272, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_phi = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_phi == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 272, __pyx_L3_error)
    __pyx_v_geo = ((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)values[1]);
    __pyx_v_theta = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_theta == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 272, __pyx_L3_error)
    __pyx_v_inv = ((enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index)__Pyx_PyInt_As_enum____pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index(values[3])); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 272, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("fFy_p", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 272, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.fFy_p", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_geo), __pyx_ptype_5PDSim_6scroll_17common_scroll_geo_geoVals, 1, "geo", 0))) __PYX_ERR(0, 272, __pyx_L1_error)
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_16fFy_p(__pyx_self, __pyx_v_phi, __pyx_v_geo, __pyx_v_theta, __pyx_v_inv);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_16fFy_p(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_phi, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo, double __pyx_v_theta, enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index __pyx_v_inv) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("fFy_p", 0);
  __Pyx_TraceCall("fFy_p (wrapper)", __pyx_f[0], 272, 0, __PYX_ERR(0, 272, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_f_5PDSim_6scroll_17common_scroll_geo_fFy_p(__pyx_v_phi, __pyx_v_geo, __pyx_v_theta, __pyx_v_inv, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.fFy_p", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pyx":298
 *         raise ValueError("Involute is invalid")
 * 
 * cpdef double fMO_p(double phi, geoVals geo, double theta, involute_index inv):             # <<<<<<<<<<<<<<
 *     """
 *     The anti-derivative of the spinning moment calculation (Table 2)
 */

static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_19fMO_p(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static double __pyx_f_5PDSim_6scroll_17common_scroll_geo_fMO_p(double __pyx_v_phi, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo, CYTHON_UNUSED double __pyx_v_theta, enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index __pyx_v_inv, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fMO_p", 0);
  __Pyx_TraceCall("fMO_p", __pyx_f[0], 298, 0, __PYX_ERR(0, 298, __pyx_L1_error));

  /* "PDSim/scroll/common_scroll_geo.pyx":313
 *         The key for the involute to be considered
 *     """
 *     if inv == INVOLUTE_OO:             # <<<<<<<<<<<<<<
 *         return geo.h*geo.rb**2*phi/2.0*(phi-2*geo.phi_oo0)
 *     elif inv == INVOLUTE_OI:
 */
  switch (__pyx_v_inv) {
    case __pyx_e_5PDSim_6scroll_17common_scroll_geo_INVOLUTE_OO:

    /* "PDSim/scroll/common_scroll_geo.pyx":314
 *     """
 *     if inv == INVOLUTE_OO:
 *         return geo.h*geo.rb**2*phi/2.0*(phi-2*geo.phi_oo0)             # <<<<<<<<<<<<<<
 *     elif inv == INVOLUTE_OI:
 *         return -geo.h*geo.rb**2*phi/2.0*(phi-2*geo.phi_oi0)
 */
    __pyx_r = ((((__pyx_v_geo->h * pow(__pyx_v_geo->rb, 2.0)) * __pyx_v_phi) / 2.0) * (__pyx_v_phi - (2.0 * __pyx_v_geo->phi_oo0)));
    goto __pyx_L0;

    /* "PDSim/scroll/common_scroll_geo.pyx":313
 *         The key for the involute to be considered
 *     """
 *     if inv == INVOLUTE_OO:             # <<<<<<<<<<<<<<
 *         return geo.h*geo.rb**2*phi/2.0*(phi-2*geo.phi_oo0)
 *     elif inv == INVOLUTE_OI:
 */
    break;
    case __pyx_e_5PDSim_6scroll_17common_scroll_geo_INVOLUTE_OI:

    /* "PDSim/scroll/common_scroll_geo.pyx":316
 *         return geo.h*geo.rb**2*phi/2.0*(phi-2*geo.phi_oo0)
 *     elif inv == INVOLUTE_OI:
 *         return -geo.h*geo.rb**2*phi/2.0*(phi-2*geo.phi_oi0)             # <<<<<<<<<<<<<<
 *     else:
 *         return 1e99
 */
    __pyx_r = (((((-__pyx_v_geo->h) * pow(__pyx_v_geo->rb, 2.0)) * __pyx_v_phi) / 2.0) * (__pyx_v_phi - (2.0 * __pyx_v_geo->phi_oi0)));
    goto __pyx_L0;

    /* "PDSim/scroll/common_scroll_geo.pyx":315
 *     if inv == INVOLUTE_OO:
 *         return geo.h*geo.rb**2*phi/2.0*(phi-2*geo.phi_oo0)
 *     elif inv == INVOLUTE_OI:             # <<<<<<<<<<<<<<
 *         return -geo.h*geo.rb**2*phi/2.0*(phi-2*geo.phi_oi0)
 *     else:
 */
    break;
    default:

    /* "PDSim/scroll/common_scroll_geo.pyx":318
 *         return -geo.h*geo.rb**2*phi/2.0*(phi-2*geo.phi_oi0)
 *     else:
 *         return 1e99             # <<<<<<<<<<<<<<
 * 
 * cpdef bytes involute_index_to_key(int index):
 */
    __pyx_r = 1e99;
    goto __pyx_L0;
    break;
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":298
 *         raise ValueError("Involute is invalid")
 * 
 * cpdef double fMO_p(double phi, geoVals geo, double theta, involute_index inv):             # <<<<<<<<<<<<<<
 *     """
 *     The anti-derivative of the spinning moment calculation (Table 2)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("PDSim.scroll.common_scroll_geo.fMO_p", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_19fMO_p(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5PDSim_6scroll_17common_scroll_geo_18fMO_p[] = "fMO_p(double phi, geoVals geo, double theta, involute_index inv) -> double\n\n    The anti-derivative of the spinning moment calculation (Table 2)\n    \n    Parameters\n    ----------\n    phi : float\n        The involute angle\n    geo : geoVals\n        The structure with the geometry obtained from get_geo()\n    theta : float\n        The crank angle, between 0 and 2*pi\n    inv : involute_index\n        The key for the involute to be considered\n    ";
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_19fMO_p(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_phi;
  struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo = 0;
  double __pyx_v_theta;
  enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index __pyx_v_inv;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fMO_p (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_phi,&__pyx_n_s_geo,&__pyx_n_s_theta,&__pyx_n_s_inv,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_phi)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_geo)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("fMO_p", 1, 4, 4, 1); __PYX_ERR(0, 298, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_theta)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("fMO_p", 1, 4, 4, 2); __PYX_ERR(0, 298, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inv)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("fMO_p", 1, 4, 4, 3); __PYX_ERR(0, 298, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fMO_p") < 0)) __PYX_ERR(0, 298, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_phi = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_phi == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 298, __pyx_L3_error)
    __pyx_v_geo = ((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)values[1]);
    __pyx_v_theta = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_theta == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 298, __pyx_L3_error)
    __pyx_v_inv = ((enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index)__Pyx_PyInt_As_enum____pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index(values[3])); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 298, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("fMO_p", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 298, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.fMO_p", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_geo), __pyx_ptype_5PDSim_6scroll_17common_scroll_geo_geoVals, 1, "geo", 0))) __PYX_ERR(0, 298, __pyx_L1_error)
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_18fMO_p(__pyx_self, __pyx_v_phi, __pyx_v_geo, __pyx_v_theta, __pyx_v_inv);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_18fMO_p(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_phi, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo, double __pyx_v_theta, enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index __pyx_v_inv) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("fMO_p", 0);
  __Pyx_TraceCall("fMO_p (wrapper)", __pyx_f[0], 298, 0, __PYX_ERR(0, 298, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_f_5PDSim_6scroll_17common_scroll_geo_fMO_p(__pyx_v_phi, __pyx_v_geo, __pyx_v_theta, __pyx_v_inv, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.fMO_p", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pyx":320
 *         return 1e99
 * 
 * cpdef bytes involute_index_to_key(int index):             # <<<<<<<<<<<<<<
 *     """
 *     Return the string associated with a given index from the common_scroll_geo.involute_index enumeration
 */

static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_21involute_index_to_key(PyObject *__pyx_self, PyObject *__pyx_arg_index); /*proto*/
static PyObject *__pyx_f_5PDSim_6scroll_17common_scroll_geo_involute_index_to_key(int __pyx_v_index, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("involute_index_to_key", 0);
  __Pyx_TraceCall("involute_index_to_key", __pyx_f[0], 320, 0, __PYX_ERR(0, 320, __pyx_L1_error));

  /* "PDSim/scroll/common_scroll_geo.pyx":325
 *     """
 * 
 *     if index == INVOLUTE_FI:             # <<<<<<<<<<<<<<
 *         return bytes('fi')
 *     elif index == INVOLUTE_FO:
 */
  switch (__pyx_v_index) {
    case __pyx_e_5PDSim_6scroll_17common_scroll_geo_INVOLUTE_FI:

    /* "PDSim/scroll/common_scroll_geo.pyx":326
 * 
 *     if index == INVOLUTE_FI:
 *         return bytes('fi')             # <<<<<<<<<<<<<<
 *     elif index == INVOLUTE_FO:
 *         return bytes('fo')
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 326, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "PDSim/scroll/common_scroll_geo.pyx":325
 *     """
 * 
 *     if index == INVOLUTE_FI:             # <<<<<<<<<<<<<<
 *         return bytes('fi')
 *     elif index == INVOLUTE_FO:
 */
    break;
    case __pyx_e_5PDSim_6scroll_17common_scroll_geo_INVOLUTE_FO:

    /* "PDSim/scroll/common_scroll_geo.pyx":328
 *         return bytes('fi')
 *     elif index == INVOLUTE_FO:
 *         return bytes('fo')             # <<<<<<<<<<<<<<
 *     elif index == INVOLUTE_OI:
 *         return bytes('oi')
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 328, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "PDSim/scroll/common_scroll_geo.pyx":327
 *     if index == INVOLUTE_FI:
 *         return bytes('fi')
 *     elif index == INVOLUTE_FO:             # <<<<<<<<<<<<<<
 *         return bytes('fo')
 *     elif index == INVOLUTE_OI:
 */
    break;
    case __pyx_e_5PDSim_6scroll_17common_scroll_geo_INVOLUTE_OI:

    /* "PDSim/scroll/common_scroll_geo.pyx":330
 *         return bytes('fo')
 *     elif index == INVOLUTE_OI:
 *         return bytes('oi')             # <<<<<<<<<<<<<<
 *     elif index == INVOLUTE_OO:
 *         return bytes('oo')
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 330, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "PDSim/scroll/common_scroll_geo.pyx":329
 *     elif index == INVOLUTE_FO:
 *         return bytes('fo')
 *     elif index == INVOLUTE_OI:             # <<<<<<<<<<<<<<
 *         return bytes('oi')
 *     elif index == INVOLUTE_OO:
 */
    break;
    case __pyx_e_5PDSim_6scroll_17common_scroll_geo_INVOLUTE_OO:

    /* "PDSim/scroll/common_scroll_geo.pyx":332
 *         return bytes('oi')
 *     elif index == INVOLUTE_OO:
 *         return bytes('oo')             # <<<<<<<<<<<<<<
 *     else:
 *         return bytes('')
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "PDSim/scroll/common_scroll_geo.pyx":331
 *     elif index == INVOLUTE_OI:
 *         return bytes('oi')
 *     elif index == INVOLUTE_OO:             # <<<<<<<<<<<<<<
 *         return bytes('oo')
 *     else:
 */
    break;
    default:

    /* "PDSim/scroll/common_scroll_geo.pyx":334
 *         return bytes('oo')
 *     else:
 *         return bytes('')             # <<<<<<<<<<<<<<
 * 
 * cpdef double Gr(double phi, geoVals geo, double theta, int inv):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 334, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;
    break;
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":320
 *         return 1e99
 * 
 * cpdef bytes involute_index_to_key(int index):             # <<<<<<<<<<<<<<
 *     """
 *     Return the string associated with a given index from the common_scroll_geo.involute_index enumeration
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.involute_index_to_key", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_21involute_index_to_key(PyObject *__pyx_self, PyObject *__pyx_arg_index); /*proto*/
static char __pyx_doc_5PDSim_6scroll_17common_scroll_geo_20involute_index_to_key[] = "involute_index_to_key(int index) -> bytes\n\n    Return the string associated with a given index from the common_scroll_geo.involute_index enumeration\n    ";
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_21involute_index_to_key(PyObject *__pyx_self, PyObject *__pyx_arg_index) {
  int __pyx_v_index;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("involute_index_to_key (wrapper)", 0);
  assert(__pyx_arg_index); {
    __pyx_v_index = __Pyx_PyInt_As_int(__pyx_arg_index); if (unlikely((__pyx_v_index == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 320, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.involute_index_to_key", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_20involute_index_to_key(__pyx_self, ((int)__pyx_v_index));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_20involute_index_to_key(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_index) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("involute_index_to_key", 0);
  __Pyx_TraceCall("involute_index_to_key (wrapper)", __pyx_f[0], 320, 0, __PYX_ERR(0, 320, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5PDSim_6scroll_17common_scroll_geo_involute_index_to_key(__pyx_v_index, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 320, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.involute_index_to_key", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pyx":336
 *         return bytes('')
 * 
 * cpdef double Gr(double phi, geoVals geo, double theta, int inv):             # <<<<<<<<<<<<<<
 *     """
 *     The antiderivative of the area integration term, where
 */

static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_23Gr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static double __pyx_f_5PDSim_6scroll_17common_scroll_geo_Gr(double __pyx_v_phi, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo, double __pyx_v_theta, int __pyx_v_inv, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_v_theta_m;
  double __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Gr", 0);
  __Pyx_TraceCall("Gr", __pyx_f[0], 336, 0, __PYX_ERR(0, 336, __pyx_L1_error));

  /* "PDSim/scroll/common_scroll_geo.pyx":344
 *         Gr \\equiv \\int\\left[\\left(-y\\frac{dx(\\phi)}{d\\phi}+x\\frac{dy(\\phi)}{d\\phi}\\right)d\\phi\\right]
 *     """
 *     theta_m = geo.phi_fie - theta + 3.0*pi/2.0             # <<<<<<<<<<<<<<
 *     if inv == INVOLUTE_FI:
 *         return phi*geo.rb**2*(phi**2 - 3*phi*geo.phi_fi0 + 3*geo.phi_fi0**2)/3
 */
  __pyx_v_theta_m = ((__pyx_v_geo->phi_fie - __pyx_v_theta) + ((3.0 * M_PI) / 2.0));

  /* "PDSim/scroll/common_scroll_geo.pyx":345
 *     """
 *     theta_m = geo.phi_fie - theta + 3.0*pi/2.0
 *     if inv == INVOLUTE_FI:             # <<<<<<<<<<<<<<
 *         return phi*geo.rb**2*(phi**2 - 3*phi*geo.phi_fi0 + 3*geo.phi_fi0**2)/3
 *     elif inv == INVOLUTE_FO:
 */
  switch (__pyx_v_inv) {
    case __pyx_e_5PDSim_6scroll_17common_scroll_geo_INVOLUTE_FI:

    /* "PDSim/scroll/common_scroll_geo.pyx":346
 *     theta_m = geo.phi_fie - theta + 3.0*pi/2.0
 *     if inv == INVOLUTE_FI:
 *         return phi*geo.rb**2*(phi**2 - 3*phi*geo.phi_fi0 + 3*geo.phi_fi0**2)/3             # <<<<<<<<<<<<<<
 *     elif inv == INVOLUTE_FO:
 *         return phi*geo.rb**2*(phi**2 - 3*phi*geo.phi_fo0 + 3*geo.phi_fo0**2)/3
 */
    __pyx_r = (((__pyx_v_phi * pow(__pyx_v_geo->rb, 2.0)) * ((pow(__pyx_v_phi, 2.0) - ((3.0 * __pyx_v_phi) * __pyx_v_geo->phi_fi0)) + (3.0 * pow(__pyx_v_geo->phi_fi0, 2.0)))) / 3.0);
    goto __pyx_L0;

    /* "PDSim/scroll/common_scroll_geo.pyx":345
 *     """
 *     theta_m = geo.phi_fie - theta + 3.0*pi/2.0
 *     if inv == INVOLUTE_FI:             # <<<<<<<<<<<<<<
 *         return phi*geo.rb**2*(phi**2 - 3*phi*geo.phi_fi0 + 3*geo.phi_fi0**2)/3
 *     elif inv == INVOLUTE_FO:
 */
    break;
    case __pyx_e_5PDSim_6scroll_17common_scroll_geo_INVOLUTE_FO:

    /* "PDSim/scroll/common_scroll_geo.pyx":348
 *         return phi*geo.rb**2*(phi**2 - 3*phi*geo.phi_fi0 + 3*geo.phi_fi0**2)/3
 *     elif inv == INVOLUTE_FO:
 *         return phi*geo.rb**2*(phi**2 - 3*phi*geo.phi_fo0 + 3*geo.phi_fo0**2)/3             # <<<<<<<<<<<<<<
 *     elif inv == INVOLUTE_OI:
 *         return geo.rb*(phi**3*geo.rb - 3*phi**2*geo.phi_oi0*geo.rb
 */
    __pyx_r = (((__pyx_v_phi * pow(__pyx_v_geo->rb, 2.0)) * ((pow(__pyx_v_phi, 2.0) - ((3.0 * __pyx_v_phi) * __pyx_v_geo->phi_fo0)) + (3.0 * pow(__pyx_v_geo->phi_fo0, 2.0)))) / 3.0);
    goto __pyx_L0;

    /* "PDSim/scroll/common_scroll_geo.pyx":347
 *     if inv == INVOLUTE_FI:
 *         return phi*geo.rb**2*(phi**2 - 3*phi*geo.phi_fi0 + 3*geo.phi_fi0**2)/3
 *     elif inv == INVOLUTE_FO:             # <<<<<<<<<<<<<<
 *         return phi*geo.rb**2*(phi**2 - 3*phi*geo.phi_fo0 + 3*geo.phi_fo0**2)/3
 *     elif inv == INVOLUTE_OI:
 */
    break;
    case __pyx_e_5PDSim_6scroll_17common_scroll_geo_INVOLUTE_OI:

    /* "PDSim/scroll/common_scroll_geo.pyx":353
 *                        + 3*phi*geo.phi_oi0**2*geo.rb
 *                        + 3*(phi-geo.phi_oi0)*geo.ro*cos(phi - theta_m)
 *                        - 3*geo.ro*sin(phi - theta_m))/3             # <<<<<<<<<<<<<<
 *     elif inv == INVOLUTE_OO:
 *         return geo.rb*(phi**3*geo.rb - 3*phi**2*geo.phi_oo0*geo.rb
 */
    __pyx_r = ((__pyx_v_geo->rb * (((((pow(__pyx_v_phi, 3.0) * __pyx_v_geo->rb) - (((3.0 * pow(__pyx_v_phi, 2.0)) * __pyx_v_geo->phi_oi0) * __pyx_v_geo->rb)) + (((3.0 * __pyx_v_phi) * pow(__pyx_v_geo->phi_oi0, 2.0)) * __pyx_v_geo->rb)) + (((3.0 * (__pyx_v_phi - __pyx_v_geo->phi_oi0)) * __pyx_v_geo->ro) * cos((__pyx_v_phi - __pyx_v_theta_m)))) - ((3.0 * __pyx_v_geo->ro) * sin((__pyx_v_phi - __pyx_v_theta_m))))) / 3.0);
    goto __pyx_L0;

    /* "PDSim/scroll/common_scroll_geo.pyx":349
 *     elif inv == INVOLUTE_FO:
 *         return phi*geo.rb**2*(phi**2 - 3*phi*geo.phi_fo0 + 3*geo.phi_fo0**2)/3
 *     elif inv == INVOLUTE_OI:             # <<<<<<<<<<<<<<
 *         return geo.rb*(phi**3*geo.rb - 3*phi**2*geo.phi_oi0*geo.rb
 *                        + 3*phi*geo.phi_oi0**2*geo.rb
 */
    break;
    case __pyx_e_5PDSim_6scroll_17common_scroll_geo_INVOLUTE_OO:

    /* "PDSim/scroll/common_scroll_geo.pyx":358
 *                        + 3*phi*geo.phi_oo0**2*geo.rb
 *                        + 3*(phi-geo.phi_oo0)*geo.ro*cos(phi - theta_m)
 *                        - 3*geo.ro*sin(phi - theta_m))/3             # <<<<<<<<<<<<<<
 * 
 * cpdef double dGr_dphi(double phi, geoVals geo, double theta, int inv):
 */
    __pyx_r = ((__pyx_v_geo->rb * (((((pow(__pyx_v_phi, 3.0) * __pyx_v_geo->rb) - (((3.0 * pow(__pyx_v_phi, 2.0)) * __pyx_v_geo->phi_oo0) * __pyx_v_geo->rb)) + (((3.0 * __pyx_v_phi) * pow(__pyx_v_geo->phi_oo0, 2.0)) * __pyx_v_geo->rb)) + (((3.0 * (__pyx_v_phi - __pyx_v_geo->phi_oo0)) * __pyx_v_geo->ro) * cos((__pyx_v_phi - __pyx_v_theta_m)))) - ((3.0 * __pyx_v_geo->ro) * sin((__pyx_v_phi - __pyx_v_theta_m))))) / 3.0);
    goto __pyx_L0;

    /* "PDSim/scroll/common_scroll_geo.pyx":354
 *                        + 3*(phi-geo.phi_oi0)*geo.ro*cos(phi - theta_m)
 *                        - 3*geo.ro*sin(phi - theta_m))/3
 *     elif inv == INVOLUTE_OO:             # <<<<<<<<<<<<<<
 *         return geo.rb*(phi**3*geo.rb - 3*phi**2*geo.phi_oo0*geo.rb
 *                        + 3*phi*geo.phi_oo0**2*geo.rb
 */
    break;
    default: break;
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":336
 *         return bytes('')
 * 
 * cpdef double Gr(double phi, geoVals geo, double theta, int inv):             # <<<<<<<<<<<<<<
 *     """
 *     The antiderivative of the area integration term, where
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("PDSim.scroll.common_scroll_geo.Gr", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_23Gr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5PDSim_6scroll_17common_scroll_geo_22Gr[] = "Gr(double phi, geoVals geo, double theta, int inv) -> double\n\n    The antiderivative of the area integration term, where \n    \n    .. math::\n    \n        Gr \\equiv \\int\\left[\\left(-y\\frac{dx(\\phi)}{d\\phi}+x\\frac{dy(\\phi)}{d\\phi}\\right)d\\phi\\right]\n    ";
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_23Gr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_phi;
  struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo = 0;
  double __pyx_v_theta;
  int __pyx_v_inv;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Gr (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_phi,&__pyx_n_s_geo,&__pyx_n_s_theta,&__pyx_n_s_inv,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_phi)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_geo)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("Gr", 1, 4, 4, 1); __PYX_ERR(0, 336, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_theta)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("Gr", 1, 4, 4, 2); __PYX_ERR(0, 336, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inv)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("Gr", 1, 4, 4, 3); __PYX_ERR(0, 336, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Gr") < 0)) __PYX_ERR(0, 336, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_phi = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_phi == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
    __pyx_v_geo = ((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)values[1]);
    __pyx_v_theta = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_theta == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
    __pyx_v_inv = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_inv == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("Gr", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 336, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.Gr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_geo), __pyx_ptype_5PDSim_6scroll_17common_scroll_geo_geoVals, 1, "geo", 0))) __PYX_ERR(0, 336, __pyx_L1_error)
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_22Gr(__pyx_self, __pyx_v_phi, __pyx_v_geo, __pyx_v_theta, __pyx_v_inv);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_22Gr(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_phi, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo, double __pyx_v_theta, int __pyx_v_inv) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("Gr", 0);
  __Pyx_TraceCall("Gr (wrapper)", __pyx_f[0], 336, 0, __PYX_ERR(0, 336, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_f_5PDSim_6scroll_17common_scroll_geo_Gr(__pyx_v_phi, __pyx_v_geo, __pyx_v_theta, __pyx_v_inv, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 336, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.Gr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pyx":360
 *                        - 3*geo.ro*sin(phi - theta_m))/3
 * 
 * cpdef double dGr_dphi(double phi, geoVals geo, double theta, int inv):             # <<<<<<<<<<<<<<
 *     """
 *     The partial derivative of Gr with respect to phi with theta held constant
 */

static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_25dGr_dphi(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static double __pyx_f_5PDSim_6scroll_17common_scroll_geo_dGr_dphi(double __pyx_v_phi, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo, double __pyx_v_theta, int __pyx_v_inv, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_v_THETA;
  double __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dGr_dphi", 0);
  __Pyx_TraceCall("dGr_dphi", __pyx_f[0], 360, 0, __PYX_ERR(0, 360, __pyx_L1_error));

  /* "PDSim/scroll/common_scroll_geo.pyx":365
 *     """
 * 
 *     THETA = geo.phi_fie - theta - pi/2.0             # <<<<<<<<<<<<<<
 * 
 *     if inv == INVOLUTE_FI:
 */
  __pyx_v_THETA = ((__pyx_v_geo->phi_fie - __pyx_v_theta) - (((double)M_PI) / 2.0));

  /* "PDSim/scroll/common_scroll_geo.pyx":367
 *     THETA = geo.phi_fie - theta - pi/2.0
 * 
 *     if inv == INVOLUTE_FI:             # <<<<<<<<<<<<<<
 *         return geo.rb**2*(phi - geo.phi_fi0)**2
 *     elif inv == INVOLUTE_FO:
 */
  switch (__pyx_v_inv) {
    case __pyx_e_5PDSim_6scroll_17common_scroll_geo_INVOLUTE_FI:

    /* "PDSim/scroll/common_scroll_geo.pyx":368
 * 
 *     if inv == INVOLUTE_FI:
 *         return geo.rb**2*(phi - geo.phi_fi0)**2             # <<<<<<<<<<<<<<
 *     elif inv == INVOLUTE_FO:
 *         return geo.rb**2*(phi - geo.phi_fo0)**2
 */
    __pyx_r = (pow(__pyx_v_geo->rb, 2.0) * pow((__pyx_v_phi - __pyx_v_geo->phi_fi0), 2.0));
    goto __pyx_L0;

    /* "PDSim/scroll/common_scroll_geo.pyx":367
 *     THETA = geo.phi_fie - theta - pi/2.0
 * 
 *     if inv == INVOLUTE_FI:             # <<<<<<<<<<<<<<
 *         return geo.rb**2*(phi - geo.phi_fi0)**2
 *     elif inv == INVOLUTE_FO:
 */
    break;
    case __pyx_e_5PDSim_6scroll_17common_scroll_geo_INVOLUTE_FO:

    /* "PDSim/scroll/common_scroll_geo.pyx":370
 *         return geo.rb**2*(phi - geo.phi_fi0)**2
 *     elif inv == INVOLUTE_FO:
 *         return geo.rb**2*(phi - geo.phi_fo0)**2             # <<<<<<<<<<<<<<
 *     elif inv == INVOLUTE_OI:
 *         return geo.rb*(geo.rb*(phi - geo.phi_oi0)**2 + (phi- geo.phi_oi0)*geo.ro*sin(THETA - phi))
 */
    __pyx_r = (pow(__pyx_v_geo->rb, 2.0) * pow((__pyx_v_phi - __pyx_v_geo->phi_fo0), 2.0));
    goto __pyx_L0;

    /* "PDSim/scroll/common_scroll_geo.pyx":369
 *     if inv == INVOLUTE_FI:
 *         return geo.rb**2*(phi - geo.phi_fi0)**2
 *     elif inv == INVOLUTE_FO:             # <<<<<<<<<<<<<<
 *         return geo.rb**2*(phi - geo.phi_fo0)**2
 *     elif inv == INVOLUTE_OI:
 */
    break;
    case __pyx_e_5PDSim_6scroll_17common_scroll_geo_INVOLUTE_OI:

    /* "PDSim/scroll/common_scroll_geo.pyx":372
 *         return geo.rb**2*(phi - geo.phi_fo0)**2
 *     elif inv == INVOLUTE_OI:
 *         return geo.rb*(geo.rb*(phi - geo.phi_oi0)**2 + (phi- geo.phi_oi0)*geo.ro*sin(THETA - phi))             # <<<<<<<<<<<<<<
 *     elif inv == INVOLUTE_OO:
 *         return geo.rb*(geo.rb*(phi - geo.phi_oo0)**2 + (phi- geo.phi_oo0)*geo.ro*sin(THETA - phi))
 */
    __pyx_r = (__pyx_v_geo->rb * ((__pyx_v_geo->rb * pow((__pyx_v_phi - __pyx_v_geo->phi_oi0), 2.0)) + (((__pyx_v_phi - __pyx_v_geo->phi_oi0) * __pyx_v_geo->ro) * sin((__pyx_v_THETA - __pyx_v_phi)))));
    goto __pyx_L0;

    /* "PDSim/scroll/common_scroll_geo.pyx":371
 *     elif inv == INVOLUTE_FO:
 *         return geo.rb**2*(phi - geo.phi_fo0)**2
 *     elif inv == INVOLUTE_OI:             # <<<<<<<<<<<<<<
 *         return geo.rb*(geo.rb*(phi - geo.phi_oi0)**2 + (phi- geo.phi_oi0)*geo.ro*sin(THETA - phi))
 *     elif inv == INVOLUTE_OO:
 */
    break;
    case __pyx_e_5PDSim_6scroll_17common_scroll_geo_INVOLUTE_OO:

    /* "PDSim/scroll/common_scroll_geo.pyx":374
 *         return geo.rb*(geo.rb*(phi - geo.phi_oi0)**2 + (phi- geo.phi_oi0)*geo.ro*sin(THETA - phi))
 *     elif inv == INVOLUTE_OO:
 *         return geo.rb*(geo.rb*(phi - geo.phi_oo0)**2 + (phi- geo.phi_oo0)*geo.ro*sin(THETA - phi))             # <<<<<<<<<<<<<<
 * 
 * cpdef double dGr_dtheta(double phi, geoVals geo, double theta, int inv):
 */
    __pyx_r = (__pyx_v_geo->rb * ((__pyx_v_geo->rb * pow((__pyx_v_phi - __pyx_v_geo->phi_oo0), 2.0)) + (((__pyx_v_phi - __pyx_v_geo->phi_oo0) * __pyx_v_geo->ro) * sin((__pyx_v_THETA - __pyx_v_phi)))));
    goto __pyx_L0;

    /* "PDSim/scroll/common_scroll_geo.pyx":373
 *     elif inv == INVOLUTE_OI:
 *         return geo.rb*(geo.rb*(phi - geo.phi_oi0)**2 + (phi- geo.phi_oi0)*geo.ro*sin(THETA - phi))
 *     elif inv == INVOLUTE_OO:             # <<<<<<<<<<<<<<
 *         return geo.rb*(geo.rb*(phi - geo.phi_oo0)**2 + (phi- geo.phi_oo0)*geo.ro*sin(THETA - phi))
 * 
 */
    break;
    default: break;
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":360
 *                        - 3*geo.ro*sin(phi - theta_m))/3
 * 
 * cpdef double dGr_dphi(double phi, geoVals geo, double theta, int inv):             # <<<<<<<<<<<<<<
 *     """
 *     The partial derivative of Gr with respect to phi with theta held constant
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("PDSim.scroll.common_scroll_geo.dGr_dphi", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_25dGr_dphi(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5PDSim_6scroll_17common_scroll_geo_24dGr_dphi[] = "dGr_dphi(double phi, geoVals geo, double theta, int inv) -> double\n\n    The partial derivative of Gr with respect to phi with theta held constant\n    ";
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_25dGr_dphi(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_phi;
  struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo = 0;
  double __pyx_v_theta;
  int __pyx_v_inv;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dGr_dphi (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_phi,&__pyx_n_s_geo,&__pyx_n_s_theta,&__pyx_n_s_inv,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_phi)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_geo)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("dGr_dphi", 1, 4, 4, 1); __PYX_ERR(0, 360, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_theta)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("dGr_dphi", 1, 4, 4, 2); __PYX_ERR(0, 360, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inv)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("dGr_dphi", 1, 4, 4, 3); __PYX_ERR(0, 360, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "dGr_dphi") < 0)) __PYX_ERR(0, 360, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_phi = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_phi == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 360, __pyx_L3_error)
    __pyx_v_geo = ((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)values[1]);
    __pyx_v_theta = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_theta == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 360, __pyx_L3_error)
    __pyx_v_inv = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_inv == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 360, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("dGr_dphi", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 360, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.dGr_dphi", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_geo), __pyx_ptype_5PDSim_6scroll_17common_scroll_geo_geoVals, 1, "geo", 0))) __PYX_ERR(0, 360, __pyx_L1_error)
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_24dGr_dphi(__pyx_self, __pyx_v_phi, __pyx_v_geo, __pyx_v_theta, __pyx_v_inv);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_24dGr_dphi(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_phi, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo, double __pyx_v_theta, int __pyx_v_inv) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("dGr_dphi", 0);
  __Pyx_TraceCall("dGr_dphi (wrapper)", __pyx_f[0], 360, 0, __PYX_ERR(0, 360, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_f_5PDSim_6scroll_17common_scroll_geo_dGr_dphi(__pyx_v_phi, __pyx_v_geo, __pyx_v_theta, __pyx_v_inv, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.dGr_dphi", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pyx":376
 *         return geo.rb*(geo.rb*(phi - geo.phi_oo0)**2 + (phi- geo.phi_oo0)*geo.ro*sin(THETA - phi))
 * 
 * cpdef double dGr_dtheta(double phi, geoVals geo, double theta, int inv):             # <<<<<<<<<<<<<<
 *     """
 *     The partial derivative of Gr with respect to theta with phi held constant
 */

static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_27dGr_dtheta(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static double __pyx_f_5PDSim_6scroll_17common_scroll_geo_dGr_dtheta(double __pyx_v_phi, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo, double __pyx_v_theta, int __pyx_v_inv, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_v_THETA;
  double __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dGr_dtheta", 0);
  __Pyx_TraceCall("dGr_dtheta", __pyx_f[0], 376, 0, __PYX_ERR(0, 376, __pyx_L1_error));

  /* "PDSim/scroll/common_scroll_geo.pyx":381
 *     """
 * 
 *     THETA = geo.phi_fie - theta - pi/2.0             # <<<<<<<<<<<<<<
 * 
 *     if inv == INVOLUTE_FI or inv == INVOLUTE_FO:
 */
  __pyx_v_THETA = ((__pyx_v_geo->phi_fie - __pyx_v_theta) - (((double)M_PI) / 2.0));

  /* "PDSim/scroll/common_scroll_geo.pyx":383
 *     THETA = geo.phi_fie - theta - pi/2.0
 * 
 *     if inv == INVOLUTE_FI or inv == INVOLUTE_FO:             # <<<<<<<<<<<<<<
 *         return 0.0
 *     elif inv == INVOLUTE_OI:
 */
  switch (__pyx_v_inv) {
    case __pyx_e_5PDSim_6scroll_17common_scroll_geo_INVOLUTE_FI:
    case __pyx_e_5PDSim_6scroll_17common_scroll_geo_INVOLUTE_FO:

    /* "PDSim/scroll/common_scroll_geo.pyx":384
 * 
 *     if inv == INVOLUTE_FI or inv == INVOLUTE_FO:
 *         return 0.0             # <<<<<<<<<<<<<<
 *     elif inv == INVOLUTE_OI:
 *         return geo.rb*geo.ro*((phi - geo.phi_oi0)*sin(THETA - phi) - cos(THETA - phi))
 */
    __pyx_r = 0.0;
    goto __pyx_L0;

    /* "PDSim/scroll/common_scroll_geo.pyx":383
 *     THETA = geo.phi_fie - theta - pi/2.0
 * 
 *     if inv == INVOLUTE_FI or inv == INVOLUTE_FO:             # <<<<<<<<<<<<<<
 *         return 0.0
 *     elif inv == INVOLUTE_OI:
 */
    break;
    case __pyx_e_5PDSim_6scroll_17common_scroll_geo_INVOLUTE_OI:

    /* "PDSim/scroll/common_scroll_geo.pyx":386
 *         return 0.0
 *     elif inv == INVOLUTE_OI:
 *         return geo.rb*geo.ro*((phi - geo.phi_oi0)*sin(THETA - phi) - cos(THETA - phi))             # <<<<<<<<<<<<<<
 *     elif inv == INVOLUTE_OO:
 *         return geo.rb*geo.ro*((phi - geo.phi_oo0)*sin(THETA - phi) - cos(THETA - phi))
 */
    __pyx_r = ((__pyx_v_geo->rb * __pyx_v_geo->ro) * (((__pyx_v_phi - __pyx_v_geo->phi_oi0) * sin((__pyx_v_THETA - __pyx_v_phi))) - cos((__pyx_v_THETA - __pyx_v_phi))));
    goto __pyx_L0;

    /* "PDSim/scroll/common_scroll_geo.pyx":385
 *     if inv == INVOLUTE_FI or inv == INVOLUTE_FO:
 *         return 0.0
 *     elif inv == INVOLUTE_OI:             # <<<<<<<<<<<<<<
 *         return geo.rb*geo.ro*((phi - geo.phi_oi0)*sin(THETA - phi) - cos(THETA - phi))
 *     elif inv == INVOLUTE_OO:
 */
    break;
    case __pyx_e_5PDSim_6scroll_17common_scroll_geo_INVOLUTE_OO:

    /* "PDSim/scroll/common_scroll_geo.pyx":388
 *         return geo.rb*geo.ro*((phi - geo.phi_oi0)*sin(THETA - phi) - cos(THETA - phi))
 *     elif inv == INVOLUTE_OO:
 *         return geo.rb*geo.ro*((phi - geo.phi_oo0)*sin(THETA - phi) - cos(THETA - phi))             # <<<<<<<<<<<<<<
 * 
 * cdef coords_inv_dtheta(double phi, geoVals geo, double theta, int inv, double *dx, double *dy):
 */
    __pyx_r = ((__pyx_v_geo->rb * __pyx_v_geo->ro) * (((__pyx_v_phi - __pyx_v_geo->phi_oo0) * sin((__pyx_v_THETA - __pyx_v_phi))) - cos((__pyx_v_THETA - __pyx_v_phi))));
    goto __pyx_L0;

    /* "PDSim/scroll/common_scroll_geo.pyx":387
 *     elif inv == INVOLUTE_OI:
 *         return geo.rb*geo.ro*((phi - geo.phi_oi0)*sin(THETA - phi) - cos(THETA - phi))
 *     elif inv == INVOLUTE_OO:             # <<<<<<<<<<<<<<
 *         return geo.rb*geo.ro*((phi - geo.phi_oo0)*sin(THETA - phi) - cos(THETA - phi))
 * 
 */
    break;
    default: break;
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":376
 *         return geo.rb*(geo.rb*(phi - geo.phi_oo0)**2 + (phi- geo.phi_oo0)*geo.ro*sin(THETA - phi))
 * 
 * cpdef double dGr_dtheta(double phi, geoVals geo, double theta, int inv):             # <<<<<<<<<<<<<<
 *     """
 *     The partial derivative of Gr with respect to theta with phi held constant
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("PDSim.scroll.common_scroll_geo.dGr_dtheta", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_27dGr_dtheta(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5PDSim_6scroll_17common_scroll_geo_26dGr_dtheta[] = "dGr_dtheta(double phi, geoVals geo, double theta, int inv) -> double\n\n    The partial derivative of Gr with respect to theta with phi held constant\n    ";
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_27dGr_dtheta(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_phi;
  struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo = 0;
  double __pyx_v_theta;
  int __pyx_v_inv;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dGr_dtheta (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_phi,&__pyx_n_s_geo,&__pyx_n_s_theta,&__pyx_n_s_inv,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_phi)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_geo)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("dGr_dtheta", 1, 4, 4, 1); __PYX_ERR(0, 376, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_theta)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("dGr_dtheta", 1, 4, 4, 2); __PYX_ERR(0, 376, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inv)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("dGr_dtheta", 1, 4, 4, 3); __PYX_ERR(0, 376, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "dGr_dtheta") < 0)) __PYX_ERR(0, 376, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_phi = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_phi == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 376, __pyx_L3_error)
    __pyx_v_geo = ((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)values[1]);
    __pyx_v_theta = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_theta == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 376, __pyx_L3_error)
    __pyx_v_inv = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_inv == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 376, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("dGr_dtheta", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 376, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.dGr_dtheta", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_geo), __pyx_ptype_5PDSim_6scroll_17common_scroll_geo_geoVals, 1, "geo", 0))) __PYX_ERR(0, 376, __pyx_L1_error)
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_26dGr_dtheta(__pyx_self, __pyx_v_phi, __pyx_v_geo, __pyx_v_theta, __pyx_v_inv);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_26dGr_dtheta(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_phi, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo, double __pyx_v_theta, int __pyx_v_inv) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("dGr_dtheta", 0);
  __Pyx_TraceCall("dGr_dtheta (wrapper)", __pyx_f[0], 376, 0, __PYX_ERR(0, 376, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_f_5PDSim_6scroll_17common_scroll_geo_dGr_dtheta(__pyx_v_phi, __pyx_v_geo, __pyx_v_theta, __pyx_v_inv, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.dGr_dtheta", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pyx":390
 *         return geo.rb*geo.ro*((phi - geo.phi_oo0)*sin(THETA - phi) - cos(THETA - phi))
 * 
 * cdef coords_inv_dtheta(double phi, geoVals geo, double theta, int inv, double *dx, double *dy):             # <<<<<<<<<<<<<<
 *     """
 *     Internal function that does the calculation if phi is a double variable
 */

static PyObject *__pyx_f_5PDSim_6scroll_17common_scroll_geo_coords_inv_dtheta(CYTHON_UNUSED double __pyx_v_phi, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo, double __pyx_v_theta, int __pyx_v_inv, double *__pyx_v_dx, double *__pyx_v_dy) {
  double __pyx_v_rb;
  double __pyx_v_ro;
  double __pyx_v_om;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("coords_inv_dtheta", 0);
  __Pyx_TraceCall("coords_inv_dtheta", __pyx_f[0], 390, 0, __PYX_ERR(0, 390, __pyx_L1_error));

  /* "PDSim/scroll/common_scroll_geo.pyx":395
 *     """
 * 
 *     rb = geo.rb             # <<<<<<<<<<<<<<
 *     ro = rb*(pi - geo.phi_fi0 + geo.phi_oo0)
 *     om = geo.phi_fie - theta + 3.0*pi/2.0
 */
  __pyx_t_1 = __pyx_v_geo->rb;
  __pyx_v_rb = __pyx_t_1;

  /* "PDSim/scroll/common_scroll_geo.pyx":396
 * 
 *     rb = geo.rb
 *     ro = rb*(pi - geo.phi_fi0 + geo.phi_oo0)             # <<<<<<<<<<<<<<
 *     om = geo.phi_fie - theta + 3.0*pi/2.0
 * 
 */
  __pyx_v_ro = (__pyx_v_rb * ((M_PI - __pyx_v_geo->phi_fi0) + __pyx_v_geo->phi_oo0));

  /* "PDSim/scroll/common_scroll_geo.pyx":397
 *     rb = geo.rb
 *     ro = rb*(pi - geo.phi_fi0 + geo.phi_oo0)
 *     om = geo.phi_fie - theta + 3.0*pi/2.0             # <<<<<<<<<<<<<<
 * 
 *     if inv == INVOLUTE_FI or inv == INVOLUTE_FO:
 */
  __pyx_v_om = ((__pyx_v_geo->phi_fie - __pyx_v_theta) + ((3.0 * M_PI) / 2.0));

  /* "PDSim/scroll/common_scroll_geo.pyx":399
 *     om = geo.phi_fie - theta + 3.0*pi/2.0
 * 
 *     if inv == INVOLUTE_FI or inv == INVOLUTE_FO:             # <<<<<<<<<<<<<<
 *         dx[0] = 0.0
 *         dy[0] = 0.0
 */
  switch (__pyx_v_inv) {
    case __pyx_e_5PDSim_6scroll_17common_scroll_geo_INVOLUTE_FI:
    case __pyx_e_5PDSim_6scroll_17common_scroll_geo_INVOLUTE_FO:

    /* "PDSim/scroll/common_scroll_geo.pyx":400
 * 
 *     if inv == INVOLUTE_FI or inv == INVOLUTE_FO:
 *         dx[0] = 0.0             # <<<<<<<<<<<<<<
 *         dy[0] = 0.0
 *     elif inv == INVOLUTE_OI or inv == INVOLUTE_OO:
 */
    (__pyx_v_dx[0]) = 0.0;

    /* "PDSim/scroll/common_scroll_geo.pyx":401
 *     if inv == INVOLUTE_FI or inv == INVOLUTE_FO:
 *         dx[0] = 0.0
 *         dy[0] = 0.0             # <<<<<<<<<<<<<<
 *     elif inv == INVOLUTE_OI or inv == INVOLUTE_OO:
 *         dx[0] = +ro*sin(om)
 */
    (__pyx_v_dy[0]) = 0.0;

    /* "PDSim/scroll/common_scroll_geo.pyx":399
 *     om = geo.phi_fie - theta + 3.0*pi/2.0
 * 
 *     if inv == INVOLUTE_FI or inv == INVOLUTE_FO:             # <<<<<<<<<<<<<<
 *         dx[0] = 0.0
 *         dy[0] = 0.0
 */
    break;
    case __pyx_e_5PDSim_6scroll_17common_scroll_geo_INVOLUTE_OI:

    /* "PDSim/scroll/common_scroll_geo.pyx":402
 *         dx[0] = 0.0
 *         dy[0] = 0.0
 *     elif inv == INVOLUTE_OI or inv == INVOLUTE_OO:             # <<<<<<<<<<<<<<
 *         dx[0] = +ro*sin(om)
 *         dy[0] = -ro*cos(om)
 */
    case __pyx_e_5PDSim_6scroll_17common_scroll_geo_INVOLUTE_OO:

    /* "PDSim/scroll/common_scroll_geo.pyx":403
 *         dy[0] = 0.0
 *     elif inv == INVOLUTE_OI or inv == INVOLUTE_OO:
 *         dx[0] = +ro*sin(om)             # <<<<<<<<<<<<<<
 *         dy[0] = -ro*cos(om)
 *     else:
 */
    (__pyx_v_dx[0]) = (__pyx_v_ro * sin(__pyx_v_om));

    /* "PDSim/scroll/common_scroll_geo.pyx":404
 *     elif inv == INVOLUTE_OI or inv == INVOLUTE_OO:
 *         dx[0] = +ro*sin(om)
 *         dy[0] = -ro*cos(om)             # <<<<<<<<<<<<<<
 *     else:
 *         raise ValueError('flag not valid')
 */
    (__pyx_v_dy[0]) = ((-__pyx_v_ro) * cos(__pyx_v_om));

    /* "PDSim/scroll/common_scroll_geo.pyx":402
 *         dx[0] = 0.0
 *         dy[0] = 0.0
 *     elif inv == INVOLUTE_OI or inv == INVOLUTE_OO:             # <<<<<<<<<<<<<<
 *         dx[0] = +ro*sin(om)
 *         dy[0] = -ro*cos(om)
 */
    break;
    default:

    /* "PDSim/scroll/common_scroll_geo.pyx":406
 *         dy[0] = -ro*cos(om)
 *     else:
 *         raise ValueError('flag not valid')             # <<<<<<<<<<<<<<
 * 
 * cpdef tuple sortAnglesCCW(double t1, double t2):
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 406, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 406, __pyx_L1_error)
    break;
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":390
 *         return geo.rb*geo.ro*((phi - geo.phi_oo0)*sin(THETA - phi) - cos(THETA - phi))
 * 
 * cdef coords_inv_dtheta(double phi, geoVals geo, double theta, int inv, double *dx, double *dy):             # <<<<<<<<<<<<<<
 *     """
 *     Internal function that does the calculation if phi is a double variable
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.coords_inv_dtheta", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pyx":408
 *         raise ValueError('flag not valid')
 * 
 * cpdef tuple sortAnglesCCW(double t1, double t2):             # <<<<<<<<<<<<<<
 *     """
 *     Sort angles so that t2>t1 in a counter-clockwise sense
 */

static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_29sortAnglesCCW(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_5PDSim_6scroll_17common_scroll_geo_sortAnglesCCW(double __pyx_v_t1, double __pyx_v_t2, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  double __pyx_t_2;
  double __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("sortAnglesCCW", 0);
  __Pyx_TraceCall("sortAnglesCCW", __pyx_f[0], 408, 0, __PYX_ERR(0, 408, __pyx_L1_error));

  /* "PDSim/scroll/common_scroll_geo.pyx":424
 *     """
 * 
 *     if (cos(t1)*sin(t2)-cos(t2)*sin(t1)<0):             # <<<<<<<<<<<<<<
 *         # Swap angles
 *         t1,t2 = t2,t1
 */
  __pyx_t_1 = ((((cos(__pyx_v_t1) * sin(__pyx_v_t2)) - (cos(__pyx_v_t2) * sin(__pyx_v_t1))) < 0.0) != 0);
  if (__pyx_t_1) {

    /* "PDSim/scroll/common_scroll_geo.pyx":426
 *     if (cos(t1)*sin(t2)-cos(t2)*sin(t1)<0):
 *         # Swap angles
 *         t1,t2 = t2,t1             # <<<<<<<<<<<<<<
 *     while (t1 > t2):
 *         # Make t2 bigger than t1
 */
    __pyx_t_2 = __pyx_v_t2;
    __pyx_t_3 = __pyx_v_t1;
    __pyx_v_t1 = __pyx_t_2;
    __pyx_v_t2 = __pyx_t_3;

    /* "PDSim/scroll/common_scroll_geo.pyx":424
 *     """
 * 
 *     if (cos(t1)*sin(t2)-cos(t2)*sin(t1)<0):             # <<<<<<<<<<<<<<
 *         # Swap angles
 *         t1,t2 = t2,t1
 */
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":427
 *         # Swap angles
 *         t1,t2 = t2,t1
 *     while (t1 > t2):             # <<<<<<<<<<<<<<
 *         # Make t2 bigger than t1
 *         t2=t2 + 2*pi;
 */
  while (1) {
    __pyx_t_1 = ((__pyx_v_t1 > __pyx_v_t2) != 0);
    if (!__pyx_t_1) break;

    /* "PDSim/scroll/common_scroll_geo.pyx":429
 *     while (t1 > t2):
 *         # Make t2 bigger than t1
 *         t2=t2 + 2*pi;             # <<<<<<<<<<<<<<
 *     return (t1,t2)
 * 
 */
    __pyx_v_t2 = (__pyx_v_t2 + (2.0 * M_PI));
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":430
 *         # Make t2 bigger than t1
 *         t2=t2 + 2*pi;
 *     return (t1,t2)             # <<<<<<<<<<<<<<
 * 
 * cpdef tuple sortAnglesCW(double t1, double t2):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_t1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 430, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyFloat_FromDouble(__pyx_v_t2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 430, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 430, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5);
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_r = ((PyObject*)__pyx_t_6);
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "PDSim/scroll/common_scroll_geo.pyx":408
 *         raise ValueError('flag not valid')
 * 
 * cpdef tuple sortAnglesCCW(double t1, double t2):             # <<<<<<<<<<<<<<
 *     """
 *     Sort angles so that t2>t1 in a counter-clockwise sense
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.sortAnglesCCW", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_29sortAnglesCCW(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5PDSim_6scroll_17common_scroll_geo_28sortAnglesCCW[] = "sortAnglesCCW(double t1, double t2) -> tuple\n\n    Sort angles so that t2>t1 in a counter-clockwise sense\n    idea from `StackOverflow <http://stackoverflow.com/questions/242404/sort-four-points-in-clockwise-order>`_\n    more description: `SoftSurfer <http://softsurfer.com/Archive/algorithm_0101/algorithm_0101.htm>`_\n\n    If the signed area of the triangle formed between the points on a unit circle with angles t1 and t2\n    and the origin is positive, the angles are sorted counterclockwise. Otherwise, the angles\n    are sorted in a counter-clockwise manner.  Here we want the angles to be sorted CCW, so\n    if area is negative, swap angles\n    \n    Area obtained from the cross product of a vector from origin \n    to 1 and a vector to point 2, so use right hand rule to get \n    sign of cross product with unit length\n    ";
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_29sortAnglesCCW(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_t1;
  double __pyx_v_t2;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("sortAnglesCCW (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_t1,&__pyx_n_s_t2,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t1)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("sortAnglesCCW", 1, 2, 2, 1); __PYX_ERR(0, 408, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sortAnglesCCW") < 0)) __PYX_ERR(0, 408, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_t1 = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_t1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 408, __pyx_L3_error)
    __pyx_v_t2 = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_t2 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 408, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("sortAnglesCCW", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 408, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.sortAnglesCCW", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_28sortAnglesCCW(__pyx_self, __pyx_v_t1, __pyx_v_t2);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_28sortAnglesCCW(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_t1, double __pyx_v_t2) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("sortAnglesCCW", 0);
  __Pyx_TraceCall("sortAnglesCCW (wrapper)", __pyx_f[0], 408, 0, __PYX_ERR(0, 408, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5PDSim_6scroll_17common_scroll_geo_sortAnglesCCW(__pyx_v_t1, __pyx_v_t2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 408, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.sortAnglesCCW", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pyx":432
 *     return (t1,t2)
 * 
 * cpdef tuple sortAnglesCW(double t1, double t2):             # <<<<<<<<<<<<<<
 * 
 *     """
 */

static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_31sortAnglesCW(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_5PDSim_6scroll_17common_scroll_geo_sortAnglesCW(double __pyx_v_t1, double __pyx_v_t2, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  double __pyx_t_2;
  double __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("sortAnglesCW", 0);
  __Pyx_TraceCall("sortAnglesCW", __pyx_f[0], 432, 0, __PYX_ERR(0, 432, __pyx_L1_error));

  /* "PDSim/scroll/common_scroll_geo.pyx":449
 *     """
 * 
 *     while (cos(t1)*sin(t2)-sin(t1)*cos(t2)>0):             # <<<<<<<<<<<<<<
 *         # Swap angles
 *         t1,t2 = t2,t1
 */
  while (1) {
    __pyx_t_1 = ((((cos(__pyx_v_t1) * sin(__pyx_v_t2)) - (sin(__pyx_v_t1) * cos(__pyx_v_t2))) > 0.0) != 0);
    if (!__pyx_t_1) break;

    /* "PDSim/scroll/common_scroll_geo.pyx":451
 *     while (cos(t1)*sin(t2)-sin(t1)*cos(t2)>0):
 *         # Swap angles
 *         t1,t2 = t2,t1             # <<<<<<<<<<<<<<
 *     # Make t1 between 0 and 2pi
 *     while (t1<0 or t1> 2.0*pi):
 */
    __pyx_t_2 = __pyx_v_t2;
    __pyx_t_3 = __pyx_v_t1;
    __pyx_v_t1 = __pyx_t_2;
    __pyx_v_t2 = __pyx_t_3;
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":453
 *         t1,t2 = t2,t1
 *     # Make t1 between 0 and 2pi
 *     while (t1<0 or t1> 2.0*pi):             # <<<<<<<<<<<<<<
 *         if t1>2.0*pi:
 *             t1=t1-2*pi
 */
  while (1) {
    __pyx_t_4 = ((__pyx_v_t1 < 0.0) != 0);
    if (!__pyx_t_4) {
    } else {
      __pyx_t_1 = __pyx_t_4;
      goto __pyx_L7_bool_binop_done;
    }
    __pyx_t_4 = ((__pyx_v_t1 > (2.0 * M_PI)) != 0);
    __pyx_t_1 = __pyx_t_4;
    __pyx_L7_bool_binop_done:;
    if (!__pyx_t_1) break;

    /* "PDSim/scroll/common_scroll_geo.pyx":454
 *     # Make t1 between 0 and 2pi
 *     while (t1<0 or t1> 2.0*pi):
 *         if t1>2.0*pi:             # <<<<<<<<<<<<<<
 *             t1=t1-2*pi
 *         else:
 */
    __pyx_t_1 = ((__pyx_v_t1 > (2.0 * M_PI)) != 0);
    if (__pyx_t_1) {

      /* "PDSim/scroll/common_scroll_geo.pyx":455
 *     while (t1<0 or t1> 2.0*pi):
 *         if t1>2.0*pi:
 *             t1=t1-2*pi             # <<<<<<<<<<<<<<
 *         else:
 *             t1=t1+2*pi
 */
      __pyx_v_t1 = (__pyx_v_t1 - (2.0 * M_PI));

      /* "PDSim/scroll/common_scroll_geo.pyx":454
 *     # Make t1 between 0 and 2pi
 *     while (t1<0 or t1> 2.0*pi):
 *         if t1>2.0*pi:             # <<<<<<<<<<<<<<
 *             t1=t1-2*pi
 *         else:
 */
      goto __pyx_L9;
    }

    /* "PDSim/scroll/common_scroll_geo.pyx":457
 *             t1=t1-2*pi
 *         else:
 *             t1=t1+2*pi             # <<<<<<<<<<<<<<
 *     # Want t2 to be less than t1, but no more than 2*pi less
 *     while (t2<t1 and t1-t2>2*pi):
 */
    /*else*/ {
      __pyx_v_t1 = (__pyx_v_t1 + (2.0 * M_PI));
    }
    __pyx_L9:;
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":459
 *             t1=t1+2*pi
 *     # Want t2 to be less than t1, but no more than 2*pi less
 *     while (t2<t1 and t1-t2>2*pi):             # <<<<<<<<<<<<<<
 *         t2=t2 + 2*pi
 *     while (t2>t1):
 */
  while (1) {
    __pyx_t_4 = ((__pyx_v_t2 < __pyx_v_t1) != 0);
    if (__pyx_t_4) {
    } else {
      __pyx_t_1 = __pyx_t_4;
      goto __pyx_L12_bool_binop_done;
    }
    __pyx_t_4 = (((__pyx_v_t1 - __pyx_v_t2) > (2.0 * M_PI)) != 0);
    __pyx_t_1 = __pyx_t_4;
    __pyx_L12_bool_binop_done:;
    if (!__pyx_t_1) break;

    /* "PDSim/scroll/common_scroll_geo.pyx":460
 *     # Want t2 to be less than t1, but no more than 2*pi less
 *     while (t2<t1 and t1-t2>2*pi):
 *         t2=t2 + 2*pi             # <<<<<<<<<<<<<<
 *     while (t2>t1):
 *         t2=t2 - 2*pi
 */
    __pyx_v_t2 = (__pyx_v_t2 + (2.0 * M_PI));
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":461
 *     while (t2<t1 and t1-t2>2*pi):
 *         t2=t2 + 2*pi
 *     while (t2>t1):             # <<<<<<<<<<<<<<
 *         t2=t2 - 2*pi
 *     return (t1, t2)
 */
  while (1) {
    __pyx_t_1 = ((__pyx_v_t2 > __pyx_v_t1) != 0);
    if (!__pyx_t_1) break;

    /* "PDSim/scroll/common_scroll_geo.pyx":462
 *         t2=t2 + 2*pi
 *     while (t2>t1):
 *         t2=t2 - 2*pi             # <<<<<<<<<<<<<<
 *     return (t1, t2)
 * 
 */
    __pyx_v_t2 = (__pyx_v_t2 - (2.0 * M_PI));
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":463
 *     while (t2>t1):
 *         t2=t2 - 2*pi
 *     return (t1, t2)             # <<<<<<<<<<<<<<
 * 
 * cpdef long get_compressor_CV_index(object _key) except *:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = PyFloat_FromDouble(__pyx_v_t1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyFloat_FromDouble(__pyx_v_t2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6);
  __pyx_t_5 = 0;
  __pyx_t_6 = 0;
  __pyx_r = ((PyObject*)__pyx_t_7);
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "PDSim/scroll/common_scroll_geo.pyx":432
 *     return (t1,t2)
 * 
 * cpdef tuple sortAnglesCW(double t1, double t2):             # <<<<<<<<<<<<<<
 * 
 *     """
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.sortAnglesCW", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_31sortAnglesCW(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5PDSim_6scroll_17common_scroll_geo_30sortAnglesCW[] = "sortAnglesCW(double t1, double t2) -> tuple\n\n    Sort angles so that t2>t1 in a clockwise sense\n    idea from `StackOverflow <http://stackoverflow.com/questions/242404/sort-four-points-in-clockwise-order>`_\n    more description: `SoftSurfer <http://softsurfer.com/Archive/algorithm_0101/algorithm_0101.htm>`_\n\n    If the signed area of the triangle formed between the points on a unit circle with angles t1 and t2\n    and the origin is positive, the angles are sorted counterclockwise. Otherwise, the angles\n    are sorted in a counter-clockwise manner.  Here we want the angles to be sorted CCW, so\n    if area is negative, swap angles\n    \n    Area obtained from the cross product of a vector from origin \n    to 1 and a vector to point 2, so use right hand rule to get \n    sign of cross product with unit length\n    ";
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_31sortAnglesCW(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_t1;
  double __pyx_v_t2;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("sortAnglesCW (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_t1,&__pyx_n_s_t2,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t1)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("sortAnglesCW", 1, 2, 2, 1); __PYX_ERR(0, 432, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sortAnglesCW") < 0)) __PYX_ERR(0, 432, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_t1 = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_t1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 432, __pyx_L3_error)
    __pyx_v_t2 = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_t2 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 432, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("sortAnglesCW", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 432, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.sortAnglesCW", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_30sortAnglesCW(__pyx_self, __pyx_v_t1, __pyx_v_t2);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_30sortAnglesCW(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_t1, double __pyx_v_t2) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("sortAnglesCW", 0);
  __Pyx_TraceCall("sortAnglesCW (wrapper)", __pyx_f[0], 432, 0, __PYX_ERR(0, 432, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5PDSim_6scroll_17common_scroll_geo_sortAnglesCW(__pyx_v_t1, __pyx_v_t2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.sortAnglesCW", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pyx":465
 *     return (t1, t2)
 * 
 * cpdef long get_compressor_CV_index(object _key) except *:             # <<<<<<<<<<<<<<
 *     """
 *     Returns the index defined in the ``compressor_CV_indices`` enum.
 */

static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_33get_compressor_CV_index(PyObject *__pyx_self, PyObject *__pyx_v__key); /*proto*/
static long __pyx_f_5PDSim_6scroll_17common_scroll_geo_get_compressor_CV_index(PyObject *__pyx_v__key, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_v_key = 0;
  long __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_t_10;
  __Pyx_RefNannySetupContext("get_compressor_CV_index", 0);
  __Pyx_TraceCall("get_compressor_CV_index", __pyx_f[0], 465, 0, __PYX_ERR(0, 465, __pyx_L1_error));

  /* "PDSim/scroll/common_scroll_geo.pyx":470
 *     """
 *     cdef bytes key
 *     try:             # <<<<<<<<<<<<<<
 *         key = _key.encode('utf8')
 *     except AttributeError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "PDSim/scroll/common_scroll_geo.pyx":471
 *     cdef bytes key
 *     try:
 *         key = _key.encode('utf8')             # <<<<<<<<<<<<<<
 *     except AttributeError:
 *         key = _key
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v__key, __pyx_n_s_encode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 471, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_n_s_utf8) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_n_s_utf8);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 471, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(0, 471, __pyx_L3_error)
      __pyx_v_key = ((PyObject*)__pyx_t_4);
      __pyx_t_4 = 0;

      /* "PDSim/scroll/common_scroll_geo.pyx":470
 *     """
 *     cdef bytes key
 *     try:             # <<<<<<<<<<<<<<
 *         key = _key.encode('utf8')
 *     except AttributeError:
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "PDSim/scroll/common_scroll_geo.pyx":472
 *     try:
 *         key = _key.encode('utf8')
 *     except AttributeError:             # <<<<<<<<<<<<<<
 *         key = _key
 * 
 */
    __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
    if (__pyx_t_7) {
      __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.get_compressor_CV_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(0, 472, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_6);

      /* "PDSim/scroll/common_scroll_geo.pyx":473
 *         key = _key.encode('utf8')
 *     except AttributeError:
 *         key = _key             # <<<<<<<<<<<<<<
 * 
 *     if key == b'sa':
 */
      if (!(likely(PyBytes_CheckExact(__pyx_v__key))||((__pyx_v__key) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v__key)->tp_name), 0))) __PYX_ERR(0, 473, __pyx_L5_except_error)
      __pyx_t_8 = __pyx_v__key;
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_XDECREF_SET(__pyx_v_key, ((PyObject*)__pyx_t_8));
      __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "PDSim/scroll/common_scroll_geo.pyx":470
 *     """
 *     cdef bytes key
 *     try:             # <<<<<<<<<<<<<<
 *         key = _key.encode('utf8')
 *     except AttributeError:
 */
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L8_try_end:;
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":475
 *         key = _key
 * 
 *     if key == b'sa':             # <<<<<<<<<<<<<<
 *         return keyIsa
 *     elif key == b's1':
 */
  __pyx_t_9 = (__Pyx_PyBytes_Equals(__pyx_v_key, __pyx_n_b_sa, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 475, __pyx_L1_error)
  __pyx_t_10 = (__pyx_t_9 != 0);
  if (__pyx_t_10) {

    /* "PDSim/scroll/common_scroll_geo.pyx":476
 * 
 *     if key == b'sa':
 *         return keyIsa             # <<<<<<<<<<<<<<
 *     elif key == b's1':
 *         return keyIs1
 */
    __pyx_r = __pyx_e_5PDSim_6scroll_17common_scroll_geo_keyIsa;
    goto __pyx_L0;

    /* "PDSim/scroll/common_scroll_geo.pyx":475
 *         key = _key
 * 
 *     if key == b'sa':             # <<<<<<<<<<<<<<
 *         return keyIsa
 *     elif key == b's1':
 */
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":477
 *     if key == b'sa':
 *         return keyIsa
 *     elif key == b's1':             # <<<<<<<<<<<<<<
 *         return keyIs1
 *     elif key == b's2':
 */
  __pyx_t_10 = (__Pyx_PyBytes_Equals(__pyx_v_key, __pyx_n_b_s1, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 477, __pyx_L1_error)
  __pyx_t_9 = (__pyx_t_10 != 0);
  if (__pyx_t_9) {

    /* "PDSim/scroll/common_scroll_geo.pyx":478
 *         return keyIsa
 *     elif key == b's1':
 *         return keyIs1             # <<<<<<<<<<<<<<
 *     elif key == b's2':
 *         return keyIs2
 */
    __pyx_r = __pyx_e_5PDSim_6scroll_17common_scroll_geo_keyIs1;
    goto __pyx_L0;

    /* "PDSim/scroll/common_scroll_geo.pyx":477
 *     if key == b'sa':
 *         return keyIsa
 *     elif key == b's1':             # <<<<<<<<<<<<<<
 *         return keyIs1
 *     elif key == b's2':
 */
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":479
 *     elif key == b's1':
 *         return keyIs1
 *     elif key == b's2':             # <<<<<<<<<<<<<<
 *         return keyIs2
 *     elif key == b'd1':
 */
  __pyx_t_9 = (__Pyx_PyBytes_Equals(__pyx_v_key, __pyx_n_b_s2, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 479, __pyx_L1_error)
  __pyx_t_10 = (__pyx_t_9 != 0);
  if (__pyx_t_10) {

    /* "PDSim/scroll/common_scroll_geo.pyx":480
 *         return keyIs1
 *     elif key == b's2':
 *         return keyIs2             # <<<<<<<<<<<<<<
 *     elif key == b'd1':
 *         return keyId1
 */
    __pyx_r = __pyx_e_5PDSim_6scroll_17common_scroll_geo_keyIs2;
    goto __pyx_L0;

    /* "PDSim/scroll/common_scroll_geo.pyx":479
 *     elif key == b's1':
 *         return keyIs1
 *     elif key == b's2':             # <<<<<<<<<<<<<<
 *         return keyIs2
 *     elif key == b'd1':
 */
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":481
 *     elif key == b's2':
 *         return keyIs2
 *     elif key == b'd1':             # <<<<<<<<<<<<<<
 *         return keyId1
 *     elif key == b'd2':
 */
  __pyx_t_10 = (__Pyx_PyBytes_Equals(__pyx_v_key, __pyx_n_b_d1, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 481, __pyx_L1_error)
  __pyx_t_9 = (__pyx_t_10 != 0);
  if (__pyx_t_9) {

    /* "PDSim/scroll/common_scroll_geo.pyx":482
 *         return keyIs2
 *     elif key == b'd1':
 *         return keyId1             # <<<<<<<<<<<<<<
 *     elif key == b'd2':
 *         return keyId2
 */
    __pyx_r = __pyx_e_5PDSim_6scroll_17common_scroll_geo_keyId1;
    goto __pyx_L0;

    /* "PDSim/scroll/common_scroll_geo.pyx":481
 *     elif key == b's2':
 *         return keyIs2
 *     elif key == b'd1':             # <<<<<<<<<<<<<<
 *         return keyId1
 *     elif key == b'd2':
 */
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":483
 *     elif key == b'd1':
 *         return keyId1
 *     elif key == b'd2':             # <<<<<<<<<<<<<<
 *         return keyId2
 *     elif key == b'dd':
 */
  __pyx_t_9 = (__Pyx_PyBytes_Equals(__pyx_v_key, __pyx_n_b_d2, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 483, __pyx_L1_error)
  __pyx_t_10 = (__pyx_t_9 != 0);
  if (__pyx_t_10) {

    /* "PDSim/scroll/common_scroll_geo.pyx":484
 *         return keyId1
 *     elif key == b'd2':
 *         return keyId2             # <<<<<<<<<<<<<<
 *     elif key == b'dd':
 *         return keyIdd
 */
    __pyx_r = __pyx_e_5PDSim_6scroll_17common_scroll_geo_keyId2;
    goto __pyx_L0;

    /* "PDSim/scroll/common_scroll_geo.pyx":483
 *     elif key == b'd1':
 *         return keyId1
 *     elif key == b'd2':             # <<<<<<<<<<<<<<
 *         return keyId2
 *     elif key == b'dd':
 */
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":485
 *     elif key == b'd2':
 *         return keyId2
 *     elif key == b'dd':             # <<<<<<<<<<<<<<
 *         return keyIdd
 *     elif key == b'ddd':
 */
  __pyx_t_10 = (__Pyx_PyBytes_Equals(__pyx_v_key, __pyx_n_b_dd, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 485, __pyx_L1_error)
  __pyx_t_9 = (__pyx_t_10 != 0);
  if (__pyx_t_9) {

    /* "PDSim/scroll/common_scroll_geo.pyx":486
 *         return keyId2
 *     elif key == b'dd':
 *         return keyIdd             # <<<<<<<<<<<<<<
 *     elif key == b'ddd':
 *         return keyIddd
 */
    __pyx_r = __pyx_e_5PDSim_6scroll_17common_scroll_geo_keyIdd;
    goto __pyx_L0;

    /* "PDSim/scroll/common_scroll_geo.pyx":485
 *     elif key == b'd2':
 *         return keyId2
 *     elif key == b'dd':             # <<<<<<<<<<<<<<
 *         return keyIdd
 *     elif key == b'ddd':
 */
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":487
 *     elif key == b'dd':
 *         return keyIdd
 *     elif key == b'ddd':             # <<<<<<<<<<<<<<
 *         return keyIddd
 *     elif key == b'c1.1':
 */
  __pyx_t_9 = (__Pyx_PyBytes_Equals(__pyx_v_key, __pyx_n_b_ddd, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 487, __pyx_L1_error)
  __pyx_t_10 = (__pyx_t_9 != 0);
  if (__pyx_t_10) {

    /* "PDSim/scroll/common_scroll_geo.pyx":488
 *         return keyIdd
 *     elif key == b'ddd':
 *         return keyIddd             # <<<<<<<<<<<<<<
 *     elif key == b'c1.1':
 *         return keyIc1_1
 */
    __pyx_r = __pyx_e_5PDSim_6scroll_17common_scroll_geo_keyIddd;
    goto __pyx_L0;

    /* "PDSim/scroll/common_scroll_geo.pyx":487
 *     elif key == b'dd':
 *         return keyIdd
 *     elif key == b'ddd':             # <<<<<<<<<<<<<<
 *         return keyIddd
 *     elif key == b'c1.1':
 */
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":489
 *     elif key == b'ddd':
 *         return keyIddd
 *     elif key == b'c1.1':             # <<<<<<<<<<<<<<
 *         return keyIc1_1
 *     elif key == b'c2.1':
 */
  __pyx_t_10 = (__Pyx_PyBytes_Equals(__pyx_v_key, __pyx_kp_b_c1_1, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 489, __pyx_L1_error)
  __pyx_t_9 = (__pyx_t_10 != 0);
  if (__pyx_t_9) {

    /* "PDSim/scroll/common_scroll_geo.pyx":490
 *         return keyIddd
 *     elif key == b'c1.1':
 *         return keyIc1_1             # <<<<<<<<<<<<<<
 *     elif key == b'c2.1':
 *         return keyIc2_1
 */
    __pyx_r = __pyx_e_5PDSim_6scroll_17common_scroll_geo_keyIc1_1;
    goto __pyx_L0;

    /* "PDSim/scroll/common_scroll_geo.pyx":489
 *     elif key == b'ddd':
 *         return keyIddd
 *     elif key == b'c1.1':             # <<<<<<<<<<<<<<
 *         return keyIc1_1
 *     elif key == b'c2.1':
 */
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":491
 *     elif key == b'c1.1':
 *         return keyIc1_1
 *     elif key == b'c2.1':             # <<<<<<<<<<<<<<
 *         return keyIc2_1
 *     elif key == b'c1.2':
 */
  __pyx_t_9 = (__Pyx_PyBytes_Equals(__pyx_v_key, __pyx_kp_b_c2_1, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 491, __pyx_L1_error)
  __pyx_t_10 = (__pyx_t_9 != 0);
  if (__pyx_t_10) {

    /* "PDSim/scroll/common_scroll_geo.pyx":492
 *         return keyIc1_1
 *     elif key == b'c2.1':
 *         return keyIc2_1             # <<<<<<<<<<<<<<
 *     elif key == b'c1.2':
 *         return keyIc1_2
 */
    __pyx_r = __pyx_e_5PDSim_6scroll_17common_scroll_geo_keyIc2_1;
    goto __pyx_L0;

    /* "PDSim/scroll/common_scroll_geo.pyx":491
 *     elif key == b'c1.1':
 *         return keyIc1_1
 *     elif key == b'c2.1':             # <<<<<<<<<<<<<<
 *         return keyIc2_1
 *     elif key == b'c1.2':
 */
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":493
 *     elif key == b'c2.1':
 *         return keyIc2_1
 *     elif key == b'c1.2':             # <<<<<<<<<<<<<<
 *         return keyIc1_2
 *     elif key == b'c2.2':
 */
  __pyx_t_10 = (__Pyx_PyBytes_Equals(__pyx_v_key, __pyx_kp_b_c1_2, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 493, __pyx_L1_error)
  __pyx_t_9 = (__pyx_t_10 != 0);
  if (__pyx_t_9) {

    /* "PDSim/scroll/common_scroll_geo.pyx":494
 *         return keyIc2_1
 *     elif key == b'c1.2':
 *         return keyIc1_2             # <<<<<<<<<<<<<<
 *     elif key == b'c2.2':
 *         return keyIc2_2
 */
    __pyx_r = __pyx_e_5PDSim_6scroll_17common_scroll_geo_keyIc1_2;
    goto __pyx_L0;

    /* "PDSim/scroll/common_scroll_geo.pyx":493
 *     elif key == b'c2.1':
 *         return keyIc2_1
 *     elif key == b'c1.2':             # <<<<<<<<<<<<<<
 *         return keyIc1_2
 *     elif key == b'c2.2':
 */
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":495
 *     elif key == b'c1.2':
 *         return keyIc1_2
 *     elif key == b'c2.2':             # <<<<<<<<<<<<<<
 *         return keyIc2_2
 *     elif key == b'c1.3':
 */
  __pyx_t_9 = (__Pyx_PyBytes_Equals(__pyx_v_key, __pyx_kp_b_c2_2, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 495, __pyx_L1_error)
  __pyx_t_10 = (__pyx_t_9 != 0);
  if (__pyx_t_10) {

    /* "PDSim/scroll/common_scroll_geo.pyx":496
 *         return keyIc1_2
 *     elif key == b'c2.2':
 *         return keyIc2_2             # <<<<<<<<<<<<<<
 *     elif key == b'c1.3':
 *         return keyIc1_3
 */
    __pyx_r = __pyx_e_5PDSim_6scroll_17common_scroll_geo_keyIc2_2;
    goto __pyx_L0;

    /* "PDSim/scroll/common_scroll_geo.pyx":495
 *     elif key == b'c1.2':
 *         return keyIc1_2
 *     elif key == b'c2.2':             # <<<<<<<<<<<<<<
 *         return keyIc2_2
 *     elif key == b'c1.3':
 */
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":497
 *     elif key == b'c2.2':
 *         return keyIc2_2
 *     elif key == b'c1.3':             # <<<<<<<<<<<<<<
 *         return keyIc1_3
 *     elif key == b'c2.3':
 */
  __pyx_t_10 = (__Pyx_PyBytes_Equals(__pyx_v_key, __pyx_kp_b_c1_3, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 497, __pyx_L1_error)
  __pyx_t_9 = (__pyx_t_10 != 0);
  if (__pyx_t_9) {

    /* "PDSim/scroll/common_scroll_geo.pyx":498
 *         return keyIc2_2
 *     elif key == b'c1.3':
 *         return keyIc1_3             # <<<<<<<<<<<<<<
 *     elif key == b'c2.3':
 *         return keyIc2_3
 */
    __pyx_r = __pyx_e_5PDSim_6scroll_17common_scroll_geo_keyIc1_3;
    goto __pyx_L0;

    /* "PDSim/scroll/common_scroll_geo.pyx":497
 *     elif key == b'c2.2':
 *         return keyIc2_2
 *     elif key == b'c1.3':             # <<<<<<<<<<<<<<
 *         return keyIc1_3
 *     elif key == b'c2.3':
 */
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":499
 *     elif key == b'c1.3':
 *         return keyIc1_3
 *     elif key == b'c2.3':             # <<<<<<<<<<<<<<
 *         return keyIc2_3
 *     elif key == b'c1.4':
 */
  __pyx_t_9 = (__Pyx_PyBytes_Equals(__pyx_v_key, __pyx_kp_b_c2_3, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 499, __pyx_L1_error)
  __pyx_t_10 = (__pyx_t_9 != 0);
  if (__pyx_t_10) {

    /* "PDSim/scroll/common_scroll_geo.pyx":500
 *         return keyIc1_3
 *     elif key == b'c2.3':
 *         return keyIc2_3             # <<<<<<<<<<<<<<
 *     elif key == b'c1.4':
 *         return keyIc1_4
 */
    __pyx_r = __pyx_e_5PDSim_6scroll_17common_scroll_geo_keyIc2_3;
    goto __pyx_L0;

    /* "PDSim/scroll/common_scroll_geo.pyx":499
 *     elif key == b'c1.3':
 *         return keyIc1_3
 *     elif key == b'c2.3':             # <<<<<<<<<<<<<<
 *         return keyIc2_3
 *     elif key == b'c1.4':
 */
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":501
 *     elif key == b'c2.3':
 *         return keyIc2_3
 *     elif key == b'c1.4':             # <<<<<<<<<<<<<<
 *         return keyIc1_4
 *     elif key == b'c2.4':
 */
  __pyx_t_10 = (__Pyx_PyBytes_Equals(__pyx_v_key, __pyx_kp_b_c1_4, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 501, __pyx_L1_error)
  __pyx_t_9 = (__pyx_t_10 != 0);
  if (__pyx_t_9) {

    /* "PDSim/scroll/common_scroll_geo.pyx":502
 *         return keyIc2_3
 *     elif key == b'c1.4':
 *         return keyIc1_4             # <<<<<<<<<<<<<<
 *     elif key == b'c2.4':
 *         return keyIc2_4
 */
    __pyx_r = __pyx_e_5PDSim_6scroll_17common_scroll_geo_keyIc1_4;
    goto __pyx_L0;

    /* "PDSim/scroll/common_scroll_geo.pyx":501
 *     elif key == b'c2.3':
 *         return keyIc2_3
 *     elif key == b'c1.4':             # <<<<<<<<<<<<<<
 *         return keyIc1_4
 *     elif key == b'c2.4':
 */
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":503
 *     elif key == b'c1.4':
 *         return keyIc1_4
 *     elif key == b'c2.4':             # <<<<<<<<<<<<<<
 *         return keyIc2_4
 *     elif key == b'c1.5':
 */
  __pyx_t_9 = (__Pyx_PyBytes_Equals(__pyx_v_key, __pyx_kp_b_c2_4, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 503, __pyx_L1_error)
  __pyx_t_10 = (__pyx_t_9 != 0);
  if (__pyx_t_10) {

    /* "PDSim/scroll/common_scroll_geo.pyx":504
 *         return keyIc1_4
 *     elif key == b'c2.4':
 *         return keyIc2_4             # <<<<<<<<<<<<<<
 *     elif key == b'c1.5':
 *         return keyIc1_5
 */
    __pyx_r = __pyx_e_5PDSim_6scroll_17common_scroll_geo_keyIc2_4;
    goto __pyx_L0;

    /* "PDSim/scroll/common_scroll_geo.pyx":503
 *     elif key == b'c1.4':
 *         return keyIc1_4
 *     elif key == b'c2.4':             # <<<<<<<<<<<<<<
 *         return keyIc2_4
 *     elif key == b'c1.5':
 */
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":505
 *     elif key == b'c2.4':
 *         return keyIc2_4
 *     elif key == b'c1.5':             # <<<<<<<<<<<<<<
 *         return keyIc1_5
 *     elif key == b'c2.5':
 */
  __pyx_t_10 = (__Pyx_PyBytes_Equals(__pyx_v_key, __pyx_kp_b_c1_5, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 505, __pyx_L1_error)
  __pyx_t_9 = (__pyx_t_10 != 0);
  if (__pyx_t_9) {

    /* "PDSim/scroll/common_scroll_geo.pyx":506
 *         return keyIc2_4
 *     elif key == b'c1.5':
 *         return keyIc1_5             # <<<<<<<<<<<<<<
 *     elif key == b'c2.5':
 *         return keyIc2_5
 */
    __pyx_r = __pyx_e_5PDSim_6scroll_17common_scroll_geo_keyIc1_5;
    goto __pyx_L0;

    /* "PDSim/scroll/common_scroll_geo.pyx":505
 *     elif key == b'c2.4':
 *         return keyIc2_4
 *     elif key == b'c1.5':             # <<<<<<<<<<<<<<
 *         return keyIc1_5
 *     elif key == b'c2.5':
 */
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":507
 *     elif key == b'c1.5':
 *         return keyIc1_5
 *     elif key == b'c2.5':             # <<<<<<<<<<<<<<
 *         return keyIc2_5
 *     elif key == b'c1.6':
 */
  __pyx_t_9 = (__Pyx_PyBytes_Equals(__pyx_v_key, __pyx_kp_b_c2_5, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 507, __pyx_L1_error)
  __pyx_t_10 = (__pyx_t_9 != 0);
  if (__pyx_t_10) {

    /* "PDSim/scroll/common_scroll_geo.pyx":508
 *         return keyIc1_5
 *     elif key == b'c2.5':
 *         return keyIc2_5             # <<<<<<<<<<<<<<
 *     elif key == b'c1.6':
 *         return keyIc1_6
 */
    __pyx_r = __pyx_e_5PDSim_6scroll_17common_scroll_geo_keyIc2_5;
    goto __pyx_L0;

    /* "PDSim/scroll/common_scroll_geo.pyx":507
 *     elif key == b'c1.5':
 *         return keyIc1_5
 *     elif key == b'c2.5':             # <<<<<<<<<<<<<<
 *         return keyIc2_5
 *     elif key == b'c1.6':
 */
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":509
 *     elif key == b'c2.5':
 *         return keyIc2_5
 *     elif key == b'c1.6':             # <<<<<<<<<<<<<<
 *         return keyIc1_6
 *     elif key == b'c2.6':
 */
  __pyx_t_10 = (__Pyx_PyBytes_Equals(__pyx_v_key, __pyx_kp_b_c1_6, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 509, __pyx_L1_error)
  __pyx_t_9 = (__pyx_t_10 != 0);
  if (__pyx_t_9) {

    /* "PDSim/scroll/common_scroll_geo.pyx":510
 *         return keyIc2_5
 *     elif key == b'c1.6':
 *         return keyIc1_6             # <<<<<<<<<<<<<<
 *     elif key == b'c2.6':
 *         return keyIc2_6
 */
    __pyx_r = __pyx_e_5PDSim_6scroll_17common_scroll_geo_keyIc1_6;
    goto __pyx_L0;

    /* "PDSim/scroll/common_scroll_geo.pyx":509
 *     elif key == b'c2.5':
 *         return keyIc2_5
 *     elif key == b'c1.6':             # <<<<<<<<<<<<<<
 *         return keyIc1_6
 *     elif key == b'c2.6':
 */
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":511
 *     elif key == b'c1.6':
 *         return keyIc1_6
 *     elif key == b'c2.6':             # <<<<<<<<<<<<<<
 *         return keyIc2_6
 *     elif key == b'c1.7':
 */
  __pyx_t_9 = (__Pyx_PyBytes_Equals(__pyx_v_key, __pyx_kp_b_c2_6, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 511, __pyx_L1_error)
  __pyx_t_10 = (__pyx_t_9 != 0);
  if (__pyx_t_10) {

    /* "PDSim/scroll/common_scroll_geo.pyx":512
 *         return keyIc1_6
 *     elif key == b'c2.6':
 *         return keyIc2_6             # <<<<<<<<<<<<<<
 *     elif key == b'c1.7':
 *         return keyIc1_7
 */
    __pyx_r = __pyx_e_5PDSim_6scroll_17common_scroll_geo_keyIc2_6;
    goto __pyx_L0;

    /* "PDSim/scroll/common_scroll_geo.pyx":511
 *     elif key == b'c1.6':
 *         return keyIc1_6
 *     elif key == b'c2.6':             # <<<<<<<<<<<<<<
 *         return keyIc2_6
 *     elif key == b'c1.7':
 */
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":513
 *     elif key == b'c2.6':
 *         return keyIc2_6
 *     elif key == b'c1.7':             # <<<<<<<<<<<<<<
 *         return keyIc1_7
 *     elif key == b'c2.7':
 */
  __pyx_t_10 = (__Pyx_PyBytes_Equals(__pyx_v_key, __pyx_kp_b_c1_7, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 513, __pyx_L1_error)
  __pyx_t_9 = (__pyx_t_10 != 0);
  if (__pyx_t_9) {

    /* "PDSim/scroll/common_scroll_geo.pyx":514
 *         return keyIc2_6
 *     elif key == b'c1.7':
 *         return keyIc1_7             # <<<<<<<<<<<<<<
 *     elif key == b'c2.7':
 *         return keyIc2_7
 */
    __pyx_r = __pyx_e_5PDSim_6scroll_17common_scroll_geo_keyIc1_7;
    goto __pyx_L0;

    /* "PDSim/scroll/common_scroll_geo.pyx":513
 *     elif key == b'c2.6':
 *         return keyIc2_6
 *     elif key == b'c1.7':             # <<<<<<<<<<<<<<
 *         return keyIc1_7
 *     elif key == b'c2.7':
 */
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":515
 *     elif key == b'c1.7':
 *         return keyIc1_7
 *     elif key == b'c2.7':             # <<<<<<<<<<<<<<
 *         return keyIc2_7
 *     elif key == b'c1.8':
 */
  __pyx_t_9 = (__Pyx_PyBytes_Equals(__pyx_v_key, __pyx_kp_b_c2_7, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 515, __pyx_L1_error)
  __pyx_t_10 = (__pyx_t_9 != 0);
  if (__pyx_t_10) {

    /* "PDSim/scroll/common_scroll_geo.pyx":516
 *         return keyIc1_7
 *     elif key == b'c2.7':
 *         return keyIc2_7             # <<<<<<<<<<<<<<
 *     elif key == b'c1.8':
 *         return keyIc1_8
 */
    __pyx_r = __pyx_e_5PDSim_6scroll_17common_scroll_geo_keyIc2_7;
    goto __pyx_L0;

    /* "PDSim/scroll/common_scroll_geo.pyx":515
 *     elif key == b'c1.7':
 *         return keyIc1_7
 *     elif key == b'c2.7':             # <<<<<<<<<<<<<<
 *         return keyIc2_7
 *     elif key == b'c1.8':
 */
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":517
 *     elif key == b'c2.7':
 *         return keyIc2_7
 *     elif key == b'c1.8':             # <<<<<<<<<<<<<<
 *         return keyIc1_8
 *     elif key == b'c2.8':
 */
  __pyx_t_10 = (__Pyx_PyBytes_Equals(__pyx_v_key, __pyx_kp_b_c1_8, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 517, __pyx_L1_error)
  __pyx_t_9 = (__pyx_t_10 != 0);
  if (__pyx_t_9) {

    /* "PDSim/scroll/common_scroll_geo.pyx":518
 *         return keyIc2_7
 *     elif key == b'c1.8':
 *         return keyIc1_8             # <<<<<<<<<<<<<<
 *     elif key == b'c2.8':
 *         return keyIc2_8
 */
    __pyx_r = __pyx_e_5PDSim_6scroll_17common_scroll_geo_keyIc1_8;
    goto __pyx_L0;

    /* "PDSim/scroll/common_scroll_geo.pyx":517
 *     elif key == b'c2.7':
 *         return keyIc2_7
 *     elif key == b'c1.8':             # <<<<<<<<<<<<<<
 *         return keyIc1_8
 *     elif key == b'c2.8':
 */
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":519
 *     elif key == b'c1.8':
 *         return keyIc1_8
 *     elif key == b'c2.8':             # <<<<<<<<<<<<<<
 *         return keyIc2_8
 *     elif key == b'c1.9':
 */
  __pyx_t_9 = (__Pyx_PyBytes_Equals(__pyx_v_key, __pyx_kp_b_c2_8, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 519, __pyx_L1_error)
  __pyx_t_10 = (__pyx_t_9 != 0);
  if (__pyx_t_10) {

    /* "PDSim/scroll/common_scroll_geo.pyx":520
 *         return keyIc1_8
 *     elif key == b'c2.8':
 *         return keyIc2_8             # <<<<<<<<<<<<<<
 *     elif key == b'c1.9':
 *         return keyIc1_9
 */
    __pyx_r = __pyx_e_5PDSim_6scroll_17common_scroll_geo_keyIc2_8;
    goto __pyx_L0;

    /* "PDSim/scroll/common_scroll_geo.pyx":519
 *     elif key == b'c1.8':
 *         return keyIc1_8
 *     elif key == b'c2.8':             # <<<<<<<<<<<<<<
 *         return keyIc2_8
 *     elif key == b'c1.9':
 */
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":521
 *     elif key == b'c2.8':
 *         return keyIc2_8
 *     elif key == b'c1.9':             # <<<<<<<<<<<<<<
 *         return keyIc1_9
 *     elif key == b'c2.9':
 */
  __pyx_t_10 = (__Pyx_PyBytes_Equals(__pyx_v_key, __pyx_kp_b_c1_9, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 521, __pyx_L1_error)
  __pyx_t_9 = (__pyx_t_10 != 0);
  if (__pyx_t_9) {

    /* "PDSim/scroll/common_scroll_geo.pyx":522
 *         return keyIc2_8
 *     elif key == b'c1.9':
 *         return keyIc1_9             # <<<<<<<<<<<<<<
 *     elif key == b'c2.9':
 *         return keyIc2_9
 */
    __pyx_r = __pyx_e_5PDSim_6scroll_17common_scroll_geo_keyIc1_9;
    goto __pyx_L0;

    /* "PDSim/scroll/common_scroll_geo.pyx":521
 *     elif key == b'c2.8':
 *         return keyIc2_8
 *     elif key == b'c1.9':             # <<<<<<<<<<<<<<
 *         return keyIc1_9
 *     elif key == b'c2.9':
 */
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":523
 *     elif key == b'c1.9':
 *         return keyIc1_9
 *     elif key == b'c2.9':             # <<<<<<<<<<<<<<
 *         return keyIc2_9
 *     elif key == b'c1.10':
 */
  __pyx_t_9 = (__Pyx_PyBytes_Equals(__pyx_v_key, __pyx_kp_b_c2_9, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 523, __pyx_L1_error)
  __pyx_t_10 = (__pyx_t_9 != 0);
  if (__pyx_t_10) {

    /* "PDSim/scroll/common_scroll_geo.pyx":524
 *         return keyIc1_9
 *     elif key == b'c2.9':
 *         return keyIc2_9             # <<<<<<<<<<<<<<
 *     elif key == b'c1.10':
 *         return keyIc1_10
 */
    __pyx_r = __pyx_e_5PDSim_6scroll_17common_scroll_geo_keyIc2_9;
    goto __pyx_L0;

    /* "PDSim/scroll/common_scroll_geo.pyx":523
 *     elif key == b'c1.9':
 *         return keyIc1_9
 *     elif key == b'c2.9':             # <<<<<<<<<<<<<<
 *         return keyIc2_9
 *     elif key == b'c1.10':
 */
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":525
 *     elif key == b'c2.9':
 *         return keyIc2_9
 *     elif key == b'c1.10':             # <<<<<<<<<<<<<<
 *         return keyIc1_10
 *     elif key == b'c2.10':
 */
  __pyx_t_10 = (__Pyx_PyBytes_Equals(__pyx_v_key, __pyx_kp_b_c1_10, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 525, __pyx_L1_error)
  __pyx_t_9 = (__pyx_t_10 != 0);
  if (__pyx_t_9) {

    /* "PDSim/scroll/common_scroll_geo.pyx":526
 *         return keyIc2_9
 *     elif key == b'c1.10':
 *         return keyIc1_10             # <<<<<<<<<<<<<<
 *     elif key == b'c2.10':
 *         return keyIc2_10
 */
    __pyx_r = __pyx_e_5PDSim_6scroll_17common_scroll_geo_keyIc1_10;
    goto __pyx_L0;

    /* "PDSim/scroll/common_scroll_geo.pyx":525
 *     elif key == b'c2.9':
 *         return keyIc2_9
 *     elif key == b'c1.10':             # <<<<<<<<<<<<<<
 *         return keyIc1_10
 *     elif key == b'c2.10':
 */
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":527
 *     elif key == b'c1.10':
 *         return keyIc1_10
 *     elif key == b'c2.10':             # <<<<<<<<<<<<<<
 *         return keyIc2_10
 *     else:
 */
  __pyx_t_9 = (__Pyx_PyBytes_Equals(__pyx_v_key, __pyx_kp_b_c2_10, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 527, __pyx_L1_error)
  __pyx_t_10 = (__pyx_t_9 != 0);
  if (__pyx_t_10) {

    /* "PDSim/scroll/common_scroll_geo.pyx":528
 *         return keyIc1_10
 *     elif key == b'c2.10':
 *         return keyIc2_10             # <<<<<<<<<<<<<<
 *     else:
 *         return -1
 */
    __pyx_r = __pyx_e_5PDSim_6scroll_17common_scroll_geo_keyIc2_10;
    goto __pyx_L0;

    /* "PDSim/scroll/common_scroll_geo.pyx":527
 *     elif key == b'c1.10':
 *         return keyIc1_10
 *     elif key == b'c2.10':             # <<<<<<<<<<<<<<
 *         return keyIc2_10
 *     else:
 */
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":530
 *         return keyIc2_10
 *     else:
 *         return -1             # <<<<<<<<<<<<<<
 * 
 * cpdef long get_compression_chamber_index(long path, long alpha):
 */
  /*else*/ {
    __pyx_r = -1L;
    goto __pyx_L0;
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":465
 *     return (t1, t2)
 * 
 * cpdef long get_compressor_CV_index(object _key) except *:             # <<<<<<<<<<<<<<
 *     """
 *     Returns the index defined in the ``compressor_CV_indices`` enum.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.get_compressor_CV_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_33get_compressor_CV_index(PyObject *__pyx_self, PyObject *__pyx_v__key); /*proto*/
static char __pyx_doc_5PDSim_6scroll_17common_scroll_geo_32get_compressor_CV_index[] = "get_compressor_CV_index(_key) -> long\n\n    Returns the index defined in the ``compressor_CV_indices`` enum. \n    ";
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_33get_compressor_CV_index(PyObject *__pyx_self, PyObject *__pyx_v__key) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_compressor_CV_index (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_32get_compressor_CV_index(__pyx_self, ((PyObject *)__pyx_v__key));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_32get_compressor_CV_index(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v__key) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  long __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("get_compressor_CV_index", 0);
  __Pyx_TraceCall("get_compressor_CV_index (wrapper)", __pyx_f[0], 465, 0, __PYX_ERR(0, 465, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5PDSim_6scroll_17common_scroll_geo_get_compressor_CV_index(__pyx_v__key, 0); if (unlikely(__pyx_t_1 == ((long)-1) && PyErr_Occurred())) __PYX_ERR(0, 465, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.get_compressor_CV_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pyx":532
 *         return -1
 * 
 * cpdef long get_compression_chamber_index(long path, long alpha):             # <<<<<<<<<<<<<<
 *     """
 *     Return the index for the compression chamber with integers
 */

static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_35get_compression_chamber_index(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static long __pyx_f_5PDSim_6scroll_17common_scroll_geo_get_compression_chamber_index(long __pyx_v_path, long __pyx_v_alpha, CYTHON_UNUSED int __pyx_skip_dispatch) {
  long __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_compression_chamber_index", 0);
  __Pyx_TraceCall("get_compression_chamber_index", __pyx_f[0], 532, 0, __PYX_ERR(0, 532, __pyx_L1_error));

  /* "PDSim/scroll/common_scroll_geo.pyx":536
 *     Return the index for the compression chamber with integers
 *     """
 *     return 1000*path+alpha             # <<<<<<<<<<<<<<
 * 
 * #This is a list of all the members in geoVals
 */
  __pyx_r = ((0x3E8 * __pyx_v_path) + __pyx_v_alpha);
  goto __pyx_L0;

  /* "PDSim/scroll/common_scroll_geo.pyx":532
 *         return -1
 * 
 * cpdef long get_compression_chamber_index(long path, long alpha):             # <<<<<<<<<<<<<<
 *     """
 *     Return the index for the compression chamber with integers
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("PDSim.scroll.common_scroll_geo.get_compression_chamber_index", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_35get_compression_chamber_index(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5PDSim_6scroll_17common_scroll_geo_34get_compression_chamber_index[] = "get_compression_chamber_index(long path, long alpha) -> long\n\n    Return the index for the compression chamber with integers\n    ";
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_35get_compression_chamber_index(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  long __pyx_v_path;
  long __pyx_v_alpha;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_compression_chamber_index (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_path,&__pyx_n_s_alpha,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_path)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_alpha)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("get_compression_chamber_index", 1, 2, 2, 1); __PYX_ERR(0, 532, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_compression_chamber_index") < 0)) __PYX_ERR(0, 532, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_path = __Pyx_PyInt_As_long(values[0]); if (unlikely((__pyx_v_path == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 532, __pyx_L3_error)
    __pyx_v_alpha = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v_alpha == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 532, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_compression_chamber_index", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 532, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.get_compression_chamber_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_34get_compression_chamber_index(__pyx_self, __pyx_v_path, __pyx_v_alpha);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_34get_compression_chamber_index(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_path, long __pyx_v_alpha) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("get_compression_chamber_index", 0);
  __Pyx_TraceCall("get_compression_chamber_index (wrapper)", __pyx_f[0], 532, 0, __PYX_ERR(0, 532, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_f_5PDSim_6scroll_17common_scroll_geo_get_compression_chamber_index(__pyx_v_path, __pyx_v_alpha, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.get_compression_chamber_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pyx":552
 *                 'cx_scroll','cy_scroll','V_scroll','Vremove']
 * 
 * def rebuild_geoVals(d):             # <<<<<<<<<<<<<<
 *     geo = geoVals()
 *     for atr in geoValsvarlist:
 */

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_37rebuild_geoVals(PyObject *__pyx_self, PyObject *__pyx_v_d); /*proto*/
static char __pyx_doc_5PDSim_6scroll_17common_scroll_geo_36rebuild_geoVals[] = "rebuild_geoVals(d)";
static PyMethodDef __pyx_mdef_5PDSim_6scroll_17common_scroll_geo_37rebuild_geoVals = {"rebuild_geoVals", (PyCFunction)__pyx_pw_5PDSim_6scroll_17common_scroll_geo_37rebuild_geoVals, METH_O, __pyx_doc_5PDSim_6scroll_17common_scroll_geo_36rebuild_geoVals};
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_37rebuild_geoVals(PyObject *__pyx_self, PyObject *__pyx_v_d) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("rebuild_geoVals (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_36rebuild_geoVals(__pyx_self, ((PyObject *)__pyx_v_d));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_36rebuild_geoVals(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_d) {
  struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo = NULL;
  PyObject *__pyx_v_atr = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  int __pyx_t_5;
  __Pyx_TraceFrameInit(__pyx_codeobj__16)
  __Pyx_RefNannySetupContext("rebuild_geoVals", 0);
  __Pyx_TraceCall("rebuild_geoVals", __pyx_f[0], 552, 0, __PYX_ERR(0, 552, __pyx_L1_error));

  /* "PDSim/scroll/common_scroll_geo.pyx":553
 * 
 * def rebuild_geoVals(d):
 *     geo = geoVals()             # <<<<<<<<<<<<<<
 *     for atr in geoValsvarlist:
 *         setattr(geo,atr,d[atr])
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5PDSim_6scroll_17common_scroll_geo_geoVals)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 553, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_geo = ((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "PDSim/scroll/common_scroll_geo.pyx":554
 * def rebuild_geoVals(d):
 *     geo = geoVals()
 *     for atr in geoValsvarlist:             # <<<<<<<<<<<<<<
 *         setattr(geo,atr,d[atr])
 *     return geo
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_geoValsvarlist); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 554, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 554, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 554, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 554, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 554, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 554, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 554, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v_atr, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "PDSim/scroll/common_scroll_geo.pyx":555
 *     geo = geoVals()
 *     for atr in geoValsvarlist:
 *         setattr(geo,atr,d[atr])             # <<<<<<<<<<<<<<
 *     return geo
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_d, __pyx_v_atr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 555, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = PyObject_SetAttr(((PyObject *)__pyx_v_geo), __pyx_v_atr, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 555, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "PDSim/scroll/common_scroll_geo.pyx":554
 * def rebuild_geoVals(d):
 *     geo = geoVals()
 *     for atr in geoValsvarlist:             # <<<<<<<<<<<<<<
 *         setattr(geo,atr,d[atr])
 *     return geo
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "PDSim/scroll/common_scroll_geo.pyx":556
 *     for atr in geoValsvarlist:
 *         setattr(geo,atr,d[atr])
 *     return geo             # <<<<<<<<<<<<<<
 * 
 * cdef class geoVals:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_geo));
  __pyx_r = ((PyObject *)__pyx_v_geo);
  goto __pyx_L0;

  /* "PDSim/scroll/common_scroll_geo.pyx":552
 *                 'cx_scroll','cy_scroll','V_scroll','Vremove']
 * 
 * def rebuild_geoVals(d):             # <<<<<<<<<<<<<<
 *     geo = geoVals()
 *     for atr in geoValsvarlist:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.rebuild_geoVals", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_geo);
  __Pyx_XDECREF(__pyx_v_atr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pyx":560
 * cdef class geoVals:
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self.phi_ie_offset = 0.0
 * 
 */

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals___init__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals___init__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 560, 0, __PYX_ERR(0, 560, __pyx_L1_error));

  /* "PDSim/scroll/common_scroll_geo.pyx":561
 * 
 *     def __init__(self):
 *         self.phi_ie_offset = 0.0             # <<<<<<<<<<<<<<
 * 
 *     def __reduce__(self):
 */
  __pyx_v_self->phi_ie_offset = 0.0;

  /* "PDSim/scroll/common_scroll_geo.pyx":560
 * cdef class geoVals:
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self.phi_ie_offset = 0.0
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pyx":563
 *         self.phi_ie_offset = 0.0
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         d={}
 *         for atr in geoValsvarlist:
 */

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_3__reduce__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5PDSim_6scroll_17common_scroll_geo_7geoVals_2__reduce__[] = "geoVals.__reduce__(self)";
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_3__reduce__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_2__reduce__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_2__reduce__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self) {
  PyObject *__pyx_v_d = NULL;
  PyObject *__pyx_v_atr = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("__reduce__", 0);
  __Pyx_TraceCall("__reduce__", __pyx_f[0], 563, 0, __PYX_ERR(0, 563, __pyx_L1_error));

  /* "PDSim/scroll/common_scroll_geo.pyx":564
 * 
 *     def __reduce__(self):
 *         d={}             # <<<<<<<<<<<<<<
 *         for atr in geoValsvarlist:
 *             d[atr]=getattr(self,atr)
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 564, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_d = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "PDSim/scroll/common_scroll_geo.pyx":565
 *     def __reduce__(self):
 *         d={}
 *         for atr in geoValsvarlist:             # <<<<<<<<<<<<<<
 *             d[atr]=getattr(self,atr)
 *         return rebuild_geoVals,(d,)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_geoValsvarlist); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 565, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 565, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 565, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 565, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 565, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 565, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 565, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v_atr, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "PDSim/scroll/common_scroll_geo.pyx":566
 *         d={}
 *         for atr in geoValsvarlist:
 *             d[atr]=getattr(self,atr)             # <<<<<<<<<<<<<<
 *         return rebuild_geoVals,(d,)
 * 
 */
    __pyx_t_1 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_atr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 566, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(PyDict_SetItem(__pyx_v_d, __pyx_v_atr, __pyx_t_1) < 0)) __PYX_ERR(0, 566, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "PDSim/scroll/common_scroll_geo.pyx":565
 *     def __reduce__(self):
 *         d={}
 *         for atr in geoValsvarlist:             # <<<<<<<<<<<<<<
 *             d[atr]=getattr(self,atr)
 *         return rebuild_geoVals,(d,)
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "PDSim/scroll/common_scroll_geo.pyx":567
 *         for atr in geoValsvarlist:
 *             d[atr]=getattr(self,atr)
 *         return rebuild_geoVals,(d,)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_rebuild_geoVals); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_d);
  __Pyx_GIVEREF(__pyx_v_d);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_d);
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "PDSim/scroll/common_scroll_geo.pyx":563
 *         self.phi_ie_offset = 0.0
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         d={}
 *         for atr in geoValsvarlist:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XDECREF(__pyx_v_atr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pyx":569
 *         return rebuild_geoVals,(d,)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         s='geoVals instance at '+str(id(self))+'\n'
 *         for atr in geoValsvarlist:
 */

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_4__repr__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_4__repr__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self) {
  PyObject *__pyx_v_s = NULL;
  PyObject *__pyx_v_atr = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 569, 0, __PYX_ERR(0, 569, __pyx_L1_error));

  /* "PDSim/scroll/common_scroll_geo.pyx":570
 * 
 *     def __repr__(self):
 *         s='geoVals instance at '+str(id(self))+'\n'             # <<<<<<<<<<<<<<
 *         for atr in geoValsvarlist:
 *             s+=atr+': '+str(getattr(self,atr))+'\n'
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Add(__pyx_kp_s_geoVals_instance_at, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_kp_s__8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_s = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "PDSim/scroll/common_scroll_geo.pyx":571
 *     def __repr__(self):
 *         s='geoVals instance at '+str(id(self))+'\n'
 *         for atr in geoValsvarlist:             # <<<<<<<<<<<<<<
 *             s+=atr+': '+str(getattr(self,atr))+'\n'
 *         return s
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_geoValsvarlist); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 571, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 571, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 571, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 571, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 571, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 571, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_4(__pyx_t_1);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 571, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_atr, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "PDSim/scroll/common_scroll_geo.pyx":572
 *         s='geoVals instance at '+str(id(self))+'\n'
 *         for atr in geoValsvarlist:
 *             s+=atr+': '+str(getattr(self,atr))+'\n'             # <<<<<<<<<<<<<<
 *         return s
 * 
 */
    __pyx_t_2 = PyNumber_Add(__pyx_v_atr, __pyx_kp_s__17); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 572, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_atr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 572, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 572, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyNumber_Add(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 572, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyNumber_Add(__pyx_t_5, __pyx_kp_s__8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 572, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyNumber_InPlaceAdd(__pyx_v_s, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 572, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF_SET(__pyx_v_s, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "PDSim/scroll/common_scroll_geo.pyx":571
 *     def __repr__(self):
 *         s='geoVals instance at '+str(id(self))+'\n'
 *         for atr in geoValsvarlist:             # <<<<<<<<<<<<<<
 *             s+=atr+': '+str(getattr(self,atr))+'\n'
 *         return s
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "PDSim/scroll/common_scroll_geo.pyx":573
 *         for atr in geoValsvarlist:
 *             s+=atr+': '+str(getattr(self,atr))+'\n'
 *         return s             # <<<<<<<<<<<<<<
 * 
 *     cpdef double val_if_symmetric(self, double val) except *:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_s);
  __pyx_r = __pyx_v_s;
  goto __pyx_L0;

  /* "PDSim/scroll/common_scroll_geo.pyx":569
 *         return rebuild_geoVals,(d,)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         s='geoVals instance at '+str(id(self))+'\n'
 *         for atr in geoValsvarlist:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XDECREF(__pyx_v_atr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pyx":575
 *         return s
 * 
 *     cpdef double val_if_symmetric(self, double val) except *:             # <<<<<<<<<<<<<<
 *         """ Returns the value if symmetric, throws ValueError otherwise """
 *         if self.is_symmetric():
 */

static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7val_if_symmetric(PyObject *__pyx_v_self, PyObject *__pyx_arg_val); /*proto*/
static double __pyx_f_5PDSim_6scroll_17common_scroll_geo_7geoVals_val_if_symmetric(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, double __pyx_v_val, int __pyx_skip_dispatch) {
  double __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  double __pyx_t_6;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("val_if_symmetric", 0);
  __Pyx_TraceCall("val_if_symmetric", __pyx_f[0], 575, 0, __PYX_ERR(0, 575, __pyx_L1_error));
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP
    static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0;
    if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))))));
    else {
      PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0;
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_val_if_symmetric); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 575, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7val_if_symmetric)) {
        __pyx_t_3 = PyFloat_FromDouble(__pyx_v_val); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 575, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_5)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
          }
        }
        __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 575, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_6 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 575, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_6;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP
      tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0;
      obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0;
      if (unlikely(type_dict_guard != tp_dict_version)) {
        tp_dict_version = obj_dict_version = 0;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP
    }
    #endif
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":577
 *     cpdef double val_if_symmetric(self, double val) except *:
 *         """ Returns the value if symmetric, throws ValueError otherwise """
 *         if self.is_symmetric():             # <<<<<<<<<<<<<<
 *             return val
 *         else:
 */
  __pyx_t_7 = (((struct __pyx_vtabstruct_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self->__pyx_vtab)->is_symmetric(__pyx_v_self, 0) != 0);
  if (likely(__pyx_t_7)) {

    /* "PDSim/scroll/common_scroll_geo.pyx":578
 *         """ Returns the value if symmetric, throws ValueError otherwise """
 *         if self.is_symmetric():
 *             return val             # <<<<<<<<<<<<<<
 *         else:
 *             raise ValueError('Symmetric angle requested (phi_ie, phi_is, phi_i0, etc.) but the geometry is not symmetric')
 */
    __pyx_r = __pyx_v_val;
    goto __pyx_L0;

    /* "PDSim/scroll/common_scroll_geo.pyx":577
 *     cpdef double val_if_symmetric(self, double val) except *:
 *         """ Returns the value if symmetric, throws ValueError otherwise """
 *         if self.is_symmetric():             # <<<<<<<<<<<<<<
 *             return val
 *         else:
 */
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":580
 *             return val
 *         else:
 *             raise ValueError('Symmetric angle requested (phi_ie, phi_is, phi_i0, etc.) but the geometry is not symmetric')             # <<<<<<<<<<<<<<
 * 
 *     cpdef copy_inplace(self, geoVals target):
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 580, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 580, __pyx_L1_error)
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":575
 *         return s
 * 
 *     cpdef double val_if_symmetric(self, double val) except *:             # <<<<<<<<<<<<<<
 *         """ Returns the value if symmetric, throws ValueError otherwise """
 *         if self.is_symmetric():
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.val_if_symmetric", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7val_if_symmetric(PyObject *__pyx_v_self, PyObject *__pyx_arg_val); /*proto*/
static char __pyx_doc_5PDSim_6scroll_17common_scroll_geo_7geoVals_6val_if_symmetric[] = "geoVals.val_if_symmetric(self, double val) -> double\n Returns the value if symmetric, throws ValueError otherwise ";
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7val_if_symmetric(PyObject *__pyx_v_self, PyObject *__pyx_arg_val) {
  double __pyx_v_val;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("val_if_symmetric (wrapper)", 0);
  assert(__pyx_arg_val); {
    __pyx_v_val = __pyx_PyFloat_AsDouble(__pyx_arg_val); if (unlikely((__pyx_v_val == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 575, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.val_if_symmetric", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_6val_if_symmetric(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self), ((double)__pyx_v_val));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_6val_if_symmetric(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, double __pyx_v_val) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("val_if_symmetric", 0);
  __Pyx_TraceCall("val_if_symmetric (wrapper)", __pyx_f[0], 575, 0, __PYX_ERR(0, 575, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5PDSim_6scroll_17common_scroll_geo_7geoVals_val_if_symmetric(__pyx_v_self, __pyx_v_val, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 575, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.val_if_symmetric", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pyx":582
 *             raise ValueError('Symmetric angle requested (phi_ie, phi_is, phi_i0, etc.) but the geometry is not symmetric')
 * 
 *     cpdef copy_inplace(self, geoVals target):             # <<<<<<<<<<<<<<
 *         """
 *         For a provided target class, copy over all attributes
 */

static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_9copy_inplace(PyObject *__pyx_v_self, PyObject *__pyx_v_target); /*proto*/
static PyObject *__pyx_f_5PDSim_6scroll_17common_scroll_geo_7geoVals_copy_inplace(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_target, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_atr = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("copy_inplace", 0);
  __Pyx_TraceCall("copy_inplace", __pyx_f[0], 582, 0, __PYX_ERR(0, 582, __pyx_L1_error));
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP
    static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0;
    if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))))));
    else {
      PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0;
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy_inplace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 582, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_9copy_inplace)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_target)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_target));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 582, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP
      tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0;
      obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0;
      if (unlikely(type_dict_guard != tp_dict_version)) {
        tp_dict_version = obj_dict_version = 0;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP
    }
    #endif
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":586
 *         For a provided target class, copy over all attributes
 *         """
 *         for atr in geoValsvarlist:             # <<<<<<<<<<<<<<
 *             setattr(target,atr,getattr(self, atr))
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_geoValsvarlist); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 586, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 586, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_6)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 586, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 586, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_6(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 586, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v_atr, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "PDSim/scroll/common_scroll_geo.pyx":587
 *         """
 *         for atr in geoValsvarlist:
 *             setattr(target,atr,getattr(self, atr))             # <<<<<<<<<<<<<<
 * 
 *     property phi_ie:
 */
    __pyx_t_1 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_atr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 587, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = PyObject_SetAttr(((PyObject *)__pyx_v_target), __pyx_v_atr, __pyx_t_1); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 587, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "PDSim/scroll/common_scroll_geo.pyx":586
 *         For a provided target class, copy over all attributes
 *         """
 *         for atr in geoValsvarlist:             # <<<<<<<<<<<<<<
 *             setattr(target,atr,getattr(self, atr))
 * 
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "PDSim/scroll/common_scroll_geo.pyx":582
 *             raise ValueError('Symmetric angle requested (phi_ie, phi_is, phi_i0, etc.) but the geometry is not symmetric')
 * 
 *     cpdef copy_inplace(self, geoVals target):             # <<<<<<<<<<<<<<
 *         """
 *         For a provided target class, copy over all attributes
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.copy_inplace", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_atr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_9copy_inplace(PyObject *__pyx_v_self, PyObject *__pyx_v_target); /*proto*/
static char __pyx_doc_5PDSim_6scroll_17common_scroll_geo_7geoVals_8copy_inplace[] = "geoVals.copy_inplace(self, geoVals target)\n\n        For a provided target class, copy over all attributes\n        ";
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_9copy_inplace(PyObject *__pyx_v_self, PyObject *__pyx_v_target) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("copy_inplace (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_target), __pyx_ptype_5PDSim_6scroll_17common_scroll_geo_geoVals, 1, "target", 0))) __PYX_ERR(0, 582, __pyx_L1_error)
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_8copy_inplace(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self), ((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_target));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_8copy_inplace(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_target) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("copy_inplace", 0);
  __Pyx_TraceCall("copy_inplace (wrapper)", __pyx_f[0], 582, 0, __PYX_ERR(0, 582, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5PDSim_6scroll_17common_scroll_geo_7geoVals_copy_inplace(__pyx_v_self, __pyx_v_target, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.copy_inplace", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pyx":591
 *     property phi_ie:
 *         """ Inner Ending Angle """
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.val_if_symmetric(self.phi_fie)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_6phi_ie_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_6phi_ie_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_6phi_ie___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_6phi_ie___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 591, 0, __PYX_ERR(0, 591, __pyx_L1_error));

  /* "PDSim/scroll/common_scroll_geo.pyx":592
 *         """ Inner Ending Angle """
 *         def __get__(self):
 *             return self.val_if_symmetric(self.phi_fie)             # <<<<<<<<<<<<<<
 * 
 *     property phi_is:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self->__pyx_vtab)->val_if_symmetric(__pyx_v_self, __pyx_v_self->phi_fie, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 592, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 592, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "PDSim/scroll/common_scroll_geo.pyx":591
 *     property phi_ie:
 *         """ Inner Ending Angle """
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.val_if_symmetric(self.phi_fie)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.phi_ie.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pyx":596
 *     property phi_is:
 *         """ Inner Starting Angle """
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.val_if_symmetric(self.phi_fis)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_6phi_is_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_6phi_is_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_6phi_is___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_6phi_is___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 596, 0, __PYX_ERR(0, 596, __pyx_L1_error));

  /* "PDSim/scroll/common_scroll_geo.pyx":597
 *         """ Inner Starting Angle """
 *         def __get__(self):
 *             return self.val_if_symmetric(self.phi_fis)             # <<<<<<<<<<<<<<
 * 
 *     property phi_i0:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self->__pyx_vtab)->val_if_symmetric(__pyx_v_self, __pyx_v_self->phi_fis, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 597, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "PDSim/scroll/common_scroll_geo.pyx":596
 *     property phi_is:
 *         """ Inner Starting Angle """
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.val_if_symmetric(self.phi_fis)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.phi_is.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pyx":601
 *     property phi_i0:
 *         """ Inner Initial Angle """
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.val_if_symmetric(self.phi_fi0)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_6phi_i0_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_6phi_i0_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_6phi_i0___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_6phi_i0___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 601, 0, __PYX_ERR(0, 601, __pyx_L1_error));

  /* "PDSim/scroll/common_scroll_geo.pyx":602
 *         """ Inner Initial Angle """
 *         def __get__(self):
 *             return self.val_if_symmetric(self.phi_fi0)             # <<<<<<<<<<<<<<
 * 
 *     property phi_oe:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self->__pyx_vtab)->val_if_symmetric(__pyx_v_self, __pyx_v_self->phi_fi0, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 602, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "PDSim/scroll/common_scroll_geo.pyx":601
 *     property phi_i0:
 *         """ Inner Initial Angle """
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.val_if_symmetric(self.phi_fi0)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.phi_i0.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pyx":606
 *     property phi_oe:
 *         """ Outer Ending Angle """
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.val_if_symmetric(self.phi_foe)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_6phi_oe_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_6phi_oe_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_6phi_oe___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_6phi_oe___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 606, 0, __PYX_ERR(0, 606, __pyx_L1_error));

  /* "PDSim/scroll/common_scroll_geo.pyx":607
 *         """ Outer Ending Angle """
 *         def __get__(self):
 *             return self.val_if_symmetric(self.phi_foe)             # <<<<<<<<<<<<<<
 * 
 *     property phi_os:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self->__pyx_vtab)->val_if_symmetric(__pyx_v_self, __pyx_v_self->phi_foe, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 607, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 607, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "PDSim/scroll/common_scroll_geo.pyx":606
 *     property phi_oe:
 *         """ Outer Ending Angle """
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.val_if_symmetric(self.phi_foe)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.phi_oe.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pyx":611
 *     property phi_os:
 *         """ Outer Starting Angle """
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.val_if_symmetric(self.phi_fos)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_6phi_os_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_6phi_os_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_6phi_os___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_6phi_os___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 611, 0, __PYX_ERR(0, 611, __pyx_L1_error));

  /* "PDSim/scroll/common_scroll_geo.pyx":612
 *         """ Outer Starting Angle """
 *         def __get__(self):
 *             return self.val_if_symmetric(self.phi_fos)             # <<<<<<<<<<<<<<
 * 
 *     property phi_o0:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self->__pyx_vtab)->val_if_symmetric(__pyx_v_self, __pyx_v_self->phi_fos, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 612, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "PDSim/scroll/common_scroll_geo.pyx":611
 *     property phi_os:
 *         """ Outer Starting Angle """
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.val_if_symmetric(self.phi_fos)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.phi_os.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pyx":616
 *     property phi_o0:
 *         """ Outer Initial Angle """
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.val_if_symmetric(self.phi_fo0)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_6phi_o0_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_6phi_o0_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_6phi_o0___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_6phi_o0___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 616, 0, __PYX_ERR(0, 616, __pyx_L1_error));

  /* "PDSim/scroll/common_scroll_geo.pyx":617
 *         """ Outer Initial Angle """
 *         def __get__(self):
 *             return self.val_if_symmetric(self.phi_fo0)             # <<<<<<<<<<<<<<
 * 
 *     cpdef bint is_symmetric(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self->__pyx_vtab)->val_if_symmetric(__pyx_v_self, __pyx_v_self->phi_fo0, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 617, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 617, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "PDSim/scroll/common_scroll_geo.pyx":616
 *     property phi_o0:
 *         """ Outer Initial Angle """
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.val_if_symmetric(self.phi_fo0)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.phi_o0.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pyx":619
 *             return self.val_if_symmetric(self.phi_fo0)
 * 
 *     cpdef bint is_symmetric(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns true if all the angles for the fixed scroll are the same as for the orbiting scroll
 */

static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_11is_symmetric(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static int __pyx_f_5PDSim_6scroll_17common_scroll_geo_7geoVals_is_symmetric(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("is_symmetric", 0);
  __Pyx_TraceCall("is_symmetric", __pyx_f[0], 619, 0, __PYX_ERR(0, 619, __pyx_L1_error));
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP
    static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0;
    if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))))));
    else {
      PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0;
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_symmetric); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 619, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_11is_symmetric)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 619, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 619, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_5;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP
      tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0;
      obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0;
      if (unlikely(type_dict_guard != tp_dict_version)) {
        tp_dict_version = obj_dict_version = 0;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP
    }
    #endif
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":623
 *         Returns true if all the angles for the fixed scroll are the same as for the orbiting scroll
 *         """
 *         return (abs(self.phi_fi0-self.phi_oi0) < 1e-14             # <<<<<<<<<<<<<<
 *                 and abs(self.phi_fis-self.phi_ois) < 1e-14
 *                 and abs(self.phi_fie-self.phi_oie) < 1e-14
 */
  __pyx_t_6 = ((fabs((__pyx_v_self->phi_fi0 - __pyx_v_self->phi_oi0)) < 1e-14) != 0);
  if (__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L3_bool_binop_done;
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":624
 *         """
 *         return (abs(self.phi_fi0-self.phi_oi0) < 1e-14
 *                 and abs(self.phi_fis-self.phi_ois) < 1e-14             # <<<<<<<<<<<<<<
 *                 and abs(self.phi_fie-self.phi_oie) < 1e-14
 *                 and abs(self.phi_fo0-self.phi_oo0) < 1e-14
 */
  __pyx_t_6 = ((fabs((__pyx_v_self->phi_fis - __pyx_v_self->phi_ois)) < 1e-14) != 0);
  if (__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L3_bool_binop_done;
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":625
 *         return (abs(self.phi_fi0-self.phi_oi0) < 1e-14
 *                 and abs(self.phi_fis-self.phi_ois) < 1e-14
 *                 and abs(self.phi_fie-self.phi_oie) < 1e-14             # <<<<<<<<<<<<<<
 *                 and abs(self.phi_fo0-self.phi_oo0) < 1e-14
 *                 and abs(self.phi_fos-self.phi_oos) < 1e-14
 */
  __pyx_t_6 = ((fabs((__pyx_v_self->phi_fie - __pyx_v_self->phi_oie)) < 1e-14) != 0);
  if (__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L3_bool_binop_done;
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":626
 *                 and abs(self.phi_fis-self.phi_ois) < 1e-14
 *                 and abs(self.phi_fie-self.phi_oie) < 1e-14
 *                 and abs(self.phi_fo0-self.phi_oo0) < 1e-14             # <<<<<<<<<<<<<<
 *                 and abs(self.phi_fos-self.phi_oos) < 1e-14
 *                 and abs(self.phi_foe-self.phi_ooe) < 1e-14
 */
  __pyx_t_6 = ((fabs((__pyx_v_self->phi_fo0 - __pyx_v_self->phi_oo0)) < 1e-14) != 0);
  if (__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L3_bool_binop_done;
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":627
 *                 and abs(self.phi_fie-self.phi_oie) < 1e-14
 *                 and abs(self.phi_fo0-self.phi_oo0) < 1e-14
 *                 and abs(self.phi_fos-self.phi_oos) < 1e-14             # <<<<<<<<<<<<<<
 *                 and abs(self.phi_foe-self.phi_ooe) < 1e-14
 *                 )
 */
  __pyx_t_6 = ((fabs((__pyx_v_self->phi_fos - __pyx_v_self->phi_oos)) < 1e-14) != 0);
  if (__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L3_bool_binop_done;
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":628
 *                 and abs(self.phi_fo0-self.phi_oo0) < 1e-14
 *                 and abs(self.phi_fos-self.phi_oos) < 1e-14
 *                 and abs(self.phi_foe-self.phi_ooe) < 1e-14             # <<<<<<<<<<<<<<
 *                 )
 * 
 */
  __pyx_t_6 = ((fabs((__pyx_v_self->phi_foe - __pyx_v_self->phi_ooe)) < 1e-14) != 0);
  __pyx_t_5 = __pyx_t_6;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_5;
  goto __pyx_L0;

  /* "PDSim/scroll/common_scroll_geo.pyx":619
 *             return self.val_if_symmetric(self.phi_fo0)
 * 
 *     cpdef bint is_symmetric(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns true if all the angles for the fixed scroll are the same as for the orbiting scroll
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_WriteUnraisable("PDSim.scroll.common_scroll_geo.geoVals.is_symmetric", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_11is_symmetric(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5PDSim_6scroll_17common_scroll_geo_7geoVals_10is_symmetric[] = "geoVals.is_symmetric(self) -> bool\n\n        Returns true if all the angles for the fixed scroll are the same as for the orbiting scroll\n        ";
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_11is_symmetric(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_symmetric (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_10is_symmetric(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_10is_symmetric(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("is_symmetric", 0);
  __Pyx_TraceCall("is_symmetric (wrapper)", __pyx_f[0], 619, 0, __PYX_ERR(0, 619, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_5PDSim_6scroll_17common_scroll_geo_7geoVals_is_symmetric(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.is_symmetric", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pxd":105
 * #Take over the geo class with strict typing
 * cdef class geoVals:
 *     cdef public double h,ro,rb,t             # <<<<<<<<<<<<<<
 *     cdef public double phi_fi0,phi_fis,phi_fie,phi_fo0,phi_fos,phi_foe, phi_oi0,phi_ois,phi_oie, phi_oo0,phi_oos,phi_ooe
 *     cdef public double xa_arc1,ya_arc1,ra_arc1,t1_arc1,t2_arc1
 */

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_1h_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_1h_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_1h___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_1h___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 105, 0, __PYX_ERR(1, 105, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->h); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.h.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_1h_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_1h_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_1h_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_1h_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 105, 0, __PYX_ERR(1, 105, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 105, __pyx_L1_error)
  __pyx_v_self->h = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.h.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_2ro_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_2ro_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_2ro___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_2ro___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 105, 0, __PYX_ERR(1, 105, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->ro); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.ro.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_2ro_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_2ro_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_2ro_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_2ro_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 105, 0, __PYX_ERR(1, 105, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 105, __pyx_L1_error)
  __pyx_v_self->ro = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.ro.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_2rb_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_2rb_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_2rb___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_2rb___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 105, 0, __PYX_ERR(1, 105, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->rb); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.rb.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_2rb_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_2rb_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_2rb_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_2rb_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 105, 0, __PYX_ERR(1, 105, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 105, __pyx_L1_error)
  __pyx_v_self->rb = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.rb.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_1t_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_1t_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_1t___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_1t___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 105, 0, __PYX_ERR(1, 105, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->t); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.t.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_1t_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_1t_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_1t_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_1t_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 105, 0, __PYX_ERR(1, 105, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 105, __pyx_L1_error)
  __pyx_v_self->t = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.t.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pxd":106
 * cdef class geoVals:
 *     cdef public double h,ro,rb,t
 *     cdef public double phi_fi0,phi_fis,phi_fie,phi_fo0,phi_fos,phi_foe, phi_oi0,phi_ois,phi_oie, phi_oo0,phi_oos,phi_ooe             # <<<<<<<<<<<<<<
 *     cdef public double xa_arc1,ya_arc1,ra_arc1,t1_arc1,t2_arc1
 *     cdef public double xa_arc2,ya_arc2,ra_arc2,t1_arc2,t2_arc2
 */

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fi0_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fi0_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fi0___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fi0___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 106, 0, __PYX_ERR(1, 106, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->phi_fi0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.phi_fi0.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fi0_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fi0_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fi0_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fi0_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 106, 0, __PYX_ERR(1, 106, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 106, __pyx_L1_error)
  __pyx_v_self->phi_fi0 = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.phi_fi0.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fis_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fis_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fis___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fis___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 106, 0, __PYX_ERR(1, 106, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->phi_fis); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.phi_fis.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fis_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fis_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fis_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fis_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 106, 0, __PYX_ERR(1, 106, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 106, __pyx_L1_error)
  __pyx_v_self->phi_fis = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.phi_fis.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fie_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fie_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fie___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fie___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 106, 0, __PYX_ERR(1, 106, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->phi_fie); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.phi_fie.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fie_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fie_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fie_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fie_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 106, 0, __PYX_ERR(1, 106, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 106, __pyx_L1_error)
  __pyx_v_self->phi_fie = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.phi_fie.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fo0_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fo0_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fo0___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fo0___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 106, 0, __PYX_ERR(1, 106, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->phi_fo0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.phi_fo0.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fo0_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fo0_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fo0_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fo0_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 106, 0, __PYX_ERR(1, 106, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 106, __pyx_L1_error)
  __pyx_v_self->phi_fo0 = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.phi_fo0.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fos_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fos_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fos___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fos___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 106, 0, __PYX_ERR(1, 106, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->phi_fos); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.phi_fos.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fos_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fos_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fos_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fos_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 106, 0, __PYX_ERR(1, 106, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 106, __pyx_L1_error)
  __pyx_v_self->phi_fos = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.phi_fos.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_foe_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_foe_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_foe___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_foe___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 106, 0, __PYX_ERR(1, 106, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->phi_foe); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.phi_foe.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_foe_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_foe_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_foe_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_foe_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 106, 0, __PYX_ERR(1, 106, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 106, __pyx_L1_error)
  __pyx_v_self->phi_foe = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.phi_foe.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_oi0_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_oi0_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_oi0___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_oi0___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 106, 0, __PYX_ERR(1, 106, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->phi_oi0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.phi_oi0.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_oi0_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_oi0_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_oi0_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_oi0_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 106, 0, __PYX_ERR(1, 106, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 106, __pyx_L1_error)
  __pyx_v_self->phi_oi0 = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.phi_oi0.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_ois_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_ois_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_ois___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_ois___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 106, 0, __PYX_ERR(1, 106, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->phi_ois); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.phi_ois.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_ois_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_ois_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_ois_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_ois_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 106, 0, __PYX_ERR(1, 106, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 106, __pyx_L1_error)
  __pyx_v_self->phi_ois = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.phi_ois.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_oie_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_oie_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_oie___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_oie___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 106, 0, __PYX_ERR(1, 106, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->phi_oie); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.phi_oie.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_oie_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_oie_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_oie_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_oie_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 106, 0, __PYX_ERR(1, 106, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 106, __pyx_L1_error)
  __pyx_v_self->phi_oie = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.phi_oie.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_oo0_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_oo0_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_oo0___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_oo0___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 106, 0, __PYX_ERR(1, 106, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->phi_oo0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.phi_oo0.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_oo0_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_oo0_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_oo0_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_oo0_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 106, 0, __PYX_ERR(1, 106, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 106, __pyx_L1_error)
  __pyx_v_self->phi_oo0 = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.phi_oo0.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_oos_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_oos_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_oos___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_oos___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 106, 0, __PYX_ERR(1, 106, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->phi_oos); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.phi_oos.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_oos_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_oos_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_oos_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_oos_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 106, 0, __PYX_ERR(1, 106, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 106, __pyx_L1_error)
  __pyx_v_self->phi_oos = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.phi_oos.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_ooe_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_ooe_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_ooe___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_ooe___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 106, 0, __PYX_ERR(1, 106, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->phi_ooe); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.phi_ooe.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_ooe_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_ooe_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_ooe_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_ooe_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 106, 0, __PYX_ERR(1, 106, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 106, __pyx_L1_error)
  __pyx_v_self->phi_ooe = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.phi_ooe.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pxd":107
 *     cdef public double h,ro,rb,t
 *     cdef public double phi_fi0,phi_fis,phi_fie,phi_fo0,phi_fos,phi_foe, phi_oi0,phi_ois,phi_oie, phi_oo0,phi_oos,phi_ooe
 *     cdef public double xa_arc1,ya_arc1,ra_arc1,t1_arc1,t2_arc1             # <<<<<<<<<<<<<<
 *     cdef public double xa_arc2,ya_arc2,ra_arc2,t1_arc2,t2_arc2
 *     cdef public double b_line, t1_line, t2_line, m_line
 */

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7xa_arc1_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7xa_arc1_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7xa_arc1___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7xa_arc1___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 107, 0, __PYX_ERR(1, 107, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->xa_arc1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.xa_arc1.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7xa_arc1_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7xa_arc1_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7xa_arc1_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7xa_arc1_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 107, 0, __PYX_ERR(1, 107, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 107, __pyx_L1_error)
  __pyx_v_self->xa_arc1 = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.xa_arc1.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7ya_arc1_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7ya_arc1_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7ya_arc1___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7ya_arc1___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 107, 0, __PYX_ERR(1, 107, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->ya_arc1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.ya_arc1.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7ya_arc1_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7ya_arc1_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7ya_arc1_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7ya_arc1_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 107, 0, __PYX_ERR(1, 107, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 107, __pyx_L1_error)
  __pyx_v_self->ya_arc1 = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.ya_arc1.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7ra_arc1_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7ra_arc1_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7ra_arc1___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7ra_arc1___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 107, 0, __PYX_ERR(1, 107, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->ra_arc1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.ra_arc1.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7ra_arc1_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7ra_arc1_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7ra_arc1_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7ra_arc1_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 107, 0, __PYX_ERR(1, 107, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 107, __pyx_L1_error)
  __pyx_v_self->ra_arc1 = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.ra_arc1.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t1_arc1_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t1_arc1_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t1_arc1___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t1_arc1___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 107, 0, __PYX_ERR(1, 107, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->t1_arc1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.t1_arc1.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t1_arc1_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t1_arc1_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t1_arc1_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t1_arc1_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 107, 0, __PYX_ERR(1, 107, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 107, __pyx_L1_error)
  __pyx_v_self->t1_arc1 = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.t1_arc1.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t2_arc1_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t2_arc1_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t2_arc1___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t2_arc1___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 107, 0, __PYX_ERR(1, 107, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->t2_arc1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.t2_arc1.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t2_arc1_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t2_arc1_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t2_arc1_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t2_arc1_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 107, 0, __PYX_ERR(1, 107, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 107, __pyx_L1_error)
  __pyx_v_self->t2_arc1 = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.t2_arc1.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pxd":108
 *     cdef public double phi_fi0,phi_fis,phi_fie,phi_fo0,phi_fos,phi_foe, phi_oi0,phi_ois,phi_oie, phi_oo0,phi_oos,phi_ooe
 *     cdef public double xa_arc1,ya_arc1,ra_arc1,t1_arc1,t2_arc1
 *     cdef public double xa_arc2,ya_arc2,ra_arc2,t1_arc2,t2_arc2             # <<<<<<<<<<<<<<
 *     cdef public double b_line, t1_line, t2_line, m_line
 *     cdef public double x0_wall,y0_wall,r_wall
 */

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7xa_arc2_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7xa_arc2_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7xa_arc2___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7xa_arc2___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 108, 0, __PYX_ERR(1, 108, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->xa_arc2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.xa_arc2.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7xa_arc2_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7xa_arc2_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7xa_arc2_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7xa_arc2_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 108, 0, __PYX_ERR(1, 108, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 108, __pyx_L1_error)
  __pyx_v_self->xa_arc2 = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.xa_arc2.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7ya_arc2_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7ya_arc2_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7ya_arc2___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7ya_arc2___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 108, 0, __PYX_ERR(1, 108, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->ya_arc2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.ya_arc2.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7ya_arc2_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7ya_arc2_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7ya_arc2_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7ya_arc2_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 108, 0, __PYX_ERR(1, 108, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 108, __pyx_L1_error)
  __pyx_v_self->ya_arc2 = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.ya_arc2.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7ra_arc2_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7ra_arc2_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7ra_arc2___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7ra_arc2___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 108, 0, __PYX_ERR(1, 108, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->ra_arc2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.ra_arc2.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7ra_arc2_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7ra_arc2_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7ra_arc2_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7ra_arc2_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 108, 0, __PYX_ERR(1, 108, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 108, __pyx_L1_error)
  __pyx_v_self->ra_arc2 = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.ra_arc2.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t1_arc2_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t1_arc2_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t1_arc2___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t1_arc2___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 108, 0, __PYX_ERR(1, 108, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->t1_arc2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.t1_arc2.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t1_arc2_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t1_arc2_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t1_arc2_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t1_arc2_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 108, 0, __PYX_ERR(1, 108, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 108, __pyx_L1_error)
  __pyx_v_self->t1_arc2 = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.t1_arc2.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t2_arc2_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t2_arc2_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t2_arc2___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t2_arc2___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 108, 0, __PYX_ERR(1, 108, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->t2_arc2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.t2_arc2.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t2_arc2_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t2_arc2_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t2_arc2_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t2_arc2_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 108, 0, __PYX_ERR(1, 108, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 108, __pyx_L1_error)
  __pyx_v_self->t2_arc2 = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.t2_arc2.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pxd":109
 *     cdef public double xa_arc1,ya_arc1,ra_arc1,t1_arc1,t2_arc1
 *     cdef public double xa_arc2,ya_arc2,ra_arc2,t1_arc2,t2_arc2
 *     cdef public double b_line, t1_line, t2_line, m_line             # <<<<<<<<<<<<<<
 *     cdef public double x0_wall,y0_wall,r_wall
 *     cdef public double delta_radial, delta_flank
 */

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_6b_line_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_6b_line_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_6b_line___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_6b_line___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 109, 0, __PYX_ERR(1, 109, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->b_line); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.b_line.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_6b_line_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_6b_line_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_6b_line_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_6b_line_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 109, 0, __PYX_ERR(1, 109, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 109, __pyx_L1_error)
  __pyx_v_self->b_line = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.b_line.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t1_line_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t1_line_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t1_line___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t1_line___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 109, 0, __PYX_ERR(1, 109, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->t1_line); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.t1_line.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t1_line_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t1_line_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t1_line_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t1_line_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 109, 0, __PYX_ERR(1, 109, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 109, __pyx_L1_error)
  __pyx_v_self->t1_line = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.t1_line.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t2_line_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t2_line_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t2_line___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t2_line___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 109, 0, __PYX_ERR(1, 109, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->t2_line); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.t2_line.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t2_line_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t2_line_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t2_line_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t2_line_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 109, 0, __PYX_ERR(1, 109, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 109, __pyx_L1_error)
  __pyx_v_self->t2_line = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.t2_line.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_6m_line_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_6m_line_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_6m_line___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_6m_line___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 109, 0, __PYX_ERR(1, 109, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->m_line); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.m_line.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_6m_line_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_6m_line_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_6m_line_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_6m_line_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 109, 0, __PYX_ERR(1, 109, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 109, __pyx_L1_error)
  __pyx_v_self->m_line = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.m_line.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pxd":110
 *     cdef public double xa_arc2,ya_arc2,ra_arc2,t1_arc2,t2_arc2
 *     cdef public double b_line, t1_line, t2_line, m_line
 *     cdef public double x0_wall,y0_wall,r_wall             # <<<<<<<<<<<<<<
 *     cdef public double delta_radial, delta_flank
 *     cdef public double phi_ie_offset, delta_suction_offset
 */

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7x0_wall_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7x0_wall_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7x0_wall___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7x0_wall___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 110, 0, __PYX_ERR(1, 110, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->x0_wall); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.x0_wall.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7x0_wall_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7x0_wall_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7x0_wall_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7x0_wall_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 110, 0, __PYX_ERR(1, 110, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 110, __pyx_L1_error)
  __pyx_v_self->x0_wall = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.x0_wall.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7y0_wall_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7y0_wall_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7y0_wall___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7y0_wall___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 110, 0, __PYX_ERR(1, 110, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->y0_wall); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.y0_wall.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7y0_wall_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7y0_wall_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7y0_wall_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7y0_wall_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 110, 0, __PYX_ERR(1, 110, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 110, __pyx_L1_error)
  __pyx_v_self->y0_wall = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.y0_wall.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_6r_wall_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_6r_wall_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_6r_wall___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_6r_wall___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 110, 0, __PYX_ERR(1, 110, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->r_wall); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.r_wall.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_6r_wall_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_6r_wall_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_6r_wall_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_6r_wall_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 110, 0, __PYX_ERR(1, 110, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 110, __pyx_L1_error)
  __pyx_v_self->r_wall = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.r_wall.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pxd":111
 *     cdef public double b_line, t1_line, t2_line, m_line
 *     cdef public double x0_wall,y0_wall,r_wall
 *     cdef public double delta_radial, delta_flank             # <<<<<<<<<<<<<<
 *     cdef public double phi_ie_offset, delta_suction_offset
 *     cdef public double cx_scroll, cy_scroll, V_scroll
 */

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_12delta_radial_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_12delta_radial_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_12delta_radial___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_12delta_radial___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 111, 0, __PYX_ERR(1, 111, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->delta_radial); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.delta_radial.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_12delta_radial_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_12delta_radial_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_12delta_radial_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_12delta_radial_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 111, 0, __PYX_ERR(1, 111, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 111, __pyx_L1_error)
  __pyx_v_self->delta_radial = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.delta_radial.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_11delta_flank_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_11delta_flank_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_11delta_flank___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_11delta_flank___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 111, 0, __PYX_ERR(1, 111, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->delta_flank); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.delta_flank.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_11delta_flank_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_11delta_flank_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_11delta_flank_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_11delta_flank_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 111, 0, __PYX_ERR(1, 111, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 111, __pyx_L1_error)
  __pyx_v_self->delta_flank = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.delta_flank.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pxd":112
 *     cdef public double x0_wall,y0_wall,r_wall
 *     cdef public double delta_radial, delta_flank
 *     cdef public double phi_ie_offset, delta_suction_offset             # <<<<<<<<<<<<<<
 *     cdef public double cx_scroll, cy_scroll, V_scroll
 *     cdef public double Vremove
 */

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_13phi_ie_offset_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_13phi_ie_offset_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_13phi_ie_offset___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_13phi_ie_offset___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 112, 0, __PYX_ERR(1, 112, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->phi_ie_offset); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.phi_ie_offset.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_13phi_ie_offset_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_13phi_ie_offset_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_13phi_ie_offset_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_13phi_ie_offset_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 112, 0, __PYX_ERR(1, 112, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 112, __pyx_L1_error)
  __pyx_v_self->phi_ie_offset = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.phi_ie_offset.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_20delta_suction_offset_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_20delta_suction_offset_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_20delta_suction_offset___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_20delta_suction_offset___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 112, 0, __PYX_ERR(1, 112, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->delta_suction_offset); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.delta_suction_offset.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_20delta_suction_offset_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_20delta_suction_offset_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_20delta_suction_offset_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_20delta_suction_offset_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 112, 0, __PYX_ERR(1, 112, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 112, __pyx_L1_error)
  __pyx_v_self->delta_suction_offset = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.delta_suction_offset.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pxd":113
 *     cdef public double delta_radial, delta_flank
 *     cdef public double phi_ie_offset, delta_suction_offset
 *     cdef public double cx_scroll, cy_scroll, V_scroll             # <<<<<<<<<<<<<<
 *     cdef public double Vremove
 *     cdef public np.ndarray xvec_disc_port, yvec_disc_port
 */

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_9cx_scroll_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_9cx_scroll_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_9cx_scroll___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_9cx_scroll___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 113, 0, __PYX_ERR(1, 113, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->cx_scroll); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.cx_scroll.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_9cx_scroll_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_9cx_scroll_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_9cx_scroll_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_9cx_scroll_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 113, 0, __PYX_ERR(1, 113, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 113, __pyx_L1_error)
  __pyx_v_self->cx_scroll = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.cx_scroll.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_9cy_scroll_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_9cy_scroll_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_9cy_scroll___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_9cy_scroll___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 113, 0, __PYX_ERR(1, 113, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->cy_scroll); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.cy_scroll.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_9cy_scroll_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_9cy_scroll_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_9cy_scroll_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_9cy_scroll_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 113, 0, __PYX_ERR(1, 113, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 113, __pyx_L1_error)
  __pyx_v_self->cy_scroll = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.cy_scroll.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_8V_scroll_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_8V_scroll_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_8V_scroll___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_8V_scroll___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 113, 0, __PYX_ERR(1, 113, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->V_scroll); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.V_scroll.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_8V_scroll_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_8V_scroll_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_8V_scroll_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_8V_scroll_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 113, 0, __PYX_ERR(1, 113, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 113, __pyx_L1_error)
  __pyx_v_self->V_scroll = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.V_scroll.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pxd":114
 *     cdef public double phi_ie_offset, delta_suction_offset
 *     cdef public double cx_scroll, cy_scroll, V_scroll
 *     cdef public double Vremove             # <<<<<<<<<<<<<<
 *     cdef public np.ndarray xvec_disc_port, yvec_disc_port
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7Vremove_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7Vremove_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7Vremove___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7Vremove___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 114, 0, __PYX_ERR(1, 114, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->Vremove); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.Vremove.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7Vremove_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7Vremove_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7Vremove_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_7Vremove_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 114, 0, __PYX_ERR(1, 114, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 114, __pyx_L1_error)
  __pyx_v_self->Vremove = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.Vremove.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pxd":115
 *     cdef public double cx_scroll, cy_scroll, V_scroll
 *     cdef public double Vremove
 *     cdef public np.ndarray xvec_disc_port, yvec_disc_port             # <<<<<<<<<<<<<<
 * 
 *     cpdef bint is_symmetric(self)
 */

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_14xvec_disc_port_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_14xvec_disc_port_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_14xvec_disc_port___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_14xvec_disc_port___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 115, 0, __PYX_ERR(1, 115, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->xvec_disc_port));
  __pyx_r = ((PyObject *)__pyx_v_self->xvec_disc_port);
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.xvec_disc_port.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_14xvec_disc_port_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_14xvec_disc_port_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_14xvec_disc_port_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_14xvec_disc_port_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 115, 0, __PYX_ERR(1, 115, __pyx_L1_error));
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 115, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->xvec_disc_port);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->xvec_disc_port));
  __pyx_v_self->xvec_disc_port = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.xvec_disc_port.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_14xvec_disc_port_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_14xvec_disc_port_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_14xvec_disc_port_4__del__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_14xvec_disc_port_4__del__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_TraceCall("__del__", __pyx_f[1], 115, 0, __PYX_ERR(1, 115, __pyx_L1_error));
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->xvec_disc_port);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->xvec_disc_port));
  __pyx_v_self->xvec_disc_port = ((PyArrayObject *)Py_None);

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.xvec_disc_port.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_14yvec_disc_port_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_14yvec_disc_port_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_14yvec_disc_port___get__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_14yvec_disc_port___get__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[1], 115, 0, __PYX_ERR(1, 115, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->yvec_disc_port));
  __pyx_r = ((PyObject *)__pyx_v_self->yvec_disc_port);
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.yvec_disc_port.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_14yvec_disc_port_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_14yvec_disc_port_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_14yvec_disc_port_2__set__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_14yvec_disc_port_2__set__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[1], 115, 0, __PYX_ERR(1, 115, __pyx_L1_error));
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 115, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->yvec_disc_port);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->yvec_disc_port));
  __pyx_v_self->yvec_disc_port = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.yvec_disc_port.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_14yvec_disc_port_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_14yvec_disc_port_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_14yvec_disc_port_4__del__(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5PDSim_6scroll_17common_scroll_geo_7geoVals_14yvec_disc_port_4__del__(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_self) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_TraceCall("__del__", __pyx_f[1], 115, 0, __PYX_ERR(1, 115, __pyx_L1_error));
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->yvec_disc_port);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->yvec_disc_port));
  __pyx_v_self->yvec_disc_port = ((PyArrayObject *)Py_None);

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.geoVals.yvec_disc_port.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pyx":631
 *                 )
 * 
 * def polyarea(x,y):             # <<<<<<<<<<<<<<
 *     N=len(x)
 *     area = 0.0
 */

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_39polyarea(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5PDSim_6scroll_17common_scroll_geo_38polyarea[] = "polyarea(x, y)";
static PyMethodDef __pyx_mdef_5PDSim_6scroll_17common_scroll_geo_39polyarea = {"polyarea", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5PDSim_6scroll_17common_scroll_geo_39polyarea, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5PDSim_6scroll_17common_scroll_geo_38polyarea};
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_39polyarea(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_x = 0;
  PyObject *__pyx_v_y = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("polyarea (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_y,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("polyarea", 1, 2, 2, 1); __PYX_ERR(0, 631, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "polyarea") < 0)) __PYX_ERR(0, 631, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_x = values[0];
    __pyx_v_y = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("polyarea", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 631, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.polyarea", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_38polyarea(__pyx_self, __pyx_v_x, __pyx_v_y);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_38polyarea(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x, PyObject *__pyx_v_y) {
  PyObject *__pyx_v_N = NULL;
  PyObject *__pyx_v_area = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_j = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__19)
  __Pyx_RefNannySetupContext("polyarea", 0);
  __Pyx_TraceCall("polyarea", __pyx_f[0], 631, 0, __PYX_ERR(0, 631, __pyx_L1_error));

  /* "PDSim/scroll/common_scroll_geo.pyx":632
 * 
 * def polyarea(x,y):
 *     N=len(x)             # <<<<<<<<<<<<<<
 *     area = 0.0
 *     for i in range(N):
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_x); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 632, __pyx_L1_error)
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 632, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_N = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "PDSim/scroll/common_scroll_geo.pyx":633
 * def polyarea(x,y):
 *     N=len(x)
 *     area = 0.0             # <<<<<<<<<<<<<<
 *     for i in range(N):
 *         j = (i+1) % N
 */
  __Pyx_INCREF(__pyx_float_0_0);
  __pyx_v_area = __pyx_float_0_0;

  /* "PDSim/scroll/common_scroll_geo.pyx":634
 *     N=len(x)
 *     area = 0.0
 *     for i in range(N):             # <<<<<<<<<<<<<<
 *         j = (i+1) % N
 *         area = area + x[i]*y[j] - y[i]*x[j]
 */
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_v_N); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_1 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 634, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 634, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_2); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 634, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 634, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_2); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 634, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 634, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_4(__pyx_t_3);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 634, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "PDSim/scroll/common_scroll_geo.pyx":635
 *     area = 0.0
 *     for i in range(N):
 *         j = (i+1) % N             # <<<<<<<<<<<<<<
 *         area = area + x[i]*y[j] - y[i]*x[j]
 *     return area/2.0
 */
    __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 635, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = PyNumber_Remainder(__pyx_t_2, __pyx_v_N); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 635, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "PDSim/scroll/common_scroll_geo.pyx":636
 *     for i in range(N):
 *         j = (i+1) % N
 *         area = area + x[i]*y[j] - y[i]*x[j]             # <<<<<<<<<<<<<<
 *     return area/2.0
 * 
 */
    __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_x, __pyx_v_i); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 636, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_y, __pyx_v_j); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 636, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = PyNumber_Multiply(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 636, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_Add(__pyx_v_area, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 636, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_y, __pyx_v_i); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 636, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_x, __pyx_v_j); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 636, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = PyNumber_Multiply(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 636, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyNumber_Subtract(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 636, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF_SET(__pyx_v_area, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "PDSim/scroll/common_scroll_geo.pyx":634
 *     N=len(x)
 *     area = 0.0
 *     for i in range(N):             # <<<<<<<<<<<<<<
 *         j = (i+1) % N
 *         area = area + x[i]*y[j] - y[i]*x[j]
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "PDSim/scroll/common_scroll_geo.pyx":637
 *         j = (i+1) % N
 *         area = area + x[i]*y[j] - y[i]*x[j]
 *     return area/2.0             # <<<<<<<<<<<<<<
 * 
 * def polycentroid(xi,yi):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyFloat_TrueDivideObjC(__pyx_v_area, __pyx_float_2_0, 2.0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "PDSim/scroll/common_scroll_geo.pyx":631
 *                 )
 * 
 * def polyarea(x,y):             # <<<<<<<<<<<<<<
 *     N=len(x)
 *     area = 0.0
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.polyarea", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_N);
  __Pyx_XDECREF(__pyx_v_area);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_j);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pyx":639
 *     return area/2.0
 * 
 * def polycentroid(xi,yi):             # <<<<<<<<<<<<<<
 *     # Add additional element if needed to close polygon
 *     if not xi[0]==xi[-1] or not yi[0]==yi[-1]:
 */

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_41polycentroid(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5PDSim_6scroll_17common_scroll_geo_40polycentroid[] = "polycentroid(xi, yi)";
static PyMethodDef __pyx_mdef_5PDSim_6scroll_17common_scroll_geo_41polycentroid = {"polycentroid", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5PDSim_6scroll_17common_scroll_geo_41polycentroid, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5PDSim_6scroll_17common_scroll_geo_40polycentroid};
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_41polycentroid(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_xi = 0;
  PyObject *__pyx_v_yi = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("polycentroid (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_xi,&__pyx_n_s_yi,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xi)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yi)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("polycentroid", 1, 2, 2, 1); __PYX_ERR(0, 639, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "polycentroid") < 0)) __PYX_ERR(0, 639, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_xi = values[0];
    __pyx_v_yi = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("polycentroid", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 639, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.polycentroid", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_40polycentroid(__pyx_self, __pyx_v_xi, __pyx_v_yi);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_40polycentroid(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_xi, PyObject *__pyx_v_yi) {
  PyObject *__pyx_v_x = NULL;
  PyObject *__pyx_v_y = NULL;
  PyObject *__pyx_v_sumx = NULL;
  PyObject *__pyx_v_sumy = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  __Pyx_TraceFrameInit(__pyx_codeobj__20)
  __Pyx_RefNannySetupContext("polycentroid", 0);
  __Pyx_TraceCall("polycentroid", __pyx_f[0], 639, 0, __PYX_ERR(0, 639, __pyx_L1_error));

  /* "PDSim/scroll/common_scroll_geo.pyx":641
 * def polycentroid(xi,yi):
 *     # Add additional element if needed to close polygon
 *     if not xi[0]==xi[-1] or not yi[0]==yi[-1]:             # <<<<<<<<<<<<<<
 *         x=np.r_[xi,xi[-1]]
 *         y=np.r_[yi,yi[-1]]
 */
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_xi, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_xi, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 641, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 641, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = ((!__pyx_t_5) != 0);
  if (!__pyx_t_6) {
  } else {
    __pyx_t_1 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_yi, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_yi, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 641, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 641, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = ((!__pyx_t_6) != 0);
  __pyx_t_1 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "PDSim/scroll/common_scroll_geo.pyx":642
 *     # Add additional element if needed to close polygon
 *     if not xi[0]==xi[-1] or not yi[0]==yi[-1]:
 *         x=np.r_[xi,xi[-1]]             # <<<<<<<<<<<<<<
 *         y=np.r_[yi,yi[-1]]
 *     else:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 642, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_r); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 642, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_xi, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 642, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 642, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_xi);
    __Pyx_GIVEREF(__pyx_v_xi);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_xi);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 642, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_x = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "PDSim/scroll/common_scroll_geo.pyx":643
 *     if not xi[0]==xi[-1] or not yi[0]==yi[-1]:
 *         x=np.r_[xi,xi[-1]]
 *         y=np.r_[yi,yi[-1]]             # <<<<<<<<<<<<<<
 *     else:
 *         x=xi
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 643, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_r); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 643, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_yi, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 643, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 643, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_yi);
    __Pyx_GIVEREF(__pyx_v_yi);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_yi);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 643, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_y = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "PDSim/scroll/common_scroll_geo.pyx":641
 * def polycentroid(xi,yi):
 *     # Add additional element if needed to close polygon
 *     if not xi[0]==xi[-1] or not yi[0]==yi[-1]:             # <<<<<<<<<<<<<<
 *         x=np.r_[xi,xi[-1]]
 *         y=np.r_[yi,yi[-1]]
 */
    goto __pyx_L3;
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":645
 *         y=np.r_[yi,yi[-1]]
 *     else:
 *         x=xi             # <<<<<<<<<<<<<<
 *         y=yi
 *     sumx=0.0
 */
  /*else*/ {
    __Pyx_INCREF(__pyx_v_xi);
    __pyx_v_x = __pyx_v_xi;

    /* "PDSim/scroll/common_scroll_geo.pyx":646
 *     else:
 *         x=xi
 *         y=yi             # <<<<<<<<<<<<<<
 *     sumx=0.0
 *     sumy=0.0
 */
    __Pyx_INCREF(__pyx_v_yi);
    __pyx_v_y = __pyx_v_yi;
  }
  __pyx_L3:;

  /* "PDSim/scroll/common_scroll_geo.pyx":647
 *         x=xi
 *         y=yi
 *     sumx=0.0             # <<<<<<<<<<<<<<
 *     sumy=0.0
 *     for i in range(len(x)-1):
 */
  __Pyx_INCREF(__pyx_float_0_0);
  __pyx_v_sumx = __pyx_float_0_0;

  /* "PDSim/scroll/common_scroll_geo.pyx":648
 *         y=yi
 *     sumx=0.0
 *     sumy=0.0             # <<<<<<<<<<<<<<
 *     for i in range(len(x)-1):
 *         sumx=sumx+(x[i]+x[i+1])*(x[i]*y[i+1]-x[i+1]*y[i])
 */
  __Pyx_INCREF(__pyx_float_0_0);
  __pyx_v_sumy = __pyx_float_0_0;

  /* "PDSim/scroll/common_scroll_geo.pyx":649
 *     sumx=0.0
 *     sumy=0.0
 *     for i in range(len(x)-1):             # <<<<<<<<<<<<<<
 *         sumx=sumx+(x[i]+x[i+1])*(x[i]*y[i+1]-x[i+1]*y[i])
 *         sumy=sumy+(y[i]+y[i+1])*(x[i]*y[i+1]-x[i+1]*y[i])
 */
  __pyx_t_7 = PyObject_Length(__pyx_v_x); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 649, __pyx_L1_error)
  __pyx_t_2 = PyInt_FromSsize_t((__pyx_t_7 - 1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
    __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_7 = 0;
    __pyx_t_8 = NULL;
  } else {
    __pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 649, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_8 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 649, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  for (;;) {
    if (likely(!__pyx_t_8)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 649, __pyx_L1_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 649, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
      } else {
        if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 649, __pyx_L1_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 649, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
      }
    } else {
      __pyx_t_3 = __pyx_t_8(__pyx_t_2);
      if (unlikely(!__pyx_t_3)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 649, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "PDSim/scroll/common_scroll_geo.pyx":650
 *     sumy=0.0
 *     for i in range(len(x)-1):
 *         sumx=sumx+(x[i]+x[i+1])*(x[i]*y[i+1]-x[i+1]*y[i])             # <<<<<<<<<<<<<<
 *         sumy=sumy+(y[i]+y[i+1])*(x[i]*y[i+1]-x[i+1]*y[i])
 *     return sumx/(6*polyarea(x,y)),sumy/(6*polyarea(x,y))
 */
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_x, __pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 650, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 650, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_v_x, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 650, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyNumber_Add(__pyx_t_3, __pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 650, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_v_x, __pyx_v_i); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 650, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 650, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_v_y, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 650, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyNumber_Multiply(__pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 650, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 650, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_v_x, __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 650, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_v_y, __pyx_v_i); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 650, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_11 = PyNumber_Multiply(__pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 650, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = PyNumber_Subtract(__pyx_t_3, __pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 650, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_11 = PyNumber_Multiply(__pyx_t_4, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 650, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = PyNumber_Add(__pyx_v_sumx, __pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 650, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF_SET(__pyx_v_sumx, __pyx_t_10);
    __pyx_t_10 = 0;

    /* "PDSim/scroll/common_scroll_geo.pyx":651
 *     for i in range(len(x)-1):
 *         sumx=sumx+(x[i]+x[i+1])*(x[i]*y[i+1]-x[i+1]*y[i])
 *         sumy=sumy+(y[i]+y[i+1])*(x[i]*y[i+1]-x[i+1]*y[i])             # <<<<<<<<<<<<<<
 *     return sumx/(6*polyarea(x,y)),sumy/(6*polyarea(x,y))
 * 
 */
    __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_v_y, __pyx_v_i); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 651, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_11 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 651, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_y, __pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 651, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_11 = PyNumber_Add(__pyx_t_10, __pyx_t_4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 651, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_x, __pyx_v_i); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 651, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_10 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 651, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_y, __pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 651, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = PyNumber_Multiply(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 651, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 651, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_x, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 651, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_y, __pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 651, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = PyNumber_Multiply(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 651, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyNumber_Subtract(__pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 651, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = PyNumber_Multiply(__pyx_t_11, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 651, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyNumber_Add(__pyx_v_sumy, __pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 651, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF_SET(__pyx_v_sumy, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "PDSim/scroll/common_scroll_geo.pyx":649
 *     sumx=0.0
 *     sumy=0.0
 *     for i in range(len(x)-1):             # <<<<<<<<<<<<<<
 *         sumx=sumx+(x[i]+x[i+1])*(x[i]*y[i+1]-x[i+1]*y[i])
 *         sumy=sumy+(y[i]+y[i+1])*(x[i]*y[i+1]-x[i+1]*y[i])
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "PDSim/scroll/common_scroll_geo.pyx":652
 *         sumx=sumx+(x[i]+x[i+1])*(x[i]*y[i+1]-x[i+1]*y[i])
 *         sumy=sumy+(y[i]+y[i+1])*(x[i]*y[i+1]-x[i+1]*y[i])
 *     return sumx/(6*polyarea(x,y)),sumy/(6*polyarea(x,y))             # <<<<<<<<<<<<<<
 * 
 * cpdef tuple _coords_inv_np(np.ndarray[np.float_t] phi, geoVals geo,double theta, flag=""):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_polyarea); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_9 = NULL;
  __pyx_t_12 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_12 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v_x, __pyx_v_y};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 652, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v_x, __pyx_v_y};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 652, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else
  #endif
  {
    __pyx_t_11 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 652, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    if (__pyx_t_9) {
      __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL;
    }
    __Pyx_INCREF(__pyx_v_x);
    __Pyx_GIVEREF(__pyx_v_x);
    PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_12, __pyx_v_x);
    __Pyx_INCREF(__pyx_v_y);
    __Pyx_GIVEREF(__pyx_v_y);
    PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_12, __pyx_v_y);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_11, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 652, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Multiply(__pyx_int_6, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_v_sumx, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_polyarea); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_9 = NULL;
  __pyx_t_12 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_11);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_11, function);
      __pyx_t_12 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_11)) {
    PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v_x, __pyx_v_y};
    __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 652, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GOTREF(__pyx_t_3);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
    PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v_x, __pyx_v_y};
    __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 652, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GOTREF(__pyx_t_3);
  } else
  #endif
  {
    __pyx_t_10 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 652, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    if (__pyx_t_9) {
      __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL;
    }
    __Pyx_INCREF(__pyx_v_x);
    __Pyx_GIVEREF(__pyx_v_x);
    PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_12, __pyx_v_x);
    __Pyx_INCREF(__pyx_v_y);
    __Pyx_GIVEREF(__pyx_v_y);
    PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_12, __pyx_v_y);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_10, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 652, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  }
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = PyNumber_Multiply(__pyx_int_6, __pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_v_sumy, __pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_3);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_11;
  __pyx_t_11 = 0;
  goto __pyx_L0;

  /* "PDSim/scroll/common_scroll_geo.pyx":639
 *     return area/2.0
 * 
 * def polycentroid(xi,yi):             # <<<<<<<<<<<<<<
 *     # Add additional element if needed to close polygon
 *     if not xi[0]==xi[-1] or not yi[0]==yi[-1]:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.polycentroid", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_x);
  __Pyx_XDECREF(__pyx_v_y);
  __Pyx_XDECREF(__pyx_v_sumx);
  __Pyx_XDECREF(__pyx_v_sumy);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pyx":654
 *     return sumx/(6*polyarea(x,y)),sumy/(6*polyarea(x,y))
 * 
 * cpdef tuple _coords_inv_np(np.ndarray[np.float_t] phi, geoVals geo,double theta, flag=""):             # <<<<<<<<<<<<<<
 *     """
 *     Internal function that does the calculation if phi is definitely a 1D numpy vector
 */

static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_43_coords_inv_np(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_5PDSim_6scroll_17common_scroll_geo__coords_inv_np(PyArrayObject *__pyx_v_phi, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo, double __pyx_v_theta, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_5PDSim_6scroll_17common_scroll_geo__coords_inv_np *__pyx_optional_args) {
  PyObject *__pyx_v_flag = ((PyObject *)__pyx_kp_s_);
  double __pyx_v_rb;
  double __pyx_v_ro;
  double __pyx_v_om;
  PyObject *__pyx_v_x = NULL;
  PyObject *__pyx_v_y = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_phi;
  __Pyx_Buffer __pyx_pybuffer_phi;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("_coords_inv_np", 0);
  __Pyx_TraceCall("_coords_inv_np", __pyx_f[0], 654, 0, __PYX_ERR(0, 654, __pyx_L1_error));
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_flag = __pyx_optional_args->flag;
    }
  }
  __pyx_pybuffer_phi.pybuffer.buf = NULL;
  __pyx_pybuffer_phi.refcount = 0;
  __pyx_pybuffernd_phi.data = NULL;
  __pyx_pybuffernd_phi.rcbuffer = &__pyx_pybuffer_phi;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_phi.rcbuffer->pybuffer, (PyObject*)__pyx_v_phi, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 654, __pyx_L1_error)
  }
  __pyx_pybuffernd_phi.diminfo[0].strides = __pyx_pybuffernd_phi.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_phi.diminfo[0].shape = __pyx_pybuffernd_phi.rcbuffer->pybuffer.shape[0];

  /* "PDSim/scroll/common_scroll_geo.pyx":658
 *     Internal function that does the calculation if phi is definitely a 1D numpy vector
 *     """
 *     rb = geo.rb             # <<<<<<<<<<<<<<
 *     ro = rb*(pi - geo.phi_fi0 + geo.phi_oo0)
 *     om = geo.phi_fie - theta + 3.0*pi/2.0
 */
  __pyx_t_1 = __pyx_v_geo->rb;
  __pyx_v_rb = __pyx_t_1;

  /* "PDSim/scroll/common_scroll_geo.pyx":659
 *     """
 *     rb = geo.rb
 *     ro = rb*(pi - geo.phi_fi0 + geo.phi_oo0)             # <<<<<<<<<<<<<<
 *     om = geo.phi_fie - theta + 3.0*pi/2.0
 * 
 */
  __pyx_v_ro = (__pyx_v_rb * ((M_PI - __pyx_v_geo->phi_fi0) + __pyx_v_geo->phi_oo0));

  /* "PDSim/scroll/common_scroll_geo.pyx":660
 *     rb = geo.rb
 *     ro = rb*(pi - geo.phi_fi0 + geo.phi_oo0)
 *     om = geo.phi_fie - theta + 3.0*pi/2.0             # <<<<<<<<<<<<<<
 * 
 *     if flag=="fi":
 */
  __pyx_v_om = ((__pyx_v_geo->phi_fie - __pyx_v_theta) + ((3.0 * M_PI) / 2.0));

  /* "PDSim/scroll/common_scroll_geo.pyx":662
 *     om = geo.phi_fie - theta + 3.0*pi/2.0
 * 
 *     if flag=="fi":             # <<<<<<<<<<<<<<
 *         x = rb*np.cos(phi)+rb*(phi-geo.phi_fi0)*np.sin(phi)
 *         y = rb*np.sin(phi)-rb*(phi-geo.phi_fi0)*np.cos(phi)
 */
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_flag, __pyx_n_s_fi, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 662, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "PDSim/scroll/common_scroll_geo.pyx":663
 * 
 *     if flag=="fi":
 *         x = rb*np.cos(phi)+rb*(phi-geo.phi_fi0)*np.sin(phi)             # <<<<<<<<<<<<<<
 *         y = rb*np.sin(phi)-rb*(phi-geo.phi_fi0)*np.cos(phi)
 *     elif flag=="fo":
 */
    __pyx_t_3 = PyFloat_FromDouble(__pyx_v_rb); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 663, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 663, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_cos); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 663, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, ((PyObject *)__pyx_v_phi)) : __Pyx_PyObject_CallOneArg(__pyx_t_6, ((PyObject *)__pyx_v_phi));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 663, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyNumber_Multiply(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 663, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyFloat_FromDouble(__pyx_v_rb); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 663, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = PyFloat_FromDouble(__pyx_v_geo->phi_fi0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 663, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PyNumber_Subtract(((PyObject *)__pyx_v_phi), __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 663, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyNumber_Multiply(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 663, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 663, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_sin); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 663, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_5 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_4, ((PyObject *)__pyx_v_phi)) : __Pyx_PyObject_CallOneArg(__pyx_t_7, ((PyObject *)__pyx_v_phi));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 663, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyNumber_Multiply(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 663, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyNumber_Add(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 663, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_v_x = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "PDSim/scroll/common_scroll_geo.pyx":664
 *     if flag=="fi":
 *         x = rb*np.cos(phi)+rb*(phi-geo.phi_fi0)*np.sin(phi)
 *         y = rb*np.sin(phi)-rb*(phi-geo.phi_fi0)*np.cos(phi)             # <<<<<<<<<<<<<<
 *     elif flag=="fo":
 *         x = rb*np.cos(phi)+rb*(phi-geo.phi_fo0)*np.sin(phi)
 */
    __pyx_t_5 = PyFloat_FromDouble(__pyx_v_rb); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 664, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 664, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_sin); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 664, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_7 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_6, ((PyObject *)__pyx_v_phi)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_phi));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 664, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyNumber_Multiply(__pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 664, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyFloat_FromDouble(__pyx_v_rb); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 664, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_5 = PyFloat_FromDouble(__pyx_v_geo->phi_fi0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 664, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyNumber_Subtract(((PyObject *)__pyx_v_phi), __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 664, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyNumber_Multiply(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 664, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 664, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_cos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 664, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_6 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_v_phi)) : __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_v_phi));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 664, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyNumber_Multiply(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 664, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyNumber_Subtract(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 664, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_y = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "PDSim/scroll/common_scroll_geo.pyx":662
 *     om = geo.phi_fie - theta + 3.0*pi/2.0
 * 
 *     if flag=="fi":             # <<<<<<<<<<<<<<
 *         x = rb*np.cos(phi)+rb*(phi-geo.phi_fi0)*np.sin(phi)
 *         y = rb*np.sin(phi)-rb*(phi-geo.phi_fi0)*np.cos(phi)
 */
    goto __pyx_L3;
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":665
 *         x = rb*np.cos(phi)+rb*(phi-geo.phi_fi0)*np.sin(phi)
 *         y = rb*np.sin(phi)-rb*(phi-geo.phi_fi0)*np.cos(phi)
 *     elif flag=="fo":             # <<<<<<<<<<<<<<
 *         x = rb*np.cos(phi)+rb*(phi-geo.phi_fo0)*np.sin(phi)
 *         y = rb*np.sin(phi)-rb*(phi-geo.phi_fo0)*np.cos(phi)
 */
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_flag, __pyx_n_s_fo, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 665, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "PDSim/scroll/common_scroll_geo.pyx":666
 *         y = rb*np.sin(phi)-rb*(phi-geo.phi_fi0)*np.cos(phi)
 *     elif flag=="fo":
 *         x = rb*np.cos(phi)+rb*(phi-geo.phi_fo0)*np.sin(phi)             # <<<<<<<<<<<<<<
 *         y = rb*np.sin(phi)-rb*(phi-geo.phi_fo0)*np.cos(phi)
 *     elif flag=="oi":
 */
    __pyx_t_6 = PyFloat_FromDouble(__pyx_v_rb); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 666, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 666, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_cos); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 666, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_4 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_3, ((PyObject *)__pyx_v_phi)) : __Pyx_PyObject_CallOneArg(__pyx_t_5, ((PyObject *)__pyx_v_phi));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 666, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyNumber_Multiply(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 666, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyFloat_FromDouble(__pyx_v_rb); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 666, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = PyFloat_FromDouble(__pyx_v_geo->phi_fo0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 666, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = PyNumber_Subtract(((PyObject *)__pyx_v_phi), __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 666, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyNumber_Multiply(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 666, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 666, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_sin); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 666, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_4, ((PyObject *)__pyx_v_phi)) : __Pyx_PyObject_CallOneArg(__pyx_t_7, ((PyObject *)__pyx_v_phi));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 666, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyNumber_Multiply(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 666, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyNumber_Add(__pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 666, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_v_x = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "PDSim/scroll/common_scroll_geo.pyx":667
 *     elif flag=="fo":
 *         x = rb*np.cos(phi)+rb*(phi-geo.phi_fo0)*np.sin(phi)
 *         y = rb*np.sin(phi)-rb*(phi-geo.phi_fo0)*np.cos(phi)             # <<<<<<<<<<<<<<
 *     elif flag=="oi":
 *         x = -rb*np.cos(phi)-rb*(phi-geo.phi_oi0)*np.sin(phi)+ro*np.cos(om)
 */
    __pyx_t_3 = PyFloat_FromDouble(__pyx_v_rb); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 667, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 667, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_sin); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 667, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_7 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, ((PyObject *)__pyx_v_phi)) : __Pyx_PyObject_CallOneArg(__pyx_t_6, ((PyObject *)__pyx_v_phi));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 667, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyNumber_Multiply(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 667, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyFloat_FromDouble(__pyx_v_rb); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 667, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_3 = PyFloat_FromDouble(__pyx_v_geo->phi_fo0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 667, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PyNumber_Subtract(((PyObject *)__pyx_v_phi), __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 667, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyNumber_Multiply(__pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 667, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 667, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_cos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 667, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_v_phi)) : __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_v_phi));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 667, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyNumber_Multiply(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 667, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyNumber_Subtract(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 667, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_y = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "PDSim/scroll/common_scroll_geo.pyx":665
 *         x = rb*np.cos(phi)+rb*(phi-geo.phi_fi0)*np.sin(phi)
 *         y = rb*np.sin(phi)-rb*(phi-geo.phi_fi0)*np.cos(phi)
 *     elif flag=="fo":             # <<<<<<<<<<<<<<
 *         x = rb*np.cos(phi)+rb*(phi-geo.phi_fo0)*np.sin(phi)
 *         y = rb*np.sin(phi)-rb*(phi-geo.phi_fo0)*np.cos(phi)
 */
    goto __pyx_L3;
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":668
 *         x = rb*np.cos(phi)+rb*(phi-geo.phi_fo0)*np.sin(phi)
 *         y = rb*np.sin(phi)-rb*(phi-geo.phi_fo0)*np.cos(phi)
 *     elif flag=="oi":             # <<<<<<<<<<<<<<
 *         x = -rb*np.cos(phi)-rb*(phi-geo.phi_oi0)*np.sin(phi)+ro*np.cos(om)
 *         y = -rb*np.sin(phi)+rb*(phi-geo.phi_oi0)*np.cos(phi)+ro*np.sin(om)
 */
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_flag, __pyx_n_s_oi, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 668, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "PDSim/scroll/common_scroll_geo.pyx":669
 *         y = rb*np.sin(phi)-rb*(phi-geo.phi_fo0)*np.cos(phi)
 *     elif flag=="oi":
 *         x = -rb*np.cos(phi)-rb*(phi-geo.phi_oi0)*np.sin(phi)+ro*np.cos(om)             # <<<<<<<<<<<<<<
 *         y = -rb*np.sin(phi)+rb*(phi-geo.phi_oi0)*np.cos(phi)+ro*np.sin(om)
 *     elif flag=="oo":
 */
    __pyx_t_5 = PyFloat_FromDouble((-__pyx_v_rb)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 669, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 669, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_cos); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 669, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_6, ((PyObject *)__pyx_v_phi)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_phi));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 669, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyNumber_Multiply(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 669, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyFloat_FromDouble(__pyx_v_rb); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 669, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyFloat_FromDouble(__pyx_v_geo->phi_oi0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 669, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyNumber_Subtract(((PyObject *)__pyx_v_phi), __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 669, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyNumber_Multiply(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 669, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 669, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_sin); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 669, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_6 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_4, ((PyObject *)__pyx_v_phi)) : __Pyx_PyObject_CallOneArg(__pyx_t_7, ((PyObject *)__pyx_v_phi));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 669, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyNumber_Multiply(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 669, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyNumber_Subtract(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 669, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyFloat_FromDouble(__pyx_v_ro); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 669, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 669, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_cos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 669, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyFloat_FromDouble(__pyx_v_om); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 669, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_8, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 669, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyNumber_Multiply(__pyx_t_7, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 669, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyNumber_Add(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 669, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_x = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "PDSim/scroll/common_scroll_geo.pyx":670
 *     elif flag=="oi":
 *         x = -rb*np.cos(phi)-rb*(phi-geo.phi_oi0)*np.sin(phi)+ro*np.cos(om)
 *         y = -rb*np.sin(phi)+rb*(phi-geo.phi_oi0)*np.cos(phi)+ro*np.sin(om)             # <<<<<<<<<<<<<<
 *     elif flag=="oo":
 *         x = -rb*np.cos(phi)-rb*(phi-geo.phi_oo0)*np.sin(phi)+ro*np.cos(om)
 */
    __pyx_t_3 = PyFloat_FromDouble((-__pyx_v_rb)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 670, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 670, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_sin); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 670, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_6, ((PyObject *)__pyx_v_phi)) : __Pyx_PyObject_CallOneArg(__pyx_t_7, ((PyObject *)__pyx_v_phi));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 670, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyNumber_Multiply(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 670, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyFloat_FromDouble(__pyx_v_rb); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 670, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = PyFloat_FromDouble(__pyx_v_geo->phi_oi0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 670, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = PyNumber_Subtract(((PyObject *)__pyx_v_phi), __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 670, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyNumber_Multiply(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 670, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 670, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_cos); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 670, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_6 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, ((PyObject *)__pyx_v_phi)) : __Pyx_PyObject_CallOneArg(__pyx_t_5, ((PyObject *)__pyx_v_phi));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 670, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyNumber_Multiply(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 670, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyNumber_Add(__pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 670, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyFloat_FromDouble(__pyx_v_ro); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 670, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 670, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_sin); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 670, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyFloat_FromDouble(__pyx_v_om); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 670, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_7 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_8, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 670, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyNumber_Multiply(__pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 670, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyNumber_Add(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 670, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_y = __pyx_t_7;
    __pyx_t_7 = 0;

    /* "PDSim/scroll/common_scroll_geo.pyx":668
 *         x = rb*np.cos(phi)+rb*(phi-geo.phi_fo0)*np.sin(phi)
 *         y = rb*np.sin(phi)-rb*(phi-geo.phi_fo0)*np.cos(phi)
 *     elif flag=="oi":             # <<<<<<<<<<<<<<
 *         x = -rb*np.cos(phi)-rb*(phi-geo.phi_oi0)*np.sin(phi)+ro*np.cos(om)
 *         y = -rb*np.sin(phi)+rb*(phi-geo.phi_oi0)*np.cos(phi)+ro*np.sin(om)
 */
    goto __pyx_L3;
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":671
 *         x = -rb*np.cos(phi)-rb*(phi-geo.phi_oi0)*np.sin(phi)+ro*np.cos(om)
 *         y = -rb*np.sin(phi)+rb*(phi-geo.phi_oi0)*np.cos(phi)+ro*np.sin(om)
 *     elif flag=="oo":             # <<<<<<<<<<<<<<
 *         x = -rb*np.cos(phi)-rb*(phi-geo.phi_oo0)*np.sin(phi)+ro*np.cos(om)
 *         y = -rb*np.sin(phi)+rb*(phi-geo.phi_oo0)*np.cos(phi)+ro*np.sin(om)
 */
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_flag, __pyx_n_s_oo, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 671, __pyx_L1_error)
  if (likely(__pyx_t_2)) {

    /* "PDSim/scroll/common_scroll_geo.pyx":672
 *         y = -rb*np.sin(phi)+rb*(phi-geo.phi_oi0)*np.cos(phi)+ro*np.sin(om)
 *     elif flag=="oo":
 *         x = -rb*np.cos(phi)-rb*(phi-geo.phi_oo0)*np.sin(phi)+ro*np.cos(om)             # <<<<<<<<<<<<<<
 *         y = -rb*np.sin(phi)+rb*(phi-geo.phi_oo0)*np.cos(phi)+ro*np.sin(om)
 *     else:
 */
    __pyx_t_7 = PyFloat_FromDouble((-__pyx_v_rb)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 672, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 672, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_cos); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 672, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, ((PyObject *)__pyx_v_phi)) : __Pyx_PyObject_CallOneArg(__pyx_t_5, ((PyObject *)__pyx_v_phi));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 672, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyNumber_Multiply(__pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 672, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyFloat_FromDouble(__pyx_v_rb); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 672, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = PyFloat_FromDouble(__pyx_v_geo->phi_oo0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 672, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = PyNumber_Subtract(((PyObject *)__pyx_v_phi), __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 672, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyNumber_Multiply(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 672, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 672, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_sin); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 672, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_6 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_phi)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_phi));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 672, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyNumber_Multiply(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 672, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyNumber_Subtract(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 672, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyFloat_FromDouble(__pyx_v_ro); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 672, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 672, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_cos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 672, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyFloat_FromDouble(__pyx_v_om); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 672, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 672, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyNumber_Multiply(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 672, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyNumber_Add(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 672, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_x = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "PDSim/scroll/common_scroll_geo.pyx":673
 *     elif flag=="oo":
 *         x = -rb*np.cos(phi)-rb*(phi-geo.phi_oo0)*np.sin(phi)+ro*np.cos(om)
 *         y = -rb*np.sin(phi)+rb*(phi-geo.phi_oo0)*np.cos(phi)+ro*np.sin(om)             # <<<<<<<<<<<<<<
 *     else:
 *         raise ValueError('flag not valid')
 */
    __pyx_t_5 = PyFloat_FromDouble((-__pyx_v_rb)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 673, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 673, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_sin); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 673, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_6, ((PyObject *)__pyx_v_phi)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_phi));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 673, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyNumber_Multiply(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 673, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyFloat_FromDouble(__pyx_v_rb); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 673, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyFloat_FromDouble(__pyx_v_geo->phi_oo0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 673, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyNumber_Subtract(((PyObject *)__pyx_v_phi), __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 673, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyNumber_Multiply(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 673, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 673, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_cos); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 673, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_6 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_4, ((PyObject *)__pyx_v_phi)) : __Pyx_PyObject_CallOneArg(__pyx_t_7, ((PyObject *)__pyx_v_phi));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 673, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyNumber_Multiply(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 673, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyNumber_Add(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 673, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyFloat_FromDouble(__pyx_v_ro); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 673, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 673, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_sin); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 673, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyFloat_FromDouble(__pyx_v_om); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 673, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_8, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 673, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyNumber_Multiply(__pyx_t_7, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 673, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyNumber_Add(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 673, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_y = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "PDSim/scroll/common_scroll_geo.pyx":671
 *         x = -rb*np.cos(phi)-rb*(phi-geo.phi_oi0)*np.sin(phi)+ro*np.cos(om)
 *         y = -rb*np.sin(phi)+rb*(phi-geo.phi_oi0)*np.cos(phi)+ro*np.sin(om)
 *     elif flag=="oo":             # <<<<<<<<<<<<<<
 *         x = -rb*np.cos(phi)-rb*(phi-geo.phi_oo0)*np.sin(phi)+ro*np.cos(om)
 *         y = -rb*np.sin(phi)+rb*(phi-geo.phi_oo0)*np.cos(phi)+ro*np.sin(om)
 */
    goto __pyx_L3;
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":675
 *         y = -rb*np.sin(phi)+rb*(phi-geo.phi_oo0)*np.cos(phi)+ro*np.sin(om)
 *     else:
 *         raise ValueError('flag not valid')             # <<<<<<<<<<<<<<
 *     return (x,y)
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 675, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 675, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "PDSim/scroll/common_scroll_geo.pyx":676
 *     else:
 *         raise ValueError('flag not valid')
 *     return (x,y)             # <<<<<<<<<<<<<<
 * 
 * cdef _coords_inv_d_int(double phi, geoVals geo,double theta, int flag, double *x, double *y):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 676, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_x);
  __Pyx_GIVEREF(__pyx_v_x);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_x);
  __Pyx_INCREF(__pyx_v_y);
  __Pyx_GIVEREF(__pyx_v_y);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_y);
  __pyx_r = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "PDSim/scroll/common_scroll_geo.pyx":654
 *     return sumx/(6*polyarea(x,y)),sumy/(6*polyarea(x,y))
 * 
 * cpdef tuple _coords_inv_np(np.ndarray[np.float_t] phi, geoVals geo,double theta, flag=""):             # <<<<<<<<<<<<<<
 *     """
 *     Internal function that does the calculation if phi is definitely a 1D numpy vector
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_phi.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo._coords_inv_np", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_phi.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_x);
  __Pyx_XDECREF(__pyx_v_y);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_43_coords_inv_np(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5PDSim_6scroll_17common_scroll_geo_42_coords_inv_np[] = "_coords_inv_np(ndarray phi, geoVals geo, double theta, flag='') -> tuple\n\n    Internal function that does the calculation if phi is definitely a 1D numpy vector\n    ";
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_43_coords_inv_np(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_phi = 0;
  struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo = 0;
  double __pyx_v_theta;
  PyObject *__pyx_v_flag = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_coords_inv_np (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_phi,&__pyx_n_s_geo,&__pyx_n_s_theta,&__pyx_n_s_flag,0};
    PyObject* values[4] = {0,0,0,0};
    values[3] = ((PyObject *)__pyx_kp_s_);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_phi)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_geo)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_coords_inv_np", 0, 3, 4, 1); __PYX_ERR(0, 654, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_theta)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_coords_inv_np", 0, 3, 4, 2); __PYX_ERR(0, 654, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flag);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_coords_inv_np") < 0)) __PYX_ERR(0, 654, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_phi = ((PyArrayObject *)values[0]);
    __pyx_v_geo = ((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)values[1]);
    __pyx_v_theta = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_theta == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 654, __pyx_L3_error)
    __pyx_v_flag = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_coords_inv_np", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 654, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo._coords_inv_np", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_phi), __pyx_ptype_5numpy_ndarray, 1, "phi", 0))) __PYX_ERR(0, 654, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_geo), __pyx_ptype_5PDSim_6scroll_17common_scroll_geo_geoVals, 1, "geo", 0))) __PYX_ERR(0, 654, __pyx_L1_error)
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_42_coords_inv_np(__pyx_self, __pyx_v_phi, __pyx_v_geo, __pyx_v_theta, __pyx_v_flag);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_42_coords_inv_np(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_phi, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo, double __pyx_v_theta, PyObject *__pyx_v_flag) {
  __Pyx_LocalBuf_ND __pyx_pybuffernd_phi;
  __Pyx_Buffer __pyx_pybuffer_phi;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_5PDSim_6scroll_17common_scroll_geo__coords_inv_np __pyx_t_2;
  __Pyx_RefNannySetupContext("_coords_inv_np", 0);
  __Pyx_TraceCall("_coords_inv_np (wrapper)", __pyx_f[0], 654, 0, __PYX_ERR(0, 654, __pyx_L1_error));
  __pyx_pybuffer_phi.pybuffer.buf = NULL;
  __pyx_pybuffer_phi.refcount = 0;
  __pyx_pybuffernd_phi.data = NULL;
  __pyx_pybuffernd_phi.rcbuffer = &__pyx_pybuffer_phi;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_phi.rcbuffer->pybuffer, (PyObject*)__pyx_v_phi, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 654, __pyx_L1_error)
  }
  __pyx_pybuffernd_phi.diminfo[0].strides = __pyx_pybuffernd_phi.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_phi.diminfo[0].shape = __pyx_pybuffernd_phi.rcbuffer->pybuffer.shape[0];
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.flag = __pyx_v_flag;
  __pyx_t_1 = __pyx_f_5PDSim_6scroll_17common_scroll_geo__coords_inv_np(((PyArrayObject *)__pyx_v_phi), __pyx_v_geo, __pyx_v_theta, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_phi.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo._coords_inv_np", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_phi.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pyx":678
 *     return (x,y)
 * 
 * cdef _coords_inv_d_int(double phi, geoVals geo,double theta, int flag, double *x, double *y):             # <<<<<<<<<<<<<<
 *     """
 *     Internal function that does the calculation if phi is a double variable
 */

static PyObject *__pyx_f_5PDSim_6scroll_17common_scroll_geo__coords_inv_d_int(double __pyx_v_phi, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo, double __pyx_v_theta, int __pyx_v_flag, double *__pyx_v_x, double *__pyx_v_y) {
  double __pyx_v_rb;
  double __pyx_v_ro;
  double __pyx_v_om;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("_coords_inv_d_int", 0);
  __Pyx_TraceCall("_coords_inv_d_int", __pyx_f[0], 678, 0, __PYX_ERR(0, 678, __pyx_L1_error));

  /* "PDSim/scroll/common_scroll_geo.pyx":683
 *     """
 * 
 *     rb = geo.rb             # <<<<<<<<<<<<<<
 *     ro = rb*(pi - geo.phi_fi0 + geo.phi_oo0)
 *     om = geo.phi_fie - theta + 3.0*pi/2.0
 */
  __pyx_t_1 = __pyx_v_geo->rb;
  __pyx_v_rb = __pyx_t_1;

  /* "PDSim/scroll/common_scroll_geo.pyx":684
 * 
 *     rb = geo.rb
 *     ro = rb*(pi - geo.phi_fi0 + geo.phi_oo0)             # <<<<<<<<<<<<<<
 *     om = geo.phi_fie - theta + 3.0*pi/2.0
 * 
 */
  __pyx_v_ro = (__pyx_v_rb * ((M_PI - __pyx_v_geo->phi_fi0) + __pyx_v_geo->phi_oo0));

  /* "PDSim/scroll/common_scroll_geo.pyx":685
 *     rb = geo.rb
 *     ro = rb*(pi - geo.phi_fi0 + geo.phi_oo0)
 *     om = geo.phi_fie - theta + 3.0*pi/2.0             # <<<<<<<<<<<<<<
 * 
 *     if flag == INVOLUTE_FI:
 */
  __pyx_v_om = ((__pyx_v_geo->phi_fie - __pyx_v_theta) + ((3.0 * M_PI) / 2.0));

  /* "PDSim/scroll/common_scroll_geo.pyx":687
 *     om = geo.phi_fie - theta + 3.0*pi/2.0
 * 
 *     if flag == INVOLUTE_FI:             # <<<<<<<<<<<<<<
 *         x[0] = rb*cos(phi)+rb*(phi-geo.phi_fi0)*sin(phi)
 *         y[0] = rb*sin(phi)-rb*(phi-geo.phi_fi0)*cos(phi)
 */
  switch (__pyx_v_flag) {
    case __pyx_e_5PDSim_6scroll_17common_scroll_geo_INVOLUTE_FI:

    /* "PDSim/scroll/common_scroll_geo.pyx":688
 * 
 *     if flag == INVOLUTE_FI:
 *         x[0] = rb*cos(phi)+rb*(phi-geo.phi_fi0)*sin(phi)             # <<<<<<<<<<<<<<
 *         y[0] = rb*sin(phi)-rb*(phi-geo.phi_fi0)*cos(phi)
 *     elif flag == INVOLUTE_FO:
 */
    (__pyx_v_x[0]) = ((__pyx_v_rb * cos(__pyx_v_phi)) + ((__pyx_v_rb * (__pyx_v_phi - __pyx_v_geo->phi_fi0)) * sin(__pyx_v_phi)));

    /* "PDSim/scroll/common_scroll_geo.pyx":689
 *     if flag == INVOLUTE_FI:
 *         x[0] = rb*cos(phi)+rb*(phi-geo.phi_fi0)*sin(phi)
 *         y[0] = rb*sin(phi)-rb*(phi-geo.phi_fi0)*cos(phi)             # <<<<<<<<<<<<<<
 *     elif flag == INVOLUTE_FO:
 *         x[0] = rb*cos(phi)+rb*(phi-geo.phi_fo0)*sin(phi)
 */
    (__pyx_v_y[0]) = ((__pyx_v_rb * sin(__pyx_v_phi)) - ((__pyx_v_rb * (__pyx_v_phi - __pyx_v_geo->phi_fi0)) * cos(__pyx_v_phi)));

    /* "PDSim/scroll/common_scroll_geo.pyx":687
 *     om = geo.phi_fie - theta + 3.0*pi/2.0
 * 
 *     if flag == INVOLUTE_FI:             # <<<<<<<<<<<<<<
 *         x[0] = rb*cos(phi)+rb*(phi-geo.phi_fi0)*sin(phi)
 *         y[0] = rb*sin(phi)-rb*(phi-geo.phi_fi0)*cos(phi)
 */
    break;
    case __pyx_e_5PDSim_6scroll_17common_scroll_geo_INVOLUTE_FO:

    /* "PDSim/scroll/common_scroll_geo.pyx":691
 *         y[0] = rb*sin(phi)-rb*(phi-geo.phi_fi0)*cos(phi)
 *     elif flag == INVOLUTE_FO:
 *         x[0] = rb*cos(phi)+rb*(phi-geo.phi_fo0)*sin(phi)             # <<<<<<<<<<<<<<
 *         y[0] = rb*sin(phi)-rb*(phi-geo.phi_fo0)*cos(phi)
 *     elif flag == INVOLUTE_OI:
 */
    (__pyx_v_x[0]) = ((__pyx_v_rb * cos(__pyx_v_phi)) + ((__pyx_v_rb * (__pyx_v_phi - __pyx_v_geo->phi_fo0)) * sin(__pyx_v_phi)));

    /* "PDSim/scroll/common_scroll_geo.pyx":692
 *     elif flag == INVOLUTE_FO:
 *         x[0] = rb*cos(phi)+rb*(phi-geo.phi_fo0)*sin(phi)
 *         y[0] = rb*sin(phi)-rb*(phi-geo.phi_fo0)*cos(phi)             # <<<<<<<<<<<<<<
 *     elif flag == INVOLUTE_OI:
 *         x[0] = -rb*cos(phi)-rb*(phi-geo.phi_oi0)*sin(phi)+ro*cos(om)
 */
    (__pyx_v_y[0]) = ((__pyx_v_rb * sin(__pyx_v_phi)) - ((__pyx_v_rb * (__pyx_v_phi - __pyx_v_geo->phi_fo0)) * cos(__pyx_v_phi)));

    /* "PDSim/scroll/common_scroll_geo.pyx":690
 *         x[0] = rb*cos(phi)+rb*(phi-geo.phi_fi0)*sin(phi)
 *         y[0] = rb*sin(phi)-rb*(phi-geo.phi_fi0)*cos(phi)
 *     elif flag == INVOLUTE_FO:             # <<<<<<<<<<<<<<
 *         x[0] = rb*cos(phi)+rb*(phi-geo.phi_fo0)*sin(phi)
 *         y[0] = rb*sin(phi)-rb*(phi-geo.phi_fo0)*cos(phi)
 */
    break;
    case __pyx_e_5PDSim_6scroll_17common_scroll_geo_INVOLUTE_OI:

    /* "PDSim/scroll/common_scroll_geo.pyx":694
 *         y[0] = rb*sin(phi)-rb*(phi-geo.phi_fo0)*cos(phi)
 *     elif flag == INVOLUTE_OI:
 *         x[0] = -rb*cos(phi)-rb*(phi-geo.phi_oi0)*sin(phi)+ro*cos(om)             # <<<<<<<<<<<<<<
 *         y[0] = -rb*sin(phi)+rb*(phi-geo.phi_oi0)*cos(phi)+ro*sin(om)
 *     elif flag == INVOLUTE_OO:
 */
    (__pyx_v_x[0]) = ((((-__pyx_v_rb) * cos(__pyx_v_phi)) - ((__pyx_v_rb * (__pyx_v_phi - __pyx_v_geo->phi_oi0)) * sin(__pyx_v_phi))) + (__pyx_v_ro * cos(__pyx_v_om)));

    /* "PDSim/scroll/common_scroll_geo.pyx":695
 *     elif flag == INVOLUTE_OI:
 *         x[0] = -rb*cos(phi)-rb*(phi-geo.phi_oi0)*sin(phi)+ro*cos(om)
 *         y[0] = -rb*sin(phi)+rb*(phi-geo.phi_oi0)*cos(phi)+ro*sin(om)             # <<<<<<<<<<<<<<
 *     elif flag == INVOLUTE_OO:
 *         x[0] = -rb*cos(phi)-rb*(phi-geo.phi_oo0)*sin(phi)+ro*cos(om)
 */
    (__pyx_v_y[0]) = ((((-__pyx_v_rb) * sin(__pyx_v_phi)) + ((__pyx_v_rb * (__pyx_v_phi - __pyx_v_geo->phi_oi0)) * cos(__pyx_v_phi))) + (__pyx_v_ro * sin(__pyx_v_om)));

    /* "PDSim/scroll/common_scroll_geo.pyx":693
 *         x[0] = rb*cos(phi)+rb*(phi-geo.phi_fo0)*sin(phi)
 *         y[0] = rb*sin(phi)-rb*(phi-geo.phi_fo0)*cos(phi)
 *     elif flag == INVOLUTE_OI:             # <<<<<<<<<<<<<<
 *         x[0] = -rb*cos(phi)-rb*(phi-geo.phi_oi0)*sin(phi)+ro*cos(om)
 *         y[0] = -rb*sin(phi)+rb*(phi-geo.phi_oi0)*cos(phi)+ro*sin(om)
 */
    break;
    case __pyx_e_5PDSim_6scroll_17common_scroll_geo_INVOLUTE_OO:

    /* "PDSim/scroll/common_scroll_geo.pyx":697
 *         y[0] = -rb*sin(phi)+rb*(phi-geo.phi_oi0)*cos(phi)+ro*sin(om)
 *     elif flag == INVOLUTE_OO:
 *         x[0] = -rb*cos(phi)-rb*(phi-geo.phi_oo0)*sin(phi)+ro*cos(om)             # <<<<<<<<<<<<<<
 *         y[0] = -rb*sin(phi)+rb*(phi-geo.phi_oo0)*cos(phi)+ro*sin(om)
 *     else:
 */
    (__pyx_v_x[0]) = ((((-__pyx_v_rb) * cos(__pyx_v_phi)) - ((__pyx_v_rb * (__pyx_v_phi - __pyx_v_geo->phi_oo0)) * sin(__pyx_v_phi))) + (__pyx_v_ro * cos(__pyx_v_om)));

    /* "PDSim/scroll/common_scroll_geo.pyx":698
 *     elif flag == INVOLUTE_OO:
 *         x[0] = -rb*cos(phi)-rb*(phi-geo.phi_oo0)*sin(phi)+ro*cos(om)
 *         y[0] = -rb*sin(phi)+rb*(phi-geo.phi_oo0)*cos(phi)+ro*sin(om)             # <<<<<<<<<<<<<<
 *     else:
 *         raise ValueError('flag not valid')
 */
    (__pyx_v_y[0]) = ((((-__pyx_v_rb) * sin(__pyx_v_phi)) + ((__pyx_v_rb * (__pyx_v_phi - __pyx_v_geo->phi_oo0)) * cos(__pyx_v_phi))) + (__pyx_v_ro * sin(__pyx_v_om)));

    /* "PDSim/scroll/common_scroll_geo.pyx":696
 *         x[0] = -rb*cos(phi)-rb*(phi-geo.phi_oi0)*sin(phi)+ro*cos(om)
 *         y[0] = -rb*sin(phi)+rb*(phi-geo.phi_oi0)*cos(phi)+ro*sin(om)
 *     elif flag == INVOLUTE_OO:             # <<<<<<<<<<<<<<
 *         x[0] = -rb*cos(phi)-rb*(phi-geo.phi_oo0)*sin(phi)+ro*cos(om)
 *         y[0] = -rb*sin(phi)+rb*(phi-geo.phi_oo0)*cos(phi)+ro*sin(om)
 */
    break;
    default:

    /* "PDSim/scroll/common_scroll_geo.pyx":700
 *         y[0] = -rb*sin(phi)+rb*(phi-geo.phi_oo0)*cos(phi)+ro*sin(om)
 *     else:
 *         raise ValueError('flag not valid')             # <<<<<<<<<<<<<<
 * 
 * cdef _dcoords_inv_dphi_int(double phi, geoVals geo,double theta, int flag, double *dxdphi, double *dydphi):
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 700, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 700, __pyx_L1_error)
    break;
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":678
 *     return (x,y)
 * 
 * cdef _coords_inv_d_int(double phi, geoVals geo,double theta, int flag, double *x, double *y):             # <<<<<<<<<<<<<<
 *     """
 *     Internal function that does the calculation if phi is a double variable
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo._coords_inv_d_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pyx":702
 *         raise ValueError('flag not valid')
 * 
 * cdef _dcoords_inv_dphi_int(double phi, geoVals geo,double theta, int flag, double *dxdphi, double *dydphi):             # <<<<<<<<<<<<<<
 *     """
 *     Internal function that does the calculation for derivatives with respect to phi
 */

static PyObject *__pyx_f_5PDSim_6scroll_17common_scroll_geo__dcoords_inv_dphi_int(double __pyx_v_phi, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo, CYTHON_UNUSED double __pyx_v_theta, int __pyx_v_flag, double *__pyx_v_dxdphi, double *__pyx_v_dydphi) {
  double __pyx_v_phi_0;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  double __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("_dcoords_inv_dphi_int", 0);
  __Pyx_TraceCall("_dcoords_inv_dphi_int", __pyx_f[0], 702, 0, __PYX_ERR(0, 702, __pyx_L1_error));

  /* "PDSim/scroll/common_scroll_geo.pyx":707
 *     """
 *     cdef double phi_0
 *     if flag == INVOLUTE_FI or flag == INVOLUTE_FO:             # <<<<<<<<<<<<<<
 *         if flag == INVOLUTE_FI:
 *             phi_0 = geo.phi_fi0
 */
  switch (__pyx_v_flag) {
    case __pyx_e_5PDSim_6scroll_17common_scroll_geo_INVOLUTE_FI:
    case __pyx_e_5PDSim_6scroll_17common_scroll_geo_INVOLUTE_FO:

    /* "PDSim/scroll/common_scroll_geo.pyx":708
 *     cdef double phi_0
 *     if flag == INVOLUTE_FI or flag == INVOLUTE_FO:
 *         if flag == INVOLUTE_FI:             # <<<<<<<<<<<<<<
 *             phi_0 = geo.phi_fi0
 *         else:
 */
    __pyx_t_1 = ((__pyx_v_flag == __pyx_e_5PDSim_6scroll_17common_scroll_geo_INVOLUTE_FI) != 0);
    if (__pyx_t_1) {

      /* "PDSim/scroll/common_scroll_geo.pyx":709
 *     if flag == INVOLUTE_FI or flag == INVOLUTE_FO:
 *         if flag == INVOLUTE_FI:
 *             phi_0 = geo.phi_fi0             # <<<<<<<<<<<<<<
 *         else:
 *             phi_0 = geo.phi_fo0
 */
      __pyx_t_2 = __pyx_v_geo->phi_fi0;
      __pyx_v_phi_0 = __pyx_t_2;

      /* "PDSim/scroll/common_scroll_geo.pyx":708
 *     cdef double phi_0
 *     if flag == INVOLUTE_FI or flag == INVOLUTE_FO:
 *         if flag == INVOLUTE_FI:             # <<<<<<<<<<<<<<
 *             phi_0 = geo.phi_fi0
 *         else:
 */
      goto __pyx_L3;
    }

    /* "PDSim/scroll/common_scroll_geo.pyx":711
 *             phi_0 = geo.phi_fi0
 *         else:
 *             phi_0 = geo.phi_fo0             # <<<<<<<<<<<<<<
 *         dxdphi[0] = geo.rb*(phi-phi_0)*cos(phi)
 *         dydphi[0] = geo.rb*(phi-phi_0)*sin(phi)
 */
    /*else*/ {
      __pyx_t_2 = __pyx_v_geo->phi_fo0;
      __pyx_v_phi_0 = __pyx_t_2;
    }
    __pyx_L3:;

    /* "PDSim/scroll/common_scroll_geo.pyx":712
 *         else:
 *             phi_0 = geo.phi_fo0
 *         dxdphi[0] = geo.rb*(phi-phi_0)*cos(phi)             # <<<<<<<<<<<<<<
 *         dydphi[0] = geo.rb*(phi-phi_0)*sin(phi)
 *     elif flag == INVOLUTE_OI or flag == INVOLUTE_OO:
 */
    (__pyx_v_dxdphi[0]) = ((__pyx_v_geo->rb * (__pyx_v_phi - __pyx_v_phi_0)) * cos(__pyx_v_phi));

    /* "PDSim/scroll/common_scroll_geo.pyx":713
 *             phi_0 = geo.phi_fo0
 *         dxdphi[0] = geo.rb*(phi-phi_0)*cos(phi)
 *         dydphi[0] = geo.rb*(phi-phi_0)*sin(phi)             # <<<<<<<<<<<<<<
 *     elif flag == INVOLUTE_OI or flag == INVOLUTE_OO:
 *         if flag == INVOLUTE_OI:
 */
    (__pyx_v_dydphi[0]) = ((__pyx_v_geo->rb * (__pyx_v_phi - __pyx_v_phi_0)) * sin(__pyx_v_phi));

    /* "PDSim/scroll/common_scroll_geo.pyx":707
 *     """
 *     cdef double phi_0
 *     if flag == INVOLUTE_FI or flag == INVOLUTE_FO:             # <<<<<<<<<<<<<<
 *         if flag == INVOLUTE_FI:
 *             phi_0 = geo.phi_fi0
 */
    break;
    case __pyx_e_5PDSim_6scroll_17common_scroll_geo_INVOLUTE_OI:

    /* "PDSim/scroll/common_scroll_geo.pyx":714
 *         dxdphi[0] = geo.rb*(phi-phi_0)*cos(phi)
 *         dydphi[0] = geo.rb*(phi-phi_0)*sin(phi)
 *     elif flag == INVOLUTE_OI or flag == INVOLUTE_OO:             # <<<<<<<<<<<<<<
 *         if flag == INVOLUTE_OI:
 *             phi_0 = geo.phi_oi0
 */
    case __pyx_e_5PDSim_6scroll_17common_scroll_geo_INVOLUTE_OO:

    /* "PDSim/scroll/common_scroll_geo.pyx":715
 *         dydphi[0] = geo.rb*(phi-phi_0)*sin(phi)
 *     elif flag == INVOLUTE_OI or flag == INVOLUTE_OO:
 *         if flag == INVOLUTE_OI:             # <<<<<<<<<<<<<<
 *             phi_0 = geo.phi_oi0
 *         else:
 */
    __pyx_t_1 = ((__pyx_v_flag == __pyx_e_5PDSim_6scroll_17common_scroll_geo_INVOLUTE_OI) != 0);
    if (__pyx_t_1) {

      /* "PDSim/scroll/common_scroll_geo.pyx":716
 *     elif flag == INVOLUTE_OI or flag == INVOLUTE_OO:
 *         if flag == INVOLUTE_OI:
 *             phi_0 = geo.phi_oi0             # <<<<<<<<<<<<<<
 *         else:
 *             phi_0 = geo.phi_oo0
 */
      __pyx_t_2 = __pyx_v_geo->phi_oi0;
      __pyx_v_phi_0 = __pyx_t_2;

      /* "PDSim/scroll/common_scroll_geo.pyx":715
 *         dydphi[0] = geo.rb*(phi-phi_0)*sin(phi)
 *     elif flag == INVOLUTE_OI or flag == INVOLUTE_OO:
 *         if flag == INVOLUTE_OI:             # <<<<<<<<<<<<<<
 *             phi_0 = geo.phi_oi0
 *         else:
 */
      goto __pyx_L4;
    }

    /* "PDSim/scroll/common_scroll_geo.pyx":718
 *             phi_0 = geo.phi_oi0
 *         else:
 *             phi_0 = geo.phi_oo0             # <<<<<<<<<<<<<<
 *         dxdphi[0] = -geo.rb*(phi-phi_0)*cos(phi)
 *         dydphi[0] = -geo.rb*(phi-phi_0)*sin(phi)
 */
    /*else*/ {
      __pyx_t_2 = __pyx_v_geo->phi_oo0;
      __pyx_v_phi_0 = __pyx_t_2;
    }
    __pyx_L4:;

    /* "PDSim/scroll/common_scroll_geo.pyx":719
 *         else:
 *             phi_0 = geo.phi_oo0
 *         dxdphi[0] = -geo.rb*(phi-phi_0)*cos(phi)             # <<<<<<<<<<<<<<
 *         dydphi[0] = -geo.rb*(phi-phi_0)*sin(phi)
 *     else:
 */
    (__pyx_v_dxdphi[0]) = (((-__pyx_v_geo->rb) * (__pyx_v_phi - __pyx_v_phi_0)) * cos(__pyx_v_phi));

    /* "PDSim/scroll/common_scroll_geo.pyx":720
 *             phi_0 = geo.phi_oo0
 *         dxdphi[0] = -geo.rb*(phi-phi_0)*cos(phi)
 *         dydphi[0] = -geo.rb*(phi-phi_0)*sin(phi)             # <<<<<<<<<<<<<<
 *     else:
 *         raise ValueError('flag not valid')
 */
    (__pyx_v_dydphi[0]) = (((-__pyx_v_geo->rb) * (__pyx_v_phi - __pyx_v_phi_0)) * sin(__pyx_v_phi));

    /* "PDSim/scroll/common_scroll_geo.pyx":714
 *         dxdphi[0] = geo.rb*(phi-phi_0)*cos(phi)
 *         dydphi[0] = geo.rb*(phi-phi_0)*sin(phi)
 *     elif flag == INVOLUTE_OI or flag == INVOLUTE_OO:             # <<<<<<<<<<<<<<
 *         if flag == INVOLUTE_OI:
 *             phi_0 = geo.phi_oi0
 */
    break;
    default:

    /* "PDSim/scroll/common_scroll_geo.pyx":722
 *         dydphi[0] = -geo.rb*(phi-phi_0)*sin(phi)
 *     else:
 *         raise ValueError('flag not valid')             # <<<<<<<<<<<<<<
 * 
 * cpdef tuple _coords_inv_d(double phi, geoVals geo,double theta, flag=""):
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 722, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 722, __pyx_L1_error)
    break;
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":702
 *         raise ValueError('flag not valid')
 * 
 * cdef _dcoords_inv_dphi_int(double phi, geoVals geo,double theta, int flag, double *dxdphi, double *dydphi):             # <<<<<<<<<<<<<<
 *     """
 *     Internal function that does the calculation for derivatives with respect to phi
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo._dcoords_inv_dphi_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pyx":724
 *         raise ValueError('flag not valid')
 * 
 * cpdef tuple _coords_inv_d(double phi, geoVals geo,double theta, flag=""):             # <<<<<<<<<<<<<<
 *     """
 *     Internal function that does the calculation if phi is a double variable
 */

static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_45_coords_inv_d(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_5PDSim_6scroll_17common_scroll_geo__coords_inv_d(double __pyx_v_phi, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo, double __pyx_v_theta, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_5PDSim_6scroll_17common_scroll_geo__coords_inv_d *__pyx_optional_args) {
  PyObject *__pyx_v_flag = ((PyObject *)__pyx_kp_s_);
  double __pyx_v_rb;
  double __pyx_v_ro;
  double __pyx_v_om;
  double __pyx_v_x;
  double __pyx_v_y;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("_coords_inv_d", 0);
  __Pyx_TraceCall("_coords_inv_d", __pyx_f[0], 724, 0, __PYX_ERR(0, 724, __pyx_L1_error));
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_flag = __pyx_optional_args->flag;
    }
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":729
 *     """
 * 
 *     rb = geo.rb             # <<<<<<<<<<<<<<
 *     ro = rb*(pi - geo.phi_fi0 + geo.phi_oo0)
 *     om = geo.phi_fie - theta + 3.0*pi/2.0
 */
  __pyx_t_1 = __pyx_v_geo->rb;
  __pyx_v_rb = __pyx_t_1;

  /* "PDSim/scroll/common_scroll_geo.pyx":730
 * 
 *     rb = geo.rb
 *     ro = rb*(pi - geo.phi_fi0 + geo.phi_oo0)             # <<<<<<<<<<<<<<
 *     om = geo.phi_fie - theta + 3.0*pi/2.0
 * 
 */
  __pyx_v_ro = (__pyx_v_rb * ((M_PI - __pyx_v_geo->phi_fi0) + __pyx_v_geo->phi_oo0));

  /* "PDSim/scroll/common_scroll_geo.pyx":731
 *     rb = geo.rb
 *     ro = rb*(pi - geo.phi_fi0 + geo.phi_oo0)
 *     om = geo.phi_fie - theta + 3.0*pi/2.0             # <<<<<<<<<<<<<<
 * 
 *     if flag=="fi":
 */
  __pyx_v_om = ((__pyx_v_geo->phi_fie - __pyx_v_theta) + ((3.0 * M_PI) / 2.0));

  /* "PDSim/scroll/common_scroll_geo.pyx":733
 *     om = geo.phi_fie - theta + 3.0*pi/2.0
 * 
 *     if flag=="fi":             # <<<<<<<<<<<<<<
 *         x = rb*cos(phi)+rb*(phi-geo.phi_fi0)*sin(phi)
 *         y = rb*sin(phi)-rb*(phi-geo.phi_fi0)*cos(phi)
 */
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_flag, __pyx_n_s_fi, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 733, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "PDSim/scroll/common_scroll_geo.pyx":734
 * 
 *     if flag=="fi":
 *         x = rb*cos(phi)+rb*(phi-geo.phi_fi0)*sin(phi)             # <<<<<<<<<<<<<<
 *         y = rb*sin(phi)-rb*(phi-geo.phi_fi0)*cos(phi)
 *     elif flag=="fo":
 */
    __pyx_v_x = ((__pyx_v_rb * cos(__pyx_v_phi)) + ((__pyx_v_rb * (__pyx_v_phi - __pyx_v_geo->phi_fi0)) * sin(__pyx_v_phi)));

    /* "PDSim/scroll/common_scroll_geo.pyx":735
 *     if flag=="fi":
 *         x = rb*cos(phi)+rb*(phi-geo.phi_fi0)*sin(phi)
 *         y = rb*sin(phi)-rb*(phi-geo.phi_fi0)*cos(phi)             # <<<<<<<<<<<<<<
 *     elif flag=="fo":
 *         x = rb*cos(phi)+rb*(phi-geo.phi_fo0)*sin(phi)
 */
    __pyx_v_y = ((__pyx_v_rb * sin(__pyx_v_phi)) - ((__pyx_v_rb * (__pyx_v_phi - __pyx_v_geo->phi_fi0)) * cos(__pyx_v_phi)));

    /* "PDSim/scroll/common_scroll_geo.pyx":733
 *     om = geo.phi_fie - theta + 3.0*pi/2.0
 * 
 *     if flag=="fi":             # <<<<<<<<<<<<<<
 *         x = rb*cos(phi)+rb*(phi-geo.phi_fi0)*sin(phi)
 *         y = rb*sin(phi)-rb*(phi-geo.phi_fi0)*cos(phi)
 */
    goto __pyx_L3;
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":736
 *         x = rb*cos(phi)+rb*(phi-geo.phi_fi0)*sin(phi)
 *         y = rb*sin(phi)-rb*(phi-geo.phi_fi0)*cos(phi)
 *     elif flag=="fo":             # <<<<<<<<<<<<<<
 *         x = rb*cos(phi)+rb*(phi-geo.phi_fo0)*sin(phi)
 *         y = rb*sin(phi)-rb*(phi-geo.phi_fo0)*cos(phi)
 */
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_flag, __pyx_n_s_fo, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 736, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "PDSim/scroll/common_scroll_geo.pyx":737
 *         y = rb*sin(phi)-rb*(phi-geo.phi_fi0)*cos(phi)
 *     elif flag=="fo":
 *         x = rb*cos(phi)+rb*(phi-geo.phi_fo0)*sin(phi)             # <<<<<<<<<<<<<<
 *         y = rb*sin(phi)-rb*(phi-geo.phi_fo0)*cos(phi)
 *     elif flag=="oi":
 */
    __pyx_v_x = ((__pyx_v_rb * cos(__pyx_v_phi)) + ((__pyx_v_rb * (__pyx_v_phi - __pyx_v_geo->phi_fo0)) * sin(__pyx_v_phi)));

    /* "PDSim/scroll/common_scroll_geo.pyx":738
 *     elif flag=="fo":
 *         x = rb*cos(phi)+rb*(phi-geo.phi_fo0)*sin(phi)
 *         y = rb*sin(phi)-rb*(phi-geo.phi_fo0)*cos(phi)             # <<<<<<<<<<<<<<
 *     elif flag=="oi":
 *         x = -rb*cos(phi)-rb*(phi-geo.phi_oi0)*sin(phi)+ro*cos(om)
 */
    __pyx_v_y = ((__pyx_v_rb * sin(__pyx_v_phi)) - ((__pyx_v_rb * (__pyx_v_phi - __pyx_v_geo->phi_fo0)) * cos(__pyx_v_phi)));

    /* "PDSim/scroll/common_scroll_geo.pyx":736
 *         x = rb*cos(phi)+rb*(phi-geo.phi_fi0)*sin(phi)
 *         y = rb*sin(phi)-rb*(phi-geo.phi_fi0)*cos(phi)
 *     elif flag=="fo":             # <<<<<<<<<<<<<<
 *         x = rb*cos(phi)+rb*(phi-geo.phi_fo0)*sin(phi)
 *         y = rb*sin(phi)-rb*(phi-geo.phi_fo0)*cos(phi)
 */
    goto __pyx_L3;
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":739
 *         x = rb*cos(phi)+rb*(phi-geo.phi_fo0)*sin(phi)
 *         y = rb*sin(phi)-rb*(phi-geo.phi_fo0)*cos(phi)
 *     elif flag=="oi":             # <<<<<<<<<<<<<<
 *         x = -rb*cos(phi)-rb*(phi-geo.phi_oi0)*sin(phi)+ro*cos(om)
 *         y = -rb*sin(phi)+rb*(phi-geo.phi_oi0)*cos(phi)+ro*sin(om)
 */
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_flag, __pyx_n_s_oi, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 739, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "PDSim/scroll/common_scroll_geo.pyx":740
 *         y = rb*sin(phi)-rb*(phi-geo.phi_fo0)*cos(phi)
 *     elif flag=="oi":
 *         x = -rb*cos(phi)-rb*(phi-geo.phi_oi0)*sin(phi)+ro*cos(om)             # <<<<<<<<<<<<<<
 *         y = -rb*sin(phi)+rb*(phi-geo.phi_oi0)*cos(phi)+ro*sin(om)
 *     elif flag=="oo":
 */
    __pyx_v_x = ((((-__pyx_v_rb) * cos(__pyx_v_phi)) - ((__pyx_v_rb * (__pyx_v_phi - __pyx_v_geo->phi_oi0)) * sin(__pyx_v_phi))) + (__pyx_v_ro * cos(__pyx_v_om)));

    /* "PDSim/scroll/common_scroll_geo.pyx":741
 *     elif flag=="oi":
 *         x = -rb*cos(phi)-rb*(phi-geo.phi_oi0)*sin(phi)+ro*cos(om)
 *         y = -rb*sin(phi)+rb*(phi-geo.phi_oi0)*cos(phi)+ro*sin(om)             # <<<<<<<<<<<<<<
 *     elif flag=="oo":
 *         x = -rb*cos(phi)-rb*(phi-geo.phi_oo0)*sin(phi)+ro*cos(om)
 */
    __pyx_v_y = ((((-__pyx_v_rb) * sin(__pyx_v_phi)) + ((__pyx_v_rb * (__pyx_v_phi - __pyx_v_geo->phi_oi0)) * cos(__pyx_v_phi))) + (__pyx_v_ro * sin(__pyx_v_om)));

    /* "PDSim/scroll/common_scroll_geo.pyx":739
 *         x = rb*cos(phi)+rb*(phi-geo.phi_fo0)*sin(phi)
 *         y = rb*sin(phi)-rb*(phi-geo.phi_fo0)*cos(phi)
 *     elif flag=="oi":             # <<<<<<<<<<<<<<
 *         x = -rb*cos(phi)-rb*(phi-geo.phi_oi0)*sin(phi)+ro*cos(om)
 *         y = -rb*sin(phi)+rb*(phi-geo.phi_oi0)*cos(phi)+ro*sin(om)
 */
    goto __pyx_L3;
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":742
 *         x = -rb*cos(phi)-rb*(phi-geo.phi_oi0)*sin(phi)+ro*cos(om)
 *         y = -rb*sin(phi)+rb*(phi-geo.phi_oi0)*cos(phi)+ro*sin(om)
 *     elif flag=="oo":             # <<<<<<<<<<<<<<
 *         x = -rb*cos(phi)-rb*(phi-geo.phi_oo0)*sin(phi)+ro*cos(om)
 *         y = -rb*sin(phi)+rb*(phi-geo.phi_oo0)*cos(phi)+ro*sin(om)
 */
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_flag, __pyx_n_s_oo, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 742, __pyx_L1_error)
  if (likely(__pyx_t_2)) {

    /* "PDSim/scroll/common_scroll_geo.pyx":743
 *         y = -rb*sin(phi)+rb*(phi-geo.phi_oi0)*cos(phi)+ro*sin(om)
 *     elif flag=="oo":
 *         x = -rb*cos(phi)-rb*(phi-geo.phi_oo0)*sin(phi)+ro*cos(om)             # <<<<<<<<<<<<<<
 *         y = -rb*sin(phi)+rb*(phi-geo.phi_oo0)*cos(phi)+ro*sin(om)
 *     else:
 */
    __pyx_v_x = ((((-__pyx_v_rb) * cos(__pyx_v_phi)) - ((__pyx_v_rb * (__pyx_v_phi - __pyx_v_geo->phi_oo0)) * sin(__pyx_v_phi))) + (__pyx_v_ro * cos(__pyx_v_om)));

    /* "PDSim/scroll/common_scroll_geo.pyx":744
 *     elif flag=="oo":
 *         x = -rb*cos(phi)-rb*(phi-geo.phi_oo0)*sin(phi)+ro*cos(om)
 *         y = -rb*sin(phi)+rb*(phi-geo.phi_oo0)*cos(phi)+ro*sin(om)             # <<<<<<<<<<<<<<
 *     else:
 *         raise ValueError('flag not valid')
 */
    __pyx_v_y = ((((-__pyx_v_rb) * sin(__pyx_v_phi)) + ((__pyx_v_rb * (__pyx_v_phi - __pyx_v_geo->phi_oo0)) * cos(__pyx_v_phi))) + (__pyx_v_ro * sin(__pyx_v_om)));

    /* "PDSim/scroll/common_scroll_geo.pyx":742
 *         x = -rb*cos(phi)-rb*(phi-geo.phi_oi0)*sin(phi)+ro*cos(om)
 *         y = -rb*sin(phi)+rb*(phi-geo.phi_oi0)*cos(phi)+ro*sin(om)
 *     elif flag=="oo":             # <<<<<<<<<<<<<<
 *         x = -rb*cos(phi)-rb*(phi-geo.phi_oo0)*sin(phi)+ro*cos(om)
 *         y = -rb*sin(phi)+rb*(phi-geo.phi_oo0)*cos(phi)+ro*sin(om)
 */
    goto __pyx_L3;
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":746
 *         y = -rb*sin(phi)+rb*(phi-geo.phi_oo0)*cos(phi)+ro*sin(om)
 *     else:
 *         raise ValueError('flag not valid')             # <<<<<<<<<<<<<<
 *     return (x,y)
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 746, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 746, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "PDSim/scroll/common_scroll_geo.pyx":747
 *     else:
 *         raise ValueError('flag not valid')
 *     return (x,y)             # <<<<<<<<<<<<<<
 * 
 * cpdef tuple coords_inv(phi,geoVals geo,double theta,flag="fi"):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 747, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_y); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 747, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 747, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_r = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "PDSim/scroll/common_scroll_geo.pyx":724
 *         raise ValueError('flag not valid')
 * 
 * cpdef tuple _coords_inv_d(double phi, geoVals geo,double theta, flag=""):             # <<<<<<<<<<<<<<
 *     """
 *     Internal function that does the calculation if phi is a double variable
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo._coords_inv_d", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_45_coords_inv_d(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5PDSim_6scroll_17common_scroll_geo_44_coords_inv_d[] = "_coords_inv_d(double phi, geoVals geo, double theta, flag='') -> tuple\n\n    Internal function that does the calculation if phi is a double variable \n    ";
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_45_coords_inv_d(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_phi;
  struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo = 0;
  double __pyx_v_theta;
  PyObject *__pyx_v_flag = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_coords_inv_d (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_phi,&__pyx_n_s_geo,&__pyx_n_s_theta,&__pyx_n_s_flag,0};
    PyObject* values[4] = {0,0,0,0};
    values[3] = ((PyObject *)__pyx_kp_s_);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_phi)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_geo)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_coords_inv_d", 0, 3, 4, 1); __PYX_ERR(0, 724, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_theta)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_coords_inv_d", 0, 3, 4, 2); __PYX_ERR(0, 724, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flag);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_coords_inv_d") < 0)) __PYX_ERR(0, 724, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_phi = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_phi == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 724, __pyx_L3_error)
    __pyx_v_geo = ((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)values[1]);
    __pyx_v_theta = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_theta == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 724, __pyx_L3_error)
    __pyx_v_flag = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_coords_inv_d", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 724, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo._coords_inv_d", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_geo), __pyx_ptype_5PDSim_6scroll_17common_scroll_geo_geoVals, 1, "geo", 0))) __PYX_ERR(0, 724, __pyx_L1_error)
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_44_coords_inv_d(__pyx_self, __pyx_v_phi, __pyx_v_geo, __pyx_v_theta, __pyx_v_flag);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_44_coords_inv_d(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_phi, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo, double __pyx_v_theta, PyObject *__pyx_v_flag) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_5PDSim_6scroll_17common_scroll_geo__coords_inv_d __pyx_t_2;
  __Pyx_RefNannySetupContext("_coords_inv_d", 0);
  __Pyx_TraceCall("_coords_inv_d (wrapper)", __pyx_f[0], 724, 0, __PYX_ERR(0, 724, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.flag = __pyx_v_flag;
  __pyx_t_1 = __pyx_f_5PDSim_6scroll_17common_scroll_geo__coords_inv_d(__pyx_v_phi, __pyx_v_geo, __pyx_v_theta, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 724, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo._coords_inv_d", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pyx":749
 *     return (x,y)
 * 
 * cpdef tuple coords_inv(phi,geoVals geo,double theta,flag="fi"):             # <<<<<<<<<<<<<<
 *     """
 * 
 */

static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_47coords_inv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_5PDSim_6scroll_17common_scroll_geo_coords_inv(PyObject *__pyx_v_phi, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo, double __pyx_v_theta, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_5PDSim_6scroll_17common_scroll_geo_coords_inv *__pyx_optional_args) {
  PyObject *__pyx_v_flag = ((PyObject *)__pyx_n_s_fi);
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_5PDSim_6scroll_17common_scroll_geo__coords_inv_np __pyx_t_4;
  double __pyx_t_5;
  struct __pyx_opt_args_5PDSim_6scroll_17common_scroll_geo__coords_inv_d __pyx_t_6;
  __Pyx_RefNannySetupContext("coords_inv", 0);
  __Pyx_TraceCall("coords_inv", __pyx_f[0], 749, 0, __PYX_ERR(0, 749, __pyx_L1_error));
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_flag = __pyx_optional_args->flag;
    }
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":771
 *         (x,y) : tuple of coordinates on the scroll
 *     """
 *     if type(phi) is np.ndarray:             # <<<<<<<<<<<<<<
 *         return _coords_inv_np(phi,geo,theta,flag)
 *     else:
 */
  __pyx_t_1 = (((PyObject *)Py_TYPE(__pyx_v_phi)) == ((PyObject *)__pyx_ptype_5numpy_ndarray));
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "PDSim/scroll/common_scroll_geo.pyx":772
 *     """
 *     if type(phi) is np.ndarray:
 *         return _coords_inv_np(phi,geo,theta,flag)             # <<<<<<<<<<<<<<
 *     else:
 *         return _coords_inv_d(phi,geo,theta,flag)
 */
    __Pyx_XDECREF(__pyx_r);
    if (!(likely(((__pyx_v_phi) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_phi, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 772, __pyx_L1_error)
    __pyx_t_4.__pyx_n = 1;
    __pyx_t_4.flag = __pyx_v_flag;
    __pyx_t_3 = __pyx_f_5PDSim_6scroll_17common_scroll_geo__coords_inv_np(((PyArrayObject *)__pyx_v_phi), __pyx_v_geo, __pyx_v_theta, 0, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 772, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "PDSim/scroll/common_scroll_geo.pyx":771
 *         (x,y) : tuple of coordinates on the scroll
 *     """
 *     if type(phi) is np.ndarray:             # <<<<<<<<<<<<<<
 *         return _coords_inv_np(phi,geo,theta,flag)
 *     else:
 */
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":774
 *         return _coords_inv_np(phi,geo,theta,flag)
 *     else:
 *         return _coords_inv_d(phi,geo,theta,flag)             # <<<<<<<<<<<<<<
 * 
 * cpdef tuple coords_norm(phi_vec, geoVals geo, double theta,flag="fi"):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_phi); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 774, __pyx_L1_error)
    __pyx_t_6.__pyx_n = 1;
    __pyx_t_6.flag = __pyx_v_flag;
    __pyx_t_3 = __pyx_f_5PDSim_6scroll_17common_scroll_geo__coords_inv_d(__pyx_t_5, __pyx_v_geo, __pyx_v_theta, 0, &__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 774, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":749
 *     return (x,y)
 * 
 * cpdef tuple coords_inv(phi,geoVals geo,double theta,flag="fi"):             # <<<<<<<<<<<<<<
 *     """
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.coords_inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_47coords_inv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5PDSim_6scroll_17common_scroll_geo_46coords_inv[] = "coords_inv(phi, geoVals geo, double theta, flag='fi') -> tuple\n \n    \n    def coords_inv(phi,geo,theta,flag=\"fi\")\n    \n    The involute angles corresponding to the points along the involutes\n    (fixed inner [fi], fixed scroll outer involute [fo], orbiting\n    scroll outer involute [oo], and orbiting scroll inner involute [oi] )\n    \n    Arguments:\n        phi_vec : 1D numpy array or double\n            vector of involute angles\n        geo : geoVals class\n            scroll compressor geometry\n        theta : float\n            crank angle in the range 0 to :math: `2\\pi`\n        flag : string\n            involute of interest, possible values are 'fi','fo','oi','oo'\n            \n    Returns:\n        (x,y) : tuple of coordinates on the scroll\n    ";
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_47coords_inv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_phi = 0;
  struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo = 0;
  double __pyx_v_theta;
  PyObject *__pyx_v_flag = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("coords_inv (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_phi,&__pyx_n_s_geo,&__pyx_n_s_theta,&__pyx_n_s_flag,0};
    PyObject* values[4] = {0,0,0,0};
    values[3] = ((PyObject *)__pyx_n_s_fi);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_phi)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_geo)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("coords_inv", 0, 3, 4, 1); __PYX_ERR(0, 749, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_theta)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("coords_inv", 0, 3, 4, 2); __PYX_ERR(0, 749, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flag);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "coords_inv") < 0)) __PYX_ERR(0, 749, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_phi = values[0];
    __pyx_v_geo = ((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)values[1]);
    __pyx_v_theta = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_theta == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 749, __pyx_L3_error)
    __pyx_v_flag = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("coords_inv", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 749, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.coords_inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_geo), __pyx_ptype_5PDSim_6scroll_17common_scroll_geo_geoVals, 1, "geo", 0))) __PYX_ERR(0, 749, __pyx_L1_error)
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_46coords_inv(__pyx_self, __pyx_v_phi, __pyx_v_geo, __pyx_v_theta, __pyx_v_flag);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_46coords_inv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_phi, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo, double __pyx_v_theta, PyObject *__pyx_v_flag) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_5PDSim_6scroll_17common_scroll_geo_coords_inv __pyx_t_2;
  __Pyx_RefNannySetupContext("coords_inv", 0);
  __Pyx_TraceCall("coords_inv (wrapper)", __pyx_f[0], 749, 0, __PYX_ERR(0, 749, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.flag = __pyx_v_flag;
  __pyx_t_1 = __pyx_f_5PDSim_6scroll_17common_scroll_geo_coords_inv(__pyx_v_phi, __pyx_v_geo, __pyx_v_theta, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.coords_inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pyx":776
 *         return _coords_inv_d(phi,geo,theta,flag)
 * 
 * cpdef tuple coords_norm(phi_vec, geoVals geo, double theta,flag="fi"):             # <<<<<<<<<<<<<<
 *     """
 *     The x and y coordinates of a unit normal vector pointing towards
 */

static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_49coords_norm(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_5PDSim_6scroll_17common_scroll_geo_coords_norm(PyObject *__pyx_v_phi_vec, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo, CYTHON_UNUSED double __pyx_v_theta, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_5PDSim_6scroll_17common_scroll_geo_coords_norm *__pyx_optional_args) {
  PyObject *__pyx_v_flag = ((PyObject *)__pyx_n_s_fi);
  CYTHON_UNUSED double __pyx_v_rb;
  PyObject *__pyx_v_nx = NULL;
  PyObject *__pyx_v_ny = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_phi = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  PyObject *(*__pyx_t_10)(PyObject *);
  __Pyx_RefNannySetupContext("coords_norm", 0);
  __Pyx_TraceCall("coords_norm", __pyx_f[0], 776, 0, __PYX_ERR(0, 776, __pyx_L1_error));
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_flag = __pyx_optional_args->flag;
    }
  }
  __Pyx_INCREF(__pyx_v_phi_vec);

  /* "PDSim/scroll/common_scroll_geo.pyx":797
 *     """
 * 
 *     rb=geo.rb             # <<<<<<<<<<<<<<
 *     if not type(phi_vec) is np.ndarray:
 *         if type(phi_vec) is list:
 */
  __pyx_t_1 = __pyx_v_geo->rb;
  __pyx_v_rb = __pyx_t_1;

  /* "PDSim/scroll/common_scroll_geo.pyx":798
 * 
 *     rb=geo.rb
 *     if not type(phi_vec) is np.ndarray:             # <<<<<<<<<<<<<<
 *         if type(phi_vec) is list:
 *             phi_vec=np.array(phi_vec)
 */
  __pyx_t_2 = (((PyObject *)Py_TYPE(__pyx_v_phi_vec)) != ((PyObject *)__pyx_ptype_5numpy_ndarray));
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "PDSim/scroll/common_scroll_geo.pyx":799
 *     rb=geo.rb
 *     if not type(phi_vec) is np.ndarray:
 *         if type(phi_vec) is list:             # <<<<<<<<<<<<<<
 *             phi_vec=np.array(phi_vec)
 *         else:
 */
    __pyx_t_3 = (((PyObject *)Py_TYPE(__pyx_v_phi_vec)) == ((PyObject *)(&PyList_Type)));
    __pyx_t_2 = (__pyx_t_3 != 0);
    if (__pyx_t_2) {

      /* "PDSim/scroll/common_scroll_geo.pyx":800
 *     if not type(phi_vec) is np.ndarray:
 *         if type(phi_vec) is list:
 *             phi_vec=np.array(phi_vec)             # <<<<<<<<<<<<<<
 *         else:
 *             phi_vec=np.array([phi_vec])
 */
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 800, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 800, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
        }
      }
      __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_v_phi_vec) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_phi_vec);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 800, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF_SET(__pyx_v_phi_vec, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "PDSim/scroll/common_scroll_geo.pyx":799
 *     rb=geo.rb
 *     if not type(phi_vec) is np.ndarray:
 *         if type(phi_vec) is list:             # <<<<<<<<<<<<<<
 *             phi_vec=np.array(phi_vec)
 *         else:
 */
      goto __pyx_L4;
    }

    /* "PDSim/scroll/common_scroll_geo.pyx":802
 *             phi_vec=np.array(phi_vec)
 *         else:
 *             phi_vec=np.array([phi_vec])             # <<<<<<<<<<<<<<
 *     nx=np.zeros(np.size(phi_vec))
 *     ny=np.zeros(np.size(phi_vec))
 */
    /*else*/ {
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 802, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 802, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 802, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_v_phi_vec);
      __Pyx_GIVEREF(__pyx_v_phi_vec);
      PyList_SET_ITEM(__pyx_t_6, 0, __pyx_v_phi_vec);
      __pyx_t_7 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 802, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF_SET(__pyx_v_phi_vec, __pyx_t_4);
      __pyx_t_4 = 0;
    }
    __pyx_L4:;

    /* "PDSim/scroll/common_scroll_geo.pyx":798
 * 
 *     rb=geo.rb
 *     if not type(phi_vec) is np.ndarray:             # <<<<<<<<<<<<<<
 *         if type(phi_vec) is list:
 *             phi_vec=np.array(phi_vec)
 */
  }

  /* "PDSim/scroll/common_scroll_geo.pyx":803
 *         else:
 *             phi_vec=np.array([phi_vec])
 *     nx=np.zeros(np.size(phi_vec))             # <<<<<<<<<<<<<<
 *     ny=np.zeros(np.size(phi_vec))
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 803, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 803, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 803, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_size); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 803, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
    }
  }
  __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_7, __pyx_v_phi_vec) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_phi_vec);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 803, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 803, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_nx = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "PDSim/scroll/common_scroll_geo.pyx":804
 *             phi_vec=np.array([phi_vec])
 *     nx=np.zeros(np.size(phi_vec))
 *     ny=np.zeros(np.size(phi_vec))             # <<<<<<<<<<<<<<
 * 
 *     for i in xrange(np.size(phi_vec)):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 804, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 804, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 804, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_size); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 804, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_v_phi_vec) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_phi_vec);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 804, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 804, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_ny = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "PDSim/scroll/common_scroll_geo.pyx":806
 *     ny=np.zeros(np.size(phi_vec))
 * 
 *     for i in xrange(np.size(phi_vec)):             # <<<<<<<<<<<<<<
 *         phi=phi_vec[i]
 *         if flag=="fi":
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_size); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_v_phi_vec) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_phi_vec);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_xrange, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
    __pyx_t_4 = __pyx_t_6; __Pyx_INCREF(__pyx_t_4); __pyx_t_9 = 0;
    __pyx_t_10 = NULL;
  } else {
    __pyx_t_9 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 806, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_10 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 806, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  for (;;) {
    if (likely(!__pyx_t_10)) {
      if (likely(PyList_CheckExact(__pyx_t_4))) {
        if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 806, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 806, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      } else {
        if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 806, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 806, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      }
    } else {
      __pyx_t_6 = __pyx_t_10(__pyx_t_4);
      if (unlikely(!__pyx_t_6)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 806, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_6);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "PDSim/scroll/common_scroll_geo.pyx":807
 * 
 *     for i in xrange(np.size(phi_vec)):
 *         phi=phi_vec[i]             # <<<<<<<<<<<<<<
 *         if flag=="fi":
 *             nx[i] = +sin(phi)
 */
    __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_phi_vec, __pyx_v_i); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 807, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_XDECREF_SET(__pyx_v_phi, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "PDSim/scroll/common_scroll_geo.pyx":808
 *     for i in xrange(np.size(phi_vec)):
 *         phi=phi_vec[i]
 *         if flag=="fi":             # <<<<<<<<<<<<<<
 *             nx[i] = +sin(phi)
 *             ny[i] = -cos(phi)
 */
    __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_flag, __pyx_n_s_fi, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 808, __pyx_L1_error)
    if (__pyx_t_2) {

      /* "PDSim/scroll/common_scroll_geo.pyx":809
 *         phi=phi_vec[i]
 *         if flag=="fi":
 *             nx[i] = +sin(phi)             # <<<<<<<<<<<<<<
 *             ny[i] = -cos(phi)
 *         elif flag=="fo":
 */
      __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_phi); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 809, __pyx_L1_error)
      __pyx_t_6 = PyFloat_FromDouble(sin(__pyx_t_1)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 809, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(PyObject_SetItem(__pyx_v_nx, __pyx_v_i, __pyx_t_6) < 0)) __PYX_ERR(0, 809, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "PDSim/scroll/common_scroll_geo.pyx":810
 *         if flag=="fi":
 *             nx[i] = +sin(phi)
 *             ny[i] = -cos(phi)             # <<<<<<<<<<<<<<
 *         elif flag=="fo":
 *             nx[i] = -sin(phi)
 */
      __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_phi); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 810, __pyx_L1_error)
      __pyx_t_6 = PyFloat_FromDouble((-cos(__pyx_t_1))); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 810, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(PyObject_SetItem(__pyx_v_ny, __pyx_v_i, __pyx_t_6) < 0)) __PYX_ERR(0, 810, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "PDSim/scroll/common_scroll_geo.pyx":808
 *     for i in xrange(np.size(phi_vec)):
 *         phi=phi_vec[i]
 *         if flag=="fi":             # <<<<<<<<<<<<<<
 *             nx[i] = +sin(phi)
 *             ny[i] = -cos(phi)
 */
      goto __pyx_L7;
    }

    /* "PDSim/scroll/common_scroll_geo.pyx":811
 *             nx[i] = +sin(phi)
 *             ny[i] = -cos(phi)
 *         elif flag=="fo":             # <<<<<<<<<<<<<<
 *             nx[i] = -sin(phi)
 *             ny[i] = +cos(phi)
 */
    __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_flag, __pyx_n_s_fo, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 811, __pyx_L1_error)
    if (__pyx_t_2) {

      /* "PDSim/scroll/common_scroll_geo.pyx":812
 *             ny[i] = -cos(phi)
 *         elif flag=="fo":
 *             nx[i] = -sin(phi)             # <<<<<<<<<<<<<<
 *             ny[i] = +cos(phi)
 *         elif flag=="oi":
 */
      __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_phi); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 812, __pyx_L1_error)
      __pyx_t_6 = PyFloat_FromDouble((-sin(__pyx_t_1))); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 812, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(PyObject_SetItem(__pyx_v_nx, __pyx_v_i, __pyx_t_6) < 0)) __PYX_ERR(0, 812, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "PDSim/scroll/common_scroll_geo.pyx":813
 *         elif flag=="fo":
 *             nx[i] = -sin(phi)
 *             ny[i] = +cos(phi)             # <<<<<<<<<<<<<<
 *         elif flag=="oi":
 *             nx[i] = -sin(phi)
 */
      __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_phi); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 813, __pyx_L1_error)
      __pyx_t_6 = PyFloat_FromDouble(cos(__pyx_t_1)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 813, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(PyObject_SetItem(__pyx_v_ny, __pyx_v_i, __pyx_t_6) < 0)) __PYX_ERR(0, 813, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "PDSim/scroll/common_scroll_geo.pyx":811
 *             nx[i] = +sin(phi)
 *             ny[i] = -cos(phi)
 *         elif flag=="fo":             # <<<<<<<<<<<<<<
 *             nx[i] = -sin(phi)
 *             ny[i] = +cos(phi)
 */
      goto __pyx_L7;
    }

    /* "PDSim/scroll/common_scroll_geo.pyx":814
 *             nx[i] = -sin(phi)
 *             ny[i] = +cos(phi)
 *         elif flag=="oi":             # <<<<<<<<<<<<<<
 *             nx[i] = -sin(phi)
 *             ny[i] = +cos(phi)
 */
    __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_flag, __pyx_n_s_oi, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 814, __pyx_L1_error)
    if (__pyx_t_2) {

      /* "PDSim/scroll/common_scroll_geo.pyx":815
 *             ny[i] = +cos(phi)
 *         elif flag=="oi":
 *             nx[i] = -sin(phi)             # <<<<<<<<<<<<<<
 *             ny[i] = +cos(phi)
 *         elif flag=="oo":
 */
      __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_phi); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 815, __pyx_L1_error)
      __pyx_t_6 = PyFloat_FromDouble((-sin(__pyx_t_1))); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 815, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(PyObject_SetItem(__pyx_v_nx, __pyx_v_i, __pyx_t_6) < 0)) __PYX_ERR(0, 815, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "PDSim/scroll/common_scroll_geo.pyx":816
 *         elif flag=="oi":
 *             nx[i] = -sin(phi)
 *             ny[i] = +cos(phi)             # <<<<<<<<<<<<<<
 *         elif flag=="oo":
 *             nx[i] = +sin(phi)
 */
      __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_phi); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 816, __pyx_L1_error)
      __pyx_t_6 = PyFloat_FromDouble(cos(__pyx_t_1)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 816, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(PyObject_SetItem(__pyx_v_ny, __pyx_v_i, __pyx_t_6) < 0)) __PYX_ERR(0, 816, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "PDSim/scroll/common_scroll_geo.pyx":814
 *             nx[i] = -sin(phi)
 *             ny[i] = +cos(phi)
 *         elif flag=="oi":             # <<<<<<<<<<<<<<
 *             nx[i] = -sin(phi)
 *             ny[i] = +cos(phi)
 */
      goto __pyx_L7;
    }

    /* "PDSim/scroll/common_scroll_geo.pyx":817
 *             nx[i] = -sin(phi)
 *             ny[i] = +cos(phi)
 *         elif flag=="oo":             # <<<<<<<<<<<<<<
 *             nx[i] = +sin(phi)
 *             ny[i] = -cos(phi)
 */
    __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_flag, __pyx_n_s_oo, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 817, __pyx_L1_error)
    if (__pyx_t_2) {

      /* "PDSim/scroll/common_scroll_geo.pyx":818
 *             ny[i] = +cos(phi)
 *         elif flag=="oo":
 *             nx[i] = +sin(phi)             # <<<<<<<<<<<<<<
 *             ny[i] = -cos(phi)
 *         else:
 */
      __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_phi); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 818, __pyx_L1_error)
      __pyx_t_6 = PyFloat_FromDouble(sin(__pyx_t_1)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 818, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(PyObject_SetItem(__pyx_v_nx, __pyx_v_i, __pyx_t_6) < 0)) __PYX_ERR(0, 818, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "PDSim/scroll/common_scroll_geo.pyx":819
 *         elif flag=="oo":
 *             nx[i] = +sin(phi)
 *             ny[i] = -cos(phi)             # <<<<<<<<<<<<<<
 *         else:
 *             print("Uh oh... error in coords_norm")
 */
      __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_phi); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 819, __pyx_L1_error)
      __pyx_t_6 = PyFloat_FromDouble((-cos(__pyx_t_1))); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 819, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(PyObject_SetItem(__pyx_v_ny, __pyx_v_i, __pyx_t_6) < 0)) __PYX_ERR(0, 819, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "PDSim/scroll/common_scroll_geo.pyx":817
 *             nx[i] = -sin(phi)
 *             ny[i] = +cos(phi)
 *         elif flag=="oo":             # <<<<<<<<<<<<<<
 *             nx[i] = +sin(phi)
 *             ny[i] = -cos(phi)
 */
      goto __pyx_L7;
    }

    /* "PDSim/scroll/common_scroll_geo.pyx":821
 *             ny[i] = -cos(phi)
 *         else:
 *             print("Uh oh... error in coords_norm")             # <<<<<<<<<<<<<<
 *     return (nx,ny)
 * 
 */
    /*else*/ {
      if (__Pyx_PrintOne(0, __pyx_kp_s_Uh_oh_error_in_coords_norm) < 0) __PYX_ERR(0, 821, __pyx_L1_error)
    }
    __pyx_L7:;

    /* "PDSim/scroll/common_scroll_geo.pyx":806
 *     ny=np.zeros(np.size(phi_vec))
 * 
 *     for i in xrange(np.size(phi_vec)):             # <<<<<<<<<<<<<<
 *         phi=phi_vec[i]
 *         if flag=="fi":
 */
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "PDSim/scroll/common_scroll_geo.pyx":822
 *         else:
 *             print("Uh oh... error in coords_norm")
 *     return (nx,ny)             # <<<<<<<<<<<<<<
 * 
 * cdef double x_antideriv(double phi, double phi_0):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 822, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_nx);
  __Pyx_GIVEREF(__pyx_v_nx);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_nx);
  __Pyx_INCREF(__pyx_v_ny);
  __Pyx_GIVEREF(__pyx_v_ny);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_ny);
  __pyx_r = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "PDSim/scroll/common_scroll_geo.pyx":776
 *         return _coords_inv_d(phi,geo,theta,flag)
 * 
 * cpdef tuple coords_norm(phi_vec, geoVals geo, double theta,flag="fi"):             # <<<<<<<<<<<<<<
 *     """
 *     The x and y coordinates of a unit normal vector pointing towards
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.coords_norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_nx);
  __Pyx_XDECREF(__pyx_v_ny);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_phi);
  __Pyx_XDECREF(__pyx_v_phi_vec);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_49coords_norm(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5PDSim_6scroll_17common_scroll_geo_48coords_norm[] = "coords_norm(phi_vec, geoVals geo, double theta, flag='fi') -> tuple\n \n    The x and y coordinates of a unit normal vector pointing towards\n    the scroll involute for the the involutes\n    (fixed inner [fi], fixed scroll outer involute [fo], orbiting\n    scroll outer involute [oo], and orbiting scroll inner involute [oi])\n    \n    Arguments:\n        phi_vec : 1D numpy array\n            vector of involute angles\n        geo : geoVals class\n            scroll compressor geometry\n        theta : float\n            crank angle in the range 0 to :math: `2\\pi`\n        flag : string\n            involute of interest, possible values are 'fi','fo','oi','oo'\n            \n    Returns:\n        (nx,ny) : tuple of unit normal coordinates pointing towards scroll wrap\n    ";
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_49coords_norm(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_phi_vec = 0;
  struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo = 0;
  double __pyx_v_theta;
  PyObject *__pyx_v_flag = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("coords_norm (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_phi_vec,&__pyx_n_s_geo,&__pyx_n_s_theta,&__pyx_n_s_flag,0};
    PyObject* values[4] = {0,0,0,0};
    values[3] = ((PyObject *)__pyx_n_s_fi);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_phi_vec)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_geo)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("coords_norm", 0, 3, 4, 1); __PYX_ERR(0, 776, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_theta)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("coords_norm", 0, 3, 4, 2); __PYX_ERR(0, 776, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flag);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "coords_norm") < 0)) __PYX_ERR(0, 776, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_phi_vec = values[0];
    __pyx_v_geo = ((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)values[1]);
    __pyx_v_theta = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_theta == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 776, __pyx_L3_error)
    __pyx_v_flag = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("coords_norm", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 776, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.coords_norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_geo), __pyx_ptype_5PDSim_6scroll_17common_scroll_geo_geoVals, 1, "geo", 0))) __PYX_ERR(0, 776, __pyx_L1_error)
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_48coords_norm(__pyx_self, __pyx_v_phi_vec, __pyx_v_geo, __pyx_v_theta, __pyx_v_flag);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_48coords_norm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_phi_vec, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo, double __pyx_v_theta, PyObject *__pyx_v_flag) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_5PDSim_6scroll_17common_scroll_geo_coords_norm __pyx_t_2;
  __Pyx_RefNannySetupContext("coords_norm", 0);
  __Pyx_TraceCall("coords_norm (wrapper)", __pyx_f[0], 776, 0, __PYX_ERR(0, 776, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.flag = __pyx_v_flag;
  __pyx_t_1 = __pyx_f_5PDSim_6scroll_17common_scroll_geo_coords_norm(__pyx_v_phi_vec, __pyx_v_geo, __pyx_v_theta, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 776, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.coords_norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pyx":824
 *     return (nx,ny)
 * 
 * cdef double x_antideriv(double phi, double phi_0):             # <<<<<<<<<<<<<<
 *     """ Antiderivative of function for x for scroll_wrap """
 *     return -cos(phi)*((phi_0-phi)**2-3)-3*sin(phi)*(phi_0-phi)
 */

static double __pyx_f_5PDSim_6scroll_17common_scroll_geo_x_antideriv(double __pyx_v_phi, double __pyx_v_phi_0) {
  double __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("x_antideriv", 0);
  __Pyx_TraceCall("x_antideriv", __pyx_f[0], 824, 0, __PYX_ERR(0, 824, __pyx_L1_error));

  /* "PDSim/scroll/common_scroll_geo.pyx":826
 * cdef double x_antideriv(double phi, double phi_0):
 *     """ Antiderivative of function for x for scroll_wrap """
 *     return -cos(phi)*((phi_0-phi)**2-3)-3*sin(phi)*(phi_0-phi)             # <<<<<<<<<<<<<<
 * 
 * cdef double y_antideriv(double phi, double phi_0):
 */
  __pyx_r = (((-cos(__pyx_v_phi)) * (pow((__pyx_v_phi_0 - __pyx_v_phi), 2.0) - 3.0)) - ((3.0 * sin(__pyx_v_phi)) * (__pyx_v_phi_0 - __pyx_v_phi)));
  goto __pyx_L0;

  /* "PDSim/scroll/common_scroll_geo.pyx":824
 *     return (nx,ny)
 * 
 * cdef double x_antideriv(double phi, double phi_0):             # <<<<<<<<<<<<<<
 *     """ Antiderivative of function for x for scroll_wrap """
 *     return -cos(phi)*((phi_0-phi)**2-3)-3*sin(phi)*(phi_0-phi)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("PDSim.scroll.common_scroll_geo.x_antideriv", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pyx":828
 *     return -cos(phi)*((phi_0-phi)**2-3)-3*sin(phi)*(phi_0-phi)
 * 
 * cdef double y_antideriv(double phi, double phi_0):             # <<<<<<<<<<<<<<
 *     """ Antiderivative of function for y for scroll_wrap """
 *     return +3*cos(phi)*(phi_0-phi)-sin(phi)*((phi_0-phi)**2-3)
 */

static double __pyx_f_5PDSim_6scroll_17common_scroll_geo_y_antideriv(double __pyx_v_phi, double __pyx_v_phi_0) {
  double __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("y_antideriv", 0);
  __Pyx_TraceCall("y_antideriv", __pyx_f[0], 828, 0, __PYX_ERR(0, 828, __pyx_L1_error));

  /* "PDSim/scroll/common_scroll_geo.pyx":830
 * cdef double y_antideriv(double phi, double phi_0):
 *     """ Antiderivative of function for y for scroll_wrap """
 *     return +3*cos(phi)*(phi_0-phi)-sin(phi)*((phi_0-phi)**2-3)             # <<<<<<<<<<<<<<
 * 
 * @cython.cdivision(True)
 */
  __pyx_r = (((3.0 * cos(__pyx_v_phi)) * (__pyx_v_phi_0 - __pyx_v_phi)) - (sin(__pyx_v_phi) * (pow((__pyx_v_phi_0 - __pyx_v_phi), 2.0) - 3.0)));
  goto __pyx_L0;

  /* "PDSim/scroll/common_scroll_geo.pyx":828
 *     return -cos(phi)*((phi_0-phi)**2-3)-3*sin(phi)*(phi_0-phi)
 * 
 * cdef double y_antideriv(double phi, double phi_0):             # <<<<<<<<<<<<<<
 *     """ Antiderivative of function for y for scroll_wrap """
 *     return +3*cos(phi)*(phi_0-phi)-sin(phi)*((phi_0-phi)**2-3)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("PDSim.scroll.common_scroll_geo.y_antideriv", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pyx":833
 * 
 * @cython.cdivision(True)
 * cpdef tuple scroll_wrap(geoVals geo):             # <<<<<<<<<<<<<<
 *     """
 *     Calculate the scroll wrap centroid and volume
 */

static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_51scroll_wrap(PyObject *__pyx_self, PyObject *__pyx_v_geo); /*proto*/
static PyObject *__pyx_f_5PDSim_6scroll_17common_scroll_geo_scroll_wrap(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_v_phi_0;
  double __pyx_v_phi_e;
  double __pyx_v_Vwrap;
  double __pyx_v_xstar;
  double __pyx_v_ystar;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("scroll_wrap", 0);
  __Pyx_TraceCall("scroll_wrap", __pyx_f[0], 833, 0, __PYX_ERR(0, 833, __pyx_L1_error));

  /* "PDSim/scroll/common_scroll_geo.pyx":839
 * 
 *     # Initial angle of the centerline of the orbiting scroll wrap
 *     cdef double phi_0 = (geo.phi_oi0 + geo.phi_oo0)/2             # <<<<<<<<<<<<<<
 *     # Ending angle of the centerline of the orbiting scroll wrap
 *     cdef double phi_e = (geo.phi_oie + geo.phi_ooe)/2
 */
  __pyx_v_phi_0 = ((__pyx_v_geo->phi_oi0 + __pyx_v_geo->phi_oo0) / 2.0);

  /* "PDSim/scroll/common_scroll_geo.pyx":841
 *     cdef double phi_0 = (geo.phi_oi0 + geo.phi_oo0)/2
 *     # Ending angle of the centerline of the orbiting scroll wrap
 *     cdef double phi_e = (geo.phi_oie + geo.phi_ooe)/2             # <<<<<<<<<<<<<<
 * 
 *     Vwrap = geo.h*geo.rb*geo.t*(phi_e**2/2.0-phi_0**2/2.0-(phi_e-phi_0)*phi_0)
 */
  __pyx_v_phi_e = ((__pyx_v_geo->phi_oie + __pyx_v_geo->phi_ooe) / 2.0);

  /* "PDSim/scroll/common_scroll_geo.pyx":843
 *     cdef double phi_e = (geo.phi_oie + geo.phi_ooe)/2
 * 
 *     Vwrap = geo.h*geo.rb*geo.t*(phi_e**2/2.0-phi_0**2/2.0-(phi_e-phi_0)*phi_0)             # <<<<<<<<<<<<<<
 *     xstar = geo.h*geo.rb**2*geo.t/Vwrap*(x_antideriv(phi_e, phi_0)-x_antideriv(phi_0, phi_0))
 *     ystar = geo.h*geo.rb**2*geo.t/Vwrap*(y_antideriv(phi_e, phi_0)-y_antideriv(phi_0, phi_0))
 */
  __pyx_v_Vwrap = (((__pyx_v_geo->h * __pyx_v_geo->rb) * __pyx_v_geo->t) * (((pow(__pyx_v_phi_e, 2.0) / 2.0) - (pow(__pyx_v_phi_0, 2.0) / 2.0)) - ((__pyx_v_phi_e - __pyx_v_phi_0) * __pyx_v_phi_0)));

  /* "PDSim/scroll/common_scroll_geo.pyx":844
 * 
 *     Vwrap = geo.h*geo.rb*geo.t*(phi_e**2/2.0-phi_0**2/2.0-(phi_e-phi_0)*phi_0)
 *     xstar = geo.h*geo.rb**2*geo.t/Vwrap*(x_antideriv(phi_e, phi_0)-x_antideriv(phi_0, phi_0))             # <<<<<<<<<<<<<<
 *     ystar = geo.h*geo.rb**2*geo.t/Vwrap*(y_antideriv(phi_e, phi_0)-y_antideriv(phi_0, phi_0))
 * 
 */
  __pyx_v_xstar = ((((__pyx_v_geo->h * pow(__pyx_v_geo->rb, 2.0)) * __pyx_v_geo->t) / __pyx_v_Vwrap) * (__pyx_f_5PDSim_6scroll_17common_scroll_geo_x_antideriv(__pyx_v_phi_e, __pyx_v_phi_0) - __pyx_f_5PDSim_6scroll_17common_scroll_geo_x_antideriv(__pyx_v_phi_0, __pyx_v_phi_0)));

  /* "PDSim/scroll/common_scroll_geo.pyx":845
 *     Vwrap = geo.h*geo.rb*geo.t*(phi_e**2/2.0-phi_0**2/2.0-(phi_e-phi_0)*phi_0)
 *     xstar = geo.h*geo.rb**2*geo.t/Vwrap*(x_antideriv(phi_e, phi_0)-x_antideriv(phi_0, phi_0))
 *     ystar = geo.h*geo.rb**2*geo.t/Vwrap*(y_antideriv(phi_e, phi_0)-y_antideriv(phi_0, phi_0))             # <<<<<<<<<<<<<<
 * 
 *     return Vwrap, xstar, ystar
 */
  __pyx_v_ystar = ((((__pyx_v_geo->h * pow(__pyx_v_geo->rb, 2.0)) * __pyx_v_geo->t) / __pyx_v_Vwrap) * (__pyx_f_5PDSim_6scroll_17common_scroll_geo_y_antideriv(__pyx_v_phi_e, __pyx_v_phi_0) - __pyx_f_5PDSim_6scroll_17common_scroll_geo_y_antideriv(__pyx_v_phi_0, __pyx_v_phi_0)));

  /* "PDSim/scroll/common_scroll_geo.pyx":847
 *     ystar = geo.h*geo.rb**2*geo.t/Vwrap*(y_antideriv(phi_e, phi_0)-y_antideriv(phi_0, phi_0))
 * 
 *     return Vwrap, xstar, ystar             # <<<<<<<<<<<<<<
 * 
 * cpdef double involute_heat_transfer(double hc, double hs, double  rb,
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_Vwrap); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 847, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_xstar); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 847, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_ystar); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 847, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 847, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_r = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "PDSim/scroll/common_scroll_geo.pyx":833
 * 
 * @cython.cdivision(True)
 * cpdef tuple scroll_wrap(geoVals geo):             # <<<<<<<<<<<<<<
 *     """
 *     Calculate the scroll wrap centroid and volume
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.scroll_wrap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_51scroll_wrap(PyObject *__pyx_self, PyObject *__pyx_v_geo); /*proto*/
static char __pyx_doc_5PDSim_6scroll_17common_scroll_geo_50scroll_wrap[] = "scroll_wrap(geoVals geo) -> tuple\n\n    Calculate the scroll wrap centroid and volume\n    ";
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_51scroll_wrap(PyObject *__pyx_self, PyObject *__pyx_v_geo) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("scroll_wrap (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_geo), __pyx_ptype_5PDSim_6scroll_17common_scroll_geo_geoVals, 1, "geo", 0))) __PYX_ERR(0, 833, __pyx_L1_error)
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_50scroll_wrap(__pyx_self, ((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)__pyx_v_geo));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_50scroll_wrap(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *__pyx_v_geo) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("scroll_wrap", 0);
  __Pyx_TraceCall("scroll_wrap (wrapper)", __pyx_f[0], 833, 0, __PYX_ERR(0, 833, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5PDSim_6scroll_17common_scroll_geo_scroll_wrap(__pyx_v_geo, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 833, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.scroll_wrap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pyx":849
 *     return Vwrap, xstar, ystar
 * 
 * cpdef double involute_heat_transfer(double hc, double hs, double  rb,             # <<<<<<<<<<<<<<
 *                                   double phi1, double phi2, double phi0,
 *                                   double T_scroll, double T_CV, double dT_dphi,
 */

static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_53involute_heat_transfer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static double __pyx_f_5PDSim_6scroll_17common_scroll_geo_involute_heat_transfer(double __pyx_v_hc, double __pyx_v_hs, double __pyx_v_rb, double __pyx_v_phi1, double __pyx_v_phi2, double __pyx_v_phi0, double __pyx_v_T_scroll, double __pyx_v_T_CV, double __pyx_v_dT_dphi, double __pyx_v_phim, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_v_term1;
  double __pyx_v_term2;
  double __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("involute_heat_transfer", 0);
  __Pyx_TraceCall("involute_heat_transfer", __pyx_f[0], 849, 0, __PYX_ERR(0, 849, __pyx_L1_error));

  /* "PDSim/scroll/common_scroll_geo.pyx":886
 *         larger involute angle in value
 *         """
 *         term1=hc*hs*rb*( (phi1*phi1/2.0-phi0*phi1)*(T_scroll-T_CV)             # <<<<<<<<<<<<<<
 *             +dT_dphi*(phi1*phi1*phi1/3.0-(phi0+phim)*phi1*phi1/2.0+phi0*phim*phi1))
 *         term2=hc*hs*rb*( (phi2*phi2/2.0-phi0*phi2)*(T_scroll-T_CV)
 */
  __pyx_v_term1 = (((__pyx_v_hc * __pyx_v_hs) * __pyx_v_rb) * (((((__pyx_v_phi1 * __pyx_v_phi1) / 2.0) - (__pyx_v_phi0 * __pyx_v_phi1)) * (__pyx_v_T_scroll - __pyx_v_T_CV)) + (__pyx_v_dT_dphi * (((((__pyx_v_phi1 * __pyx_v_phi1) * __pyx_v_phi1) / 3.0) - ((((__pyx_v_phi0 + __pyx_v_phim) * __pyx_v_phi1) * __pyx_v_phi1) / 2.0)) + ((__pyx_v_phi0 * __pyx_v_phim) * __pyx_v_phi1)))));

  /* "PDSim/scroll/common_scroll_geo.pyx":888
 *         term1=hc*hs*rb*( (phi1*phi1/2.0-phi0*phi1)*(T_scroll-T_CV)
 *             +dT_dphi*(phi1*phi1*phi1/3.0-(phi0+phim)*phi1*phi1/2.0+phi0*phim*phi1))
 *         term2=hc*hs*rb*( (phi2*phi2/2.0-phi0*phi2)*(T_scroll-T_CV)             # <<<<<<<<<<<<<<
 *             +dT_dphi*(phi2*phi2*phi2/3.0-(phi0+phim)*phi2*phi2/2.0+phi0*phim*phi2))
 *         return term1-term2;
 */
  __pyx_v_term2 = (((__pyx_v_hc * __pyx_v_hs) * __pyx_v_rb) * (((((__pyx_v_phi2 * __pyx_v_phi2) / 2.0) - (__pyx_v_phi0 * __pyx_v_phi2)) * (__pyx_v_T_scroll - __pyx_v_T_CV)) + (__pyx_v_dT_dphi * (((((__pyx_v_phi2 * __pyx_v_phi2) * __pyx_v_phi2) / 3.0) - ((((__pyx_v_phi0 + __pyx_v_phim) * __pyx_v_phi2) * __pyx_v_phi2) / 2.0)) + ((__pyx_v_phi0 * __pyx_v_phim) * __pyx_v_phi2)))));

  /* "PDSim/scroll/common_scroll_geo.pyx":890
 *         term2=hc*hs*rb*( (phi2*phi2/2.0-phi0*phi2)*(T_scroll-T_CV)
 *             +dT_dphi*(phi2*phi2*phi2/3.0-(phi0+phim)*phi2*phi2/2.0+phi0*phim*phi2))
 *         return term1-term2;             # <<<<<<<<<<<<<<
 */
  __pyx_r = (__pyx_v_term1 - __pyx_v_term2);
  goto __pyx_L0;

  /* "PDSim/scroll/common_scroll_geo.pyx":849
 *     return Vwrap, xstar, ystar
 * 
 * cpdef double involute_heat_transfer(double hc, double hs, double  rb,             # <<<<<<<<<<<<<<
 *                                   double phi1, double phi2, double phi0,
 *                                   double T_scroll, double T_CV, double dT_dphi,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("PDSim.scroll.common_scroll_geo.involute_heat_transfer", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_53involute_heat_transfer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5PDSim_6scroll_17common_scroll_geo_52involute_heat_transfer[] = "involute_heat_transfer(double hc, double hs, double rb, double phi1, double phi2, double phi0, double T_scroll, double T_CV, double dT_dphi, double phim) -> double\n\n        This function evaluates the anti-derivative of \n        the differential of involute heat transfer, and returns the amount of scroll-\n        wall heat transfer in kW\n        \n        Parameters\n        ----------\n        hc : float\n            Heat transfer coefficient [kW/m2/K]\n        hs : float\n            Scroll wrap height [m]\n        rb : float\n            Base circle radius [m]\n        phi1 : float\n            Larger involute angle [rad]\n        phi2 : float\n            Smaller involute angle [rad]\n        phi0 : float\n            Initial involute angle [rad]\n        T_scroll : float\n            Lump temperature of the scroll wrap [K]\n        T_CV : float\n            Temperature of the gas in the CV [K]\n        dT_dphi : float\n            Derivative of the temperature along the scroll wrap [K/rad]\n        phim : float\n            Mean involute angle of wrap used for heat transfer [rad]\n        \n        Notes\n        -----\n        ``phi1`` and ``phi2`` are defined such that ``phi1`` is always the\n        larger involute angle in value\n        ";
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_53involute_heat_transfer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_hc;
  double __pyx_v_hs;
  double __pyx_v_rb;
  double __pyx_v_phi1;
  double __pyx_v_phi2;
  double __pyx_v_phi0;
  double __pyx_v_T_scroll;
  double __pyx_v_T_CV;
  double __pyx_v_dT_dphi;
  double __pyx_v_phim;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("involute_heat_transfer (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hc,&__pyx_n_s_hs,&__pyx_n_s_rb,&__pyx_n_s_phi1,&__pyx_n_s_phi2,&__pyx_n_s_phi0,&__pyx_n_s_T_scroll,&__pyx_n_s_T_CV,&__pyx_n_s_dT_dphi,&__pyx_n_s_phim,0};
    PyObject* values[10] = {0,0,0,0,0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
        CYTHON_FALLTHROUGH;
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        CYTHON_FALLTHROUGH;
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hc)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hs)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("involute_heat_transfer", 1, 10, 10, 1); __PYX_ERR(0, 849, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rb)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("involute_heat_transfer", 1, 10, 10, 2); __PYX_ERR(0, 849, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_phi1)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("involute_heat_transfer", 1, 10, 10, 3); __PYX_ERR(0, 849, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_phi2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("involute_heat_transfer", 1, 10, 10, 4); __PYX_ERR(0, 849, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_phi0)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("involute_heat_transfer", 1, 10, 10, 5); __PYX_ERR(0, 849, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_T_scroll)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("involute_heat_transfer", 1, 10, 10, 6); __PYX_ERR(0, 849, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_T_CV)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("involute_heat_transfer", 1, 10, 10, 7); __PYX_ERR(0, 849, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  8:
        if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dT_dphi)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("involute_heat_transfer", 1, 10, 10, 8); __PYX_ERR(0, 849, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  9:
        if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_phim)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("involute_heat_transfer", 1, 10, 10, 9); __PYX_ERR(0, 849, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "involute_heat_transfer") < 0)) __PYX_ERR(0, 849, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 10) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
      values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
      values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
      values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
      values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
    }
    __pyx_v_hc = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_hc == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 849, __pyx_L3_error)
    __pyx_v_hs = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_hs == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 849, __pyx_L3_error)
    __pyx_v_rb = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_rb == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 849, __pyx_L3_error)
    __pyx_v_phi1 = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_phi1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 850, __pyx_L3_error)
    __pyx_v_phi2 = __pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_phi2 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 850, __pyx_L3_error)
    __pyx_v_phi0 = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_phi0 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 850, __pyx_L3_error)
    __pyx_v_T_scroll = __pyx_PyFloat_AsDouble(values[6]); if (unlikely((__pyx_v_T_scroll == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 851, __pyx_L3_error)
    __pyx_v_T_CV = __pyx_PyFloat_AsDouble(values[7]); if (unlikely((__pyx_v_T_CV == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 851, __pyx_L3_error)
    __pyx_v_dT_dphi = __pyx_PyFloat_AsDouble(values[8]); if (unlikely((__pyx_v_dT_dphi == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 851, __pyx_L3_error)
    __pyx_v_phim = __pyx_PyFloat_AsDouble(values[9]); if (unlikely((__pyx_v_phim == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 852, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("involute_heat_transfer", 1, 10, 10, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 849, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.involute_heat_transfer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_52involute_heat_transfer(__pyx_self, __pyx_v_hc, __pyx_v_hs, __pyx_v_rb, __pyx_v_phi1, __pyx_v_phi2, __pyx_v_phi0, __pyx_v_T_scroll, __pyx_v_T_CV, __pyx_v_dT_dphi, __pyx_v_phim);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_52involute_heat_transfer(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_hc, double __pyx_v_hs, double __pyx_v_rb, double __pyx_v_phi1, double __pyx_v_phi2, double __pyx_v_phi0, double __pyx_v_T_scroll, double __pyx_v_T_CV, double __pyx_v_dT_dphi, double __pyx_v_phim) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("involute_heat_transfer", 0);
  __Pyx_TraceCall("involute_heat_transfer (wrapper)", __pyx_f[0], 849, 0, __PYX_ERR(0, 849, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_f_5PDSim_6scroll_17common_scroll_geo_involute_heat_transfer(__pyx_v_hc, __pyx_v_hs, __pyx_v_rb, __pyx_v_phi1, __pyx_v_phi2, __pyx_v_phi0, __pyx_v_T_scroll, __pyx_v_T_CV, __pyx_v_dT_dphi, __pyx_v_phim, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 849, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.involute_heat_transfer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_VdVstruct(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0x7af38ca:
 *         from pickle import PickleError as __pyx_PickleError
 */

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_61__pyx_unpickle_VdVstruct(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5PDSim_6scroll_17common_scroll_geo_60__pyx_unpickle_VdVstruct[] = "__pyx_unpickle_VdVstruct(__pyx_type, long __pyx_checksum, __pyx_state)";
static PyMethodDef __pyx_mdef_5PDSim_6scroll_17common_scroll_geo_61__pyx_unpickle_VdVstruct = {"__pyx_unpickle_VdVstruct", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5PDSim_6scroll_17common_scroll_geo_61__pyx_unpickle_VdVstruct, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5PDSim_6scroll_17common_scroll_geo_60__pyx_unpickle_VdVstruct};
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_61__pyx_unpickle_VdVstruct(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_VdVstruct (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_VdVstruct", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_VdVstruct", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_VdVstruct") < 0)) __PYX_ERR(2, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_VdVstruct", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.__pyx_unpickle_VdVstruct", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_60__pyx_unpickle_VdVstruct(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_60__pyx_unpickle_VdVstruct(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = NULL;
  PyObject *__pyx_v___pyx_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  __Pyx_TraceFrameInit(__pyx_codeobj__21)
  __Pyx_RefNannySetupContext("__pyx_unpickle_VdVstruct", 0);
  __Pyx_TraceCall("__pyx_unpickle_VdVstruct", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __pyx_unpickle_VdVstruct(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0x7af38ca:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x7af38ca = (V, dV))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x7af38ca) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":3
 * def __pyx_unpickle_VdVstruct(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0x7af38ca:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x7af38ca = (V, dV))" % __pyx_checksum)
 *     __pyx_result = VdVstruct.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":4
 *     if __pyx_checksum != 0x7af38ca:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x7af38ca = (V, dV))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = VdVstruct.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x7a, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(2, 4, __pyx_L1_error)

    /* "(tree fragment)":2
 * def __pyx_unpickle_VdVstruct(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0x7af38ca:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x7af38ca = (V, dV))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":5
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x7af38ca = (V, dV))" % __pyx_checksum)
 *     __pyx_result = VdVstruct.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_VdVstruct__set_state(<VdVstruct> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5PDSim_6scroll_17common_scroll_geo_VdVstruct), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v___pyx_result = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "(tree fragment)":6
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x7af38ca = (V, dV))" % __pyx_checksum)
 *     __pyx_result = VdVstruct.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_VdVstruct__set_state(<VdVstruct> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":7
 *     __pyx_result = VdVstruct.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_VdVstruct__set_state(<VdVstruct> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_VdVstruct__set_state(VdVstruct __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 7, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_5PDSim_6scroll_17common_scroll_geo___pyx_unpickle_VdVstruct__set_state(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_VdVstruct *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x7af38ca = (V, dV))" % __pyx_checksum)
 *     __pyx_result = VdVstruct.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_VdVstruct__set_state(<VdVstruct> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":8
 *     if __pyx_state is not None:
 *         __pyx_unpickle_VdVstruct__set_state(<VdVstruct> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_VdVstruct__set_state(VdVstruct __pyx_result, tuple __pyx_state):
 *     __pyx_result.V = __pyx_state[0]; __pyx_result.dV = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_VdVstruct(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0x7af38ca:
 *         from pickle import PickleError as __pyx_PickleError
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.__pyx_unpickle_VdVstruct", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":9
 *         __pyx_unpickle_VdVstruct__set_state(<VdVstruct> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_VdVstruct__set_state(VdVstruct __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.V = __pyx_state[0]; __pyx_result.dV = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_5PDSim_6scroll_17common_scroll_geo___pyx_unpickle_VdVstruct__set_state(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_VdVstruct *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  double __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("__pyx_unpickle_VdVstruct__set_state", 0);
  __Pyx_TraceCall("__pyx_unpickle_VdVstruct__set_state", __pyx_f[2], 9, 0, __PYX_ERR(2, 9, __pyx_L1_error));

  /* "(tree fragment)":10
 *     return __pyx_result
 * cdef __pyx_unpickle_VdVstruct__set_state(VdVstruct __pyx_result, tuple __pyx_state):
 *     __pyx_result.V = __pyx_state[0]; __pyx_result.dV = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 10, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_2 == (double)-1) && PyErr_Occurred())) __PYX_ERR(2, 10, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->V = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 10, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_2 == (double)-1) && PyErr_Occurred())) __PYX_ERR(2, 10, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->dV = __pyx_t_2;

  /* "(tree fragment)":11
 * cdef __pyx_unpickle_VdVstruct__set_state(VdVstruct __pyx_result, tuple __pyx_state):
 *     __pyx_result.V = __pyx_state[0]; __pyx_result.dV = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(2, 11, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(2, 11, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 2) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(2, 11, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":12
 *     __pyx_result.V = __pyx_state[0]; __pyx_result.dV = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 12, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 12, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(2, 12, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 12, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":11
 * cdef __pyx_unpickle_VdVstruct__set_state(VdVstruct __pyx_result, tuple __pyx_state):
 *     __pyx_result.V = __pyx_state[0]; __pyx_result.dV = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":9
 *         __pyx_unpickle_VdVstruct__set_state(<VdVstruct> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_VdVstruct__set_state(VdVstruct __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.V = __pyx_state[0]; __pyx_result.dV = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.__pyx_unpickle_VdVstruct__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_HTAnglesClass(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0xbd74d76:
 *         from pickle import PickleError as __pyx_PickleError
 */

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_63__pyx_unpickle_HTAnglesClass(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5PDSim_6scroll_17common_scroll_geo_62__pyx_unpickle_HTAnglesClass[] = "__pyx_unpickle_HTAnglesClass(__pyx_type, long __pyx_checksum, __pyx_state)";
static PyMethodDef __pyx_mdef_5PDSim_6scroll_17common_scroll_geo_63__pyx_unpickle_HTAnglesClass = {"__pyx_unpickle_HTAnglesClass", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5PDSim_6scroll_17common_scroll_geo_63__pyx_unpickle_HTAnglesClass, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5PDSim_6scroll_17common_scroll_geo_62__pyx_unpickle_HTAnglesClass};
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_63__pyx_unpickle_HTAnglesClass(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_HTAnglesClass (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_HTAnglesClass", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_HTAnglesClass", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_HTAnglesClass") < 0)) __PYX_ERR(2, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_HTAnglesClass", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.__pyx_unpickle_HTAnglesClass", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_62__pyx_unpickle_HTAnglesClass(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_62__pyx_unpickle_HTAnglesClass(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = NULL;
  PyObject *__pyx_v___pyx_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  __Pyx_TraceFrameInit(__pyx_codeobj__22)
  __Pyx_RefNannySetupContext("__pyx_unpickle_HTAnglesClass", 0);
  __Pyx_TraceCall("__pyx_unpickle_HTAnglesClass", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __pyx_unpickle_HTAnglesClass(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0xbd74d76:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xbd74d76 = (phi_1_i, phi_1_o, phi_2_i, phi_2_o, phi_i0, phi_o0))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xbd74d76) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":3
 * def __pyx_unpickle_HTAnglesClass(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0xbd74d76:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xbd74d76 = (phi_1_i, phi_1_o, phi_2_i, phi_2_o, phi_i0, phi_o0))" % __pyx_checksum)
 *     __pyx_result = HTAnglesClass.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":4
 *     if __pyx_checksum != 0xbd74d76:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xbd74d76 = (phi_1_i, phi_1_o, phi_2_i, phi_2_o, phi_i0, phi_o0))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = HTAnglesClass.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xbd, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(2, 4, __pyx_L1_error)

    /* "(tree fragment)":2
 * def __pyx_unpickle_HTAnglesClass(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0xbd74d76:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xbd74d76 = (phi_1_i, phi_1_o, phi_2_i, phi_2_o, phi_i0, phi_o0))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":5
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xbd74d76 = (phi_1_i, phi_1_o, phi_2_i, phi_2_o, phi_i0, phi_o0))" % __pyx_checksum)
 *     __pyx_result = HTAnglesClass.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_HTAnglesClass__set_state(<HTAnglesClass> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v___pyx_result = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "(tree fragment)":6
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xbd74d76 = (phi_1_i, phi_1_o, phi_2_i, phi_2_o, phi_i0, phi_o0))" % __pyx_checksum)
 *     __pyx_result = HTAnglesClass.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_HTAnglesClass__set_state(<HTAnglesClass> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":7
 *     __pyx_result = HTAnglesClass.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_HTAnglesClass__set_state(<HTAnglesClass> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_HTAnglesClass__set_state(HTAnglesClass __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 7, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_5PDSim_6scroll_17common_scroll_geo___pyx_unpickle_HTAnglesClass__set_state(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xbd74d76 = (phi_1_i, phi_1_o, phi_2_i, phi_2_o, phi_i0, phi_o0))" % __pyx_checksum)
 *     __pyx_result = HTAnglesClass.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_HTAnglesClass__set_state(<HTAnglesClass> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":8
 *     if __pyx_state is not None:
 *         __pyx_unpickle_HTAnglesClass__set_state(<HTAnglesClass> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_HTAnglesClass__set_state(HTAnglesClass __pyx_result, tuple __pyx_state):
 *     __pyx_result.phi_1_i = __pyx_state[0]; __pyx_result.phi_1_o = __pyx_state[1]; __pyx_result.phi_2_i = __pyx_state[2]; __pyx_result.phi_2_o = __pyx_state[3]; __pyx_result.phi_i0 = __pyx_state[4]; __pyx_result.phi_o0 = __pyx_state[5]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_HTAnglesClass(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0xbd74d76:
 *         from pickle import PickleError as __pyx_PickleError
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.__pyx_unpickle_HTAnglesClass", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":9
 *         __pyx_unpickle_HTAnglesClass__set_state(<HTAnglesClass> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_HTAnglesClass__set_state(HTAnglesClass __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.phi_1_i = __pyx_state[0]; __pyx_result.phi_1_o = __pyx_state[1]; __pyx_result.phi_2_i = __pyx_state[2]; __pyx_result.phi_2_o = __pyx_state[3]; __pyx_result.phi_i0 = __pyx_state[4]; __pyx_result.phi_o0 = __pyx_state[5]
 *     if len(__pyx_state) > 6 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_5PDSim_6scroll_17common_scroll_geo___pyx_unpickle_HTAnglesClass__set_state(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  double __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("__pyx_unpickle_HTAnglesClass__set_state", 0);
  __Pyx_TraceCall("__pyx_unpickle_HTAnglesClass__set_state", __pyx_f[2], 9, 0, __PYX_ERR(2, 9, __pyx_L1_error));

  /* "(tree fragment)":10
 *     return __pyx_result
 * cdef __pyx_unpickle_HTAnglesClass__set_state(HTAnglesClass __pyx_result, tuple __pyx_state):
 *     __pyx_result.phi_1_i = __pyx_state[0]; __pyx_result.phi_1_o = __pyx_state[1]; __pyx_result.phi_2_i = __pyx_state[2]; __pyx_result.phi_2_o = __pyx_state[3]; __pyx_result.phi_i0 = __pyx_state[4]; __pyx_result.phi_o0 = __pyx_state[5]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 6 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[6])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 10, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_2 == (double)-1) && PyErr_Occurred())) __PYX_ERR(2, 10, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->phi_1_i = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 10, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_2 == (double)-1) && PyErr_Occurred())) __PYX_ERR(2, 10, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->phi_1_o = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 10, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_2 == (double)-1) && PyErr_Occurred())) __PYX_ERR(2, 10, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->phi_2_i = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 10, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_2 == (double)-1) && PyErr_Occurred())) __PYX_ERR(2, 10, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->phi_2_o = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 10, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_2 == (double)-1) && PyErr_Occurred())) __PYX_ERR(2, 10, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->phi_i0 = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 10, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_2 == (double)-1) && PyErr_Occurred())) __PYX_ERR(2, 10, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->phi_o0 = __pyx_t_2;

  /* "(tree fragment)":11
 * cdef __pyx_unpickle_HTAnglesClass__set_state(HTAnglesClass __pyx_result, tuple __pyx_state):
 *     __pyx_result.phi_1_i = __pyx_state[0]; __pyx_result.phi_1_o = __pyx_state[1]; __pyx_result.phi_2_i = __pyx_state[2]; __pyx_result.phi_2_o = __pyx_state[3]; __pyx_result.phi_i0 = __pyx_state[4]; __pyx_result.phi_o0 = __pyx_state[5]
 *     if len(__pyx_state) > 6 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[6])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(2, 11, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(2, 11, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 6) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(2, 11, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":12
 *     __pyx_result.phi_1_i = __pyx_state[0]; __pyx_result.phi_1_o = __pyx_state[1]; __pyx_result.phi_2_i = __pyx_state[2]; __pyx_result.phi_2_o = __pyx_state[3]; __pyx_result.phi_i0 = __pyx_state[4]; __pyx_result.phi_o0 = __pyx_state[5]
 *     if len(__pyx_state) > 6 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[6])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 12, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 12, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(2, 12, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 12, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":11
 * cdef __pyx_unpickle_HTAnglesClass__set_state(HTAnglesClass __pyx_result, tuple __pyx_state):
 *     __pyx_result.phi_1_i = __pyx_state[0]; __pyx_result.phi_1_o = __pyx_state[1]; __pyx_result.phi_2_i = __pyx_state[2]; __pyx_result.phi_2_o = __pyx_state[3]; __pyx_result.phi_i0 = __pyx_state[4]; __pyx_result.phi_o0 = __pyx_state[5]
 *     if len(__pyx_state) > 6 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[6])
 */
  }

  /* "(tree fragment)":9
 *         __pyx_unpickle_HTAnglesClass__set_state(<HTAnglesClass> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_HTAnglesClass__set_state(HTAnglesClass __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.phi_1_i = __pyx_state[0]; __pyx_result.phi_1_o = __pyx_state[1]; __pyx_result.phi_2_i = __pyx_state[2]; __pyx_result.phi_2_o = __pyx_state[3]; __pyx_result.phi_i0 = __pyx_state[4]; __pyx_result.phi_o0 = __pyx_state[5]
 *     if len(__pyx_state) > 6 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.__pyx_unpickle_HTAnglesClass__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_CVInvolute(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0x78aa620:
 *         from pickle import PickleError as __pyx_PickleError
 */

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_65__pyx_unpickle_CVInvolute(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5PDSim_6scroll_17common_scroll_geo_64__pyx_unpickle_CVInvolute[] = "__pyx_unpickle_CVInvolute(__pyx_type, long __pyx_checksum, __pyx_state)";
static PyMethodDef __pyx_mdef_5PDSim_6scroll_17common_scroll_geo_65__pyx_unpickle_CVInvolute = {"__pyx_unpickle_CVInvolute", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5PDSim_6scroll_17common_scroll_geo_65__pyx_unpickle_CVInvolute, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5PDSim_6scroll_17common_scroll_geo_64__pyx_unpickle_CVInvolute};
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_65__pyx_unpickle_CVInvolute(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_CVInvolute (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_CVInvolute", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_CVInvolute", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_CVInvolute") < 0)) __PYX_ERR(2, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_CVInvolute", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.__pyx_unpickle_CVInvolute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_64__pyx_unpickle_CVInvolute(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_64__pyx_unpickle_CVInvolute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = NULL;
  PyObject *__pyx_v___pyx_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  __Pyx_TraceFrameInit(__pyx_codeobj__23)
  __Pyx_RefNannySetupContext("__pyx_unpickle_CVInvolute", 0);
  __Pyx_TraceCall("__pyx_unpickle_CVInvolute", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __pyx_unpickle_CVInvolute(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0x78aa620:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x78aa620 = (dphi_max_dtheta, dphi_min_dtheta, involute, phi_0, phi_max, phi_min))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x78aa620) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":3
 * def __pyx_unpickle_CVInvolute(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0x78aa620:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x78aa620 = (dphi_max_dtheta, dphi_min_dtheta, involute, phi_0, phi_max, phi_min))" % __pyx_checksum)
 *     __pyx_result = CVInvolute.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":4
 *     if __pyx_checksum != 0x78aa620:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x78aa620 = (dphi_max_dtheta, dphi_min_dtheta, involute, phi_0, phi_max, phi_min))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = CVInvolute.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x78, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(2, 4, __pyx_L1_error)

    /* "(tree fragment)":2
 * def __pyx_unpickle_CVInvolute(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0x78aa620:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x78aa620 = (dphi_max_dtheta, dphi_min_dtheta, involute, phi_0, phi_max, phi_min))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":5
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x78aa620 = (dphi_max_dtheta, dphi_min_dtheta, involute, phi_0, phi_max, phi_min))" % __pyx_checksum)
 *     __pyx_result = CVInvolute.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_CVInvolute__set_state(<CVInvolute> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5PDSim_6scroll_17common_scroll_geo_CVInvolute), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v___pyx_result = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "(tree fragment)":6
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x78aa620 = (dphi_max_dtheta, dphi_min_dtheta, involute, phi_0, phi_max, phi_min))" % __pyx_checksum)
 *     __pyx_result = CVInvolute.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_CVInvolute__set_state(<CVInvolute> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":7
 *     __pyx_result = CVInvolute.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_CVInvolute__set_state(<CVInvolute> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_CVInvolute__set_state(CVInvolute __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 7, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_5PDSim_6scroll_17common_scroll_geo___pyx_unpickle_CVInvolute__set_state(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x78aa620 = (dphi_max_dtheta, dphi_min_dtheta, involute, phi_0, phi_max, phi_min))" % __pyx_checksum)
 *     __pyx_result = CVInvolute.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_CVInvolute__set_state(<CVInvolute> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":8
 *     if __pyx_state is not None:
 *         __pyx_unpickle_CVInvolute__set_state(<CVInvolute> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_CVInvolute__set_state(CVInvolute __pyx_result, tuple __pyx_state):
 *     __pyx_result.dphi_max_dtheta = __pyx_state[0]; __pyx_result.dphi_min_dtheta = __pyx_state[1]; __pyx_result.involute = __pyx_state[2]; __pyx_result.phi_0 = __pyx_state[3]; __pyx_result.phi_max = __pyx_state[4]; __pyx_result.phi_min = __pyx_state[5]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_CVInvolute(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0x78aa620:
 *         from pickle import PickleError as __pyx_PickleError
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.__pyx_unpickle_CVInvolute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":9
 *         __pyx_unpickle_CVInvolute__set_state(<CVInvolute> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_CVInvolute__set_state(CVInvolute __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.dphi_max_dtheta = __pyx_state[0]; __pyx_result.dphi_min_dtheta = __pyx_state[1]; __pyx_result.involute = __pyx_state[2]; __pyx_result.phi_0 = __pyx_state[3]; __pyx_result.phi_max = __pyx_state[4]; __pyx_result.phi_min = __pyx_state[5]
 *     if len(__pyx_state) > 6 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_5PDSim_6scroll_17common_scroll_geo___pyx_unpickle_CVInvolute__set_state(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  double __pyx_t_2;
  enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  __Pyx_RefNannySetupContext("__pyx_unpickle_CVInvolute__set_state", 0);
  __Pyx_TraceCall("__pyx_unpickle_CVInvolute__set_state", __pyx_f[2], 9, 0, __PYX_ERR(2, 9, __pyx_L1_error));

  /* "(tree fragment)":10
 *     return __pyx_result
 * cdef __pyx_unpickle_CVInvolute__set_state(CVInvolute __pyx_result, tuple __pyx_state):
 *     __pyx_result.dphi_max_dtheta = __pyx_state[0]; __pyx_result.dphi_min_dtheta = __pyx_state[1]; __pyx_result.involute = __pyx_state[2]; __pyx_result.phi_0 = __pyx_state[3]; __pyx_result.phi_max = __pyx_state[4]; __pyx_result.phi_min = __pyx_state[5]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 6 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[6])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 10, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_2 == (double)-1) && PyErr_Occurred())) __PYX_ERR(2, 10, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->dphi_max_dtheta = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 10, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_2 == (double)-1) && PyErr_Occurred())) __PYX_ERR(2, 10, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->dphi_min_dtheta = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 10, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = ((enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index)__Pyx_PyInt_As_enum____pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 10, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->involute = __pyx_t_3;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 10, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_2 == (double)-1) && PyErr_Occurred())) __PYX_ERR(2, 10, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->phi_0 = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 10, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_2 == (double)-1) && PyErr_Occurred())) __PYX_ERR(2, 10, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->phi_max = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 10, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_2 == (double)-1) && PyErr_Occurred())) __PYX_ERR(2, 10, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->phi_min = __pyx_t_2;

  /* "(tree fragment)":11
 * cdef __pyx_unpickle_CVInvolute__set_state(CVInvolute __pyx_result, tuple __pyx_state):
 *     __pyx_result.dphi_max_dtheta = __pyx_state[0]; __pyx_result.dphi_min_dtheta = __pyx_state[1]; __pyx_result.involute = __pyx_state[2]; __pyx_result.phi_0 = __pyx_state[3]; __pyx_result.phi_max = __pyx_state[4]; __pyx_result.phi_min = __pyx_state[5]
 *     if len(__pyx_state) > 6 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[6])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(2, 11, __pyx_L1_error)
  }
  __pyx_t_5 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(2, 11, __pyx_L1_error)
  __pyx_t_6 = ((__pyx_t_5 > 6) != 0);
  if (__pyx_t_6) {
  } else {
    __pyx_t_4 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_6 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(2, 11, __pyx_L1_error)
  __pyx_t_7 = (__pyx_t_6 != 0);
  __pyx_t_4 = __pyx_t_7;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_4) {

    /* "(tree fragment)":12
 *     __pyx_result.dphi_max_dtheta = __pyx_state[0]; __pyx_result.dphi_min_dtheta = __pyx_state[1]; __pyx_result.involute = __pyx_state[2]; __pyx_result.phi_0 = __pyx_state[3]; __pyx_result.phi_max = __pyx_state[4]; __pyx_result.phi_min = __pyx_state[5]
 *     if len(__pyx_state) > 6 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[6])             # <<<<<<<<<<<<<<
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 12, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_update); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 12, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(2, 12, __pyx_L1_error)
    }
    __pyx_t_8 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 12, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_10 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_10)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
      }
    }
    __pyx_t_1 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_10, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_8);
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":11
 * cdef __pyx_unpickle_CVInvolute__set_state(CVInvolute __pyx_result, tuple __pyx_state):
 *     __pyx_result.dphi_max_dtheta = __pyx_state[0]; __pyx_result.dphi_min_dtheta = __pyx_state[1]; __pyx_result.involute = __pyx_state[2]; __pyx_result.phi_0 = __pyx_state[3]; __pyx_result.phi_max = __pyx_state[4]; __pyx_result.phi_min = __pyx_state[5]
 *     if len(__pyx_state) > 6 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[6])
 */
  }

  /* "(tree fragment)":9
 *         __pyx_unpickle_CVInvolute__set_state(<CVInvolute> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_CVInvolute__set_state(CVInvolute __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.dphi_max_dtheta = __pyx_state[0]; __pyx_result.dphi_min_dtheta = __pyx_state[1]; __pyx_result.involute = __pyx_state[2]; __pyx_result.phi_0 = __pyx_state[3]; __pyx_result.phi_max = __pyx_state[4]; __pyx_result.phi_min = __pyx_state[5]
 *     if len(__pyx_state) > 6 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.__pyx_unpickle_CVInvolute__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_CVInvolutes(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0xbb57980:
 *         from pickle import PickleError as __pyx_PickleError
 */

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_67__pyx_unpickle_CVInvolutes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5PDSim_6scroll_17common_scroll_geo_66__pyx_unpickle_CVInvolutes[] = "__pyx_unpickle_CVInvolutes(__pyx_type, long __pyx_checksum, __pyx_state)";
static PyMethodDef __pyx_mdef_5PDSim_6scroll_17common_scroll_geo_67__pyx_unpickle_CVInvolutes = {"__pyx_unpickle_CVInvolutes", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5PDSim_6scroll_17common_scroll_geo_67__pyx_unpickle_CVInvolutes, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5PDSim_6scroll_17common_scroll_geo_66__pyx_unpickle_CVInvolutes};
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_67__pyx_unpickle_CVInvolutes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_CVInvolutes (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_CVInvolutes", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_CVInvolutes", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_CVInvolutes") < 0)) __PYX_ERR(2, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_CVInvolutes", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.__pyx_unpickle_CVInvolutes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_66__pyx_unpickle_CVInvolutes(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_66__pyx_unpickle_CVInvolutes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = NULL;
  PyObject *__pyx_v___pyx_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  __Pyx_TraceFrameInit(__pyx_codeobj__24)
  __Pyx_RefNannySetupContext("__pyx_unpickle_CVInvolutes", 0);
  __Pyx_TraceCall("__pyx_unpickle_CVInvolutes", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __pyx_unpickle_CVInvolutes(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0xbb57980:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xbb57980 = (Inner, Outer, has_line_1, has_line_2))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xbb57980) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":3
 * def __pyx_unpickle_CVInvolutes(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0xbb57980:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xbb57980 = (Inner, Outer, has_line_1, has_line_2))" % __pyx_checksum)
 *     __pyx_result = CVInvolutes.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":4
 *     if __pyx_checksum != 0xbb57980:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xbb57980 = (Inner, Outer, has_line_1, has_line_2))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = CVInvolutes.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xbb, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(2, 4, __pyx_L1_error)

    /* "(tree fragment)":2
 * def __pyx_unpickle_CVInvolutes(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0xbb57980:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xbb57980 = (Inner, Outer, has_line_1, has_line_2))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":5
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xbb57980 = (Inner, Outer, has_line_1, has_line_2))" % __pyx_checksum)
 *     __pyx_result = CVInvolutes.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_CVInvolutes__set_state(<CVInvolutes> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5PDSim_6scroll_17common_scroll_geo_CVInvolutes), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v___pyx_result = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "(tree fragment)":6
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xbb57980 = (Inner, Outer, has_line_1, has_line_2))" % __pyx_checksum)
 *     __pyx_result = CVInvolutes.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_CVInvolutes__set_state(<CVInvolutes> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":7
 *     __pyx_result = CVInvolutes.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_CVInvolutes__set_state(<CVInvolutes> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_CVInvolutes__set_state(CVInvolutes __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 7, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_5PDSim_6scroll_17common_scroll_geo___pyx_unpickle_CVInvolutes__set_state(((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xbb57980 = (Inner, Outer, has_line_1, has_line_2))" % __pyx_checksum)
 *     __pyx_result = CVInvolutes.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_CVInvolutes__set_state(<CVInvolutes> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":8
 *     if __pyx_state is not None:
 *         __pyx_unpickle_CVInvolutes__set_state(<CVInvolutes> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_CVInvolutes__set_state(CVInvolutes __pyx_result, tuple __pyx_state):
 *     __pyx_result.Inner = __pyx_state[0]; __pyx_result.Outer = __pyx_state[1]; __pyx_result.has_line_1 = __pyx_state[2]; __pyx_result.has_line_2 = __pyx_state[3]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_CVInvolutes(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0xbb57980:
 *         from pickle import PickleError as __pyx_PickleError
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.__pyx_unpickle_CVInvolutes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":9
 *         __pyx_unpickle_CVInvolutes__set_state(<CVInvolutes> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_CVInvolutes__set_state(CVInvolutes __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.Inner = __pyx_state[0]; __pyx_result.Outer = __pyx_state[1]; __pyx_result.has_line_1 = __pyx_state[2]; __pyx_result.has_line_2 = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_5PDSim_6scroll_17common_scroll_geo___pyx_unpickle_CVInvolutes__set_state(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("__pyx_unpickle_CVInvolutes__set_state", 0);
  __Pyx_TraceCall("__pyx_unpickle_CVInvolutes__set_state", __pyx_f[2], 9, 0, __PYX_ERR(2, 9, __pyx_L1_error));

  /* "(tree fragment)":10
 *     return __pyx_result
 * cdef __pyx_unpickle_CVInvolutes__set_state(CVInvolutes __pyx_result, tuple __pyx_state):
 *     __pyx_result.Inner = __pyx_state[0]; __pyx_result.Outer = __pyx_state[1]; __pyx_result.has_line_1 = __pyx_state[2]; __pyx_result.has_line_2 = __pyx_state[3]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[4])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 10, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5PDSim_6scroll_17common_scroll_geo_CVInvolute))))) __PYX_ERR(2, 10, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->Inner);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->Inner));
  __pyx_v___pyx_result->Inner = ((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 10, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5PDSim_6scroll_17common_scroll_geo_CVInvolute))))) __PYX_ERR(2, 10, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->Outer);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->Outer));
  __pyx_v___pyx_result->Outer = ((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 10, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 10, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->has_line_1 = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 10, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 10, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->has_line_2 = __pyx_t_2;

  /* "(tree fragment)":11
 * cdef __pyx_unpickle_CVInvolutes__set_state(CVInvolutes __pyx_result, tuple __pyx_state):
 *     __pyx_result.Inner = __pyx_state[0]; __pyx_result.Outer = __pyx_state[1]; __pyx_result.has_line_1 = __pyx_state[2]; __pyx_result.has_line_2 = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[4])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(2, 11, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(2, 11, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 4) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 11, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":12
 *     __pyx_result.Inner = __pyx_state[0]; __pyx_result.Outer = __pyx_state[1]; __pyx_result.has_line_1 = __pyx_state[2]; __pyx_result.has_line_2 = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[4])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 12, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 12, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(2, 12, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 12, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":11
 * cdef __pyx_unpickle_CVInvolutes__set_state(CVInvolutes __pyx_result, tuple __pyx_state):
 *     __pyx_result.Inner = __pyx_state[0]; __pyx_result.Outer = __pyx_state[1]; __pyx_result.has_line_1 = __pyx_state[2]; __pyx_result.has_line_2 = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[4])
 */
  }

  /* "(tree fragment)":9
 *         __pyx_unpickle_CVInvolutes__set_state(<CVInvolutes> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_CVInvolutes__set_state(CVInvolutes __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.Inner = __pyx_state[0]; __pyx_result.Outer = __pyx_state[1]; __pyx_result.has_line_1 = __pyx_state[2]; __pyx_result.has_line_2 = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.__pyx_unpickle_CVInvolutes__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pxd":141
 * cpdef long get_compression_chamber_index(long path, long alpha)
 * 
 * cdef inline bint matchpair(long key1, long key2, long target1, long target2):             # <<<<<<<<<<<<<<
 *     return (key1 == target1 and key2 == target2) or (key2 == target1 and key1 == target2)
 * 
 */

static CYTHON_INLINE int __pyx_f_5PDSim_6scroll_17common_scroll_geo_matchpair(long __pyx_v_key1, long __pyx_v_key2, long __pyx_v_target1, long __pyx_v_target2) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("matchpair", 0);
  __Pyx_TraceCall("matchpair", __pyx_f[1], 141, 0, __PYX_ERR(1, 141, __pyx_L1_error));

  /* "PDSim/scroll/common_scroll_geo.pxd":142
 * 
 * cdef inline bint matchpair(long key1, long key2, long target1, long target2):
 *     return (key1 == target1 and key2 == target2) or (key2 == target1 and key1 == target2)             # <<<<<<<<<<<<<<
 * 
 * cpdef inline double min2(double a, double b):
 */
  __pyx_t_2 = ((__pyx_v_key1 == __pyx_v_target1) != 0);
  if (!__pyx_t_2) {
    goto __pyx_L4_next_or;
  } else {
  }
  __pyx_t_2 = ((__pyx_v_key2 == __pyx_v_target2) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_L4_next_or:;
  __pyx_t_2 = ((__pyx_v_key2 == __pyx_v_target1) != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_key1 == __pyx_v_target2) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "PDSim/scroll/common_scroll_geo.pxd":141
 * cpdef long get_compression_chamber_index(long path, long alpha)
 * 
 * cdef inline bint matchpair(long key1, long key2, long target1, long target2):             # <<<<<<<<<<<<<<
 *     return (key1 == target1 and key2 == target2) or (key2 == target1 and key1 == target2)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("PDSim.scroll.common_scroll_geo.matchpair", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pxd":144
 *     return (key1 == target1 and key2 == target2) or (key2 == target1 and key1 == target2)
 * 
 * cpdef inline double min2(double a, double b):             # <<<<<<<<<<<<<<
 *     return a if a<b else b
 * 
 */

static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_1min2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static CYTHON_INLINE double __pyx_f_5PDSim_6scroll_17common_scroll_geo_min2(double __pyx_v_a, double __pyx_v_b, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("min2", 0);
  __Pyx_TraceCall("min2", __pyx_f[1], 144, 0, __PYX_ERR(1, 144, __pyx_L1_error));

  /* "PDSim/scroll/common_scroll_geo.pxd":145
 * 
 * cpdef inline double min2(double a, double b):
 *     return a if a<b else b             # <<<<<<<<<<<<<<
 * 
 * cpdef inline double max2(double a, double b):
 */
  if (((__pyx_v_a < __pyx_v_b) != 0)) {
    __pyx_t_1 = __pyx_v_a;
  } else {
    __pyx_t_1 = __pyx_v_b;
  }
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "PDSim/scroll/common_scroll_geo.pxd":144
 *     return (key1 == target1 and key2 == target2) or (key2 == target1 and key1 == target2)
 * 
 * cpdef inline double min2(double a, double b):             # <<<<<<<<<<<<<<
 *     return a if a<b else b
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("PDSim.scroll.common_scroll_geo.min2", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_1min2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5PDSim_6scroll_17common_scroll_geo_min2[] = "min2(double a, double b) -> double";
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_1min2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_a;
  double __pyx_v_b;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("min2 (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_a,&__pyx_n_s_b,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("min2", 1, 2, 2, 1); __PYX_ERR(1, 144, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "min2") < 0)) __PYX_ERR(1, 144, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_a = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_a == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 144, __pyx_L3_error)
    __pyx_v_b = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_b == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 144, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("min2", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 144, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.min2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_min2(__pyx_self, __pyx_v_a, __pyx_v_b);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_min2(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_a, double __pyx_v_b) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("min2", 0);
  __Pyx_TraceCall("min2 (wrapper)", __pyx_f[1], 144, 0, __PYX_ERR(1, 144, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_f_5PDSim_6scroll_17common_scroll_geo_min2(__pyx_v_a, __pyx_v_b, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.min2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "PDSim/scroll/common_scroll_geo.pxd":147
 *     return a if a<b else b
 * 
 * cpdef inline double max2(double a, double b):             # <<<<<<<<<<<<<<
 *     return a if a>b else b
 * 
 */

static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_3max2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static CYTHON_INLINE double __pyx_f_5PDSim_6scroll_17common_scroll_geo_max2(double __pyx_v_a, double __pyx_v_b, CYTHON_UNUSED int __pyx_skip_dispatch) {
  double __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("max2", 0);
  __Pyx_TraceCall("max2", __pyx_f[1], 147, 0, __PYX_ERR(1, 147, __pyx_L1_error));

  /* "PDSim/scroll/common_scroll_geo.pxd":148
 * 
 * cpdef inline double max2(double a, double b):
 *     return a if a>b else b             # <<<<<<<<<<<<<<
 * 
 * cpdef double_or_numpy plus_one(double_or_numpy x)
 */
  if (((__pyx_v_a > __pyx_v_b) != 0)) {
    __pyx_t_1 = __pyx_v_a;
  } else {
    __pyx_t_1 = __pyx_v_b;
  }
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "PDSim/scroll/common_scroll_geo.pxd":147
 *     return a if a<b else b
 * 
 * cpdef inline double max2(double a, double b):             # <<<<<<<<<<<<<<
 *     return a if a>b else b
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("PDSim.scroll.common_scroll_geo.max2", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_3max2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5PDSim_6scroll_17common_scroll_geo_2max2[] = "max2(double a, double b) -> double";
static PyObject *__pyx_pw_5PDSim_6scroll_17common_scroll_geo_3max2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_a;
  double __pyx_v_b;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("max2 (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_a,&__pyx_n_s_b,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("max2", 1, 2, 2, 1); __PYX_ERR(1, 147, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "max2") < 0)) __PYX_ERR(1, 147, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_a = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_a == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 147, __pyx_L3_error)
    __pyx_v_b = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_b == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 147, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("max2", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 147, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.max2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5PDSim_6scroll_17common_scroll_geo_2max2(__pyx_self, __pyx_v_a, __pyx_v_b);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5PDSim_6scroll_17common_scroll_geo_2max2(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_a, double __pyx_v_b) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("max2", 0);
  __Pyx_TraceCall("max2 (wrapper)", __pyx_f[1], 147, 0, __PYX_ERR(1, 147, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_f_5PDSim_6scroll_17common_scroll_geo_max2(__pyx_v_a, __pyx_v_b, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("PDSim.scroll.common_scroll_geo.max2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":258
 *         # experimental exception made for __getbuffer__ and __releasebuffer__
 *         # -- the details of this may change.
 *         def __getbuffer__(ndarray self, Py_buffer* info, int flags):             # <<<<<<<<<<<<<<
 *             # This implementation of getbuffer is geared towards Cython
 *             # requirements, and does not yet fulfill the PEP.
 */

/* Python wrapper */
static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5numpy_7ndarray___getbuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
  int __pyx_v_i;
  int __pyx_v_ndim;
  int __pyx_v_endian_detector;
  int __pyx_v_little_endian;
  int __pyx_v_t;
  char *__pyx_v_f;
  PyArray_Descr *__pyx_v_descr = 0;
  int __pyx_v_offset;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyArray_Descr *__pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  char *__pyx_t_9;
  if (__pyx_v_info == NULL) {
    PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
    return -1;
  }
  __Pyx_RefNannySetupContext("__getbuffer__", 0);
  __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(__pyx_v_info->obj);
  __Pyx_TraceCall("__getbuffer__", __pyx_f[3], 258, 0, __PYX_ERR(3, 258, __pyx_L1_error));

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":265
 * 
 *             cdef int i, ndim
 *             cdef int endian_detector = 1             # <<<<<<<<<<<<<<
 *             cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
 * 
 */
  __pyx_v_endian_detector = 1;

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":266
 *             cdef int i, ndim
 *             cdef int endian_detector = 1
 *             cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)             # <<<<<<<<<<<<<<
 * 
 *             ndim = PyArray_NDIM(self)
 */
  __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":268
 *             cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
 * 
 *             ndim = PyArray_NDIM(self)             # <<<<<<<<<<<<<<
 * 
 *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
 */
  __pyx_v_ndim = PyArray_NDIM(__pyx_v_self);

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":270
 *             ndim = PyArray_NDIM(self)
 * 
 *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)             # <<<<<<<<<<<<<<
 *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not C contiguous")
 */
  __pyx_t_2 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":271
 * 
 *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
 *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):             # <<<<<<<<<<<<<<
 *                 raise ValueError(u"ndarray is not C contiguous")
 * 
 */
  __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_C_CONTIGUOUS) != 0)) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":270
 *             ndim = PyArray_NDIM(self)
 * 
 *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)             # <<<<<<<<<<<<<<
 *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not C contiguous")
 */
  if (unlikely(__pyx_t_1)) {

    /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":272
 *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
 *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not C contiguous")             # <<<<<<<<<<<<<<
 * 
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 272, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(3, 272, __pyx_L1_error)

    /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":270
 *             ndim = PyArray_NDIM(self)
 * 
 *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)             # <<<<<<<<<<<<<<
 *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not C contiguous")
 */
  }

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":274
 *                 raise ValueError(u"ndarray is not C contiguous")
 * 
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)             # <<<<<<<<<<<<<<
 *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not Fortran contiguous")
 */
  __pyx_t_2 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L7_bool_binop_done;
  }

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":275
 * 
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
 *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):             # <<<<<<<<<<<<<<
 *                 raise ValueError(u"ndarray is not Fortran contiguous")
 * 
 */
  __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_F_CONTIGUOUS) != 0)) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L7_bool_binop_done:;

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":274
 *                 raise ValueError(u"ndarray is not C contiguous")
 * 
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)             # <<<<<<<<<<<<<<
 *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not Fortran contiguous")
 */
  if (unlikely(__pyx_t_1)) {

    /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":276
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
 *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not Fortran contiguous")             # <<<<<<<<<<<<<<
 * 
 *             info.buf = PyArray_DATA(self)
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 276, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(3, 276, __pyx_L1_error)

    /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":274
 *                 raise ValueError(u"ndarray is not C contiguous")
 * 
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)             # <<<<<<<<<<<<<<
 *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not Fortran contiguous")
 */
  }

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":278
 *                 raise ValueError(u"ndarray is not Fortran contiguous")
 * 
 *             info.buf = PyArray_DATA(self)             # <<<<<<<<<<<<<<
 *             info.ndim = ndim
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
 */
  __pyx_v_info->buf = PyArray_DATA(__pyx_v_self);

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":279
 * 
 *             info.buf = PyArray_DATA(self)
 *             info.ndim = ndim             # <<<<<<<<<<<<<<
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
 *                 # Allocate new buffer for strides and shape info.
 */
  __pyx_v_info->ndim = __pyx_v_ndim;

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":280
 *             info.buf = PyArray_DATA(self)
 *             info.ndim = ndim
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):             # <<<<<<<<<<<<<<
 *                 # Allocate new buffer for strides and shape info.
 *                 # This is allocated as one block, strides first.
 */
  __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
  if (__pyx_t_1) {

    /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":283
 *                 # Allocate new buffer for strides and shape info.
 *                 # This is allocated as one block, strides first.
 *                 info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim)             # <<<<<<<<<<<<<<
 *                 info.shape = info.strides + ndim
 *                 for i in range(ndim):
 */
    __pyx_v_info->strides = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * 2) * ((size_t)__pyx_v_ndim))));

    /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":284
 *                 # This is allocated as one block, strides first.
 *                 info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim)
 *                 info.shape = info.strides + ndim             # <<<<<<<<<<<<<<
 *                 for i in range(ndim):
 *                     info.strides[i] = PyArray_STRIDES(self)[i]
 */
    __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim);

    /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":285
 *                 info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim)
 *                 info.shape = info.strides + ndim
 *                 for i in range(ndim):             # <<<<<<<<<<<<<<
 *                     info.strides[i] = PyArray_STRIDES(self)[i]
 *                     info.shape[i] = PyArray_DIMS(self)[i]
 */
    __pyx_t_4 = __pyx_v_ndim;
    __pyx_t_5 = __pyx_t_4;
    for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
      __pyx_v_i = __pyx_t_6;

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":286
 *                 info.shape = info.strides + ndim
 *                 for i in range(ndim):
 *                     info.strides[i] = PyArray_STRIDES(self)[i]             # <<<<<<<<<<<<<<
 *                     info.shape[i] = PyArray_DIMS(self)[i]
 *             else:
 */
      (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]);

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":287
 *                 for i in range(ndim):
 *                     info.strides[i] = PyArray_STRIDES(self)[i]
 *                     info.shape[i] = PyArray_DIMS(self)[i]             # <<<<<<<<<<<<<<
 *             else:
 *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
 */
      (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]);
    }

    /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":280
 *             info.buf = PyArray_DATA(self)
 *             info.ndim = ndim
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):             # <<<<<<<<<<<<<<
 *                 # Allocate new buffer for strides and shape info.
 *                 # This is allocated as one block, strides first.
 */
    goto __pyx_L9;
  }

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":289
 *                     info.shape[i] = PyArray_DIMS(self)[i]
 *             else:
 *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)             # <<<<<<<<<<<<<<
 *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)
 *             info.suboffsets = NULL
 */
  /*else*/ {
    __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self));

    /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":290
 *             else:
 *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
 *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)             # <<<<<<<<<<<<<<
 *             info.suboffsets = NULL
 *             info.itemsize = PyArray_ITEMSIZE(self)
 */
    __pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self));
  }
  __pyx_L9:;

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":291
 *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
 *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)
 *             info.suboffsets = NULL             # <<<<<<<<<<<<<<
 *             info.itemsize = PyArray_ITEMSIZE(self)
 *             info.readonly = not PyArray_ISWRITEABLE(self)
 */
  __pyx_v_info->suboffsets = NULL;

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":292
 *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)
 *             info.suboffsets = NULL
 *             info.itemsize = PyArray_ITEMSIZE(self)             # <<<<<<<<<<<<<<
 *             info.readonly = not PyArray_ISWRITEABLE(self)
 * 
 */
  __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self);

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":293
 *             info.suboffsets = NULL
 *             info.itemsize = PyArray_ITEMSIZE(self)
 *             info.readonly = not PyArray_ISWRITEABLE(self)             # <<<<<<<<<<<<<<
 * 
 *             cdef int t
 */
  __pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0));

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":296
 * 
 *             cdef int t
 *             cdef char* f = NULL             # <<<<<<<<<<<<<<
 *             cdef dtype descr = <dtype>PyArray_DESCR(self)
 *             cdef int offset
 */
  __pyx_v_f = NULL;

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":297
 *             cdef int t
 *             cdef char* f = NULL
 *             cdef dtype descr = <dtype>PyArray_DESCR(self)             # <<<<<<<<<<<<<<
 *             cdef int offset
 * 
 */
  __pyx_t_7 = PyArray_DESCR(__pyx_v_self);
  __pyx_t_3 = ((PyObject *)__pyx_t_7);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_v_descr = ((PyArray_Descr *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":300
 *             cdef int offset
 * 
 *             info.obj = self             # <<<<<<<<<<<<<<
 * 
 *             if not PyDataType_HASFIELDS(descr):
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  __Pyx_GOTREF(__pyx_v_info->obj);
  __Pyx_DECREF(__pyx_v_info->obj);
  __pyx_v_info->obj = ((PyObject *)__pyx_v_self);

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":302
 *             info.obj = self
 * 
 *             if not PyDataType_HASFIELDS(descr):             # <<<<<<<<<<<<<<
 *                 t = descr.type_num
 *                 if ((descr.byteorder == c'>' and little_endian) or
 */
  __pyx_t_1 = ((!(PyDataType_HASFIELDS(__pyx_v_descr) != 0)) != 0);
  if (__pyx_t_1) {

    /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":303
 * 
 *             if not PyDataType_HASFIELDS(descr):
 *                 t = descr.type_num             # <<<<<<<<<<<<<<
 *                 if ((descr.byteorder == c'>' and little_endian) or
 *                     (descr.byteorder == c'<' and not little_endian)):
 */
    __pyx_t_4 = __pyx_v_descr->type_num;
    __pyx_v_t = __pyx_t_4;

    /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":304
 *             if not PyDataType_HASFIELDS(descr):
 *                 t = descr.type_num
 *                 if ((descr.byteorder == c'>' and little_endian) or             # <<<<<<<<<<<<<<
 *                     (descr.byteorder == c'<' and not little_endian)):
 *                     raise ValueError(u"Non-native byte order not supported")
 */
    __pyx_t_2 = ((__pyx_v_descr->byteorder == '>') != 0);
    if (!__pyx_t_2) {
      goto __pyx_L15_next_or;
    } else {
    }
    __pyx_t_2 = (__pyx_v_little_endian != 0);
    if (!__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L14_bool_binop_done;
    }
    __pyx_L15_next_or:;

    /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":305
 *                 t = descr.type_num
 *                 if ((descr.byteorder == c'>' and little_endian) or
 *                     (descr.byteorder == c'<' and not little_endian)):             # <<<<<<<<<<<<<<
 *                     raise ValueError(u"Non-native byte order not supported")
 *                 if   t == NPY_BYTE:        f = "b"
 */
    __pyx_t_2 = ((__pyx_v_descr->byteorder == '<') != 0);
    if (__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L14_bool_binop_done;
    }
    __pyx_t_2 = ((!(__pyx_v_little_endian != 0)) != 0);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L14_bool_binop_done:;

    /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":304
 *             if not PyDataType_HASFIELDS(descr):
 *                 t = descr.type_num
 *                 if ((descr.byteorder == c'>' and little_endian) or             # <<<<<<<<<<<<<<
 *                     (descr.byteorder == c'<' and not little_endian)):
 *                     raise ValueError(u"Non-native byte order not supported")
 */
    if (unlikely(__pyx_t_1)) {

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":306
 *                 if ((descr.byteorder == c'>' and little_endian) or
 *                     (descr.byteorder == c'<' and not little_endian)):
 *                     raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
 *                 if   t == NPY_BYTE:        f = "b"
 *                 elif t == NPY_UBYTE:       f = "B"
 */
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 306, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __PYX_ERR(3, 306, __pyx_L1_error)

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":304
 *             if not PyDataType_HASFIELDS(descr):
 *                 t = descr.type_num
 *                 if ((descr.byteorder == c'>' and little_endian) or             # <<<<<<<<<<<<<<
 *                     (descr.byteorder == c'<' and not little_endian)):
 *                     raise ValueError(u"Non-native byte order not supported")
 */
    }

    /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":307
 *                     (descr.byteorder == c'<' and not little_endian)):
 *                     raise ValueError(u"Non-native byte order not supported")
 *                 if   t == NPY_BYTE:        f = "b"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_UBYTE:       f = "B"
 *                 elif t == NPY_SHORT:       f = "h"
 */
    switch (__pyx_v_t) {
      case NPY_BYTE:
      __pyx_v_f = ((char *)"b");
      break;
      case NPY_UBYTE:

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":308
 *                     raise ValueError(u"Non-native byte order not supported")
 *                 if   t == NPY_BYTE:        f = "b"
 *                 elif t == NPY_UBYTE:       f = "B"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_SHORT:       f = "h"
 *                 elif t == NPY_USHORT:      f = "H"
 */
      __pyx_v_f = ((char *)"B");
      break;
      case NPY_SHORT:

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":309
 *                 if   t == NPY_BYTE:        f = "b"
 *                 elif t == NPY_UBYTE:       f = "B"
 *                 elif t == NPY_SHORT:       f = "h"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_USHORT:      f = "H"
 *                 elif t == NPY_INT:         f = "i"
 */
      __pyx_v_f = ((char *)"h");
      break;
      case NPY_USHORT:

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":310
 *                 elif t == NPY_UBYTE:       f = "B"
 *                 elif t == NPY_SHORT:       f = "h"
 *                 elif t == NPY_USHORT:      f = "H"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_INT:         f = "i"
 *                 elif t == NPY_UINT:        f = "I"
 */
      __pyx_v_f = ((char *)"H");
      break;
      case NPY_INT:

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":311
 *                 elif t == NPY_SHORT:       f = "h"
 *                 elif t == NPY_USHORT:      f = "H"
 *                 elif t == NPY_INT:         f = "i"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_UINT:        f = "I"
 *                 elif t == NPY_LONG:        f = "l"
 */
      __pyx_v_f = ((char *)"i");
      break;
      case NPY_UINT:

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":312
 *                 elif t == NPY_USHORT:      f = "H"
 *                 elif t == NPY_INT:         f = "i"
 *                 elif t == NPY_UINT:        f = "I"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_LONG:        f = "l"
 *                 elif t == NPY_ULONG:       f = "L"
 */
      __pyx_v_f = ((char *)"I");
      break;
      case NPY_LONG:

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":313
 *                 elif t == NPY_INT:         f = "i"
 *                 elif t == NPY_UINT:        f = "I"
 *                 elif t == NPY_LONG:        f = "l"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_ULONG:       f = "L"
 *                 elif t == NPY_LONGLONG:    f = "q"
 */
      __pyx_v_f = ((char *)"l");
      break;
      case NPY_ULONG:

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":314
 *                 elif t == NPY_UINT:        f = "I"
 *                 elif t == NPY_LONG:        f = "l"
 *                 elif t == NPY_ULONG:       f = "L"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_LONGLONG:    f = "q"
 *                 elif t == NPY_ULONGLONG:   f = "Q"
 */
      __pyx_v_f = ((char *)"L");
      break;
      case NPY_LONGLONG:

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":315
 *                 elif t == NPY_LONG:        f = "l"
 *                 elif t == NPY_ULONG:       f = "L"
 *                 elif t == NPY_LONGLONG:    f = "q"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_ULONGLONG:   f = "Q"
 *                 elif t == NPY_FLOAT:       f = "f"
 */
      __pyx_v_f = ((char *)"q");
      break;
      case NPY_ULONGLONG:

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":316
 *                 elif t == NPY_ULONG:       f = "L"
 *                 elif t == NPY_LONGLONG:    f = "q"
 *                 elif t == NPY_ULONGLONG:   f = "Q"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_FLOAT:       f = "f"
 *                 elif t == NPY_DOUBLE:      f = "d"
 */
      __pyx_v_f = ((char *)"Q");
      break;
      case NPY_FLOAT:

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":317
 *                 elif t == NPY_LONGLONG:    f = "q"
 *                 elif t == NPY_ULONGLONG:   f = "Q"
 *                 elif t == NPY_FLOAT:       f = "f"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_DOUBLE:      f = "d"
 *                 elif t == NPY_LONGDOUBLE:  f = "g"
 */
      __pyx_v_f = ((char *)"f");
      break;
      case NPY_DOUBLE:

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":318
 *                 elif t == NPY_ULONGLONG:   f = "Q"
 *                 elif t == NPY_FLOAT:       f = "f"
 *                 elif t == NPY_DOUBLE:      f = "d"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_LONGDOUBLE:  f = "g"
 *                 elif t == NPY_CFLOAT:      f = "Zf"
 */
      __pyx_v_f = ((char *)"d");
      break;
      case NPY_LONGDOUBLE:

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":319
 *                 elif t == NPY_FLOAT:       f = "f"
 *                 elif t == NPY_DOUBLE:      f = "d"
 *                 elif t == NPY_LONGDOUBLE:  f = "g"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_CFLOAT:      f = "Zf"
 *                 elif t == NPY_CDOUBLE:     f = "Zd"
 */
      __pyx_v_f = ((char *)"g");
      break;
      case NPY_CFLOAT:

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":320
 *                 elif t == NPY_DOUBLE:      f = "d"
 *                 elif t == NPY_LONGDOUBLE:  f = "g"
 *                 elif t == NPY_CFLOAT:      f = "Zf"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_CDOUBLE:     f = "Zd"
 *                 elif t == NPY_CLONGDOUBLE: f = "Zg"
 */
      __pyx_v_f = ((char *)"Zf");
      break;
      case NPY_CDOUBLE:

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":321
 *                 elif t == NPY_LONGDOUBLE:  f = "g"
 *                 elif t == NPY_CFLOAT:      f = "Zf"
 *                 elif t == NPY_CDOUBLE:     f = "Zd"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_CLONGDOUBLE: f = "Zg"
 *                 elif t == NPY_OBJECT:      f = "O"
 */
      __pyx_v_f = ((char *)"Zd");
      break;
      case NPY_CLONGDOUBLE:

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":322
 *                 elif t == NPY_CFLOAT:      f = "Zf"
 *                 elif t == NPY_CDOUBLE:     f = "Zd"
 *                 elif t == NPY_CLONGDOUBLE: f = "Zg"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_OBJECT:      f = "O"
 *                 else:
 */
      __pyx_v_f = ((char *)"Zg");
      break;
      case NPY_OBJECT:

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":323
 *                 elif t == NPY_CDOUBLE:     f = "Zd"
 *                 elif t == NPY_CLONGDOUBLE: f = "Zg"
 *                 elif t == NPY_OBJECT:      f = "O"             # <<<<<<<<<<<<<<
 *                 else:
 *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
 */
      __pyx_v_f = ((char *)"O");
      break;
      default:

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":325
 *                 elif t == NPY_OBJECT:      f = "O"
 *                 else:
 *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)             # <<<<<<<<<<<<<<
 *                 info.format = f
 *                 return
 */
      __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 325, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_8 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 325, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 325, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __PYX_ERR(3, 325, __pyx_L1_error)
      break;
    }

    /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":326
 *                 else:
 *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
 *                 info.format = f             # <<<<<<<<<<<<<<
 *                 return
 *             else:
 */
    __pyx_v_info->format = __pyx_v_f;

    /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":327
 *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
 *                 info.format = f
 *                 return             # <<<<<<<<<<<<<<
 *             else:
 *                 info.format = <char*>PyObject_Malloc(_buffer_format_string_len)
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":302
 *             info.obj = self
 * 
 *             if not PyDataType_HASFIELDS(descr):             # <<<<<<<<<<<<<<
 *                 t = descr.type_num
 *                 if ((descr.byteorder == c'>' and little_endian) or
 */
  }

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":329
 *                 return
 *             else:
 *                 info.format = <char*>PyObject_Malloc(_buffer_format_string_len)             # <<<<<<<<<<<<<<
 *                 info.format[0] = c'^' # Native data types, manual alignment
 *                 offset = 0
 */
  /*else*/ {
    __pyx_v_info->format = ((char *)PyObject_Malloc(0xFF));

    /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":330
 *             else:
 *                 info.format = <char*>PyObject_Malloc(_buffer_format_string_len)
 *                 info.format[0] = c'^' # Native data types, manual alignment             # <<<<<<<<<<<<<<
 *                 offset = 0
 *                 f = _util_dtypestring(descr, info.format + 1,
 */
    (__pyx_v_info->format[0]) = '^';

    /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":331
 *                 info.format = <char*>PyObject_Malloc(_buffer_format_string_len)
 *                 info.format[0] = c'^' # Native data types, manual alignment
 *                 offset = 0             # <<<<<<<<<<<<<<
 *                 f = _util_dtypestring(descr, info.format + 1,
 *                                       info.format + _buffer_format_string_len,
 */
    __pyx_v_offset = 0;

    /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":332
 *                 info.format[0] = c'^' # Native data types, manual alignment
 *                 offset = 0
 *                 f = _util_dtypestring(descr, info.format + 1,             # <<<<<<<<<<<<<<
 *                                       info.format + _buffer_format_string_len,
 *                                       &offset)
 */
    __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 0xFF), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(3, 332, __pyx_L1_error)
    __pyx_v_f = __pyx_t_9;

    /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":335
 *                                       info.format + _buffer_format_string_len,
 *                                       &offset)
 *                 f[0] = c'\0' # Terminate format string             # <<<<<<<<<<<<<<
 * 
 *         def __releasebuffer__(ndarray self, Py_buffer* info):
 */
    (__pyx_v_f[0]) = '\x00';
  }

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":258
 *         # experimental exception made for __getbuffer__ and __releasebuffer__
 *         # -- the details of this may change.
 *         def __getbuffer__(ndarray self, Py_buffer* info, int flags):             # <<<<<<<<<<<<<<
 *             # This implementation of getbuffer is geared towards Cython
 *             # requirements, and does not yet fulfill the PEP.
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  if (__pyx_v_info->obj != NULL) {
    __Pyx_GOTREF(__pyx_v_info->obj);
    __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
  }
  goto __pyx_L2;
  __pyx_L0:;
  if (__pyx_v_info->obj == Py_None) {
    __Pyx_GOTREF(__pyx_v_info->obj);
    __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
  }
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_descr);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":337
 *                 f[0] = c'\0' # Terminate format string
 * 
 *         def __releasebuffer__(ndarray self, Py_buffer* info):             # <<<<<<<<<<<<<<
 *             if PyArray_HASFIELDS(self):
 *                 PyObject_Free(info.format)
 */

/* Python wrapper */
static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/
static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0);
  __pyx_pf_5numpy_7ndarray_2__releasebuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__releasebuffer__", 0);
  __Pyx_TraceCall("__releasebuffer__", __pyx_f[3], 337, 0, __PYX_ERR(3, 337, __pyx_L1_error));

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":338
 * 
 *         def __releasebuffer__(ndarray self, Py_buffer* info):
 *             if PyArray_HASFIELDS(self):             # <<<<<<<<<<<<<<
 *                 PyObject_Free(info.format)
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
 */
  __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0);
  if (__pyx_t_1) {

    /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":339
 *         def __releasebuffer__(ndarray self, Py_buffer* info):
 *             if PyArray_HASFIELDS(self):
 *                 PyObject_Free(info.format)             # <<<<<<<<<<<<<<
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
 *                 PyObject_Free(info.strides)
 */
    PyObject_Free(__pyx_v_info->format);

    /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":338
 * 
 *         def __releasebuffer__(ndarray self, Py_buffer* info):
 *             if PyArray_HASFIELDS(self):             # <<<<<<<<<<<<<<
 *                 PyObject_Free(info.format)
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
 */
  }

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":340
 *             if PyArray_HASFIELDS(self):
 *                 PyObject_Free(info.format)
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):             # <<<<<<<<<<<<<<
 *                 PyObject_Free(info.strides)
 *                 # info.shape was stored after info.strides in the same block
 */
  __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
  if (__pyx_t_1) {

    /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":341
 *                 PyObject_Free(info.format)
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
 *                 PyObject_Free(info.strides)             # <<<<<<<<<<<<<<
 *                 # info.shape was stored after info.strides in the same block
 * 
 */
    PyObject_Free(__pyx_v_info->strides);

    /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":340
 *             if PyArray_HASFIELDS(self):
 *                 PyObject_Free(info.format)
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):             # <<<<<<<<<<<<<<
 *                 PyObject_Free(info.strides)
 *                 # info.shape was stored after info.strides in the same block
 */
  }

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":337
 *                 f[0] = c'\0' # Terminate format string
 * 
 *         def __releasebuffer__(ndarray self, Py_buffer* info):             # <<<<<<<<<<<<<<
 *             if PyArray_HASFIELDS(self):
 *                 PyObject_Free(info.format)
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("numpy.ndarray.__releasebuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":821
 * ctypedef npy_cdouble     complex_t
 * 
 * cdef inline object PyArray_MultiIterNew1(a):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(1, <void*>a)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0);
  __Pyx_TraceCall("PyArray_MultiIterNew1", __pyx_f[3], 821, 0, __PYX_ERR(3, 821, __pyx_L1_error));

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":822
 * 
 * cdef inline object PyArray_MultiIterNew1(a):
 *     return PyArray_MultiIterNew(1, <void*>a)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew2(a, b):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 822, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":821
 * ctypedef npy_cdouble     complex_t
 * 
 * cdef inline object PyArray_MultiIterNew1(a):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(1, <void*>a)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":824
 *     return PyArray_MultiIterNew(1, <void*>a)
 * 
 * cdef inline object PyArray_MultiIterNew2(a, b):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0);
  __Pyx_TraceCall("PyArray_MultiIterNew2", __pyx_f[3], 824, 0, __PYX_ERR(3, 824, __pyx_L1_error));

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":825
 * 
 * cdef inline object PyArray_MultiIterNew2(a, b):
 *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew3(a, b, c):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 825, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":824
 *     return PyArray_MultiIterNew(1, <void*>a)
 * 
 * cdef inline object PyArray_MultiIterNew2(a, b):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":827
 *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
 * 
 * cdef inline object PyArray_MultiIterNew3(a, b, c):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0);
  __Pyx_TraceCall("PyArray_MultiIterNew3", __pyx_f[3], 827, 0, __PYX_ERR(3, 827, __pyx_L1_error));

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":828
 * 
 * cdef inline object PyArray_MultiIterNew3(a, b, c):
 *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
 */
  __Pyx_XDECREF(__pyx_r);
  __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(3, 828, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":827
 *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
 * 
 * cdef inline object PyArray_MultiIterNew3(a, b, c):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":830
 *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
 * 
 * cdef inline object PyArray_MultiIterNew4(a, b, c, d):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0);
  __Pyx_TraceCall("PyArray_MultiIterNew4", __pyx_f[3], 830, 0, __PYX_ERR(3, 830, __pyx_L1_error));

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":831
 * 
 * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
 *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
 */
  __Pyx_XDECREF(__pyx_r);
  __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(3, 831, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":830
 *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
 * 
 * cdef inline object PyArray_MultiIterNew4(a, b, c, d):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":833
 *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
 * 
 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0);
  __Pyx_TraceCall("PyArray_MultiIterNew5", __pyx_f[3], 833, 0, __PYX_ERR(3, 833, __pyx_L1_error));

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":834
 * 
 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
 *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)             # <<<<<<<<<<<<<<
 * 
 * cdef inline tuple PyDataType_SHAPE(dtype d):
 */
  __Pyx_XDECREF(__pyx_r);
  __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(3, 834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":833
 *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
 * 
 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":836
 *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
 * 
 * cdef inline tuple PyDataType_SHAPE(dtype d):             # <<<<<<<<<<<<<<
 *     if PyDataType_HASSUBARRAY(d):
 *         return <tuple>d.subarray.shape
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0);
  __Pyx_TraceCall("PyDataType_SHAPE", __pyx_f[3], 836, 0, __PYX_ERR(3, 836, __pyx_L1_error));

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":837
 * 
 * cdef inline tuple PyDataType_SHAPE(dtype d):
 *     if PyDataType_HASSUBARRAY(d):             # <<<<<<<<<<<<<<
 *         return <tuple>d.subarray.shape
 *     else:
 */
  __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0);
  if (__pyx_t_1) {

    /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":838
 * cdef inline tuple PyDataType_SHAPE(dtype d):
 *     if PyDataType_HASSUBARRAY(d):
 *         return <tuple>d.subarray.shape             # <<<<<<<<<<<<<<
 *     else:
 *         return ()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape));
    __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape);
    goto __pyx_L0;

    /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":837
 * 
 * cdef inline tuple PyDataType_SHAPE(dtype d):
 *     if PyDataType_HASSUBARRAY(d):             # <<<<<<<<<<<<<<
 *         return <tuple>d.subarray.shape
 *     else:
 */
  }

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":840
 *         return <tuple>d.subarray.shape
 *     else:
 *         return ()             # <<<<<<<<<<<<<<
 * 
 * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL:
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_empty_tuple);
    __pyx_r = __pyx_empty_tuple;
    goto __pyx_L0;
  }

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":836
 *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
 * 
 * cdef inline tuple PyDataType_SHAPE(dtype d):             # <<<<<<<<<<<<<<
 *     if PyDataType_HASSUBARRAY(d):
 *         return <tuple>d.subarray.shape
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("numpy.PyDataType_SHAPE", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":842
 *         return ()
 * 
 * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL:             # <<<<<<<<<<<<<<
 *     # Recursive utility function used in __getbuffer__ to get format
 *     # string. The new location in the format string is returned.
 */

static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) {
  PyArray_Descr *__pyx_v_child = 0;
  int __pyx_v_endian_detector;
  int __pyx_v_little_endian;
  PyObject *__pyx_v_fields = 0;
  PyObject *__pyx_v_childname = NULL;
  PyObject *__pyx_v_new_offset = NULL;
  PyObject *__pyx_v_t = NULL;
  char *__pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  long __pyx_t_8;
  char *__pyx_t_9;
  __Pyx_RefNannySetupContext("_util_dtypestring", 0);
  __Pyx_TraceCall("_util_dtypestring", __pyx_f[3], 842, 0, __PYX_ERR(3, 842, __pyx_L1_error));

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":847
 * 
 *     cdef dtype child
 *     cdef int endian_detector = 1             # <<<<<<<<<<<<<<
 *     cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
 *     cdef tuple fields
 */
  __pyx_v_endian_detector = 1;

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":848
 *     cdef dtype child
 *     cdef int endian_detector = 1
 *     cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)             # <<<<<<<<<<<<<<
 *     cdef tuple fields
 * 
 */
  __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":851
 *     cdef tuple fields
 * 
 *     for childname in descr.names:             # <<<<<<<<<<<<<<
 *         fields = descr.fields[childname]
 *         child, new_offset = fields
 */
  if (unlikely(__pyx_v_descr->names == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(3, 851, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_v_descr->names; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
  for (;;) {
    if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(3, 851, __pyx_L1_error)
    #else
    __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 851, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":852
 * 
 *     for childname in descr.names:
 *         fields = descr.fields[childname]             # <<<<<<<<<<<<<<
 *         child, new_offset = fields
 * 
 */
    if (unlikely(__pyx_v_descr->fields == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(3, 852, __pyx_L1_error)
    }
    __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 852, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(3, 852, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":853
 *     for childname in descr.names:
 *         fields = descr.fields[childname]
 *         child, new_offset = fields             # <<<<<<<<<<<<<<
 * 
 *         if (end - f) - <int>(new_offset - offset[0]) < 15:
 */
    if (likely(__pyx_v_fields != Py_None)) {
      PyObject* sequence = __pyx_v_fields;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(3, 853, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      #else
      __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 853, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 853, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      #endif
    } else {
      __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(3, 853, __pyx_L1_error)
    }
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(3, 853, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_child, ((PyArray_Descr *)__pyx_t_3));
    __pyx_t_3 = 0;
    __Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":855
 *         child, new_offset = fields
 * 
 *         if (end - f) - <int>(new_offset - offset[0]) < 15:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
 * 
 */
    __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 855, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 855, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 855, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0);
    if (unlikely(__pyx_t_6)) {

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":856
 * 
 *         if (end - f) - <int>(new_offset - offset[0]) < 15:
 *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")             # <<<<<<<<<<<<<<
 * 
 *         if ((child.byteorder == c'>' and little_endian) or
 */
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 856, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __PYX_ERR(3, 856, __pyx_L1_error)

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":855
 *         child, new_offset = fields
 * 
 *         if (end - f) - <int>(new_offset - offset[0]) < 15:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
 * 
 */
    }

    /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":858
 *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
 * 
 *         if ((child.byteorder == c'>' and little_endian) or             # <<<<<<<<<<<<<<
 *             (child.byteorder == c'<' and not little_endian)):
 *             raise ValueError(u"Non-native byte order not supported")
 */
    __pyx_t_7 = ((__pyx_v_child->byteorder == '>') != 0);
    if (!__pyx_t_7) {
      goto __pyx_L8_next_or;
    } else {
    }
    __pyx_t_7 = (__pyx_v_little_endian != 0);
    if (!__pyx_t_7) {
    } else {
      __pyx_t_6 = __pyx_t_7;
      goto __pyx_L7_bool_binop_done;
    }
    __pyx_L8_next_or:;

    /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":859
 * 
 *         if ((child.byteorder == c'>' and little_endian) or
 *             (child.byteorder == c'<' and not little_endian)):             # <<<<<<<<<<<<<<
 *             raise ValueError(u"Non-native byte order not supported")
 *             # One could encode it in the format string and have Cython
 */
    __pyx_t_7 = ((__pyx_v_child->byteorder == '<') != 0);
    if (__pyx_t_7) {
    } else {
      __pyx_t_6 = __pyx_t_7;
      goto __pyx_L7_bool_binop_done;
    }
    __pyx_t_7 = ((!(__pyx_v_little_endian != 0)) != 0);
    __pyx_t_6 = __pyx_t_7;
    __pyx_L7_bool_binop_done:;

    /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":858
 *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
 * 
 *         if ((child.byteorder == c'>' and little_endian) or             # <<<<<<<<<<<<<<
 *             (child.byteorder == c'<' and not little_endian)):
 *             raise ValueError(u"Non-native byte order not supported")
 */
    if (unlikely(__pyx_t_6)) {

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":860
 *         if ((child.byteorder == c'>' and little_endian) or
 *             (child.byteorder == c'<' and not little_endian)):
 *             raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
 *             # One could encode it in the format string and have Cython
 *             # complain instead, BUT: < and > in format strings also imply
 */
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 860, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __PYX_ERR(3, 860, __pyx_L1_error)

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":858
 *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
 * 
 *         if ((child.byteorder == c'>' and little_endian) or             # <<<<<<<<<<<<<<
 *             (child.byteorder == c'<' and not little_endian)):
 *             raise ValueError(u"Non-native byte order not supported")
 */
    }

    /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":870
 * 
 *         # Output padding bytes
 *         while offset[0] < new_offset:             # <<<<<<<<<<<<<<
 *             f[0] = 120 # "x"; pad byte
 *             f += 1
 */
    while (1) {
      __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 870, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 870, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 870, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (!__pyx_t_6) break;

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":871
 *         # Output padding bytes
 *         while offset[0] < new_offset:
 *             f[0] = 120 # "x"; pad byte             # <<<<<<<<<<<<<<
 *             f += 1
 *             offset[0] += 1
 */
      (__pyx_v_f[0]) = 0x78;

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":872
 *         while offset[0] < new_offset:
 *             f[0] = 120 # "x"; pad byte
 *             f += 1             # <<<<<<<<<<<<<<
 *             offset[0] += 1
 * 
 */
      __pyx_v_f = (__pyx_v_f + 1);

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":873
 *             f[0] = 120 # "x"; pad byte
 *             f += 1
 *             offset[0] += 1             # <<<<<<<<<<<<<<
 * 
 *         offset[0] += child.itemsize
 */
      __pyx_t_8 = 0;
      (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1);
    }

    /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":875
 *             offset[0] += 1
 * 
 *         offset[0] += child.itemsize             # <<<<<<<<<<<<<<
 * 
 *         if not PyDataType_HASFIELDS(child):
 */
    __pyx_t_8 = 0;
    (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize);

    /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":877
 *         offset[0] += child.itemsize
 * 
 *         if not PyDataType_HASFIELDS(child):             # <<<<<<<<<<<<<<
 *             t = child.type_num
 *             if end - f < 5:
 */
    __pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0);
    if (__pyx_t_6) {

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":878
 * 
 *         if not PyDataType_HASFIELDS(child):
 *             t = child.type_num             # <<<<<<<<<<<<<<
 *             if end - f < 5:
 *                 raise RuntimeError(u"Format string allocated too short.")
 */
      __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 878, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":879
 *         if not PyDataType_HASFIELDS(child):
 *             t = child.type_num
 *             if end - f < 5:             # <<<<<<<<<<<<<<
 *                 raise RuntimeError(u"Format string allocated too short.")
 * 
 */
      __pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0);
      if (unlikely(__pyx_t_6)) {

        /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":880
 *             t = child.type_num
 *             if end - f < 5:
 *                 raise RuntimeError(u"Format string allocated too short.")             # <<<<<<<<<<<<<<
 * 
 *             # Until ticket #99 is fixed, use integers to avoid warnings
 */
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 880, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_Raise(__pyx_t_4, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __PYX_ERR(3, 880, __pyx_L1_error)

        /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":879
 *         if not PyDataType_HASFIELDS(child):
 *             t = child.type_num
 *             if end - f < 5:             # <<<<<<<<<<<<<<
 *                 raise RuntimeError(u"Format string allocated too short.")
 * 
 */
      }

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":883
 * 
 *             # Until ticket #99 is fixed, use integers to avoid warnings
 *             if   t == NPY_BYTE:        f[0] =  98 #"b"             # <<<<<<<<<<<<<<
 *             elif t == NPY_UBYTE:       f[0] =  66 #"B"
 *             elif t == NPY_SHORT:       f[0] = 104 #"h"
 */
      __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 883, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 883, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 883, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 98;
        goto __pyx_L15;
      }

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":884
 *             # Until ticket #99 is fixed, use integers to avoid warnings
 *             if   t == NPY_BYTE:        f[0] =  98 #"b"
 *             elif t == NPY_UBYTE:       f[0] =  66 #"B"             # <<<<<<<<<<<<<<
 *             elif t == NPY_SHORT:       f[0] = 104 #"h"
 *             elif t == NPY_USHORT:      f[0] =  72 #"H"
 */
      __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 884, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 884, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 884, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 66;
        goto __pyx_L15;
      }

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":885
 *             if   t == NPY_BYTE:        f[0] =  98 #"b"
 *             elif t == NPY_UBYTE:       f[0] =  66 #"B"
 *             elif t == NPY_SHORT:       f[0] = 104 #"h"             # <<<<<<<<<<<<<<
 *             elif t == NPY_USHORT:      f[0] =  72 #"H"
 *             elif t == NPY_INT:         f[0] = 105 #"i"
 */
      __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 885, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 885, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 885, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 0x68;
        goto __pyx_L15;
      }

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":886
 *             elif t == NPY_UBYTE:       f[0] =  66 #"B"
 *             elif t == NPY_SHORT:       f[0] = 104 #"h"
 *             elif t == NPY_USHORT:      f[0] =  72 #"H"             # <<<<<<<<<<<<<<
 *             elif t == NPY_INT:         f[0] = 105 #"i"
 *             elif t == NPY_UINT:        f[0] =  73 #"I"
 */
      __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 886, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 886, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 886, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 72;
        goto __pyx_L15;
      }

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":887
 *             elif t == NPY_SHORT:       f[0] = 104 #"h"
 *             elif t == NPY_USHORT:      f[0] =  72 #"H"
 *             elif t == NPY_INT:         f[0] = 105 #"i"             # <<<<<<<<<<<<<<
 *             elif t == NPY_UINT:        f[0] =  73 #"I"
 *             elif t == NPY_LONG:        f[0] = 108 #"l"
 */
      __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 887, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 887, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 887, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 0x69;
        goto __pyx_L15;
      }

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":888
 *             elif t == NPY_USHORT:      f[0] =  72 #"H"
 *             elif t == NPY_INT:         f[0] = 105 #"i"
 *             elif t == NPY_UINT:        f[0] =  73 #"I"             # <<<<<<<<<<<<<<
 *             elif t == NPY_LONG:        f[0] = 108 #"l"
 *             elif t == NPY_ULONG:       f[0] = 76  #"L"
 */
      __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 888, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 888, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 888, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 73;
        goto __pyx_L15;
      }

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":889
 *             elif t == NPY_INT:         f[0] = 105 #"i"
 *             elif t == NPY_UINT:        f[0] =  73 #"I"
 *             elif t == NPY_LONG:        f[0] = 108 #"l"             # <<<<<<<<<<<<<<
 *             elif t == NPY_ULONG:       f[0] = 76  #"L"
 *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
 */
      __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 889, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 889, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 889, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 0x6C;
        goto __pyx_L15;
      }

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":890
 *             elif t == NPY_UINT:        f[0] =  73 #"I"
 *             elif t == NPY_LONG:        f[0] = 108 #"l"
 *             elif t == NPY_ULONG:       f[0] = 76  #"L"             # <<<<<<<<<<<<<<
 *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
 *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
 */
      __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 890, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 890, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 890, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 76;
        goto __pyx_L15;
      }

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":891
 *             elif t == NPY_LONG:        f[0] = 108 #"l"
 *             elif t == NPY_ULONG:       f[0] = 76  #"L"
 *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"             # <<<<<<<<<<<<<<
 *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
 *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
 */
      __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 891, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 891, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 891, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 0x71;
        goto __pyx_L15;
      }

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":892
 *             elif t == NPY_ULONG:       f[0] = 76  #"L"
 *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
 *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"             # <<<<<<<<<<<<<<
 *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
 *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
 */
      __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 892, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 892, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 892, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 81;
        goto __pyx_L15;
      }

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":893
 *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
 *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
 *             elif t == NPY_FLOAT:       f[0] = 102 #"f"             # <<<<<<<<<<<<<<
 *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
 *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
 */
      __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 893, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 893, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 893, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 0x66;
        goto __pyx_L15;
      }

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":894
 *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
 *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
 *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"             # <<<<<<<<<<<<<<
 *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
 *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
 */
      __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 894, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 894, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 894, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 0x64;
        goto __pyx_L15;
      }

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":895
 *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
 *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
 *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"             # <<<<<<<<<<<<<<
 *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
 *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
 */
      __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 895, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 895, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 895, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 0x67;
        goto __pyx_L15;
      }

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":896
 *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
 *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
 *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf             # <<<<<<<<<<<<<<
 *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
 *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
 */
      __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 896, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 896, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 896, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 90;
        (__pyx_v_f[1]) = 0x66;
        __pyx_v_f = (__pyx_v_f + 1);
        goto __pyx_L15;
      }

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":897
 *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
 *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
 *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd             # <<<<<<<<<<<<<<
 *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
 *             elif t == NPY_OBJECT:      f[0] = 79 #"O"
 */
      __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 897, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 897, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 897, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 90;
        (__pyx_v_f[1]) = 0x64;
        __pyx_v_f = (__pyx_v_f + 1);
        goto __pyx_L15;
      }

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":898
 *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
 *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
 *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg             # <<<<<<<<<<<<<<
 *             elif t == NPY_OBJECT:      f[0] = 79 #"O"
 *             else:
 */
      __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 898, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 898, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 898, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 90;
        (__pyx_v_f[1]) = 0x67;
        __pyx_v_f = (__pyx_v_f + 1);
        goto __pyx_L15;
      }

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":899
 *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
 *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
 *             elif t == NPY_OBJECT:      f[0] = 79 #"O"             # <<<<<<<<<<<<<<
 *             else:
 *                 raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
 */
      __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_OBJECT); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 899, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 899, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 899, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (likely(__pyx_t_6)) {
        (__pyx_v_f[0]) = 79;
        goto __pyx_L15;
      }

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":901
 *             elif t == NPY_OBJECT:      f[0] = 79 #"O"
 *             else:
 *                 raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)             # <<<<<<<<<<<<<<
 *             f += 1
 *         else:
 */
      /*else*/ {
        __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 901, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 901, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_Raise(__pyx_t_4, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __PYX_ERR(3, 901, __pyx_L1_error)
      }
      __pyx_L15:;

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":902
 *             else:
 *                 raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
 *             f += 1             # <<<<<<<<<<<<<<
 *         else:
 *             # Cython ignores struct boundary information ("T{...}"),
 */
      __pyx_v_f = (__pyx_v_f + 1);

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":877
 *         offset[0] += child.itemsize
 * 
 *         if not PyDataType_HASFIELDS(child):             # <<<<<<<<<<<<<<
 *             t = child.type_num
 *             if end - f < 5:
 */
      goto __pyx_L13;
    }

    /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":906
 *             # Cython ignores struct boundary information ("T{...}"),
 *             # so don't output it
 *             f = _util_dtypestring(child, f, end, offset)             # <<<<<<<<<<<<<<
 *     return f
 * 
 */
    /*else*/ {
      __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(3, 906, __pyx_L1_error)
      __pyx_v_f = __pyx_t_9;
    }
    __pyx_L13:;

    /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":851
 *     cdef tuple fields
 * 
 *     for childname in descr.names:             # <<<<<<<<<<<<<<
 *         fields = descr.fields[childname]
 *         child, new_offset = fields
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":907
 *             # so don't output it
 *             f = _util_dtypestring(child, f, end, offset)
 *     return f             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_f;
  goto __pyx_L0;

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":842
 *         return ()
 * 
 * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL:             # <<<<<<<<<<<<<<
 *     # Recursive utility function used in __getbuffer__ to get format
 *     # string. The new location in the format string is returned.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("numpy._util_dtypestring", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_child);
  __Pyx_XDECREF(__pyx_v_fields);
  __Pyx_XDECREF(__pyx_v_childname);
  __Pyx_XDECREF(__pyx_v_new_offset);
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1022
 *     int _import_umath() except -1
 * 
 * cdef inline void set_array_base(ndarray arr, object base):             # <<<<<<<<<<<<<<
 *     Py_INCREF(base) # important to do this before stealing the reference below!
 *     PyArray_SetBaseObject(arr, base)
 */

static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_array_base", 0);
  __Pyx_TraceCall("set_array_base", __pyx_f[3], 1022, 0, __PYX_ERR(3, 1022, __pyx_L1_error));

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1023
 * 
 * cdef inline void set_array_base(ndarray arr, object base):
 *     Py_INCREF(base) # important to do this before stealing the reference below!             # <<<<<<<<<<<<<<
 *     PyArray_SetBaseObject(arr, base)
 * 
 */
  Py_INCREF(__pyx_v_base);

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1024
 * cdef inline void set_array_base(ndarray arr, object base):
 *     Py_INCREF(base) # important to do this before stealing the reference below!
 *     PyArray_SetBaseObject(arr, base)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object get_array_base(ndarray arr):
 */
  (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base));

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1022
 *     int _import_umath() except -1
 * 
 * cdef inline void set_array_base(ndarray arr, object base):             # <<<<<<<<<<<<<<
 *     Py_INCREF(base) # important to do this before stealing the reference below!
 *     PyArray_SetBaseObject(arr, base)
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("numpy.set_array_base", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1026
 *     PyArray_SetBaseObject(arr, base)
 * 
 * cdef inline object get_array_base(ndarray arr):             # <<<<<<<<<<<<<<
 *     base = PyArray_BASE(arr)
 *     if base is NULL:
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
  PyObject *__pyx_v_base;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("get_array_base", 0);
  __Pyx_TraceCall("get_array_base", __pyx_f[3], 1026, 0, __PYX_ERR(3, 1026, __pyx_L1_error));

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1027
 * 
 * cdef inline object get_array_base(ndarray arr):
 *     base = PyArray_BASE(arr)             # <<<<<<<<<<<<<<
 *     if base is NULL:
 *         return None
 */
  __pyx_v_base = PyArray_BASE(__pyx_v_arr);

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1028
 * cdef inline object get_array_base(ndarray arr):
 *     base = PyArray_BASE(arr)
 *     if base is NULL:             # <<<<<<<<<<<<<<
 *         return None
 *     return <object>base
 */
  __pyx_t_1 = ((__pyx_v_base == NULL) != 0);
  if (__pyx_t_1) {

    /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1029
 *     base = PyArray_BASE(arr)
 *     if base is NULL:
 *         return None             # <<<<<<<<<<<<<<
 *     return <object>base
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1028
 * cdef inline object get_array_base(ndarray arr):
 *     base = PyArray_BASE(arr)
 *     if base is NULL:             # <<<<<<<<<<<<<<
 *         return None
 *     return <object>base
 */
  }

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1030
 *     if base is NULL:
 *         return None
 *     return <object>base             # <<<<<<<<<<<<<<
 * 
 * # Versions of the import_* functions which are more suitable for
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_base));
  __pyx_r = ((PyObject *)__pyx_v_base);
  goto __pyx_L0;

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1026
 *     PyArray_SetBaseObject(arr, base)
 * 
 * cdef inline object get_array_base(ndarray arr):             # <<<<<<<<<<<<<<
 *     base = PyArray_BASE(arr)
 *     if base is NULL:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("numpy.get_array_base", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1034
 * # Versions of the import_* functions which are more suitable for
 * # Cython code.
 * cdef inline int import_array() except -1:             # <<<<<<<<<<<<<<
 *     try:
 *         _import_array()
 */

static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("import_array", 0);
  __Pyx_TraceCall("import_array", __pyx_f[3], 1034, 0, __PYX_ERR(3, 1034, __pyx_L1_error));

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1035
 * # Cython code.
 * cdef inline int import_array() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_array()
 *     except Exception:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1036
 * cdef inline int import_array() except -1:
 *     try:
 *         _import_array()             # <<<<<<<<<<<<<<
 *     except Exception:
 *         raise ImportError("numpy.core.multiarray failed to import")
 */
      __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 1036, __pyx_L3_error)

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1035
 * # Cython code.
 * cdef inline int import_array() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_array()
 *     except Exception:
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;

    /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1037
 *     try:
 *         _import_array()
 *     except Exception:             # <<<<<<<<<<<<<<
 *         raise ImportError("numpy.core.multiarray failed to import")
 * 
 */
    __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_4) {
      __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(3, 1037, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_7);

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1038
 *         _import_array()
 *     except Exception:
 *         raise ImportError("numpy.core.multiarray failed to import")             # <<<<<<<<<<<<<<
 * 
 * cdef inline int import_umath() except -1:
 */
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1038, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_Raise(__pyx_t_8, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __PYX_ERR(3, 1038, __pyx_L5_except_error)
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1035
 * # Cython code.
 * cdef inline int import_array() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_array()
 *     except Exception:
 */
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L8_try_end:;
  }

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1034
 * # Versions of the import_* functions which are more suitable for
 * # Cython code.
 * cdef inline int import_array() except -1:             # <<<<<<<<<<<<<<
 *     try:
 *         _import_array()
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1040
 *         raise ImportError("numpy.core.multiarray failed to import")
 * 
 * cdef inline int import_umath() except -1:             # <<<<<<<<<<<<<<
 *     try:
 *         _import_umath()
 */

static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("import_umath", 0);
  __Pyx_TraceCall("import_umath", __pyx_f[3], 1040, 0, __PYX_ERR(3, 1040, __pyx_L1_error));

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1041
 * 
 * cdef inline int import_umath() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_umath()
 *     except Exception:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1042
 * cdef inline int import_umath() except -1:
 *     try:
 *         _import_umath()             # <<<<<<<<<<<<<<
 *     except Exception:
 *         raise ImportError("numpy.core.umath failed to import")
 */
      __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 1042, __pyx_L3_error)

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1041
 * 
 * cdef inline int import_umath() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_umath()
 *     except Exception:
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;

    /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1043
 *     try:
 *         _import_umath()
 *     except Exception:             # <<<<<<<<<<<<<<
 *         raise ImportError("numpy.core.umath failed to import")
 * 
 */
    __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_4) {
      __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(3, 1043, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_7);

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1044
 *         _import_umath()
 *     except Exception:
 *         raise ImportError("numpy.core.umath failed to import")             # <<<<<<<<<<<<<<
 * 
 * cdef inline int import_ufunc() except -1:
 */
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1044, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_Raise(__pyx_t_8, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __PYX_ERR(3, 1044, __pyx_L5_except_error)
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1041
 * 
 * cdef inline int import_umath() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_umath()
 *     except Exception:
 */
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L8_try_end:;
  }

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1040
 *         raise ImportError("numpy.core.multiarray failed to import")
 * 
 * cdef inline int import_umath() except -1:             # <<<<<<<<<<<<<<
 *     try:
 *         _import_umath()
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1046
 *         raise ImportError("numpy.core.umath failed to import")
 * 
 * cdef inline int import_ufunc() except -1:             # <<<<<<<<<<<<<<
 *     try:
 *         _import_umath()
 */

static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("import_ufunc", 0);
  __Pyx_TraceCall("import_ufunc", __pyx_f[3], 1046, 0, __PYX_ERR(3, 1046, __pyx_L1_error));

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1047
 * 
 * cdef inline int import_ufunc() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_umath()
 *     except Exception:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1048
 * cdef inline int import_ufunc() except -1:
 *     try:
 *         _import_umath()             # <<<<<<<<<<<<<<
 *     except Exception:
 *         raise ImportError("numpy.core.umath failed to import")
 */
      __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 1048, __pyx_L3_error)

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1047
 * 
 * cdef inline int import_ufunc() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_umath()
 *     except Exception:
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;

    /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1049
 *     try:
 *         _import_umath()
 *     except Exception:             # <<<<<<<<<<<<<<
 *         raise ImportError("numpy.core.umath failed to import")
 */
    __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_4) {
      __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(3, 1049, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_7);

      /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1050
 *         _import_umath()
 *     except Exception:
 *         raise ImportError("numpy.core.umath failed to import")             # <<<<<<<<<<<<<<
 */
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1050, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_Raise(__pyx_t_8, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __PYX_ERR(3, 1050, __pyx_L5_except_error)
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1047
 * 
 * cdef inline int import_ufunc() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_umath()
 *     except Exception:
 */
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L8_try_end:;
  }

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1046
 *         raise ImportError("numpy.core.umath failed to import")
 * 
 * cdef inline int import_ufunc() except -1:             # <<<<<<<<<<<<<<
 *     try:
 *         _import_umath()
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_tp_new_5PDSim_6scroll_17common_scroll_geo_VdVstruct(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  return o;
}

static void __pyx_tp_dealloc_5PDSim_6scroll_17common_scroll_geo_VdVstruct(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_9VdVstruct_V(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_9VdVstruct_1V_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_9VdVstruct_V(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_9VdVstruct_1V_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_9VdVstruct_dV(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_9VdVstruct_2dV_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_9VdVstruct_dV(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_9VdVstruct_2dV_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_5PDSim_6scroll_17common_scroll_geo_VdVstruct[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5PDSim_6scroll_17common_scroll_geo_9VdVstruct_5__reduce_cython__, METH_NOARGS, __pyx_doc_5PDSim_6scroll_17common_scroll_geo_9VdVstruct_4__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5PDSim_6scroll_17common_scroll_geo_9VdVstruct_7__setstate_cython__, METH_O, __pyx_doc_5PDSim_6scroll_17common_scroll_geo_9VdVstruct_6__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5PDSim_6scroll_17common_scroll_geo_VdVstruct[] = {
  {(char *)"V", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_9VdVstruct_V, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_9VdVstruct_V, (char *)"V: 'double'\n Volume [m^3] ", 0},
  {(char *)"dV", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_9VdVstruct_dV, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_9VdVstruct_dV, (char *)"dV: 'double'\n Derivative of volume with respect to crank angle [m^3/radian] ", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5PDSim_6scroll_17common_scroll_geo_VdVstruct = {
  PyVarObject_HEAD_INIT(0, 0)
  "PDSim.scroll.common_scroll_geo.VdVstruct", /*tp_name*/
  sizeof(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_VdVstruct), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5PDSim_6scroll_17common_scroll_geo_VdVstruct, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_5PDSim_6scroll_17common_scroll_geo_9VdVstruct_3__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "VdVstruct(V, dV)\n\n    A struct with values for volume and derivative of volume w.r.t. crank angle\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5PDSim_6scroll_17common_scroll_geo_VdVstruct, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5PDSim_6scroll_17common_scroll_geo_VdVstruct, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_5PDSim_6scroll_17common_scroll_geo_9VdVstruct_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5PDSim_6scroll_17common_scroll_geo_VdVstruct, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyObject *__pyx_tp_new_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  return o;
}

static void __pyx_tp_dealloc_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_phi_1_i(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_7phi_1_i_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_phi_1_i(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_7phi_1_i_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_phi_2_i(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_7phi_2_i_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_phi_2_i(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_7phi_2_i_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_phi_1_o(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_7phi_1_o_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_phi_1_o(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_7phi_1_o_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_phi_2_o(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_7phi_2_o_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_phi_2_o(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_7phi_2_o_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_phi_i0(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_6phi_i0_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_phi_i0(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_6phi_i0_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_phi_o0(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_6phi_o0_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_phi_o0(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_6phi_o0_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_3__reduce_cython__, METH_NOARGS, __pyx_doc_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_2__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_5__setstate_cython__, METH_O, __pyx_doc_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_4__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass[] = {
  {(char *)"phi_1_i", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_phi_1_i, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_phi_1_i, (char *)"phi_1_i: 'double'\n Maximum involute angle on the inner involute of the wrap that forms the outer wall of the CV", 0},
  {(char *)"phi_2_i", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_phi_2_i, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_phi_2_i, (char *)"phi_2_i: 'double'\n Minimum involute angle on the inner involute of the wrap that forms the outer wall of the CV", 0},
  {(char *)"phi_1_o", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_phi_1_o, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_phi_1_o, (char *)"phi_1_o: 'double'\n Maximum involute angle on the outer involute of the wrap that forms the inner wall of the CV", 0},
  {(char *)"phi_2_o", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_phi_2_o, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_phi_2_o, (char *)"phi_2_o: 'double'\n Minimum involute angle on the outer involute of the wrap that forms the inner wall of the CV", 0},
  {(char *)"phi_i0", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_phi_i0, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_phi_i0, (char *)"phi_i0: 'double'\n The initial angle on the inner involute of the wrap that forms the outer wall of the CV", 0},
  {(char *)"phi_o0", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_phi_o0, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_phi_o0, (char *)"phi_o0: 'double'\n The initial angle on the outer involute of the wrap that forms the inner wall of the CV", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass = {
  PyVarObject_HEAD_INIT(0, 0)
  "PDSim.scroll.common_scroll_geo.HTAnglesClass", /*tp_name*/
  sizeof(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_5PDSim_6scroll_17common_scroll_geo_13HTAnglesClass_1__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n    A struct with angles associated with the calculations needed for the assesment\n    of heat transfer in the chambers of the scroll compressor\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyObject *__pyx_tp_new_5PDSim_6scroll_17common_scroll_geo_CVInvolute(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  return o;
}

static void __pyx_tp_dealloc_5PDSim_6scroll_17common_scroll_geo_CVInvolute(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_phi_max(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_7phi_max_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_phi_max(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_7phi_max_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_phi_min(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_7phi_min_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_phi_min(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_7phi_min_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_phi_0(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_5phi_0_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_phi_0(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_5phi_0_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_dphi_max_dtheta(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_15dphi_max_dtheta_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_dphi_max_dtheta(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_15dphi_max_dtheta_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_dphi_min_dtheta(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_15dphi_min_dtheta_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_dphi_min_dtheta(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_15dphi_min_dtheta_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_involute(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_8involute_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_involute(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_8involute_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_5PDSim_6scroll_17common_scroll_geo_CVInvolute[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_3__reduce_cython__, METH_NOARGS, __pyx_doc_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_2__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_5__setstate_cython__, METH_O, __pyx_doc_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_4__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5PDSim_6scroll_17common_scroll_geo_CVInvolute[] = {
  {(char *)"phi_max", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_phi_max, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_phi_max, (char *)"phi_max: 'double'\n The maximum involute angle along this involute ", 0},
  {(char *)"phi_min", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_phi_min, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_phi_min, (char *)"phi_min: 'double'\n The minimum involute angle along this involute ", 0},
  {(char *)"phi_0", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_phi_0, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_phi_0, (char *)"phi_0: 'double'\n The initial involute angle along this involute ", 0},
  {(char *)"dphi_max_dtheta", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_dphi_max_dtheta, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_dphi_max_dtheta, (char *)"dphi_max_dtheta: 'double'\n The derivative of phi_max w.r.t. crank angle ", 0},
  {(char *)"dphi_min_dtheta", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_dphi_min_dtheta, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_dphi_min_dtheta, (char *)"dphi_min_dtheta: 'double'\n The derivative of phi_min w.r.t. crank angle ", 0},
  {(char *)"involute", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_involute, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_involute, (char *)"involute: 'involute_index'\n The involute_index of this involute ", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5PDSim_6scroll_17common_scroll_geo_CVInvolute = {
  PyVarObject_HEAD_INIT(0, 0)
  "PDSim.scroll.common_scroll_geo.CVInvolute", /*tp_name*/
  sizeof(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5PDSim_6scroll_17common_scroll_geo_CVInvolute, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "CVInvolute()\n\n    A simple struct to contain the involute angles\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5PDSim_6scroll_17common_scroll_geo_CVInvolute, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5PDSim_6scroll_17common_scroll_geo_CVInvolute, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_5PDSim_6scroll_17common_scroll_geo_10CVInvolute_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5PDSim_6scroll_17common_scroll_geo_CVInvolute, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyObject *__pyx_tp_new_5PDSim_6scroll_17common_scroll_geo_CVInvolutes(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *)o);
  p->Inner = ((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *)Py_None); Py_INCREF(Py_None);
  p->Outer = ((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_5PDSim_6scroll_17common_scroll_geo_CVInvolutes(PyObject *o) {
  struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *p = (struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->Inner);
  Py_CLEAR(p->Outer);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_5PDSim_6scroll_17common_scroll_geo_CVInvolutes(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *p = (struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *)o;
  if (p->Inner) {
    e = (*v)(((PyObject *)p->Inner), a); if (e) return e;
  }
  if (p->Outer) {
    e = (*v)(((PyObject *)p->Outer), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5PDSim_6scroll_17common_scroll_geo_CVInvolutes(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *p = (struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *)o;
  tmp = ((PyObject*)p->Inner);
  p->Inner = ((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->Outer);
  p->Outer = ((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolute *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_Inner(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_5Inner_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_Inner(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_5Inner_3__set__(o, v);
  }
  else {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_5Inner_5__del__(o);
  }
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_Outer(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_5Outer_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_Outer(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_5Outer_3__set__(o, v);
  }
  else {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_5Outer_5__del__(o);
  }
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_has_line_1(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_10has_line_1_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_has_line_1(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_10has_line_1_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_has_line_2(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_10has_line_2_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_has_line_2(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_10has_line_2_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_5PDSim_6scroll_17common_scroll_geo_CVInvolutes[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_5__reduce_cython__, METH_NOARGS, __pyx_doc_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_4__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_7__setstate_cython__, METH_O, __pyx_doc_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_6__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5PDSim_6scroll_17common_scroll_geo_CVInvolutes[] = {
  {(char *)"Inner", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_Inner, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_Inner, (char *)"Inner: PDSim.scroll.common_scroll_geo.CVInvolute\n The values for the inner involute of this chamber ", 0},
  {(char *)"Outer", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_Outer, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_Outer, (char *)"Outer: PDSim.scroll.common_scroll_geo.CVInvolute\n The values for the outer involute of this chamber ", 0},
  {(char *)"has_line_1", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_has_line_1, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_has_line_1, (char *)"has_line_1: 'bool'\n Boolean for existence of the line #1 ", 0},
  {(char *)"has_line_2", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_has_line_2, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_has_line_2, (char *)"has_line_2: 'bool'\n Boolean for existence of the line #2 ", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5PDSim_6scroll_17common_scroll_geo_CVInvolutes = {
  PyVarObject_HEAD_INIT(0, 0)
  "PDSim.scroll.common_scroll_geo.CVInvolutes", /*tp_name*/
  sizeof(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5PDSim_6scroll_17common_scroll_geo_CVInvolutes, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_3__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "CVInvolutes()", /*tp_doc*/
  __pyx_tp_traverse_5PDSim_6scroll_17common_scroll_geo_CVInvolutes, /*tp_traverse*/
  __pyx_tp_clear_5PDSim_6scroll_17common_scroll_geo_CVInvolutes, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5PDSim_6scroll_17common_scroll_geo_CVInvolutes, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5PDSim_6scroll_17common_scroll_geo_CVInvolutes, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_5PDSim_6scroll_17common_scroll_geo_11CVInvolutes_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5PDSim_6scroll_17common_scroll_geo_CVInvolutes, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};
static struct __pyx_vtabstruct_5PDSim_6scroll_17common_scroll_geo_geoVals __pyx_vtable_5PDSim_6scroll_17common_scroll_geo_geoVals;

static PyObject *__pyx_tp_new_5PDSim_6scroll_17common_scroll_geo_geoVals(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)o);
  p->__pyx_vtab = __pyx_vtabptr_5PDSim_6scroll_17common_scroll_geo_geoVals;
  p->xvec_disc_port = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  p->yvec_disc_port = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_5PDSim_6scroll_17common_scroll_geo_geoVals(PyObject *o) {
  struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *p = (struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->xvec_disc_port);
  Py_CLEAR(p->yvec_disc_port);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_5PDSim_6scroll_17common_scroll_geo_geoVals(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *p = (struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)o;
  if (p->xvec_disc_port) {
    e = (*v)(((PyObject *)p->xvec_disc_port), a); if (e) return e;
  }
  if (p->yvec_disc_port) {
    e = (*v)(((PyObject *)p->yvec_disc_port), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5PDSim_6scroll_17common_scroll_geo_geoVals(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *p = (struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *)o;
  tmp = ((PyObject*)p->xvec_disc_port);
  p->xvec_disc_port = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->yvec_disc_port);
  p->yvec_disc_port = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_ie(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_6phi_ie_1__get__(o);
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_is(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_6phi_is_1__get__(o);
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_i0(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_6phi_i0_1__get__(o);
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_oe(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_6phi_oe_1__get__(o);
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_os(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_6phi_os_1__get__(o);
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_o0(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_6phi_o0_1__get__(o);
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_h(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_1h_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_h(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_1h_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_ro(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_2ro_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_ro(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_2ro_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_rb(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_2rb_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_rb(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_2rb_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_t(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_1t_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_t(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_1t_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_fi0(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fi0_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_fi0(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fi0_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_fis(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fis_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_fis(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fis_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_fie(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fie_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_fie(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fie_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_fo0(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fo0_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_fo0(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fo0_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_fos(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fos_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_fos(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_fos_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_foe(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_foe_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_foe(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_foe_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_oi0(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_oi0_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_oi0(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_oi0_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_ois(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_ois_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_ois(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_ois_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_oie(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_oie_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_oie(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_oie_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_oo0(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_oo0_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_oo0(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_oo0_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_oos(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_oos_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_oos(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_oos_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_ooe(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_ooe_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_ooe(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7phi_ooe_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_xa_arc1(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7xa_arc1_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_xa_arc1(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7xa_arc1_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_ya_arc1(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7ya_arc1_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_ya_arc1(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7ya_arc1_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_ra_arc1(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7ra_arc1_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_ra_arc1(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7ra_arc1_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_t1_arc1(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t1_arc1_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_t1_arc1(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t1_arc1_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_t2_arc1(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t2_arc1_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_t2_arc1(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t2_arc1_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_xa_arc2(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7xa_arc2_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_xa_arc2(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7xa_arc2_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_ya_arc2(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7ya_arc2_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_ya_arc2(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7ya_arc2_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_ra_arc2(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7ra_arc2_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_ra_arc2(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7ra_arc2_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_t1_arc2(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t1_arc2_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_t1_arc2(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t1_arc2_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_t2_arc2(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t2_arc2_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_t2_arc2(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t2_arc2_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_b_line(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_6b_line_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_b_line(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_6b_line_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_t1_line(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t1_line_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_t1_line(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t1_line_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_t2_line(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t2_line_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_t2_line(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7t2_line_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_m_line(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_6m_line_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_m_line(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_6m_line_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_x0_wall(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7x0_wall_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_x0_wall(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7x0_wall_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_y0_wall(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7y0_wall_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_y0_wall(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7y0_wall_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_r_wall(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_6r_wall_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_r_wall(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_6r_wall_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_delta_radial(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_12delta_radial_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_delta_radial(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_12delta_radial_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_delta_flank(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_11delta_flank_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_delta_flank(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_11delta_flank_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_ie_offset(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_13phi_ie_offset_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_ie_offset(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_13phi_ie_offset_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_delta_suction_offset(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_20delta_suction_offset_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_delta_suction_offset(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_20delta_suction_offset_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_cx_scroll(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_9cx_scroll_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_cx_scroll(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_9cx_scroll_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_cy_scroll(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_9cy_scroll_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_cy_scroll(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_9cy_scroll_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_V_scroll(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_8V_scroll_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_V_scroll(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_8V_scroll_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_Vremove(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7Vremove_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_Vremove(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7Vremove_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_xvec_disc_port(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_14xvec_disc_port_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_xvec_disc_port(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_14xvec_disc_port_3__set__(o, v);
  }
  else {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_14xvec_disc_port_5__del__(o);
  }
}

static PyObject *__pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_yvec_disc_port(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_14yvec_disc_port_1__get__(o);
}

static int __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_yvec_disc_port(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_14yvec_disc_port_3__set__(o, v);
  }
  else {
    return __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_14yvec_disc_port_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_5PDSim_6scroll_17common_scroll_geo_geoVals[] = {
  {"__reduce__", (PyCFunction)__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_3__reduce__, METH_NOARGS, __pyx_doc_5PDSim_6scroll_17common_scroll_geo_7geoVals_2__reduce__},
  {"val_if_symmetric", (PyCFunction)__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_7val_if_symmetric, METH_O, __pyx_doc_5PDSim_6scroll_17common_scroll_geo_7geoVals_6val_if_symmetric},
  {"copy_inplace", (PyCFunction)__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_9copy_inplace, METH_O, __pyx_doc_5PDSim_6scroll_17common_scroll_geo_7geoVals_8copy_inplace},
  {"is_symmetric", (PyCFunction)__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_11is_symmetric, METH_NOARGS, __pyx_doc_5PDSim_6scroll_17common_scroll_geo_7geoVals_10is_symmetric},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5PDSim_6scroll_17common_scroll_geo_geoVals[] = {
  {(char *)"phi_ie", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_ie, 0, (char *)" Inner Ending Angle ", 0},
  {(char *)"phi_is", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_is, 0, (char *)" Inner Starting Angle ", 0},
  {(char *)"phi_i0", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_i0, 0, (char *)" Inner Initial Angle ", 0},
  {(char *)"phi_oe", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_oe, 0, (char *)" Outer Ending Angle ", 0},
  {(char *)"phi_os", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_os, 0, (char *)" Outer Starting Angle ", 0},
  {(char *)"phi_o0", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_o0, 0, (char *)" Outer Initial Angle ", 0},
  {(char *)"h", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_h, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_h, (char *)"h: 'double'", 0},
  {(char *)"ro", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_ro, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_ro, (char *)"ro: 'double'", 0},
  {(char *)"rb", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_rb, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_rb, (char *)"rb: 'double'", 0},
  {(char *)"t", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_t, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_t, (char *)"t: 'double'", 0},
  {(char *)"phi_fi0", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_fi0, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_fi0, (char *)"phi_fi0: 'double'", 0},
  {(char *)"phi_fis", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_fis, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_fis, (char *)"phi_fis: 'double'", 0},
  {(char *)"phi_fie", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_fie, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_fie, (char *)"phi_fie: 'double'", 0},
  {(char *)"phi_fo0", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_fo0, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_fo0, (char *)"phi_fo0: 'double'", 0},
  {(char *)"phi_fos", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_fos, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_fos, (char *)"phi_fos: 'double'", 0},
  {(char *)"phi_foe", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_foe, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_foe, (char *)"phi_foe: 'double'", 0},
  {(char *)"phi_oi0", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_oi0, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_oi0, (char *)"phi_oi0: 'double'", 0},
  {(char *)"phi_ois", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_ois, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_ois, (char *)"phi_ois: 'double'", 0},
  {(char *)"phi_oie", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_oie, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_oie, (char *)"phi_oie: 'double'", 0},
  {(char *)"phi_oo0", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_oo0, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_oo0, (char *)"phi_oo0: 'double'", 0},
  {(char *)"phi_oos", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_oos, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_oos, (char *)"phi_oos: 'double'", 0},
  {(char *)"phi_ooe", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_ooe, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_ooe, (char *)"phi_ooe: 'double'", 0},
  {(char *)"xa_arc1", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_xa_arc1, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_xa_arc1, (char *)"xa_arc1: 'double'", 0},
  {(char *)"ya_arc1", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_ya_arc1, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_ya_arc1, (char *)"ya_arc1: 'double'", 0},
  {(char *)"ra_arc1", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_ra_arc1, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_ra_arc1, (char *)"ra_arc1: 'double'", 0},
  {(char *)"t1_arc1", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_t1_arc1, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_t1_arc1, (char *)"t1_arc1: 'double'", 0},
  {(char *)"t2_arc1", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_t2_arc1, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_t2_arc1, (char *)"t2_arc1: 'double'", 0},
  {(char *)"xa_arc2", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_xa_arc2, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_xa_arc2, (char *)"xa_arc2: 'double'", 0},
  {(char *)"ya_arc2", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_ya_arc2, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_ya_arc2, (char *)"ya_arc2: 'double'", 0},
  {(char *)"ra_arc2", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_ra_arc2, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_ra_arc2, (char *)"ra_arc2: 'double'", 0},
  {(char *)"t1_arc2", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_t1_arc2, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_t1_arc2, (char *)"t1_arc2: 'double'", 0},
  {(char *)"t2_arc2", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_t2_arc2, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_t2_arc2, (char *)"t2_arc2: 'double'", 0},
  {(char *)"b_line", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_b_line, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_b_line, (char *)"b_line: 'double'", 0},
  {(char *)"t1_line", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_t1_line, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_t1_line, (char *)"t1_line: 'double'", 0},
  {(char *)"t2_line", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_t2_line, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_t2_line, (char *)"t2_line: 'double'", 0},
  {(char *)"m_line", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_m_line, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_m_line, (char *)"m_line: 'double'", 0},
  {(char *)"x0_wall", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_x0_wall, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_x0_wall, (char *)"x0_wall: 'double'", 0},
  {(char *)"y0_wall", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_y0_wall, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_y0_wall, (char *)"y0_wall: 'double'", 0},
  {(char *)"r_wall", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_r_wall, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_r_wall, (char *)"r_wall: 'double'", 0},
  {(char *)"delta_radial", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_delta_radial, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_delta_radial, (char *)"delta_radial: 'double'", 0},
  {(char *)"delta_flank", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_delta_flank, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_delta_flank, (char *)"delta_flank: 'double'", 0},
  {(char *)"phi_ie_offset", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_ie_offset, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_phi_ie_offset, (char *)"phi_ie_offset: 'double'", 0},
  {(char *)"delta_suction_offset", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_delta_suction_offset, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_delta_suction_offset, (char *)"delta_suction_offset: 'double'", 0},
  {(char *)"cx_scroll", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_cx_scroll, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_cx_scroll, (char *)"cx_scroll: 'double'", 0},
  {(char *)"cy_scroll", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_cy_scroll, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_cy_scroll, (char *)"cy_scroll: 'double'", 0},
  {(char *)"V_scroll", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_V_scroll, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_V_scroll, (char *)"V_scroll: 'double'", 0},
  {(char *)"Vremove", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_Vremove, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_Vremove, (char *)"Vremove: 'double'", 0},
  {(char *)"xvec_disc_port", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_xvec_disc_port, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_xvec_disc_port, (char *)"xvec_disc_port: numpy.ndarray", 0},
  {(char *)"yvec_disc_port", __pyx_getprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_yvec_disc_port, __pyx_setprop_5PDSim_6scroll_17common_scroll_geo_7geoVals_yvec_disc_port, (char *)"yvec_disc_port: numpy.ndarray", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5PDSim_6scroll_17common_scroll_geo_geoVals = {
  PyVarObject_HEAD_INIT(0, 0)
  "PDSim.scroll.common_scroll_geo.geoVals", /*tp_name*/
  sizeof(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5PDSim_6scroll_17common_scroll_geo_geoVals, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_5__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "geoVals()", /*tp_doc*/
  __pyx_tp_traverse_5PDSim_6scroll_17common_scroll_geo_geoVals, /*tp_traverse*/
  __pyx_tp_clear_5PDSim_6scroll_17common_scroll_geo_geoVals, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5PDSim_6scroll_17common_scroll_geo_geoVals, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5PDSim_6scroll_17common_scroll_geo_geoVals, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_5PDSim_6scroll_17common_scroll_geo_7geoVals_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5PDSim_6scroll_17common_scroll_geo_geoVals, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyMethodDef __pyx_methods[] = {
  {"min2", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5PDSim_6scroll_17common_scroll_geo_1min2, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5PDSim_6scroll_17common_scroll_geo_min2},
  {"max2", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5PDSim_6scroll_17common_scroll_geo_3max2, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5PDSim_6scroll_17common_scroll_geo_2max2},
  {"VdV", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5PDSim_6scroll_17common_scroll_geo_7VdV, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5PDSim_6scroll_17common_scroll_geo_6VdV},
  {"forces", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5PDSim_6scroll_17common_scroll_geo_9forces, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5PDSim_6scroll_17common_scroll_geo_8forces},
  {"fxA", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5PDSim_6scroll_17common_scroll_geo_11fxA, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5PDSim_6scroll_17common_scroll_geo_10fxA},
  {"fyA", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5PDSim_6scroll_17common_scroll_geo_13fyA, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5PDSim_6scroll_17common_scroll_geo_12fyA},
  {"fFx_p", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5PDSim_6scroll_17common_scroll_geo_15fFx_p, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5PDSim_6scroll_17common_scroll_geo_14fFx_p},
  {"fFy_p", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5PDSim_6scroll_17common_scroll_geo_17fFy_p, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5PDSim_6scroll_17common_scroll_geo_16fFy_p},
  {"fMO_p", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5PDSim_6scroll_17common_scroll_geo_19fMO_p, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5PDSim_6scroll_17common_scroll_geo_18fMO_p},
  {"involute_index_to_key", (PyCFunction)__pyx_pw_5PDSim_6scroll_17common_scroll_geo_21involute_index_to_key, METH_O, __pyx_doc_5PDSim_6scroll_17common_scroll_geo_20involute_index_to_key},
  {"Gr", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5PDSim_6scroll_17common_scroll_geo_23Gr, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5PDSim_6scroll_17common_scroll_geo_22Gr},
  {"dGr_dphi", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5PDSim_6scroll_17common_scroll_geo_25dGr_dphi, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5PDSim_6scroll_17common_scroll_geo_24dGr_dphi},
  {"dGr_dtheta", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5PDSim_6scroll_17common_scroll_geo_27dGr_dtheta, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5PDSim_6scroll_17common_scroll_geo_26dGr_dtheta},
  {"sortAnglesCCW", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5PDSim_6scroll_17common_scroll_geo_29sortAnglesCCW, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5PDSim_6scroll_17common_scroll_geo_28sortAnglesCCW},
  {"sortAnglesCW", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5PDSim_6scroll_17common_scroll_geo_31sortAnglesCW, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5PDSim_6scroll_17common_scroll_geo_30sortAnglesCW},
  {"get_compressor_CV_index", (PyCFunction)__pyx_pw_5PDSim_6scroll_17common_scroll_geo_33get_compressor_CV_index, METH_O, __pyx_doc_5PDSim_6scroll_17common_scroll_geo_32get_compressor_CV_index},
  {"get_compression_chamber_index", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5PDSim_6scroll_17common_scroll_geo_35get_compression_chamber_index, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5PDSim_6scroll_17common_scroll_geo_34get_compression_chamber_index},
  {"_coords_inv_np", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5PDSim_6scroll_17common_scroll_geo_43_coords_inv_np, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5PDSim_6scroll_17common_scroll_geo_42_coords_inv_np},
  {"_coords_inv_d", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5PDSim_6scroll_17common_scroll_geo_45_coords_inv_d, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5PDSim_6scroll_17common_scroll_geo_44_coords_inv_d},
  {"coords_inv", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5PDSim_6scroll_17common_scroll_geo_47coords_inv, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5PDSim_6scroll_17common_scroll_geo_46coords_inv},
  {"coords_norm", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5PDSim_6scroll_17common_scroll_geo_49coords_norm, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5PDSim_6scroll_17common_scroll_geo_48coords_norm},
  {"scroll_wrap", (PyCFunction)__pyx_pw_5PDSim_6scroll_17common_scroll_geo_51scroll_wrap, METH_O, __pyx_doc_5PDSim_6scroll_17common_scroll_geo_50scroll_wrap},
  {"involute_heat_transfer", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5PDSim_6scroll_17common_scroll_geo_53involute_heat_transfer, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5PDSim_6scroll_17common_scroll_geo_52involute_heat_transfer},
  {0, 0, 0, 0}
};

#if PY_MAJOR_VERSION >= 3
#if CYTHON_PEP489_MULTI_PHASE_INIT
static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
static int __pyx_pymod_exec_common_scroll_geo(PyObject* module); /*proto*/
static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  {Py_mod_create, (void*)__pyx_pymod_create},
  {Py_mod_exec, (void*)__pyx_pymod_exec_common_scroll_geo},
  {0, NULL}
};
#endif

static struct PyModuleDef __pyx_moduledef = {
    PyModuleDef_HEAD_INIT,
    "common_scroll_geo",
    0, /* m_doc */
  #if CYTHON_PEP489_MULTI_PHASE_INIT
    0, /* m_size */
  #else
    -1, /* m_size */
  #endif
    __pyx_methods /* m_methods */,
  #if CYTHON_PEP489_MULTI_PHASE_INIT
    __pyx_moduledef_slots, /* m_slots */
  #else
    NULL, /* m_reload */
  #endif
    NULL, /* m_traverse */
    NULL, /* m_clear */
    NULL /* m_free */
};
#endif
#ifndef CYTHON_SMALL_CODE
#if defined(__clang__)
    #define CYTHON_SMALL_CODE
#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
    #define CYTHON_SMALL_CODE __attribute__((cold))
#else
    #define CYTHON_SMALL_CODE
#endif
#endif

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  {&__pyx_kp_s_, __pyx_k_, sizeof(__pyx_k_), 0, 0, 1, 0},
  {&__pyx_n_s_A, __pyx_k_A, sizeof(__pyx_k_A), 0, 0, 1, 1},
  {&__pyx_n_s_AttributeError, __pyx_k_AttributeError, sizeof(__pyx_k_AttributeError), 0, 0, 1, 1},
  {&__pyx_n_s_CVInvolute, __pyx_k_CVInvolute, sizeof(__pyx_k_CVInvolute), 0, 0, 1, 1},
  {&__pyx_n_s_CVInvolutes, __pyx_k_CVInvolutes, sizeof(__pyx_k_CVInvolutes), 0, 0, 1, 1},
  {&__pyx_kp_s_Expected_at_least_d_argument_s_g, __pyx_k_Expected_at_least_d_argument_s_g, sizeof(__pyx_k_Expected_at_least_d_argument_s_g), 0, 0, 1, 0},
  {&__pyx_kp_u_Format_string_allocated_too_shor, __pyx_k_Format_string_allocated_too_shor, sizeof(__pyx_k_Format_string_allocated_too_shor), 0, 1, 0, 0},
  {&__pyx_kp_u_Format_string_allocated_too_shor_2, __pyx_k_Format_string_allocated_too_shor_2, sizeof(__pyx_k_Format_string_allocated_too_shor_2), 0, 1, 0, 0},
  {&__pyx_kp_s_Function_call_with_ambiguous_arg, __pyx_k_Function_call_with_ambiguous_arg, sizeof(__pyx_k_Function_call_with_ambiguous_arg), 0, 0, 1, 0},
  {&__pyx_n_s_HTAnglesClass, __pyx_k_HTAnglesClass, sizeof(__pyx_k_HTAnglesClass), 0, 0, 1, 1},
  {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0x78, __pyx_k_Incompatible_checksums_s_vs_0x78, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x78), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0x7a, __pyx_k_Incompatible_checksums_s_vs_0x7a, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x7a), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0xbb, __pyx_k_Incompatible_checksums_s_vs_0xbb, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xbb), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0xbd, __pyx_k_Incompatible_checksums_s_vs_0xbd, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xbd), 0, 0, 1, 0},
  {&__pyx_kp_s_Inner_involute_i_s, __pyx_k_Inner_involute_i_s, sizeof(__pyx_k_Inner_involute_i_s), 0, 0, 1, 0},
  {&__pyx_kp_s_Inner_phi_0_i_g, __pyx_k_Inner_phi_0_i_g, sizeof(__pyx_k_Inner_phi_0_i_g), 0, 0, 1, 0},
  {&__pyx_kp_s_Inner_phi_max_i_g, __pyx_k_Inner_phi_max_i_g, sizeof(__pyx_k_Inner_phi_max_i_g), 0, 0, 1, 0},
  {&__pyx_kp_s_Inner_phi_min_i_g, __pyx_k_Inner_phi_min_i_g, sizeof(__pyx_k_Inner_phi_min_i_g), 0, 0, 1, 0},
  {&__pyx_kp_s_Involute_is_invalid, __pyx_k_Involute_is_invalid, sizeof(__pyx_k_Involute_is_invalid), 0, 0, 1, 0},
  {&__pyx_n_s_M_O_p, __pyx_k_M_O_p, sizeof(__pyx_k_M_O_p), 0, 0, 1, 1},
  {&__pyx_n_s_N, __pyx_k_N, sizeof(__pyx_k_N), 0, 0, 1, 1},
  {&__pyx_kp_s_No_matching_signature_found, __pyx_k_No_matching_signature_found, sizeof(__pyx_k_No_matching_signature_found), 0, 0, 1, 0},
  {&__pyx_kp_u_Non_native_byte_order_not_suppor, __pyx_k_Non_native_byte_order_not_suppor, sizeof(__pyx_k_Non_native_byte_order_not_suppor), 0, 1, 0, 0},
  {&__pyx_kp_s_Outer_involute_i_s, __pyx_k_Outer_involute_i_s, sizeof(__pyx_k_Outer_involute_i_s), 0, 0, 1, 0},
  {&__pyx_kp_s_Outer_phi_0_i_g, __pyx_k_Outer_phi_0_i_g, sizeof(__pyx_k_Outer_phi_0_i_g), 0, 0, 1, 0},
  {&__pyx_kp_s_Outer_phi_max_i_g, __pyx_k_Outer_phi_max_i_g, sizeof(__pyx_k_Outer_phi_max_i_g), 0, 0, 1, 0},
  {&__pyx_kp_s_Outer_phi_min_i_g, __pyx_k_Outer_phi_min_i_g, sizeof(__pyx_k_Outer_phi_min_i_g), 0, 0, 1, 0},
  {&__pyx_n_s_PDSim_scroll_common_scroll_geo, __pyx_k_PDSim_scroll_common_scroll_geo, sizeof(__pyx_k_PDSim_scroll_common_scroll_geo), 0, 0, 1, 1},
  {&__pyx_kp_s_PDSim_scroll_common_scroll_geo_p, __pyx_k_PDSim_scroll_common_scroll_geo_p, sizeof(__pyx_k_PDSim_scroll_common_scroll_geo_p), 0, 0, 1, 0},
  {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
  {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
  {&__pyx_kp_s_Symmetric_angle_requested_phi_ie, __pyx_k_Symmetric_angle_requested_phi_ie, sizeof(__pyx_k_Symmetric_angle_requested_phi_ie), 0, 0, 1, 0},
  {&__pyx_n_s_T_CV, __pyx_k_T_CV, sizeof(__pyx_k_T_CV), 0, 0, 1, 1},
  {&__pyx_n_s_T_scroll, __pyx_k_T_scroll, sizeof(__pyx_k_T_scroll), 0, 0, 1, 1},
  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
  {&__pyx_kp_s_Uh_oh_error_in_coords_norm, __pyx_k_Uh_oh_error_in_coords_norm, sizeof(__pyx_k_Uh_oh_error_in_coords_norm), 0, 0, 1, 0},
  {&__pyx_n_s_V, __pyx_k_V, sizeof(__pyx_k_V), 0, 0, 1, 1},
  {&__pyx_n_s_V_scroll, __pyx_k_V_scroll, sizeof(__pyx_k_V_scroll), 0, 0, 1, 1},
  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
  {&__pyx_n_s_VdVstruct, __pyx_k_VdVstruct, sizeof(__pyx_k_VdVstruct), 0, 0, 1, 1},
  {&__pyx_n_s_Vremove, __pyx_k_Vremove, sizeof(__pyx_k_Vremove), 0, 0, 1, 1},
  {&__pyx_kp_s__17, __pyx_k__17, sizeof(__pyx_k__17), 0, 0, 1, 0},
  {&__pyx_kp_s__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 0, 1, 0},
  {&__pyx_kp_s__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 0, 1, 0},
  {&__pyx_kp_s__7, __pyx_k__7, sizeof(__pyx_k__7), 0, 0, 1, 0},
  {&__pyx_kp_s__8, __pyx_k__8, sizeof(__pyx_k__8), 0, 0, 1, 0},
  {&__pyx_n_s_a, __pyx_k_a, sizeof(__pyx_k_a), 0, 0, 1, 1},
  {&__pyx_n_s_alpha, __pyx_k_alpha, sizeof(__pyx_k_alpha), 0, 0, 1, 1},
  {&__pyx_n_s_area, __pyx_k_area, sizeof(__pyx_k_area), 0, 0, 1, 1},
  {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
  {&__pyx_n_s_array, __pyx_k_array, sizeof(__pyx_k_array), 0, 0, 1, 1},
  {&__pyx_n_s_atr, __pyx_k_atr, sizeof(__pyx_k_atr), 0, 0, 1, 1},
  {&__pyx_n_s_b, __pyx_k_b, sizeof(__pyx_k_b), 0, 0, 1, 1},
  {&__pyx_n_s_b_line, __pyx_k_b_line, sizeof(__pyx_k_b_line), 0, 0, 1, 1},
  {&__pyx_kp_b_c1_1, __pyx_k_c1_1, sizeof(__pyx_k_c1_1), 0, 0, 0, 0},
  {&__pyx_kp_b_c1_10, __pyx_k_c1_10, sizeof(__pyx_k_c1_10), 0, 0, 0, 0},
  {&__pyx_kp_b_c1_2, __pyx_k_c1_2, sizeof(__pyx_k_c1_2), 0, 0, 0, 0},
  {&__pyx_kp_b_c1_3, __pyx_k_c1_3, sizeof(__pyx_k_c1_3), 0, 0, 0, 0},
  {&__pyx_kp_b_c1_4, __pyx_k_c1_4, sizeof(__pyx_k_c1_4), 0, 0, 0, 0},
  {&__pyx_kp_b_c1_5, __pyx_k_c1_5, sizeof(__pyx_k_c1_5), 0, 0, 0, 0},
  {&__pyx_kp_b_c1_6, __pyx_k_c1_6, sizeof(__pyx_k_c1_6), 0, 0, 0, 0},
  {&__pyx_kp_b_c1_7, __pyx_k_c1_7, sizeof(__pyx_k_c1_7), 0, 0, 0, 0},
  {&__pyx_kp_b_c1_8, __pyx_k_c1_8, sizeof(__pyx_k_c1_8), 0, 0, 0, 0},
  {&__pyx_kp_b_c1_9, __pyx_k_c1_9, sizeof(__pyx_k_c1_9), 0, 0, 0, 0},
  {&__pyx_kp_b_c2_1, __pyx_k_c2_1, sizeof(__pyx_k_c2_1), 0, 0, 0, 0},
  {&__pyx_kp_b_c2_10, __pyx_k_c2_10, sizeof(__pyx_k_c2_10), 0, 0, 0, 0},
  {&__pyx_kp_b_c2_2, __pyx_k_c2_2, sizeof(__pyx_k_c2_2), 0, 0, 0, 0},
  {&__pyx_kp_b_c2_3, __pyx_k_c2_3, sizeof(__pyx_k_c2_3), 0, 0, 0, 0},
  {&__pyx_kp_b_c2_4, __pyx_k_c2_4, sizeof(__pyx_k_c2_4), 0, 0, 0, 0},
  {&__pyx_kp_b_c2_5, __pyx_k_c2_5, sizeof(__pyx_k_c2_5), 0, 0, 0, 0},
  {&__pyx_kp_b_c2_6, __pyx_k_c2_6, sizeof(__pyx_k_c2_6), 0, 0, 0, 0},
  {&__pyx_kp_b_c2_7, __pyx_k_c2_7, sizeof(__pyx_k_c2_7), 0, 0, 0, 0},
  {&__pyx_kp_b_c2_8, __pyx_k_c2_8, sizeof(__pyx_k_c2_8), 0, 0, 0, 0},
  {&__pyx_kp_b_c2_9, __pyx_k_c2_9, sizeof(__pyx_k_c2_9), 0, 0, 0, 0},
  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
  {&__pyx_n_s_copy_inplace, __pyx_k_copy_inplace, sizeof(__pyx_k_copy_inplace), 0, 0, 1, 1},
  {&__pyx_n_s_cos, __pyx_k_cos, sizeof(__pyx_k_cos), 0, 0, 1, 1},
  {&__pyx_n_s_cx, __pyx_k_cx, sizeof(__pyx_k_cx), 0, 0, 1, 1},
  {&__pyx_n_s_cx_scroll, __pyx_k_cx_scroll, sizeof(__pyx_k_cx_scroll), 0, 0, 1, 1},
  {&__pyx_n_s_cy, __pyx_k_cy, sizeof(__pyx_k_cy), 0, 0, 1, 1},
  {&__pyx_n_s_cy_scroll, __pyx_k_cy_scroll, sizeof(__pyx_k_cy_scroll), 0, 0, 1, 1},
  {&__pyx_n_s_d, __pyx_k_d, sizeof(__pyx_k_d), 0, 0, 1, 1},
  {&__pyx_n_b_d1, __pyx_k_d1, sizeof(__pyx_k_d1), 0, 0, 0, 1},
  {&__pyx_n_b_d2, __pyx_k_d2, sizeof(__pyx_k_d2), 0, 0, 0, 1},
  {&__pyx_n_s_dT_dphi, __pyx_k_dT_dphi, sizeof(__pyx_k_dT_dphi), 0, 0, 1, 1},
  {&__pyx_n_s_dV, __pyx_k_dV, sizeof(__pyx_k_dV), 0, 0, 1, 1},
  {&__pyx_n_b_dd, __pyx_k_dd, sizeof(__pyx_k_dd), 0, 0, 0, 1},
  {&__pyx_n_b_ddd, __pyx_k_ddd, sizeof(__pyx_k_ddd), 0, 0, 0, 1},
  {&__pyx_n_s_defaults, __pyx_k_defaults, sizeof(__pyx_k_defaults), 0, 0, 1, 1},
  {&__pyx_n_s_delta_flank, __pyx_k_delta_flank, sizeof(__pyx_k_delta_flank), 0, 0, 1, 1},
  {&__pyx_n_s_delta_radial, __pyx_k_delta_radial, sizeof(__pyx_k_delta_radial), 0, 0, 1, 1},
  {&__pyx_n_s_delta_suction_offset, __pyx_k_delta_suction_offset, sizeof(__pyx_k_delta_suction_offset), 0, 0, 1, 1},
  {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
  {&__pyx_n_s_double, __pyx_k_double, sizeof(__pyx_k_double), 0, 0, 1, 1},
  {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
  {&__pyx_n_s_end, __pyx_k_end, sizeof(__pyx_k_end), 0, 0, 1, 1},
  {&__pyx_n_s_fi, __pyx_k_fi, sizeof(__pyx_k_fi), 0, 0, 1, 1},
  {&__pyx_n_s_file, __pyx_k_file, sizeof(__pyx_k_file), 0, 0, 1, 1},
  {&__pyx_n_s_flag, __pyx_k_flag, sizeof(__pyx_k_flag), 0, 0, 1, 1},
  {&__pyx_kp_s_flag_not_valid, __pyx_k_flag_not_valid, sizeof(__pyx_k_flag_not_valid), 0, 0, 1, 0},
  {&__pyx_n_s_fo, __pyx_k_fo, sizeof(__pyx_k_fo), 0, 0, 1, 1},
  {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
  {&__pyx_n_s_fx_p, __pyx_k_fx_p, sizeof(__pyx_k_fx_p), 0, 0, 1, 1},
  {&__pyx_n_s_fy_p, __pyx_k_fy_p, sizeof(__pyx_k_fy_p), 0, 0, 1, 1},
  {&__pyx_n_s_fz_p, __pyx_k_fz_p, sizeof(__pyx_k_fz_p), 0, 0, 1, 1},
  {&__pyx_n_s_geo, __pyx_k_geo, sizeof(__pyx_k_geo), 0, 0, 1, 1},
  {&__pyx_n_s_geoVals, __pyx_k_geoVals, sizeof(__pyx_k_geoVals), 0, 0, 1, 1},
  {&__pyx_kp_s_geoVals_instance_at, __pyx_k_geoVals_instance_at, sizeof(__pyx_k_geoVals_instance_at), 0, 0, 1, 0},
  {&__pyx_n_s_geoValsvarlist, __pyx_k_geoValsvarlist, sizeof(__pyx_k_geoValsvarlist), 0, 0, 1, 1},
  {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
  {&__pyx_n_s_h, __pyx_k_h, sizeof(__pyx_k_h), 0, 0, 1, 1},
  {&__pyx_kp_s_has_line_1_i_g, __pyx_k_has_line_1_i_g, sizeof(__pyx_k_has_line_1_i_g), 0, 0, 1, 0},
  {&__pyx_kp_s_has_line_2_i_g, __pyx_k_has_line_2_i_g, sizeof(__pyx_k_has_line_2_i_g), 0, 0, 1, 0},
  {&__pyx_n_s_hc, __pyx_k_hc, sizeof(__pyx_k_hc), 0, 0, 1, 1},
  {&__pyx_n_s_hs, __pyx_k_hs, sizeof(__pyx_k_hs), 0, 0, 1, 1},
  {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
  {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1},
  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
  {&__pyx_n_s_inv, __pyx_k_inv, sizeof(__pyx_k_inv), 0, 0, 1, 1},
  {&__pyx_n_s_is_symmetric, __pyx_k_is_symmetric, sizeof(__pyx_k_is_symmetric), 0, 0, 1, 1},
  {&__pyx_n_s_j, __pyx_k_j, sizeof(__pyx_k_j), 0, 0, 1, 1},
  {&__pyx_n_s_kwargs, __pyx_k_kwargs, sizeof(__pyx_k_kwargs), 0, 0, 1, 1},
  {&__pyx_n_s_m_line, __pyx_k_m_line, sizeof(__pyx_k_m_line), 0, 0, 1, 1},
  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
  {&__pyx_n_s_ndarray, __pyx_k_ndarray, sizeof(__pyx_k_ndarray), 0, 0, 1, 1},
  {&__pyx_kp_u_ndarray_is_not_C_contiguous, __pyx_k_ndarray_is_not_C_contiguous, sizeof(__pyx_k_ndarray_is_not_C_contiguous), 0, 1, 0, 0},
  {&__pyx_kp_u_ndarray_is_not_Fortran_contiguou, __pyx_k_ndarray_is_not_Fortran_contiguou, sizeof(__pyx_k_ndarray_is_not_Fortran_contiguou), 0, 1, 0, 0},
  {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
  {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1},
  {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1},
  {&__pyx_n_u_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 1, 0, 1},
  {&__pyx_kp_s_numpy_core_multiarray_failed_to, __pyx_k_numpy_core_multiarray_failed_to, sizeof(__pyx_k_numpy_core_multiarray_failed_to), 0, 0, 1, 0},
  {&__pyx_kp_s_numpy_core_umath_failed_to_impor, __pyx_k_numpy_core_umath_failed_to_impor, sizeof(__pyx_k_numpy_core_umath_failed_to_impor), 0, 0, 1, 0},
  {&__pyx_n_s_oi, __pyx_k_oi, sizeof(__pyx_k_oi), 0, 0, 1, 1},
  {&__pyx_n_s_oo, __pyx_k_oo, sizeof(__pyx_k_oo), 0, 0, 1, 1},
  {&__pyx_n_s_path, __pyx_k_path, sizeof(__pyx_k_path), 0, 0, 1, 1},
  {&__pyx_n_s_phi, __pyx_k_phi, sizeof(__pyx_k_phi), 0, 0, 1, 1},
  {&__pyx_n_s_phi0, __pyx_k_phi0, sizeof(__pyx_k_phi0), 0, 0, 1, 1},
  {&__pyx_n_s_phi1, __pyx_k_phi1, sizeof(__pyx_k_phi1), 0, 0, 1, 1},
  {&__pyx_n_s_phi2, __pyx_k_phi2, sizeof(__pyx_k_phi2), 0, 0, 1, 1},
  {&__pyx_n_s_phi_1_i, __pyx_k_phi_1_i, sizeof(__pyx_k_phi_1_i), 0, 0, 1, 1},
  {&__pyx_n_s_phi_1_o, __pyx_k_phi_1_o, sizeof(__pyx_k_phi_1_o), 0, 0, 1, 1},
  {&__pyx_n_s_phi_2_i, __pyx_k_phi_2_i, sizeof(__pyx_k_phi_2_i), 0, 0, 1, 1},
  {&__pyx_n_s_phi_2_o, __pyx_k_phi_2_o, sizeof(__pyx_k_phi_2_o), 0, 0, 1, 1},
  {&__pyx_n_s_phi_fi0, __pyx_k_phi_fi0, sizeof(__pyx_k_phi_fi0), 0, 0, 1, 1},
  {&__pyx_n_s_phi_fie, __pyx_k_phi_fie, sizeof(__pyx_k_phi_fie), 0, 0, 1, 1},
  {&__pyx_n_s_phi_fis, __pyx_k_phi_fis, sizeof(__pyx_k_phi_fis), 0, 0, 1, 1},
  {&__pyx_n_s_phi_fo0, __pyx_k_phi_fo0, sizeof(__pyx_k_phi_fo0), 0, 0, 1, 1},
  {&__pyx_n_s_phi_foe, __pyx_k_phi_foe, sizeof(__pyx_k_phi_foe), 0, 0, 1, 1},
  {&__pyx_n_s_phi_fos, __pyx_k_phi_fos, sizeof(__pyx_k_phi_fos), 0, 0, 1, 1},
  {&__pyx_n_s_phi_i0, __pyx_k_phi_i0, sizeof(__pyx_k_phi_i0), 0, 0, 1, 1},
  {&__pyx_n_s_phi_ie_offset, __pyx_k_phi_ie_offset, sizeof(__pyx_k_phi_ie_offset), 0, 0, 1, 1},
  {&__pyx_n_s_phi_o0, __pyx_k_phi_o0, sizeof(__pyx_k_phi_o0), 0, 0, 1, 1},
  {&__pyx_n_s_phi_oi0, __pyx_k_phi_oi0, sizeof(__pyx_k_phi_oi0), 0, 0, 1, 1},
  {&__pyx_n_s_phi_oie, __pyx_k_phi_oie, sizeof(__pyx_k_phi_oie), 0, 0, 1, 1},
  {&__pyx_n_s_phi_ois, __pyx_k_phi_ois, sizeof(__pyx_k_phi_ois), 0, 0, 1, 1},
  {&__pyx_n_s_phi_oo0, __pyx_k_phi_oo0, sizeof(__pyx_k_phi_oo0), 0, 0, 1, 1},
  {&__pyx_n_s_phi_ooe, __pyx_k_phi_ooe, sizeof(__pyx_k_phi_ooe), 0, 0, 1, 1},
  {&__pyx_n_s_phi_oos, __pyx_k_phi_oos, sizeof(__pyx_k_phi_oos), 0, 0, 1, 1},
  {&__pyx_n_s_phi_vec, __pyx_k_phi_vec, sizeof(__pyx_k_phi_vec), 0, 0, 1, 1},
  {&__pyx_n_s_phim, __pyx_k_phim, sizeof(__pyx_k_phim), 0, 0, 1, 1},
  {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
  {&__pyx_n_s_plus_one, __pyx_k_plus_one, sizeof(__pyx_k_plus_one), 0, 0, 1, 1},
  {&__pyx_n_s_polyarea, __pyx_k_polyarea, sizeof(__pyx_k_polyarea), 0, 0, 1, 1},
  {&__pyx_n_s_polycentroid, __pyx_k_polycentroid, sizeof(__pyx_k_polycentroid), 0, 0, 1, 1},
  {&__pyx_n_s_print, __pyx_k_print, sizeof(__pyx_k_print), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_fuse_0plus_one, __pyx_k_pyx_fuse_0plus_one, sizeof(__pyx_k_pyx_fuse_0plus_one), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_fuse_1plus_one, __pyx_k_pyx_fuse_1plus_one, sizeof(__pyx_k_pyx_fuse_1plus_one), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_CVInvolute, __pyx_k_pyx_unpickle_CVInvolute, sizeof(__pyx_k_pyx_unpickle_CVInvolute), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_CVInvolutes, __pyx_k_pyx_unpickle_CVInvolutes, sizeof(__pyx_k_pyx_unpickle_CVInvolutes), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_HTAnglesClass, __pyx_k_pyx_unpickle_HTAnglesClass, sizeof(__pyx_k_pyx_unpickle_HTAnglesClass), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_VdVstruct, __pyx_k_pyx_unpickle_VdVstruct, sizeof(__pyx_k_pyx_unpickle_VdVstruct), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
  {&__pyx_n_s_r, __pyx_k_r, sizeof(__pyx_k_r), 0, 0, 1, 1},
  {&__pyx_n_s_r_wall, __pyx_k_r_wall, sizeof(__pyx_k_r_wall), 0, 0, 1, 1},
  {&__pyx_n_s_ra_arc1, __pyx_k_ra_arc1, sizeof(__pyx_k_ra_arc1), 0, 0, 1, 1},
  {&__pyx_n_s_ra_arc2, __pyx_k_ra_arc2, sizeof(__pyx_k_ra_arc2), 0, 0, 1, 1},
  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
  {&__pyx_n_s_rb, __pyx_k_rb, sizeof(__pyx_k_rb), 0, 0, 1, 1},
  {&__pyx_n_s_rebuild_geoVals, __pyx_k_rebuild_geoVals, sizeof(__pyx_k_rebuild_geoVals), 0, 0, 1, 1},
  {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
  {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
  {&__pyx_n_s_ro, __pyx_k_ro, sizeof(__pyx_k_ro), 0, 0, 1, 1},
  {&__pyx_n_b_s1, __pyx_k_s1, sizeof(__pyx_k_s1), 0, 0, 0, 1},
  {&__pyx_n_b_s2, __pyx_k_s2, sizeof(__pyx_k_s2), 0, 0, 0, 1},
  {&__pyx_n_b_sa, __pyx_k_sa, sizeof(__pyx_k_sa), 0, 0, 0, 1},
  {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
  {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_signatures, __pyx_k_signatures, sizeof(__pyx_k_signatures), 0, 0, 1, 1},
  {&__pyx_n_s_sin, __pyx_k_sin, sizeof(__pyx_k_sin), 0, 0, 1, 1},
  {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1},
  {&__pyx_n_s_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1},
  {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
  {&__pyx_n_s_strip, __pyx_k_strip, sizeof(__pyx_k_strip), 0, 0, 1, 1},
  {&__pyx_n_s_sumx, __pyx_k_sumx, sizeof(__pyx_k_sumx), 0, 0, 1, 1},
  {&__pyx_n_s_sumy, __pyx_k_sumy, sizeof(__pyx_k_sumy), 0, 0, 1, 1},
  {&__pyx_n_s_t, __pyx_k_t, sizeof(__pyx_k_t), 0, 0, 1, 1},
  {&__pyx_n_s_t1, __pyx_k_t1, sizeof(__pyx_k_t1), 0, 0, 1, 1},
  {&__pyx_n_s_t1_arc1, __pyx_k_t1_arc1, sizeof(__pyx_k_t1_arc1), 0, 0, 1, 1},
  {&__pyx_n_s_t1_arc2, __pyx_k_t1_arc2, sizeof(__pyx_k_t1_arc2), 0, 0, 1, 1},
  {&__pyx_n_s_t1_line, __pyx_k_t1_line, sizeof(__pyx_k_t1_line), 0, 0, 1, 1},
  {&__pyx_n_s_t2, __pyx_k_t2, sizeof(__pyx_k_t2), 0, 0, 1, 1},
  {&__pyx_n_s_t2_arc1, __pyx_k_t2_arc1, sizeof(__pyx_k_t2_arc1), 0, 0, 1, 1},
  {&__pyx_n_s_t2_arc2, __pyx_k_t2_arc2, sizeof(__pyx_k_t2_arc2), 0, 0, 1, 1},
  {&__pyx_n_s_t2_line, __pyx_k_t2_line, sizeof(__pyx_k_t2_line), 0, 0, 1, 1},
  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
  {&__pyx_n_s_theta, __pyx_k_theta, sizeof(__pyx_k_theta), 0, 0, 1, 1},
  {&__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_k_unknown_dtype_code_in_numpy_pxd, sizeof(__pyx_k_unknown_dtype_code_in_numpy_pxd), 0, 1, 0, 0},
  {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
  {&__pyx_n_s_utf8, __pyx_k_utf8, sizeof(__pyx_k_utf8), 0, 0, 1, 1},
  {&__pyx_n_s_val_if_symmetric, __pyx_k_val_if_symmetric, sizeof(__pyx_k_val_if_symmetric), 0, 0, 1, 1},
  {&__pyx_n_s_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 0, 1, 1},
  {&__pyx_n_s_x0_wall, __pyx_k_x0_wall, sizeof(__pyx_k_x0_wall), 0, 0, 1, 1},
  {&__pyx_n_s_xa_arc1, __pyx_k_xa_arc1, sizeof(__pyx_k_xa_arc1), 0, 0, 1, 1},
  {&__pyx_n_s_xa_arc2, __pyx_k_xa_arc2, sizeof(__pyx_k_xa_arc2), 0, 0, 1, 1},
  {&__pyx_n_s_xi, __pyx_k_xi, sizeof(__pyx_k_xi), 0, 0, 1, 1},
  {&__pyx_n_s_xrange, __pyx_k_xrange, sizeof(__pyx_k_xrange), 0, 0, 1, 1},
  {&__pyx_n_s_y, __pyx_k_y, sizeof(__pyx_k_y), 0, 0, 1, 1},
  {&__pyx_n_s_y0_wall, __pyx_k_y0_wall, sizeof(__pyx_k_y0_wall), 0, 0, 1, 1},
  {&__pyx_n_s_ya_arc1, __pyx_k_ya_arc1, sizeof(__pyx_k_ya_arc1), 0, 0, 1, 1},
  {&__pyx_n_s_ya_arc2, __pyx_k_ya_arc2, sizeof(__pyx_k_ya_arc2), 0, 0, 1, 1},
  {&__pyx_n_s_yi, __pyx_k_yi, sizeof(__pyx_k_yi), 0, 0, 1, 1},
  {&__pyx_n_s_zeros, __pyx_k_zeros, sizeof(__pyx_k_zeros), 0, 0, 1, 1},
  {0, 0, 0, 0, 0, 0, 0}
};
static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 6, __pyx_L1_error)
  __pyx_builtin___import__ = __Pyx_GetBuiltinName(__pyx_n_s_import); if (!__pyx_builtin___import__) __PYX_ERR(0, 6, __pyx_L1_error)
  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 6, __pyx_L1_error)
  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 206, __pyx_L1_error)
  __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(0, 472, __pyx_L1_error)
  __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(0, 570, __pyx_L1_error)
  #if PY_MAJOR_VERSION >= 3
  __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_xrange) __PYX_ERR(0, 806, __pyx_L1_error)
  #else
  __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_xrange); if (!__pyx_builtin_xrange) __PYX_ERR(0, 806, __pyx_L1_error)
  #endif
  __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(3, 856, __pyx_L1_error)
  __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(3, 1038, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "PDSim/scroll/common_scroll_geo.pyx":6
 * import numpy as np
 * 
 * cpdef double_or_numpy plus_one(double_or_numpy x):             # <<<<<<<<<<<<<<
 *     return x + 1.0
 * 
 */
  __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_No_matching_signature_found); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__4);
  __Pyx_GIVEREF(__pyx_tuple__4);
  __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_Function_call_with_ambiguous_arg); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__5);
  __Pyx_GIVEREF(__pyx_tuple__5);

  /* "PDSim/scroll/common_scroll_geo.pyx":20
 *     def __repr__(self):
 *         s = ''
 *         for k in ['phi_1_i','phi_2_i','phi_1_o','phi_2_o','phi_i0','phi_o0']:             # <<<<<<<<<<<<<<
 *             s += k + ' : ' + str(getattr(self,k)) + '\n'
 *         return s
 */
  __pyx_tuple__6 = PyTuple_Pack(6, __pyx_n_s_phi_1_i, __pyx_n_s_phi_2_i, __pyx_n_s_phi_1_o, __pyx_n_s_phi_2_o, __pyx_n_s_phi_i0, __pyx_n_s_phi_o0); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 20, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__6);
  __Pyx_GIVEREF(__pyx_tuple__6);

  /* "PDSim/scroll/common_scroll_geo.pyx":206
 *                 )/2
 *     else:
 *         raise ValueError("Involute is invalid")             # <<<<<<<<<<<<<<
 * 
 * cpdef double fyA(double phi, geoVals geo, double theta, involute_index inv):
 */
  __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_Involute_is_invalid); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__9);
  __Pyx_GIVEREF(__pyx_tuple__9);

  /* "PDSim/scroll/common_scroll_geo.pyx":239
 *         phi_0 = geo.phi_oi0
 *     else:
 *         raise ValueError("Involute is invalid")             # <<<<<<<<<<<<<<
 * 
 *     return -r_b*(-r_b**2*(phi - phi_0)*((phi - phi_0)**2 - 3)*sin(phi)**3/3 - r_b**2*(2*(phi - phi_0)**2 - 3)*cos(phi)
 */
  __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_Involute_is_invalid); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__9);
  __Pyx_GIVEREF(__pyx_tuple__9);

  /* "PDSim/scroll/common_scroll_geo.pyx":270
 *         return geo.h*geo.rb*((phi-geo.phi_oi0)*cos(phi)-sin(phi))
 *     else:
 *         raise ValueError("Involute is invalid")             # <<<<<<<<<<<<<<
 * 
 * cpdef double fFy_p(double phi, geoVals geo, double theta, involute_index inv):
 */
  __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_Involute_is_invalid); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__9);
  __Pyx_GIVEREF(__pyx_tuple__9);

  /* "PDSim/scroll/common_scroll_geo.pyx":296
 *         return geo.h*geo.rb*((phi-geo.phi_oi0)*sin(phi)+cos(phi))
 *     else:
 *         raise ValueError("Involute is invalid")             # <<<<<<<<<<<<<<
 * 
 * cpdef double fMO_p(double phi, geoVals geo, double theta, involute_index inv):
 */
  __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_Involute_is_invalid); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 296, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__9);
  __Pyx_GIVEREF(__pyx_tuple__9);

  /* "PDSim/scroll/common_scroll_geo.pyx":326
 * 
 *     if index == INVOLUTE_FI:
 *         return bytes('fi')             # <<<<<<<<<<<<<<
 *     elif index == INVOLUTE_FO:
 *         return bytes('fo')
 */
  __pyx_tuple__10 = PyTuple_Pack(1, __pyx_n_s_fi); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__10);
  __Pyx_GIVEREF(__pyx_tuple__10);

  /* "PDSim/scroll/common_scroll_geo.pyx":328
 *         return bytes('fi')
 *     elif index == INVOLUTE_FO:
 *         return bytes('fo')             # <<<<<<<<<<<<<<
 *     elif index == INVOLUTE_OI:
 *         return bytes('oi')
 */
  __pyx_tuple__11 = PyTuple_Pack(1, __pyx_n_s_fo); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__11);
  __Pyx_GIVEREF(__pyx_tuple__11);

  /* "PDSim/scroll/common_scroll_geo.pyx":330
 *         return bytes('fo')
 *     elif index == INVOLUTE_OI:
 *         return bytes('oi')             # <<<<<<<<<<<<<<
 *     elif index == INVOLUTE_OO:
 *         return bytes('oo')
 */
  __pyx_tuple__12 = PyTuple_Pack(1, __pyx_n_s_oi); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 330, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__12);
  __Pyx_GIVEREF(__pyx_tuple__12);

  /* "PDSim/scroll/common_scroll_geo.pyx":332
 *         return bytes('oi')
 *     elif index == INVOLUTE_OO:
 *         return bytes('oo')             # <<<<<<<<<<<<<<
 *     else:
 *         return bytes('')
 */
  __pyx_tuple__13 = PyTuple_Pack(1, __pyx_n_s_oo); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__13);
  __Pyx_GIVEREF(__pyx_tuple__13);

  /* "PDSim/scroll/common_scroll_geo.pyx":334
 *         return bytes('oo')
 *     else:
 *         return bytes('')             # <<<<<<<<<<<<<<
 * 
 * cpdef double Gr(double phi, geoVals geo, double theta, int inv):
 */
  __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_s_); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__14);
  __Pyx_GIVEREF(__pyx_tuple__14);

  /* "PDSim/scroll/common_scroll_geo.pyx":406
 *         dy[0] = -ro*cos(om)
 *     else:
 *         raise ValueError('flag not valid')             # <<<<<<<<<<<<<<
 * 
 * cpdef tuple sortAnglesCCW(double t1, double t2):
 */
  __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_s_flag_not_valid); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 406, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__15);
  __Pyx_GIVEREF(__pyx_tuple__15);

  /* "PDSim/scroll/common_scroll_geo.pyx":580
 *             return val
 *         else:
 *             raise ValueError('Symmetric angle requested (phi_ie, phi_is, phi_i0, etc.) but the geometry is not symmetric')             # <<<<<<<<<<<<<<
 * 
 *     cpdef copy_inplace(self, geoVals target):
 */
  __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_s_Symmetric_angle_requested_phi_ie); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 580, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__18);
  __Pyx_GIVEREF(__pyx_tuple__18);

  /* "PDSim/scroll/common_scroll_geo.pyx":675
 *         y = -rb*np.sin(phi)+rb*(phi-geo.phi_oo0)*np.cos(phi)+ro*np.sin(om)
 *     else:
 *         raise ValueError('flag not valid')             # <<<<<<<<<<<<<<
 *     return (x,y)
 * 
 */
  __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_s_flag_not_valid); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__15);
  __Pyx_GIVEREF(__pyx_tuple__15);

  /* "PDSim/scroll/common_scroll_geo.pyx":700
 *         y[0] = -rb*sin(phi)+rb*(phi-geo.phi_oo0)*cos(phi)+ro*sin(om)
 *     else:
 *         raise ValueError('flag not valid')             # <<<<<<<<<<<<<<
 * 
 * cdef _dcoords_inv_dphi_int(double phi, geoVals geo,double theta, int flag, double *dxdphi, double *dydphi):
 */
  __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_s_flag_not_valid); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 700, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__15);
  __Pyx_GIVEREF(__pyx_tuple__15);

  /* "PDSim/scroll/common_scroll_geo.pyx":722
 *         dydphi[0] = -geo.rb*(phi-phi_0)*sin(phi)
 *     else:
 *         raise ValueError('flag not valid')             # <<<<<<<<<<<<<<
 * 
 * cpdef tuple _coords_inv_d(double phi, geoVals geo,double theta, flag=""):
 */
  __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_s_flag_not_valid); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 722, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__15);
  __Pyx_GIVEREF(__pyx_tuple__15);

  /* "PDSim/scroll/common_scroll_geo.pyx":746
 *         y = -rb*sin(phi)+rb*(phi-geo.phi_oo0)*cos(phi)+ro*sin(om)
 *     else:
 *         raise ValueError('flag not valid')             # <<<<<<<<<<<<<<
 *     return (x,y)
 * 
 */
  __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_s_flag_not_valid); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 746, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__15);
  __Pyx_GIVEREF(__pyx_tuple__15);

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":272
 *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
 *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not C contiguous")             # <<<<<<<<<<<<<<
 * 
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
 */
  __pyx_tuple__25 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(3, 272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__25);
  __Pyx_GIVEREF(__pyx_tuple__25);

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":276
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
 *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not Fortran contiguous")             # <<<<<<<<<<<<<<
 * 
 *             info.buf = PyArray_DATA(self)
 */
  __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(3, 276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__26);
  __Pyx_GIVEREF(__pyx_tuple__26);

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":306
 *                 if ((descr.byteorder == c'>' and little_endian) or
 *                     (descr.byteorder == c'<' and not little_endian)):
 *                     raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
 *                 if   t == NPY_BYTE:        f = "b"
 *                 elif t == NPY_UBYTE:       f = "B"
 */
  __pyx_tuple__27 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(3, 306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__27);
  __Pyx_GIVEREF(__pyx_tuple__27);

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":856
 * 
 *         if (end - f) - <int>(new_offset - offset[0]) < 15:
 *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")             # <<<<<<<<<<<<<<
 * 
 *         if ((child.byteorder == c'>' and little_endian) or
 */
  __pyx_tuple__28 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(3, 856, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__28);
  __Pyx_GIVEREF(__pyx_tuple__28);

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":860
 *         if ((child.byteorder == c'>' and little_endian) or
 *             (child.byteorder == c'<' and not little_endian)):
 *             raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
 *             # One could encode it in the format string and have Cython
 *             # complain instead, BUT: < and > in format strings also imply
 */
  __pyx_tuple__27 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(3, 860, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__27);
  __Pyx_GIVEREF(__pyx_tuple__27);

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":880
 *             t = child.type_num
 *             if end - f < 5:
 *                 raise RuntimeError(u"Format string allocated too short.")             # <<<<<<<<<<<<<<
 * 
 *             # Until ticket #99 is fixed, use integers to avoid warnings
 */
  __pyx_tuple__29 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(3, 880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__29);
  __Pyx_GIVEREF(__pyx_tuple__29);

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1038
 *         _import_array()
 *     except Exception:
 *         raise ImportError("numpy.core.multiarray failed to import")             # <<<<<<<<<<<<<<
 * 
 * cdef inline int import_umath() except -1:
 */
  __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(3, 1038, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__30);
  __Pyx_GIVEREF(__pyx_tuple__30);

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1044
 *         _import_umath()
 *     except Exception:
 *         raise ImportError("numpy.core.umath failed to import")             # <<<<<<<<<<<<<<
 * 
 * cdef inline int import_ufunc() except -1:
 */
  __pyx_tuple__31 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(3, 1044, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__31);
  __Pyx_GIVEREF(__pyx_tuple__31);

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1050
 *         _import_umath()
 *     except Exception:
 *         raise ImportError("numpy.core.umath failed to import")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__31 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(3, 1050, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__31);
  __Pyx_GIVEREF(__pyx_tuple__31);

  /* "PDSim/scroll/common_scroll_geo.pyx":6
 * import numpy as np
 * 
 * cpdef double_or_numpy plus_one(double_or_numpy x):             # <<<<<<<<<<<<<<
 *     return x + 1.0
 * 
 */
  __pyx_tuple__32 = PyTuple_Pack(2, __pyx_n_s_x, __pyx_n_s_x); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__32);
  __Pyx_GIVEREF(__pyx_tuple__32);
  __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PDSim_scroll_common_scroll_geo_p, __pyx_n_s_pyx_fuse_0plus_one, 6, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) __PYX_ERR(0, 6, __pyx_L1_error)

  /* "PDSim/scroll/common_scroll_geo.pyx":552
 *                 'cx_scroll','cy_scroll','V_scroll','Vremove']
 * 
 * def rebuild_geoVals(d):             # <<<<<<<<<<<<<<
 *     geo = geoVals()
 *     for atr in geoValsvarlist:
 */
  __pyx_tuple__34 = PyTuple_Pack(3, __pyx_n_s_d, __pyx_n_s_geo, __pyx_n_s_atr); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__34);
  __Pyx_GIVEREF(__pyx_tuple__34);
  __pyx_codeobj__16 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PDSim_scroll_common_scroll_geo_p, __pyx_n_s_rebuild_geoVals, 552, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__16)) __PYX_ERR(0, 552, __pyx_L1_error)

  /* "PDSim/scroll/common_scroll_geo.pyx":631
 *                 )
 * 
 * def polyarea(x,y):             # <<<<<<<<<<<<<<
 *     N=len(x)
 *     area = 0.0
 */
  __pyx_tuple__35 = PyTuple_Pack(6, __pyx_n_s_x, __pyx_n_s_y, __pyx_n_s_N, __pyx_n_s_area, __pyx_n_s_i, __pyx_n_s_j); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 631, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__35);
  __Pyx_GIVEREF(__pyx_tuple__35);
  __pyx_codeobj__19 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__35, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PDSim_scroll_common_scroll_geo_p, __pyx_n_s_polyarea, 631, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__19)) __PYX_ERR(0, 631, __pyx_L1_error)

  /* "PDSim/scroll/common_scroll_geo.pyx":639
 *     return area/2.0
 * 
 * def polycentroid(xi,yi):             # <<<<<<<<<<<<<<
 *     # Add additional element if needed to close polygon
 *     if not xi[0]==xi[-1] or not yi[0]==yi[-1]:
 */
  __pyx_tuple__36 = PyTuple_Pack(7, __pyx_n_s_xi, __pyx_n_s_yi, __pyx_n_s_x, __pyx_n_s_y, __pyx_n_s_sumx, __pyx_n_s_sumy, __pyx_n_s_i); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 639, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__36);
  __Pyx_GIVEREF(__pyx_tuple__36);
  __pyx_codeobj__20 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PDSim_scroll_common_scroll_geo_p, __pyx_n_s_polycentroid, 639, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__20)) __PYX_ERR(0, 639, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __pyx_unpickle_VdVstruct(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0x7af38ca:
 *         from pickle import PickleError as __pyx_PickleError
 */
  __pyx_tuple__37 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__37);
  __Pyx_GIVEREF(__pyx_tuple__37);
  __pyx_codeobj__21 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_VdVstruct, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__21)) __PYX_ERR(2, 1, __pyx_L1_error)
  __pyx_tuple__38 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__38);
  __Pyx_GIVEREF(__pyx_tuple__38);
  __pyx_codeobj__22 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_HTAnglesClass, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__22)) __PYX_ERR(2, 1, __pyx_L1_error)
  __pyx_tuple__39 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__39);
  __Pyx_GIVEREF(__pyx_tuple__39);
  __pyx_codeobj__23 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_CVInvolute, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__23)) __PYX_ERR(2, 1, __pyx_L1_error)
  __pyx_tuple__40 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__40);
  __Pyx_GIVEREF(__pyx_tuple__40);
  __pyx_codeobj__24 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__40, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_CVInvolutes, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__24)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  __pyx_float_0_0 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_float_0_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_1_0 = PyFloat_FromDouble(1.0); if (unlikely(!__pyx_float_1_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_2_0 = PyFloat_FromDouble(2.0); if (unlikely(!__pyx_float_2_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_6 = PyInt_FromLong(6); if (unlikely(!__pyx_int_6)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_126527008 = PyInt_FromLong(126527008L); if (unlikely(!__pyx_int_126527008)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_128923850 = PyInt_FromLong(128923850L); if (unlikely(!__pyx_int_128923850)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_196442496 = PyInt_FromLong(196442496L); if (unlikely(!__pyx_int_196442496)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_198659446 = PyInt_FromLong(198659446L); if (unlikely(!__pyx_int_198659446)) __PYX_ERR(0, 1, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/

static int __Pyx_modinit_global_init_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
  /*--- Global init code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_export_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
  /*--- Variable export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_export_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
  /*--- Function export code ---*/
  if (__Pyx_ExportFunction("involute_index_to_key", (void (*)(void))__pyx_f_5PDSim_6scroll_17common_scroll_geo_involute_index_to_key, "PyObject *(int, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("scroll_wrap", (void (*)(void))__pyx_f_5PDSim_6scroll_17common_scroll_geo_scroll_wrap, "PyObject *(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("coords_norm", (void (*)(void))__pyx_f_5PDSim_6scroll_17common_scroll_geo_coords_norm, "PyObject *(PyObject *, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *, double, int __pyx_skip_dispatch, struct __pyx_opt_args_5PDSim_6scroll_17common_scroll_geo_coords_norm *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("coords_inv", (void (*)(void))__pyx_f_5PDSim_6scroll_17common_scroll_geo_coords_inv, "PyObject *(PyObject *, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *, double, int __pyx_skip_dispatch, struct __pyx_opt_args_5PDSim_6scroll_17common_scroll_geo_coords_inv *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_coords_inv_np", (void (*)(void))__pyx_f_5PDSim_6scroll_17common_scroll_geo__coords_inv_np, "PyObject *(PyArrayObject *, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *, double, int __pyx_skip_dispatch, struct __pyx_opt_args_5PDSim_6scroll_17common_scroll_geo__coords_inv_np *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_coords_inv_d", (void (*)(void))__pyx_f_5PDSim_6scroll_17common_scroll_geo__coords_inv_d, "PyObject *(double, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *, double, int __pyx_skip_dispatch, struct __pyx_opt_args_5PDSim_6scroll_17common_scroll_geo__coords_inv_d *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_coords_inv_d_int", (void (*)(void))__pyx_f_5PDSim_6scroll_17common_scroll_geo__coords_inv_d_int, "PyObject *(double, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *, double, int, double *, double *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("coords_inv_dtheta", (void (*)(void))__pyx_f_5PDSim_6scroll_17common_scroll_geo_coords_inv_dtheta, "PyObject *(double, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *, double, int, double *, double *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_dcoords_inv_dphi_int", (void (*)(void))__pyx_f_5PDSim_6scroll_17common_scroll_geo__dcoords_inv_dphi_int, "PyObject *(double, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *, double, int, double *, double *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("get_compressor_CV_index", (void (*)(void))__pyx_f_5PDSim_6scroll_17common_scroll_geo_get_compressor_CV_index, "long (PyObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("get_compression_chamber_index", (void (*)(void))__pyx_f_5PDSim_6scroll_17common_scroll_geo_get_compression_chamber_index, "long (long, long, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("Gr", (void (*)(void))__pyx_f_5PDSim_6scroll_17common_scroll_geo_Gr, "double (double, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *, double, int, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("dGr_dphi", (void (*)(void))__pyx_f_5PDSim_6scroll_17common_scroll_geo_dGr_dphi, "double (double, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *, double, int, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("dGr_dtheta", (void (*)(void))__pyx_f_5PDSim_6scroll_17common_scroll_geo_dGr_dtheta, "double (double, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *, double, int, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("VdV", (void (*)(void))__pyx_f_5PDSim_6scroll_17common_scroll_geo_VdV, "struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_VdVstruct *(double, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("forces", (void (*)(void))__pyx_f_5PDSim_6scroll_17common_scroll_geo_forces, "PyObject *(double, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_CVInvolutes *, double, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("fxA", (void (*)(void))__pyx_f_5PDSim_6scroll_17common_scroll_geo_fxA, "double (double, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *, double, enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("fyA", (void (*)(void))__pyx_f_5PDSim_6scroll_17common_scroll_geo_fyA, "double (double, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *, double, enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("fFx_p", (void (*)(void))__pyx_f_5PDSim_6scroll_17common_scroll_geo_fFx_p, "double (double, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *, double, enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("fFy_p", (void (*)(void))__pyx_f_5PDSim_6scroll_17common_scroll_geo_fFy_p, "double (double, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *, double, enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("fMO_p", (void (*)(void))__pyx_f_5PDSim_6scroll_17common_scroll_geo_fMO_p, "double (double, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *, double, enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("involute_heat_transfer", (void (*)(void))__pyx_f_5PDSim_6scroll_17common_scroll_geo_involute_heat_transfer, "double (double, double, double, double, double, double, double, double, double, double, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("__pyx_fuse_0plus_one", (void (*)(void))__pyx_fuse_0__pyx_f_5PDSim_6scroll_17common_scroll_geo_plus_one, "double (double, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("__pyx_fuse_1plus_one", (void (*)(void))__pyx_fuse_1__pyx_f_5PDSim_6scroll_17common_scroll_geo_plus_one, "PyArrayObject *(PyArrayObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_type_init_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
  /*--- Type init code ---*/
  if (PyType_Ready(&__pyx_type_5PDSim_6scroll_17common_scroll_geo_VdVstruct) < 0) __PYX_ERR(0, 9, __pyx_L1_error)
  __pyx_type_5PDSim_6scroll_17common_scroll_geo_VdVstruct.tp_print = 0;
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5PDSim_6scroll_17common_scroll_geo_VdVstruct.tp_dictoffset && __pyx_type_5PDSim_6scroll_17common_scroll_geo_VdVstruct.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5PDSim_6scroll_17common_scroll_geo_VdVstruct.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_VdVstruct, (PyObject *)&__pyx_type_5PDSim_6scroll_17common_scroll_geo_VdVstruct) < 0) __PYX_ERR(0, 9, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5PDSim_6scroll_17common_scroll_geo_VdVstruct) < 0) __PYX_ERR(0, 9, __pyx_L1_error)
  __pyx_ptype_5PDSim_6scroll_17common_scroll_geo_VdVstruct = &__pyx_type_5PDSim_6scroll_17common_scroll_geo_VdVstruct;
  if (PyType_Ready(&__pyx_type_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass) < 0) __PYX_ERR(0, 17, __pyx_L1_error)
  __pyx_type_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass.tp_print = 0;
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass.tp_dictoffset && __pyx_type_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_HTAnglesClass, (PyObject *)&__pyx_type_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass) < 0) __PYX_ERR(0, 17, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass) < 0) __PYX_ERR(0, 17, __pyx_L1_error)
  __pyx_ptype_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass = &__pyx_type_5PDSim_6scroll_17common_scroll_geo_HTAnglesClass;
  if (PyType_Ready(&__pyx_type_5PDSim_6scroll_17common_scroll_geo_CVInvolute) < 0) __PYX_ERR(0, 24, __pyx_L1_error)
  __pyx_type_5PDSim_6scroll_17common_scroll_geo_CVInvolute.tp_print = 0;
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5PDSim_6scroll_17common_scroll_geo_CVInvolute.tp_dictoffset && __pyx_type_5PDSim_6scroll_17common_scroll_geo_CVInvolute.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5PDSim_6scroll_17common_scroll_geo_CVInvolute.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CVInvolute, (PyObject *)&__pyx_type_5PDSim_6scroll_17common_scroll_geo_CVInvolute) < 0) __PYX_ERR(0, 24, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5PDSim_6scroll_17common_scroll_geo_CVInvolute) < 0) __PYX_ERR(0, 24, __pyx_L1_error)
  __pyx_ptype_5PDSim_6scroll_17common_scroll_geo_CVInvolute = &__pyx_type_5PDSim_6scroll_17common_scroll_geo_CVInvolute;
  if (PyType_Ready(&__pyx_type_5PDSim_6scroll_17common_scroll_geo_CVInvolutes) < 0) __PYX_ERR(0, 28, __pyx_L1_error)
  __pyx_type_5PDSim_6scroll_17common_scroll_geo_CVInvolutes.tp_print = 0;
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5PDSim_6scroll_17common_scroll_geo_CVInvolutes.tp_dictoffset && __pyx_type_5PDSim_6scroll_17common_scroll_geo_CVInvolutes.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5PDSim_6scroll_17common_scroll_geo_CVInvolutes.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CVInvolutes, (PyObject *)&__pyx_type_5PDSim_6scroll_17common_scroll_geo_CVInvolutes) < 0) __PYX_ERR(0, 28, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5PDSim_6scroll_17common_scroll_geo_CVInvolutes) < 0) __PYX_ERR(0, 28, __pyx_L1_error)
  __pyx_ptype_5PDSim_6scroll_17common_scroll_geo_CVInvolutes = &__pyx_type_5PDSim_6scroll_17common_scroll_geo_CVInvolutes;
  __pyx_vtabptr_5PDSim_6scroll_17common_scroll_geo_geoVals = &__pyx_vtable_5PDSim_6scroll_17common_scroll_geo_geoVals;
  __pyx_vtable_5PDSim_6scroll_17common_scroll_geo_geoVals.is_symmetric = (int (*)(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *, int __pyx_skip_dispatch))__pyx_f_5PDSim_6scroll_17common_scroll_geo_7geoVals_is_symmetric;
  __pyx_vtable_5PDSim_6scroll_17common_scroll_geo_geoVals.val_if_symmetric = (double (*)(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *, double, int __pyx_skip_dispatch))__pyx_f_5PDSim_6scroll_17common_scroll_geo_7geoVals_val_if_symmetric;
  __pyx_vtable_5PDSim_6scroll_17common_scroll_geo_geoVals.copy_inplace = (PyObject *(*)(struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *, struct __pyx_obj_5PDSim_6scroll_17common_scroll_geo_geoVals *, int __pyx_skip_dispatch))__pyx_f_5PDSim_6scroll_17common_scroll_geo_7geoVals_copy_inplace;
  if (PyType_Ready(&__pyx_type_5PDSim_6scroll_17common_scroll_geo_geoVals) < 0) __PYX_ERR(0, 558, __pyx_L1_error)
  __pyx_type_5PDSim_6scroll_17common_scroll_geo_geoVals.tp_print = 0;
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5PDSim_6scroll_17common_scroll_geo_geoVals.tp_dictoffset && __pyx_type_5PDSim_6scroll_17common_scroll_geo_geoVals.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5PDSim_6scroll_17common_scroll_geo_geoVals.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_5PDSim_6scroll_17common_scroll_geo_geoVals.tp_dict, __pyx_vtabptr_5PDSim_6scroll_17common_scroll_geo_geoVals) < 0) __PYX_ERR(0, 558, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_geoVals, (PyObject *)&__pyx_type_5PDSim_6scroll_17common_scroll_geo_geoVals) < 0) __PYX_ERR(0, 558, __pyx_L1_error)
  __pyx_ptype_5PDSim_6scroll_17common_scroll_geo_geoVals = &__pyx_type_5PDSim_6scroll_17common_scroll_geo_geoVals;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_type_import_code(void) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
  /*--- Type import code ---*/
  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", 
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyTypeObject),
  #else
  sizeof(PyHeapTypeObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(4, 9, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_5numpy_dtype = __Pyx_ImportType(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __Pyx_ImportType_CheckSize_Ignore);
   if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(3, 206, __pyx_L1_error)
  __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(3, 229, __pyx_L1_error)
  __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(3, 233, __pyx_L1_error)
  __pyx_ptype_5numpy_ndarray = __Pyx_ImportType(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __Pyx_ImportType_CheckSize_Ignore);
   if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(3, 242, __pyx_L1_error)
  __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(3, 918, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_variable_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
  /*--- Variable import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
  /*--- Function import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}


#if PY_MAJOR_VERSION < 3
#ifdef CYTHON_NO_PYINIT_EXPORT
#define __Pyx_PyMODINIT_FUNC void
#else
#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
#endif
#else
#ifdef CYTHON_NO_PYINIT_EXPORT
#define __Pyx_PyMODINIT_FUNC PyObject *
#else
#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
#endif
#endif


#if PY_MAJOR_VERSION < 3
__Pyx_PyMODINIT_FUNC initcommon_scroll_geo(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC initcommon_scroll_geo(void)
#else
__Pyx_PyMODINIT_FUNC PyInit_common_scroll_geo(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC PyInit_common_scroll_geo(void)
#if CYTHON_PEP489_MULTI_PHASE_INIT
{
  return PyModuleDef_Init(&__pyx_moduledef);
}
static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
    #if PY_VERSION_HEX >= 0x030700A1
    static PY_INT64_T main_interpreter_id = -1;
    PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
    if (main_interpreter_id == -1) {
        main_interpreter_id = current_id;
        return (unlikely(current_id == -1)) ? -1 : 0;
    } else if (unlikely(main_interpreter_id != current_id))
    #else
    static PyInterpreterState *main_interpreter = NULL;
    PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
    if (!main_interpreter) {
        main_interpreter = current_interpreter;
    } else if (unlikely(main_interpreter != current_interpreter))
    #endif
    {
        PyErr_SetString(
            PyExc_ImportError,
            "Interpreter change detected - this module can only be loaded into one interpreter per process.");
        return -1;
    }
    return 0;
}
static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name) {
    PyObject *value = PyObject_GetAttrString(spec, from_name);
    int result = 0;
    if (likely(value)) {
        result = PyDict_SetItemString(moddict, to_name, value);
        Py_DECREF(value);
    } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Clear();
    } else {
        result = -1;
    }
    return result;
}
static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
    PyObject *module = NULL, *moddict, *modname;
    if (__Pyx_check_single_interpreter())
        return NULL;
    if (__pyx_m)
        return __Pyx_NewRef(__pyx_m);
    modname = PyObject_GetAttrString(spec, "name");
    if (unlikely(!modname)) goto bad;
    module = PyModule_NewObject(modname);
    Py_DECREF(modname);
    if (unlikely(!module)) goto bad;
    moddict = PyModule_GetDict(module);
    if (unlikely(!moddict)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__") < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__") < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__") < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__") < 0)) goto bad;
    return module;
bad:
    Py_XDECREF(module);
    return NULL;
}


static CYTHON_SMALL_CODE int __pyx_pymod_exec_common_scroll_geo(PyObject *__pyx_pyinit_module)
#endif
#endif
{
  __Pyx_TraceDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannyDeclarations
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  if (__pyx_m) {
    if (__pyx_m == __pyx_pyinit_module) return 0;
    PyErr_SetString(PyExc_RuntimeError, "Module 'common_scroll_geo' has already been imported. Re-initialisation is not supported.");
    return -1;
  }
  #elif PY_MAJOR_VERSION >= 3
  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
  #endif
  #if CYTHON_REFNANNY
__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
if (!__Pyx_RefNanny) {
  PyErr_Clear();
  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
  if (!__Pyx_RefNanny)
      Py_FatalError("failed to import 'refnanny' module");
}
#endif
  __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_common_scroll_geo(void)", 0);
  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pxy_PyFrame_Initialize_Offsets
  __Pxy_PyFrame_Initialize_Offsets();
  #endif
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pyx_CyFunction_USED
  if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Coroutine_USED
  if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_AsyncGen_USED
  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_StopAsyncIteration_USED
  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  /*--- Library function declarations ---*/
  /*--- Threads initialization code ---*/
  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  #ifdef WITH_THREAD /* Python build with threading support? */
  PyEval_InitThreads();
  #endif
  #endif
  /*--- Module creation code ---*/
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  __pyx_m = __pyx_pyinit_module;
  Py_INCREF(__pyx_m);
  #else
  #if PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4("common_scroll_geo", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  #endif
  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_d);
  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
  #if CYTHON_COMPILING_IN_PYPY
  Py_INCREF(__pyx_b);
  #endif
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  /*--- Initialize various global constants etc. ---*/
  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  if (__pyx_module_is_main_PDSim__scroll__common_scroll_geo) {
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  }
  #if PY_MAJOR_VERSION >= 3
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
    if (!PyDict_GetItemString(modules, "PDSim.scroll.common_scroll_geo")) {
      if (unlikely(PyDict_SetItemString(modules, "PDSim.scroll.common_scroll_geo", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  #endif
  /*--- Builtin init code ---*/
  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Constants init code ---*/
  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Global type/function init code ---*/
  (void)__Pyx_modinit_global_init_code();
  (void)__Pyx_modinit_variable_export_code();
  if (unlikely(__Pyx_modinit_function_export_code() != 0)) goto __pyx_L1_error;
  if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error;
  if (unlikely(__Pyx_modinit_type_import_code() != 0)) goto __pyx_L1_error;
  (void)__Pyx_modinit_variable_import_code();
  (void)__Pyx_modinit_function_import_code();
  /*--- Execution code ---*/
  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  __Pyx_TraceCall("__Pyx_PyMODINIT_FUNC PyInit_common_scroll_geo(void)", __pyx_f[0], 1, 0, __PYX_ERR(0, 1, __pyx_L1_error));

  /* "PDSim/scroll/common_scroll_geo.pyx":4
 * cimport cython
 * import cython
 * import numpy as np             # <<<<<<<<<<<<<<
 * 
 * cpdef double_or_numpy plus_one(double_or_numpy x):
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "PDSim/scroll/common_scroll_geo.pyx":6
 * import numpy as np
 * 
 * cpdef double_or_numpy plus_one(double_or_numpy x):             # <<<<<<<<<<<<<<
 *     return x + 1.0
 * 
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_0__pyx_mdef_5PDSim_6scroll_17common_scroll_geo_55__pyx_fuse_0plus_one, 0, __pyx_n_s_pyx_fuse_0plus_one, NULL, __pyx_n_s_PDSim_scroll_common_scroll_geo, __pyx_d, ((PyObject *)__pyx_codeobj__33)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_empty_tuple);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_double, __pyx_t_2) < 0) __PYX_ERR(0, 6, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_1__pyx_mdef_5PDSim_6scroll_17common_scroll_geo_57__pyx_fuse_1plus_one, 0, __pyx_n_s_pyx_fuse_1plus_one, NULL, __pyx_n_s_PDSim_scroll_common_scroll_geo, __pyx_d, ((PyObject *)__pyx_codeobj__33)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_empty_tuple);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ndarray, __pyx_t_2) < 0) __PYX_ERR(0, 6, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_mdef_5PDSim_6scroll_17common_scroll_geo_5plus_one, 0, __pyx_n_s_plus_one, NULL, __pyx_n_s_PDSim_scroll_common_scroll_geo, __pyx_d, ((PyObject *)__pyx_codeobj__33)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_empty_tuple);
  ((__pyx_FusedFunctionObject *) __pyx_t_2)->__signatures__ = __pyx_t_1;
  __Pyx_GIVEREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_plus_one, __pyx_t_2) < 0) __PYX_ERR(0, 6, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "PDSim/scroll/common_scroll_geo.pyx":539
 * 
 * #This is a list of all the members in geoVals
 * geoValsvarlist=['h','ro','rb','t',             # <<<<<<<<<<<<<<
 *                 'phi_fi0','phi_fis','phi_fie',
 *                 'phi_fo0','phi_fos','phi_foe',
 */
  __pyx_t_3 = PyList_New(41); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_s_h);
  __Pyx_GIVEREF(__pyx_n_s_h);
  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_h);
  __Pyx_INCREF(__pyx_n_s_ro);
  __Pyx_GIVEREF(__pyx_n_s_ro);
  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_ro);
  __Pyx_INCREF(__pyx_n_s_rb);
  __Pyx_GIVEREF(__pyx_n_s_rb);
  PyList_SET_ITEM(__pyx_t_3, 2, __pyx_n_s_rb);
  __Pyx_INCREF(__pyx_n_s_t);
  __Pyx_GIVEREF(__pyx_n_s_t);
  PyList_SET_ITEM(__pyx_t_3, 3, __pyx_n_s_t);
  __Pyx_INCREF(__pyx_n_s_phi_fi0);
  __Pyx_GIVEREF(__pyx_n_s_phi_fi0);
  PyList_SET_ITEM(__pyx_t_3, 4, __pyx_n_s_phi_fi0);
  __Pyx_INCREF(__pyx_n_s_phi_fis);
  __Pyx_GIVEREF(__pyx_n_s_phi_fis);
  PyList_SET_ITEM(__pyx_t_3, 5, __pyx_n_s_phi_fis);
  __Pyx_INCREF(__pyx_n_s_phi_fie);
  __Pyx_GIVEREF(__pyx_n_s_phi_fie);
  PyList_SET_ITEM(__pyx_t_3, 6, __pyx_n_s_phi_fie);
  __Pyx_INCREF(__pyx_n_s_phi_fo0);
  __Pyx_GIVEREF(__pyx_n_s_phi_fo0);
  PyList_SET_ITEM(__pyx_t_3, 7, __pyx_n_s_phi_fo0);
  __Pyx_INCREF(__pyx_n_s_phi_fos);
  __Pyx_GIVEREF(__pyx_n_s_phi_fos);
  PyList_SET_ITEM(__pyx_t_3, 8, __pyx_n_s_phi_fos);
  __Pyx_INCREF(__pyx_n_s_phi_foe);
  __Pyx_GIVEREF(__pyx_n_s_phi_foe);
  PyList_SET_ITEM(__pyx_t_3, 9, __pyx_n_s_phi_foe);
  __Pyx_INCREF(__pyx_n_s_phi_oi0);
  __Pyx_GIVEREF(__pyx_n_s_phi_oi0);
  PyList_SET_ITEM(__pyx_t_3, 10, __pyx_n_s_phi_oi0);
  __Pyx_INCREF(__pyx_n_s_phi_ois);
  __Pyx_GIVEREF(__pyx_n_s_phi_ois);
  PyList_SET_ITEM(__pyx_t_3, 11, __pyx_n_s_phi_ois);
  __Pyx_INCREF(__pyx_n_s_phi_oie);
  __Pyx_GIVEREF(__pyx_n_s_phi_oie);
  PyList_SET_ITEM(__pyx_t_3, 12, __pyx_n_s_phi_oie);
  __Pyx_INCREF(__pyx_n_s_phi_oo0);
  __Pyx_GIVEREF(__pyx_n_s_phi_oo0);
  PyList_SET_ITEM(__pyx_t_3, 13, __pyx_n_s_phi_oo0);
  __Pyx_INCREF(__pyx_n_s_phi_oos);
  __Pyx_GIVEREF(__pyx_n_s_phi_oos);
  PyList_SET_ITEM(__pyx_t_3, 14, __pyx_n_s_phi_oos);
  __Pyx_INCREF(__pyx_n_s_phi_ooe);
  __Pyx_GIVEREF(__pyx_n_s_phi_ooe);
  PyList_SET_ITEM(__pyx_t_3, 15, __pyx_n_s_phi_ooe);
  __Pyx_INCREF(__pyx_n_s_xa_arc1);
  __Pyx_GIVEREF(__pyx_n_s_xa_arc1);
  PyList_SET_ITEM(__pyx_t_3, 16, __pyx_n_s_xa_arc1);
  __Pyx_INCREF(__pyx_n_s_ya_arc1);
  __Pyx_GIVEREF(__pyx_n_s_ya_arc1);
  PyList_SET_ITEM(__pyx_t_3, 17, __pyx_n_s_ya_arc1);
  __Pyx_INCREF(__pyx_n_s_ra_arc1);
  __Pyx_GIVEREF(__pyx_n_s_ra_arc1);
  PyList_SET_ITEM(__pyx_t_3, 18, __pyx_n_s_ra_arc1);
  __Pyx_INCREF(__pyx_n_s_t1_arc1);
  __Pyx_GIVEREF(__pyx_n_s_t1_arc1);
  PyList_SET_ITEM(__pyx_t_3, 19, __pyx_n_s_t1_arc1);
  __Pyx_INCREF(__pyx_n_s_t2_arc1);
  __Pyx_GIVEREF(__pyx_n_s_t2_arc1);
  PyList_SET_ITEM(__pyx_t_3, 20, __pyx_n_s_t2_arc1);
  __Pyx_INCREF(__pyx_n_s_xa_arc2);
  __Pyx_GIVEREF(__pyx_n_s_xa_arc2);
  PyList_SET_ITEM(__pyx_t_3, 21, __pyx_n_s_xa_arc2);
  __Pyx_INCREF(__pyx_n_s_ya_arc2);
  __Pyx_GIVEREF(__pyx_n_s_ya_arc2);
  PyList_SET_ITEM(__pyx_t_3, 22, __pyx_n_s_ya_arc2);
  __Pyx_INCREF(__pyx_n_s_ra_arc2);
  __Pyx_GIVEREF(__pyx_n_s_ra_arc2);
  PyList_SET_ITEM(__pyx_t_3, 23, __pyx_n_s_ra_arc2);
  __Pyx_INCREF(__pyx_n_s_t1_arc2);
  __Pyx_GIVEREF(__pyx_n_s_t1_arc2);
  PyList_SET_ITEM(__pyx_t_3, 24, __pyx_n_s_t1_arc2);
  __Pyx_INCREF(__pyx_n_s_t2_arc2);
  __Pyx_GIVEREF(__pyx_n_s_t2_arc2);
  PyList_SET_ITEM(__pyx_t_3, 25, __pyx_n_s_t2_arc2);
  __Pyx_INCREF(__pyx_n_s_b_line);
  __Pyx_GIVEREF(__pyx_n_s_b_line);
  PyList_SET_ITEM(__pyx_t_3, 26, __pyx_n_s_b_line);
  __Pyx_INCREF(__pyx_n_s_t1_line);
  __Pyx_GIVEREF(__pyx_n_s_t1_line);
  PyList_SET_ITEM(__pyx_t_3, 27, __pyx_n_s_t1_line);
  __Pyx_INCREF(__pyx_n_s_t2_line);
  __Pyx_GIVEREF(__pyx_n_s_t2_line);
  PyList_SET_ITEM(__pyx_t_3, 28, __pyx_n_s_t2_line);
  __Pyx_INCREF(__pyx_n_s_m_line);
  __Pyx_GIVEREF(__pyx_n_s_m_line);
  PyList_SET_ITEM(__pyx_t_3, 29, __pyx_n_s_m_line);
  __Pyx_INCREF(__pyx_n_s_x0_wall);
  __Pyx_GIVEREF(__pyx_n_s_x0_wall);
  PyList_SET_ITEM(__pyx_t_3, 30, __pyx_n_s_x0_wall);
  __Pyx_INCREF(__pyx_n_s_y0_wall);
  __Pyx_GIVEREF(__pyx_n_s_y0_wall);
  PyList_SET_ITEM(__pyx_t_3, 31, __pyx_n_s_y0_wall);
  __Pyx_INCREF(__pyx_n_s_r_wall);
  __Pyx_GIVEREF(__pyx_n_s_r_wall);
  PyList_SET_ITEM(__pyx_t_3, 32, __pyx_n_s_r_wall);
  __Pyx_INCREF(__pyx_n_s_delta_radial);
  __Pyx_GIVEREF(__pyx_n_s_delta_radial);
  PyList_SET_ITEM(__pyx_t_3, 33, __pyx_n_s_delta_radial);
  __Pyx_INCREF(__pyx_n_s_delta_flank);
  __Pyx_GIVEREF(__pyx_n_s_delta_flank);
  PyList_SET_ITEM(__pyx_t_3, 34, __pyx_n_s_delta_flank);
  __Pyx_INCREF(__pyx_n_s_phi_ie_offset);
  __Pyx_GIVEREF(__pyx_n_s_phi_ie_offset);
  PyList_SET_ITEM(__pyx_t_3, 35, __pyx_n_s_phi_ie_offset);
  __Pyx_INCREF(__pyx_n_s_delta_suction_offset);
  __Pyx_GIVEREF(__pyx_n_s_delta_suction_offset);
  PyList_SET_ITEM(__pyx_t_3, 36, __pyx_n_s_delta_suction_offset);
  __Pyx_INCREF(__pyx_n_s_cx_scroll);
  __Pyx_GIVEREF(__pyx_n_s_cx_scroll);
  PyList_SET_ITEM(__pyx_t_3, 37, __pyx_n_s_cx_scroll);
  __Pyx_INCREF(__pyx_n_s_cy_scroll);
  __Pyx_GIVEREF(__pyx_n_s_cy_scroll);
  PyList_SET_ITEM(__pyx_t_3, 38, __pyx_n_s_cy_scroll);
  __Pyx_INCREF(__pyx_n_s_V_scroll);
  __Pyx_GIVEREF(__pyx_n_s_V_scroll);
  PyList_SET_ITEM(__pyx_t_3, 39, __pyx_n_s_V_scroll);
  __Pyx_INCREF(__pyx_n_s_Vremove);
  __Pyx_GIVEREF(__pyx_n_s_Vremove);
  PyList_SET_ITEM(__pyx_t_3, 40, __pyx_n_s_Vremove);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_geoValsvarlist, __pyx_t_3) < 0) __PYX_ERR(0, 539, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "PDSim/scroll/common_scroll_geo.pyx":552
 *                 'cx_scroll','cy_scroll','V_scroll','Vremove']
 * 
 * def rebuild_geoVals(d):             # <<<<<<<<<<<<<<
 *     geo = geoVals()
 *     for atr in geoValsvarlist:
 */
  __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_5PDSim_6scroll_17common_scroll_geo_37rebuild_geoVals, NULL, __pyx_n_s_PDSim_scroll_common_scroll_geo); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_rebuild_geoVals, __pyx_t_3) < 0) __PYX_ERR(0, 552, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "PDSim/scroll/common_scroll_geo.pyx":631
 *                 )
 * 
 * def polyarea(x,y):             # <<<<<<<<<<<<<<
 *     N=len(x)
 *     area = 0.0
 */
  __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_5PDSim_6scroll_17common_scroll_geo_39polyarea, NULL, __pyx_n_s_PDSim_scroll_common_scroll_geo); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 631, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_polyarea, __pyx_t_3) < 0) __PYX_ERR(0, 631, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "PDSim/scroll/common_scroll_geo.pyx":639
 *     return area/2.0
 * 
 * def polycentroid(xi,yi):             # <<<<<<<<<<<<<<
 *     # Add additional element if needed to close polygon
 *     if not xi[0]==xi[-1] or not yi[0]==yi[-1]:
 */
  __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_5PDSim_6scroll_17common_scroll_geo_41polycentroid, NULL, __pyx_n_s_PDSim_scroll_common_scroll_geo); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 639, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_polycentroid, __pyx_t_3) < 0) __PYX_ERR(0, 639, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_VdVstruct(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0x7af38ca:
 *         from pickle import PickleError as __pyx_PickleError
 */
  __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_5PDSim_6scroll_17common_scroll_geo_61__pyx_unpickle_VdVstruct, NULL, __pyx_n_s_PDSim_scroll_common_scroll_geo); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_VdVstruct, __pyx_t_3) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "(tree fragment)":9
 *         __pyx_unpickle_VdVstruct__set_state(<VdVstruct> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_VdVstruct__set_state(VdVstruct __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.V = __pyx_state[0]; __pyx_result.dV = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_5PDSim_6scroll_17common_scroll_geo_63__pyx_unpickle_HTAnglesClass, NULL, __pyx_n_s_PDSim_scroll_common_scroll_geo); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_HTAnglesClass, __pyx_t_3) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_CVInvolute(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0x78aa620:
 *         from pickle import PickleError as __pyx_PickleError
 */
  __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_5PDSim_6scroll_17common_scroll_geo_65__pyx_unpickle_CVInvolute, NULL, __pyx_n_s_PDSim_scroll_common_scroll_geo); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_CVInvolute, __pyx_t_3) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "(tree fragment)":9
 *         __pyx_unpickle_CVInvolute__set_state(<CVInvolute> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_CVInvolute__set_state(CVInvolute __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.dphi_max_dtheta = __pyx_state[0]; __pyx_result.dphi_min_dtheta = __pyx_state[1]; __pyx_result.involute = __pyx_state[2]; __pyx_result.phi_0 = __pyx_state[3]; __pyx_result.phi_max = __pyx_state[4]; __pyx_result.phi_min = __pyx_state[5]
 *     if len(__pyx_state) > 6 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_5PDSim_6scroll_17common_scroll_geo_67__pyx_unpickle_CVInvolutes, NULL, __pyx_n_s_PDSim_scroll_common_scroll_geo); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_CVInvolutes, __pyx_t_3) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "PDSim/scroll/common_scroll_geo.pyx":1
 * from __future__ import division             # <<<<<<<<<<<<<<
 * cimport cython
 * import cython
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_3) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "../../../miniconda/envs/test-environment/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1046
 *         raise ImportError("numpy.core.umath failed to import")
 * 
 * cdef inline int import_ufunc() except -1:             # <<<<<<<<<<<<<<
 *     try:
 *         _import_umath()
 */
  __Pyx_TraceReturn(Py_None, 0);

  /*--- Wrapped vars code ---*/

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  if (__pyx_m) {
    if (__pyx_d) {
      __Pyx_AddTraceback("init PDSim.scroll.common_scroll_geo", __pyx_clineno, __pyx_lineno, __pyx_filename);
    }
    Py_CLEAR(__pyx_m);
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init PDSim.scroll.common_scroll_geo");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  return (__pyx_m != NULL) ? 0 : -1;
  #elif PY_MAJOR_VERSION >= 3
  return __pyx_m;
  #else
  return;
  #endif
}

/* --- Runtime support code --- */
/* Refnanny */
#if CYTHON_REFNANNY
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
    PyObject *m = NULL, *p = NULL;
    void *r = NULL;
    m = PyImport_ImportModule(modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, "RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif

/* PyObjectGetAttrStr */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro))
        return tp->tp_getattro(obj, attr_name);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_getattr))
        return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
#endif
    return PyObject_GetAttr(obj, attr_name);
}
#endif

/* GetBuiltinName */
static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
    PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
    if (unlikely(!result)) {
        PyErr_Format(PyExc_NameError,
#if PY_MAJOR_VERSION >= 3
            "name '%U' is not defined", name);
#else
            "name '%.200s' is not defined", PyString_AS_STRING(name));
#endif
    }
    return result;
}

/* RaiseArgTupleInvalid */
static void __Pyx_RaiseArgtupleInvalid(
    const char* func_name,
    int exact,
    Py_ssize_t num_min,
    Py_ssize_t num_max,
    Py_ssize_t num_found)
{
    Py_ssize_t num_expected;
    const char *more_or_less;
    if (num_found < num_min) {
        num_expected = num_min;
        more_or_less = "at least";
    } else {
        num_expected = num_max;
        more_or_less = "at most";
    }
    if (exact) {
        more_or_less = "exactly";
    }
    PyErr_Format(PyExc_TypeError,
                 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
                 func_name, more_or_less, num_expected,
                 (num_expected == 1) ? "" : "s", num_found);
}

/* RaiseDoubleKeywords */
static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        #if PY_MAJOR_VERSION >= 3
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
        #else
        "%s() got multiple values for keyword argument '%s'", func_name,
        PyString_AsString(kw_name));
        #endif
}

/* ParseKeywords */
static int __Pyx_ParseOptionalKeywords(
    PyObject *kwds,
    PyObject **argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject *key = 0, *value = 0;
    Py_ssize_t pos = 0;
    PyObject*** name;
    PyObject*** first_kw_arg = argnames + num_pos_args;
    while (PyDict_Next(kwds, &pos, &key, &value)) {
        name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (*name) {
            values[name-argnames] = value;
            continue;
        }
        name = first_kw_arg;
        #if PY_MAJOR_VERSION < 3
        if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
            while (*name) {
                if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
                        && _PyString_Eq(**name, key)) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    if ((**argname == key) || (
                            (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
                             && _PyString_Eq(**argname, key))) {
                        goto arg_passed_twice;
                    }
                    argname++;
                }
            }
        } else
        #endif
        if (likely(PyUnicode_Check(key))) {
            while (*name) {
                int cmp = (**name == key) ? 0 :
                #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                    (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                #endif
                    PyUnicode_Compare(**name, key);
                if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                if (cmp == 0) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    int cmp = (**argname == key) ? 0 :
                    #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                        (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                    #endif
                        PyUnicode_Compare(**argname, key);
                    if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                    if (cmp == 0) goto arg_passed_twice;
                    argname++;
                }
            }
        } else
            goto invalid_keyword_type;
        if (kwds2) {
            if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
        } else {
            goto invalid_keyword;
        }
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    goto bad;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    goto bad;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
bad:
    return -1;
}

/* PyErrFetchRestore */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    tmp_type = tstate->curexc_type;
    tmp_value = tstate->curexc_value;
    tmp_tb = tstate->curexc_traceback;
    tstate->curexc_type = type;
    tstate->curexc_value = value;
    tstate->curexc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    *type = tstate->curexc_type;
    *value = tstate->curexc_value;
    *tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
}
#endif

/* Profile */
#if CYTHON_PROFILE
static int __Pyx_TraceSetupAndCall(PyCodeObject** code,
                                   PyFrameObject** frame,
                                   PyThreadState* tstate,
                                   const char *funcname,
                                   const char *srcfile,
                                   int firstlineno) {
    PyObject *type, *value, *traceback;
    int retval;
    if (*frame == NULL || !CYTHON_PROFILE_REUSE_FRAME) {
        if (*code == NULL) {
            *code = __Pyx_createFrameCodeObject(funcname, srcfile, firstlineno);
            if (*code == NULL) return 0;
        }
        *frame = PyFrame_New(
            tstate,                          /*PyThreadState *tstate*/
            *code,                           /*PyCodeObject *code*/
            __pyx_d,                  /*PyObject *globals*/
            0                                /*PyObject *locals*/
        );
        if (*frame == NULL) return 0;
        if (CYTHON_TRACE && (*frame)->f_trace == NULL) {
            Py_INCREF(Py_None);
            (*frame)->f_trace = Py_None;
        }
#if PY_VERSION_HEX < 0x030400B1
    } else {
        (*frame)->f_tstate = tstate;
#endif
    }
      __Pyx_PyFrame_SetLineNumber(*frame, firstlineno);
    retval = 1;
    tstate->tracing++;
    tstate->use_tracing = 0;
    __Pyx_ErrFetchInState(tstate, &type, &value, &traceback);
    #if CYTHON_TRACE
    if (tstate->c_tracefunc)
        retval = tstate->c_tracefunc(tstate->c_traceobj, *frame, PyTrace_CALL, NULL) == 0;
    if (retval && tstate->c_profilefunc)
    #endif
        retval = tstate->c_profilefunc(tstate->c_profileobj, *frame, PyTrace_CALL, NULL) == 0;
    tstate->use_tracing = (tstate->c_profilefunc ||
                           (CYTHON_TRACE && tstate->c_tracefunc));
    tstate->tracing--;
    if (retval) {
        __Pyx_ErrRestoreInState(tstate, type, value, traceback);
        return tstate->use_tracing && retval;
    } else {
        Py_XDECREF(type);
        Py_XDECREF(value);
        Py_XDECREF(traceback);
        return -1;
    }
}
static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno) {
    PyObject *py_srcfile = 0;
    PyObject *py_funcname = 0;
    PyCodeObject *py_code = 0;
    #if PY_MAJOR_VERSION < 3
    py_funcname = PyString_FromString(funcname);
    py_srcfile = PyString_FromString(srcfile);
    #else
    py_funcname = PyUnicode_FromString(funcname);
    py_srcfile = PyUnicode_FromString(srcfile);
    #endif
    if (!py_funcname | !py_srcfile) goto bad;
    py_code = PyCode_New(
        0,
        #if PY_MAJOR_VERSION >= 3
        0,
        #endif
        0,
        0,
        CO_OPTIMIZED | CO_NEWLOCALS,
        __pyx_empty_bytes,     /*PyObject *code,*/
        __pyx_empty_tuple,     /*PyObject *consts,*/
        __pyx_empty_tuple,     /*PyObject *names,*/
        __pyx_empty_tuple,     /*PyObject *varnames,*/
        __pyx_empty_tuple,     /*PyObject *freevars,*/
        __pyx_empty_tuple,     /*PyObject *cellvars,*/
        py_srcfile,       /*PyObject *filename,*/
        py_funcname,      /*PyObject *name,*/
        firstlineno,
        __pyx_empty_bytes      /*PyObject *lnotab*/
    );
bad:
    Py_XDECREF(py_srcfile);
    Py_XDECREF(py_funcname);
    return py_code;
}
#endif

/* GetItemInt */
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
    PyObject *r;
    if (!j) return NULL;
    r = PyObject_GetItem(o, j);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyList_GET_SIZE(o);
    }
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
        PyObject *r = PyList_GET_ITEM(o, wrapped_i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyTuple_GET_SIZE(o);
    }
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
        PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
                                                     CYTHON_NCP_UNUSED int wraparound,
                                                     CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
            PyObject *r = PyList_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    }
    else if (PyTuple_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
        if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
            PyObject *r = PyTuple_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    } else {
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_item)) {
            if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
                Py_ssize_t l = m->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                        return NULL;
                    PyErr_Clear();
                }
            }
            return m->sq_item(o, i);
        }
    }
#else
    if (is_list || PySequence_Check(o)) {
        return PySequence_GetItem(o, i);
    }
#endif
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}

/* DictGetItem */
#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
    PyObject *value;
    value = PyDict_GetItemWithError(d, key);
    if (unlikely(!value)) {
        if (!PyErr_Occurred()) {
            if (unlikely(PyTuple_Check(key))) {
                PyObject* args = PyTuple_Pack(1, key);
                if (likely(args)) {
                    PyErr_SetObject(PyExc_KeyError, args);
                    Py_DECREF(args);
                }
            } else {
                PyErr_SetObject(PyExc_KeyError, key);
            }
        }
        return NULL;
    }
    Py_INCREF(value);
    return value;
}
#endif

/* PyCFunctionFastCall */
#if CYTHON_FAST_PYCCALL
static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
    PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
    PyCFunction meth = PyCFunction_GET_FUNCTION(func);
    PyObject *self = PyCFunction_GET_SELF(func);
    int flags = PyCFunction_GET_FLAGS(func);
    assert(PyCFunction_Check(func));
    assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
    assert(nargs >= 0);
    assert(nargs == 0 || args != NULL);
    /* _PyCFunction_FastCallDict() must not be called with an exception set,
       because it may clear it (directly or indirectly) and so the
       caller loses its exception */
    assert(!PyErr_Occurred());
    if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
        return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
    } else {
        return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
    }
}
#endif

/* PyFunctionFastCall */
#if CYTHON_FAST_PYCALL
static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
                                               PyObject *globals) {
    PyFrameObject *f;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject **fastlocals;
    Py_ssize_t i;
    PyObject *result;
    assert(globals != NULL);
    /* XXX Perhaps we should create a specialized
       PyFrame_New() that doesn't take locals, but does
       take builtins without sanity checking them.
       */
    assert(tstate != NULL);
    f = PyFrame_New(tstate, co, globals, NULL);
    if (f == NULL) {
        return NULL;
    }
    fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
    for (i = 0; i < na; i++) {
        Py_INCREF(*args);
        fastlocals[i] = *args++;
    }
    result = PyEval_EvalFrameEx(f,0);
    ++tstate->recursion_depth;
    Py_DECREF(f);
    --tstate->recursion_depth;
    return result;
}
#if 1 || PY_VERSION_HEX < 0x030600B1
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs) {
    PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
    PyObject *globals = PyFunction_GET_GLOBALS(func);
    PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
    PyObject *closure;
#if PY_MAJOR_VERSION >= 3
    PyObject *kwdefs;
#endif
    PyObject *kwtuple, **k;
    PyObject **d;
    Py_ssize_t nd;
    Py_ssize_t nk;
    PyObject *result;
    assert(kwargs == NULL || PyDict_Check(kwargs));
    nk = kwargs ? PyDict_Size(kwargs) : 0;
    if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
        return NULL;
    }
    if (
#if PY_MAJOR_VERSION >= 3
            co->co_kwonlyargcount == 0 &&
#endif
            likely(kwargs == NULL || nk == 0) &&
            co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
        if (argdefs == NULL && co->co_argcount == nargs) {
            result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
            goto done;
        }
        else if (nargs == 0 && argdefs != NULL
                 && co->co_argcount == Py_SIZE(argdefs)) {
            /* function called with no arguments, but all parameters have
               a default value: use default values as arguments .*/
            args = &PyTuple_GET_ITEM(argdefs, 0);
            result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
            goto done;
        }
    }
    if (kwargs != NULL) {
        Py_ssize_t pos, i;
        kwtuple = PyTuple_New(2 * nk);
        if (kwtuple == NULL) {
            result = NULL;
            goto done;
        }
        k = &PyTuple_GET_ITEM(kwtuple, 0);
        pos = i = 0;
        while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
            Py_INCREF(k[i]);
            Py_INCREF(k[i+1]);
            i += 2;
        }
        nk = i / 2;
    }
    else {
        kwtuple = NULL;
        k = NULL;
    }
    closure = PyFunction_GET_CLOSURE(func);
#if PY_MAJOR_VERSION >= 3
    kwdefs = PyFunction_GET_KW_DEFAULTS(func);
#endif
    if (argdefs != NULL) {
        d = &PyTuple_GET_ITEM(argdefs, 0);
        nd = Py_SIZE(argdefs);
    }
    else {
        d = NULL;
        nd = 0;
    }
#if PY_MAJOR_VERSION >= 3
    result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
                               args, nargs,
                               k, (int)nk,
                               d, (int)nd, kwdefs, closure);
#else
    result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
                               args, nargs,
                               k, (int)nk,
                               d, (int)nd, closure);
#endif
    Py_XDECREF(kwtuple);
done:
    Py_LeaveRecursiveCall();
    return result;
}
#endif
#endif

/* PyObjectCall */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *result;
    ternaryfunc call = func->ob_type->tp_call;
    if (unlikely(!call))
        return PyObject_Call(func, arg, kw);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = (*call)(func, arg, kw);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectCallMethO */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
    PyObject *self, *result;
    PyCFunction cfunc;
    cfunc = PyCFunction_GET_FUNCTION(func);
    self = PyCFunction_GET_SELF(func);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = cfunc(self, arg);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectCallOneArg */
#if CYTHON_COMPILING_IN_CPYTHON
static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_New(1);
    if (unlikely(!args)) return NULL;
    Py_INCREF(arg);
    PyTuple_SET_ITEM(args, 0, arg);
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
#if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCall(func, &arg, 1);
    }
#endif
    if (likely(PyCFunction_Check(func))) {
        if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
            return __Pyx_PyObject_CallMethO(func, arg);
#if CYTHON_FAST_PYCCALL
        } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
            return __Pyx_PyCFunction_FastCall(func, &arg, 1);
#endif
        }
    }
    return __Pyx__PyObject_CallOneArg(func, arg);
}
#else
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_Pack(1, arg);
    if (unlikely(!args)) return NULL;
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
#endif

/* RaiseException */
#if PY_MAJOR_VERSION < 3
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
                        CYTHON_UNUSED PyObject *cause) {
    __Pyx_PyThreadState_declare
    Py_XINCREF(type);
    if (!value || value == Py_None)
        value = NULL;
    else
        Py_INCREF(value);
    if (!tb || tb == Py_None)
        tb = NULL;
    else {
        Py_INCREF(tb);
        if (!PyTraceBack_Check(tb)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: arg 3 must be a traceback or None");
            goto raise_error;
        }
    }
    if (PyType_Check(type)) {
#if CYTHON_COMPILING_IN_PYPY
        if (!value) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#endif
        PyErr_NormalizeException(&type, &value, &tb);
    } else {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto raise_error;
        }
        value = type;
        type = (PyObject*) Py_TYPE(type);
        Py_INCREF(type);
        if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: exception class must be a subclass of BaseException");
            goto raise_error;
        }
    }
    __Pyx_PyThreadState_assign
    __Pyx_ErrRestore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}
#else
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    PyObject* owned_instance = NULL;
    if (tb == Py_None) {
        tb = 0;
    } else if (tb && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto bad;
    }
    if (value == Py_None)
        value = 0;
    if (PyExceptionInstance_Check(type)) {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto bad;
        }
        value = type;
        type = (PyObject*) Py_TYPE(value);
    } else if (PyExceptionClass_Check(type)) {
        PyObject *instance_class = NULL;
        if (value && PyExceptionInstance_Check(value)) {
            instance_class = (PyObject*) Py_TYPE(value);
            if (instance_class != type) {
                int is_subclass = PyObject_IsSubclass(instance_class, type);
                if (!is_subclass) {
                    instance_class = NULL;
                } else if (unlikely(is_subclass == -1)) {
                    goto bad;
                } else {
                    type = instance_class;
                }
            }
        }
        if (!instance_class) {
            PyObject *args;
            if (!value)
                args = PyTuple_New(0);
            else if (PyTuple_Check(value)) {
                Py_INCREF(value);
                args = value;
            } else
                args = PyTuple_Pack(1, value);
            if (!args)
                goto bad;
            owned_instance = PyObject_Call(type, args, NULL);
            Py_DECREF(args);
            if (!owned_instance)
                goto bad;
            value = owned_instance;
            if (!PyExceptionInstance_Check(value)) {
                PyErr_Format(PyExc_TypeError,
                             "calling %R should have returned an instance of "
                             "BaseException, not %R",
                             type, Py_TYPE(value));
                goto bad;
            }
        }
    } else {
        PyErr_SetString(PyExc_TypeError,
            "raise: exception class must be a subclass of BaseException");
        goto bad;
    }
    if (cause) {
        PyObject *fixed_cause;
        if (cause == Py_None) {
            fixed_cause = NULL;
        } else if (PyExceptionClass_Check(cause)) {
            fixed_cause = PyObject_CallObject(cause, NULL);
            if (fixed_cause == NULL)
                goto bad;
        } else if (PyExceptionInstance_Check(cause)) {
            fixed_cause = cause;
            Py_INCREF(fixed_cause);
        } else {
            PyErr_SetString(PyExc_TypeError,
                            "exception causes must derive from "
                            "BaseException");
            goto bad;
        }
        PyException_SetCause(value, fixed_cause);
    }
    PyErr_SetObject(type, value);
    if (tb) {
#if CYTHON_COMPILING_IN_PYPY
        PyObject *tmp_type, *tmp_value, *tmp_tb;
        PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
        Py_INCREF(tb);
        PyErr_Restore(tmp_type, tmp_value, tb);
        Py_XDECREF(tmp_tb);
#else
        PyThreadState *tstate = __Pyx_PyThreadState_Current;
        PyObject* tmp_tb = tstate->curexc_traceback;
        if (tb != tmp_tb) {
            Py_INCREF(tb);
            tstate->curexc_traceback = tb;
            Py_XDECREF(tmp_tb);
        }
#endif
    }
bad:
    Py_XDECREF(owned_instance);
    return;
}
#endif

/* SetItemInt */
static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
    int r;
    if (!j) return -1;
    r = PyObject_SetItem(o, j, v);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list,
                                               CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
        if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o)))) {
            PyObject* old = PyList_GET_ITEM(o, n);
            Py_INCREF(v);
            PyList_SET_ITEM(o, n, v);
            Py_DECREF(old);
            return 1;
        }
    } else {
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_ass_item)) {
            if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
                Py_ssize_t l = m->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                        return -1;
                    PyErr_Clear();
                }
            }
            return m->sq_ass_item(o, i, v);
        }
    }
#else
#if CYTHON_COMPILING_IN_PYPY
    if (is_list || (PySequence_Check(o) && !PyDict_Check(o)))
#else
    if (is_list || PySequence_Check(o))
#endif
    {
        return PySequence_SetItem(o, i, v);
    }
#endif
    return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
}

/* IterFinish */
static CYTHON_INLINE int __Pyx_IterFinish(void) {
#if CYTHON_FAST_THREAD_STATE
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject* exc_type = tstate->curexc_type;
    if (unlikely(exc_type)) {
        if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) {
            PyObject *exc_value, *exc_tb;
            exc_value = tstate->curexc_value;
            exc_tb = tstate->curexc_traceback;
            tstate->curexc_type = 0;
            tstate->curexc_value = 0;
            tstate->curexc_traceback = 0;
            Py_DECREF(exc_type);
            Py_XDECREF(exc_value);
            Py_XDECREF(exc_tb);
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#else
    if (unlikely(PyErr_Occurred())) {
        if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
            PyErr_Clear();
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#endif
}

/* PyObjectCallNoArg */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
#if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCall(func, NULL, 0);
    }
#endif
#ifdef __Pyx_CyFunction_USED
    if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func)))
#else
    if (likely(PyCFunction_Check(func)))
#endif
    {
        if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
            return __Pyx_PyObject_CallMethO(func, NULL);
        }
    }
    return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
}
#endif

/* PyObjectGetMethod */
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
    PyObject *attr;
#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
    PyTypeObject *tp = Py_TYPE(obj);
    PyObject *descr;
    descrgetfunc f = NULL;
    PyObject **dictptr, *dict;
    int meth_found = 0;
    assert (*method == NULL);
    if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
        attr = __Pyx_PyObject_GetAttrStr(obj, name);
        goto try_unpack;
    }
    if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
        return 0;
    }
    descr = _PyType_Lookup(tp, name);
    if (likely(descr != NULL)) {
        Py_INCREF(descr);
#if PY_MAJOR_VERSION >= 3
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type)))
        #endif
#else
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr)))
        #endif
#endif
        {
            meth_found = 1;
        } else {
            f = Py_TYPE(descr)->tp_descr_get;
            if (f != NULL && PyDescr_IsData(descr)) {
                attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
                Py_DECREF(descr);
                goto try_unpack;
            }
        }
    }
    dictptr = _PyObject_GetDictPtr(obj);
    if (dictptr != NULL && (dict = *dictptr) != NULL) {
        Py_INCREF(dict);
        attr = __Pyx_PyDict_GetItemStr(dict, name);
        if (attr != NULL) {
            Py_INCREF(attr);
            Py_DECREF(dict);
            Py_XDECREF(descr);
            goto try_unpack;
        }
        Py_DECREF(dict);
    }
    if (meth_found) {
        *method = descr;
        return 1;
    }
    if (f != NULL) {
        attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
        Py_DECREF(descr);
        goto try_unpack;
    }
    if (descr != NULL) {
        *method = descr;
        return 0;
    }
    PyErr_Format(PyExc_AttributeError,
#if PY_MAJOR_VERSION >= 3
                 "'%.50s' object has no attribute '%U'",
                 tp->tp_name, name);
#else
                 "'%.50s' object has no attribute '%.400s'",
                 tp->tp_name, PyString_AS_STRING(name));
#endif
    return 0;
#else
    attr = __Pyx_PyObject_GetAttrStr(obj, name);
    goto try_unpack;
#endif
try_unpack:
#if CYTHON_UNPACK_METHODS
    if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
        PyObject *function = PyMethod_GET_FUNCTION(attr);
        Py_INCREF(function);
        Py_DECREF(attr);
        *method = function;
        return 1;
    }
#endif
    *method = attr;
    return 0;
}

/* PyObjectCallMethod0 */
static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
    PyObject *method = NULL, *result = NULL;
    int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
    if (likely(is_method)) {
        result = __Pyx_PyObject_CallOneArg(method, obj);
        Py_DECREF(method);
        return result;
    }
    if (unlikely(!method)) goto bad;
    result = __Pyx_PyObject_CallNoArg(method);
    Py_DECREF(method);
bad:
    return result;
}

/* RaiseNeedMoreValuesToUnpack */
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
    PyErr_Format(PyExc_ValueError,
                 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
                 index, (index == 1) ? "" : "s");
}

/* RaiseTooManyValuesToUnpack */
static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
    PyErr_Format(PyExc_ValueError,
                 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
}

/* UnpackItemEndCheck */
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
    if (unlikely(retval)) {
        Py_DECREF(retval);
        __Pyx_RaiseTooManyValuesError(expected);
        return -1;
    } else {
        return __Pyx_IterFinish();
    }
    return 0;
}

/* RaiseNoneIterError */
static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
}

/* UnpackTupleError */
static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) {
    if (t == Py_None) {
      __Pyx_RaiseNoneNotIterableError();
    } else if (PyTuple_GET_SIZE(t) < index) {
      __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t));
    } else {
      __Pyx_RaiseTooManyValuesError(index);
    }
}

/* UnpackTuple2 */
static CYTHON_INLINE int __Pyx_unpack_tuple2_exact(
        PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int decref_tuple) {
    PyObject *value1 = NULL, *value2 = NULL;
#if CYTHON_COMPILING_IN_PYPY
    value1 = PySequence_ITEM(tuple, 0);  if (unlikely(!value1)) goto bad;
    value2 = PySequence_ITEM(tuple, 1);  if (unlikely(!value2)) goto bad;
#else
    value1 = PyTuple_GET_ITEM(tuple, 0);  Py_INCREF(value1);
    value2 = PyTuple_GET_ITEM(tuple, 1);  Py_INCREF(value2);
#endif
    if (decref_tuple) {
        Py_DECREF(tuple);
    }
    *pvalue1 = value1;
    *pvalue2 = value2;
    return 0;
#if CYTHON_COMPILING_IN_PYPY
bad:
    Py_XDECREF(value1);
    Py_XDECREF(value2);
    if (decref_tuple) { Py_XDECREF(tuple); }
    return -1;
#endif
}
static int __Pyx_unpack_tuple2_generic(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2,
                                       int has_known_size, int decref_tuple) {
    Py_ssize_t index;
    PyObject *value1 = NULL, *value2 = NULL, *iter = NULL;
    iternextfunc iternext;
    iter = PyObject_GetIter(tuple);
    if (unlikely(!iter)) goto bad;
    if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; }
    iternext = Py_TYPE(iter)->tp_iternext;
    value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; }
    value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; }
    if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad;
    Py_DECREF(iter);
    *pvalue1 = value1;
    *pvalue2 = value2;
    return 0;
unpacking_failed:
    if (!has_known_size && __Pyx_IterFinish() == 0)
        __Pyx_RaiseNeedMoreValuesError(index);
bad:
    Py_XDECREF(iter);
    Py_XDECREF(value1);
    Py_XDECREF(value2);
    if (decref_tuple) { Py_XDECREF(tuple); }
    return -1;
}

/* dict_iter */
static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name,
                                                   Py_ssize_t* p_orig_length, int* p_source_is_dict) {
    is_dict = is_dict || likely(PyDict_CheckExact(iterable));
    *p_source_is_dict = is_dict;
    if (is_dict) {
#if !CYTHON_COMPILING_IN_PYPY
        *p_orig_length = PyDict_Size(iterable);
        Py_INCREF(iterable);
        return iterable;
#elif PY_MAJOR_VERSION >= 3
        static PyObject *py_items = NULL, *py_keys = NULL, *py_values = NULL;
        PyObject **pp = NULL;
        if (method_name) {
            const char *name = PyUnicode_AsUTF8(method_name);
            if (strcmp(name, "iteritems") == 0) pp = &py_items;
            else if (strcmp(name, "iterkeys") == 0) pp = &py_keys;
            else if (strcmp(name, "itervalues") == 0) pp = &py_values;
            if (pp) {
                if (!*pp) {
                    *pp = PyUnicode_FromString(name + 4);
                    if (!*pp)
                        return NULL;
                }
                method_name = *pp;
            }
        }
#endif
    }
    *p_orig_length = 0;
    if (method_name) {
        PyObject* iter;
        iterable = __Pyx_PyObject_CallMethod0(iterable, method_name);
        if (!iterable)
            return NULL;
#if !CYTHON_COMPILING_IN_PYPY
        if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable))
            return iterable;
#endif
        iter = PyObject_GetIter(iterable);
        Py_DECREF(iterable);
        return iter;
    }
    return PyObject_GetIter(iterable);
}
static CYTHON_INLINE int __Pyx_dict_iter_next(
        PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos,
        PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) {
    PyObject* next_item;
#if !CYTHON_COMPILING_IN_PYPY
    if (source_is_dict) {
        PyObject *key, *value;
        if (unlikely(orig_length != PyDict_Size(iter_obj))) {
            PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration");
            return -1;
        }
        if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) {
            return 0;
        }
        if (pitem) {
            PyObject* tuple = PyTuple_New(2);
            if (unlikely(!tuple)) {
                return -1;
            }
            Py_INCREF(key);
            Py_INCREF(value);
            PyTuple_SET_ITEM(tuple, 0, key);
            PyTuple_SET_ITEM(tuple, 1, value);
            *pitem = tuple;
        } else {
            if (pkey) {
                Py_INCREF(key);
                *pkey = key;
            }
            if (pvalue) {
                Py_INCREF(value);
                *pvalue = value;
            }
        }
        return 1;
    } else if (PyTuple_CheckExact(iter_obj)) {
        Py_ssize_t pos = *ppos;
        if (unlikely(pos >= PyTuple_GET_SIZE(iter_obj))) return 0;
        *ppos = pos + 1;
        next_item = PyTuple_GET_ITEM(iter_obj, pos);
        Py_INCREF(next_item);
    } else if (PyList_CheckExact(iter_obj)) {
        Py_ssize_t pos = *ppos;
        if (unlikely(pos >= PyList_GET_SIZE(iter_obj))) return 0;
        *ppos = pos + 1;
        next_item = PyList_GET_ITEM(iter_obj, pos);
        Py_INCREF(next_item);
    } else
#endif
    {
        next_item = PyIter_Next(iter_obj);
        if (unlikely(!next_item)) {
            return __Pyx_IterFinish();
        }
    }
    if (pitem) {
        *pitem = next_item;
    } else if (pkey && pvalue) {
        if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1))
            return -1;
    } else if (pkey) {
        *pkey = next_item;
    } else {
        *pvalue = next_item;
    }
    return 1;
}

/* PyObjectCall2Args */
static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
    PyObject *args, *result = NULL;
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(function)) {
        PyObject *args[2] = {arg1, arg2};
        return __Pyx_PyFunction_FastCall(function, args, 2);
    }
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(function)) {
        PyObject *args[2] = {arg1, arg2};
        return __Pyx_PyCFunction_FastCall(function, args, 2);
    }
    #endif
    args = PyTuple_New(2);
    if (unlikely(!args)) goto done;
    Py_INCREF(arg1);
    PyTuple_SET_ITEM(args, 0, arg1);
    Py_INCREF(arg2);
    PyTuple_SET_ITEM(args, 1, arg2);
    Py_INCREF(function);
    result = __Pyx_PyObject_Call(function, args, NULL);
    Py_DECREF(args);
    Py_DECREF(function);
done:
    return result;
}

/* WriteUnraisableException */
static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
                                  CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
                                  int full_traceback, CYTHON_UNUSED int nogil) {
    PyObject *old_exc, *old_val, *old_tb;
    PyObject *ctx;
    __Pyx_PyThreadState_declare
#ifdef WITH_THREAD
    PyGILState_STATE state;
    if (nogil)
        state = PyGILState_Ensure();
#ifdef _MSC_VER
    else state = (PyGILState_STATE)-1;
#endif
#endif
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
    if (full_traceback) {
        Py_XINCREF(old_exc);
        Py_XINCREF(old_val);
        Py_XINCREF(old_tb);
        __Pyx_ErrRestore(old_exc, old_val, old_tb);
        PyErr_PrintEx(1);
    }
    #if PY_MAJOR_VERSION < 3
    ctx = PyString_FromString(name);
    #else
    ctx = PyUnicode_FromString(name);
    #endif
    __Pyx_ErrRestore(old_exc, old_val, old_tb);
    if (!ctx) {
        PyErr_WriteUnraisable(Py_None);
    } else {
        PyErr_WriteUnraisable(ctx);
        Py_DECREF(ctx);
    }
#ifdef WITH_THREAD
    if (nogil)
        PyGILState_Release(state);
#endif
}

/* ExtTypeTest */
static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (likely(__Pyx_TypeCheck(obj, type)))
        return 1;
    PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
                 Py_TYPE(obj)->tp_name, type->tp_name);
    return 0;
}

/* ArgTypeTest */
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
{
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    else if (exact) {
        #if PY_MAJOR_VERSION == 2
        if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
        #endif
    }
    else {
        if (likely(__Pyx_TypeCheck(obj, type))) return 1;
    }
    PyErr_Format(PyExc_TypeError,
        "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
        name, type->tp_name, Py_TYPE(obj)->tp_name);
    return 0;
}

/* PyErrExceptionMatches */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
    PyObject *exc_type = tstate->curexc_type;
    if (exc_type == err) return 1;
    if (unlikely(!exc_type)) return 0;
    if (unlikely(PyTuple_Check(err)))
        return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
    return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
}
#endif

/* GetAttr */
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
#if CYTHON_USE_TYPE_SLOTS
#if PY_MAJOR_VERSION >= 3
    if (likely(PyUnicode_Check(n)))
#else
    if (likely(PyString_Check(n)))
#endif
        return __Pyx_PyObject_GetAttrStr(o, n);
#endif
    return PyObject_GetAttr(o, n);
}

/* GetAttr3 */
static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        return NULL;
    __Pyx_PyErr_Clear();
    Py_INCREF(d);
    return d;
}
static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
    PyObject *r = __Pyx_GetAttr(o, n);
    return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
}

/* GetModuleGlobalName */
#if CYTHON_USE_DICT_VERSIONS
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
#else
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
#endif
{
    PyObject *result;
#if !CYTHON_AVOID_BORROWED_REFS
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
    result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    } else if (unlikely(PyErr_Occurred())) {
        return NULL;
    }
#else
    result = PyDict_GetItem(__pyx_d, name);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
#endif
#else
    result = PyObject_GetItem(__pyx_d, name);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
    PyErr_Clear();
#endif
    return __Pyx_GetBuiltinName(name);
}

/* KeywordStringCheck */
static int __Pyx_CheckKeywordStrings(
    PyObject *kwdict,
    const char* function_name,
    int kw_allowed)
{
    PyObject* key = 0;
    Py_ssize_t pos = 0;
#if CYTHON_COMPILING_IN_PYPY
    if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0))
        goto invalid_keyword;
    return 1;
#else
    while (PyDict_Next(kwdict, &pos, &key, 0)) {
        #if PY_MAJOR_VERSION < 3
        if (unlikely(!PyString_Check(key)))
        #endif
            if (unlikely(!PyUnicode_Check(key)))
                goto invalid_keyword_type;
    }
    if ((!kw_allowed) && unlikely(key))
        goto invalid_keyword;
    return 1;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    return 0;
#endif
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
    return 0;
}

/* GetTopmostException */
#if CYTHON_USE_EXC_INFO_STACK
static _PyErr_StackItem *
__Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
{
    _PyErr_StackItem *exc_info = tstate->exc_info;
    while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
           exc_info->previous_item != NULL)
    {
        exc_info = exc_info->previous_item;
    }
    return exc_info;
}
#endif

/* SaveResetException */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
    *type = exc_info->exc_type;
    *value = exc_info->exc_value;
    *tb = exc_info->exc_traceback;
    #else
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    #endif
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
}
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = type;
    exc_info->exc_value = value;
    exc_info->exc_traceback = tb;
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = type;
    tstate->exc_value = value;
    tstate->exc_traceback = tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}
#endif

/* GetException */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
#endif
{
    PyObject *local_type, *local_value, *local_tb;
#if CYTHON_FAST_THREAD_STATE
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    local_type = tstate->curexc_type;
    local_value = tstate->curexc_value;
    local_tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
#else
    PyErr_Fetch(&local_type, &local_value, &local_tb);
#endif
    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
#if CYTHON_FAST_THREAD_STATE
    if (unlikely(tstate->curexc_type))
#else
    if (unlikely(PyErr_Occurred()))
#endif
        goto bad;
    #if PY_MAJOR_VERSION >= 3
    if (local_tb) {
        if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
            goto bad;
    }
    #endif
    Py_XINCREF(local_tb);
    Py_XINCREF(local_type);
    Py_XINCREF(local_value);
    *type = local_type;
    *value = local_value;
    *tb = local_tb;
#if CYTHON_FAST_THREAD_STATE
    #if CYTHON_USE_EXC_INFO_STACK
    {
        _PyErr_StackItem *exc_info = tstate->exc_info;
        tmp_type = exc_info->exc_type;
        tmp_value = exc_info->exc_value;
        tmp_tb = exc_info->exc_traceback;
        exc_info->exc_type = local_type;
        exc_info->exc_value = local_value;
        exc_info->exc_traceback = local_tb;
    }
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = local_type;
    tstate->exc_value = local_value;
    tstate->exc_traceback = local_tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#else
    PyErr_SetExcInfo(local_type, local_value, local_tb);
#endif
    return 0;
bad:
    *type = 0;
    *value = 0;
    *tb = 0;
    Py_XDECREF(local_type);
    Py_XDECREF(local_value);
    Py_XDECREF(local_tb);
    return -1;
}

/* BytesEquals */
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY
    return PyObject_RichCompareBool(s1, s2, equals);
#else
    if (s1 == s2) {
        return (equals == Py_EQ);
    } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
        const char *ps1, *ps2;
        Py_ssize_t length = PyBytes_GET_SIZE(s1);
        if (length != PyBytes_GET_SIZE(s2))
            return (equals == Py_NE);
        ps1 = PyBytes_AS_STRING(s1);
        ps2 = PyBytes_AS_STRING(s2);
        if (ps1[0] != ps2[0]) {
            return (equals == Py_NE);
        } else if (length == 1) {
            return (equals == Py_EQ);
        } else {
            int result;
#if CYTHON_USE_UNICODE_INTERNALS
            Py_hash_t hash1, hash2;
            hash1 = ((PyBytesObject*)s1)->ob_shash;
            hash2 = ((PyBytesObject*)s2)->ob_shash;
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                return (equals == Py_NE);
            }
#endif
            result = memcmp(ps1, ps2, (size_t)length);
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
        return (equals == Py_NE);
    } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
        return (equals == Py_NE);
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
#endif
}

/* ObjectGetItem */
#if CYTHON_USE_TYPE_SLOTS
static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) {
    PyObject *runerr;
    Py_ssize_t key_value;
    PySequenceMethods *m = Py_TYPE(obj)->tp_as_sequence;
    if (unlikely(!(m && m->sq_item))) {
        PyErr_Format(PyExc_TypeError, "'%.200s' object is not subscriptable", Py_TYPE(obj)->tp_name);
        return NULL;
    }
    key_value = __Pyx_PyIndex_AsSsize_t(index);
    if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
        return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1);
    }
    if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
        PyErr_Clear();
        PyErr_Format(PyExc_IndexError, "cannot fit '%.200s' into an index-sized integer", Py_TYPE(index)->tp_name);
    }
    return NULL;
}
static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) {
    PyMappingMethods *m = Py_TYPE(obj)->tp_as_mapping;
    if (likely(m && m->mp_subscript)) {
        return m->mp_subscript(obj, key);
    }
    return __Pyx_PyObject_GetIndex(obj, key);
}
#endif

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long x;
        long a = PyInt_AS_LONG(op1);
            x = (long)((unsigned long)a + b);
            if (likely((x^a) >= 0 || (x^b) >= 0))
                return PyInt_FromLong(x);
            return PyLong_Type.tp_as_number->nb_add(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
            }
        }
                x = a + b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla + llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = PyFloat_AS_DOUBLE(op1);
            double result;
            PyFPE_START_PROTECT("add", return NULL)
            result = ((double)a) + (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
}
#endif

/* PyFloatBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyFloat_TrueDivideObjC(PyObject *op1, PyObject *op2, double floatval, CYTHON_UNUSED int inplace) {
    const double b = floatval;
    double a, result;
    if (likely(PyFloat_CheckExact(op1))) {
        a = PyFloat_AS_DOUBLE(op1);
    } else
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        a = (double) PyInt_AS_LONG(op1);
    } else
    #endif
    if (likely(PyLong_CheckExact(op1))) {
        #if CYTHON_USE_PYLONG_INTERNALS
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        switch (size) {
            case  0: a = 0.0; break;
            case -1: a = -(double) digits[0]; break;
            case  1: a = (double) digits[0]; break;
            case -2:
            case 2:
                if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (1 * PyLong_SHIFT < 53))) {
                    a = (double) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    if ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
                        if (size == -2)
                            a = -a;
                        break;
                    }
                }
                CYTHON_FALLTHROUGH;
            case -3:
            case 3:
                if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53))) {
                    a = (double) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    if ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
                        if (size == -3)
                            a = -a;
                        break;
                    }
                }
                CYTHON_FALLTHROUGH;
            case -4:
            case 4:
                if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53))) {
                    a = (double) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    if ((8 * sizeof(unsigned long) < 53) || (4 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
                        if (size == -4)
                            a = -a;
                        break;
                    }
                }
                CYTHON_FALLTHROUGH;
            default:
        #else
        {
        #endif
            a = PyLong_AsDouble(op1);
            if (unlikely(a == -1.0 && PyErr_Occurred())) return NULL;
        }
    } else {
        return (inplace ? PyNumber_InPlaceTrueDivide : PyNumber_TrueDivide)(op1, op2);
    }
        PyFPE_START_PROTECT("divide", return NULL)
        result = a / b;
        PyFPE_END_PROTECT(result)
        return PyFloat_FromDouble(result);
}
#endif

/* IsLittleEndian */
  static CYTHON_INLINE int __Pyx_Is_Little_Endian(void)
{
  union {
    uint32_t u32;
    uint8_t u8[4];
  } S;
  S.u32 = 0x01020304;
  return S.u8[0] == 4;
}

/* BufferFormatCheck */
  static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
                              __Pyx_BufFmt_StackElem* stack,
                              __Pyx_TypeInfo* type) {
  stack[0].field = &ctx->root;
  stack[0].parent_offset = 0;
  ctx->root.type = type;
  ctx->root.name = "buffer dtype";
  ctx->root.offset = 0;
  ctx->head = stack;
  ctx->head->field = &ctx->root;
  ctx->fmt_offset = 0;
  ctx->head->parent_offset = 0;
  ctx->new_packmode = '@';
  ctx->enc_packmode = '@';
  ctx->new_count = 1;
  ctx->enc_count = 0;
  ctx->enc_type = 0;
  ctx->is_complex = 0;
  ctx->is_valid_array = 0;
  ctx->struct_alignment = 0;
  while (type->typegroup == 'S') {
    ++ctx->head;
    ctx->head->field = type->fields;
    ctx->head->parent_offset = 0;
    type = type->fields->type;
  }
}
static int __Pyx_BufFmt_ParseNumber(const char** ts) {
    int count;
    const char* t = *ts;
    if (*t < '0' || *t > '9') {
      return -1;
    } else {
        count = *t++ - '0';
        while (*t >= '0' && *t < '9') {
            count *= 10;
            count += *t++ - '0';
        }
    }
    *ts = t;
    return count;
}
static int __Pyx_BufFmt_ExpectNumber(const char **ts) {
    int number = __Pyx_BufFmt_ParseNumber(ts);
    if (number == -1)
        PyErr_Format(PyExc_ValueError,\
                     "Does not understand character buffer dtype format string ('%c')", **ts);
    return number;
}
static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) {
  PyErr_Format(PyExc_ValueError,
               "Unexpected format string character: '%c'", ch);
}
static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) {
  switch (ch) {
    case 'c': return "'char'";
    case 'b': return "'signed char'";
    case 'B': return "'unsigned char'";
    case 'h': return "'short'";
    case 'H': return "'unsigned short'";
    case 'i': return "'int'";
    case 'I': return "'unsigned int'";
    case 'l': return "'long'";
    case 'L': return "'unsigned long'";
    case 'q': return "'long long'";
    case 'Q': return "'unsigned long long'";
    case 'f': return (is_complex ? "'complex float'" : "'float'");
    case 'd': return (is_complex ? "'complex double'" : "'double'");
    case 'g': return (is_complex ? "'complex long double'" : "'long double'");
    case 'T': return "a struct";
    case 'O': return "Python object";
    case 'P': return "a pointer";
    case 's': case 'p': return "a string";
    case 0: return "end";
    default: return "unparseable format string";
  }
}
static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) {
  switch (ch) {
    case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
    case 'h': case 'H': return 2;
    case 'i': case 'I': case 'l': case 'L': return 4;
    case 'q': case 'Q': return 8;
    case 'f': return (is_complex ? 8 : 4);
    case 'd': return (is_complex ? 16 : 8);
    case 'g': {
      PyErr_SetString(PyExc_ValueError, "Python does not define a standard format string size for long double ('g')..");
      return 0;
    }
    case 'O': case 'P': return sizeof(void*);
    default:
      __Pyx_BufFmt_RaiseUnexpectedChar(ch);
      return 0;
    }
}
static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) {
  switch (ch) {
    case 'c': case 'b': case 'B': case 's': case 'p': return 1;
    case 'h': case 'H': return sizeof(short);
    case 'i': case 'I': return sizeof(int);
    case 'l': case 'L': return sizeof(long);
    #ifdef HAVE_LONG_LONG
    case 'q': case 'Q': return sizeof(PY_LONG_LONG);
    #endif
    case 'f': return sizeof(float) * (is_complex ? 2 : 1);
    case 'd': return sizeof(double) * (is_complex ? 2 : 1);
    case 'g': return sizeof(long double) * (is_complex ? 2 : 1);
    case 'O': case 'P': return sizeof(void*);
    default: {
      __Pyx_BufFmt_RaiseUnexpectedChar(ch);
      return 0;
    }
  }
}
typedef struct { char c; short x; } __Pyx_st_short;
typedef struct { char c; int x; } __Pyx_st_int;
typedef struct { char c; long x; } __Pyx_st_long;
typedef struct { char c; float x; } __Pyx_st_float;
typedef struct { char c; double x; } __Pyx_st_double;
typedef struct { char c; long double x; } __Pyx_st_longdouble;
typedef struct { char c; void *x; } __Pyx_st_void_p;
#ifdef HAVE_LONG_LONG
typedef struct { char c; PY_LONG_LONG x; } __Pyx_st_longlong;
#endif
static size_t __Pyx_BufFmt_TypeCharToAlignment(char ch, CYTHON_UNUSED int is_complex) {
  switch (ch) {
    case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
    case 'h': case 'H': return sizeof(__Pyx_st_short) - sizeof(short);
    case 'i': case 'I': return sizeof(__Pyx_st_int) - sizeof(int);
    case 'l': case 'L': return sizeof(__Pyx_st_long) - sizeof(long);
#ifdef HAVE_LONG_LONG
    case 'q': case 'Q': return sizeof(__Pyx_st_longlong) - sizeof(PY_LONG_LONG);
#endif
    case 'f': return sizeof(__Pyx_st_float) - sizeof(float);
    case 'd': return sizeof(__Pyx_st_double) - sizeof(double);
    case 'g': return sizeof(__Pyx_st_longdouble) - sizeof(long double);
    case 'P': case 'O': return sizeof(__Pyx_st_void_p) - sizeof(void*);
    default:
      __Pyx_BufFmt_RaiseUnexpectedChar(ch);
      return 0;
    }
}
/* These are for computing the padding at the end of the struct to align
   on the first member of the struct. This will probably the same as above,
   but we don't have any guarantees.
 */
typedef struct { short x; char c; } __Pyx_pad_short;
typedef struct { int x; char c; } __Pyx_pad_int;
typedef struct { long x; char c; } __Pyx_pad_long;
typedef struct { float x; char c; } __Pyx_pad_float;
typedef struct { double x; char c; } __Pyx_pad_double;
typedef struct { long double x; char c; } __Pyx_pad_longdouble;
typedef struct { void *x; char c; } __Pyx_pad_void_p;
#ifdef HAVE_LONG_LONG
typedef struct { PY_LONG_LONG x; char c; } __Pyx_pad_longlong;
#endif
static size_t __Pyx_BufFmt_TypeCharToPadding(char ch, CYTHON_UNUSED int is_complex) {
  switch (ch) {
    case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
    case 'h': case 'H': return sizeof(__Pyx_pad_short) - sizeof(short);
    case 'i': case 'I': return sizeof(__Pyx_pad_int) - sizeof(int);
    case 'l': case 'L': return sizeof(__Pyx_pad_long) - sizeof(long);
#ifdef HAVE_LONG_LONG
    case 'q': case 'Q': return sizeof(__Pyx_pad_longlong) - sizeof(PY_LONG_LONG);
#endif
    case 'f': return sizeof(__Pyx_pad_float) - sizeof(float);
    case 'd': return sizeof(__Pyx_pad_double) - sizeof(double);
    case 'g': return sizeof(__Pyx_pad_longdouble) - sizeof(long double);
    case 'P': case 'O': return sizeof(__Pyx_pad_void_p) - sizeof(void*);
    default:
      __Pyx_BufFmt_RaiseUnexpectedChar(ch);
      return 0;
    }
}
static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) {
  switch (ch) {
    case 'c':
        return 'H';
    case 'b': case 'h': case 'i':
    case 'l': case 'q': case 's': case 'p':
        return 'I';
    case 'B': case 'H': case 'I': case 'L': case 'Q':
        return 'U';
    case 'f': case 'd': case 'g':
        return (is_complex ? 'C' : 'R');
    case 'O':
        return 'O';
    case 'P':
        return 'P';
    default: {
      __Pyx_BufFmt_RaiseUnexpectedChar(ch);
      return 0;
    }
  }
}
static void __Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context* ctx) {
  if (ctx->head == NULL || ctx->head->field == &ctx->root) {
    const char* expected;
    const char* quote;
    if (ctx->head == NULL) {
      expected = "end";
      quote = "";
    } else {
      expected = ctx->head->field->type->name;
      quote = "'";
    }
    PyErr_Format(PyExc_ValueError,
                 "Buffer dtype mismatch, expected %s%s%s but got %s",
                 quote, expected, quote,
                 __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex));
  } else {
    __Pyx_StructField* field = ctx->head->field;
    __Pyx_StructField* parent = (ctx->head - 1)->field;
    PyErr_Format(PyExc_ValueError,
                 "Buffer dtype mismatch, expected '%s' but got %s in '%s.%s'",
                 field->type->name, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex),
                 parent->type->name, field->name);
  }
}
static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) {
  char group;
  size_t size, offset, arraysize = 1;
  if (ctx->enc_type == 0) return 0;
  if (ctx->head->field->type->arraysize[0]) {
    int i, ndim = 0;
    if (ctx->enc_type == 's' || ctx->enc_type == 'p') {
        ctx->is_valid_array = ctx->head->field->type->ndim == 1;
        ndim = 1;
        if (ctx->enc_count != ctx->head->field->type->arraysize[0]) {
            PyErr_Format(PyExc_ValueError,
                         "Expected a dimension of size %zu, got %zu",
                         ctx->head->field->type->arraysize[0], ctx->enc_count);
            return -1;
        }
    }
    if (!ctx->is_valid_array) {
      PyErr_Format(PyExc_ValueError, "Expected %d dimensions, got %d",
                   ctx->head->field->type->ndim, ndim);
      return -1;
    }
    for (i = 0; i < ctx->head->field->type->ndim; i++) {
      arraysize *= ctx->head->field->type->arraysize[i];
    }
    ctx->is_valid_array = 0;
    ctx->enc_count = 1;
  }
  group = __Pyx_BufFmt_TypeCharToGroup(ctx->enc_type, ctx->is_complex);
  do {
    __Pyx_StructField* field = ctx->head->field;
    __Pyx_TypeInfo* type = field->type;
    if (ctx->enc_packmode == '@' || ctx->enc_packmode == '^') {
      size = __Pyx_BufFmt_TypeCharToNativeSize(ctx->enc_type, ctx->is_complex);
    } else {
      size = __Pyx_BufFmt_TypeCharToStandardSize(ctx->enc_type, ctx->is_complex);
    }
    if (ctx->enc_packmode == '@') {
      size_t align_at = __Pyx_BufFmt_TypeCharToAlignment(ctx->enc_type, ctx->is_complex);
      size_t align_mod_offset;
      if (align_at == 0) return -1;
      align_mod_offset = ctx->fmt_offset % align_at;
      if (align_mod_offset > 0) ctx->fmt_offset += align_at - align_mod_offset;
      if (ctx->struct_alignment == 0)
          ctx->struct_alignment = __Pyx_BufFmt_TypeCharToPadding(ctx->enc_type,
                                                                 ctx->is_complex);
    }
    if (type->size != size || type->typegroup != group) {
      if (type->typegroup == 'C' && type->fields != NULL) {
        size_t parent_offset = ctx->head->parent_offset + field->offset;
        ++ctx->head;
        ctx->head->field = type->fields;
        ctx->head->parent_offset = parent_offset;
        continue;
      }
      if ((type->typegroup == 'H' || group == 'H') && type->size == size) {
      } else {
          __Pyx_BufFmt_RaiseExpected(ctx);
          return -1;
      }
    }
    offset = ctx->head->parent_offset + field->offset;
    if (ctx->fmt_offset != offset) {
      PyErr_Format(PyExc_ValueError,
                   "Buffer dtype mismatch; next field is at offset %" CYTHON_FORMAT_SSIZE_T "d but %" CYTHON_FORMAT_SSIZE_T "d expected",
                   (Py_ssize_t)ctx->fmt_offset, (Py_ssize_t)offset);
      return -1;
    }
    ctx->fmt_offset += size;
    if (arraysize)
      ctx->fmt_offset += (arraysize - 1) * size;
    --ctx->enc_count;
    while (1) {
      if (field == &ctx->root) {
        ctx->head = NULL;
        if (ctx->enc_count != 0) {
          __Pyx_BufFmt_RaiseExpected(ctx);
          return -1;
        }
        break;
      }
      ctx->head->field = ++field;
      if (field->type == NULL) {
        --ctx->head;
        field = ctx->head->field;
        continue;
      } else if (field->type->typegroup == 'S') {
        size_t parent_offset = ctx->head->parent_offset + field->offset;
        if (field->type->fields->type == NULL) continue;
        field = field->type->fields;
        ++ctx->head;
        ctx->head->field = field;
        ctx->head->parent_offset = parent_offset;
        break;
      } else {
        break;
      }
    }
  } while (ctx->enc_count);
  ctx->enc_type = 0;
  ctx->is_complex = 0;
  return 0;
}
static PyObject *
__pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp)
{
    const char *ts = *tsp;
    int i = 0, number;
    int ndim = ctx->head->field->type->ndim;
;
    ++ts;
    if (ctx->new_count != 1) {
        PyErr_SetString(PyExc_ValueError,
                        "Cannot handle repeated arrays in format string");
        return NULL;
    }
    if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
    while (*ts && *ts != ')') {
        switch (*ts) {
            case ' ': case '\f': case '\r': case '\n': case '\t': case '\v':  continue;
            default:  break;
        }
        number = __Pyx_BufFmt_ExpectNumber(&ts);
        if (number == -1) return NULL;
        if (i < ndim && (size_t) number != ctx->head->field->type->arraysize[i])
            return PyErr_Format(PyExc_ValueError,
                        "Expected a dimension of size %zu, got %d",
                        ctx->head->field->type->arraysize[i], number);
        if (*ts != ',' && *ts != ')')
            return PyErr_Format(PyExc_ValueError,
                                "Expected a comma in format string, got '%c'", *ts);
        if (*ts == ',') ts++;
        i++;
    }
    if (i != ndim)
        return PyErr_Format(PyExc_ValueError, "Expected %d dimension(s), got %d",
                            ctx->head->field->type->ndim, i);
    if (!*ts) {
        PyErr_SetString(PyExc_ValueError,
                        "Unexpected end of format string, expected ')'");
        return NULL;
    }
    ctx->is_valid_array = 1;
    ctx->new_count = 1;
    *tsp = ++ts;
    return Py_None;
}
static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts) {
  int got_Z = 0;
  while (1) {
    switch(*ts) {
      case 0:
        if (ctx->enc_type != 0 && ctx->head == NULL) {
          __Pyx_BufFmt_RaiseExpected(ctx);
          return NULL;
        }
        if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
        if (ctx->head != NULL) {
          __Pyx_BufFmt_RaiseExpected(ctx);
          return NULL;
        }
        return ts;
      case ' ':
      case '\r':
      case '\n':
        ++ts;
        break;
      case '<':
        if (!__Pyx_Is_Little_Endian()) {
          PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler");
          return NULL;
        }
        ctx->new_packmode = '=';
        ++ts;
        break;
      case '>':
      case '!':
        if (__Pyx_Is_Little_Endian()) {
          PyErr_SetString(PyExc_ValueError, "Big-endian buffer not supported on little-endian compiler");
          return NULL;
        }
        ctx->new_packmode = '=';
        ++ts;
        break;
      case '=':
      case '@':
      case '^':
        ctx->new_packmode = *ts++;
        break;
      case 'T':
        {
          const char* ts_after_sub;
          size_t i, struct_count = ctx->new_count;
          size_t struct_alignment = ctx->struct_alignment;
          ctx->new_count = 1;
          ++ts;
          if (*ts != '{') {
            PyErr_SetString(PyExc_ValueError, "Buffer acquisition: Expected '{' after 'T'");
            return NULL;
          }
          if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
          ctx->enc_type = 0;
          ctx->enc_count = 0;
          ctx->struct_alignment = 0;
          ++ts;
          ts_after_sub = ts;
          for (i = 0; i != struct_count; ++i) {
            ts_after_sub = __Pyx_BufFmt_CheckString(ctx, ts);
            if (!ts_after_sub) return NULL;
          }
          ts = ts_after_sub;
          if (struct_alignment) ctx->struct_alignment = struct_alignment;
        }
        break;
      case '}':
        {
          size_t alignment = ctx->struct_alignment;
          ++ts;
          if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
          ctx->enc_type = 0;
          if (alignment && ctx->fmt_offset % alignment) {
            ctx->fmt_offset += alignment - (ctx->fmt_offset % alignment);
          }
        }
        return ts;
      case 'x':
        if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
        ctx->fmt_offset += ctx->new_count;
        ctx->new_count = 1;
        ctx->enc_count = 0;
        ctx->enc_type = 0;
        ctx->enc_packmode = ctx->new_packmode;
        ++ts;
        break;
      case 'Z':
        got_Z = 1;
        ++ts;
        if (*ts != 'f' && *ts != 'd' && *ts != 'g') {
          __Pyx_BufFmt_RaiseUnexpectedChar('Z');
          return NULL;
        }
        CYTHON_FALLTHROUGH;
      case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I':
      case 'l': case 'L': case 'q': case 'Q':
      case 'f': case 'd': case 'g':
      case 'O': case 'p':
        if (ctx->enc_type == *ts && got_Z == ctx->is_complex &&
            ctx->enc_packmode == ctx->new_packmode) {
          ctx->enc_count += ctx->new_count;
          ctx->new_count = 1;
          got_Z = 0;
          ++ts;
          break;
        }
        CYTHON_FALLTHROUGH;
      case 's':
        if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
        ctx->enc_count = ctx->new_count;
        ctx->enc_packmode = ctx->new_packmode;
        ctx->enc_type = *ts;
        ctx->is_complex = got_Z;
        ++ts;
        ctx->new_count = 1;
        got_Z = 0;
        break;
      case ':':
        ++ts;
        while(*ts != ':') ++ts;
        ++ts;
        break;
      case '(':
        if (!__pyx_buffmt_parse_array(ctx, &ts)) return NULL;
        break;
      default:
        {
          int number = __Pyx_BufFmt_ExpectNumber(&ts);
          if (number == -1) return NULL;
          ctx->new_count = (size_t)number;
        }
    }
  }
}

/* BufferGetAndValidate */
    static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) {
  if (unlikely(info->buf == NULL)) return;
  if (info->suboffsets == __Pyx_minusones) info->suboffsets = NULL;
  __Pyx_ReleaseBuffer(info);
}
static void __Pyx_ZeroBuffer(Py_buffer* buf) {
  buf->buf = NULL;
  buf->obj = NULL;
  buf->strides = __Pyx_zeros;
  buf->shape = __Pyx_zeros;
  buf->suboffsets = __Pyx_minusones;
}
static int __Pyx__GetBufferAndValidate(
        Py_buffer* buf, PyObject* obj,  __Pyx_TypeInfo* dtype, int flags,
        int nd, int cast, __Pyx_BufFmt_StackElem* stack)
{
  buf->buf = NULL;
  if (unlikely(__Pyx_GetBuffer(obj, buf, flags) == -1)) {
    __Pyx_ZeroBuffer(buf);
    return -1;
  }
  if (unlikely(buf->ndim != nd)) {
    PyErr_Format(PyExc_ValueError,
                 "Buffer has wrong number of dimensions (expected %d, got %d)",
                 nd, buf->ndim);
    goto fail;
  }
  if (!cast) {
    __Pyx_BufFmt_Context ctx;
    __Pyx_BufFmt_Init(&ctx, stack, dtype);
    if (!__Pyx_BufFmt_CheckString(&ctx, buf->format)) goto fail;
  }
  if (unlikely((unsigned)buf->itemsize != dtype->size)) {
    PyErr_Format(PyExc_ValueError,
      "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "d byte%s) does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "d byte%s)",
      buf->itemsize, (buf->itemsize > 1) ? "s" : "",
      dtype->name, (Py_ssize_t)dtype->size, (dtype->size > 1) ? "s" : "");
    goto fail;
  }
  if (buf->suboffsets == NULL) buf->suboffsets = __Pyx_minusones;
  return 0;
fail:;
  __Pyx_SafeReleaseBuffer(buf);
  return -1;
}

/* UnicodeEquals */
    static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY
    return PyObject_RichCompareBool(s1, s2, equals);
#else
#if PY_MAJOR_VERSION < 3
    PyObject* owned_ref = NULL;
#endif
    int s1_is_unicode, s2_is_unicode;
    if (s1 == s2) {
        goto return_eq;
    }
    s1_is_unicode = PyUnicode_CheckExact(s1);
    s2_is_unicode = PyUnicode_CheckExact(s2);
#if PY_MAJOR_VERSION < 3
    if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
        owned_ref = PyUnicode_FromObject(s2);
        if (unlikely(!owned_ref))
            return -1;
        s2 = owned_ref;
        s2_is_unicode = 1;
    } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
        owned_ref = PyUnicode_FromObject(s1);
        if (unlikely(!owned_ref))
            return -1;
        s1 = owned_ref;
        s1_is_unicode = 1;
    } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
        return __Pyx_PyBytes_Equals(s1, s2, equals);
    }
#endif
    if (s1_is_unicode & s2_is_unicode) {
        Py_ssize_t length;
        int kind;
        void *data1, *data2;
        if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
            return -1;
        length = __Pyx_PyUnicode_GET_LENGTH(s1);
        if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
            goto return_ne;
        }
#if CYTHON_USE_UNICODE_INTERNALS
        {
            Py_hash_t hash1, hash2;
        #if CYTHON_PEP393_ENABLED
            hash1 = ((PyASCIIObject*)s1)->hash;
            hash2 = ((PyASCIIObject*)s2)->hash;
        #else
            hash1 = ((PyUnicodeObject*)s1)->hash;
            hash2 = ((PyUnicodeObject*)s2)->hash;
        #endif
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                goto return_ne;
            }
        }
#endif
        kind = __Pyx_PyUnicode_KIND(s1);
        if (kind != __Pyx_PyUnicode_KIND(s2)) {
            goto return_ne;
        }
        data1 = __Pyx_PyUnicode_DATA(s1);
        data2 = __Pyx_PyUnicode_DATA(s2);
        if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
            goto return_ne;
        } else if (length == 1) {
            goto return_eq;
        } else {
            int result = memcmp(data1, data2, (size_t)(length * kind));
            #if PY_MAJOR_VERSION < 3
            Py_XDECREF(owned_ref);
            #endif
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & s2_is_unicode) {
        goto return_ne;
    } else if ((s2 == Py_None) & s1_is_unicode) {
        goto return_ne;
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        #if PY_MAJOR_VERSION < 3
        Py_XDECREF(owned_ref);
        #endif
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
return_eq:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_EQ);
return_ne:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_NE);
#endif
}

/* Import */
    static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
    PyObject *empty_list = 0;
    PyObject *module = 0;
    PyObject *global_dict = 0;
    PyObject *empty_dict = 0;
    PyObject *list;
    #if PY_MAJOR_VERSION < 3
    PyObject *py_import;
    py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
    if (!py_import)
        goto bad;
    #endif
    if (from_list)
        list = from_list;
    else {
        empty_list = PyList_New(0);
        if (!empty_list)
            goto bad;
        list = empty_list;
    }
    global_dict = PyModule_GetDict(__pyx_m);
    if (!global_dict)
        goto bad;
    empty_dict = PyDict_New();
    if (!empty_dict)
        goto bad;
    {
        #if PY_MAJOR_VERSION >= 3
        if (level == -1) {
            if (strchr(__Pyx_MODULE_NAME, '.')) {
                module = PyImport_ImportModuleLevelObject(
                    name, global_dict, empty_dict, list, 1);
                if (!module) {
                    if (!PyErr_ExceptionMatches(PyExc_ImportError))
                        goto bad;
                    PyErr_Clear();
                }
            }
            level = 0;
        }
        #endif
        if (!module) {
            #if PY_MAJOR_VERSION < 3
            PyObject *py_level = PyInt_FromLong(level);
            if (!py_level)
                goto bad;
            module = PyObject_CallFunctionObjArgs(py_import,
                name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
            Py_DECREF(py_level);
            #else
            module = PyImport_ImportModuleLevelObject(
                name, global_dict, empty_dict, list, level);
            #endif
        }
    }
bad:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(py_import);
    #endif
    Py_XDECREF(empty_list);
    Py_XDECREF(empty_dict);
    return module;
}

/* ImportFrom */
    static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
    PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
    if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Format(PyExc_ImportError,
        #if PY_MAJOR_VERSION < 3
            "cannot import name %.230s", PyString_AS_STRING(name));
        #else
            "cannot import name %S", name);
        #endif
    }
    return value;
}

/* HasAttr */
    static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
    PyObject *r;
    if (unlikely(!__Pyx_PyBaseString_Check(n))) {
        PyErr_SetString(PyExc_TypeError,
                        "hasattr(): attribute name must be string");
        return -1;
    }
    r = __Pyx_GetAttr(o, n);
    if (unlikely(!r)) {
        PyErr_Clear();
        return 0;
    } else {
        Py_DECREF(r);
        return 1;
    }
}

/* PyObject_GenericGetAttrNoDict */
    #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
    PyErr_Format(PyExc_AttributeError,
#if PY_MAJOR_VERSION >= 3
                 "'%.50s' object has no attribute '%U'",
                 tp->tp_name, attr_name);
#else
                 "'%.50s' object has no attribute '%.400s'",
                 tp->tp_name, PyString_AS_STRING(attr_name));
#endif
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
    PyObject *descr;
    PyTypeObject *tp = Py_TYPE(obj);
    if (unlikely(!PyString_Check(attr_name))) {
        return PyObject_GenericGetAttr(obj, attr_name);
    }
    assert(!tp->tp_dictoffset);
    descr = _PyType_Lookup(tp, attr_name);
    if (unlikely(!descr)) {
        return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
    }
    Py_INCREF(descr);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
    #endif
    {
        descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
        if (unlikely(f)) {
            PyObject *res = f(descr, obj, (PyObject *)tp);
            Py_DECREF(descr);
            return res;
        }
    }
    return descr;
}
#endif

/* PyObject_GenericGetAttr */
    #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
    if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
        return PyObject_GenericGetAttr(obj, attr_name);
    }
    return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
}
#endif

/* SetupReduce */
    static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
  int ret;
  PyObject *name_attr;
  name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name);
  if (likely(name_attr)) {
      ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
  } else {
      ret = -1;
  }
  if (unlikely(ret < 0)) {
      PyErr_Clear();
      ret = 0;
  }
  Py_XDECREF(name_attr);
  return ret;
}
static int __Pyx_setup_reduce(PyObject* type_obj) {
    int ret = 0;
    PyObject *object_reduce = NULL;
    PyObject *object_reduce_ex = NULL;
    PyObject *reduce = NULL;
    PyObject *reduce_ex = NULL;
    PyObject *reduce_cython = NULL;
    PyObject *setstate = NULL;
    PyObject *setstate_cython = NULL;
#if CYTHON_USE_PYTYPE_LOOKUP
    if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD;
#else
    if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD;
#endif
#if CYTHON_USE_PYTYPE_LOOKUP
    object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
#else
    object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
#endif
    reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD;
    if (reduce_ex == object_reduce_ex) {
#if CYTHON_USE_PYTYPE_LOOKUP
        object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
#else
        object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
#endif
        reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD;
        if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
            reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD;
            ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD;
            ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD;
            setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
            if (!setstate) PyErr_Clear();
            if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
                setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD;
                ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD;
                ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD;
            }
            PyType_Modified((PyTypeObject*)type_obj);
        }
    }
    goto GOOD;
BAD:
    if (!PyErr_Occurred())
        PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
    ret = -1;
GOOD:
#if !CYTHON_USE_PYTYPE_LOOKUP
    Py_XDECREF(object_reduce);
    Py_XDECREF(object_reduce_ex);
#endif
    Py_XDECREF(reduce);
    Py_XDECREF(reduce_ex);
    Py_XDECREF(reduce_cython);
    Py_XDECREF(setstate);
    Py_XDECREF(setstate_cython);
    return ret;
}

/* SetVTable */
    static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
#if PY_VERSION_HEX >= 0x02070000
    PyObject *ob = PyCapsule_New(vtable, 0, 0);
#else
    PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
#endif
    if (!ob)
        goto bad;
    if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
        goto bad;
    Py_DECREF(ob);
    return 0;
bad:
    Py_XDECREF(ob);
    return -1;
}

/* TypeImport */
    #ifndef __PYX_HAVE_RT_ImportType
#define __PYX_HAVE_RT_ImportType
static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, const char *class_name,
    size_t size, enum __Pyx_ImportType_CheckSize check_size)
{
    PyObject *result = 0;
    char warning[200];
    Py_ssize_t basicsize;
#ifdef Py_LIMITED_API
    PyObject *py_basicsize;
#endif
    result = PyObject_GetAttrString(module, class_name);
    if (!result)
        goto bad;
    if (!PyType_Check(result)) {
        PyErr_Format(PyExc_TypeError,
            "%.200s.%.200s is not a type object",
            module_name, class_name);
        goto bad;
    }
#ifndef Py_LIMITED_API
    basicsize = ((PyTypeObject *)result)->tp_basicsize;
#else
    py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
    if (!py_basicsize)
        goto bad;
    basicsize = PyLong_AsSsize_t(py_basicsize);
    Py_DECREF(py_basicsize);
    py_basicsize = 0;
    if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
        goto bad;
#endif
    if ((size_t)basicsize < size) {
        PyErr_Format(PyExc_ValueError,
            "%.200s.%.200s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd from PyObject",
            module_name, class_name, size, basicsize);
        goto bad;
    }
    if (check_size == __Pyx_ImportType_CheckSize_Error && (size_t)basicsize != size) {
        PyErr_Format(PyExc_ValueError,
            "%.200s.%.200s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd from PyObject",
            module_name, class_name, size, basicsize);
        goto bad;
    }
    else if (check_size == __Pyx_ImportType_CheckSize_Warn && (size_t)basicsize > size) {
        PyOS_snprintf(warning, sizeof(warning),
            "%s.%s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd from PyObject",
            module_name, class_name, size, basicsize);
        if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
    }
    return (PyTypeObject *)result;
bad:
    Py_XDECREF(result);
    return NULL;
}
#endif

/* FetchCommonType */
    static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
    PyObject* fake_module;
    PyTypeObject* cached_type = NULL;
    fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
    if (!fake_module) return NULL;
    Py_INCREF(fake_module);
    cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
    if (cached_type) {
        if (!PyType_Check((PyObject*)cached_type)) {
            PyErr_Format(PyExc_TypeError,
                "Shared Cython type %.200s is not a type object",
                type->tp_name);
            goto bad;
        }
        if (cached_type->tp_basicsize != type->tp_basicsize) {
            PyErr_Format(PyExc_TypeError,
                "Shared Cython type %.200s has the wrong size, try recompiling",
                type->tp_name);
            goto bad;
        }
    } else {
        if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
        PyErr_Clear();
        if (PyType_Ready(type) < 0) goto bad;
        if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
            goto bad;
        Py_INCREF(type);
        cached_type = type;
    }
done:
    Py_DECREF(fake_module);
    return cached_type;
bad:
    Py_XDECREF(cached_type);
    cached_type = NULL;
    goto done;
}

/* CythonFunction */
    #include <structmember.h>
static PyObject *
__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
{
    if (unlikely(op->func_doc == NULL)) {
        if (op->func.m_ml->ml_doc) {
#if PY_MAJOR_VERSION >= 3
            op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
#else
            op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
#endif
            if (unlikely(op->func_doc == NULL))
                return NULL;
        } else {
            Py_INCREF(Py_None);
            return Py_None;
        }
    }
    Py_INCREF(op->func_doc);
    return op->func_doc;
}
static int
__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp = op->func_doc;
    if (value == NULL) {
        value = Py_None;
    }
    Py_INCREF(value);
    op->func_doc = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    if (unlikely(op->func_name == NULL)) {
#if PY_MAJOR_VERSION >= 3
        op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
#else
        op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
#endif
        if (unlikely(op->func_name == NULL))
            return NULL;
    }
    Py_INCREF(op->func_name);
    return op->func_name;
}
static int
__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    tmp = op->func_name;
    Py_INCREF(value);
    op->func_name = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    Py_INCREF(op->func_qualname);
    return op->func_qualname;
}
static int
__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    tmp = op->func_qualname;
    Py_INCREF(value);
    op->func_qualname = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
{
    PyObject *self;
    self = m->func_closure;
    if (self == NULL)
        self = Py_None;
    Py_INCREF(self);
    return self;
}
static PyObject *
__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    if (unlikely(op->func_dict == NULL)) {
        op->func_dict = PyDict_New();
        if (unlikely(op->func_dict == NULL))
            return NULL;
    }
    Py_INCREF(op->func_dict);
    return op->func_dict;
}
static int
__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
    if (unlikely(value == NULL)) {
        PyErr_SetString(PyExc_TypeError,
               "function's dictionary may not be deleted");
        return -1;
    }
    if (unlikely(!PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
               "setting function's dictionary to a non-dict");
        return -1;
    }
    tmp = op->func_dict;
    Py_INCREF(value);
    op->func_dict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    Py_INCREF(op->func_globals);
    return op->func_globals;
}
static PyObject *
__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    Py_INCREF(Py_None);
    return Py_None;
}
static PyObject *
__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    PyObject* result = (op->func_code) ? op->func_code : Py_None;
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
    int result = 0;
    PyObject *res = op->defaults_getter((PyObject *) op);
    if (unlikely(!res))
        return -1;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
    Py_INCREF(op->defaults_tuple);
    op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
    Py_INCREF(op->defaults_kwdict);
    #else
    op->defaults_tuple = PySequence_ITEM(res, 0);
    if (unlikely(!op->defaults_tuple)) result = -1;
    else {
        op->defaults_kwdict = PySequence_ITEM(res, 1);
        if (unlikely(!op->defaults_kwdict)) result = -1;
    }
    #endif
    Py_DECREF(res);
    return result;
}
static int
__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyTuple_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__defaults__ must be set to a tuple object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_tuple;
    op->defaults_tuple = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
    PyObject* result = op->defaults_tuple;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
            result = op->defaults_tuple;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__kwdefaults__ must be set to a dict object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_kwdict;
    op->defaults_kwdict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
    PyObject* result = op->defaults_kwdict;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
            result = op->defaults_kwdict;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
    PyObject* tmp;
    if (!value || value == Py_None) {
        value = NULL;
    } else if (!PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__annotations__ must be set to a dict object");
        return -1;
    }
    Py_XINCREF(value);
    tmp = op->func_annotations;
    op->func_annotations = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
    PyObject* result = op->func_annotations;
    if (unlikely(!result)) {
        result = PyDict_New();
        if (unlikely(!result)) return NULL;
        op->func_annotations = result;
    }
    Py_INCREF(result);
    return result;
}
static PyGetSetDef __pyx_CyFunction_getsets[] = {
    {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
    {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
    {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
    {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
    {0, 0, 0, 0, 0}
};
static PyMemberDef __pyx_CyFunction_members[] = {
    {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), PY_WRITE_RESTRICTED, 0},
    {0, 0, 0,  0, 0}
};
static PyObject *
__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromString(m->func.m_ml->ml_name);
#else
    return PyString_FromString(m->func.m_ml->ml_name);
#endif
}
static PyMethodDef __pyx_CyFunction_methods[] = {
    {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
    {0, 0, 0, 0}
};
#if PY_VERSION_HEX < 0x030500A0
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
#else
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist)
#endif
static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname,
                                      PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
    __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type);
    if (op == NULL)
        return NULL;
    op->flags = flags;
    __Pyx_CyFunction_weakreflist(op) = NULL;
    op->func.m_ml = ml;
    op->func.m_self = (PyObject *) op;
    Py_XINCREF(closure);
    op->func_closure = closure;
    Py_XINCREF(module);
    op->func.m_module = module;
    op->func_dict = NULL;
    op->func_name = NULL;
    Py_INCREF(qualname);
    op->func_qualname = qualname;
    op->func_doc = NULL;
    op->func_classobj = NULL;
    op->func_globals = globals;
    Py_INCREF(op->func_globals);
    Py_XINCREF(code);
    op->func_code = code;
    op->defaults_pyobjects = 0;
    op->defaults = NULL;
    op->defaults_tuple = NULL;
    op->defaults_kwdict = NULL;
    op->defaults_getter = NULL;
    op->func_annotations = NULL;
    PyObject_GC_Track(op);
    return (PyObject *) op;
}
static int
__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
{
    Py_CLEAR(m->func_closure);
    Py_CLEAR(m->func.m_module);
    Py_CLEAR(m->func_dict);
    Py_CLEAR(m->func_name);
    Py_CLEAR(m->func_qualname);
    Py_CLEAR(m->func_doc);
    Py_CLEAR(m->func_globals);
    Py_CLEAR(m->func_code);
    Py_CLEAR(m->func_classobj);
    Py_CLEAR(m->defaults_tuple);
    Py_CLEAR(m->defaults_kwdict);
    Py_CLEAR(m->func_annotations);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_XDECREF(pydefaults[i]);
        PyObject_Free(m->defaults);
        m->defaults = NULL;
    }
    return 0;
}
static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    if (__Pyx_CyFunction_weakreflist(m) != NULL)
        PyObject_ClearWeakRefs((PyObject *) m);
    __Pyx_CyFunction_clear(m);
    PyObject_GC_Del(m);
}
static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    PyObject_GC_UnTrack(m);
    __Pyx__CyFunction_dealloc(m);
}
static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
{
    Py_VISIT(m->func_closure);
    Py_VISIT(m->func.m_module);
    Py_VISIT(m->func_dict);
    Py_VISIT(m->func_name);
    Py_VISIT(m->func_qualname);
    Py_VISIT(m->func_doc);
    Py_VISIT(m->func_globals);
    Py_VISIT(m->func_code);
    Py_VISIT(m->func_classobj);
    Py_VISIT(m->defaults_tuple);
    Py_VISIT(m->defaults_kwdict);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_VISIT(pydefaults[i]);
    }
    return 0;
}
static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
{
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
        Py_INCREF(func);
        return func;
    }
    if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
        if (type == NULL)
            type = (PyObject *)(Py_TYPE(obj));
        return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type)));
    }
    if (obj == Py_None)
        obj = NULL;
    return __Pyx_PyMethod_New(func, obj, type);
}
static PyObject*
__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromFormat("<cyfunction %U at %p>",
                                op->func_qualname, (void *)op);
#else
    return PyString_FromFormat("<cyfunction %s at %p>",
                               PyString_AsString(op->func_qualname), (void *)op);
#endif
}
static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
    PyCFunctionObject* f = (PyCFunctionObject*)func;
    PyCFunction meth = f->m_ml->ml_meth;
    Py_ssize_t size;
    switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
    case METH_VARARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0))
            return (*meth)(self, arg);
        break;
    case METH_VARARGS | METH_KEYWORDS:
        return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw);
    case METH_NOARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
            size = PyTuple_GET_SIZE(arg);
            if (likely(size == 0))
                return (*meth)(self, NULL);
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    case METH_O:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
            size = PyTuple_GET_SIZE(arg);
            if (likely(size == 1)) {
                PyObject *result, *arg0;
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                arg0 = PyTuple_GET_ITEM(arg, 0);
                #else
                arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
                #endif
                result = (*meth)(self, arg0);
                #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
                Py_DECREF(arg0);
                #endif
                return result;
            }
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags in "
                        "__Pyx_CyFunction_Call. METH_OLDARGS is no "
                        "longer supported!");
        return NULL;
    }
    PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
                 f->m_ml->ml_name);
    return NULL;
}
static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw);
}
static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
    PyObject *result;
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
    if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
        Py_ssize_t argc;
        PyObject *new_args;
        PyObject *self;
        argc = PyTuple_GET_SIZE(args);
        new_args = PyTuple_GetSlice(args, 1, argc);
        if (unlikely(!new_args))
            return NULL;
        self = PyTuple_GetItem(args, 0);
        if (unlikely(!self)) {
            Py_DECREF(new_args);
            return NULL;
        }
        result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
        Py_DECREF(new_args);
    } else {
        result = __Pyx_CyFunction_Call(func, args, kw);
    }
    return result;
}
static PyTypeObject __pyx_CyFunctionType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    "cython_function_or_method",
    sizeof(__pyx_CyFunctionObject),
    0,
    (destructor) __Pyx_CyFunction_dealloc,
    0,
    0,
    0,
#if PY_MAJOR_VERSION < 3
    0,
#else
    0,
#endif
    (reprfunc) __Pyx_CyFunction_repr,
    0,
    0,
    0,
    0,
    __Pyx_CyFunction_CallAsMethod,
    0,
    0,
    0,
    0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
    0,
    (traverseproc) __Pyx_CyFunction_traverse,
    (inquiry) __Pyx_CyFunction_clear,
    0,
#if PY_VERSION_HEX < 0x030500A0
    offsetof(__pyx_CyFunctionObject, func_weakreflist),
#else
    offsetof(PyCFunctionObject, m_weakreflist),
#endif
    0,
    0,
    __pyx_CyFunction_methods,
    __pyx_CyFunction_members,
    __pyx_CyFunction_getsets,
    0,
    0,
    __Pyx_CyFunction_descr_get,
    0,
    offsetof(__pyx_CyFunctionObject, func_dict),
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if PY_VERSION_HEX >= 0x030400a1
    0,
#endif
};
static int __pyx_CyFunction_init(void) {
    __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
    if (unlikely(__pyx_CyFunctionType == NULL)) {
        return -1;
    }
    return 0;
}
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults = PyObject_Malloc(size);
    if (unlikely(!m->defaults))
        return PyErr_NoMemory();
    memset(m->defaults, 0, size);
    m->defaults_pyobjects = pyobjects;
    return m->defaults;
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_tuple = tuple;
    Py_INCREF(tuple);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_kwdict = dict;
    Py_INCREF(dict);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->func_annotations = dict;
    Py_INCREF(dict);
}

/* FusedFunction */
    static PyObject *
__pyx_FusedFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags,
                        PyObject *qualname, PyObject *self,
                        PyObject *module, PyObject *globals,
                        PyObject *code)
{
    __pyx_FusedFunctionObject *fusedfunc =
        (__pyx_FusedFunctionObject *) __Pyx_CyFunction_New(type, ml, flags, qualname,
                                                           self, module, globals, code);
    if (!fusedfunc)
        return NULL;
    fusedfunc->__signatures__ = NULL;
    fusedfunc->type = NULL;
    fusedfunc->self = NULL;
    return (PyObject *) fusedfunc;
}
static void
__pyx_FusedFunction_dealloc(__pyx_FusedFunctionObject *self)
{
    PyObject_GC_UnTrack(self);
    Py_CLEAR(self->self);
    Py_CLEAR(self->type);
    Py_CLEAR(self->__signatures__);
    __Pyx__CyFunction_dealloc((__pyx_CyFunctionObject *) self);
}
static int
__pyx_FusedFunction_traverse(__pyx_FusedFunctionObject *self,
                             visitproc visit,
                             void *arg)
{
    Py_VISIT(self->self);
    Py_VISIT(self->type);
    Py_VISIT(self->__signatures__);
    return __Pyx_CyFunction_traverse((__pyx_CyFunctionObject *) self, visit, arg);
}
static int
__pyx_FusedFunction_clear(__pyx_FusedFunctionObject *self)
{
    Py_CLEAR(self->self);
    Py_CLEAR(self->type);
    Py_CLEAR(self->__signatures__);
    return __Pyx_CyFunction_clear((__pyx_CyFunctionObject *) self);
}
static PyObject *
__pyx_FusedFunction_descr_get(PyObject *self, PyObject *obj, PyObject *type)
{
    __pyx_FusedFunctionObject *func, *meth;
    func = (__pyx_FusedFunctionObject *) self;
    if (func->self || func->func.flags & __Pyx_CYFUNCTION_STATICMETHOD) {
        Py_INCREF(self);
        return self;
    }
    if (obj == Py_None)
        obj = NULL;
    meth = (__pyx_FusedFunctionObject *) __pyx_FusedFunction_NewEx(
                    ((PyCFunctionObject *) func)->m_ml,
                    ((__pyx_CyFunctionObject *) func)->flags,
                    ((__pyx_CyFunctionObject *) func)->func_qualname,
                    ((__pyx_CyFunctionObject *) func)->func_closure,
                    ((PyCFunctionObject *) func)->m_module,
                    ((__pyx_CyFunctionObject *) func)->func_globals,
                    ((__pyx_CyFunctionObject *) func)->func_code);
    if (!meth)
        return NULL;
    Py_XINCREF(func->func.func_classobj);
    meth->func.func_classobj = func->func.func_classobj;
    Py_XINCREF(func->__signatures__);
    meth->__signatures__ = func->__signatures__;
    Py_XINCREF(type);
    meth->type = type;
    Py_XINCREF(func->func.defaults_tuple);
    meth->func.defaults_tuple = func->func.defaults_tuple;
    if (func->func.flags & __Pyx_CYFUNCTION_CLASSMETHOD)
        obj = type;
    Py_XINCREF(obj);
    meth->self = obj;
    return (PyObject *) meth;
}
static PyObject *
_obj_to_str(PyObject *obj)
{
    if (PyType_Check(obj))
        return PyObject_GetAttr(obj, __pyx_n_s_name);
    else
        return PyObject_Str(obj);
}
static PyObject *
__pyx_FusedFunction_getitem(__pyx_FusedFunctionObject *self, PyObject *idx)
{
    PyObject *signature = NULL;
    PyObject *unbound_result_func;
    PyObject *result_func = NULL;
    if (self->__signatures__ == NULL) {
        PyErr_SetString(PyExc_TypeError, "Function is not fused");
        return NULL;
    }
    if (PyTuple_Check(idx)) {
        PyObject *list = PyList_New(0);
        Py_ssize_t n = PyTuple_GET_SIZE(idx);
        PyObject *string = NULL;
        PyObject *sep = NULL;
        int i;
        if (!list)
            return NULL;
        for (i = 0; i < n; i++) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            PyObject *item = PyTuple_GET_ITEM(idx, i);
#else
            PyObject *item = PySequence_ITEM(idx, i);
#endif
            string = _obj_to_str(item);
#if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
            Py_DECREF(item);
#endif
            if (!string || PyList_Append(list, string) < 0)
                goto __pyx_err;
            Py_DECREF(string);
        }
        sep = PyUnicode_FromString("|");
        if (sep)
            signature = PyUnicode_Join(sep, list);
__pyx_err:
;
        Py_DECREF(list);
        Py_XDECREF(sep);
    } else {
        signature = _obj_to_str(idx);
    }
    if (!signature)
        return NULL;
    unbound_result_func = PyObject_GetItem(self->__signatures__, signature);
    if (unbound_result_func) {
        if (self->self || self->type) {
            __pyx_FusedFunctionObject *unbound = (__pyx_FusedFunctionObject *) unbound_result_func;
            Py_CLEAR(unbound->func.func_classobj);
            Py_XINCREF(self->func.func_classobj);
            unbound->func.func_classobj = self->func.func_classobj;
            result_func = __pyx_FusedFunction_descr_get(unbound_result_func,
                                                        self->self, self->type);
        } else {
            result_func = unbound_result_func;
            Py_INCREF(result_func);
        }
    }
    Py_DECREF(signature);
    Py_XDECREF(unbound_result_func);
    return result_func;
}
static PyObject *
__pyx_FusedFunction_callfunction(PyObject *func, PyObject *args, PyObject *kw)
{
     __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
    int static_specialized = (cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD &&
                              !((__pyx_FusedFunctionObject *) func)->__signatures__);
    if (cyfunc->flags & __Pyx_CYFUNCTION_CCLASS && !static_specialized) {
        return __Pyx_CyFunction_CallAsMethod(func, args, kw);
    } else {
        return __Pyx_CyFunction_Call(func, args, kw);
    }
}
static PyObject *
__pyx_FusedFunction_call(PyObject *func, PyObject *args, PyObject *kw)
{
    __pyx_FusedFunctionObject *binding_func = (__pyx_FusedFunctionObject *) func;
    Py_ssize_t argc = PyTuple_GET_SIZE(args);
    PyObject *new_args = NULL;
    __pyx_FusedFunctionObject *new_func = NULL;
    PyObject *result = NULL;
    PyObject *self = NULL;
    int is_staticmethod = binding_func->func.flags & __Pyx_CYFUNCTION_STATICMETHOD;
    int is_classmethod = binding_func->func.flags & __Pyx_CYFUNCTION_CLASSMETHOD;
    if (binding_func->self) {
        Py_ssize_t i;
        new_args = PyTuple_New(argc + 1);
        if (!new_args)
            return NULL;
        self = binding_func->self;
#if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
        Py_INCREF(self);
#endif
        Py_INCREF(self);
        PyTuple_SET_ITEM(new_args, 0, self);
        for (i = 0; i < argc; i++) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            PyObject *item = PyTuple_GET_ITEM(args, i);
            Py_INCREF(item);
#else
            PyObject *item = PySequence_ITEM(args, i);  if (unlikely(!item)) goto bad;
#endif
            PyTuple_SET_ITEM(new_args, i + 1, item);
        }
        args = new_args;
    } else if (binding_func->type) {
        if (argc < 1) {
            PyErr_SetString(PyExc_TypeError, "Need at least one argument, 0 given.");
            return NULL;
        }
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        self = PyTuple_GET_ITEM(args, 0);
#else
        self = PySequence_ITEM(args, 0);  if (unlikely(!self)) return NULL;
#endif
    }
    if (self && !is_classmethod && !is_staticmethod) {
        int is_instance = PyObject_IsInstance(self, binding_func->type);
        if (unlikely(!is_instance)) {
            PyErr_Format(PyExc_TypeError,
                         "First argument should be of type %.200s, got %.200s.",
                         ((PyTypeObject *) binding_func->type)->tp_name,
                         self->ob_type->tp_name);
            goto bad;
        } else if (unlikely(is_instance == -1)) {
            goto bad;
        }
    }
#if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
    Py_XDECREF(self);
    self = NULL;
#endif
    if (binding_func->__signatures__) {
        PyObject *tup;
        if (is_staticmethod && binding_func->func.flags & __Pyx_CYFUNCTION_CCLASS) {
            tup = PyTuple_Pack(3, args,
                               kw == NULL ? Py_None : kw,
                               binding_func->func.defaults_tuple);
            if (unlikely(!tup)) goto bad;
            new_func = (__pyx_FusedFunctionObject *) __Pyx_CyFunction_CallMethod(
                func, binding_func->__signatures__, tup, NULL);
        } else {
            tup = PyTuple_Pack(4, binding_func->__signatures__, args,
                               kw == NULL ? Py_None : kw,
                               binding_func->func.defaults_tuple);
            if (unlikely(!tup)) goto bad;
            new_func = (__pyx_FusedFunctionObject *) __pyx_FusedFunction_callfunction(func, tup, NULL);
        }
        Py_DECREF(tup);
        if (unlikely(!new_func))
            goto bad;
        Py_XINCREF(binding_func->func.func_classobj);
        Py_CLEAR(new_func->func.func_classobj);
        new_func->func.func_classobj = binding_func->func.func_classobj;
        func = (PyObject *) new_func;
    }
    result = __pyx_FusedFunction_callfunction(func, args, kw);
bad:
#if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
    Py_XDECREF(self);
#endif
    Py_XDECREF(new_args);
    Py_XDECREF((PyObject *) new_func);
    return result;
}
static PyMemberDef __pyx_FusedFunction_members[] = {
    {(char *) "__signatures__",
     T_OBJECT,
     offsetof(__pyx_FusedFunctionObject, __signatures__),
     READONLY,
     0},
    {0, 0, 0, 0, 0},
};
static PyMappingMethods __pyx_FusedFunction_mapping_methods = {
    0,
    (binaryfunc) __pyx_FusedFunction_getitem,
    0,
};
static PyTypeObject __pyx_FusedFunctionType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    "fused_cython_function",
    sizeof(__pyx_FusedFunctionObject),
    0,
    (destructor) __pyx_FusedFunction_dealloc,
    0,
    0,
    0,
#if PY_MAJOR_VERSION < 3
    0,
#else
    0,
#endif
    0,
    0,
    0,
    &__pyx_FusedFunction_mapping_methods,
    0,
    (ternaryfunc) __pyx_FusedFunction_call,
    0,
    0,
    0,
    0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
    0,
    (traverseproc) __pyx_FusedFunction_traverse,
    (inquiry) __pyx_FusedFunction_clear,
    0,
    0,
    0,
    0,
    0,
    __pyx_FusedFunction_members,
    __pyx_CyFunction_getsets,
    &__pyx_CyFunctionType_type,
    0,
    __pyx_FusedFunction_descr_get,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if PY_VERSION_HEX >= 0x030400a1
    0,
#endif
};
static int __pyx_FusedFunction_init(void) {
    __pyx_FusedFunctionType = __Pyx_FetchCommonType(&__pyx_FusedFunctionType_type);
    if (__pyx_FusedFunctionType == NULL) {
        return -1;
    }
    return 0;
}

/* CLineInTraceback */
    #ifndef CYTHON_CLINE_IN_TRACEBACK
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
    PyObject *use_cline;
    PyObject *ptype, *pvalue, *ptraceback;
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject **cython_runtime_dict;
#endif
    if (unlikely(!__pyx_cython_runtime)) {
        return c_line;
    }
    __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
#if CYTHON_COMPILING_IN_CPYTHON
    cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
    if (likely(cython_runtime_dict)) {
        __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
            use_cline, *cython_runtime_dict,
            __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
    } else
#endif
    {
      PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
      if (use_cline_obj) {
        use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
        Py_DECREF(use_cline_obj);
      } else {
        PyErr_Clear();
        use_cline = NULL;
      }
    }
    if (!use_cline) {
        c_line = 0;
        PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
    }
    else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
        c_line = 0;
    }
    __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
    return c_line;
}
#endif

/* CodeObjectCache */
    static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
    int start = 0, mid = 0, end = count - 1;
    if (end >= 0 && code_line > entries[end].code_line) {
        return count;
    }
    while (start < end) {
        mid = start + (end - start) / 2;
        if (code_line < entries[mid].code_line) {
            end = mid;
        } else if (code_line > entries[mid].code_line) {
             start = mid + 1;
        } else {
            return mid;
        }
    }
    if (code_line <= entries[mid].code_line) {
        return mid;
    } else {
        return mid + 1;
    }
}
static PyCodeObject *__pyx_find_code_object(int code_line) {
    PyCodeObject* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = __pyx_code_cache.entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            __pyx_code_cache.entries = entries;
            __pyx_code_cache.max_count = 64;
            __pyx_code_cache.count = 1;
            entries[0].code_line = code_line;
            entries[0].code_object = code_object;
            Py_INCREF(code_object);
        }
        return;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
        PyCodeObject* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_DECREF(tmp);
        return;
    }
    if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
        int new_max = __pyx_code_cache.max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        __pyx_code_cache.entries = entries;
        __pyx_code_cache.max_count = new_max;
    }
    for (i=__pyx_code_cache.count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    __pyx_code_cache.count++;
    Py_INCREF(code_object);
}

/* AddTraceback */
    #include "compile.h"
#include "frameobject.h"
#include "traceback.h"
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
            const char *funcname, int c_line,
            int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyObject *py_srcfile = 0;
    PyObject *py_funcname = 0;
    #if PY_MAJOR_VERSION < 3
    py_srcfile = PyString_FromString(filename);
    #else
    py_srcfile = PyUnicode_FromString(filename);
    #endif
    if (!py_srcfile) goto bad;
    if (c_line) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #else
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #endif
    }
    else {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromString(funcname);
        #else
        py_funcname = PyUnicode_FromString(funcname);
        #endif
    }
    if (!py_funcname) goto bad;
    py_code = __Pyx_PyCode_New(
        0,
        0,
        0,
        0,
        0,
        __pyx_empty_bytes, /*PyObject *code,*/
        __pyx_empty_tuple, /*PyObject *consts,*/
        __pyx_empty_tuple, /*PyObject *names,*/
        __pyx_empty_tuple, /*PyObject *varnames,*/
        __pyx_empty_tuple, /*PyObject *freevars,*/
        __pyx_empty_tuple, /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        py_line,
        __pyx_empty_bytes  /*PyObject *lnotab*/
    );
    Py_DECREF(py_srcfile);
    Py_DECREF(py_funcname);
    return py_code;
bad:
    Py_XDECREF(py_srcfile);
    Py_XDECREF(py_funcname);
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    if (c_line) {
        c_line = __Pyx_CLineForTraceback(tstate, c_line);
    }
    py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
    if (!py_code) {
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) goto bad;
        __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
    }
    py_frame = PyFrame_New(
        tstate,            /*PyThreadState *tstate,*/
        py_code,           /*PyCodeObject *code,*/
        __pyx_d,    /*PyObject *globals,*/
        0                  /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}

/* CIntToPy */
    static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum____pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index(enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index value) {
    const enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index neg_one = (enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index) ((enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index) 0 - (enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index) 1), const_zero = (enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index),
                                     little, !is_unsigned);
    }
}

/* CIntFromPyVerify */
    #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
    {\
        func_type value = func_value;\
        if (sizeof(target_type) < sizeof(func_type)) {\
            if (unlikely(value != (func_type) (target_type) value)) {\
                func_type zero = 0;\
                if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
                    return (target_type) -1;\
                if (is_unsigned && unlikely(value < zero))\
                    goto raise_neg_overflow;\
                else\
                    goto raise_overflow;\
            }\
        }\
        return (target_type) value;\
    }

#if PY_MAJOR_VERSION < 3
static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) {
    if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags);
        if (__Pyx_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) return __pyx_pw_5numpy_7ndarray_1__getbuffer__(obj, view, flags);
    PyErr_Format(PyExc_TypeError, "'%.200s' does not have the buffer interface", Py_TYPE(obj)->tp_name);
    return -1;
}
static void __Pyx_ReleaseBuffer(Py_buffer *view) {
    PyObject *obj = view->obj;
    if (!obj) return;
    if (PyObject_CheckBuffer(obj)) {
        PyBuffer_Release(view);
        return;
    }
    if ((0)) {}
        else if (__Pyx_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) __pyx_pw_5numpy_7ndarray_3__releasebuffer__(obj, view);
    view->obj = NULL;
    Py_DECREF(obj);
}
#endif


    /* CIntToPy */
    static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
    const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(long) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(long) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(long),
                                     little, !is_unsigned);
    }
}

/* Print */
    #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3
static PyObject *__Pyx_GetStdout(void) {
    PyObject *f = PySys_GetObject((char *)"stdout");
    if (!f) {
        PyErr_SetString(PyExc_RuntimeError, "lost sys.stdout");
    }
    return f;
}
static int __Pyx_Print(PyObject* f, PyObject *arg_tuple, int newline) {
    int i;
    if (!f) {
        if (!(f = __Pyx_GetStdout()))
            return -1;
    }
    Py_INCREF(f);
    for (i=0; i < PyTuple_GET_SIZE(arg_tuple); i++) {
        PyObject* v;
        if (PyFile_SoftSpace(f, 1)) {
            if (PyFile_WriteString(" ", f) < 0)
                goto error;
        }
        v = PyTuple_GET_ITEM(arg_tuple, i);
        if (PyFile_WriteObject(v, f, Py_PRINT_RAW) < 0)
            goto error;
        if (PyString_Check(v)) {
            char *s = PyString_AsString(v);
            Py_ssize_t len = PyString_Size(v);
            if (len > 0) {
                switch (s[len-1]) {
                    case ' ': break;
                    case '\f': case '\r': case '\n': case '\t': case '\v':
                        PyFile_SoftSpace(f, 0);
                        break;
                    default:  break;
                }
            }
        }
    }
    if (newline) {
        if (PyFile_WriteString("\n", f) < 0)
            goto error;
        PyFile_SoftSpace(f, 0);
    }
    Py_DECREF(f);
    return 0;
error:
    Py_DECREF(f);
    return -1;
}
#else
static int __Pyx_Print(PyObject* stream, PyObject *arg_tuple, int newline) {
    PyObject* kwargs = 0;
    PyObject* result = 0;
    PyObject* end_string;
    if (unlikely(!__pyx_print)) {
        __pyx_print = PyObject_GetAttr(__pyx_b, __pyx_n_s_print);
        if (!__pyx_print)
            return -1;
    }
    if (stream) {
        kwargs = PyDict_New();
        if (unlikely(!kwargs))
            return -1;
        if (unlikely(PyDict_SetItem(kwargs, __pyx_n_s_file, stream) < 0))
            goto bad;
        if (!newline) {
            end_string = PyUnicode_FromStringAndSize(" ", 1);
            if (unlikely(!end_string))
                goto bad;
            if (PyDict_SetItem(kwargs, __pyx_n_s_end, end_string) < 0) {
                Py_DECREF(end_string);
                goto bad;
            }
            Py_DECREF(end_string);
        }
    } else if (!newline) {
        if (unlikely(!__pyx_print_kwargs)) {
            __pyx_print_kwargs = PyDict_New();
            if (unlikely(!__pyx_print_kwargs))
                return -1;
            end_string = PyUnicode_FromStringAndSize(" ", 1);
            if (unlikely(!end_string))
                return -1;
            if (PyDict_SetItem(__pyx_print_kwargs, __pyx_n_s_end, end_string) < 0) {
                Py_DECREF(end_string);
                return -1;
            }
            Py_DECREF(end_string);
        }
        kwargs = __pyx_print_kwargs;
    }
    result = PyObject_Call(__pyx_print, arg_tuple, kwargs);
    if (unlikely(kwargs) && (kwargs != __pyx_print_kwargs))
        Py_DECREF(kwargs);
    if (!result)
        return -1;
    Py_DECREF(result);
    return 0;
bad:
    if (kwargs != __pyx_print_kwargs)
        Py_XDECREF(kwargs);
    return -1;
}
#endif

/* Declarations */
    #if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
      return ::std::complex< float >(x, y);
    }
  #else
    static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
      return x + y*(__pyx_t_float_complex)_Complex_I;
    }
  #endif
#else
    static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
      __pyx_t_float_complex z;
      z.real = x;
      z.imag = y;
      return z;
    }
#endif

/* Arithmetic */
    #if CYTHON_CCOMPLEX
#else
    static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
       return (a.real == b.real) && (a.imag == b.imag);
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        __pyx_t_float_complex z;
        z.real = a.real + b.real;
        z.imag = a.imag + b.imag;
        return z;
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        __pyx_t_float_complex z;
        z.real = a.real - b.real;
        z.imag = a.imag - b.imag;
        return z;
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        __pyx_t_float_complex z;
        z.real = a.real * b.real - a.imag * b.imag;
        z.imag = a.real * b.imag + a.imag * b.real;
        return z;
    }
    #if 1
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        if (b.imag == 0) {
            return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
        } else if (fabsf(b.real) >= fabsf(b.imag)) {
            if (b.real == 0 && b.imag == 0) {
                return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.imag);
            } else {
                float r = b.imag / b.real;
                float s = 1.0 / (b.real + b.imag * r);
                return __pyx_t_float_complex_from_parts(
                    (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
            }
        } else {
            float r = b.real / b.imag;
            float s = 1.0 / (b.imag + b.real * r);
            return __pyx_t_float_complex_from_parts(
                (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
        }
    }
    #else
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        if (b.imag == 0) {
            return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
        } else {
            float denom = b.real * b.real + b.imag * b.imag;
            return __pyx_t_float_complex_from_parts(
                (a.real * b.real + a.imag * b.imag) / denom,
                (a.imag * b.real - a.real * b.imag) / denom);
        }
    }
    #endif
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex a) {
        __pyx_t_float_complex z;
        z.real = -a.real;
        z.imag = -a.imag;
        return z;
    }
    static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex a) {
       return (a.real == 0) && (a.imag == 0);
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex a) {
        __pyx_t_float_complex z;
        z.real =  a.real;
        z.imag = -a.imag;
        return z;
    }
    #if 1
        static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex z) {
          #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
            return sqrtf(z.real*z.real + z.imag*z.imag);
          #else
            return hypotf(z.real, z.imag);
          #endif
        }
        static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
            __pyx_t_float_complex z;
            float r, lnr, theta, z_r, z_theta;
            if (b.imag == 0 && b.real == (int)b.real) {
                if (b.real < 0) {
                    float denom = a.real * a.real + a.imag * a.imag;
                    a.real = a.real / denom;
                    a.imag = -a.imag / denom;
                    b.real = -b.real;
                }
                switch ((int)b.real) {
                    case 0:
                        z.real = 1;
                        z.imag = 0;
                        return z;
                    case 1:
                        return a;
                    case 2:
                        z = __Pyx_c_prod_float(a, a);
                        return __Pyx_c_prod_float(a, a);
                    case 3:
                        z = __Pyx_c_prod_float(a, a);
                        return __Pyx_c_prod_float(z, a);
                    case 4:
                        z = __Pyx_c_prod_float(a, a);
                        return __Pyx_c_prod_float(z, z);
                }
            }
            if (a.imag == 0) {
                if (a.real == 0) {
                    return a;
                } else if (b.imag == 0) {
                    z.real = powf(a.real, b.real);
                    z.imag = 0;
                    return z;
                } else if (a.real > 0) {
                    r = a.real;
                    theta = 0;
                } else {
                    r = -a.real;
                    theta = atan2f(0, -1);
                }
            } else {
                r = __Pyx_c_abs_float(a);
                theta = atan2f(a.imag, a.real);
            }
            lnr = logf(r);
            z_r = expf(lnr * b.real - theta * b.imag);
            z_theta = theta * b.real + lnr * b.imag;
            z.real = z_r * cosf(z_theta);
            z.imag = z_r * sinf(z_theta);
            return z;
        }
    #endif
#endif

/* Declarations */
    #if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
      return ::std::complex< double >(x, y);
    }
  #else
    static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
      return x + y*(__pyx_t_double_complex)_Complex_I;
    }
  #endif
#else
    static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
      __pyx_t_double_complex z;
      z.real = x;
      z.imag = y;
      return z;
    }
#endif

/* Arithmetic */
    #if CYTHON_CCOMPLEX
#else
    static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
       return (a.real == b.real) && (a.imag == b.imag);
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        __pyx_t_double_complex z;
        z.real = a.real + b.real;
        z.imag = a.imag + b.imag;
        return z;
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        __pyx_t_double_complex z;
        z.real = a.real - b.real;
        z.imag = a.imag - b.imag;
        return z;
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        __pyx_t_double_complex z;
        z.real = a.real * b.real - a.imag * b.imag;
        z.imag = a.real * b.imag + a.imag * b.real;
        return z;
    }
    #if 1
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        if (b.imag == 0) {
            return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
        } else if (fabs(b.real) >= fabs(b.imag)) {
            if (b.real == 0 && b.imag == 0) {
                return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.imag);
            } else {
                double r = b.imag / b.real;
                double s = 1.0 / (b.real + b.imag * r);
                return __pyx_t_double_complex_from_parts(
                    (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
            }
        } else {
            double r = b.real / b.imag;
            double s = 1.0 / (b.imag + b.real * r);
            return __pyx_t_double_complex_from_parts(
                (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
        }
    }
    #else
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        if (b.imag == 0) {
            return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
        } else {
            double denom = b.real * b.real + b.imag * b.imag;
            return __pyx_t_double_complex_from_parts(
                (a.real * b.real + a.imag * b.imag) / denom,
                (a.imag * b.real - a.real * b.imag) / denom);
        }
    }
    #endif
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex a) {
        __pyx_t_double_complex z;
        z.real = -a.real;
        z.imag = -a.imag;
        return z;
    }
    static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex a) {
       return (a.real == 0) && (a.imag == 0);
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex a) {
        __pyx_t_double_complex z;
        z.real =  a.real;
        z.imag = -a.imag;
        return z;
    }
    #if 1
        static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex z) {
          #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
            return sqrt(z.real*z.real + z.imag*z.imag);
          #else
            return hypot(z.real, z.imag);
          #endif
        }
        static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
            __pyx_t_double_complex z;
            double r, lnr, theta, z_r, z_theta;
            if (b.imag == 0 && b.real == (int)b.real) {
                if (b.real < 0) {
                    double denom = a.real * a.real + a.imag * a.imag;
                    a.real = a.real / denom;
                    a.imag = -a.imag / denom;
                    b.real = -b.real;
                }
                switch ((int)b.real) {
                    case 0:
                        z.real = 1;
                        z.imag = 0;
                        return z;
                    case 1:
                        return a;
                    case 2:
                        z = __Pyx_c_prod_double(a, a);
                        return __Pyx_c_prod_double(a, a);
                    case 3:
                        z = __Pyx_c_prod_double(a, a);
                        return __Pyx_c_prod_double(z, a);
                    case 4:
                        z = __Pyx_c_prod_double(a, a);
                        return __Pyx_c_prod_double(z, z);
                }
            }
            if (a.imag == 0) {
                if (a.real == 0) {
                    return a;
                } else if (b.imag == 0) {
                    z.real = pow(a.real, b.real);
                    z.imag = 0;
                    return z;
                } else if (a.real > 0) {
                    r = a.real;
                    theta = 0;
                } else {
                    r = -a.real;
                    theta = atan2(0, -1);
                }
            } else {
                r = __Pyx_c_abs_double(a);
                theta = atan2(a.imag, a.real);
            }
            lnr = log(r);
            z_r = exp(lnr * b.real - theta * b.imag);
            z_theta = theta * b.real + lnr * b.imag;
            z.real = z_r * cos(z_theta);
            z.imag = z_r * sin(z_theta);
            return z;
        }
    #endif
#endif

/* CIntToPy */
    static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
    const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(int) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(int),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
    static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value) {
    const enum NPY_TYPES neg_one = (enum NPY_TYPES) ((enum NPY_TYPES) 0 - (enum NPY_TYPES) 1), const_zero = (enum NPY_TYPES) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum NPY_TYPES) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum NPY_TYPES) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum NPY_TYPES) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(enum NPY_TYPES),
                                     little, !is_unsigned);
    }
}

/* CIntFromPy */
    static CYTHON_INLINE enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index __Pyx_PyInt_As_enum____pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index(PyObject *x) {
    const enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index neg_one = (enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index) ((enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index) 0 - (enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index) 1), const_zero = (enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index) 0;
                case  1: __PYX_VERIFY_RETURN_INT(enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index, digit, digits[0])
                case 2:
                    if (8 * sizeof(enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index) >= 2 * PyLong_SHIFT) {
                            return (enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index) (((((enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index) >= 3 * PyLong_SHIFT) {
                            return (enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index) (((((((enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index) >= 4 * PyLong_SHIFT) {
                            return (enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index) (((((((((enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index)digits[3]) << PyLong_SHIFT) | (enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index) 0;
                case -1: __PYX_VERIFY_RETURN_INT(enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index) - 1 > 2 * PyLong_SHIFT) {
                            return (enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index) (((enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index)-1)*(((((enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index) - 1 > 2 * PyLong_SHIFT) {
                            return (enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index) ((((((enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index) - 1 > 3 * PyLong_SHIFT) {
                            return (enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index) (((enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index)-1)*(((((((enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index) - 1 > 3 * PyLong_SHIFT) {
                            return (enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index) ((((((((enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index) - 1 > 4 * PyLong_SHIFT) {
                            return (enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index) (((enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index)-1)*(((((((((enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index)digits[3]) << PyLong_SHIFT) | (enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index) - 1 > 4 * PyLong_SHIFT) {
                            return (enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index) ((((((((((enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index)digits[3]) << PyLong_SHIFT) | (enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index) -1;
        }
    } else {
        enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index) -1;
        val = __Pyx_PyInt_As_enum____pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index");
    return (enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index");
    return (enum __pyx_t_5PDSim_6scroll_17common_scroll_geo_involute_index) -1;
}

/* CIntFromPy */
    static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
    const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(int) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case  1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
                            return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
                            return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __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])))
                        } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
                            return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (int) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(int) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(int,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __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])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(int) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            int val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (int) -1;
        }
    } else {
        int val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (int) -1;
        val = __Pyx_PyInt_As_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int");
    return (int) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int");
    return (int) -1;
}

/* CIntFromPy */
    static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
    const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(long) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (long) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case  1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
                            return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
                            return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __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])))
                        } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
                            return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (long) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(long) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(long,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                            return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                            return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __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])))
                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                            return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(long) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            long val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (long) -1;
        }
    } else {
        long val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (long) -1;
        val = __Pyx_PyInt_As_long(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to long");
    return (long) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to long");
    return (long) -1;
}

/* PrintOne */
    #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3
static int __Pyx_PrintOne(PyObject* f, PyObject *o) {
    if (!f) {
        if (!(f = __Pyx_GetStdout()))
            return -1;
    }
    Py_INCREF(f);
    if (PyFile_SoftSpace(f, 0)) {
        if (PyFile_WriteString(" ", f) < 0)
            goto error;
    }
    if (PyFile_WriteObject(o, f, Py_PRINT_RAW) < 0)
        goto error;
    if (PyFile_WriteString("\n", f) < 0)
        goto error;
    Py_DECREF(f);
    return 0;
error:
    Py_DECREF(f);
    return -1;
    /* the line below is just to avoid C compiler
     * warnings about unused functions */
    return __Pyx_Print(f, NULL, 0);
}
#else
static int __Pyx_PrintOne(PyObject* stream, PyObject *o) {
    int res;
    PyObject* arg_tuple = PyTuple_Pack(1, o);
    if (unlikely(!arg_tuple))
        return -1;
    res = __Pyx_Print(stream, arg_tuple, 1);
    Py_DECREF(arg_tuple);
    return res;
}
#endif

/* ImportNumPyArray */
    static PyObject* __Pyx__ImportNumPyArray(void) {
    PyObject *numpy_module, *ndarray_object = NULL;
    numpy_module = __Pyx_Import(__pyx_n_s_numpy, NULL, 0);
    if (likely(numpy_module)) {
        ndarray_object = PyObject_GetAttrString(numpy_module, "ndarray");
        Py_DECREF(numpy_module);
    }
    if (unlikely(!ndarray_object)) {
        PyErr_Clear();
    }
    if (unlikely(!ndarray_object || !PyObject_TypeCheck(ndarray_object, &PyType_Type))) {
        Py_XDECREF(ndarray_object);
        Py_INCREF(Py_None);
        ndarray_object = Py_None;
    }
    return ndarray_object;
}
static CYTHON_INLINE PyObject* __Pyx_ImportNumPyArrayTypeIfAvailable(void) {
    if (unlikely(!__pyx_numpy_ndarray)) {
        __pyx_numpy_ndarray = __Pyx__ImportNumPyArray();
    }
    Py_INCREF(__pyx_numpy_ndarray);
    return __pyx_numpy_ndarray;
}

/* FastTypeChecks */
    #if CYTHON_COMPILING_IN_CPYTHON
static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
    while (a) {
        a = a->tp_base;
        if (a == b)
            return 1;
    }
    return b == &PyBaseObject_Type;
}
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
    PyObject *mro;
    if (a == b) return 1;
    mro = a->tp_mro;
    if (likely(mro)) {
        Py_ssize_t i, n;
        n = PyTuple_GET_SIZE(mro);
        for (i = 0; i < n; i++) {
            if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
                return 1;
        }
        return 0;
    }
    return __Pyx_InBases(a, b);
}
#if PY_MAJOR_VERSION == 2
static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
    PyObject *exception, *value, *tb;
    int res;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&exception, &value, &tb);
    res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
    if (unlikely(res == -1)) {
        PyErr_WriteUnraisable(err);
        res = 0;
    }
    if (!res) {
        res = PyObject_IsSubclass(err, exc_type2);
        if (unlikely(res == -1)) {
            PyErr_WriteUnraisable(err);
            res = 0;
        }
    }
    __Pyx_ErrRestore(exception, value, tb);
    return res;
}
#else
static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
    int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
    if (!res) {
        res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
    }
    return res;
}
#endif
static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    assert(PyExceptionClass_Check(exc_type));
    n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        PyObject *t = PyTuple_GET_ITEM(tuple, i);
        #if PY_MAJOR_VERSION < 3
        if (likely(exc_type == t)) return 1;
        #endif
        if (likely(PyExceptionClass_Check(t))) {
            if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
        } else {
        }
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
    if (likely(err == exc_type)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        if (likely(PyExceptionClass_Check(exc_type))) {
            return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
        } else if (likely(PyTuple_Check(exc_type))) {
            return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
        } else {
        }
    }
    return PyErr_GivenExceptionMatches(err, exc_type);
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
    assert(PyExceptionClass_Check(exc_type1));
    assert(PyExceptionClass_Check(exc_type2));
    if (likely(err == exc_type1 || err == exc_type2)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
    }
    return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
}
#endif

/* CheckBinaryVersion */
    static int __Pyx_check_binary_version(void) {
    char ctversion[4], rtversion[4];
    PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
    PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
    if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
        char message[200];
        PyOS_snprintf(message, sizeof(message),
                      "compiletime version %s of module '%.100s' "
                      "does not match runtime version %s",
                      ctversion, __Pyx_MODULE_NAME, rtversion);
        return PyErr_WarnEx(NULL, message, 1);
    }
    return 0;
}

/* FunctionExport */
    static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig) {
    PyObject *d = 0;
    PyObject *cobj = 0;
    union {
        void (*fp)(void);
        void *p;
    } tmp;
    d = PyObject_GetAttrString(__pyx_m, (char *)"__pyx_capi__");
    if (!d) {
        PyErr_Clear();
        d = PyDict_New();
        if (!d)
            goto bad;
        Py_INCREF(d);
        if (PyModule_AddObject(__pyx_m, (char *)"__pyx_capi__", d) < 0)
            goto bad;
    }
    tmp.fp = f;
#if PY_VERSION_HEX >= 0x02070000
    cobj = PyCapsule_New(tmp.p, sig, 0);
#else
    cobj = PyCObject_FromVoidPtrAndDesc(tmp.p, (void *)sig, 0);
#endif
    if (!cobj)
        goto bad;
    if (PyDict_SetItemString(d, name, cobj) < 0)
        goto bad;
    Py_DECREF(cobj);
    Py_DECREF(d);
    return 0;
bad:
    Py_XDECREF(cobj);
    Py_XDECREF(d);
    return -1;
}

/* InitStrings */
    static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        #if PY_MAJOR_VERSION < 3
        if (t->is_unicode) {
            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
        } else if (t->intern) {
            *t->p = PyString_InternFromString(t->s);
        } else {
            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        }
        #else
        if (t->is_unicode | t->is_str) {
            if (t->intern) {
                *t->p = PyUnicode_InternFromString(t->s);
            } else if (t->encoding) {
                *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
            } else {
                *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
            }
        } else {
            *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
        }
        #endif
        if (!*t->p)
            return -1;
        if (PyObject_Hash(*t->p) == -1)
            return -1;
        ++t;
    }
    return 0;
}

static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
    return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
}
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
    Py_ssize_t ignore;
    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
}
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
#if !CYTHON_PEP393_ENABLED
static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    char* defenc_c;
    PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
    if (!defenc) return NULL;
    defenc_c = PyBytes_AS_STRING(defenc);
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    {
        char* end = defenc_c + PyBytes_GET_SIZE(defenc);
        char* c;
        for (c = defenc_c; c < end; c++) {
            if ((unsigned char) (*c) >= 128) {
                PyUnicode_AsASCIIString(o);
                return NULL;
            }
        }
    }
#endif
    *length = PyBytes_GET_SIZE(defenc);
    return defenc_c;
}
#else
static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    if (likely(PyUnicode_IS_ASCII(o))) {
        *length = PyUnicode_GET_LENGTH(o);
        return PyUnicode_AsUTF8(o);
    } else {
        PyUnicode_AsASCIIString(o);
        return NULL;
    }
#else
    return PyUnicode_AsUTF8AndSize(o, length);
#endif
}
#endif
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
    if (
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
            __Pyx_sys_getdefaultencoding_not_ascii &&
#endif
            PyUnicode_Check(o)) {
        return __Pyx_PyUnicode_AsStringAndSize(o, length);
    } else
#endif
#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
    if (PyByteArray_Check(o)) {
        *length = PyByteArray_GET_SIZE(o);
        return PyByteArray_AS_STRING(o);
    } else
#endif
    {
        char* result;
        int r = PyBytes_AsStringAndSize(o, &result, length);
        if (unlikely(r < 0)) {
            return NULL;
        } else {
            return result;
        }
    }
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   int is_true = x == Py_True;
   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   else return PyObject_IsTrue(x);
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
    int retval;
    if (unlikely(!x)) return -1;
    retval = __Pyx_PyObject_IsTrue(x);
    Py_DECREF(x);
    return retval;
}
static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
#if PY_MAJOR_VERSION >= 3
    if (PyLong_Check(result)) {
        if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
                "__int__ returned non-int (type %.200s).  "
                "The ability to return an instance of a strict subclass of int "
                "is deprecated, and may be removed in a future version of Python.",
                Py_TYPE(result)->tp_name)) {
            Py_DECREF(result);
            return NULL;
        }
        return result;
    }
#endif
    PyErr_Format(PyExc_TypeError,
                 "__%.4s__ returned non-%.4s (type %.200s)",
                 type_name, type_name, Py_TYPE(result)->tp_name);
    Py_DECREF(result);
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
#if CYTHON_USE_TYPE_SLOTS
  PyNumberMethods *m;
#endif
  const char *name = NULL;
  PyObject *res = NULL;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_Check(x) || PyLong_Check(x)))
#else
  if (likely(PyLong_Check(x)))
#endif
    return __Pyx_NewRef(x);
#if CYTHON_USE_TYPE_SLOTS
  m = Py_TYPE(x)->tp_as_number;
  #if PY_MAJOR_VERSION < 3
  if (m && m->nb_int) {
    name = "int";
    res = m->nb_int(x);
  }
  else if (m && m->nb_long) {
    name = "long";
    res = m->nb_long(x);
  }
  #else
  if (likely(m && m->nb_int)) {
    name = "int";
    res = m->nb_int(x);
  }
  #endif
#else
  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
    res = PyNumber_Int(x);
  }
#endif
  if (likely(res)) {
#if PY_MAJOR_VERSION < 3
    if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
#else
    if (unlikely(!PyLong_CheckExact(res))) {
#endif
        return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
    }
  }
  else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_TypeError,
                    "an integer is required");
  }
  return res;
}
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject *x;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_CheckExact(b))) {
    if (sizeof(Py_ssize_t) >= sizeof(long))
        return PyInt_AS_LONG(b);
    else
        return PyInt_AsSsize_t(b);
  }
#endif
  if (likely(PyLong_CheckExact(b))) {
    #if CYTHON_USE_PYLONG_INTERNALS
    const digit* digits = ((PyLongObject*)b)->ob_digit;
    const Py_ssize_t size = Py_SIZE(b);
    if (likely(__Pyx_sst_abs(size) <= 1)) {
        ival = likely(size) ? digits[0] : 0;
        if (size == -1) ival = -ival;
        return ival;
    } else {
      switch (size) {
         case 2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
      }
    }
    #endif
    return PyLong_AsSsize_t(b);
  }
  x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyInt_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
}
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
    return PyInt_FromSize_t(ival);
}


#endif /* Py_PYTHON_H */
